├── mods └── sample │ ├── files │ └── donotdelete.txt │ └── config.txt ├── ui ├── creditsScreen.h ├── endGameScreen.h ├── startGameScreen.h ├── util │ ├── carRightSide.h │ ├── bottomText.h │ ├── input.h │ ├── raceResults.h │ ├── popup.h │ ├── menus.h │ ├── anim.h │ ├── bottomText.c │ └── menus.c ├── licenseScreen.h ├── mainScreen.h ├── loadSaveGameScreen.h ├── selectRaceScreen.h ├── prevRaceScreen.h ├── mainScreen.c ├── raceResultsScreen.h ├── shopScreen.h ├── menu.h ├── hallOfFame.h ├── blackMarketScreen.h ├── endGameScreen.c └── creditsScreen.c ├── doc.h ├── linux ├── libs │ ├── libSDL.so │ ├── libSDL.a │ ├── libSDLmain.a │ ├── libfmod-3.75.so │ ├── libSDLmain.la │ └── libSDL.la └── includes │ ├── SDL_name.h │ ├── SDL_getenv.h │ ├── SDL_types.h │ ├── SDL_byteorder.h │ ├── close_code.h │ ├── SDL_error.h │ ├── SDL_active.h │ ├── SDL_quit.h │ ├── SDL_cpuinfo.h │ ├── SDL_version.h │ ├── SDL_loadso.h │ ├── SDL_platform.h │ └── SDL_main.h ├── util.h ├── cars.h ├── drivers.h ├── race ├── terrain.h ├── 3dSystem.h ├── powerup.h ├── endFlag.h ├── lightSystem.h ├── pedestrian.h ├── leftBar.h └── endFlag.c ├── imageUtil.c ├── libs ├── SDL.lib ├── Winmm.lib ├── fmodvc.lib ├── SDLmain.lib └── minifmod.lib ├── lang ├── langEs.txt ├── langIt.txt └── langBr.txt ├── raceParticipant.h ├── doc ├── CHANGELOG.md └── CONTRIBUTING.md ├── MINGW32 ├── libs │ ├── fmodvc.lib │ ├── libSDL.dll.a │ ├── libSDLmain.a │ └── libSDL.la └── includes │ ├── ._SDL.h │ ├── ._SDL_audio.h │ ├── ._SDL_cdrom.h │ ├── ._SDL_error.h │ ├── ._SDL_main.h │ ├── ._SDL_mouse.h │ ├── ._SDL_mutex.h │ ├── ._SDL_name.h │ ├── ._SDL_quit.h │ ├── ._SDL_rwops.h │ ├── ._SDL_syswm.h │ ├── ._SDL_timer.h │ ├── ._SDL_types.h │ ├── ._SDL_video.h │ ├── ._SDL_active.h │ ├── ._SDL_config.h │ ├── ._SDL_copying.h │ ├── ._SDL_cpuinfo.h │ ├── ._SDL_endian.h │ ├── ._SDL_events.h │ ├── ._SDL_getenv.h │ ├── ._SDL_joystick.h │ ├── ._SDL_keyboard.h │ ├── ._SDL_keysym.h │ ├── ._SDL_loadso.h │ ├── ._SDL_opengl.h │ ├── ._SDL_platform.h │ ├── ._SDL_stdinc.h │ ├── ._SDL_thread.h │ ├── ._SDL_version.h │ ├── ._SDL_byteorder.h │ ├── SDL_name.h │ ├── SDL_copying.h │ ├── SDL_types.h │ ├── SDL_getenv.h │ ├── SDL_byteorder.h │ ├── SDL_config.h │ ├── close_code.h │ ├── SDL_error.h │ ├── SDL_active.h │ ├── SDL_quit.h │ ├── SDL_cpuinfo.h │ ├── SDL_version.h │ ├── SDL_loadso.h │ ├── SDL_platform.h │ ├── SDL_main.h │ └── SDL.h ├── libincludes ├── SDL_main.h.gch ├── SDL_name.h ├── SDL_copying.h ├── SDL_types.h ├── minifmod │ ├── mixer_clipcopy.h │ ├── Mixer.h │ ├── mixer_fpu_ramp.h │ ├── system_memory.h │ ├── system_file.h │ └── minifmod.h ├── SDL_getenv.h ├── SDL_byteorder.h ├── system_memory.h ├── SDL_config.h ├── close_code.h ├── SDL_error.h ├── SDL_active.h ├── SDL_quit.h ├── SDL_config_minimal.h ├── SDL_cpuinfo.h ├── SDL_version.h ├── SDL_loadso.h ├── SDL_platform.h ├── SDL_config_dreamcast.h ├── SDL_config_macos.h ├── SDL_main.h ├── SDL_config_nds.h └── SDL.h ├── portability ├── portability.h └── portability.c ├── mod ├── mod.h └── mod.c ├── i18n ├── i18n.h └── i18n.c ├── .github ├── ISSUE_TEMPLATE │ ├── custom.md │ ├── feature_request.md │ └── bug_report.md └── workflows │ └── CI.yml ├── savegame.h ├── raceParticipant.c ├── asset ├── bpaUtil.h └── haf.h ├── .vscode ├── settings.json ├── c_cpp_properties.json ├── tasks.json └── launch.json ├── circuit.h ├── circuit.c ├── util ├── hash.h └── hash.c ├── util.c ├── system_file.h ├── appveyor.yml ├── FUNDING.yml ├── tools ├── music.py ├── savegameCrypt.py ├── sharewareSavegameCrypt.py ├── bpaextractor.py └── bkpdecryptor.py ├── imageUtil.h ├── compile ├── Makefile.linux ├── sfx ├── sound.h └── minifmod │ ├── system_memory.h │ └── soundSystem.h ├── .travis.yml ├── variables.h ├── DreeRally.sln ├── config.h ├── savegame.c ├── graphics.h └── Makefile.test /mods/sample/files/donotdelete.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ui/creditsScreen.h: -------------------------------------------------------------------------------- 1 | int showCredits(); -------------------------------------------------------------------------------- /doc.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | lapped_456BC0 -> lapped -------------------------------------------------------------------------------- /linux/libs/libSDL.so: -------------------------------------------------------------------------------- 1 | libSDL-1.2.so.0.11.4 -------------------------------------------------------------------------------- /ui/endGameScreen.h: -------------------------------------------------------------------------------- 1 | 2 | int showEndScreen(); -------------------------------------------------------------------------------- /ui/startGameScreen.h: -------------------------------------------------------------------------------- 1 | int apogeeScreen(); 2 | int showStartScreen(); -------------------------------------------------------------------------------- /ui/util/carRightSide.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int drawCarRightSide(); -------------------------------------------------------------------------------- /util.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | FILE* fileExists(char *Filename); -------------------------------------------------------------------------------- /ui/licenseScreen.h: -------------------------------------------------------------------------------- 1 | 2 | int licenseScreen(int useWeapons_mal); 3 | 4 | -------------------------------------------------------------------------------- /cars.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/cars.h -------------------------------------------------------------------------------- /drivers.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/drivers.h -------------------------------------------------------------------------------- /race/terrain.h: -------------------------------------------------------------------------------- 1 | typedef enum 2 | { 3 | TERRAIN_TURBO = 11 4 | 5 | 6 | }Terrains; -------------------------------------------------------------------------------- /ui/mainScreen.h: -------------------------------------------------------------------------------- 1 | #ifndef MAIN_SCREEN_H 2 | #define MAIN_SCREEN_H 3 | 4 | 5 | #endif -------------------------------------------------------------------------------- /imageUtil.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/imageUtil.c -------------------------------------------------------------------------------- /libs/SDL.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/libs/SDL.lib -------------------------------------------------------------------------------- /lang/langEs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/lang/langEs.txt -------------------------------------------------------------------------------- /libs/Winmm.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/libs/Winmm.lib -------------------------------------------------------------------------------- /libs/fmodvc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/libs/fmodvc.lib -------------------------------------------------------------------------------- /race/3dSystem.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/race/3dSystem.h -------------------------------------------------------------------------------- /race/powerup.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/race/powerup.h -------------------------------------------------------------------------------- /libs/SDLmain.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/libs/SDLmain.lib -------------------------------------------------------------------------------- /libs/minifmod.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/libs/minifmod.lib -------------------------------------------------------------------------------- /raceParticipant.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/raceParticipant.h -------------------------------------------------------------------------------- /doc/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # DreeRally Changelog 2 | 3 | ### January 15, 2019 4 | - Initial release 5 | 6 | -------------------------------------------------------------------------------- /linux/libs/libSDL.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/linux/libs/libSDL.a -------------------------------------------------------------------------------- /MINGW32/libs/fmodvc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/libs/fmodvc.lib -------------------------------------------------------------------------------- /linux/libs/libSDLmain.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/linux/libs/libSDLmain.a -------------------------------------------------------------------------------- /ui/loadSaveGameScreen.h: -------------------------------------------------------------------------------- 1 | #include "../defs.h" 2 | 3 | signed int loadGame(); 4 | __int16 savegameWithName(); -------------------------------------------------------------------------------- /MINGW32/includes/._SDL.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL.h -------------------------------------------------------------------------------- /MINGW32/libs/libSDL.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/libs/libSDL.dll.a -------------------------------------------------------------------------------- /MINGW32/libs/libSDLmain.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/libs/libSDLmain.a -------------------------------------------------------------------------------- /libincludes/SDL_main.h.gch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/libincludes/SDL_main.h.gch -------------------------------------------------------------------------------- /linux/libs/libfmod-3.75.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/linux/libs/libfmod-3.75.so -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_audio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_audio.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_cdrom.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_cdrom.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_error.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_error.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_main.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_main.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_mouse.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_mouse.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_mutex.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_mutex.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_name.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_name.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_quit.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_quit.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_rwops.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_rwops.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_syswm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_syswm.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_timer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_timer.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_types.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_types.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_video.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_video.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_active.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_active.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_config.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_copying.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_copying.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_cpuinfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_cpuinfo.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_endian.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_endian.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_events.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_events.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_getenv.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_getenv.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_joystick.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_joystick.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_keyboard.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_keyboard.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_keysym.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_keysym.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_loadso.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_loadso.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_opengl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_opengl.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_platform.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_platform.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_stdinc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_stdinc.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_thread.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_thread.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_version.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_version.h -------------------------------------------------------------------------------- /MINGW32/includes/._SDL_byteorder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enriquesomolinos/DreeRally/HEAD/MINGW32/includes/._SDL_byteorder.h -------------------------------------------------------------------------------- /portability/portability.h: -------------------------------------------------------------------------------- 1 | char* _itoa(int value, char* str, int radix); 2 | char *_strupr(char s[]); 3 | char *_strlower(char s[]); -------------------------------------------------------------------------------- /ui/util/bottomText.h: -------------------------------------------------------------------------------- 1 | #ifndef BOTTOM_TEXT_H 2 | #define BOTTOM_TEXT_H 3 | 4 | char drawBottomMenuText(); 5 | #endif 6 | 7 | 8 | -------------------------------------------------------------------------------- /mod/mod.h: -------------------------------------------------------------------------------- 1 | int initMod(); 2 | char * getModCharEntry(char* modEntryKey, char * fallbackValue); 3 | int getModIntEntry(char * modEntryKey, int fallbackValue); -------------------------------------------------------------------------------- /i18n/i18n.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | int initI18n(); 5 | char * getLanguageEntry(char* languageEntry); 6 | char * readline(FILE *fp, char *buffer); 7 | -------------------------------------------------------------------------------- /ui/util/input.h: -------------------------------------------------------------------------------- 1 | #include 2 | signed int readKeyboard(const char *a1, int a2, int a3, int a4, unsigned int a5, signed int a6, int ingame, int a8, int a9); -------------------------------------------------------------------------------- /ui/selectRaceScreen.h: -------------------------------------------------------------------------------- 1 | int drawSelectRaceScreen(); 2 | void selectRaceWarningPopup(int a1); 3 | int calculateNextRaces(); 4 | void selectRaceScreen(); 5 | void addParticipantToRace(signed int a1); 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /race/endFlag.h: -------------------------------------------------------------------------------- 1 | #ifndef END_FLAG_H 2 | #define END_FLAG_H 3 | unsigned int showEndRaceFlag_402490(); 4 | 5 | extern int endRaceFlagFrame_481BE0; // weak 6 | extern int raceFlagWidth_4B3140; // weak 7 | 8 | #endif -------------------------------------------------------------------------------- /savegame.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | extern int savegames_unk_446DC2; 4 | char decryptByteSavegame(int a1, char a2); 5 | char encryptByteSavegame(int a1, char a2); 6 | int decryptEntireSavegame(int, char *Filename); // idb -------------------------------------------------------------------------------- /ui/prevRaceScreen.h: -------------------------------------------------------------------------------- 1 | void previewRaceScreen(signed int a1); 2 | 3 | int adversaryPreviewScreen(const char **a1); 4 | int drawWaitMultiplayer_4261D0(); 5 | 6 | char sub_4279C0(); 7 | int sub_42C670(int a1); -------------------------------------------------------------------------------- /raceParticipant.c: -------------------------------------------------------------------------------- 1 | #include "raceParticipant.h" 2 | 3 | RaceParticipant raceParticipant[4]; 4 | RaceParticipant2 raceParticipant2[4]; 5 | RaceParticipantIngame raceParticipantIngame[4]; 6 | Mines raceMines[32]; 7 | 8 | -------------------------------------------------------------------------------- /ui/mainScreen.c: -------------------------------------------------------------------------------- 1 | #include "mainScreen.h" 2 | 3 | #include "../graphics.h" 4 | #include "../imageUtil.h" 5 | #include "../dr.h" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | -------------------------------------------------------------------------------- /asset/bpaUtil.h: -------------------------------------------------------------------------------- 1 | #ifndef BPAUTIL_H 2 | #define BPAUTIL_H 3 | 4 | int openPalFromBpa(char * a1); 5 | int getFileSizeFromBpa(char *bpaFile, char * filename); 6 | int extractFromBpa(char* bpaFilename, void *dest, char* filename); 7 | 8 | 9 | #endif -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "anim.h": "c", 4 | "variables.h": "c", 5 | "config.h": "c", 6 | "menus.h": "c", 7 | "creditsscreen.h": "c", 8 | "graphics.h": "c" 9 | } 10 | } -------------------------------------------------------------------------------- /libincludes/SDL_name.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _SDLname_h_ 3 | #define _SDLname_h_ 4 | 5 | #if defined(__STDC__) || defined(__cplusplus) 6 | #define NeedFunctionPrototypes 1 7 | #endif 8 | 9 | #define SDL_NAME(X) SDL_##X 10 | 11 | #endif /* _SDLname_h_ */ 12 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL_name.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _SDLname_h_ 3 | #define _SDLname_h_ 4 | 5 | #if defined(__STDC__) || defined(__cplusplus) 6 | #define NeedFunctionPrototypes 1 7 | #endif 8 | 9 | #define SDL_NAME(X) SDL_##X 10 | 11 | #endif /* _SDLname_h_ */ 12 | -------------------------------------------------------------------------------- /linux/includes/SDL_name.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _SDLname_h_ 3 | #define _SDLname_h_ 4 | 5 | #if defined(__STDC__) || defined(__cplusplus) 6 | #define NeedFunctionPrototypes 1 7 | #endif 8 | 9 | #define SDL_NAME(X) SDL_##X 10 | 11 | #endif /* _SDLname_h_ */ 12 | -------------------------------------------------------------------------------- /ui/raceResultsScreen.h: -------------------------------------------------------------------------------- 1 | int postRaceMain(int argc, const char **argv, const char **envp); 2 | 3 | int writeDriverList(int a1); 4 | unsigned int drawStadistics(); 5 | int drawRightPositions(int a1, int a2); 6 | signed int sub_426080(); 7 | int drawPressAnyKeyToContinue(); 8 | int sub_424240(int, float, float, float); // idb -------------------------------------------------------------------------------- /asset/haf.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void *anim_currentFrameData; // idb 4 | 5 | unsigned int sub_4181E0(); 6 | void decryptAnimFrame(); 7 | void openAnimation(const char *animFile, int a2, char * music, int a4, char * effect, char onKeyPressExit, char screenResolution); 8 | 9 | FILE* checkAndOpenAnimation(); 10 | -------------------------------------------------------------------------------- /circuit.h: -------------------------------------------------------------------------------- 1 | #ifndef CIRCUIT_H 2 | #define CIRCUIT_H 3 | 4 | #include "defs.h" 5 | extern BYTE circuitOrder_45673C[]; 6 | 7 | extern char *circuits[]; 8 | 9 | /*paleta del cicuito 10 | char byte_4A9BA0[256]; // weak //paleta del cicuito! 11 | char byte_4A9BA1[256]; // weak 12 | char byte_4A9BA2[256]; // weak*/ 13 | 14 | #endif -------------------------------------------------------------------------------- /ui/shopScreen.h: -------------------------------------------------------------------------------- 1 | int sub_42D780(); 2 | void shopScreenMoveLeft_421DF0(); 3 | void shopScreenMoveRight_42DAB0(); 4 | void enterShop(); 5 | char postLoadedOrLicense(); 6 | void shopScreenMoveDown_421DF0(); 7 | void shopScreenMoveUp_421D90(); 8 | int showCarBought(); 9 | int drawShopAnimationAndRightSide(); 10 | int getReapirCostByCarType(); 11 | 12 | int sub_4291D0(); -------------------------------------------------------------------------------- /circuit.c: -------------------------------------------------------------------------------- 1 | #include "circuit.h" 2 | #include "defs.h" 3 | BYTE circuitOrder_45673C[] = { 0,7,5,3,4,2,8,1,6,9,16,14,12,13,11,17,10,15,16,17,18,0,0,0 }; // weak 4 | 5 | char* circuits[18] = { "Suburbia","Downtown", "Utopia","Rock Zone", "Snake Alley", "Oasis", "Velodrome", "Holocaust", "Bogota","West End", "Newark", "Complex", "Hell Mountain","Desert Run","Palm Side","Eidolon","Toxic Dump", "Borneo" }; -------------------------------------------------------------------------------- /ui/util/raceResults.h: -------------------------------------------------------------------------------- 1 | void easyRaceResults(int ecx0, int a2, int a1); 2 | void mediumRaceResults(int ecx0, int a2, int a1); 3 | void hardRaceResults(int ecx0, int a2, int a1); 4 | 5 | int sub_424420(); 6 | 7 | extern const int EASY_RACE; 8 | extern const int MEDIUM_RACE; 9 | 10 | extern const int HARD_RACE; 11 | 12 | extern const int NUM_RACES; 13 | 14 | extern int racePositions[3][4]; 15 | -------------------------------------------------------------------------------- /util/hash.h: -------------------------------------------------------------------------------- 1 | #ifndef HASH_INCLUDE_H 2 | #define HASH_INCLUDE_H 3 | 4 | typedef struct { 5 | int size; 6 | char *keys[150]; 7 | char *values[150]; 8 | int filled; 9 | } hash_t; 10 | 11 | 12 | hash_t *hash_new (int size); 13 | int hash_index (hash_t *h, char *key); 14 | void hash_insert (hash_t *h, char *key, void *value); 15 | void *hash_lookup (hash_t *h, char *key); 16 | 17 | #endif -------------------------------------------------------------------------------- /util.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "util.h" 3 | 4 | //----- (00402740) -------------------------------------------------------- 5 | FILE * fileExists(char *Filename) 6 | { 7 | FILE *result; // eax@1 8 | FILE *v2; // esi@1 9 | int v3; // edi@2 10 | 11 | result = fopen(Filename, "rb"); 12 | v2 = result; 13 | if (result) 14 | { 15 | fseek(result, 0, 2); 16 | v3 = ftell(v2); 17 | fclose(v2); 18 | result = (FILE *)v3; 19 | } 20 | return result; 21 | } -------------------------------------------------------------------------------- /system_file.h: -------------------------------------------------------------------------------- 1 | 2 | #include "defs.h" 3 | #include "minifmod/system_file.h" 4 | 5 | 6 | 7 | /*extern unsigned int (*FSOUND_File_OpenCallback)(char *name); 8 | extern void (*FSOUND_File_CloseCallback)(unsigned int handle); 9 | extern int (*FSOUND_File_ReadCallback)(void *buffer, int size, unsigned int handle); 10 | extern void (*FSOUND_File_SeekCallback)(unsigned int handle, int pos, signed char mode); 11 | extern int (*FSOUND_File_TellCallback)(unsigned int handle);*/ -------------------------------------------------------------------------------- /race/lightSystem.h: -------------------------------------------------------------------------------- 1 | #ifndef LIGHT_SYSTEM_H 2 | #define LIGHT_SYSTEM_H 3 | extern int trxSHA8Bpk_46E8E0[1024]; // weak 4 | extern int trxSHA6Bpk_4AA520[1024]; // weak 5 | extern int trxSHA7Bpk_4A8D40[1024]; // weak 6 | extern int trxSHA4Bpk_4A9FE0[1024]; // weak 7 | extern int trxSHA3Bpk_479280[4096]; // weak 8 | extern int trxSHA2Bpk_501A80; // weak 9 | //_UNKNOWN unk_4669C0; // weak 10 | extern int trxVARJOTab_466F00[257]; // weak 11 | int iluminateTriangle_43D530(int a1, int a2, int a3, int a4, int a5, int a6, int a7); 12 | int drawShadows_40D7B0(); 13 | 14 | #endif -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "compilerPath": "/usr/bin/gcc", 10 | "cStandard": "c11", 11 | "cppStandard": "c++17", 12 | "intelliSenseMode": "gcc-x86", 13 | "compilerArgs": [ 14 | "-m32 ", 15 | "-nostdinc++" 16 | ] 17 | } 18 | ], 19 | "version": 4 20 | } -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 0.2.{build} 2 | pull_requests: 3 | do_not_increment_build_number: true 4 | clone_depth: 1 5 | configuration: Release 6 | image: Visual Studio 2013 7 | platform: Win32 8 | build: 9 | project: DreeRally.sln 10 | verbosity: minimal 11 | artifacts: 12 | - path: Release/DreeRally.exe 13 | name: DreeRally.exe 14 | environment: 15 | global: 16 | # WarningLevel of 1 is ONLY SEVERE warnings, nothing else. See 17 | # https://stackoverflow.com/questions/1023858/how-to-suppress-specific-msbuild-warning 18 | MSBUILD_FLAGS: /maxcpucount /nologo /property:WarningLevel=1 19 | -------------------------------------------------------------------------------- /ui/util/popup.h: -------------------------------------------------------------------------------- 1 | 2 | signed int createPopup(int x, int xLenght, int y, int yLenght, int cornerType); 3 | unsigned int welcomePopup(); 4 | unsigned int undergroundMarketPopup(); 5 | int payBackTimePopup(); 6 | unsigned int endGamePopup(); 7 | unsigned int welcomeShopPopup(); 8 | int killOnePopup(); 9 | int steriodsNotFoundPopup(); 10 | unsigned int allCarsCrashPopUp(); 11 | unsigned int noPaintJobPopUp(); 12 | unsigned int winStreakPopUp(); 13 | unsigned int lappedPopUp(); 14 | char noCollectPopup_42E6F0(); 15 | int showHitmanScreen(); 16 | int sabotageScreen(); 17 | char confirmationPopup(const char *a1); -------------------------------------------------------------------------------- /ui/util/menus.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | typedef enum 4 | { 5 | INITIAL_MENU = 0, 6 | START_NEW_GAME_MENU = 1, 7 | 8 | CONFIGURE_MENU = 3, 9 | LOAD_MENU = 5, 10 | DEFINE_KEYBOARD_MENU = 6, 11 | 12 | DEFINE_GAMEPAD_MENU = 8, 13 | }Menus; 14 | 15 | typedef enum 16 | { 17 | START_CONTINUE_GAME = 0, 18 | END_CURRENT_GAME = 1, 19 | SEE_STADISTICS = 2, 20 | LOAD_GAME = 3, 21 | SAVE_GAME = 4, 22 | PREVIOUS_MENU =5 23 | }StartNewGameMenu; 24 | 25 | typedef enum 26 | { 27 | BUY_CAR = 0, 28 | BUY_ENGINE = 1, 29 | BUY_TIRE = 2, 30 | BUY_ARMOUR = 3, 31 | REPAIR = 4, 32 | CONTINUE = 5, 33 | 34 | }ShopMenu; 35 | 36 | extern char menuActive_4457F0[]; 37 | char* getMenuText(int menu, int position); -------------------------------------------------------------------------------- /race/pedestrian.h: -------------------------------------------------------------------------------- 1 | #ifndef PEDESTRIAN_H 2 | #define PEDESTRIAN_H 3 | 4 | typedef struct Pedestrian { 5 | int positionX; // weak 479AA4 6 | int positionY; // weak 479AA8 7 | int pedestrianId; // weak 479AAC +8 8 | int rotation; // weak 479AB0 +12 9 | int byte5; // weak 479AB4 +16 frame 10 | int isDied; // weak 479AB8 +20 11 | int byte7; // weak 479ABC +24 parece algo de tiempo 12 | int byte8; // weak 479AC0 +28 framedirection para que tenga mas sensacion de movimiento 13 | 14 | } Pedestrian; 15 | 16 | extern Pedestrian pedestrian_479AA4[20]; 17 | 18 | char drawPedestrian_43AF30(int screenOffset, int pedestrianbpkOffset, int sizeToPaint); 19 | char drawShotPedestrian_4111F0(); 20 | 21 | #endif -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: https://paypal.me/esomolinos?locale.x=es_ES 13 | -------------------------------------------------------------------------------- /ui/menu.h: -------------------------------------------------------------------------------- 1 | #include "../defs.h" 2 | void startRacingMenu(); 3 | int mainMenu(); 4 | int drawMenu(int a1, int a2); 5 | int drawKeyCursor(signed int a1, const void *a2, unsigned int a3, int a4); 6 | int updateCursor(int a1); 7 | int drawCursor(int a1, int a2); 8 | int sub_41ACF0(int a1); 9 | int refreshMenuUp(int a1); 10 | int refreshMenuDown(int a1); 11 | char seeStadistics_42C940(); 12 | 13 | signed int readEventInMenu(int a1); 14 | bool drawYesNoMenu(int a1, int a2, int a3, signed int *a4); 15 | 16 | int showAdjustOptions(); 17 | signed int defineGamepadJoystickMenu(); 18 | signed int redefineControls(); 19 | unsigned int sub_41CA40(); 20 | char GamepadNotFoundPopup_41E3B0(); 21 | 22 | signed int sub_4284E0(); 23 | signed int sub_428740(); 24 | char sub_42CBF0(); 25 | -------------------------------------------------------------------------------- /race/leftBar.h: -------------------------------------------------------------------------------- 1 | #ifndef LEFT_BAR_H 2 | #define LEFT_BAR_H 3 | 4 | 5 | extern char smallbarBpk_50E720[2048]; 6 | extern int boardsBPK_4AA940[4][2048]; // weak 7 | extern char* damslidBpk; // idb 8 | extern char bugnum6Bpk_46E560[43300]; // weak ///TODO ajust correct size 9 | extern char ownnum1Bpk_503520[22528]; // weak 10 | 11 | extern char othnum1Bpk_50B2C0[12672]; // weak 12 | extern void* goalnum2Bpk_4AA50C; // idb 13 | extern char damageBpk_464F80[8064]; // weak 14 | extern void* rast1Bpk_464F78; // idb 15 | extern void* sidebom1Bpk_481E04; // idb 16 | 17 | // int __usercall drawSmallLeftBar_413C90@(int a1@); 18 | // int __usercall drawSmallLeftBar_414110@(int a1@); 19 | int drawLeftRaceBar_414220(); 20 | int drawWeaponsBar_43BEF0(int a1, void* a2, unsigned int a3, int a4, char a5); 21 | int drawTurboBar_43B3A0(int a1, int a2, int a3, char a4); 22 | 23 | #endif -------------------------------------------------------------------------------- /mods/sample/config.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | RACE_EASY_LAPS=1 4 | RACE_EASY_FIRST_POSITION_PRIZE=1000 5 | RACE_EASY_FIRST_POSITION_POINTS=200 6 | RACE_EASY_SECOND_POSITION_PRIZE=500 7 | RACE_EASY_SECOND_POSITION_POINTS=10 8 | RACE_EASY_THIRD_POSITION_PRIZE=100 9 | RACE_EASY_THIRD_POSITION_POINTS=10 10 | 11 | 12 | RACE_MEDIUM_LAPS=10 13 | RACE_MEDIUM_FIRST_POSITION_PRIZE=1000 14 | RACE_MEDIUM_FIRST_POSITION_POINTS=5 15 | 16 | RACE_MEDIUM_SECOND_POSITION_PRIZE=500 17 | RACE_MEDIUM_SECOND_POSITION_POINTS=3 18 | 19 | RACE_MEDIUM_THIRD_POSITION_PRIZE=100 20 | RACE_MEDIUM_THIRD_POSITION_POINTS=1 21 | 22 | 23 | RACE_HARD_LAPS=10 24 | RACE_HARD_FIRST_POSITION_PRIZE=1000 25 | RACE_HARD_FIRST_POSITION_POINTS=10 26 | 27 | RACE_HARD_SECOND_POSITION_PRIZE=500 28 | RACE_HARD_SECOND_POSITION_POINTS=7 29 | 30 | RACE_HARD_THIRD_POSITION_PRIZE=100 31 | RACE_HARD_THIRD_POSITION_POINTS=4 32 | 33 | RACE_ADVERSARY_LAPS=10 34 | 35 | MONEY_SYMBOL=$ -------------------------------------------------------------------------------- /race/endFlag.c: -------------------------------------------------------------------------------- 1 | #include "endFlag.h" 2 | #include "../dr.h" 3 | 4 | int endRaceFlagFrame_481BE0; // weak 5 | int raceFlagWidth_4B3140; // weak 6 | 7 | //----- (00402490) -------------------------------------------------------- 8 | unsigned int showEndRaceFlag_402490() 9 | { 10 | int v0; // eax@1 11 | unsigned int result; // eax@1 12 | 13 | raceFlagWidth_4B3140 = raceFlagWidth_4B3140 - dword_4A9EA4 <= 0 ? 0 : raceFlagWidth_4B3140 - dword_4A9EA4; 14 | drawInRaceImageToBuffer_43B160( 15 | (int)((char*)genflaBpk + 4800 * ((endRaceFlagFrame_481BE0 + 0x8000) >> 16)), 16 | 80, 17 | 60, 18 | dword_464F14 + raceFlagWidth_4B3140 + 336); 19 | v0 = dword_4AA500 + endRaceFlagFrame_481BE0; 20 | endRaceFlagFrame_481BE0 = v0; 21 | result = (v0 + 0x8000) & 0xFFFF0000; 22 | if ((signed int)result > 4128768) 23 | endRaceFlagFrame_481BE0 = 0; 24 | return result; 25 | } -------------------------------------------------------------------------------- /tools/music.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import struct 5 | from collections import OrderedDict 6 | import binascii 7 | 8 | 9 | FILE_NAME = "TR9-MUS.CMF" #change name to extract other file 10 | FILE_NAME_DEST = "TR9-MUS.CMF.s3m" #change name to extract other file 11 | 12 | 13 | print("Reading: {0}".format(FILE_NAME)) 14 | 15 | f = open(FILE_NAME, "rb") 16 | fDest = open(FILE_NAME_DEST , "wb") 17 | try: 18 | fileSize = os.path.getsize(FILE_NAME) 19 | print("File size: ") 20 | print(fileSize) 21 | for x in range(fileSize): 22 | f.seek(x) 23 | 24 | file_byte=f.read(1) 25 | file_byte =ord(file_byte) 26 | 27 | result = file_byte%256 << (x%7); 28 | 29 | file_byte = result | (file_byte%256 >> (8 - x%7)); 30 | 31 | file_byte=file_byte %256; 32 | 33 | file_byte = -109 - (17 * x) + (file_byte%256); 34 | 35 | fDest.seek(x) 36 | fDest.write(chr(file_byte %256)) 37 | 38 | 39 | finally: 40 | f.close() 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /doc/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guide 2 | 3 | **Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) 4 | 5 | This guide outlines useful resources, tools and processes for contribution to 6 | DreeRally. 7 | 8 | ## Code style guide 9 | 10 | At this moment there is no codestyle defined. 11 | 12 | ## Offsets 13 | 14 | It is usefull to have the original offset for both methods and variables, simply substitute like this: 15 | 16 | * Methods: sub_123455-> mi_new_name_123455 17 | * Varaibles dword_123455 -> miVariable_123455 18 | 19 | ## Branches 20 | 21 | The project have a few braches: 22 | 23 | * master: this is the release branch. When a release is generated changes will be in the mater branch. 24 | * dev-branches: this branches will be called like 0.1.x, and will contain the developments for this release. 25 | -------------------------------------------------------------------------------- /libincludes/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2009 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | -------------------------------------------------------------------------------- /imageUtil.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGE_UTIL_H 2 | #define IMAGE_UTIL_H 3 | 4 | int drawImageWithPosition2(int a1, int a2, int a3, int a4); 5 | int drawImageWithPosition(int a1, int a2, int a3, int a4); 6 | unsigned int drawTextWithFont(int a1, int a2, const char *a3, int a4); 7 | int drawBorder(int a1, int a2, int a3, int a4); 8 | int removeBorder(int a1, int a2, unsigned int a3, int a4); 9 | 10 | int getBoxBigTextOffset(const char *a1); 11 | int sub_41FA50(const char *a1); 12 | int getBoxTextOffset(const char *a1); 13 | int getBoxTextSize(const char *a1); 14 | int getNameOffsetPositionRight(const char *a1); 15 | int getBigTextMidSize(const char *a1); 16 | unsigned int drawInGamePrices(const char *a1, int a2); 17 | int writeTextInScreen(const char *a1, int a2); 18 | 19 | extern const int DEFAULT_BIGLETTER_SPACING_OFFSET; 20 | extern char byte_445892[]; 21 | extern char letterSpacing_4458B0[]; 22 | extern char bigLetterSpacing_445848[]; 23 | extern char unk_445928[] ; 24 | 25 | #endif -------------------------------------------------------------------------------- /compile: -------------------------------------------------------------------------------- 1 | gcc -ggdb -m32 -O0 -I"/usr/include/x86_64-linux-gnu" -I"/usr/include/" -I"/usr/include/SDL" -I"./linux/includes" -I"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32/include" -g3 -D_WINDOWS_TYPES1 -D__WIN32__2 -DPORTABILITY -D_NO_MINIFMOD -w -fpermissive -fno-stack-protector -c -o imageUtil.o imageUtil.c 2 | gcc -ggdb -m32 -O0 -I"/usr/include/x86_64-linux-gnu" -I"/usr/include/" -I"/usr/include/SDL" -I"./linux/includes" -I"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32/include" -g3 -D_WINDOWS_TYPES1 -D__WIN32__2 -DPORTABILITY -D_NO_MINIFMOD -w -fpermissive -fno-stack-protector -c -o config.o config.c 3 | gcc -ggdb -m32 -O0 -I"/usr/include/x86_64-linux-gnu" -I"/usr/include/" -I"/usr/include/SDL" -I"./linux/includes" -I"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32/include" -g3 -D_WINDOWS_TYPES1 -D__WIN32__2 -DPORTABILITY -D_NO_MINIFMOD -w -fpermissive -fno-stack-protector -c -o dr.o dr.c 4 | : recipe for target 'dr.o' failed 5 | -------------------------------------------------------------------------------- /Makefile.linux: -------------------------------------------------------------------------------- 1 | # Project: DrWin 2 | # Makefile created by Dev-C++ 5.11 3 | 4 | CPP = g++ -ggdb -m32 -D__DEBUG__ 5 | CC = gcc -ggdb -m32 -O0 6 | WINDRES = windres.exe 7 | 8 | LIBS = -lstdc++ -lglut -lGLU -lGL -lm -lSDL -lSDLmain -lc -lfmod-3.75 9 | INCS = $(sdl-config --libs --cflags) -I"/usr/include/x86_64-linux-gnu" -I"/usr/include/" -I"/usr/include/SDL" -I"./linux/includes" -I"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32/include" 10 | BIN = Debug/dreerally 11 | CFLAGS = $(INCS) -g3 -D_WINDOWS_TYPES1 -D__WIN32__2 -DPORTABILITY -D_NO_MINIFMOD -w -fpermissive -fno-stack-protector 12 | LDFLAGS = -m32 13 | RM = rm 14 | 15 | CFILES =$(wildcard *.c) $(wildcard */*.c) $(wildcard */*/*.c) 16 | OBJFILES = $(CFILES:.c=.o) 17 | .PHONY: all all-before all-after clean clean-custom 18 | 19 | all: all-before $(BIN) all-after 20 | 21 | clean: clean-custom 22 | ${RM} $(OBJFILES) dreerally 23 | 24 | 25 | $(BIN): $(OBJFILES) 26 | $(CC) $(OBJFILES) -o $(BIN) $(LIBS) 27 | 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /sfx/sound.h: -------------------------------------------------------------------------------- 1 | //#include "fmod.h" 2 | //#include "system_file.h" 3 | //#include "Music.h" 4 | 5 | #include "minifmod/soundSystem.h" 6 | 7 | extern int effectVolume_456A2C; 8 | 9 | int getSizeMusic(char * music); 10 | void * getMusicStream(char* musicName); 11 | 12 | int sub_43C1B0(unsigned __int8 a1, int a2, signed int a3); 13 | int sub_43C1F0(); 14 | char __stdcall sub_43C220(int a1, int a2, signed int a3, int a4); 15 | int musicSetVolume(signed int a1); 16 | int musicSetmusicVolume(signed int a1); 17 | int setMusicVolume(signed int a1); 18 | char musicSetOrder(signed int a1); 19 | 20 | int musicPlayMusic(); 21 | int loadMenuSoundEffect(unsigned __int8 a1, char a2, int a3, int a4, int a5); 22 | 23 | #ifndef _NO_MINIFMOD 24 | unsigned __int64 FMUSIC_SetBPM_43D8A0(FMUSIC_MODULE *mod_456C24, int bpm); 25 | #endif 26 | int stopSong(); 27 | int stopSoundChannel_43C3E0(unsigned __int8 a1); 28 | int stopAndOpenMusic(); 29 | int freeMusic(); 30 | void loadMusic(int a1, char* music1, int a3, char* music2); 31 | 32 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "build", 8 | "type": "shell", 9 | "command": "make -f Makefile.linux", 10 | "args": [ 11 | // Ask msbuild to generate full paths for file names. 12 | "/property:GenerateFullPaths=true", 13 | "/t:build", 14 | // Do not generate summary otherwise it leads to duplicate errors in Problems panel 15 | "/consoleloggerparameters:NoSummary" 16 | ], 17 | "group": "build", 18 | "presentation": { 19 | // Reveal the output only if unrecognized errors occur. 20 | "reveal": "silent" 21 | }, 22 | // Use the standard MS compiler pattern to detect errors, warnings and infos 23 | "problemMatcher": "$msCompile" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /linux/libs/libSDLmain.la: -------------------------------------------------------------------------------- 1 | # libSDLmain.la - a libtool library file 2 | # Generated by ltmain.sh (GNU libtool) 2.2.6 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='' 9 | 10 | # Names of this library. 11 | library_names='' 12 | 13 | # The name of the static archive. 14 | old_library='libSDLmain.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lm -ldl -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libSDLmain. 26 | current=11 27 | age=11 28 | revision=4 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/lib' 42 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | 9 | 10 | { 11 | "name": "(gdb) Launch", 12 | "type": "cppdbg", 13 | "request": "launch", 14 | "program": "${workspaceFolder}/Debug/dreerally", 15 | "args": ["-D_WINDOWS_TYPES1 -D__WIN32__2 -DPORTABILITY -D_NO_MINIFMOD "], 16 | "stopAtEntry": false, 17 | "cwd": "${workspaceFolder}/Debug", 18 | "environment": [], 19 | "externalConsole": false, 20 | "MIMode": "gdb", 21 | "setupCommands": [ 22 | { 23 | "description": "Enable pretty-printing for gdb", 24 | "text": "-enable-pretty-printing", 25 | "ignoreFailures": true 26 | } 27 | ] 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /lang/langIt.txt: -------------------------------------------------------------------------------- 1 | #menus 2 | Start Racing=Nuova Partita 3 | Multiplayer Race=Multigiocatore 4 | Configure=Configurazione 5 | See hall of fame=Record 6 | Credits=Crediti 7 | Exit to os=Torna a Windows 8 | yes=si 9 | no=no 10 | Are you sure?=Sei sicuro? 11 | 12 | Start a new game=Nuova Partita 13 | End current Game=Chiudi Partita 14 | See current Stadistics=Classifica 15 | Load game=Carica Partita 16 | save game=Salva Partita 17 | Previous menu=Indietro 18 | 19 | Music volume=Volume Musica 20 | Effect volume=Volume Effetti 21 | define Keyboard=Configura Tastiera 22 | Define Gamepad/Joystick=Configura gamepad/joystick 23 | Gamepad/Joystick Disabled=gamepad/joystick Disattivato 24 | 25 | Empty slot=Slot Vuoto 26 | Quicksave slot=Salvataggio Rapido 27 | 28 | Accelerate=Accelera 29 | Brake=Frena 30 | Steer Left=Sinistra 31 | Steer right=Destra 32 | Turbo boost=Turbo 33 | Machine Gun=Armi 34 | Drop Mine=Usa Mina 35 | Horn=Clacson 36 | Select difficulty:=Difficolta' : 37 | speed makes me dizzy=La velocita' mi spaventa 38 | i live to ride=Vivo per guidare 39 | petrol in my veins=Benzina nelle mie vene 40 | -------------------------------------------------------------------------------- /libincludes/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_types.h 24 | * @deprecated Use SDL_stdinc.h instead. 25 | */ 26 | 27 | /* DEPRECATED */ 28 | #include "SDL_stdinc.h" 29 | -------------------------------------------------------------------------------- /libincludes/minifmod/mixer_clipcopy.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* MIXER_CLIPCOPY.H */ 3 | /* ---------------- */ 4 | /* MiniFMOD public source code release. */ 5 | /* This source is provided as-is. Firelight Technologies will not support */ 6 | /* or answer questions about the source provided. */ 7 | /* MiniFMOD Sourcecode is copyright (c) Firelight Technologies, 2000-2004. */ 8 | /* MiniFMOD Sourcecode is in no way representative of FMOD 3 source. */ 9 | /* Firelight Technologies is a registered company. */ 10 | /* This source must not be redistributed without this notice. */ 11 | /******************************************************************************/ 12 | 13 | #ifndef _MIXER_CLIPCOPY_H 14 | #define _MIXER_CLIPCOPY_H 15 | 16 | void FSOUND_MixerClipCopy_Float32(void *dest, void *src, int len); 17 | 18 | #endif -------------------------------------------------------------------------------- /MINGW32/includes/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_types.h 24 | * @deprecated Use SDL_stdinc.h instead. 25 | */ 26 | 27 | /* DEPRECATED */ 28 | #include "SDL_stdinc.h" 29 | -------------------------------------------------------------------------------- /libincludes/SDL_getenv.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_getenv.h 24 | * @deprecated Use SDL_stdinc.h instead 25 | */ 26 | 27 | /* DEPRECATED */ 28 | #include "SDL_stdinc.h" 29 | -------------------------------------------------------------------------------- /linux/includes/SDL_getenv.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_getenv.h 24 | * @deprecated Use SDL_stdinc.h instead 25 | */ 26 | 27 | /* DEPRECATED */ 28 | #include "SDL_stdinc.h" 29 | -------------------------------------------------------------------------------- /linux/includes/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_types.h 24 | * @deprecated Use SDL_stdinc.h instead. 25 | */ 26 | 27 | /* DEPRECATED */ 28 | #include "SDL_stdinc.h" 29 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL_getenv.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_getenv.h 24 | * @deprecated Use SDL_stdinc.h instead 25 | */ 26 | 27 | /* DEPRECATED */ 28 | #include "SDL_stdinc.h" 29 | -------------------------------------------------------------------------------- /libincludes/SDL_byteorder.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file SDL_byteorder.h 25 | * @deprecated Use SDL_endian.h instead 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_endian.h" 30 | -------------------------------------------------------------------------------- /linux/includes/SDL_byteorder.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file SDL_byteorder.h 25 | * @deprecated Use SDL_endian.h instead 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_endian.h" 30 | -------------------------------------------------------------------------------- /ui/hallOfFame.h: -------------------------------------------------------------------------------- 1 | #ifndef HALL_OF_FAME_H 2 | #define HALL_OF_FAME_H 3 | 4 | int drawRecordByCircuit(int a1); 5 | int seeHallOfFame(); 6 | char showHallOfFameEndGame_430FA0();//muestra hall of fame 7 | int sub_427BC0(); 8 | 9 | typedef enum { 10 | SUBURBIA_CIRCUIT = 0, 11 | DOWNTOWN_CIRCUIT = 1, 12 | UTOPIA_CIRCUIT = 2, 13 | ROCKZONE_CIRCUIT = 3, 14 | SNAKEALLEY_CIRCUIT = 4, 15 | OASIS_CIRCUIT = 5, 16 | VELODROME_CIRCUIT = 6, 17 | HOLOCAUST_CIRCUIT = 7, 18 | BOGOTA_CIRCUIT = 8, 19 | WESTEND_CIRCUIT = 9, 20 | NEWARK_CIRCUIT = 10, 21 | COMPLEX_CIRCUIT = 11, 22 | HELLMOUNTAIN_CIRCUIT = 12, 23 | DESERTRUN_CIRCUIT = 13, 24 | PALMSIDE_CIRCUIT = 14, 25 | EIDOLON_CIRCUIT = 15, 26 | TOXICDUMP_CIRCUIT = 16, 27 | BORNEO_CIRCUIT = 17 28 | 29 | }CircuitNames; 30 | typedef struct HallOfFameEntry { 31 | char name[12]; 32 | int races; 33 | int difficulty; 34 | 35 | }HallOfFameEntry; 36 | 37 | typedef struct CircuitRecords { 38 | char name[12]; 39 | int min; 40 | int sec; 41 | int cen; 42 | 43 | }CircuitRecords; 44 | 45 | HallOfFameEntry* getDefaultHallOfFame(); 46 | 47 | CircuitRecords* getDefaulRecords(); 48 | #endif -------------------------------------------------------------------------------- /MINGW32/includes/SDL_byteorder.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file SDL_byteorder.h 25 | * @deprecated Use SDL_endian.h instead 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_endian.h" 30 | -------------------------------------------------------------------------------- /linux/libs/libSDL.la: -------------------------------------------------------------------------------- 1 | # libSDL.la - a libtool library file 2 | # Generated by ltmain.sh (GNU libtool) 2.2.6 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libSDL-1.2.so.0' 9 | 10 | # Names of this library. 11 | library_names='libSDL-1.2.so.0.11.4 libSDL-1.2.so.0 libSDL.so' 12 | 13 | # The name of the static archive. 14 | old_library='libSDL.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lm -ldl -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libSDL. 26 | current=11 27 | age=11 28 | revision=4 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/lib' 42 | -------------------------------------------------------------------------------- /MINGW32/libs/libSDL.la: -------------------------------------------------------------------------------- 1 | # libSDL.la - a libtool library file 2 | # Generated by ltmain.sh (GNU libtool) 2.2.6 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='../bin/SDL.dll' 9 | 10 | # Names of this library. 11 | library_names='libSDL.dll.a' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -luser32 -lgdi32 -lwinmm -ldxguid' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libSDL. 26 | current=11 27 | age=11 28 | revision=4 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/local/cross-tools/i686-w64-mingw32/lib' 42 | -------------------------------------------------------------------------------- /libincludes/system_memory.h: -------------------------------------------------------------------------------- 1 | // =========================================================================== 2 | // syste_memory.h 3 | // --------------------------------------------------------------------------- 4 | // MiniFMOD public source code release. 5 | // This source is provided as-is. Firelight Multimedia will not support 6 | // or answer questions about the source provided. 7 | // MiniFMOD Sourcecode is copyright (c) 2000, Firelight Multimedia. 8 | // MiniFMOD Sourcecode is in no way representative of FMOD 3 source. 9 | // Firelight Multimedia is a registered business name. 10 | // This source must not be redistributed without this notice. 11 | // =========================================================================== 12 | 13 | #ifndef _SYSTEM_MEMORY_H_ 14 | #define _SYSTEM_MEMORY_H_ 15 | 16 | // include your system's header here 17 | #include 18 | 19 | // redefine here 20 | #define FSOUND_Memory_Free(_ptr) free(_ptr) 21 | #define FSOUND_Memory_Alloc(_len) calloc(_len, 1) 22 | #define FSOUND_Memory_Calloc(_len) calloc(_len, 1) 23 | #define FSOUND_Memory_Realloc(_ptr, _len) realloc(_ptr, _len) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | compiler: gcc 3 | dist: bionic 4 | 5 | install: 6 | - sudo dpkg --add-architecture i386 7 | - sudo apt-get update 8 | - sudo apt-get install libc6-i386 9 | - sudo apt-get install gcc-7-multilib gcc-multilib 10 | - sudo apt-get install g++-7-multilib g++-multilib 11 | - sudo apt-get install xorg-dev 12 | - sudo apt-get install libsdl1.2-dev:i386 13 | - sudo apt-get install libsdl1.2debian:i386 14 | - sudo apt-get install freeglut3-dev:i386 15 | - sudo apt-get install freeglut3:i386 16 | - sudo apt-get install libglu1-mesa:i386 17 | - sudo apt-get install libglu1-mesa-dev 18 | - sudo apt-get install mesa-utils 19 | - sudo apt-get install mesa-common-dev 20 | - sudo apt-get install libx11-dev libgl1-mesa-glx 21 | - sudo apt-get install build-essential libgl1-mesa-dev 22 | - sudo apt-get install libgl1-mesa-glx:i386 23 | - wget https://zdoom.org/files/fmod/fmodapi375linux.tar.gz 24 | - tar -xf fmodapi375linux.tar.gz 25 | - sudo cp fmodapi375linux/api/libfmod-3.75.so /usr/lib 26 | - ls /usr/lib/i386-linux-gnu/ 27 | 28 | services: 29 | - xvfb 30 | 31 | 32 | script: 33 | - make -f Makefile.linux 34 | 35 | -------------------------------------------------------------------------------- /libincludes/minifmod/Mixer.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* MIXER.H */ 3 | /* ---------------- */ 4 | /* MiniFMOD public source code release. */ 5 | /* This source is provided as-is. Firelight Technologies will not support */ 6 | /* or answer questions about the source provided. */ 7 | /* MiniFMOD Sourcecode is copyright (c) Firelight Technologies, 2000-2004. */ 8 | /* MiniFMOD Sourcecode is in no way representative of FMOD 3 source. */ 9 | /* Firelight Technologies is a registered company. */ 10 | /* This source must not be redistributed without this notice. */ 11 | /******************************************************************************/ 12 | 13 | #ifndef _MIXER_H_ 14 | #define _MIXER_H_ 15 | 16 | #define FSOUND_MIXDIR_FORWARDS 1 17 | #define FSOUND_MIXDIR_BACKWARDS 2 18 | 19 | #define FSOUND_OUTPUTBUFF_END 0 20 | #define FSOUND_SAMPLEBUFF_END 1 21 | #define FSOUND_VOLUMERAMP_END 2 22 | 23 | #endif -------------------------------------------------------------------------------- /tools/savegameCrypt.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import struct 5 | from collections import OrderedDict 6 | 7 | 8 | FILE_NAME = "DR.SW6_decrypted" #change name to extract other file 9 | FILE_NAME_DEST = "DR.SW6_crypted" #change name to extract other file 10 | 11 | 12 | 13 | print("Reading: {0}".format(FILE_NAME)) 14 | 15 | f = open(FILE_NAME, "rb") 16 | fDest = open(FILE_NAME_DEST,"w+") 17 | try: 18 | positions = 2179 19 | initialPosition = 0 20 | for index in range(positions): 21 | 22 | 23 | f.seek(index) 24 | data = f.read(1) 25 | 26 | 27 | if index==0: 28 | initialPosition =struct.unpack("> index%6 38 | data=data %256 39 | data = tmpData|data << (8-index%6) 40 | data=data %256 41 | 42 | 43 | fDest.seek(index) 44 | fDest.write(chr(data)) 45 | 46 | 47 | print("File readed: {0}".format(FILE_NAME)) 48 | 49 | finally: 50 | fDest.close() 51 | fDest.close() 52 | f.close() 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /tools/sharewareSavegameCrypt.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import struct 5 | from collections import OrderedDict 6 | 7 | 8 | FILE_NAME = "DR.SW6_decrypted" #change name to extract other file 9 | FILE_NAME_DEST = "DR.SW6" #change name to extract other file 10 | 11 | 12 | 13 | print("Reading: {0}".format(FILE_NAME)) 14 | 15 | f = open(FILE_NAME, "rb") 16 | fDest = open(FILE_NAME_DEST,"w+") 17 | try: 18 | positions = 2179 19 | initialPosition = 0 20 | for index in range(positions): 21 | 22 | 23 | f.seek(index) 24 | data = f.read(1) 25 | 26 | 27 | if index==0: 28 | initialPosition =struct.unpack("> index%5 38 | data=data %256 39 | data = tmpData|data << (8-index%5) 40 | data=data %256 41 | 42 | 43 | fDest.seek(index) 44 | fDest.write(chr(data)) 45 | 46 | 47 | print("File readed: {0}".format(FILE_NAME)) 48 | 49 | finally: 50 | fDest.close() 51 | fDest.close() 52 | f.close() 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /libincludes/minifmod/mixer_fpu_ramp.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* MIXER_FPU_RAMP.H */ 3 | /* ---------------- */ 4 | /* MiniFMOD public source code release. */ 5 | /* This source is provided as-is. Firelight Technologies will not support */ 6 | /* or answer questions about the source provided. */ 7 | /* MiniFMOD Sourcecode is copyright (c) Firelight Technologies, 2000-2004. */ 8 | /* MiniFMOD Sourcecode is in no way representative of FMOD 3 source. */ 9 | /* Firelight Technologies is a registered company. */ 10 | /* This source must not be redistributed without this notice. */ 11 | /******************************************************************************/ 12 | 13 | #ifndef _MIXER_FPU_RAMP_H 14 | #define _MIXER_FPU_RAMP_H 15 | 16 | #define FSOUND_VOLUMERAMP_STEPS 128 // at 44.1khz 17 | 18 | void FSOUND_Mixer_FPU_Ramp(void *mixptr, int len, signed char returnaddress); 19 | 20 | extern unsigned int mix_volumerampsteps; 21 | extern float mix_1overvolumerampsteps; 22 | 23 | #endif -------------------------------------------------------------------------------- /portability/portability.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | 5 | 6 | /* -------------------------------------------------------------------- */ 7 | char *_strupr(char s[]) 8 | { 9 | char *p; 10 | 11 | for (p = s; *p; ++p) 12 | *p = toupper(*p); 13 | 14 | return(s); 15 | 16 | } /* END STRUPR */ 17 | 18 | /* -------------------------------------------------------------------- */ 19 | char *_strlwr(char s[]) 20 | { 21 | char *p; 22 | 23 | for (p = s; *p; ++p) 24 | *p = tolower(*p); 25 | 26 | return(s); 27 | 28 | } /* END STRLOWER */ 29 | 30 | /* END STRUPR.C */ 31 | 32 | 33 | /* The Itoa code is in the puiblic domain */ 34 | /*char* _itoa(int value, char* str, int radix) { 35 | radix = 10; 36 | static char dig[] = 37 | "0123456789" 38 | "abcdefghijklmnopqrstuvwxyz"; 39 | int n = 0, neg = 0; 40 | unsigned int v; 41 | char* p, *q; 42 | char c; 43 | if (radix == 10 && value < 0) { 44 | value = -value; 45 | neg = 1; 46 | } 47 | v = value; 48 | do { 49 | str[n++] = dig[v%radix]; 50 | v /= radix; 51 | } while (v); 52 | if (neg) 53 | str[n++] = '-'; 54 | str[n] = '\0'; 55 | for (p = str, q = p + n/2; p != q; ++p, --q) 56 | c = *p, *p = *q, *q = c; 57 | return str; 58 | }*/ -------------------------------------------------------------------------------- /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - '.github/*' 7 | - '.github/*_TEMPLATE/**' 8 | - '*.md' 9 | - '*.yml' 10 | pull_request: 11 | paths-ignore: 12 | - '.github/*' 13 | - '.github/*_TEMPLATE/**' 14 | - '*.md' 15 | - '*.yml' 16 | 17 | jobs: 18 | build-windows: 19 | runs-on: windows-latest 20 | env: 21 | POWERSHELL_TELEMETRY_OPTOUT: 1 22 | strategy: 23 | fail-fast: false 24 | matrix: 25 | configuration: [Release, Debug] 26 | steps: 27 | - uses: actions/checkout@v2 28 | - uses: microsoft/setup-msbuild@v1.0.1 29 | - name: Upgrade project(s) 30 | run: | 31 | Start-Process "${env:PROGRAMFILES(X86)}\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.com" "DreeRally.sln /upgrade" -nnw -Wait 32 | ((gc -path DreeRally.vcxproj) -replace '8.1','10.0') | Set-Content DreeRally.vcxproj 33 | - name: Build 34 | run: msbuild /m /nologo /v:m /p:Configuration=${{ matrix.configuration }} DreeRally.sln 35 | - uses: actions/upload-artifact@v2 36 | if: matrix.configuration == 'Release' 37 | with: 38 | name: DreeRally 39 | path: ${{ matrix.configuration }}\DreeRally.exe 40 | if-no-files-found: error 41 | -------------------------------------------------------------------------------- /sfx/minifmod/system_memory.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* SYSTEM_MEMORY.H */ 3 | /* ---------------- */ 4 | /* MiniFMOD public source code release. */ 5 | /* This source is provided as-is. Firelight Technologies will not support */ 6 | /* or answer questions about the source provided. */ 7 | /* MiniFMOD Sourcecode is copyright (c) Firelight Technologies, 2000-2004. */ 8 | /* MiniFMOD Sourcecode is in no way representative of FMOD 3 source. */ 9 | /* Firelight Technologies is a registered company. */ 10 | /* This source must not be redistributed without this notice. */ 11 | /******************************************************************************/ 12 | 13 | #ifndef _SYSTEM_MEMORY_H_ 14 | #define _SYSTEM_MEMORY_H_ 15 | 16 | // include your system's header here 17 | #include 18 | 19 | // redefine here 20 | #define FSOUND_Memory_Free(_ptr) free(_ptr) 21 | #define FSOUND_Memory_Alloc(_len) calloc(_len, 1) 22 | #define FSOUND_Memory_Calloc(_len) calloc(_len, 1) 23 | #define FSOUND_Memory_Realloc(_ptr, _len) realloc(_ptr, _len) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /libincludes/minifmod/system_memory.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* SYSTEM_MEMORY.H */ 3 | /* ---------------- */ 4 | /* MiniFMOD public source code release. */ 5 | /* This source is provided as-is. Firelight Technologies will not support */ 6 | /* or answer questions about the source provided. */ 7 | /* MiniFMOD Sourcecode is copyright (c) Firelight Technologies, 2000-2004. */ 8 | /* MiniFMOD Sourcecode is in no way representative of FMOD 3 source. */ 9 | /* Firelight Technologies is a registered company. */ 10 | /* This source must not be redistributed without this notice. */ 11 | /******************************************************************************/ 12 | 13 | #ifndef _SYSTEM_MEMORY_H_ 14 | #define _SYSTEM_MEMORY_H_ 15 | 16 | // include your system's header here 17 | #include 18 | 19 | // redefine here 20 | #define FSOUND_Memory_Free(_ptr) free(_ptr) 21 | #define FSOUND_Memory_Alloc(_len) calloc(_len, 1) 22 | #define FSOUND_Memory_Calloc(_len) calloc(_len, 1) 23 | #define FSOUND_Memory_Realloc(_ptr, _len) realloc(_ptr, _len) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /variables.h: -------------------------------------------------------------------------------- 1 | /*void memset32(void *buf, uint32_t n, int32_t c) 2 | { 3 | __asm { 4 | mov ecx, n 5 | mov eax, c 6 | mov edi, buf 7 | rep stosd 8 | } 9 | }*/ 10 | 11 | #ifdef PORTABILITY 12 | typedef enum 13 | { 14 | 15 | KEY_ESCAPE = 0x9, 16 | KEY_TAB = 23, 17 | KEY_Y = 29, 18 | KEY_P = 33, 19 | KEY_ENTER = 0x24, 20 | KEY_N = 57, 21 | KEY_F1 = 0x43, 22 | KEY_F2 = 0x44, 23 | KEY_F3 = 0x45, 24 | KEY_F4 = 0x46, 25 | KEY_F5 = 0x47, 26 | KEY_UP = 0x6f, 27 | KEY_LEFT= 113, 28 | KEY_RIGHT= 114, 29 | KEY_DOWN = 0x74, 30 | KEY_F6 = 0x48, 31 | KEY_F12= 0xff, //SDLK_F12 cambiar a esto 32 | KEY_ESPACE = 0xff 33 | }Keys; 34 | 35 | #else 36 | typedef enum 37 | { 38 | KEY_ESCAPE = 0x1, 39 | KEY_TAB = 15, 40 | KEY_Y = 21, 41 | KEY_P = 25, 42 | KEY_ENTER = 0x1C, 43 | KEY_N = 49, 44 | KEY_F1 = 59, 45 | KEY_F2 = 60, 46 | KEY_F3 = 61, 47 | KEY_F4 = 62, 48 | KEY_F5 = 63, 49 | KEY_UP = 0x48, 50 | KEY_LEFT = 0x4B, 51 | KEY_RIGHT = 0x4D, 52 | KEY_DOWN = 0x50, 53 | KEY_F6 = 64, 54 | KEY_F12 = 88, //SDLK_F12 cambiar a esto 55 | KEY_ESPACE = 0x39 56 | 57 | 58 | }Keys; 59 | #endif 60 | typedef enum 61 | { 62 | IN_RACE_ACELERATE = 0x1, 63 | IN_RACE_BRAKE = 0x2, 64 | IN_RACE_LEFT = 0x4, 65 | IN_RACE_RIGHT = 0x8, 66 | IN_RACE_TURBO = 0x10, 67 | IN_RACE_GUN = 0x20, 68 | IN_RACE_MINE = 0x40, 69 | IN_RACE_HORN = 0x42, 70 | IN_RACE_BRAKE_MINE = 0xFD 71 | 72 | }InRaceKeys; 73 | 74 | -------------------------------------------------------------------------------- /util/hash.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "hash.h" 4 | #include 5 | #include 6 | 7 | hash_t *hash_new (int size) { 8 | hash_t *h = malloc(sizeof (hash_t)); 9 | // h->keys = malloc(size* sizeof (void *)); 10 | // h->values = malloc(size* sizeof (void *)); 11 | if (h != NULL) { 12 | h->size = size; 13 | h->filled = 0; 14 | } 15 | return h; 16 | } 17 | 18 | int hash_index (hash_t *h, char *key) { 19 | int i;// = (int) hash(key) % h->size; 20 | char *orig =""; 21 | char * dest=""; 22 | dest =malloc(strlen(key)); 23 | if (dest != NULL) { 24 | strcpy(dest, key); 25 | } 26 | for(i=0;ifilled;i++){ 27 | orig = malloc(strlen(h->keys[i])); 28 | if (orig != NULL) { 29 | strcpy(orig, h->keys[i]); 30 | } 31 | 32 | if(strcmp(_strupr(orig),_strupr(dest))==0){ 33 | return i; 34 | } 35 | } 36 | /* while (h->keys[i] && h->keys[i] != key) 37 | i = (i + 1) % h->size;*/ 38 | return -1; 39 | } 40 | 41 | void hash_insert (hash_t *h, char *key, void *value) { 42 | //int i = hash_index(h, key); 43 | 44 | h->keys[h->filled] = key; 45 | h->values[h->filled] = value; 46 | h->filled = h->filled +1; 47 | } 48 | 49 | void *hash_lookup (hash_t *h, char *key) { 50 | signed int i = hash_index(h, key); 51 | if(i==-1) 52 | return NULL; 53 | h->filled = h->filled +1; 54 | 55 | return h->values[i]; 56 | } 57 | -------------------------------------------------------------------------------- /DreeRally.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2010 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DreeRally", "DreeRally.vcxproj", "{DB6EA97D-424D-459C-8B0B-1934C138929F}" 4 | EndProject 5 | Global 6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 | Debug|Win32 = Debug|Win32 8 | MinSizeRel|Win32 = MinSizeRel|Win32 9 | Release|Win32 = Release|Win32 10 | RelWithDebInfo|Win32 = RelWithDebInfo|Win32 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {DB6EA97D-424D-459C-8B0B-1934C138929F}.Debug|Win32.ActiveCfg = Debug|Win32 14 | {DB6EA97D-424D-459C-8B0B-1934C138929F}.Debug|Win32.Build.0 = Debug|Win32 15 | {DB6EA97D-424D-459C-8B0B-1934C138929F}.MinSizeRel|Win32.ActiveCfg = Release|Win32 16 | {DB6EA97D-424D-459C-8B0B-1934C138929F}.MinSizeRel|Win32.Build.0 = Release|Win32 17 | {DB6EA97D-424D-459C-8B0B-1934C138929F}.Release|Win32.ActiveCfg = Release|Win32 18 | {DB6EA97D-424D-459C-8B0B-1934C138929F}.Release|Win32.Build.0 = Release|Win32 19 | {DB6EA97D-424D-459C-8B0B-1934C138929F}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 20 | {DB6EA97D-424D-459C-8B0B-1934C138929F}.RelWithDebInfo|Win32.Build.0 = Release|Win32 21 | EndGlobalSection 22 | GlobalSection(SolutionProperties) = preSolution 23 | HideSolutionNode = FALSE 24 | EndGlobalSection 25 | GlobalSection(ExtensibilityGlobals) = postSolution 26 | SolutionGuid = {A4E9B168-A99A-38D3-9859-29C698A97850} 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /libincludes/SDL_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_config_h 24 | #define _SDL_config_h 25 | 26 | #include "SDL_platform.h" 27 | 28 | /* Add any platform that doesn't build using the configure system */ 29 | #if defined(__DREAMCAST__) 30 | #include "SDL_config_dreamcast.h" 31 | #elif defined(__MACOS__) 32 | #include "SDL_config_macos.h" 33 | #elif defined(__MACOSX__) 34 | #include "SDL_config_macosx.h" 35 | #elif defined(__SYMBIAN32__) 36 | #include "SDL_config_symbian.h" /* must be before win32! */ 37 | #elif defined(__WIN32__) 38 | #include "SDL_config_win32.h" 39 | #elif defined(__OS2__) 40 | #include "SDL_config_os2.h" 41 | #else 42 | #include "SDL_config_minimal.h" 43 | #endif /* platform config */ 44 | 45 | #endif /* _SDL_config_h */ 46 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_config_h 24 | #define _SDL_config_h 25 | 26 | #include "SDL_platform.h" 27 | 28 | /* Add any platform that doesn't build using the configure system */ 29 | #if defined(__DREAMCAST__) 30 | #include "SDL_config_dreamcast.h" 31 | #elif defined(__MACOS__) 32 | #include "SDL_config_macos.h" 33 | #elif defined(__MACOSX__) 34 | #include "SDL_config_macosx.h" 35 | #elif defined(__SYMBIAN32__) 36 | #include "SDL_config_symbian.h" /* must be before win32! */ 37 | #elif defined(__WIN32__) 38 | #include "SDL_config_win32.h" 39 | #elif defined(__OS2__) 40 | #include "SDL_config_os2.h" 41 | #else 42 | #include "SDL_config_minimal.h" 43 | #endif /* platform config */ 44 | 45 | #endif /* _SDL_config_h */ 46 | -------------------------------------------------------------------------------- /libincludes/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file close_code.h 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #undef _begin_code_h 30 | 31 | /** 32 | * @file close_code.h 33 | * Reset structure packing at previous byte alignment 34 | */ 35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) 36 | #ifdef __BORLANDC__ 37 | #pragma nopackwarning 38 | #endif 39 | #if (defined(__MWERKS__) && defined(__MACOS__)) 40 | #pragma options align=reset 41 | #pragma enumsalwaysint reset 42 | #else 43 | #pragma pack(pop) 44 | #endif 45 | #endif /* Compiler needs structure packing set */ 46 | 47 | -------------------------------------------------------------------------------- /MINGW32/includes/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file close_code.h 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #undef _begin_code_h 30 | 31 | /** 32 | * @file close_code.h 33 | * Reset structure packing at previous byte alignment 34 | */ 35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) 36 | #ifdef __BORLANDC__ 37 | #pragma nopackwarning 38 | #endif 39 | #if (defined(__MWERKS__) && defined(__MACOS__)) 40 | #pragma options align=reset 41 | #pragma enumsalwaysint reset 42 | #else 43 | #pragma pack(pop) 44 | #endif 45 | #endif /* Compiler needs structure packing set */ 46 | 47 | -------------------------------------------------------------------------------- /linux/includes/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this library; if not, write to the Free 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file close_code.h 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #undef _begin_code_h 30 | 31 | /** 32 | * @file close_code.h 33 | * Reset structure packing at previous byte alignment 34 | */ 35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) 36 | #ifdef __BORLANDC__ 37 | #pragma nopackwarning 38 | #endif 39 | #if (defined(__MWERKS__) && defined(__MACOS__)) 40 | #pragma options align=reset 41 | #pragma enumsalwaysint reset 42 | #else 43 | #pragma pack(pop) 44 | #endif 45 | #endif /* Compiler needs structure packing set */ 46 | 47 | -------------------------------------------------------------------------------- /lang/langBr.txt: -------------------------------------------------------------------------------- 1 | #menus 2 | Start Racing=Começar Corrida 3 | Multiplayer Race=Corrida Multiplayer 4 | Configure=Configuração 5 | See hall of fame=Ver Hall da Fama 6 | Credits=Créditos 7 | Exit to os=Sair para o Windows 8 | yes=sim 9 | no=não 10 | Are you sure?=¿Tem certeza? 11 | 12 | Start a new game=Começar um novo jogo 13 | End current Game=Finalizar jogo atual 14 | See current Stadistics=Ver estatísticas 15 | Load game=Carregar jogo 16 | save game=Salvar partida 17 | Previous menu=Voltar 18 | 19 | Music volume=Volume da música 20 | Effect volume=Volume dos efeitos 21 | define Keyboard=Configuração do telcado 22 | Define Gamepad/Joystick=Configuração de gamepad/joystick 23 | Gamepad/Joystick Disabled=gamepad/joystick Desativados 24 | 25 | Empty slot=Slot vazio 26 | Quicksave slot=Save rápido 27 | 28 | Accelerate=Acelerar 29 | Brake=Frear 30 | Steer Left=Virar para esquerda 31 | Steer right=Viara para direita 32 | Turbo boost=Turbo Boost 33 | Machine Gun=Metralhadora 34 | Drop Mine=Jogar Mina 35 | Horn=Buzina 36 | Select difficulty:=Dificuldade: 37 | speed makes me dizzy=Velocidade me deixa tonto 38 | i live to ride=Eu vivo pra dirigir 39 | petrol in my veins=Gasolina em minhas veias 40 | 41 | PRIZE: =PRÊMIO: 42 | GLORY=GLÓRIA 43 | NUMBER OF LAPS: =NÚMERO DE VOLTAS: 44 | 45 | Hard Race Results=Resultados da corrida difícil 46 | Medium Race Results=Resultados da corrida média 47 | Easy Race Results=Resultados da corrida fácil 48 | Press any key to continue...=Pressione uma tecla para continuar... 49 | Press any key to continue.=Pressione uma tecla para continuar. 50 | Please wait while loading...=Por favor, aguarde o carregamento 51 | You did not sign up in any race.=Você não se inscreveu em nenhuma corrida. 52 | -------------------------------------------------------------------------------- /ui/blackMarketScreen.h: -------------------------------------------------------------------------------- 1 | #include "../ui/util/anim.h" 2 | typedef struct BlackMarketMessages { 3 | ElementMessage sabotageMessage[1]; 4 | ElementMessage rocketMessage[1]; 5 | ElementMessage spikesMessage[1]; 6 | ElementMessage minesMessage[1]; 7 | Message outOfStockMessage; 8 | Message continueMessage; 9 | Message sharewareMessage; 10 | Message noSabotageMessage; 11 | } BlackMarketMessages; 12 | 13 | typedef enum 14 | { 15 | LOANSHARK = 0, 16 | MINES = 1, 17 | SPIKES = 2, 18 | ROCKET = 3, 19 | SABOTAGE = 4 20 | 21 | }UnderGroundMenu; 22 | 23 | int getBlackMarketElementText(int a1); 24 | int getBlackMarketElementPurchasedText(int a1); 25 | int outOfStockPopup_422930(); 26 | int blackMarketSharewarePopup_4229B0(); 27 | int drawLoanShark(); 28 | int loanDeniedVagabondPopUp(); 29 | int loanReturnPopup_422D80(); 30 | int drawBlackMarketElement0(); 31 | int drawBlackMarketElement1(); 32 | int drawBlackMarketElement2(); 33 | int drawBlackMarketElement3(); 34 | void drawBlackMarketContinue(); 35 | void underGroundMenuLeft(); 36 | void underGroundMenuRight(); 37 | int reInitUnderGroundMarketStock(void); // weak 38 | void drawBlackMarketScreen(); 39 | int loadAcceptedText(); 40 | void underGroundMenuEnter(void *); 41 | signed int setUndergroundMarketPrices(); 42 | 43 | void enterBlackMarketScreen(); 44 | 45 | extern int minesAvailable_45EFF0; // weak 46 | extern int spikesAvailable_45EFF4; // weak 47 | extern int rocketAvailable_45EFF8; // weak 48 | extern int sabotageAvailable_45EFFC; // weak 49 | 50 | extern int minesCost_462D40; // idb 51 | extern int spikesCost_dword_462D44; // idb 52 | extern int rocketCost_462D48; // idb 53 | extern int sabotageCost_462D4C; // idb 54 | extern int undergroundOptionSelected_dword_461278; // weak -------------------------------------------------------------------------------- /i18n/i18n.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include "../config.h" 6 | #include "i18n.h" 7 | #include "../util/hash.h" 8 | 9 | hash_t *languageEntries; 10 | 11 | char * readline(FILE *fp, char *buffer) 12 | { 13 | int ch; 14 | int i = 0; 15 | size_t buff_len = 0; 16 | void *tmp; 17 | buffer = malloc(buff_len + 1); 18 | if (!buffer) return NULL; // Out of memory 19 | 20 | while ((ch = fgetc(fp)) != '\n' && ch != EOF) 21 | { 22 | buff_len++; 23 | tmp = realloc(buffer, buff_len + 1); 24 | if (tmp == NULL) 25 | { 26 | free(buffer); 27 | return NULL; // Out of memory 28 | } 29 | buffer = tmp; 30 | 31 | buffer[i] = (char) ch; 32 | i++; 33 | } 34 | buffer[i] = '\0'; 35 | 36 | // Detect end 37 | if (ch == EOF && (i == 0 || ferror(fp))) 38 | { 39 | free(buffer); 40 | return NULL; 41 | } 42 | return buffer; 43 | } 44 | 45 | int initI18n() { 46 | 47 | FILE * fp; 48 | char *s; 49 | char delim[] = "="; 50 | char *key ; 51 | char *value ; 52 | languageEntries = hash_new(150); 53 | if(mainArgs.language) 54 | fp = fopen(strcat(strcat("lang/",mainArgs.language),".txt"), "r"); 55 | else 56 | return -1; 57 | while ((s = readline(fp, 0)) != NULL) 58 | { 59 | 60 | key = strtok(s, delim); 61 | 62 | if(key != NULL) 63 | { 64 | value = strtok(NULL, delim); 65 | hash_insert(languageEntries, (key), value); 66 | } 67 | //free(s); 68 | } 69 | fclose(fp); 70 | return 1; 71 | } 72 | 73 | char * getLanguageEntry(char * languageEntry) { 74 | char * result; 75 | result = (char *)hash_lookup(languageEntries, (languageEntry)); 76 | if(result == NULL) 77 | return languageEntry; 78 | return result ; 79 | } 80 | -------------------------------------------------------------------------------- /tools/bpaextractor.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import struct 5 | from collections import OrderedDict 6 | 7 | 8 | FILE_NAME = "MUSICS.BPA" #change name to extract other file 9 | FILE_NAME_SIZE = 13 10 | FILE_SIZE = 4 11 | 12 | FAT_SIZE = 255 *17 13 | INITIAL_OFFSET = FAT_SIZE + 4 14 | 15 | 16 | def getNumberOfFiles(f): 17 | f.seek(0) 18 | num_files = struct.unpack(" 31 | 32 | typedef signed char int8_t; 33 | typedef unsigned char uint8_t; 34 | typedef signed short int16_t; 35 | typedef unsigned short uint16_t; 36 | typedef signed int int32_t; 37 | typedef unsigned int uint32_t; 38 | typedef unsigned int size_t; 39 | typedef unsigned long uintptr_t; 40 | 41 | /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ 42 | #define SDL_AUDIO_DRIVER_DUMMY 1 43 | 44 | /* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */ 45 | #define SDL_CDROM_DISABLED 1 46 | 47 | /* Enable the stub joystick driver (src/joystick/dummy/\*.c) */ 48 | #define SDL_JOYSTICK_DISABLED 1 49 | 50 | /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ 51 | #define SDL_LOADSO_DISABLED 1 52 | 53 | /* Enable the stub thread support (src/thread/generic/\*.c) */ 54 | #define SDL_THREADS_DISABLED 1 55 | 56 | /* Enable the stub timer support (src/timer/dummy/\*.c) */ 57 | #define SDL_TIMERS_DISABLED 1 58 | 59 | /* Enable the dummy video driver (src/video/dummy/\*.c) */ 60 | #define SDL_VIDEO_DRIVER_DUMMY 1 61 | 62 | #endif /* _SDL_config_minimal_h */ 63 | -------------------------------------------------------------------------------- /mod/mod.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include "../config.h" 6 | #include "mod.h" 7 | 8 | #include "../util/hash.h" 9 | 10 | hash_t *modEntries; 11 | 12 | char * readlineConfig(FILE *fp, char *buffer) 13 | { 14 | int ch; 15 | int i = 0; 16 | size_t buff_len = 0; 17 | void *tmp; 18 | buffer = malloc(buff_len + 1); 19 | if (!buffer) return NULL; // Out of memory 20 | 21 | while ((ch = fgetc(fp)) != '\n' && ch != EOF) 22 | { 23 | buff_len++; 24 | tmp = realloc(buffer, buff_len + 1); 25 | if (tmp == NULL) 26 | { 27 | free(buffer); 28 | return NULL; // Out of memory 29 | } 30 | buffer = tmp; 31 | 32 | buffer[i] = (char) ch; 33 | i++; 34 | } 35 | buffer[i] = '\0'; 36 | 37 | // Detect end 38 | if (ch == EOF && (i == 0 || ferror(fp))) 39 | { 40 | free(buffer); 41 | return NULL; 42 | } 43 | return buffer; 44 | } 45 | int initMod() { 46 | 47 | FILE * fp; 48 | char *s; 49 | char delim[] = "="; 50 | char *key ; 51 | char *value ; 52 | char completeFile[300] = ""; 53 | if(mainArgs.mod){ 54 | modEntries = hash_new(150); 55 | strcat(completeFile,"mods/"); 56 | strcat(completeFile, mainArgs.mod); 57 | strcat(completeFile,"/config.txt"); 58 | fp = fopen(completeFile, "r"); 59 | }else 60 | return 0; 61 | while ((s = readlineConfig(fp, 0)) != NULL) 62 | { 63 | 64 | key = strtok(s, delim); 65 | 66 | if(key != NULL) 67 | { 68 | value = strtok(NULL, delim); 69 | hash_insert(modEntries, (key), value); 70 | } 71 | //free(s); 72 | } 73 | fclose(fp); 74 | return 1; 75 | } 76 | 77 | char * getModCharEntry(char * modEntryKey, char * fallbackValue) { 78 | char * result; 79 | if(!mainArgs.mod) 80 | return fallbackValue; 81 | 82 | result = (char *)hash_lookup(modEntries, (modEntryKey)); 83 | if(result == NULL) 84 | return fallbackValue; 85 | return result ; 86 | } 87 | 88 | int getModIntEntry(char * modEntryKey, int fallbackValue) { 89 | char * result; 90 | if(!mainArgs.mod) 91 | return fallbackValue ; 92 | 93 | result = (char *)hash_lookup(modEntries, (modEntryKey)); 94 | if(result == NULL) 95 | return fallbackValue; 96 | return atoi(result) ; 97 | } -------------------------------------------------------------------------------- /config.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_H 2 | #define CONFIG_H 3 | 4 | #include "ui/hallOfFame.h" 5 | 6 | 7 | 8 | typedef struct MainArgs { 9 | int configNoSound; 10 | int configSmooth; 11 | int configGL; 12 | int configWindow; 13 | int configNoSoundEffect; 14 | char * language; 15 | char * mod; 16 | } MainArgs; 17 | 18 | typedef struct Configuration { 19 | int musicVolume; //dword_45DC14 20 | int effectsVolume; // dword_45DC18; 21 | int dword_4457CC ; 22 | int difficulty; 23 | int useJoystick; //dword_45EA00 24 | int dword_463D00; 25 | int dword_463D04; 26 | int dword_463D08; 27 | int dword_463D0C; 28 | int dword_463D10; 29 | char byte_463D14; 30 | int dword_45EB80; 31 | int dword_45EB84; 32 | int dword_45EB88; 33 | int dword_45EB8C; 34 | int dword_45EB90; 35 | char byte_45EB94; 36 | int dword_456734; //algo de gamepad 37 | int dword_45FB68; 38 | int dword_45DC40; 39 | int dword_45DC1C; 40 | 41 | //esto son recorrd 42 | CircuitRecords* circuitRecords; 43 | //char byte_45F040[12]; // idb 44 | 45 | //variable con los datos del hall of fame 46 | //int dword_461F20[200]; // weak 47 | HallOfFameEntry* hallOfFameEntries; 48 | int accelerateKey; //dword_461EA8; 49 | int brakeKey; // dword_463CA8; 50 | int leftSteeringKey;// dword_461FF8; 51 | int rightSteeringKey; //dword_45EA68 52 | int turboKey; //dword_45FBF4 53 | int gunKey; //dword_463CE4 54 | int mineKey; //dword_461270 55 | int hornKey; //dword_463D18 56 | int accelerateGamepad; //dword_461294 57 | int brakeGamepad;//dword_461F14 58 | int leftSteeringGamepad;//dword_45EEA0 59 | int rightSteeringGamepad;//dword_462D6C 60 | int turboGamepad;//dword_463D8C 61 | int gunGamepad;//dword_462CFC 62 | int mineGamepad;//dword_463CA4 63 | int timesPlayed; //dword_463CEC 64 | char defaultAccelerateGamepad;// byte_44512C 65 | char defaultBrakeGamepad; //byte_44512B 66 | char defaultLeftSteeringGamepad;//byte_445128 67 | char defaultRightSteeringGamepad;//byte_445129 68 | char defaultTurboGamepad; //byte_44512D 69 | char defaultGunGamepad; //byte_44512E 70 | char defaultMineGamepad; //byte_44512F 71 | } Configuration; 72 | 73 | extern MainArgs mainArgs; 74 | extern Configuration configuration; 75 | 76 | int checkArgs(char * args); 77 | 78 | int saveConfiguration(); 79 | 80 | char loadConfig(); 81 | 82 | //dword_461F20 es la estructura halloffame 83 | 84 | #endif -------------------------------------------------------------------------------- /savegame.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include "savegame.h" 6 | #include "defs.h" 7 | #include 8 | 9 | void *Str; // idb 10 | int savegames_unk_446DC2 =10; 11 | 12 | //----- (0043AF70) -------------------------------------------------------- 13 | char decryptByteSavegame(int a1, char a2) 14 | { 15 | char result; // al@1 16 | 17 | result = *(unsigned char *)a1 << a2; 18 | *(unsigned char *)a1 = result | (*(unsigned char *)a1 >> (8 - a2)); 19 | return a1; 20 | } 21 | 22 | //----- (0043AF90) -------------------------------------------------------- 23 | char encryptByteSavegame(int a1, char a2) 24 | { 25 | char result; // al@1 26 | 27 | result = *(unsigned char *)a1 >> a2; 28 | *(unsigned char *)a1 = result | (*(unsigned char *)a1 << (8 - a2)); 29 | return result; 30 | } 31 | 32 | //----- (0041C910) -------------------------------------------------------- 33 | int decryptEntireSavegame(int a1, char *Filename) 34 | { 35 | void *v2 = (void *) malloc(0x883u); // eax@1 36 | int v3; // edi@1 37 | FILE *v4; // esi@1 38 | unsigned int v5; // ebx@1 39 | int result; // eax@3 40 | char v7; // [sp+0h] [bp-4h]@1 41 | 42 | // allocateMemory(0x883u); 43 | Str = v2; 44 | memset(v2, 0, 0x880u); 45 | v3 = (int)((char *)v2 + 2176); 46 | *(_WORD *)v3 = 0; 47 | *(BYTE *)(v3 + 2) = 0; 48 | v4 = fopen(Filename, "rb"); 49 | fread(Str, 0x883u, 1u, v4); 50 | fclose(v4); 51 | v7 = *(BYTE *)Str; 52 | v5 = 1; 53 | do 54 | { 55 | decryptByteSavegame((int)((char *)Str + v5), v5 % 6); 56 | *((BYTE *)Str + v5) += -17 * v5; 57 | *((BYTE *)Str + v5++) += v7; 58 | } while ((signed int)v5 < 2179); 59 | result = 0; 60 | /*do 61 | { 62 | *(BYTE *)(result + a1) = *((BYTE *)Str + result + 4); 63 | ++result; 64 | } while (result < 15);*/ 65 | return result; 66 | } 67 | 68 | char* getSaveGameName(int savegame) { 69 | char Filename[20]; 70 | char *saveNumber = (char *) malloc(1); 71 | // FILE * fp; 72 | char *saveGameName= (char *) malloc(20); 73 | 74 | strcpy(Filename, "DR.SG"); 75 | SDL_itoa(savegame, saveNumber, 10); 76 | strcat(Filename, saveNumber); 77 | if ((signed int)fileExists(Filename) > 0) { 78 | 79 | decryptEntireSavegame(0, Filename); 80 | 81 | memcpy(saveGameName, ((unsigned char *)Str + 4), 16); 82 | 83 | return saveGameName; 84 | } 85 | else { 86 | return NULL; 87 | } 88 | } 89 | 90 | -------------------------------------------------------------------------------- /ui/endGameScreen.c: -------------------------------------------------------------------------------- 1 | #include "endGameScreen.h" 2 | #include "../defs.h" 3 | #include "../dr.h" 4 | #include "../graphics.h" 5 | #include "../asset/bpaUtil.h" 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | //----- (00427700) -------------------------------------------------------- 12 | int showEndScreen() 13 | { 14 | SDL_RWops *v0; // eax@1 15 | SDL_Surface *v1; // ebx@1 16 | int v2; // edi@1 17 | signed int v3; // esi@1 18 | signed int v4; // esi@3 19 | int v5; // edi@6 20 | signed int v6; // ebp@6 21 | unsigned __int8 v7; // bl@7 22 | signed int v8; // esi@7 23 | int v9; // ST14_4@8 24 | int v10; // ST10_4@8 25 | int v11; // eax@8 26 | int result; // eax@8 27 | 28 | sub_4224E0(); 29 | transitionToBlack(); 30 | v0 = SDL_RWFromFile("end.bmp", "rb"); 31 | v1 = SDL_LoadBMP_RW(v0, 1); 32 | v2 = 0; 33 | v3 = 0; 34 | //v3 = (signed int)dword_45FC44; 35 | do 36 | { 37 | palette1[v3] = colorToPaletteEntry( 38 | (unsigned __int8)(v1->format->palette->colors[v2].r & 0xFC) << 14,6553600); 39 | palette1[v3+1] = colorToPaletteEntry( 40 | (unsigned __int8)(v1->format->palette->colors[v2].g & 0xFC) << 14,6553600); 41 | palette1[v3+2] = colorToPaletteEntry( 42 | (unsigned __int8)(v1->format->palette->colors[v2].b & 0xFC) << 14,6553600); 43 | 44 | v3 += 3; 45 | v2 += 1; 46 | } 47 | while ( v3 < maxPaletteEntries ); 48 | memcpy(screenBuffer, v1->pixels, 0x4B000u); 49 | SDL_FreeSurface(v1); 50 | refreshAllScreen(); 51 | transitionToCurrentImage(); 52 | v4 = 0; 53 | do 54 | { 55 | waitWithRefresh(); 56 | ++v4; 57 | } 58 | while ( !eventDetected() && v4 < 560 ); 59 | v5 = 6553600; 60 | v6 = 65500; 61 | do 62 | { 63 | waitWithRefresh(); 64 | setMusicVolume(v6); 65 | v7 = 0; 66 | v8 = 0; 67 | //v8 = (signed int)dword_45FC44; 68 | do 69 | { 70 | v9 = (convertColorToPaletteColor((palette1[v8+2]), v5) + 0x8000) >> 16; 71 | v10 = (convertColorToPaletteColor(palette1[v8 + 1], v5) + 0x8000) >> 16; 72 | v11 = convertColorToPaletteColor((palette1[v8] - 4), v5); 73 | result = setPaletteAndGetValue(v7, (v11 + 0x8000) >> 16, v10, v9); 74 | v8 += 3; 75 | ++v7; 76 | } 77 | while ( v8 < maxPaletteEntries ); 78 | v6 -= 2620; 79 | v5 -= 0x40000; 80 | } 81 | while ( v6 >= 0 ); 82 | return result; 83 | } 84 | 85 | -------------------------------------------------------------------------------- /ui/util/bottomText.c: -------------------------------------------------------------------------------- 1 | #include "bottomText.h" 2 | 3 | #include "../../graphics.h" 4 | #include "../../imageUtil.h" 5 | #include "../../dr.h" 6 | 7 | #include 8 | #include 9 | #include 10 | //----- (0041E810) -------------------------------------------------------- 11 | char drawBottomMenuText() 12 | { 13 | // signed int v0; // eax@1 14 | // char *v1; // esi@2 15 | // char *v2; // edi@2 16 | // int v3; // ebp@3 17 | // const char *v4; // edi@3 18 | // int v5; // esi@3 19 | /// char result; // al@4 20 | 21 | 22 | 23 | drawTextWithFont((int)graphicsGeneral.fsma3bBpk, (int)&letterSpacing_4458B0, " Welcome to DreeRally - Windows Version 0.2", 640 * 395); 24 | drawTextWithFont((int)graphicsGeneral.fsma3bBpk, (int)&letterSpacing_4458B0, " Follow us on https://www.dreerally.com", 640 * 410); 25 | //drawTextWithFont((int)graphicsGeneral.fsma3bBpk, (int)&letterSpacing_4458B0, " See more developments at https://github.com/enriquesomolinos", 640 * 425); 26 | //drawTextWithFont((int)graphicsGeneral.fsma3bBpk, (int)&letterSpacing_4458B0, " (c)Remedy Entertainment - http://www.remedygames.com", 640 * 425); 27 | drawTextWithFont((int)graphicsGeneral.fsma3bBpk, (int)&letterSpacing_4458B0, " Use arrow keys to change selection and press enter to confirm.", 640 * 425); 28 | 29 | /* 30 | 31 | v0 = 243200; 32 | do 33 | { 34 | v1 = (char *)graphicsGeneral.menubg5Bpk + v0; 35 | v2 = (char *)screenBuffer + v0; 36 | v0 += 640; 37 | memcpy(v2, v1, 0x280u); 38 | } 39 | while ( v0 < 300160 ); 40 | v3 = 0; 41 | v4 = (const char *)&unk_462960; 42 | v5 = 241932; 43 | do 44 | { 45 | result = *((BYTE *)&word_461ED0 + v3); 46 | if ( !result ) 47 | result = drawTextWithFont((int)graphicsGeneral.fsma3aBpk, (int)&letterSpacing_4458B0, v4, v5); 48 | if ( *((BYTE *)&word_461ED0 + v3) == 1 ) 49 | result = drawTextWithFont((int)graphicsGeneral.fsma3bBpk, (int)&letterSpacing_4458B0, v4, v5); 50 | if ( *((BYTE *)&word_461ED0 + v3) == 2 ) 51 | result = drawTextWithFont((int)graphicsGeneral.fsma3cBpk, (int)&letterSpacing_4458B0, v4, v5); 52 | v5 += 9600; 53 | ++v3; 54 | v4 += 150; 55 | } 56 | while ( v5 < 299532 ); 57 | return result;*/ 58 | return 0; 59 | } 60 | // 4458B0: using guessed type char letterSpacing_4458B0; 61 | // 461ED0: using guessed type __int16 word_461ED0; -------------------------------------------------------------------------------- /libincludes/SDL_cpuinfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file SDL_cpuinfo.h 25 | * CPU feature detection for SDL 26 | */ 27 | 28 | #ifndef _SDL_cpuinfo_h 29 | #define _SDL_cpuinfo_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** This function returns true if the CPU has the RDTSC instruction */ 40 | extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void); 41 | 42 | /** This function returns true if the CPU has MMX features */ 43 | extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void); 44 | 45 | /** This function returns true if the CPU has MMX Ext. features */ 46 | extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void); 47 | 48 | /** This function returns true if the CPU has 3DNow features */ 49 | extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void); 50 | 51 | /** This function returns true if the CPU has 3DNow! Ext. features */ 52 | extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void); 53 | 54 | /** This function returns true if the CPU has SSE features */ 55 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void); 56 | 57 | /** This function returns true if the CPU has SSE2 features */ 58 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); 59 | 60 | /** This function returns true if the CPU has AltiVec features */ 61 | extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void); 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* _SDL_cpuinfo_h */ 70 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL_cpuinfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file SDL_cpuinfo.h 25 | * CPU feature detection for SDL 26 | */ 27 | 28 | #ifndef _SDL_cpuinfo_h 29 | #define _SDL_cpuinfo_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** This function returns true if the CPU has the RDTSC instruction */ 40 | extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void); 41 | 42 | /** This function returns true if the CPU has MMX features */ 43 | extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void); 44 | 45 | /** This function returns true if the CPU has MMX Ext. features */ 46 | extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void); 47 | 48 | /** This function returns true if the CPU has 3DNow features */ 49 | extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void); 50 | 51 | /** This function returns true if the CPU has 3DNow! Ext. features */ 52 | extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void); 53 | 54 | /** This function returns true if the CPU has SSE features */ 55 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void); 56 | 57 | /** This function returns true if the CPU has SSE2 features */ 58 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); 59 | 60 | /** This function returns true if the CPU has AltiVec features */ 61 | extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void); 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* _SDL_cpuinfo_h */ 70 | -------------------------------------------------------------------------------- /linux/includes/SDL_cpuinfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** 24 | * @file SDL_cpuinfo.h 25 | * CPU feature detection for SDL 26 | */ 27 | 28 | #ifndef _SDL_cpuinfo_h 29 | #define _SDL_cpuinfo_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** This function returns true if the CPU has the RDTSC instruction */ 40 | extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void); 41 | 42 | /** This function returns true if the CPU has MMX features */ 43 | extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void); 44 | 45 | /** This function returns true if the CPU has MMX Ext. features */ 46 | extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void); 47 | 48 | /** This function returns true if the CPU has 3DNow features */ 49 | extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void); 50 | 51 | /** This function returns true if the CPU has 3DNow! Ext. features */ 52 | extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void); 53 | 54 | /** This function returns true if the CPU has SSE features */ 55 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void); 56 | 57 | /** This function returns true if the CPU has SSE2 features */ 58 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); 59 | 60 | /** This function returns true if the CPU has AltiVec features */ 61 | extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void); 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* _SDL_cpuinfo_h */ 70 | -------------------------------------------------------------------------------- /ui/util/menus.c: -------------------------------------------------------------------------------- 1 | #include "menus.h" 2 | #include "../../util.h" 3 | #include "../../savegame.h" 4 | #include "../../i18n/i18n.h" 5 | 6 | #include 7 | 8 | char * menu0[] = { "Start Racing", "Multiplayer Race", "Configure","See hall of fame","Credits","Exit to os" }; 9 | char * menu1[] = { "Start a new game", "End current Game", "See current Stadistics","Load game","save game","Previous menu" }; 10 | 11 | char * menu3[] = { "Music volume", "Effect volume", "define Keyboard","Define Gamepad/Joystick","Gamepad/Joystick Disabled","Previous menu" }; 12 | 13 | char * menu5[] = { "Empty slot", "Empty slot", "Empty slot","Empty slot","Empty slot","Empty slot","Empty slot","Quicksave slot" }; 14 | 15 | char * menu6[] = { "Accelerate", "Brake", "Steer Left","Steer right","Turbo boost","Machine Gun","Drop Mine","Horn","Previous menu" }; 16 | 17 | char * menu8[] = { "Accelerate", "Brake", "Steer Left","Steer right","Turbo boost","Machine Gun","Drop Mine","Previous menu" }; 18 | 19 | char menuActive_4457F0[] = { '\x01','\x0','\x01','\x01','\x01','\x01','\x01','\x0','\x0', 20 | '\x01','\x0','\x0','\x01','\x0','\x01','\x0','\x0','\x0', 21 | '\x0','\x0','\x01','\x01','\x1','\x01','\x1','\x1','\x0', 22 | '\x1','\x1','\x01','\x01','\x1','\x01','\x0','\x0','\x0', 23 | '\x1','\x1','\x01','\x01','\x1','\x0','\x0','\x0','\x0', 24 | '\x1','\x1','\x01','\x01','\x1','\x1','\x1','\x1','\x0', 25 | '\x1','\x1','\x01','\x01','\x1','\x1','\x1','\x1','\x1', 26 | '\x1','\x1','\x01','\x01','\x1','\x1','\x1','\x1','\x0', 27 | '\x1','\x1','\x01','\x01','\x1','\x1','\x1','\x1','\x1' }; // weak 28 | char* getMenuText(int menu, int position) { 29 | 30 | switch (menu) 31 | { 32 | default: 33 | break; 34 | case INITIAL_MENU://menu principal 35 | return getLanguageEntry(menu0[position]); 36 | break; 37 | 38 | case START_NEW_GAME_MENU:// 39 | return getLanguageEntry(menu1[position]); 40 | break; 41 | 42 | case CONFIGURE_MENU:// 43 | return getLanguageEntry(menu3[position]); 44 | break; 45 | case LOAD_MENU:// 46 | 47 | if (position == 8) { 48 | return getLanguageEntry(menu5[position]); 49 | } 50 | else { 51 | if (getSaveGameName(position) != NULL) { 52 | return getSaveGameName(position); 53 | }else return getLanguageEntry(menu5[position]); 54 | 55 | } 56 | 57 | break; 58 | case DEFINE_KEYBOARD_MENU:// 59 | return getLanguageEntry(menu6[position]); 60 | break; 61 | case DEFINE_GAMEPAD_MENU:// 62 | return getLanguageEntry(menu8[position]); 63 | break; 64 | } 65 | return ""; 66 | 67 | 68 | } -------------------------------------------------------------------------------- /ui/creditsScreen.c: -------------------------------------------------------------------------------- 1 | 2 | #include "creditsScreen.h" 3 | #include "../defs.h" 4 | #include "../dr.h" 5 | #include "../graphics.h" 6 | #include "../asset/bpaUtil.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | //----- (004274E0) -------------------------------------------------------- 13 | int showCredits() 14 | { 15 | signed int v0; // ebp@1 16 | unsigned __int8 v1; // bl@4 17 | signed int v2; // esi@4 18 | int blue1; // ST14_4@5 19 | int green1; // ST10_4@5 20 | int red1; // eax@5 21 | signed int v6; // ebp@11 22 | unsigned __int8 v7; // bl@14 23 | signed int v8; // esi@14 24 | int blue; // ST14_4@15 25 | int green; // ST10_4@15 26 | int red; // eax@15 27 | int result; // eax@15 28 | 29 | memcpy(dword_461ED8, screenBuffer, 0x4B000u); 30 | sub_4224E0(); 31 | v0 = 50; 32 | do 33 | { 34 | waitWithRefresh(); 35 | if ( v0 % 2 ) 36 | updateCursor(0); 37 | v1 = 0; 38 | v2 = 0; 39 | //v2 = (signed int)dword_45FC44; 40 | do 41 | { 42 | blue1 = (convertColorToPaletteColor((palette1[v2+2]), v0 << 17) + 0x8000) >> 16; 43 | green1 = (convertColorToPaletteColor(palette1[v2 + 1], v0 << 17) + 0x8000) >> 16; 44 | red1 = convertColorToPaletteColor((palette1[v2]), v0 << 17); 45 | setPaletteAndGetValue(v1, (red1 + 0x8000) >> 16, green1, blue1); 46 | v2 += 3; 47 | ++v1; 48 | } 49 | while ( v2 < maxPaletteEntries ); 50 | --v0; 51 | } 52 | while ( v0 >= 0 ); 53 | openPalFromBpa("credit1.pal"); 54 | extractFromBpa("MENU.BPA", textureTemp, "credit1.bpk"); 55 | copyImageToBuffer((int)textureTemp, (int)screenBuffer); 56 | refreshAllScreen(); 57 | transitionToCurrentImage(); 58 | while ( !eventDetected() ) 59 | waitWithRefresh(); 60 | transitionToBlack(); 61 | openPalFromBpa("credit2.pal"); 62 | extractFromBpa("MENU.BPA", textureTemp, "credit2.bpk"); 63 | copyImageToBuffer((int)textureTemp, (int)screenBuffer); 64 | refreshAllScreen(); 65 | transitionToCurrentImage(); 66 | while ( !eventDetected() ) 67 | waitWithRefresh(); 68 | transitionToBlack(); 69 | sub_4224E0(); 70 | memcpy(screenBuffer, dword_461ED8, 0x4B000u); 71 | refreshAllScreen(); 72 | v6 = 0; 73 | do 74 | { 75 | waitWithRefresh(); 76 | if ( v6 % 2 ) 77 | updateCursor(0); 78 | v7 = 0; 79 | //v8 = (signed int)dword_45FC44; 80 | v8 = 0; 81 | do 82 | { 83 | blue = (convertColorToPaletteColor((palette1[v8+2]), v6 << 17) + 0x8000) >> 16; 84 | green = (convertColorToPaletteColor(palette1[v8 + 1], v6 << 17) + 0x8000) >> 16; 85 | red = convertColorToPaletteColor((palette1[v8]) ,v6 << 17); 86 | result = setPaletteAndGetValue(v7, (red + 0x8000) >> 16, green, blue); 87 | v8 += 3; 88 | ++v7; 89 | } 90 | while ( v8 < maxPaletteEntries ); 91 | ++v6; 92 | } 93 | while ( v6 < 50 ); 94 | return result; 95 | } 96 | -------------------------------------------------------------------------------- /graphics.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef GRAPHICS_H 3 | #define GRAPHICS_H 4 | 5 | typedef struct Graphics4 { 6 | void *badtitBpk; 7 | void *badsnapBpk; 8 | void *escboxBpk; 9 | void *signlineBpk; 10 | void *prep4Bpk; 11 | void *tsahpeBpk_45EB5C; 12 | void *prepw1Bpk; 13 | } Graphics4; 14 | 15 | typedef struct GraphicsGeneral { 16 | void *corn3bBpk; // idb 17 | void *corn3aBpk; // idb 18 | void *copperPal; // idb 19 | void *carcolPal; // idb 20 | void *bgcopPal; // idb 21 | void *t15x150Bpk; // idb 22 | void *fbig3aBpk; // idb 23 | void *fsma3bBpk; // idb 24 | void *fsma3cBpk; // idb 25 | void *fsma3aBpk; // idb 26 | void *fmed1aBpk; // idb 27 | void *menubg5Bpk; // idb 28 | void *mulsbg2Bpk; // idb 29 | void *rank1cBpk; // idb 30 | void *resupok1Bpk; // idb 31 | void *rankinf1Bpk; // idb 32 | void *rankinf2Bpk; // idb 33 | void *rankinf3Bpk; // idb 34 | void *raceeasBpk; // idb 35 | void *racemedBpk; // idb 36 | void *raceharBpk; // idb 37 | void *pnameBpk; // idb 38 | void *ppistBpk; // idb 39 | void *prankBpk; // idb 40 | void *ptseasyBpk; // idb 41 | void *ptsmedBpk; // idb 42 | void *ptshardBpk; // idb 43 | void *placingBpk; // idb 44 | void *carresBpk; // idb 45 | void *face01Bpk; // idb //hasta la 20 tiene que ser un array! adversary va por libre 46 | void *face02Bpk; // idb 47 | void *face03Bpk; // idb 48 | void *face04Bpk; // idb 49 | void *face05Bpk; // idb 50 | void *face06Bpk; // idb 51 | void *face07Bpk; // idb 52 | void *face08Bpk; // idb 53 | void *face09Bpk; // idb 54 | void *face10Bpk; // idb 55 | void *face11Bpk; // idb 56 | void *face12Bpk; // idb 57 | void *face13Bpk; // idb 58 | void *face14Bpk; // idb 59 | void *face15Bpk; // idb 60 | void *face16Bpk; // idb 61 | void *face17Bpk; // idb 62 | void *face18Bpk; // idb 63 | void *face19Bpk; // idb 64 | void *face20Bpk; // idb 65 | void *facexxBpk; // idb 66 | } GraphicsGeneral; 67 | 68 | typedef struct Graphics2 { 69 | 70 | void *fbig3bBpk; // idb 71 | 72 | int* trsnap2m1Bpk[20]; // idb 73 | void *chattextBpk; // idb 74 | void *fasesel1Bpk; // idb 75 | void *facearr1Bpk; // idb 76 | void *shoptxt1Bpk; // idb 77 | void *fametxtBpk; // idb 78 | void *shoptxt2Bpk; // idb 79 | void *recobarBpk; // idb 80 | void *recotxtBpk; // idb 81 | void *linlin1Bpk; // idb 82 | void *chatlin1Bpk; // idb 83 | void *cursorBpk; // idb 84 | void *fbig3dBpk; // idb 85 | void *mseletx1Bpk; // idb 86 | void *trarr1Bpk; // idb 87 | void *enterx2Bpk; 88 | } Graphics2; 89 | 90 | extern Graphics2 graphics2; 91 | 92 | extern GraphicsGeneral graphicsGeneral; 93 | 94 | extern Graphics4 graphics4; 95 | 96 | extern int textureTemp[0xFFFFFu]; // weak 97 | 98 | extern void *screenBuffer; 99 | 100 | void loadGraphics1(); 101 | 102 | void loadGraphics2(); 103 | void loadGraphics4(); 104 | 105 | void freeMemoryGraphics1(); 106 | void freeMemoryGraphics2(); 107 | void freeMemoryGraphics4(); 108 | 109 | #endif -------------------------------------------------------------------------------- /libincludes/SDL_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_version.h 24 | * This header defines the current SDL version 25 | */ 26 | 27 | #ifndef _SDL_version_h 28 | #define _SDL_version_h 29 | 30 | #include "SDL_stdinc.h" 31 | 32 | #include "begin_code.h" 33 | /* Set up for C function definitions, even when using C++ */ 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /** @name Version Number 39 | * Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL 40 | */ 41 | /*@{*/ 42 | #define SDL_MAJOR_VERSION 1 43 | #define SDL_MINOR_VERSION 2 44 | #define SDL_PATCHLEVEL 15 45 | /*@}*/ 46 | 47 | typedef struct SDL_version { 48 | Uint8 major; 49 | Uint8 minor; 50 | Uint8 patch; 51 | } SDL_version; 52 | 53 | /** 54 | * This macro can be used to fill a version structure with the compile-time 55 | * version of the SDL library. 56 | */ 57 | #define SDL_VERSION(X) \ 58 | { \ 59 | (X)->major = SDL_MAJOR_VERSION; \ 60 | (X)->minor = SDL_MINOR_VERSION; \ 61 | (X)->patch = SDL_PATCHLEVEL; \ 62 | } 63 | 64 | /** This macro turns the version numbers into a numeric value: 65 | * (1,2,3) -> (1203) 66 | * This assumes that there will never be more than 100 patchlevels 67 | */ 68 | #define SDL_VERSIONNUM(X, Y, Z) \ 69 | ((X)*1000 + (Y)*100 + (Z)) 70 | 71 | /** This is the version number macro for the current SDL version */ 72 | #define SDL_COMPILEDVERSION \ 73 | SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) 74 | 75 | /** This macro will evaluate to true if compiled with SDL at least X.Y.Z */ 76 | #define SDL_VERSION_ATLEAST(X, Y, Z) \ 77 | (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) 78 | 79 | /** This function gets the version of the dynamically linked SDL library. 80 | * it should NOT be used to fill a version structure, instead you should 81 | * use the SDL_Version() macro. 82 | */ 83 | extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void); 84 | 85 | /* Ends C function definitions when using C++ */ 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | #include "close_code.h" 90 | 91 | #endif /* _SDL_version_h */ 92 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_version.h 24 | * This header defines the current SDL version 25 | */ 26 | 27 | #ifndef _SDL_version_h 28 | #define _SDL_version_h 29 | 30 | #include "SDL_stdinc.h" 31 | 32 | #include "begin_code.h" 33 | /* Set up for C function definitions, even when using C++ */ 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /** @name Version Number 39 | * Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL 40 | */ 41 | /*@{*/ 42 | #define SDL_MAJOR_VERSION 1 43 | #define SDL_MINOR_VERSION 2 44 | #define SDL_PATCHLEVEL 15 45 | /*@}*/ 46 | 47 | typedef struct SDL_version { 48 | Uint8 major; 49 | Uint8 minor; 50 | Uint8 patch; 51 | } SDL_version; 52 | 53 | /** 54 | * This macro can be used to fill a version structure with the compile-time 55 | * version of the SDL library. 56 | */ 57 | #define SDL_VERSION(X) \ 58 | { \ 59 | (X)->major = SDL_MAJOR_VERSION; \ 60 | (X)->minor = SDL_MINOR_VERSION; \ 61 | (X)->patch = SDL_PATCHLEVEL; \ 62 | } 63 | 64 | /** This macro turns the version numbers into a numeric value: 65 | * (1,2,3) -> (1203) 66 | * This assumes that there will never be more than 100 patchlevels 67 | */ 68 | #define SDL_VERSIONNUM(X, Y, Z) \ 69 | ((X)*1000 + (Y)*100 + (Z)) 70 | 71 | /** This is the version number macro for the current SDL version */ 72 | #define SDL_COMPILEDVERSION \ 73 | SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) 74 | 75 | /** This macro will evaluate to true if compiled with SDL at least X.Y.Z */ 76 | #define SDL_VERSION_ATLEAST(X, Y, Z) \ 77 | (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) 78 | 79 | /** This function gets the version of the dynamically linked SDL library. 80 | * it should NOT be used to fill a version structure, instead you should 81 | * use the SDL_Version() macro. 82 | */ 83 | extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void); 84 | 85 | /* Ends C function definitions when using C++ */ 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | #include "close_code.h" 90 | 91 | #endif /* _SDL_version_h */ 92 | -------------------------------------------------------------------------------- /linux/includes/SDL_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_version.h 24 | * This header defines the current SDL version 25 | */ 26 | 27 | #ifndef _SDL_version_h 28 | #define _SDL_version_h 29 | 30 | #include "SDL_stdinc.h" 31 | 32 | #include "begin_code.h" 33 | /* Set up for C function definitions, even when using C++ */ 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /** @name Version Number 39 | * Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL 40 | */ 41 | /*@{*/ 42 | #define SDL_MAJOR_VERSION 1 43 | #define SDL_MINOR_VERSION 2 44 | #define SDL_PATCHLEVEL 15 45 | /*@}*/ 46 | 47 | typedef struct SDL_version { 48 | Uint8 major; 49 | Uint8 minor; 50 | Uint8 patch; 51 | } SDL_version; 52 | 53 | /** 54 | * This macro can be used to fill a version structure with the compile-time 55 | * version of the SDL library. 56 | */ 57 | #define SDL_VERSION(X) \ 58 | { \ 59 | (X)->major = SDL_MAJOR_VERSION; \ 60 | (X)->minor = SDL_MINOR_VERSION; \ 61 | (X)->patch = SDL_PATCHLEVEL; \ 62 | } 63 | 64 | /** This macro turns the version numbers into a numeric value: 65 | * (1,2,3) -> (1203) 66 | * This assumes that there will never be more than 100 patchlevels 67 | */ 68 | #define SDL_VERSIONNUM(X, Y, Z) \ 69 | ((X)*1000 + (Y)*100 + (Z)) 70 | 71 | /** This is the version number macro for the current SDL version */ 72 | #define SDL_COMPILEDVERSION \ 73 | SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) 74 | 75 | /** This macro will evaluate to true if compiled with SDL at least X.Y.Z */ 76 | #define SDL_VERSION_ATLEAST(X, Y, Z) \ 77 | (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) 78 | 79 | /** This function gets the version of the dynamically linked SDL library. 80 | * it should NOT be used to fill a version structure, instead you should 81 | * use the SDL_Version() macro. 82 | */ 83 | extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void); 84 | 85 | /* Ends C function definitions when using C++ */ 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | #include "close_code.h" 90 | 91 | #endif /* _SDL_version_h */ 92 | -------------------------------------------------------------------------------- /libincludes/SDL_loadso.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_loadso.h 24 | * System dependent library loading routines 25 | */ 26 | 27 | /** @file SDL_loadso.h 28 | * Some things to keep in mind: 29 | * - These functions only work on C function names. Other languages may 30 | * have name mangling and intrinsic language support that varies from 31 | * compiler to compiler. 32 | * - Make sure you declare your function pointers with the same calling 33 | * convention as the actual library function. Your code will crash 34 | * mysteriously if you do not do this. 35 | * - Avoid namespace collisions. If you load a symbol from the library, 36 | * it is not defined whether or not it goes into the global symbol 37 | * namespace for the application. If it does and it conflicts with 38 | * symbols in your code or other shared libraries, you will not get 39 | * the results you expect. :) 40 | */ 41 | 42 | 43 | #ifndef _SDL_loadso_h 44 | #define _SDL_loadso_h 45 | 46 | #include "SDL_stdinc.h" 47 | #include "SDL_error.h" 48 | 49 | #include "begin_code.h" 50 | /* Set up for C function definitions, even when using C++ */ 51 | #ifdef __cplusplus 52 | extern "C" { 53 | #endif 54 | 55 | /** 56 | * This function dynamically loads a shared object and returns a pointer 57 | * to the object handle (or NULL if there was an error). 58 | * The 'sofile' parameter is a system dependent name of the object file. 59 | */ 60 | extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile); 61 | 62 | /** 63 | * Given an object handle, this function looks up the address of the 64 | * named function in the shared object and returns it. This address 65 | * is no longer valid after calling SDL_UnloadObject(). 66 | */ 67 | extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name); 68 | 69 | /** Unload a shared object from memory */ 70 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 71 | 72 | /* Ends C function definitions when using C++ */ 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | #include "close_code.h" 77 | 78 | #endif /* _SDL_loadso_h */ 79 | -------------------------------------------------------------------------------- /linux/includes/SDL_loadso.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_loadso.h 24 | * System dependent library loading routines 25 | */ 26 | 27 | /** @file SDL_loadso.h 28 | * Some things to keep in mind: 29 | * - These functions only work on C function names. Other languages may 30 | * have name mangling and intrinsic language support that varies from 31 | * compiler to compiler. 32 | * - Make sure you declare your function pointers with the same calling 33 | * convention as the actual library function. Your code will crash 34 | * mysteriously if you do not do this. 35 | * - Avoid namespace collisions. If you load a symbol from the library, 36 | * it is not defined whether or not it goes into the global symbol 37 | * namespace for the application. If it does and it conflicts with 38 | * symbols in your code or other shared libraries, you will not get 39 | * the results you expect. :) 40 | */ 41 | 42 | 43 | #ifndef _SDL_loadso_h 44 | #define _SDL_loadso_h 45 | 46 | #include "SDL_stdinc.h" 47 | #include "SDL_error.h" 48 | 49 | #include "begin_code.h" 50 | /* Set up for C function definitions, even when using C++ */ 51 | #ifdef __cplusplus 52 | extern "C" { 53 | #endif 54 | 55 | /** 56 | * This function dynamically loads a shared object and returns a pointer 57 | * to the object handle (or NULL if there was an error). 58 | * The 'sofile' parameter is a system dependent name of the object file. 59 | */ 60 | extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile); 61 | 62 | /** 63 | * Given an object handle, this function looks up the address of the 64 | * named function in the shared object and returns it. This address 65 | * is no longer valid after calling SDL_UnloadObject(). 66 | */ 67 | extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name); 68 | 69 | /** Unload a shared object from memory */ 70 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 71 | 72 | /* Ends C function definitions when using C++ */ 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | #include "close_code.h" 77 | 78 | #endif /* _SDL_loadso_h */ 79 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL_loadso.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_loadso.h 24 | * System dependent library loading routines 25 | */ 26 | 27 | /** @file SDL_loadso.h 28 | * Some things to keep in mind: 29 | * - These functions only work on C function names. Other languages may 30 | * have name mangling and intrinsic language support that varies from 31 | * compiler to compiler. 32 | * - Make sure you declare your function pointers with the same calling 33 | * convention as the actual library function. Your code will crash 34 | * mysteriously if you do not do this. 35 | * - Avoid namespace collisions. If you load a symbol from the library, 36 | * it is not defined whether or not it goes into the global symbol 37 | * namespace for the application. If it does and it conflicts with 38 | * symbols in your code or other shared libraries, you will not get 39 | * the results you expect. :) 40 | */ 41 | 42 | 43 | #ifndef _SDL_loadso_h 44 | #define _SDL_loadso_h 45 | 46 | #include "SDL_stdinc.h" 47 | #include "SDL_error.h" 48 | 49 | #include "begin_code.h" 50 | /* Set up for C function definitions, even when using C++ */ 51 | #ifdef __cplusplus 52 | extern "C" { 53 | #endif 54 | 55 | /** 56 | * This function dynamically loads a shared object and returns a pointer 57 | * to the object handle (or NULL if there was an error). 58 | * The 'sofile' parameter is a system dependent name of the object file. 59 | */ 60 | extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile); 61 | 62 | /** 63 | * Given an object handle, this function looks up the address of the 64 | * named function in the shared object and returns it. This address 65 | * is no longer valid after calling SDL_UnloadObject(). 66 | */ 67 | extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name); 68 | 69 | /** Unload a shared object from memory */ 70 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 71 | 72 | /* Ends C function definitions when using C++ */ 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | #include "close_code.h" 77 | 78 | #endif /* _SDL_loadso_h */ 79 | -------------------------------------------------------------------------------- /sfx/minifmod/soundSystem.h: -------------------------------------------------------------------------------- 1 | #ifndef _NO_MINIFMOD 2 | 3 | #include "minifmod/Sound.h" 4 | #include "minifmod/Music.h" 5 | #include "minifmod/minifmod.h" 6 | 7 | #include "minifmod/Mixer.h" 8 | #include "minifmod/mixer_clipcopy.h" 9 | #include "minifmod/mixer_fpu_ramp.h" 10 | #include "minifmod/music_formatxm.h" 11 | #endif 12 | 13 | #include "fmod.h" 14 | #include "../../defs.h" 15 | 16 | #ifndef _NO_MINIFMOD 17 | char FMUSIC_StopSong_43D8E0(FMUSIC_MODULE* mod); 18 | char FMUSIC_FreeSong_43D940(FMUSIC_MODULE *mod); 19 | char FMUSIC_PlaySong_43DA40(FMUSIC_MODULE* musicModuleModified_456C24); 20 | FMUSIC_MODULE * FMUSIC_LoadSong_43DC50(int size, char *data, SAMPLELOADCALLBACK sampleloadcallback); 21 | int FSOUND_Software_Fill_43DCB0(signed int a1, int a2); 22 | int FSOUND_MixerClipCopy_Float32_43DE30(void *dest, void *src, long len); 23 | //int __usercall FSOUND_Mixer_FPU_Ramp_43DEA0_43DEA0@(int a1@); 24 | char FMUSIC_XM_InstrumentVibrato_43E550(FMUSIC_CHANNEL *cptr, FMUSIC_INSTRUMENT *iptr); 25 | char FMUSIC_XM_ProcessEnvelope_43E670(FMUSIC_CHANNEL *cptr, int *pos, int *tick, unsigned char type, int numpoints, unsigned short *points, unsigned char loopend, unsigned char loopstart, unsigned char sustain, int *value, int *valfrac, signed char *envstopped, int *envdelta, unsigned char control); 26 | char FMUSIC_XM_ProcessVolumeByte_43E7A0(FMUSIC_CHANNEL *cptr, unsigned char volume); 27 | int FMUSIC_XM_UpdateFlags_43E8C0(FMUSIC_CHANNEL *cptr, FSOUND_SAMPLE *sptr, FMUSIC_MODULE *mod); 28 | int FMUSIC_XM_Resetcptr_43EB10(FMUSIC_CHANNEL *cptr, FSOUND_SAMPLE *sptr); 29 | char sub_43EBB0(int channelId, unsigned __int8 a2); 30 | unsigned __int64 sub_43EBD0(int channelId, signed int a2); 31 | int FMUSIC_UpdateXMNote_43EC40(FMUSIC_MODULE *mod, int channelId, unsigned __int8 soundId, int a4, char volume); 32 | int FMUSIC_UpdateXM_Effects_43EDC0(int a1); 33 | int FMUSIC_UpdateXM_43EF50(FMUSIC_MODULE *mod); // weak 34 | char FMUSIC_LoadXM_43EF60(FMUSIC_MODULE *mod, FSOUND_FILE_HANDLE *fp); 35 | 36 | int ( * FSOUND_File_SetCallbacks_43F6B0(int ( *a1)(_DWORD), int ( *a2)(_DWORD), int ( *a3)(_DWORD, _DWORD, _DWORD), int ( *a4)(_DWORD), int ( *a5)(_DWORD)))(_DWORD); 37 | FSOUND_FILE_HANDLE * FSOUND_File_Open_43F720(int size, void *data, signed char type, int length); 38 | void FSOUND_File_Close_43F770(FSOUND_FILE_HANDLE *handle); 39 | int FSOUND_File_Read_43F790(void *buffer, int size, FSOUND_FILE_HANDLE *handle); 40 | int FSOUND_File_Seek_43F7B0(int a1); 41 | int FSOUND_File_Tell_43F7D0(FSOUND_FILE_HANDLE *handle); 42 | 43 | void * FSOUND_File_OpenCallback_43AD80(int size,char *name); 44 | void FSOUND_File_CloseCallback_43ADD0(unsigned int handle); 45 | int FSOUND_File_ReadCallback_43ADF0(void *buffer, int size, unsigned int handle); 46 | int FSOUND_File_SeekCallback_43AE30(unsigned int handle, int pos, signed char mode); 47 | int FSOUND_File_TellCallback_43AE70(unsigned int handle); 48 | 49 | typedef struct struct_userhandle 50 | { 51 | int size; 52 | int pos; 53 | char* data; 54 | 55 | } struct_userhandle; 56 | #endif -------------------------------------------------------------------------------- /tools/bkpdecryptor.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import struct 5 | from collections import OrderedDict 6 | from binascii import hexlify 7 | 8 | GIF_HEADER_SIZE =13 9 | PALETTE_SIZE =768 10 | BPK_FILE_NAME = "FACE01.BPK" 11 | 12 | BPK_W = 64 13 | BPK_H = 64 14 | PAL_FILE_NAME = "MENU.PAL" 15 | 16 | 17 | 18 | 19 | def byte(number, i): 20 | return (number & (0xff << (i * 8))) >> (i * 8) 21 | 22 | 23 | 24 | 25 | print("CREATING: {0}".format(BPK_FILE_NAME+".gif")) 26 | 27 | 28 | f = open(BPK_FILE_NAME+".gif", "wb") 29 | 30 | 31 | try: 32 | f.write("GIF89a") 33 | f.write(chr(BPK_W)) 34 | f.write(chr(0)) 35 | f.write(chr(BPK_H)) 36 | f.write(chr(0)) 37 | 38 | """ 39 | = Global Color Table Flag 1 Bit 1 40 | Color Resolution 3 Bits 111 41 | Sort Flag 1 Bit 0 42 | Size of Global Color Table 3 Bits 111 43 | """ 44 | f.write(chr(int("F7", 16))) 45 | 46 | """ background color index""" 47 | f.write(chr(0)) 48 | 49 | """ pixel aspect ratio""" 50 | f.write(chr(0)) 51 | 52 | 53 | fpalette = open(PAL_FILE_NAME, "rb") 54 | 55 | """ modify the palette 56 | data = fpalette.read(paletteSize) 57 | f.write(data) 58 | """ 59 | for x in range(0,PALETTE_SIZE,3): 60 | fpalette.seek(x) 61 | data = fpalette.read(3) 62 | data = hexlify(data) 63 | data=int(data,16) 64 | 65 | f.seek(GIF_HEADER_SIZE+x) 66 | f.write(chr(byte(data,0))) 67 | f.write(chr(byte(data,1))) 68 | f.write(chr(byte(data,2))) 69 | 70 | 71 | 72 | fbpk = open(BPK_FILE_NAME, "rb") 73 | 74 | fbpk.seek(0, os.SEEK_END) 75 | size = fbpk.tell() 76 | fbpk.seek(0) 77 | 78 | 79 | """ bloque a fuego """ 80 | f.write(chr(int("21", 16))) 81 | f.write(chr(int("f9", 16))) 82 | f.write(chr(int("04", 16))) 83 | f.write(chr(int("01", 16))) 84 | f.write(chr(int("00", 16))) 85 | f.write(chr(int("00", 16))) 86 | f.write(chr(int("fc", 16))) 87 | f.write(chr(int("00", 16))) 88 | 89 | """ image descriptor """ 90 | f.write(chr(int("2c", 16))) 91 | f.write(chr(int("00", 16))) 92 | f.write(chr(int("00", 16))) 93 | f.write(chr(int("00", 16))) 94 | f.write(chr(int("00", 16))) 95 | f.write(chr(64)) 96 | f.write(chr(int("00", 16))) 97 | f.write(chr(64)) 98 | f.write(chr(int("00", 16))) 99 | f.write(chr(int("00", 16))) 100 | 101 | 102 | f.write(chr(int("08", 16))) 103 | f.write(chr(int("ff", 16))) 104 | bpkpos=0 105 | while 1: 106 | 107 | bpkData = fbpk.read(255) 108 | f.write(bpkData) 109 | bpkpos=bpkpos+255 110 | if bpkpos>=size: 111 | break 112 | f.write(chr(int("ff", 16))) 113 | 114 | 115 | if size+255-bpkpos>0: 116 | 117 | f.write(chr(size+255-bpkpos)) 118 | bpkData = fbpk.read(size+255-bpkpos) 119 | f.write(bpkData) 120 | 121 | 122 | 123 | 124 | f.write(chr(int("00", 16))) 125 | f.write(chr(int("3b", 16))) 126 | finally: 127 | f.close() -------------------------------------------------------------------------------- /libincludes/SDL_platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_platform.h 24 | * Try to get a standard set of platform defines 25 | */ 26 | 27 | #ifndef _SDL_platform_h 28 | #define _SDL_platform_h 29 | 30 | #if defined(_AIX) 31 | #undef __AIX__ 32 | #define __AIX__ 1 33 | #endif 34 | #if defined(__BEOS__) 35 | #undef __BEOS__ 36 | #define __BEOS__ 1 37 | #endif 38 | #if defined(__HAIKU__) 39 | #undef __HAIKU__ 40 | #define __HAIKU__ 1 41 | #endif 42 | #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__) 43 | #undef __BSDI__ 44 | #define __BSDI__ 1 45 | #endif 46 | #if defined(_arch_dreamcast) 47 | #undef __DREAMCAST__ 48 | #define __DREAMCAST__ 1 49 | #endif 50 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) 51 | #undef __FREEBSD__ 52 | #define __FREEBSD__ 1 53 | #endif 54 | #if defined(__HAIKU__) 55 | #undef __HAIKU__ 56 | #define __HAIKU__ 1 57 | #endif 58 | #if defined(hpux) || defined(__hpux) || defined(__hpux__) 59 | #undef __HPUX__ 60 | #define __HPUX__ 1 61 | #endif 62 | #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE) 63 | #undef __IRIX__ 64 | #define __IRIX__ 1 65 | #endif 66 | #if defined(linux) || defined(__linux) || defined(__linux__) 67 | #undef __LINUX__ 68 | #define __LINUX__ 1 69 | #endif 70 | #if defined(__APPLE__) 71 | #undef __MACOSX__ 72 | #define __MACOSX__ 1 73 | #elif defined(macintosh) 74 | #undef __MACOS__ 75 | #define __MACOS__ 1 76 | #endif 77 | #if defined(__NetBSD__) 78 | #undef __NETBSD__ 79 | #define __NETBSD__ 1 80 | #endif 81 | #if defined(__OpenBSD__) 82 | #undef __OPENBSD__ 83 | #define __OPENBSD__ 1 84 | #endif 85 | #if defined(__OS2__) 86 | #undef __OS2__ 87 | #define __OS2__ 1 88 | #endif 89 | #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE) 90 | #undef __OSF__ 91 | #define __OSF__ 1 92 | #endif 93 | #if defined(__QNXNTO__) 94 | #undef __QNXNTO__ 95 | #define __QNXNTO__ 1 96 | #endif 97 | #if defined(riscos) || defined(__riscos) || defined(__riscos__) 98 | #undef __RISCOS__ 99 | #define __RISCOS__ 1 100 | #endif 101 | #if defined(__SVR4) 102 | #undef __SOLARIS__ 103 | #define __SOLARIS__ 1 104 | #endif 105 | #if defined(WIN32) || defined(_WIN32) 106 | #undef __WIN32__ 107 | #define __WIN32__ 1 108 | #endif 109 | 110 | #endif /* _SDL_platform_h */ 111 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL_platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_platform.h 24 | * Try to get a standard set of platform defines 25 | */ 26 | 27 | #ifndef _SDL_platform_h 28 | #define _SDL_platform_h 29 | 30 | #if defined(_AIX) 31 | #undef __AIX__ 32 | #define __AIX__ 1 33 | #endif 34 | #if defined(__BEOS__) 35 | #undef __BEOS__ 36 | #define __BEOS__ 1 37 | #endif 38 | #if defined(__HAIKU__) 39 | #undef __HAIKU__ 40 | #define __HAIKU__ 1 41 | #endif 42 | #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__) 43 | #undef __BSDI__ 44 | #define __BSDI__ 1 45 | #endif 46 | #if defined(_arch_dreamcast) 47 | #undef __DREAMCAST__ 48 | #define __DREAMCAST__ 1 49 | #endif 50 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) 51 | #undef __FREEBSD__ 52 | #define __FREEBSD__ 1 53 | #endif 54 | #if defined(__HAIKU__) 55 | #undef __HAIKU__ 56 | #define __HAIKU__ 1 57 | #endif 58 | #if defined(hpux) || defined(__hpux) || defined(__hpux__) 59 | #undef __HPUX__ 60 | #define __HPUX__ 1 61 | #endif 62 | #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE) 63 | #undef __IRIX__ 64 | #define __IRIX__ 1 65 | #endif 66 | #if defined(linux) || defined(__linux) || defined(__linux__) 67 | #undef __LINUX__ 68 | #define __LINUX__ 1 69 | #endif 70 | #if defined(__APPLE__) 71 | #undef __MACOSX__ 72 | #define __MACOSX__ 1 73 | #elif defined(macintosh) 74 | #undef __MACOS__ 75 | #define __MACOS__ 1 76 | #endif 77 | #if defined(__NetBSD__) 78 | #undef __NETBSD__ 79 | #define __NETBSD__ 1 80 | #endif 81 | #if defined(__OpenBSD__) 82 | #undef __OPENBSD__ 83 | #define __OPENBSD__ 1 84 | #endif 85 | #if defined(__OS2__) 86 | #undef __OS2__ 87 | #define __OS2__ 1 88 | #endif 89 | #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE) 90 | #undef __OSF__ 91 | #define __OSF__ 1 92 | #endif 93 | #if defined(__QNXNTO__) 94 | #undef __QNXNTO__ 95 | #define __QNXNTO__ 1 96 | #endif 97 | #if defined(riscos) || defined(__riscos) || defined(__riscos__) 98 | #undef __RISCOS__ 99 | #define __RISCOS__ 1 100 | #endif 101 | #if defined(__SVR4) 102 | #undef __SOLARIS__ 103 | #define __SOLARIS__ 1 104 | #endif 105 | #if defined(WIN32) || defined(_WIN32) 106 | #undef __WIN32__ 107 | #define __WIN32__ 1 108 | #endif 109 | 110 | #endif /* _SDL_platform_h */ 111 | -------------------------------------------------------------------------------- /linux/includes/SDL_platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL_platform.h 24 | * Try to get a standard set of platform defines 25 | */ 26 | 27 | #ifndef _SDL_platform_h 28 | #define _SDL_platform_h 29 | 30 | #if defined(_AIX) 31 | #undef __AIX__ 32 | #define __AIX__ 1 33 | #endif 34 | #if defined(__BEOS__) 35 | #undef __BEOS__ 36 | #define __BEOS__ 1 37 | #endif 38 | #if defined(__HAIKU__) 39 | #undef __HAIKU__ 40 | #define __HAIKU__ 1 41 | #endif 42 | #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__) 43 | #undef __BSDI__ 44 | #define __BSDI__ 1 45 | #endif 46 | #if defined(_arch_dreamcast) 47 | #undef __DREAMCAST__ 48 | #define __DREAMCAST__ 1 49 | #endif 50 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) 51 | #undef __FREEBSD__ 52 | #define __FREEBSD__ 1 53 | #endif 54 | #if defined(__HAIKU__) 55 | #undef __HAIKU__ 56 | #define __HAIKU__ 1 57 | #endif 58 | #if defined(hpux) || defined(__hpux) || defined(__hpux__) 59 | #undef __HPUX__ 60 | #define __HPUX__ 1 61 | #endif 62 | #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE) 63 | #undef __IRIX__ 64 | #define __IRIX__ 1 65 | #endif 66 | #if defined(linux) || defined(__linux) || defined(__linux__) 67 | #undef __LINUX__ 68 | #define __LINUX__ 1 69 | #endif 70 | #if defined(__APPLE__) 71 | #undef __MACOSX__ 72 | #define __MACOSX__ 1 73 | #elif defined(macintosh) 74 | #undef __MACOS__ 75 | #define __MACOS__ 1 76 | #endif 77 | #if defined(__NetBSD__) 78 | #undef __NETBSD__ 79 | #define __NETBSD__ 1 80 | #endif 81 | #if defined(__OpenBSD__) 82 | #undef __OPENBSD__ 83 | #define __OPENBSD__ 1 84 | #endif 85 | #if defined(__OS2__) 86 | #undef __OS2__ 87 | #define __OS2__ 1 88 | #endif 89 | #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE) 90 | #undef __OSF__ 91 | #define __OSF__ 1 92 | #endif 93 | #if defined(__QNXNTO__) 94 | #undef __QNXNTO__ 95 | #define __QNXNTO__ 1 96 | #endif 97 | #if defined(riscos) || defined(__riscos) || defined(__riscos__) 98 | #undef __RISCOS__ 99 | #define __RISCOS__ 1 100 | #endif 101 | #if defined(__SVR4) 102 | #undef __SOLARIS__ 103 | #define __SOLARIS__ 1 104 | #endif 105 | #if defined(WIN32) || defined(_WIN32) 106 | #undef __WIN32__ 107 | #define __WIN32__ 1 108 | #endif 109 | 110 | #endif /* _SDL_platform_h */ 111 | -------------------------------------------------------------------------------- /libincludes/SDL_config_dreamcast.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_config_dreamcast_h 24 | #define _SDL_config_dreamcast_h 25 | 26 | #include "SDL_platform.h" 27 | 28 | /* This is a set of defines to configure the SDL features */ 29 | 30 | typedef signed char int8_t; 31 | typedef unsigned char uint8_t; 32 | typedef signed short int16_t; 33 | typedef unsigned short uint16_t; 34 | typedef signed int int32_t; 35 | typedef unsigned int uint32_t; 36 | typedef signed long long int64_t; 37 | typedef unsigned long long uint64_t; 38 | typedef unsigned long uintptr_t; 39 | #define SDL_HAS_64BIT_TYPE 1 40 | 41 | /* Useful headers */ 42 | #define HAVE_SYS_TYPES_H 1 43 | #define HAVE_STDIO_H 1 44 | #define STDC_HEADERS 1 45 | #define HAVE_STRING_H 1 46 | #define HAVE_CTYPE_H 1 47 | 48 | /* C library functions */ 49 | #define HAVE_MALLOC 1 50 | #define HAVE_CALLOC 1 51 | #define HAVE_REALLOC 1 52 | #define HAVE_FREE 1 53 | #define HAVE_ALLOCA 1 54 | #define HAVE_GETENV 1 55 | #define HAVE_PUTENV 1 56 | #define HAVE_QSORT 1 57 | #define HAVE_ABS 1 58 | #define HAVE_BCOPY 1 59 | #define HAVE_MEMSET 1 60 | #define HAVE_MEMCPY 1 61 | #define HAVE_MEMMOVE 1 62 | #define HAVE_MEMCMP 1 63 | #define HAVE_STRLEN 1 64 | #define HAVE_STRDUP 1 65 | #define HAVE_INDEX 1 66 | #define HAVE_RINDEX 1 67 | #define HAVE_STRCHR 1 68 | #define HAVE_STRRCHR 1 69 | #define HAVE_STRSTR 1 70 | #define HAVE_STRTOL 1 71 | #define HAVE_STRTOD 1 72 | #define HAVE_ATOI 1 73 | #define HAVE_ATOF 1 74 | #define HAVE_STRCMP 1 75 | #define HAVE_STRNCMP 1 76 | #define HAVE_STRICMP 1 77 | #define HAVE_STRCASECMP 1 78 | #define HAVE_SSCANF 1 79 | #define HAVE_SNPRINTF 1 80 | #define HAVE_VSNPRINTF 1 81 | 82 | /* Enable various audio drivers */ 83 | #define SDL_AUDIO_DRIVER_DC 1 84 | #define SDL_AUDIO_DRIVER_DISK 1 85 | #define SDL_AUDIO_DRIVER_DUMMY 1 86 | 87 | /* Enable various cdrom drivers */ 88 | #define SDL_CDROM_DC 1 89 | 90 | /* Enable various input drivers */ 91 | #define SDL_JOYSTICK_DC 1 92 | 93 | /* Enable various shared object loading systems */ 94 | #define SDL_LOADSO_DUMMY 1 95 | 96 | /* Enable various threading systems */ 97 | #define SDL_THREAD_DC 1 98 | 99 | /* Enable various timer systems */ 100 | #define SDL_TIMER_DC 1 101 | 102 | /* Enable various video drivers */ 103 | #define SDL_VIDEO_DRIVER_DC 1 104 | #define SDL_VIDEO_DRIVER_DUMMY 1 105 | 106 | #endif /* _SDL_config_dreamcast_h */ 107 | -------------------------------------------------------------------------------- /libincludes/SDL_config_macos.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_config_macos_h 24 | #define _SDL_config_macos_h 25 | 26 | #include "SDL_platform.h" 27 | 28 | /* This is a set of defines to configure the SDL features */ 29 | 30 | #include 31 | 32 | typedef SInt8 int8_t; 33 | typedef UInt8 uint8_t; 34 | typedef SInt16 int16_t; 35 | typedef UInt16 uint16_t; 36 | typedef SInt32 int32_t; 37 | typedef UInt32 uint32_t; 38 | typedef SInt64 int64_t; 39 | typedef UInt64 uint64_t; 40 | typedef unsigned long uintptr_t; 41 | 42 | #define SDL_HAS_64BIT_TYPE 1 43 | 44 | /* Useful headers */ 45 | #define HAVE_STDIO_H 1 46 | #define STDC_HEADERS 1 47 | #define HAVE_STRING_H 1 48 | #define HAVE_CTYPE_H 1 49 | #define HAVE_MATH_H 1 50 | #define HAVE_SIGNAL_H 1 51 | 52 | /* C library functions */ 53 | #define HAVE_MALLOC 1 54 | #define HAVE_CALLOC 1 55 | #define HAVE_REALLOC 1 56 | #define HAVE_FREE 1 57 | #define HAVE_ALLOCA 1 58 | #define HAVE_ABS 1 59 | #define HAVE_MEMSET 1 60 | #define HAVE_MEMCPY 1 61 | #define HAVE_MEMMOVE 1 62 | #define HAVE_MEMCMP 1 63 | #define HAVE_STRLEN 1 64 | #define HAVE_STRCHR 1 65 | #define HAVE_STRRCHR 1 66 | #define HAVE_STRSTR 1 67 | #define HAVE_ITOA 1 68 | #define HAVE_STRTOL 1 69 | #define HAVE_STRTOD 1 70 | #define HAVE_ATOI 1 71 | #define HAVE_ATOF 1 72 | #define HAVE_STRCMP 1 73 | #define HAVE_STRNCMP 1 74 | #define HAVE_SSCANF 1 75 | 76 | /* Enable various audio drivers */ 77 | #define SDL_AUDIO_DRIVER_SNDMGR 1 78 | #define SDL_AUDIO_DRIVER_DISK 1 79 | #define SDL_AUDIO_DRIVER_DUMMY 1 80 | 81 | /* Enable various cdrom drivers */ 82 | #if TARGET_API_MAC_CARBON 83 | #define SDL_CDROM_DUMMY 1 84 | #else 85 | #define SDL_CDROM_MACOS 1 86 | #endif 87 | 88 | /* Enable various input drivers */ 89 | #if TARGET_API_MAC_CARBON 90 | #define SDL_JOYSTICK_DUMMY 1 91 | #else 92 | #define SDL_JOYSTICK_MACOS 1 93 | #endif 94 | 95 | /* Enable various shared object loading systems */ 96 | #define SDL_LOADSO_MACOS 1 97 | 98 | /* Enable various threading systems */ 99 | #define SDL_THREADS_DISABLED 1 100 | 101 | /* Enable various timer systems */ 102 | #define SDL_TIMER_MACOS 1 103 | 104 | /* Enable various video drivers */ 105 | #define SDL_VIDEO_DRIVER_DUMMY 1 106 | #define SDL_VIDEO_DRIVER_DRAWSPROCKET 1 107 | #define SDL_VIDEO_DRIVER_TOOLBOX 1 108 | 109 | /* Enable OpenGL support */ 110 | #define SDL_VIDEO_OPENGL 1 111 | 112 | #endif /* _SDL_config_macos_h */ 113 | -------------------------------------------------------------------------------- /libincludes/SDL_main.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_main_h 24 | #define _SDL_main_h 25 | 26 | #include "SDL_stdinc.h" 27 | 28 | /** @file SDL_main.h 29 | * Redefine main() on Win32 and MacOS so that it is called by winmain.c 30 | */ 31 | 32 | #if defined(__WIN32__) || \ 33 | (defined(__MWERKS__) && !defined(__BEOS__)) || \ 34 | defined(__MACOS__) || defined(__MACOSX__) || \ 35 | defined(__SYMBIAN32__) || defined(QWS) 36 | 37 | #ifdef __cplusplus 38 | #define C_LINKAGE "C" 39 | #else 40 | #define C_LINKAGE 41 | #endif /* __cplusplus */ 42 | 43 | /** The application's main() function must be called with C linkage, 44 | * and should be declared like this: 45 | * @code 46 | * #ifdef __cplusplus 47 | * extern "C" 48 | * #endif 49 | * int main(int argc, char *argv[]) 50 | * { 51 | * } 52 | * @endcode 53 | */ 54 | 55 | 56 | /** The prototype for the application's main() function */ 57 | extern C_LINKAGE int SDL_main(int argc, char *argv[]); 58 | 59 | 60 | /** @name From the SDL library code -- needed for registering the app on Win32 */ 61 | /*@{*/ 62 | #ifdef __WIN32__ 63 | 64 | #include "begin_code.h" 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /** This should be called from your WinMain() function, if any */ 70 | extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst); 71 | /** This can also be called, but is no longer necessary */ 72 | extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst); 73 | /** This can also be called, but is no longer necessary (SDL_Quit calls it) */ 74 | extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); 75 | #ifdef __cplusplus 76 | } 77 | #endif 78 | #include "close_code.h" 79 | #endif 80 | /*@}*/ 81 | 82 | /** @name From the SDL library code -- needed for registering QuickDraw on MacOS */ 83 | /*@{*/ 84 | #if defined(__MACOS__) 85 | 86 | #include "begin_code.h" 87 | #ifdef __cplusplus 88 | extern "C" { 89 | #endif 90 | 91 | /** Forward declaration so we don't need to include QuickDraw.h */ 92 | struct QDGlobals; 93 | 94 | /** This should be called from your main() function, if any */ 95 | extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | #include "close_code.h" 101 | #endif 102 | /*@}*/ 103 | 104 | #endif /* Need to redefine main()? */ 105 | 106 | #endif /* _SDL_main_h */ 107 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL_main.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_main_h 24 | #define _SDL_main_h 25 | 26 | #include "SDL_stdinc.h" 27 | 28 | /** @file SDL_main.h 29 | * Redefine main() on Win32 and MacOS so that it is called by winmain.c 30 | */ 31 | 32 | #if defined(__WIN32__) || \ 33 | (defined(__MWERKS__) && !defined(__BEOS__)) || \ 34 | defined(__MACOS__) || defined(__MACOSX__) || \ 35 | defined(__SYMBIAN32__) || defined(QWS) 36 | 37 | #ifdef __cplusplus 38 | #define C_LINKAGE "C" 39 | #else 40 | #define C_LINKAGE 41 | #endif /* __cplusplus */ 42 | 43 | /** The application's main() function must be called with C linkage, 44 | * and should be declared like this: 45 | * @code 46 | * #ifdef __cplusplus 47 | * extern "C" 48 | * #endif 49 | * int main(int argc, char *argv[]) 50 | * { 51 | * } 52 | * @endcode 53 | */ 54 | #define main SDL_main 55 | 56 | /** The prototype for the application's main() function */ 57 | extern C_LINKAGE int SDL_main(int argc, char *argv[]); 58 | 59 | 60 | /** @name From the SDL library code -- needed for registering the app on Win32 */ 61 | /*@{*/ 62 | #ifdef __WIN32__ 63 | 64 | #include "begin_code.h" 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /** This should be called from your WinMain() function, if any */ 70 | extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst); 71 | /** This can also be called, but is no longer necessary */ 72 | extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst); 73 | /** This can also be called, but is no longer necessary (SDL_Quit calls it) */ 74 | extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); 75 | #ifdef __cplusplus 76 | } 77 | #endif 78 | #include "close_code.h" 79 | #endif 80 | /*@}*/ 81 | 82 | /** @name From the SDL library code -- needed for registering QuickDraw on MacOS */ 83 | /*@{*/ 84 | #if defined(__MACOS__) 85 | 86 | #include "begin_code.h" 87 | #ifdef __cplusplus 88 | extern "C" { 89 | #endif 90 | 91 | /** Forward declaration so we don't need to include QuickDraw.h */ 92 | struct QDGlobals; 93 | 94 | /** This should be called from your main() function, if any */ 95 | extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | #include "close_code.h" 101 | #endif 102 | /*@}*/ 103 | 104 | #endif /* Need to redefine main()? */ 105 | 106 | #endif /* _SDL_main_h */ 107 | -------------------------------------------------------------------------------- /linux/includes/SDL_main.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_main_h 24 | #define _SDL_main_h 25 | 26 | #include "SDL_stdinc.h" 27 | 28 | /** @file SDL_main.h 29 | * Redefine main() on Win32 and MacOS so that it is called by winmain.c 30 | */ 31 | 32 | #if defined(__WIN32__) || \ 33 | (defined(__MWERKS__) && !defined(__BEOS__)) || \ 34 | defined(__MACOS__) || defined(__MACOSX__) || \ 35 | defined(__SYMBIAN32__) || defined(QWS) 36 | 37 | #ifdef __cplusplus 38 | #define C_LINKAGE "C" 39 | #else 40 | #define C_LINKAGE 41 | #endif /* __cplusplus */ 42 | 43 | /** The application's main() function must be called with C linkage, 44 | * and should be declared like this: 45 | * @code 46 | * #ifdef __cplusplus 47 | * extern "C" 48 | * #endif 49 | * int main(int argc, char *argv[]) 50 | * { 51 | * } 52 | * @endcode 53 | */ 54 | #define main SDL_main 55 | 56 | /** The prototype for the application's main() function */ 57 | extern C_LINKAGE int SDL_main(int argc, char *argv[]); 58 | 59 | 60 | /** @name From the SDL library code -- needed for registering the app on Win32 */ 61 | /*@{*/ 62 | #ifdef __WIN32__ 63 | 64 | #include "begin_code.h" 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /** This should be called from your WinMain() function, if any */ 70 | extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst); 71 | /** This can also be called, but is no longer necessary */ 72 | extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst); 73 | /** This can also be called, but is no longer necessary (SDL_Quit calls it) */ 74 | extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); 75 | #ifdef __cplusplus 76 | } 77 | #endif 78 | #include "close_code.h" 79 | #endif 80 | /*@}*/ 81 | 82 | /** @name From the SDL library code -- needed for registering QuickDraw on MacOS */ 83 | /*@{*/ 84 | #if defined(__MACOS__) 85 | 86 | #include "begin_code.h" 87 | #ifdef __cplusplus 88 | extern "C" { 89 | #endif 90 | 91 | /** Forward declaration so we don't need to include QuickDraw.h */ 92 | struct QDGlobals; 93 | 94 | /** This should be called from your main() function, if any */ 95 | extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | #include "close_code.h" 101 | #endif 102 | /*@}*/ 103 | 104 | #endif /* Need to redefine main()? */ 105 | 106 | #endif /* _SDL_main_h */ 107 | -------------------------------------------------------------------------------- /Makefile.test: -------------------------------------------------------------------------------- 1 | # Project: DrWin 2 | # Makefile created by Dev-C++ 5.11 3 | 4 | CPP = g++ -D__DEBUG__ 5 | CC = gcc 6 | WINDRES = windres.exe 7 | OBJ = anim.o blackMarket.o bpaUtil.o cars.o circuit.o config.o dr.o drivers.o graphics.o hallOfFame.o imageUtil.o licenseScreen.o menus.o pedestrian.o popup.o raceParticipant.o raceResults.o savegame.o util.o 3dsystem.o powerup.o mod.o i18n.o hash.o 8 | LINKOBJ = anim.o blackMarket.o bpaUtil.o cars.o circuit.o config.o dr.o drivers.o graphics.o hallOfFame.o imageUtil.o licenseScreen.o menus.o pedestrian.o popup.o raceParticipant.o raceResults.o savegame.o util.o 3dsystem.o powerup.o mod.o i18n.o hash.o 9 | 10 | LIBS = -lopengl32 -lglu32 -lmingw32 MINGW32/libs/libSDL.dll.a MINGW32/libs/libSDLmain.a MINGW32/libs/fmodvc.lib -static-libstdc++ -static-libgcc -g3 11 | INCS = -I"/usr/include/x86_64-linux-gnu" -I"/usr/include/" -I"./MINGW32/includes" -I"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32/include" -I"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32/i686-w64-mingw32/include" -I"C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32/include" 12 | BIN = dreerally.exe 13 | CFLAGS = $(INCS) -g3 -D_WINDOWS_TYPES1 -D__WIN32__ -D_NO_MINIFMOD -D_SDL_main_h -DSDL_main_h_ -w 14 | RM = del 15 | 16 | 17 | .PHONY: all all-before all-after clean clean-custom 18 | 19 | all: all-before $(BIN) all-after 20 | 21 | clean: clean-custom 22 | ${RM} $(OBJ) 23 | 24 | $(BIN): $(OBJ) 25 | $(CC) $(LINKOBJ) -o $(BIN) $(LIBS) 26 | 27 | anim.o: anim.c 28 | $(CC) -c anim.c -o anim.o $(CFLAGS) 29 | 30 | blackMarket.o: blackmarket/blackMarket.c 31 | $(CC) -c blackmarket/blackMarket.c -o blackMarket.o $(CFLAGS) 32 | 33 | bpaUtil.o: bpa/bpaUtil.c 34 | $(CC) -c bpa/bpaUtil.c -o bpaUtil.o $(CFLAGS) 35 | 36 | cars.o: cars.c 37 | $(CC) -c cars.c -o cars.o $(CFLAGS) 38 | 39 | circuit.o: circuit.c 40 | $(CC) -c circuit.c -o circuit.o $(CFLAGS) 41 | 42 | config.o: config.c 43 | $(CC) -c config.c -o config.o $(CFLAGS) 44 | 45 | 46 | drivers.o: drivers.c 47 | $(CC) -c drivers.c -o drivers.o $(CFLAGS) 48 | 49 | graphics.o: graphics.c 50 | $(CC) -c graphics.c -o graphics.o $(CFLAGS) 51 | 52 | hallOfFame.o: hof/hallOfFame.c 53 | $(CC) -c hof/hallOfFame.c -o hallOfFame.o $(CFLAGS) 54 | 55 | imageUtil.o: imageUtil.c 56 | $(CC) -c imageUtil.c -o imageUtil.o $(CFLAGS) 57 | 58 | licenseScreen.o: license/licenseScreen.c 59 | $(CC) -c license/licenseScreen.c -o licenseScreen.o $(CFLAGS) 60 | 61 | menus.o: menus.c 62 | $(CC) -c menus.c -o menus.o $(CFLAGS) 63 | 64 | pedestrian.o: race/pedestrian.c 65 | $(CC) -c race/pedestrian.c -o pedestrian.o $(CFLAGS) 66 | 67 | popup.o: popup/popup.c 68 | $(CC) -c popup/popup.c -o popup.o $(CFLAGS) 69 | 70 | raceParticipant.o: raceParticipant.c 71 | $(CC) -c raceParticipant.c -o raceParticipant.o $(CFLAGS) 72 | 73 | raceResults.o: raceResults.c 74 | $(CC) -c raceResults.c -o raceResults.o $(CFLAGS) 75 | 76 | savegame.o: savegame.c 77 | $(CC) -c savegame.c -o savegame.o $(CFLAGS) 78 | 79 | util.o: util.c 80 | $(CC) -c util.c -o util.o $(CFLAGS) 81 | 82 | 83 | 3dsystem.o: race/3dsystem.c 84 | $(CC) -c race/3dsystem.c -o 3dsystem.o $(CFLAGS) 85 | 86 | powerup.o: race/powerup.c 87 | $(CC) -c race/powerup.c -o powerup.o $(CFLAGS) 88 | 89 | mod.o: mod/mod.c 90 | $(CC) -c mod/mod.c -o mod.o $(CFLAGS) 91 | 92 | i18n.o: i18n/i18n.c 93 | $(CC) -c i18n/i18n.c -o i18n.o $(CFLAGS) 94 | 95 | hash.o: util/hash.c 96 | $(CC) -c util/hash.c -o hash.o $(CFLAGS) 97 | -------------------------------------------------------------------------------- /libincludes/SDL_config_nds.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | #ifndef _SDL_config_nds_h 24 | #define _SDL_config_nds_h 25 | 26 | #include "SDL_platform.h" 27 | 28 | /* This is a set of defines to configure the SDL features */ 29 | 30 | /* General platform specific identifiers */ 31 | #include "SDL_platform.h" 32 | 33 | /* C datatypes */ 34 | #define SDL_HAS_64BIT_TYPE 1 35 | 36 | /* Endianness */ 37 | #define SDL_BYTEORDER 1234 38 | 39 | /* Useful headers */ 40 | #define HAVE_ALLOCA_H 1 41 | #define HAVE_SYS_TYPES_H 1 42 | #define HAVE_STDIO_H 1 43 | #define STDC_HEADERS 1 44 | #define HAVE_STDLIB_H 1 45 | #define HAVE_STDARG_H 1 46 | #define HAVE_MALLOC_H 1 47 | #define HAVE_STRING_H 1 48 | #define HAVE_INTTYPES_H 1 49 | #define HAVE_STDINT_H 1 50 | #define HAVE_CTYPE_H 1 51 | #define HAVE_MATH_H 1 52 | #define HAVE_ICONV_H 1 53 | #define HAVE_SIGNAL_H 1 54 | 55 | /* C library functions */ 56 | #define HAVE_MALLOC 1 57 | #define HAVE_CALLOC 1 58 | #define HAVE_REALLOC 1 59 | #define HAVE_FREE 1 60 | #define HAVE_ALLOCA 1 61 | #define HAVE_GETENV 1 62 | #define HAVE_PUTENV 1 63 | #define HAVE_UNSETENV 1 64 | #define HAVE_QSORT 1 65 | #define HAVE_ABS 1 66 | #define HAVE_BCOPY 1 67 | #define HAVE_MEMSET 1 68 | #define HAVE_MEMCPY 1 69 | #define HAVE_MEMMOVE 1 70 | #define HAVE_STRLEN 1 71 | #define HAVE_STRLCPY 1 72 | #define HAVE_STRLCAT 1 73 | #define HAVE_STRDUP 1 74 | #define HAVE_STRCHR 1 75 | #define HAVE_STRRCHR 1 76 | #define HAVE_STRSTR 1 77 | #define HAVE_STRTOL 1 78 | #define HAVE_STRTOUL 1 79 | #define HAVE_STRTOLL 1 80 | #define HAVE_STRTOULL 1 81 | #define HAVE_ATOI 1 82 | #define HAVE_ATOF 1 83 | #define HAVE_STRCMP 1 84 | #define HAVE_STRNCMP 1 85 | #define HAVE_STRCASECMP 1 86 | #define HAVE_STRNCASECMP 1 87 | #define HAVE_SSCANF 1 88 | #define HAVE_SNPRINTF 1 89 | #define HAVE_VSNPRINTF 1 90 | #define HAVE_SETJMP 1 91 | 92 | /* Enable various audio drivers */ 93 | #define SDL_AUDIO_DRIVER_NDS 1 94 | #define SDL_AUDIO_DRIVER_DUMMY 1 95 | 96 | /* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */ 97 | #define SDL_CDROM_DISABLED 1 98 | 99 | /* Enable various input drivers */ 100 | #define SDL_JOYSTICK_NDS 1 101 | 102 | /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ 103 | #define SDL_LOADSO_DISABLED 1 104 | 105 | /* Enable the stub thread support (src/thread/generic/\*.c) */ 106 | #define SDL_THREADS_DISABLED 1 107 | 108 | /* Enable various timer systems */ 109 | #define SDL_TIMER_NDS 1 110 | 111 | /* Enable various video drivers */ 112 | #define SDL_VIDEO_DRIVER_NDS 1 113 | #define SDL_VIDEO_DRIVER_DUMMY 1 114 | 115 | #endif /* _SDL_config_nds_h */ 116 | -------------------------------------------------------------------------------- /libincludes/minifmod/minifmod.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* MINIFMOD.H */ 3 | /* ---------------- */ 4 | /* MiniFMOD public source code release. */ 5 | /* This source is provided as-is. Firelight Technologies will not support */ 6 | /* or answer questions about the source provided. */ 7 | /* MiniFMOD Sourcecode is copyright (c) Firelight Technologies, 2000-2004. */ 8 | /* MiniFMOD Sourcecode is in no way representative of FMOD 3 source. */ 9 | /* Firelight Technologies is a registered company name. */ 10 | /* This source must not be redistributed without this notice. */ 11 | /******************************************************************************/ 12 | 13 | //========================================================================================== 14 | // MINIFMOD Main header file. Copyright (c), Firelight Technologies, 2000-2004. 15 | // Based on FMOD, copyright (c), Firelight Technologies, 2000-2004. 16 | //========================================================================================== 17 | 18 | #ifndef _MINIFMOD_H_ 19 | #define _MINIFMOD_H_ 20 | 21 | //=============================================================================================== 22 | //= DEFINITIONS 23 | //=============================================================================================== 24 | 25 | // fmod defined types 26 | typedef struct FMUSIC_MODULE FMUSIC_MODULE; 27 | 28 | //=============================================================================================== 29 | //= FUNCTION PROTOTYPES 30 | //=============================================================================================== 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | char _fltused; // for POLINK ;) 37 | 38 | 39 | // ================================== 40 | // Initialization / Global functions. 41 | // ================================== 42 | typedef void (*SAMPLELOADCALLBACK)(void *buff, int lenbytes, int numbits, int instno, int sampno); 43 | typedef void (*FMUSIC_CALLBACK)(FMUSIC_MODULE *mod, unsigned char param); 44 | 45 | // this must be called before FSOUND_Init! 46 | extern void PB_FSOUND_File_SetCallbacks(unsigned int (*OpenCallback)(char *name), 47 | void (*CloseCallback)(unsigned int handle), 48 | int (*ReadCallback)(void *buffer, int size, unsigned int handle), 49 | void (*SeekCallback)(unsigned int handle, int pos, signed char mode), 50 | int (*TellCallback)(unsigned int handle)); 51 | 52 | // ============================================================================================= 53 | // FMUSIC API 54 | // ============================================================================================= 55 | 56 | // Song management / playback functions. 57 | // ===================================== 58 | 59 | extern FMUSIC_MODULE * PB_FMUSIC_LoadSong(char *data, SAMPLELOADCALLBACK sampleloadcallback); 60 | extern signed char PB_FMUSIC_FreeSong(FMUSIC_MODULE *mod); 61 | extern signed char PB_FMUSIC_PlaySong(FMUSIC_MODULE *mod); 62 | extern signed char PB_FMUSIC_StopSong(FMUSIC_MODULE *mod); 63 | 64 | // Runtime song information. 65 | // ========================= 66 | 67 | extern int PB_FMUSIC_GetOrder(FMUSIC_MODULE *mod); 68 | extern int PB_FMUSIC_GetRow(FMUSIC_MODULE *mod); 69 | extern unsigned int PB_FMUSIC_GetTime(FMUSIC_MODULE *mod); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /libincludes/SDL.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL.h 24 | * Main include header for the SDL library 25 | */ 26 | 27 | #ifndef _SDL_H 28 | #define _SDL_H 29 | 30 | #include "SDL_main.h" 31 | #include "SDL_stdinc.h" 32 | #include "SDL_audio.h" 33 | #include "SDL_cdrom.h" 34 | #include "SDL_cpuinfo.h" 35 | #include "SDL_endian.h" 36 | #include "SDL_error.h" 37 | #include "SDL_events.h" 38 | #include "SDL_loadso.h" 39 | #include "SDL_mutex.h" 40 | #include "SDL_rwops.h" 41 | #include "SDL_thread.h" 42 | #include "SDL_timer.h" 43 | #include "SDL_video.h" 44 | #include "SDL_version.h" 45 | 46 | #include "begin_code.h" 47 | /* Set up for C function definitions, even when using C++ */ 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | /** @file SDL.h 53 | * @note As of version 0.5, SDL is loaded dynamically into the application 54 | */ 55 | 56 | /** @name SDL_INIT Flags 57 | * These are the flags which may be passed to SDL_Init() -- you should 58 | * specify the subsystems which you will be using in your application. 59 | */ 60 | /*@{*/ 61 | #define SDL_INIT_TIMER 0x00000001 62 | #define SDL_INIT_AUDIO 0x00000010 63 | #define SDL_INIT_VIDEO 0x00000020 64 | #define SDL_INIT_CDROM 0x00000100 65 | #define SDL_INIT_JOYSTICK 0x00000200 66 | #define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */ 67 | #define SDL_INIT_EVENTTHREAD 0x01000000 /**< Not supported on all OS's */ 68 | #define SDL_INIT_EVERYTHING 0x0000FFFF 69 | /*@}*/ 70 | 71 | /** This function loads the SDL dynamically linked library and initializes 72 | * the subsystems specified by 'flags' (and those satisfying dependencies) 73 | * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup 74 | * signal handlers for some commonly ignored fatal signals (like SIGSEGV) 75 | */ 76 | extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); 77 | 78 | /** This function initializes specific SDL subsystems */ 79 | extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); 80 | 81 | /** This function cleans up specific SDL subsystems */ 82 | extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); 83 | 84 | /** This function returns mask of the specified subsystems which have 85 | * been initialized. 86 | * If 'flags' is 0, it returns a mask of all initialized subsystems. 87 | */ 88 | extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); 89 | 90 | /** This function cleans up all initialized subsystems and unloads the 91 | * dynamically linked library. You should call it upon all exit conditions. 92 | */ 93 | extern DECLSPEC void SDLCALL SDL_Quit(void); 94 | 95 | /* Ends C function definitions when using C++ */ 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | #include "close_code.h" 100 | 101 | #endif /* _SDL_H */ 102 | -------------------------------------------------------------------------------- /MINGW32/includes/SDL.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2012 Sam Lantinga 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Sam Lantinga 20 | slouken@libsdl.org 21 | */ 22 | 23 | /** @file SDL.h 24 | * Main include header for the SDL library 25 | */ 26 | 27 | #ifndef _SDL_H 28 | #define _SDL_H 29 | 30 | #include "SDL_main.h" 31 | #include "SDL_stdinc.h" 32 | #include "SDL_audio.h" 33 | #include "SDL_cdrom.h" 34 | #include "SDL_cpuinfo.h" 35 | #include "SDL_endian.h" 36 | #include "SDL_error.h" 37 | #include "SDL_events.h" 38 | #include "SDL_loadso.h" 39 | #include "SDL_mutex.h" 40 | #include "SDL_rwops.h" 41 | #include "SDL_thread.h" 42 | #include "SDL_timer.h" 43 | #include "SDL_video.h" 44 | #include "SDL_version.h" 45 | 46 | #include "begin_code.h" 47 | /* Set up for C function definitions, even when using C++ */ 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | /** @file SDL.h 53 | * @note As of version 0.5, SDL is loaded dynamically into the application 54 | */ 55 | 56 | /** @name SDL_INIT Flags 57 | * These are the flags which may be passed to SDL_Init() -- you should 58 | * specify the subsystems which you will be using in your application. 59 | */ 60 | /*@{*/ 61 | #define SDL_INIT_TIMER 0x00000001 62 | #define SDL_INIT_AUDIO 0x00000010 63 | #define SDL_INIT_VIDEO 0x00000020 64 | #define SDL_INIT_CDROM 0x00000100 65 | #define SDL_INIT_JOYSTICK 0x00000200 66 | #define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */ 67 | #define SDL_INIT_EVENTTHREAD 0x01000000 /**< Not supported on all OS's */ 68 | #define SDL_INIT_EVERYTHING 0x0000FFFF 69 | /*@}*/ 70 | 71 | /** This function loads the SDL dynamically linked library and initializes 72 | * the subsystems specified by 'flags' (and those satisfying dependencies) 73 | * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup 74 | * signal handlers for some commonly ignored fatal signals (like SIGSEGV) 75 | */ 76 | extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); 77 | 78 | /** This function initializes specific SDL subsystems */ 79 | extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); 80 | 81 | /** This function cleans up specific SDL subsystems */ 82 | extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); 83 | 84 | /** This function returns mask of the specified subsystems which have 85 | * been initialized. 86 | * If 'flags' is 0, it returns a mask of all initialized subsystems. 87 | */ 88 | extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); 89 | 90 | /** This function cleans up all initialized subsystems and unloads the 91 | * dynamically linked library. You should call it upon all exit conditions. 92 | */ 93 | extern DECLSPEC void SDLCALL SDL_Quit(void); 94 | 95 | /* Ends C function definitions when using C++ */ 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | #include "close_code.h" 100 | 101 | #endif /* _SDL_H */ 102 | --------------------------------------------------------------------------------