diff --git a/polymer/eduke32/build/include/baselayer.h b/polymer/eduke32/build/include/baselayer.h index 701711f07..78078c745 100644 --- a/polymer/eduke32/build/include/baselayer.h +++ b/polymer/eduke32/build/include/baselayer.h @@ -105,7 +105,6 @@ void initprintf(const char *, ...) ATTRIBUTE((format(printf,1,2))); void debugprintf(const char *,...) ATTRIBUTE((format(printf,1,2))); int32_t handleevents(void); -extern void (*after_handleevents_hook)(void); extern inline void idle(void); extern inline void idle_waitevent(void); extern inline void idle_waitevent_timeout(uint32_t timeout); diff --git a/polymer/eduke32/build/include/editor.h b/polymer/eduke32/build/include/editor.h index 0e57f4f44..726374da1 100644 --- a/polymer/eduke32/build/include/editor.h +++ b/polymer/eduke32/build/include/editor.h @@ -138,7 +138,6 @@ extern void screencoords(int32_t *xres, int32_t *yres, int32_t x, int32_t y, int extern int32_t getinvdisplacement(int32_t *dx, int32_t *dy, int32_t dz) ATTRIBUTE((nonnull)); extern int32_t getscreenvdisp(int32_t bz, int32_t zoome); extern void setup_sideview_sincos(void); -extern void m32_setkeyfilter(int32_t on); extern void bfirst_search_init(int16_t *list, uint8_t *bitmap, int32_t *eltnumptr, int32_t maxnum, int16_t firstelt); extern void bfirst_search_try(int16_t *list, uint8_t *bitmap, int32_t *eltnumptr, int16_t elt); diff --git a/polymer/eduke32/build/src/baselayer.c b/polymer/eduke32/build/src/baselayer.c index 3f7f67da0..778846451 100644 --- a/polymer/eduke32/build/src/baselayer.c +++ b/polymer/eduke32/build/src/baselayer.c @@ -25,7 +25,6 @@ int32_t joyaxespresent=0; void(*keypresscallback)(int32_t,int32_t) = 0; void(*mousepresscallback)(int32_t,int32_t) = 0; void(*joypresscallback)(int32_t,int32_t) = 0; -void (*after_handleevents_hook)(void) = 0; extern int16_t brightness; diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 576f45173..5e5684638 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -95,7 +95,7 @@ extern char textfont[128][8]; // only valid when highlightsectorcnt>0 and no structural // modifications (deleting/inserting sectors or points, setting new firstwall) // have been made -static int16_t onextwall[MAXWALLS]; // onextwall[i]>=0 implies wall[j].nextwall < 0 +static int16_t onextwall[MAXWALLS]; // onextwall[i]>=0 implies wall[i].nextwall < 0 static void mkonwvalid(void) { chsecptr_onextwall = onextwall; } static void mkonwinvalid(void) { chsecptr_onextwall = NULL; } static int32_t onwisvalid(void) { return chsecptr_onextwall != NULL; } @@ -1857,35 +1857,6 @@ void update_highlightsector(void) } } -// hook run after handleevents in side view -static void sideview_filter_keys(void) -{ - uint32_t i; - - for (i=0; i 0) duplicate_selected_sprites(); - else if (circlewall >= 0) { circlewall = -1; } - else + else if (!m32_sideview) { if (linehighlight >= 0) { @@ -5574,10 +5540,11 @@ end_join_sectors: circlewall = linehighlight; } } + keystatus[0x2e] = 0; } - bad = keystatus[0x39]; //Gotta do this to save lots of 3 spaces! + bad = keystatus[0x39] && !m32_sideview; //Gotta do this to save lots of 3 spaces! if (circlewall >= 0) { @@ -6651,8 +6618,6 @@ nextmap: CANCEL: if (keystatus[1]) { - m32_setkeyfilter(0); - keystatus[1] = 0; #if M32_UNDO _printmessage16("(N)ew, (L)oad, (S)ave, save (A)s, (T)est map, (U)ndo, (R)edo, (Q)uit"); @@ -6915,8 +6880,6 @@ CANCEL: } clearkeys(); - - m32_setkeyfilter(1); } VM_OnEvent(EVENT_KEYS2D, -1); @@ -6952,8 +6915,6 @@ CANCEL: searchx = clamp(scale(searchx,xdimgame,xdim2d), 8, xdimgame-8-1); searchy = clamp(scale(searchy,ydimgame,ydim2d-STATUS2DSIZ), 8, ydimgame-8-1); - m32_setkeyfilter(0); - VM_OnEvent(EVENT_ENTER3DMODE, -1); } diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index 69a9c46f4..806f0ff20 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -75,6 +75,8 @@ char nogl=0; #endif int32_t vsync=0; +//#define KEY_PRINT_DEBUG + #if (SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION < 3) static char keytranslation[SDLK_LAST]; #else @@ -1676,7 +1678,10 @@ int32_t handleevents(void) case SDL_KEYDOWN: case SDL_KEYUP: code = keytranslation[ev.key.keysym.sym]; - +#ifdef KEY_PRINT_DEBUG + printf("keytranslation[%d] = %s (%d) %s\n", ev.key.keysym.sym, + key_names[code], code, ev.key.type==SDL_KEYDOWN?"DOWN":"UP"); +#endif if (code != OSD_OSDKey() && ev.key.keysym.unicode != 0 && ev.key.type == SDL_KEYDOWN && (ev.key.keysym.unicode & 0xff80) == 0 && ((keyasciififoend+1)&(KEYFIFOSIZ-1)) != keyasciififoplc) @@ -1881,9 +1886,6 @@ int32_t handleevents(void) #undef SetKey - if (after_handleevents_hook) - after_handleevents_hook(); - return rv; } diff --git a/polymer/eduke32/build/src/winlayer.c b/polymer/eduke32/build/src/winlayer.c index 1fefbe02b..be863545f 100644 --- a/polymer/eduke32/build/src/winlayer.c +++ b/polymer/eduke32/build/src/winlayer.c @@ -769,9 +769,6 @@ int32_t handleevents(void) sampletimer(); - if (after_handleevents_hook) - after_handleevents_hook(); - return rv; } diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 93d76fe9b..57e2046bb 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -7853,11 +7853,7 @@ static void Keys2d(void) { // PK_ if (numhelppages>0) - { - m32_setkeyfilter(0); IntegratedHelp(); - m32_setkeyfilter(1); - } else printmessage16("m32help.hlp invalid or not found!"); } @@ -7865,9 +7861,7 @@ static void Keys2d(void) if (PRESSED_KEYSC(F2)) if (g_numsounds > 0) { - m32_setkeyfilter(0); SoundDisplay(); - m32_setkeyfilter(1); } // F3: side view toggle (handled in build.c)