Compare commits
4 Commits
a421c6186f
...
4f86a8930b
Author | SHA1 | Date |
---|---|---|
Sylvain PILLOT | 4f86a8930b | |
Sylvain PILLOT | c331fff878 | |
Sylvain PILLOT | eb16097722 | |
Sylvain PILLOT | 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_link_options(myaddin PRIVATE -Wl,-Map=Build_Addin.map)
|
||||
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++)
|
||||
|
||||
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>
|
||||
|
||||
|
||||
|
|
28
src/main.cc
28
src/main.cc
|
@ -29,14 +29,15 @@
|
|||
|
||||
#include <gint/kmalloc.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
|
||||
#include <gint/clock.h>
|
||||
|
||||
#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;
|
||||
|
@ -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;
|
||||
|
@ -419,13 +421,13 @@ 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
|
||||
|
@ -437,12 +439,13 @@ int main(void)
|
|||
|
||||
gint_world_switch( GINT_CALL( is_param_existing ));
|
||||
|
||||
if (!saveexist) // if we do not have saves
|
||||
gint_world_switch( GINT_CALL( saveparameters ) ); // we create a progress file which is empty
|
||||
if (!paraexist) // if we do not have saves
|
||||
gint_world_switch( GINT_CALL( saveparameters ) ); // we create a parameters file which is empty
|
||||
|
||||
gint_world_switch( GINT_CALL( loadparameters )); // then we load it
|
||||
|
||||
|
||||
|
||||
DiffLevel=PlayerPara[0].DiffLevel;
|
||||
CarsNumb=PlayerPara[0].CarsNumb;
|
||||
PlayerName[0]=PlayerPara[0].PlayerName[0];
|
||||
|
@ -471,12 +474,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 *)0x8c4e0000 ;
|
||||
|
||||
kmalloc_init_arena(&extended_ram, true);
|
||||
kmalloc_add_arena(&extended_ram );
|
||||
|
@ -506,7 +509,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 *)0x884e0000 ;
|
||||
|
||||
kmalloc_init_arena(&extended_ram, true);
|
||||
kmalloc_add_arena(&extended_ram );
|
||||
|
@ -516,12 +519,14 @@ int main(void)
|
|||
else abort();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
srand( rtc_ticks() );
|
||||
|
||||
prof_init();
|
||||
|
||||
|
||||
|
||||
drawStartTitle();
|
||||
|
||||
|
||||
|
@ -587,7 +592,7 @@ int main(void)
|
|||
|
||||
gint_world_switch( GINT_CALL( saveparameters ) );
|
||||
|
||||
if ((gint[HWCALC] == HWCALC_FXCG50 || gint[HWCALC] == HWCALC_PRIZM) && isOCActivated == true) clock_set_speed( CLOCK_SPEED_F5 );
|
||||
if ((gint[HWCALC] == HWCALC_FXCG50 || gint[HWCALC] == HWCALC_PRIZM) && isOCActivated == true) clock_set_speed( CLOCK_SPEED_F4 );
|
||||
else if ((gint[HWCALC] == HWCALC_FXCG50 || gint[HWCALC] == HWCALC_PRIZM) && isOCActivated == false && EntryLevel != CLOCK_SPEED_UNKNOWN) clock_set_speed( EntryLevel );
|
||||
else if ((gint[HWCALC] == HWCALC_FXCG50 || gint[HWCALC] == HWCALC_PRIZM) && isOCActivated == false && EntryLevel == CLOCK_SPEED_UNKNOWN) clock_set_speed( CLOCK_SPEED_DEFAULT );
|
||||
}
|
||||
|
@ -788,7 +793,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,12 +1,12 @@
|
|||
#include "../include/saves.h"
|
||||
#include <gint/std/stdlib.h>
|
||||
#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;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue