- fix linux build

This commit is contained in:
Ilya Shurumov 2020-12-28 16:28:40 +06:00
parent a3cd4279a6
commit 17c22c30d9
9 changed files with 56 additions and 70 deletions

View File

@ -40,7 +40,7 @@ after_build:
- sh: '${APPVEYOR_BUILD_FOLDER}/.appveyor/AfterBuild.sh'
cache:
- 'src_rebuild\obj\'
# - 'src_rebuild\obj\'
artifacts:
- path: src_rebuild\bin\*\*.zip

View File

@ -4,19 +4,19 @@
#include "Game/driver2.h"
#include "C/mission.h"
#include "C/convert.h"
#include "C/camera.h"
#include "C/dr2roads.h"
#include "C/system.h"
#include "C/pres.h"
#include "C/spool.h"
#include "C/cars.h"
#include "C/cop_ai.h"
#include "C/draw.h"
#include "C/players.h"
#include "C/glaunch.h"
#include "C/dr2roads.h"
#include "Game/C/mission.h"
#include "Game/C/convert.h"
#include "Game/C/camera.h"
#include "Game/C/dr2roads.h"
#include "Game/C/system.h"
#include "Game/C/pres.h"
#include "Game/C/spool.h"
#include "Game/C/cars.h"
#include "Game/C/cop_ai.h"
#include "Game/C/draw.h"
#include "Game/C/players.h"
#include "Game/C/glaunch.h"
#include "Game/C/dr2roads.h"
#include <stdio.h>

View File

@ -485,8 +485,6 @@ void GameInit(void)
#ifdef USE_CRT_MALLOC
sys_freeall();
mallocptr_start = D_MALLOC(0x200000);
#else
#endif // USE_CRT_MALLOC
mallocptr = (char*)mallocptr_start;
#endif // PSX

View File

@ -1,35 +0,0 @@
Game/C/main.o: Game/C/main.c GAME/driver2.h \
f:\learn\drvsyn\disasm\psxtoolchain\nxpsy-q\mips-gcc\lib\gcc\mipsel-unknown-elf\7.2.0\include\stdbool.h \
../../PSXToolchain/NxPsy-Q/include/stdio.h \
../../PSXToolchain/NxPsy-Q/include/KERNEL.H \
../../PSXToolchain/NxPsy-Q/include/r3000.h \
../../PSXToolchain/NxPsy-Q/include/asm.h \
../../PSXToolchain/NxPsy-Q/include/TYPES.H \
../../PSXToolchain/NxPsy-Q/include/LIBCD.H \
../../PSXToolchain/NxPsy-Q/include/LIBGTE.H \
../../PSXToolchain/NxPsy-Q/include/LIBGPU.H \
../../PSXToolchain/NxPsy-Q/include/LIBSPU.H GAME/psyx_compat.h \
GAME/REVERSING.H GAME/VERSION.H GAME/DR2MATH.H \
../../PSXToolchain/NxPsy-Q/include/ABS.H GAME/DR2LIMITS.H \
GAME/DR2TYPES.H GAME/DR2LOCALE.H Game/C/main.h \
../../PSXToolchain/NxPsy-Q/include/LIBETC.H \
../../PSXToolchain/NxPsy-Q/include/LIBAPI.H \
../../PSXToolchain/NxPsy-Q/include/LIBMCRD.H \
../../PSXToolchain/NxPsy-Q/include/kernel.h GAME/ASM/rndrasm.h \
Game/C/system.h Game/C/pad.h ../../PSXToolchain/NxPsy-Q/include/LIBPAD.H \
Game/C/sound.h Game/C/fmvplay.h Game/C/E3stuff.h Game/C/gamesnd.h \
Game/C/scores.h Game/C/glaunch.h Game/C/loadview.h Game/C/replays.h \
Game/C/event.h Game/C/mission.h Game/C/cutscene.h Game/C/texture.h \
Game/C/sky.h Game/C/pres.h Game/C/draw.h Game/C/denting.h \
Game/C/cosmetic.h Game/C/pedest.h Game/C/spool.h Game/C/map.h \
Game/C/objanim.h Game/C/handling.h Game/C/drivinggames.h \
Game/C/bomberman.h Game/C/players.h Game/C/ai.h Game/C/civ_ai.h \
Game/C/cop_ai.h Game/C/camera.h Game/C/overlay.h Game/C/debris.h \
Game/C/job_fx.h Game/C/director.h Game/C/convert.h Game/C/tile.h \
Game/C/overmap.h Game/C/motion_c.h Game/C/dr2roads.h Game/C/models.h \
Game/C/cars.h Game/C/objcoll.h Game/C/mc_snd.h Game/C/felony.h \
Game/C/leadai.h Game/C/loadsave.h GAME/Frontend/FEmain.h Game/C/xaplay.h \
Game/C/shadow.h Game/C/pause.h ../../PSXToolchain/NxPsy-Q/include/RAND.H \
../../PSXToolchain/NxPsy-Q/include/STRINGS.H \
../../PSXToolchain/NxPsy-Q/include/memory.h GAME/PLATFORM.H \
../../PSXToolchain/NxPsy-Q/include/INLINE_C.H

Binary file not shown.

View File

@ -20,6 +20,20 @@
#include "LIBETC.H"
#include "STRINGS.H"
#ifdef PSX
char* _overlay_buffer = 0x1C0000;
char* _frontend_buffer = 0xFB400;
char* _other_buffer = 0xF3000;
char* _other_buffer2 = 0xE7000;
OTTYPE* _OT1 = 0xF3000;
OTTYPE* _OT2 = 0xF7200;
char* _primTab1 = 0xFB400;
char* _primTab2 = 0x119400;
char* _replay_buffer = 0x1FABBC;
#else
// Initialized in redriver2_main
char* _overlay_buffer = NULL; // 0x1C0000
char* _frontend_buffer = NULL; // 0xFB400
@ -30,6 +44,9 @@ OTTYPE* _OT2 = NULL; // 0xF7200
char* _primTab1 = NULL; // 0xFB400
char* _primTab2 = NULL; // 0x119400
char* _replay_buffer = NULL; // 0x1FABBC
#endif
char gDataFolder[32] = "DRIVER2\\";
#ifdef USE_CRT_MALLOC
@ -91,6 +108,11 @@ void sys_tempfree()
free(g_dynamicAllocs[g_numDynamicAllocs]);
g_dynamicAllocs[g_numDynamicAllocs] = NULL;
}
#elif defined(PSX)
char* mallocptr;
const char* mallocptr_start = 0x137400;
#else
char g_allocatedMem[0x200000]; // 0x137400 (_ramsize). TODO: use real malloc size: 870332

View File

@ -40,12 +40,12 @@ void printError(char *fmt, ...);
#endif // PSX
#include "REVERSING.H"
#include "reversing.h"
#include "VERSION.H"
#include "DR2MATH.H"
#include "DR2LIMITS.H"
#include "DR2TYPES.H"
#include "DR2LOCALE.H"
#include "version.h"
#include "dr2math.h"
#include "dr2limits.h"
#include "dr2types.h"
#include "dr2locale.h"
#endif // DRIVER2_H

View File

@ -80,25 +80,25 @@ project "REDRIVER2"
targetdir "bin/%{cfg.buildcfg}"
includedirs {
"GAME",
"Game",
}
defines { GAME_REGION }
files {
"GAME/**.H",
"GAME/**.C",
"Game/**.h",
"Game/**.c",
}
-- exclude sources which belong to overlays
if os.target() == "psx" then
excludes {
"GAME/MEMCARD/**.C",
"GAME/MEMCARD/**.H",
"GAME/FRONTEND/**.C",
"GAME/FRONTEND/**.H",
"GAME/C/LEADAI.C",
"GAME/C/PATHFIND.C",
"Game/MemCard/**.c",
"Game/MemCard/**.h",
"Game/Frontend/**.c",
"Game/Frontend/**.h",
"Game/C/leadai.c",
"Game/C/pathfind.C",
}
end

View File

@ -5,10 +5,11 @@
#include "driver2.h"
#include "C/PAD.H"
#include "C/SYSTEM.H"
#include "C/E3STUFF.H"
#include "C/FMV_FONT.h"
#include "C/pad.H"
#include "C/system.h"
#include "C/E3stuff.h"
#include "C/fmv_font.h"
#include "STRINGS.H"
#include <AL/al.h>