mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-07 10:50:29 -05:00
Code cleanup and fixes on 64bits
This commit is contained in:
parent
af8c5ab978
commit
394939347c
@ -30,8 +30,13 @@
|
|||||||
#include "ichain.h"
|
#include "ichain.h"
|
||||||
#include "regs.h"
|
#include "regs.h"
|
||||||
|
|
||||||
//#define AUDIO_HEAP_SIZE 0x38000
|
#if defined(_WIN64) || defined(__x86_64__)
|
||||||
#define AUDIO_HEAP_SIZE 0x3800000 // The original audio heap size was too small. The heap would exceed capacity and corrupt everything in its path.
|
#define _SOH64
|
||||||
|
#define AUDIO_HEAP_SIZE 0x70000
|
||||||
|
#else
|
||||||
|
#define AUDIO_HEAP_SIZE 0x38000
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SYSTEM_HEAP_SIZE (1024 * 1024 * 4)
|
#define SYSTEM_HEAP_SIZE (1024 * 1024 * 4)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -1157,7 +1157,7 @@ typedef struct {
|
|||||||
} CamColChk; // size = 0x28
|
} CamColChk; // size = 0x28
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x000 */ char paramData[0xFF];
|
/* 0x000 */ char paramData[0x14 * sizeof(void*)];
|
||||||
/* 0x050 */ Vec3f at;
|
/* 0x050 */ Vec3f at;
|
||||||
/* 0x05C */ Vec3f eye;
|
/* 0x05C */ Vec3f eye;
|
||||||
/* 0x068 */ Vec3f up;
|
/* 0x068 */ Vec3f up;
|
||||||
|
@ -579,7 +579,7 @@ extern "C" SoundFontSample* ResourceMgr_LoadAudioSample(int romOffset)
|
|||||||
|
|
||||||
if (strem2[0] == 'R' && strem2[1] == 'I' && strem2[2] == 'F' && strem2[3] == 'F')
|
if (strem2[0] == 'R' && strem2[1] == 'I' && strem2[2] == 'F' && strem2[3] == 'F')
|
||||||
{
|
{
|
||||||
SoundFontSample* sampleC = (SoundFontSample*)malloc(sizeof(SoundFontSample));
|
SoundFontSample* sampleC = new SoundFontSample;
|
||||||
|
|
||||||
*strem++; // RIFF
|
*strem++; // RIFF
|
||||||
*strem++; // size
|
*strem++; // size
|
||||||
|
@ -10,7 +10,11 @@ const s16 D_8014A6C0[] = {
|
|||||||
0x0030, // gTatumsPerBeat
|
0x0030, // gTatumsPerBeat
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef _SOH64
|
||||||
const AudioContextInitSizes D_8014A6C4 = { 0x57F00, 0x2E0E0, 0xFCE0 };
|
const AudioContextInitSizes D_8014A6C4 = { 0x57F00, 0x2E0E0, 0xFCE0 };
|
||||||
|
#else
|
||||||
|
const AudioContextInitSizes D_8014A6C4 = { 0x37F00, 0xE0E0, 0xBCE0 };
|
||||||
|
#endif
|
||||||
|
|
||||||
ReverbSettings D_80133420[][3] = {
|
ReverbSettings D_80133420[][3] = {
|
||||||
{
|
{
|
||||||
|
@ -718,8 +718,7 @@ uintptr_t AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) {
|
|||||||
if (ret != NULL) {
|
if (ret != NULL) {
|
||||||
*didAllocate = false;
|
*didAllocate = false;
|
||||||
status = 2;
|
status = 2;
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
char* seqData = 0;
|
char* seqData = 0;
|
||||||
SoundFont* fnt;
|
SoundFont* fnt;
|
||||||
|
|
||||||
|
@ -1516,7 +1516,11 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
|
|||||||
if (globalCtx->sceneNum == SCENE_MALON_STABLE) {
|
if (globalCtx->sceneNum == SCENE_MALON_STABLE) {
|
||||||
// "/* BGCheck LonLon Size %dbyte */\n"
|
// "/* BGCheck LonLon Size %dbyte */\n"
|
||||||
osSyncPrintf("/* BGCheck LonLonサイズ %dbyte */\n", 0x3520);
|
osSyncPrintf("/* BGCheck LonLonサイズ %dbyte */\n", 0x3520);
|
||||||
colCtx->memSize = 0x3520 * (sizeof(void*) / 4); // 64-bit build needs more memory
|
#ifdef _SOH64
|
||||||
|
colCtx->memSize = 0x3520 * (sizeof(void*) / 4);
|
||||||
|
#else
|
||||||
|
colCtx->memSize = 0x3520;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// "/* BGCheck Mini Size %dbyte */\n"
|
// "/* BGCheck Mini Size %dbyte */\n"
|
||||||
osSyncPrintf("/* BGCheck ミニサイズ %dbyte */\n", 0x4E20);
|
osSyncPrintf("/* BGCheck ミニサイズ %dbyte */\n", 0x4E20);
|
||||||
|
Loading…
Reference in New Issue
Block a user