mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-21 08:25:05 -05:00
Fix a level load bug
This commit is contained in:
parent
a03690a326
commit
ec91af35ca
Binary file not shown.
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
3
game.h
3
game.h
@ -3729,7 +3729,10 @@ void SFG_gameStepMenu()
|
||||
SFG_game.save[i] = 0;
|
||||
|
||||
if (SFG_game.selectedLevel == 0)
|
||||
{
|
||||
SFG_currentLevel.levelNumber = 0; // to draw intro, not outro
|
||||
SFG_setGameState(SFG_GAME_STATE_INTRO);
|
||||
}
|
||||
else
|
||||
SFG_setAndInitLevel(SFG_game.selectedLevel);
|
||||
|
||||
|
3
levels.h
3
levels.h
@ -1369,7 +1369,7 @@ SFG_PROGRAM_MEMORY SFG_Level SFG_level7 =
|
||||
13, // doorTextureIndex
|
||||
4, // floorColor
|
||||
66, // ceilingColor
|
||||
{8 , 50, 240}, // player start: x, y, direction
|
||||
{34, 11, 240}, // player start: x, y, direction
|
||||
1, // backgroundImage
|
||||
{ // elements
|
||||
{SFG_LEVEL_ELEMENT_FINISH, {60,1}},{SFG_LEVEL_ELEMENT_BULLETS, {54,1}},
|
||||
@ -1438,6 +1438,7 @@ SFG_PROGRAM_MEMORY SFG_Level SFG_level7 =
|
||||
{SFG_LEVEL_ELEMENT_NONE, {0,0}},{SFG_LEVEL_ELEMENT_NONE, {0,0}}
|
||||
}, // elements
|
||||
} // level
|
||||
|
||||
;
|
||||
|
||||
SFG_PROGRAM_MEMORY SFG_Level SFG_level8 =
|
||||
|
22
main_sdl.c
22
main_sdl.c
@ -36,6 +36,7 @@
|
||||
// uncomment for perfomance debug
|
||||
//#define SFG_CPU_LOAD(percent) printf("CPU load: %d%\n",percent);
|
||||
|
||||
#ifndef __EMSCRIPTEN__
|
||||
#ifndef GAME_LQ
|
||||
// higher quality
|
||||
#define SFG_FPS 60
|
||||
@ -57,6 +58,18 @@
|
||||
#define SFG_DITHERED_SHADOW 0
|
||||
#define SFG_BACKGROUND_BLUR 0
|
||||
#endif
|
||||
#else
|
||||
// emscripten
|
||||
#define SFG_FPS 30
|
||||
#define SFG_SCREEN_RESOLUTION_X 512
|
||||
#define SFG_SCREEN_RESOLUTION_Y 320
|
||||
#define SFG_CAN_EXIT 0
|
||||
#define SFG_RESOLUTION_SCALEDOWN 2
|
||||
#define SFG_BACKGROUND_BLUR 0
|
||||
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
|
||||
|
||||
// #define SFG_SCREEN_RESOLUTION_X 88
|
||||
// #define SFG_SCREEN_RESOLUTION_Y 110
|
||||
@ -72,15 +85,6 @@
|
||||
|
||||
#define MUSIC_VOLUME 16
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#define SFG_FPS 30
|
||||
#define SFG_SCREEN_RESOLUTION_X 512
|
||||
#define SFG_SCREEN_RESOLUTION_Y 320
|
||||
#define SFG_CAN_EXIT 0
|
||||
#define SFG_RESOLUTION_SCALEDOWN 2
|
||||
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
|
||||
#if !SFG_OS_IS_MALWARE
|
||||
#include <signal.h>
|
||||
|
Loading…
Reference in New Issue
Block a user