This commit is contained in:
Dethrace Labs 2025-07-29 20:47:34 +12:00
parent 2a930d9210
commit b5557da666
7 changed files with 25 additions and 20 deletions

View File

@ -20,3 +20,7 @@ sed -i 's/Z://g' reccmp-build.yml
if [ "$#" -gt 0 ]; then
exec "$@"
fi
# Unlock directories
#chmod -R 777 source build

@ -1 +1 @@
Subproject commit 1995d3cb0c3d09167d128cd71c06d86c6cb1899c
Subproject commit 7656a36b4d8c054beb31b890171b9d8067341165

View File

@ -2806,6 +2806,7 @@ int AllocateTransientBitmap(int pWidth, int pHeight, int pUser_data) {
}
}
FatalError(kFatalError_FindSpareTransientBitmap);
return 0;
}
// IDA: void __usercall DeallocateTransientBitmap(int pIndex@<EAX>)

View File

@ -140,7 +140,7 @@ void AddRefOffset(int* pRef_holder);
void GetDamageProgram(FILE* pF, tCar_spec* pCar_spec, tImpact_location pImpact_location);
int LinkModel(br_actor* pActor, tModel_pool* pModel_pool);
intptr_t LinkModel(br_actor* pActor, tModel_pool* pModel_pool);
void FreeUpBonnetModels(br_model** pModel_array, int pModel_count);

View File

@ -21,7 +21,6 @@ typedef int intptr_t;
// required for platform-specific network structs
// if needed for a different platform, make this conditional
// #include "pc-all/net_types.h"
typedef struct tPD_net_player_info {
// cannot be a regular sockaddr_in because it is transmitted between OS's
@ -35,7 +34,8 @@ typedef struct tPD_net_game_info {
int i;
} tPD_net_game_info;
#else
#include "pc-all/net_types.h"
#endif
typedef unsigned char tU8;

View File

@ -10,12 +10,10 @@
// IDA: void __cdecl ClearupPDNetworkStuff()
void ClearupPDNetworkStuff(void) {
}
// IDA: void __usercall MATTMessageCheck(char *pFunction_name@<EAX>, tNet_message *pMessage@<EDX>, int pAlleged_size@<EBX>)
void MATTMessageCheck(char* pFunction_name, tNet_message* pMessage, int pAlleged_size) {
}
// IDA: int __usercall GetProfileText@<EAX>(char *pDest@<EAX>, int pDest_len@<EDX>, char *pFname@<EBX>, char *pKeyname@<ECX>)
@ -25,7 +23,6 @@ int GetProfileText(char* pDest, int pDest_len, char* pFname, char* pKeyname) {
int i;
int j;
int len;
}
// IDA: int __cdecl GetSocketNumberFromProfileFile()
@ -120,7 +117,6 @@ int PDNetHostGame(tNet_game_details* pDetails, char* pHost_name, void** pHost_ad
// IDA: int __usercall PDNetJoinGame@<EAX>(tNet_game_details *pDetails@<EAX>, char *pPlayer_name@<EDX>)
int PDNetJoinGame(tNet_game_details* pDetails, char* pPlayer_name) {
dr_dprintf("PDNetJoinGame()");
return 0;
}

View File

@ -24,11 +24,16 @@ extern const tPlatform_bootstrap SDL1_bootstrap;
extern const tPlatform_bootstrap SDL2_bootstrap;
static const tPlatform_bootstrap* platform_bootstraps[] = {
#ifdef DETHRACE_PLATFORM_SDL2
#if defined(DETHRACE_PLATFORM_SDL2) && defined(DETHRACE_PLATFORM_SDL1)
&SDL2_bootstrap,
#endif
#ifdef DETHRACE_PLATFORM_SDL1
&SDL1_bootstrap,
&SDL1_bootstrap
#elif defined(DETHRACE_PLATFORM_SDL2)
&SDL2_bootstrap
#elif defined(DETHRACE_PLATFORM_SDL1)
&SDL1_bootstrap
#else
// This is the case for MSVC 4.20 builds
NULL
#endif
};
@ -80,12 +85,12 @@ static int Harness_InitPlatform(tArgument_config* argument_config) {
} else {
size_t i;
for (i = 0; i < BR_ASIZE(platform_bootstraps); i++) {
LOG_TRACE10("Attempting video driver \"%s\"", platform_bootstraps[i]->name);
LOG_DEBUG2("Attempting video driver \"%s\"", platform_bootstraps[i]->name);
if ((platform_bootstraps[i]->capabilities & argument_config->platform_capabilityies) != argument_config->platform_capabilityies) {
fprintf(stderr, "Skipping platform \"%s\". Does not support required capabilities.\n", platform_bootstraps[i]->name);
continue;
}
LOG_TRACE10("Try platform \"%s\"...");
LOG_DEBUG2("Try platform \"%s\"...", platform_bootstraps[i]->name);
if (platform_bootstraps[i]->init(&gHarness_platform) == 0) {
selected_bootstrap = platform_bootstraps[i];
break;
@ -100,7 +105,7 @@ static int Harness_InitPlatform(tArgument_config* argument_config) {
fprintf(stderr, "Could not find a supported platform\n");
return 1;
}
LOG_INFO("Platform: %s (%s)", selected_bootstrap->name, selected_bootstrap->description);
LOG_INFO3("Platform: %s (%s)", selected_bootstrap->name, selected_bootstrap->description);
}
return 0;
@ -224,7 +229,7 @@ void Harness_DetectAndSetWorkingDirectory(char* argv0) {
if (harness_game_config.selected_dir != NULL) {
path = harness_game_config.selected_dir->directory;
} else if (env_var != NULL) {
LOG_INFO("DETHRACE_ROOT_DIR is set to '%s'", env_var);
LOG_INFO2("DETHRACE_ROOT_DIR is set to '%s'", env_var);
path = env_var;
} else {
path = OS_GetWorkingDirectory(argv0);
@ -240,7 +245,7 @@ void Harness_DetectAndSetWorkingDirectory(char* argv0) {
if (path != NULL && path[0] != '\0') {
printf("Using game directory: %s\n", path);
if (chdir(path) != 0) {
LOG_PANIC("Failed to chdir. Error is %s", strerror(errno));
LOG_PANIC2("Failed to chdir. Error is %s", strerror(errno));
}
}
}
@ -252,7 +257,6 @@ int Harness_Init(int* argc, char* argv[]) {
printf("Dethrace version: %s\n", DETHRACE_VERSION);
tArgument_config argument_config;
// don't require a particular platform
argument_config.platform_name = NULL;
// request software renderer capability
@ -501,7 +505,7 @@ int Harness_ProcessIniFile(void) {
strcat(path, "dethrace.ini");
if (ini_parse(path, Harness_Ini_Callback, NULL) < 0) {
LOG_DEBUG("Failed to load config file %s", path);
LOG_DEBUG2("Failed to load config file %s", path);
return 1;
}