try to make it run with gint 2.9.0
This commit is contained in:
parent
a421c6186f
commit
95c3c6e954
|
@ -6,7 +6,7 @@ project(MyAddin)
|
|||
|
||||
include(GenerateG3A)
|
||||
include(Fxconv)
|
||||
find_package(Gint 2.7.0 REQUIRED)
|
||||
find_package(Gint 2.9.0 REQUIRED)
|
||||
find_package(LibProf 2.4 REQUIRED)
|
||||
|
||||
set(SOURCES
|
||||
|
@ -118,11 +118,11 @@ 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++11 -c -fno-rtti -fno-use-cxa-atexit -fpermissive)
|
||||
target_link_libraries(myaddin LibProf::LibProf Gint::Gint -lustl -lc)
|
||||
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -std=c++20 -c -fno-rtti -fpermissive)
|
||||
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.000.0000
|
||||
generate_g3a(TARGET myaddin OUTPUT "OutRun.g3a" VERSION 01.090.0000
|
||||
NAME "OutRun" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
|
||||
endif()
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#define std ustl
|
||||
|
||||
enum BiomeType
|
||||
{
|
||||
PLAINS = 0,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
#include <gint/display.h>
|
||||
#include <gint/std/stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
|
55
src/main.cc
55
src/main.cc
|
@ -29,7 +29,8 @@
|
|||
|
||||
#include <gint/kmalloc.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
|
||||
#include <gint/clock.h>
|
||||
|
||||
|
@ -78,6 +79,7 @@ struct DataPerf
|
|||
};
|
||||
|
||||
extern bool saveexist;
|
||||
extern bool paraexist;
|
||||
BestRanking HallOfFame[10][5]; // Table of score : 10 levels * 5 best scores
|
||||
uint32_t FinalTime=0;
|
||||
bool skipranking=false;
|
||||
|
@ -414,34 +416,63 @@ static void get_inputs_finish_fail( void )
|
|||
}
|
||||
|
||||
|
||||
#define DBGCRSH 1
|
||||
int a=0;
|
||||
void debug_crash( int value )
|
||||
{
|
||||
dprint( 1, 1+a*10, C_BLACK, "point = %d : REACHED", value );
|
||||
a++;
|
||||
dupdate();
|
||||
getkey();
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
__printf_enable_fp();
|
||||
__printf_enable_fixed();
|
||||
|
||||
|
||||
#if IS_FXLIB==1
|
||||
usb_interface_t const *interfaces[] = { &usb_ff_bulk, NULL };
|
||||
usb_open(interfaces, GINT_CALL_NULL);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
gint_world_switch( GINT_CALL( is_save_existing ));
|
||||
|
||||
if (!saveexist) // if we do not have saves
|
||||
gint_world_switch( GINT_CALL( saveprogress ) ); // we create a progress file which is empty
|
||||
|
||||
#if(DBGCRSH)
|
||||
debug_crash( 4 );
|
||||
#endif
|
||||
|
||||
gint_world_switch( GINT_CALL( loadprogress )); // then we load it
|
||||
|
||||
|
||||
#if(DBGCRSH)
|
||||
debug_crash( 5 );
|
||||
#endif
|
||||
|
||||
gint_world_switch( GINT_CALL( is_param_existing ));
|
||||
|
||||
if (!saveexist) // if we do not have saves
|
||||
#if(DBGCRSH)
|
||||
debug_crash( 6 );
|
||||
#endif
|
||||
|
||||
if (!paraexist) // if we do not have saves
|
||||
gint_world_switch( GINT_CALL( saveparameters ) ); // we create a progress file which is empty
|
||||
|
||||
#if(DBGCRSH)
|
||||
debug_crash( 7 );
|
||||
#endif
|
||||
|
||||
gint_world_switch( GINT_CALL( loadparameters )); // then we load it
|
||||
|
||||
#if(DBGCRSH)
|
||||
debug_crash( 8 );
|
||||
#endif
|
||||
|
||||
|
||||
DiffLevel=PlayerPara[0].DiffLevel;
|
||||
CarsNumb=PlayerPara[0].CarsNumb;
|
||||
|
@ -471,12 +502,12 @@ int main(void)
|
|||
isOCPossible = false;
|
||||
#endif
|
||||
|
||||
if((!strncmp(osv, "03.", 3) && osv[3] <= '6') && gint[HWCALC] == HWCALC_FXCG50) // CG-50
|
||||
if((!strncmp(osv, "03.", 3) && osv[3] <= '7') && gint[HWCALC] == HWCALC_FXCG50) // CG-50
|
||||
{
|
||||
extended_ram.name = "extram";
|
||||
extended_ram.is_default = true;
|
||||
extended_ram.start = (void *)0x8c200000;
|
||||
extended_ram.end = (void *)0x8c500000 ;
|
||||
extended_ram.end = (void *)0x8c4dffff ;
|
||||
|
||||
kmalloc_init_arena(&extended_ram, true);
|
||||
kmalloc_add_arena(&extended_ram );
|
||||
|
@ -506,7 +537,7 @@ int main(void)
|
|||
extended_ram.name = "extram";
|
||||
extended_ram.is_default = true;
|
||||
extended_ram.start = (void *)0x88200000;
|
||||
extended_ram.end = (void *)0x88500000 ;
|
||||
extended_ram.end = (void *)0x884dffff ;
|
||||
|
||||
kmalloc_init_arena(&extended_ram, true);
|
||||
kmalloc_add_arena(&extended_ram );
|
||||
|
@ -516,6 +547,11 @@ int main(void)
|
|||
else abort();
|
||||
|
||||
|
||||
#if(DBGCRSH)
|
||||
debug_crash( 2 );
|
||||
#endif
|
||||
|
||||
|
||||
srand( rtc_ticks() );
|
||||
|
||||
prof_init();
|
||||
|
@ -788,7 +824,8 @@ int main(void)
|
|||
if (traffic[indexCar]->wX>(roadpart-0.22f) && traffic[indexCar]->wX<(roadpart+0.22f) && traffic[indexCar]->Speed<speed)
|
||||
{
|
||||
speed = traffic[indexCar]->Speed - 0.5;
|
||||
score = max(0, score-250);
|
||||
if (score>250) score-=250;
|
||||
else score=0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,7 @@
|
|||
#define MAX_SUBIMAGES_CARS 12
|
||||
#define NB_CARS_TYPES 8
|
||||
|
||||
#define std ustl
|
||||
|
||||
#define IS_FXLIB 1
|
||||
#define IS_FXLIB 0
|
||||
|
||||
|
||||
#endif // PARAMETERS_H
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "../parameters.h"
|
||||
|
||||
#include <gint/display.h>
|
||||
#include <gint/std/stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <gint/rtc.h>
|
||||
|
||||
#include "../include/drawstuff.h"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <gint/usb.h>
|
||||
#include <gint/usb-ff-bulk.h>
|
||||
#include <gint/std/stdlib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../include/utils.h"
|
||||
#include "../include/saves.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "../include/saves.h"
|
||||
#include <gint/std/stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue