Compare commits

...

2 Commits

3 changed files with 30 additions and 7 deletions

View File

@ -118,9 +118,9 @@ set(ASSETS_cg
fxconv_declare_assets(${ASSETS_cg} WITH_METADATA)
add_executable(myaddin ${SOURCES} ${ASSETS_${FXSDK_PLATFORM}})
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -std=c++20 -c -fno-rtti -fpermissive)
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -std=c++20 -fpermissive)
target_link_options(myaddin PRIVATE -Wl,-Map=Build_Addin.map -Wl,--print-memory-usage)
target_link_libraries(myaddin LibProf::LibProf Gint::Gint -lstdc++)
target_link_options(myaddin PRIVATE -Wl,-Map=Build_Addin.map)
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
generate_g3a(TARGET myaddin OUTPUT "OutRun.g3a" VERSION 01.090.0000

View File

@ -37,7 +37,7 @@
#define DEBUGXXX 0
#define OVERCLCK_ACTIVABLE 1
char version[5] = {'V','1','.','0','8'};
char version[5] = {'V','1','.','0','9'};
extern bopti_image_t player, smoke1, smoke2, smoke3;
@ -426,6 +426,13 @@ void debug_crash( int value )
getkey();
}
void debug_crash_msg( char *chain )
{
dprint( 1, 1+a*10, C_BLACK, "point = %s : REACHED", chain );
a++;
dupdate();
getkey();
}
int main(void)
@ -439,8 +446,22 @@ int main(void)
usb_open(interfaces, GINT_CALL_NULL);
#endif
#if(DBGCRSH)
debug_crash( 1 );
#endif
gint_world_switch( GINT_CALL( is_save_existing ));
#if(DBGCRSH)
debug_crash( 2 );
if(saveexist) debug_crash_msg( "SAVE : OK FILE EXIST" );
else debug_crash_msg( "SAVE : FILE DO NOT EXIST" );
#endif
#if(DBGCRSH)
debug_crash( 3 );
#endif
if (!saveexist) // if we do not have saves
gint_world_switch( GINT_CALL( saveprogress ) ); // we create a progress file which is empty
@ -458,10 +479,12 @@ int main(void)
#if(DBGCRSH)
debug_crash( 6 );
if(paraexist) debug_crash_msg( "PARA : OK FILE EXIST" );
else debug_crash_msg( "PARA : FILE DO NOT EXIST" );
#endif
if (!paraexist) // if we do not have saves
gint_world_switch( GINT_CALL( saveparameters ) ); // we create a progress file which is empty
gint_world_switch( GINT_CALL( saveparameters ) ); // we create a parameters file which is empty
#if(DBGCRSH)
debug_crash( 7 );

View File

@ -1,12 +1,12 @@
#include "../include/saves.h"
#include <cstdlib>
#include <stdlib.h>
#include <stdio.h>
static const char *filepath= "OutRun.sav";
static const char *filepara= "OutRun.prm";
bool saveexist;
bool paraexist;
bool saveexist = false;
bool paraexist = false;
unsigned int sizeoffile;