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;
|
SFG_game.save[i] = 0;
|
||||||
|
|
||||||
if (SFG_game.selectedLevel == 0)
|
if (SFG_game.selectedLevel == 0)
|
||||||
|
{
|
||||||
|
SFG_currentLevel.levelNumber = 0; // to draw intro, not outro
|
||||||
SFG_setGameState(SFG_GAME_STATE_INTRO);
|
SFG_setGameState(SFG_GAME_STATE_INTRO);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
SFG_setAndInitLevel(SFG_game.selectedLevel);
|
SFG_setAndInitLevel(SFG_game.selectedLevel);
|
||||||
|
|
||||||
|
3
levels.h
3
levels.h
@ -1369,7 +1369,7 @@ SFG_PROGRAM_MEMORY SFG_Level SFG_level7 =
|
|||||||
13, // doorTextureIndex
|
13, // doorTextureIndex
|
||||||
4, // floorColor
|
4, // floorColor
|
||||||
66, // ceilingColor
|
66, // ceilingColor
|
||||||
{8 , 50, 240}, // player start: x, y, direction
|
{34, 11, 240}, // player start: x, y, direction
|
||||||
1, // backgroundImage
|
1, // backgroundImage
|
||||||
{ // elements
|
{ // elements
|
||||||
{SFG_LEVEL_ELEMENT_FINISH, {60,1}},{SFG_LEVEL_ELEMENT_BULLETS, {54,1}},
|
{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}}
|
{SFG_LEVEL_ELEMENT_NONE, {0,0}},{SFG_LEVEL_ELEMENT_NONE, {0,0}}
|
||||||
}, // elements
|
}, // elements
|
||||||
} // level
|
} // level
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
SFG_PROGRAM_MEMORY SFG_Level SFG_level8 =
|
SFG_PROGRAM_MEMORY SFG_Level SFG_level8 =
|
||||||
|
54
main_sdl.c
54
main_sdl.c
@ -36,28 +36,41 @@
|
|||||||
// uncomment for perfomance debug
|
// uncomment for perfomance debug
|
||||||
//#define SFG_CPU_LOAD(percent) printf("CPU load: %d%\n",percent);
|
//#define SFG_CPU_LOAD(percent) printf("CPU load: %d%\n",percent);
|
||||||
|
|
||||||
#ifndef GAME_LQ
|
#ifndef __EMSCRIPTEN__
|
||||||
// higher quality
|
#ifndef GAME_LQ
|
||||||
#define SFG_FPS 60
|
// higher quality
|
||||||
#define SFG_LOG(str) puts(str);
|
#define SFG_FPS 60
|
||||||
#define SFG_SCREEN_RESOLUTION_X 700
|
#define SFG_LOG(str) puts(str);
|
||||||
#define SFG_SCREEN_RESOLUTION_Y 512
|
#define SFG_SCREEN_RESOLUTION_X 700
|
||||||
#define SFG_DITHERED_SHADOW 1
|
#define SFG_SCREEN_RESOLUTION_Y 512
|
||||||
#define SFG_DIMINISH_SPRITES 1
|
#define SFG_DITHERED_SHADOW 1
|
||||||
#define SFG_HEADBOB_SHEAR (-1 * SFG_SCREEN_RESOLUTION_Y / 80)
|
#define SFG_DIMINISH_SPRITES 1
|
||||||
#define SFG_BACKGROUND_BLUR 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
|
#else
|
||||||
// lower quality
|
// emscripten
|
||||||
#define SFG_FPS 30
|
#define SFG_FPS 30
|
||||||
#define SFG_SCREEN_RESOLUTION_X 640
|
#define SFG_SCREEN_RESOLUTION_X 512
|
||||||
#define SFG_SCREEN_RESOLUTION_Y 480
|
#define SFG_SCREEN_RESOLUTION_Y 320
|
||||||
#define SFG_RAYCASTING_SUBSAMPLE 2
|
#define SFG_CAN_EXIT 0
|
||||||
#define SFG_RESOLUTION_SCALEDOWN 2
|
#define SFG_RESOLUTION_SCALEDOWN 2
|
||||||
#define SFG_DIMINISH_SPRITES 0
|
|
||||||
#define SFG_DITHERED_SHADOW 0
|
|
||||||
#define SFG_BACKGROUND_BLUR 0
|
#define SFG_BACKGROUND_BLUR 0
|
||||||
|
|
||||||
|
#include <emscripten.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// #define SFG_SCREEN_RESOLUTION_X 88
|
// #define SFG_SCREEN_RESOLUTION_X 88
|
||||||
// #define SFG_SCREEN_RESOLUTION_Y 110
|
// #define SFG_SCREEN_RESOLUTION_Y 110
|
||||||
|
|
||||||
@ -72,15 +85,6 @@
|
|||||||
|
|
||||||
#define MUSIC_VOLUME 16
|
#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
|
#if !SFG_OS_IS_MALWARE
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user