XRick: fixed some crashes
This commit is contained in:
@@ -7,10 +7,10 @@ AppName="XRick"
|
||||
AppFullName=net.xrick.sdl
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=102121203
|
||||
AppVersionCode=102121205
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="021212.03"
|
||||
AppVersionName="021212.05"
|
||||
|
||||
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
|
||||
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
|
||||
@@ -24,7 +24,7 @@ AppDataDownloadUrl="!Data size is 1 Mb|:data.zip:data.zip"
|
||||
ResetSdlConfigForThisVersion=y
|
||||
|
||||
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
|
||||
DeleteFilesOnUpgrade="%"
|
||||
DeleteFilesOnUpgrade="libsdl-DownloadFinished-0.flag"
|
||||
|
||||
# Here you may type readme text, which will be shown during startup. Format is:
|
||||
# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/
|
||||
@@ -223,7 +223,7 @@ AppSubdirsBuild='xrick-021212/src/* xrick-021212/include/*'
|
||||
AppBuildExclude=''
|
||||
|
||||
# Application command line parameters, including app name as 0-th param
|
||||
AppCmdline=''
|
||||
AppCmdline='xrick'
|
||||
|
||||
# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens
|
||||
# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge
|
||||
|
||||
Binary file not shown.
@@ -689,7 +689,9 @@ e_them_t3_action2(U8 e)
|
||||
* FIXME is it 8 of them, not 10?
|
||||
* FIXME testing below...
|
||||
*/
|
||||
syssnd_play(WAV_ENTITY[(ent_ents[e].trigsnd & 0x1F) - 0x14], 1);
|
||||
if ((ent_ents[e].trigsnd & 0x1F) - 0x14 >= 0 &&
|
||||
(ent_ents[e].trigsnd & 0x1F) - 0x14 < 10)
|
||||
syssnd_play(WAV_ENTITY[(ent_ents[e].trigsnd & 0x1F) - 0x14], 1);
|
||||
/*syssnd_play(WAV_ENTITY[0], 1);*/
|
||||
#endif
|
||||
ent_ents[e].n &= ~ENT_LETHAL;
|
||||
|
||||
@@ -626,6 +626,7 @@ play0(void)
|
||||
}
|
||||
|
||||
if (control_last == CONTROL_EXIT) { /* request to exit the game */
|
||||
map_saveProgress();
|
||||
game_state = EXIT;
|
||||
return;
|
||||
}
|
||||
@@ -751,6 +752,7 @@ loaddata()
|
||||
WAV_ENTITY[6] = syssnd_load("sounds/ent6.wav");
|
||||
WAV_ENTITY[7] = syssnd_load("sounds/ent7.wav");
|
||||
WAV_ENTITY[8] = syssnd_load("sounds/ent8.wav");
|
||||
WAV_ENTITY[9] = syssnd_load("sounds/ent9.wav");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +111,8 @@ screen_getname(void)
|
||||
case 2: /* wait for key pressed */
|
||||
|
||||
#ifdef __ANDROID__
|
||||
/* It deadlocks for some reason */
|
||||
/*
|
||||
name[0] = 0;
|
||||
SDL_ANDROID_SetScreenKeyboardHintMesage("Please enter your name");
|
||||
SDL_ANDROID_GetScreenKeyboardTextInput(name, 10);
|
||||
@@ -124,9 +126,10 @@ screen_getname(void)
|
||||
x = 5;
|
||||
y = 4;
|
||||
seq = 3;
|
||||
*/
|
||||
#endif
|
||||
|
||||
if (control_status & CONTROL_FIRE || KEY_BULLET)
|
||||
if (control_status & CONTROL_FIRE || KEY_BULLET || KEY_BOMB || KEY_STICK)
|
||||
seq = 3;
|
||||
if (control_status & CONTROL_UP) {
|
||||
if (y > 0) {
|
||||
@@ -147,21 +150,31 @@ screen_getname(void)
|
||||
seq = 5;
|
||||
}
|
||||
if (control_status & CONTROL_LEFT) {
|
||||
pointer_show(FALSE);
|
||||
if (x > 0) {
|
||||
pointer_show(FALSE);
|
||||
x--;
|
||||
pointer_show(TRUE);
|
||||
tm = sys_gettime();
|
||||
} else {
|
||||
if (y > 0) {
|
||||
x = 5;
|
||||
y--;
|
||||
}
|
||||
}
|
||||
pointer_show(TRUE);
|
||||
tm = sys_gettime();
|
||||
seq = 6;
|
||||
}
|
||||
if (control_status & CONTROL_RIGHT) {
|
||||
pointer_show(FALSE);
|
||||
if (x < 5) {
|
||||
pointer_show(FALSE);
|
||||
x++;
|
||||
pointer_show(TRUE);
|
||||
tm = sys_gettime();
|
||||
} else {
|
||||
if (y < 4) {
|
||||
x = 0;
|
||||
y++;
|
||||
}
|
||||
}
|
||||
pointer_show(TRUE);
|
||||
tm = sys_gettime();
|
||||
seq = 7;
|
||||
}
|
||||
if (seq == 2)
|
||||
@@ -169,7 +182,7 @@ screen_getname(void)
|
||||
break;
|
||||
|
||||
case 3: /* wait for FIRE released */
|
||||
if (!(control_status & CONTROL_FIRE || KEY_BULLET)) {
|
||||
if (!(control_status & CONTROL_FIRE || KEY_BULLET || KEY_BOMB || KEY_STICK)) {
|
||||
if (x == 5 && y == 4) { /* end */
|
||||
i = 0;
|
||||
while (game_score < game_hscores[i].score)
|
||||
|
||||
@@ -203,6 +203,15 @@ sysarg_init(int argc, char **argv)
|
||||
if (++i == argc) sysarg_fail("missing data");
|
||||
sysarg_args_data = argv[i];
|
||||
}
|
||||
else if (!strcmp(argv[i], "-cheat")) {
|
||||
#ifdef ENABLE_CHEATS
|
||||
game_cheat1 = 1; /* unlimited ammo */
|
||||
game_cheat2 = 1; /* never die */
|
||||
game_lives = 6;
|
||||
game_bombs = 6;
|
||||
game_bullets = 6;
|
||||
#endif
|
||||
}
|
||||
|
||||
else {
|
||||
sysarg_fail("invalid argument(s)");
|
||||
|
||||
Reference in New Issue
Block a user