diff --git a/constants.h b/constants.h index 5d9e31f..d28be77 100644 --- a/constants.h +++ b/constants.h @@ -1,4 +1,4 @@ -#define VERSION "1.7a" +#define VERSION "1.7c" /* variable sizes */ #define SMALLBUFLEN 64 /* small text buffer */ diff --git a/netmapr.c b/netmapr.c index d86130d..d7623c1 100644 --- a/netmapr.c +++ b/netmapr.c @@ -150,6 +150,7 @@ int autoload = FALSE; int main (int argc, char **argv) { int done; int c; + int c2; int mod; int tmod; int o; @@ -193,6 +194,8 @@ int main (int argc, char **argv) { } atexit(cleanup); + SDL_EnableUNICODE(1); + if (autoload) { loadmap(); @@ -1513,7 +1516,8 @@ int main (int argc, char **argv) { drawscreen(); break; case SDL_KEYDOWN: - c = event.key.keysym.sym; + c = event.key.keysym.unicode & 0x7F; + c2 = event.key.keysym.sym; mod = SDL_GetModState(); /* state independant */ if (mod & KMOD_SHIFT) { @@ -1564,14 +1568,14 @@ int main (int argc, char **argv) { sprintf(temptext, "%c", c); strcat(text, temptext); updatetextcursor(); - } else if (c == SDLK_ESCAPE) { + } else if (c2 == SDLK_ESCAPE) { sprintf(statustext, "Aborted."); changestate(S_NONE); drawmap(); } else if (c == ' ') { strcat(text, " "); updatetextcursor(); - } else if (c == SDLK_BACKSPACE) { + } else if (c2 == SDLK_BACKSPACE) { text[strlen(text)-1] = '\0'; updatetextcursor(); } else if (c == 13) { /* enter */ @@ -1643,7 +1647,7 @@ int main (int argc, char **argv) { changestate(S_ADDTEXT); } } - if ((c == 'e') || (c == SDLK_F2)) { /* edit current text */ + if ((c == 'e') || (c2 == SDLK_F2)) { /* edit current text */ if (state == S_NONE) { if ( (map[curmap].selecteditemtype == T_TEXT) && (map[curmap].selecteditem != -1) ){ @@ -1807,16 +1811,16 @@ int main (int argc, char **argv) { drawobox(); } } - if (c == SDLK_BACKSPACE) { + if (c2 == SDLK_BACKSPACE) { goback(); } - if (c == SDLK_PAGEUP) { + if (c2 == SDLK_PAGEUP) { scrollobox(-OBOXPAGESIZE); } - if (c == SDLK_PAGEDOWN) { + if (c2 == SDLK_PAGEDOWN) { scrollobox(OBOXPAGESIZE); } - if (c == SDLK_DELETE) { + if (c2 == SDLK_DELETE) { if (map[curmap].selecteditem != -1) { if (map[curmap].selecteditemtype == T_LINKPOINT) { int i; @@ -1849,7 +1853,7 @@ int main (int argc, char **argv) { int amt; tmod = SDL_GetModState(); - if ((mod & KMOD_SHIFT)) { + if ((tmod & KMOD_SHIFT)) { amt = (map[curmap].numthings / MULTIRAISENUM); } else amt = 1; @@ -1860,13 +1864,21 @@ int main (int argc, char **argv) { int amt; tmod = SDL_GetModState(); - if ((mod & KMOD_SHIFT)) { + if ((tmod & KMOD_SHIFT)) { amt = (map[curmap].numthings / MULTIRAISENUM); } else amt = 1; /* lower the selected map[curmap].object */ lowerselected(amt); } + if (c == '{') { /* lower by lots */ + int amt = (map[curmap].numthings / MULTIRAISENUM); + lowerselected(amt); + } + if (c == '}') { /* raise by lots */ + int amt = (map[curmap].numthings / MULTIRAISENUM); + raiseselected(amt); + } } } break; @@ -2106,6 +2118,7 @@ void cleanup(void) { TTF_CloseFont(font[i]); } TTF_Quit(); + SDL_EnableUNICODE(0); SDL_Quit(); } diff --git a/netmapr.exe b/netmapr.exe index c55f27d..2634329 100755 Binary files a/netmapr.exe and b/netmapr.exe differ