mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-12-21 14:58:49 -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 =
|
||||
|
54
main_sdl.c
54
main_sdl.c
@ -36,28 +36,41 @@
|
||||
// uncomment for perfomance debug
|
||||
//#define SFG_CPU_LOAD(percent) printf("CPU load: %d%\n",percent);
|
||||
|
||||
#ifndef GAME_LQ
|
||||
// higher quality
|
||||
#define SFG_FPS 60
|
||||
#define SFG_LOG(str) puts(str);
|
||||
#define SFG_SCREEN_RESOLUTION_X 700
|
||||
#define SFG_SCREEN_RESOLUTION_Y 512
|
||||
#define SFG_DITHERED_SHADOW 1
|
||||
#define SFG_DIMINISH_SPRITES 1
|
||||
#define SFG_HEADBOB_SHEAR (-1 * SFG_SCREEN_RESOLUTION_Y / 80)
|
||||
#define SFG_BACKGROUND_BLUR 1
|
||||
#ifndef __EMSCRIPTEN__
|
||||
#ifndef GAME_LQ
|
||||
// higher quality
|
||||
#define SFG_FPS 60
|
||||
#define SFG_LOG(str) puts(str);
|
||||
#define SFG_SCREEN_RESOLUTION_X 700
|
||||
#define SFG_SCREEN_RESOLUTION_Y 512
|
||||
#define SFG_DITHERED_SHADOW 1
|
||||
#define SFG_DIMINISH_SPRITES 1
|
||||
#define SFG_HEADBOB_SHEAR (-1 * SFG_SCREEN_RESOLUTION_Y / 80)
|
||||
#define SFG_BACKGROUND_BLUR 1
|
||||
#else
|
||||
// lower quality
|
||||
#define SFG_FPS 30
|
||||
#define SFG_SCREEN_RESOLUTION_X 640
|
||||
#define SFG_SCREEN_RESOLUTION_Y 480
|
||||
#define SFG_RAYCASTING_SUBSAMPLE 2
|
||||
#define SFG_RESOLUTION_SCALEDOWN 2
|
||||
#define SFG_DIMINISH_SPRITES 0
|
||||
#define SFG_DITHERED_SHADOW 0
|
||||
#define SFG_BACKGROUND_BLUR 0
|
||||
#endif
|
||||
#else
|
||||
// lower quality
|
||||
// emscripten
|
||||
#define SFG_FPS 30
|
||||
#define SFG_SCREEN_RESOLUTION_X 640
|
||||
#define SFG_SCREEN_RESOLUTION_Y 480
|
||||
#define SFG_RAYCASTING_SUBSAMPLE 2
|
||||
#define SFG_SCREEN_RESOLUTION_X 512
|
||||
#define SFG_SCREEN_RESOLUTION_Y 320
|
||||
#define SFG_CAN_EXIT 0
|
||||
#define SFG_RESOLUTION_SCALEDOWN 2
|
||||
#define SFG_DIMINISH_SPRITES 0
|
||||
#define SFG_DITHERED_SHADOW 0
|
||||
#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