- Added windows .exe for version 1.7c

- Fixed bug with { and } commands (unicode support added in v1.7b broke this)
This commit is contained in:
Rob Pearce 2006-01-20 05:45:50 +00:00
parent ef16be4174
commit 31696e0575
3 changed files with 24 additions and 11 deletions

View File

@ -1,4 +1,4 @@
#define VERSION "1.7a"
#define VERSION "1.7c"
/* variable sizes */
#define SMALLBUFLEN 64 /* small text buffer */

View File

@ -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();
}

Binary file not shown.