mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 16:22:41 +02:00
Merge branch 'port' of https://github.com/fgsfdsfgs/perfect_dark into port-net
This commit is contained in:
commit
4d96fab71f
104 files changed
+5488
-2152
No files matched your search
+1
-1
@@ -250,7 +250,7 @@ extern struct seqchannel g_SeqChannels[3];
|
||||
extern u32 g_AudioXReasonsActive[4];
|
||||
extern s32 g_MusicXReasonMinDurations[4];
|
||||
extern s32 g_MusicXReasonMaxDurations[4];
|
||||
extern u32 *g_LangBanks[69];
|
||||
extern uintptr_t *g_LangBanks[69];
|
||||
extern struct jpncharpixels *g_JpnCharCachePixels;
|
||||
extern struct jpncacheitem *g_JpnCacheCacheItems;
|
||||
extern struct texture *g_Textures;
|
||||
|
||||
@@ -56,9 +56,10 @@
|
||||
#define ABS(val) ((val) > 0 ? (val) : -(val))
|
||||
#define ABSF(val) ((val) > 0.0f ? (val) : -(val))
|
||||
#define ALIGN2(val) (((val) | 1) ^ 0x1)
|
||||
#define ALIGN4(val) (((val) | 3) ^ 0x3)
|
||||
#define ALIGN8(val) ((((val) + 0x7) | 0x7) ^ 0x7)
|
||||
#define ALIGN16(val) ((((val) + 0xf) | 0xf) ^ 0xf)
|
||||
#define ALIGN64(val) (((((u32)(val)) + 0x3f) | 0x3f) ^ 0x3f)
|
||||
#define ALIGN64(val) (((((uintptr_t)(val)) + 0x3f) | 0x3f) ^ 0x3f)
|
||||
#define ARRAYCOUNT(a) (s32)(sizeof(a) / sizeof(a[0]))
|
||||
#define CHRNAVSEED(chr) ((g_Vars.lvframe60 >> 9) * 128 + chr->chrnum * 8)
|
||||
#define CHRRACE(chr) (chr ? chr->race : RACE_HUMAN)
|
||||
|
||||
@@ -118,8 +118,8 @@ bool bgun0f0a27c8(void);
|
||||
void bgunHandlePlayerDead(void);
|
||||
bool bgunIsMissionCritical(s32 weaponnum);
|
||||
void bgunDisarm(struct prop *attacker);
|
||||
void bgunExecuteModelCmdList(s32 *arg0);
|
||||
s32 bgunCreateModelCmdList(struct model *model, struct modelnode *node, s32 *ptr);
|
||||
void bgunExecuteModelCmdList(uintptr_t *arg0);
|
||||
s32 bgunCreateModelCmdList(struct model *model, struct modelnode *node, uintptr_t *ptr);
|
||||
void bgunStartDetonateAnimation(s32 playernum);
|
||||
void bgunUpdateGangsta(struct hand *hand, s32 handnum, struct coord *arg2, struct weaponfunc *funcdef, Mtxf *arg4, Mtxf *arg5);
|
||||
void bgunUpdateSmoke(struct hand *hand, s32 handnum, s32 weaponnum, struct weaponfunc *funcdef);
|
||||
|
||||
@@ -4,12 +4,16 @@
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
#include "romdata.h"
|
||||
#endif
|
||||
|
||||
romptr_t fileGetRomAddress(s32 filenum);
|
||||
s32 fileGetRomSize(s32 filenum);
|
||||
void filesInit(void);
|
||||
void fileLoadPartToAddr(u16 filenum, void *memaddr, s32 offset, u32 len);
|
||||
u32 fileGetInflatedSize(s32 filenum);
|
||||
void *fileLoadToNew(s32 filenum, u32 method);
|
||||
u32 fileGetInflatedSize(s32 filenum, u32 loadtype);
|
||||
void *fileLoadToNew(s32 filenum, u32 method, u32 loadtype);
|
||||
void *fileLoadToAddr(s32 filenum, s32 method, u8 *ptr, u32 size);
|
||||
u32 fileGetLoadedSize(s32 filenum);
|
||||
u32 fileGetAllocationSize(s32 filenum);
|
||||
|
||||
@@ -16,7 +16,7 @@ void filemgrSetFileToDelete(struct filelistfile *file, s32 filetype);
|
||||
char *filemgrMenuTextFailReason(struct menuitem *item);
|
||||
char *filemgrMenuTextDeviceNameForError(struct menuitem *item);
|
||||
void filemgrPushErrorDialog(u16 errnum);
|
||||
s32 filemgrGetDeviceNameOrStartIndex(s32 listnum, s32 operation, s32 optionindex);
|
||||
uintptr_t filemgrGetDeviceNameOrStartIndex(s32 listnum, s32 operation, s32 optionindex);
|
||||
char *filemgrMenuTextErrorTitle(struct menuitem *item);
|
||||
char *filemgrMenuTextFileType(struct menuitem *item);
|
||||
void func0f10898c(void);
|
||||
|
||||
@@ -33,7 +33,7 @@ s32 texGetPoolFreeBytes(struct texpool *pool);
|
||||
u8 *texGetPoolLeftPos(struct texpool *pool);
|
||||
void texLoadFromDisplayList(Gfx *gdl, struct texpool *pool, s32 arg2);
|
||||
void texLoad(texnum_t *updateword, struct texpool *pool, bool unusedarg);
|
||||
void texLoadFromConfigs(struct textureconfig *configs, s32 numconfigs, struct texpool *pool, s32 arg3);
|
||||
void texLoadFromConfigs(struct textureconfig *configs, s32 numconfigs, struct texpool *pool, uintptr_t arg3);
|
||||
void texLoadFromTextureNum(u32 arg0, struct texpool *pool);
|
||||
#ifndef PLATFORM_N64
|
||||
void texSwizzleInternal(u8 *dst, s32 width, s32 height, s32 format, u32 dstlen);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
#define TITLE_ALLOCSIZE 1024 * 286
|
||||
#define TITLE_ALLOCSIZE 1024 * 378
|
||||
|
||||
extern u32 var800624d4;
|
||||
extern u32 var800624d8;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
void func0f176d70(s32 arg0);
|
||||
u32 align4(u32 arg0);
|
||||
u32 align16(u32 arg0);
|
||||
u32 align32(u32 arg0);
|
||||
uintptr_t align32(uintptr_t arg0);
|
||||
void utilsInit(void);
|
||||
void func0f1770ac(struct coord *a, struct coord *b, struct coord *out);
|
||||
bool func0f177164(struct coord *arg0, struct coord *arg1, u32 line, char *file);
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
{ GUNCMD_PLAYSOUND, 0, keyframe, sound },
|
||||
|
||||
#define gunscript_include(unk1, address) \
|
||||
{ GUNCMD_INCLUDE, unk1, 0, (u32)address },
|
||||
{ GUNCMD_INCLUDE, unk1, 0, (uintptr_t)address },
|
||||
|
||||
#define gunscript_random(probability, address) \
|
||||
{ GUNCMD_RANDOM, 0, probability, (u32)address },
|
||||
{ GUNCMD_RANDOM, 0, probability, (uintptr_t)address },
|
||||
|
||||
#define gunscript_repeatuntilfull(triggerkey, dontloop, gototrigger) \
|
||||
{ GUNCMD_REPEATUNTILFULL, 0, triggerkey, (dontloop << 16) | gototrigger },
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
void memaDefrag(void);
|
||||
void memaInit(void);
|
||||
void memaReset(void *ptr, u32 size);
|
||||
void memaReset(void *ptr, u64 size);
|
||||
void memaPrint(void);
|
||||
void *memaAlloc(u32 size);
|
||||
s32 memaGrow(s32 addr, u32 amount);
|
||||
void _memaFree(s32 addr, s32 size);
|
||||
void memaFree(void *addr, s32 size);
|
||||
s32 memaGetLongestFree(void);
|
||||
bool memaRealloc(s32 addr, u32 oldsize, u32 newsize);
|
||||
void *memaAlloc(u64 size);
|
||||
uintptr_t memaGrow(uintptr_t addr, u64 amount);
|
||||
void _memaFree(uintptr_t addr, u64 size);
|
||||
void memaFree(void *addr, u64 size);
|
||||
u64 memaGetLongestFree(void);
|
||||
bool memaRealloc(uintptr_t addr, u64 oldsize, u64 newsize);
|
||||
|
||||
#endif
|
||||
@@ -97,7 +97,7 @@ void modelRenderNodeChrGunfire(struct modelrenderdata *renderdata, struct model
|
||||
void modelRender(struct modelrenderdata *renderdata, struct model *model);
|
||||
bool modelTestBboxNodeForHit(struct modelrodata_bbox *bbox, Mtxf *mtx, struct coord *arg2, struct coord *arg3);
|
||||
s32 modelTestForHit(struct model *model, struct coord *arg1, struct coord *arg2, struct modelnode **startnode);
|
||||
void modelPromoteNodeOffsetsToPointers(struct modelnode *node, u32 vma, u32 fileramaddr);
|
||||
void modelPromoteNodeOffsetsToPointers(struct modelnode *node, u32 vma, uintptr_t fileramaddr);
|
||||
void modelPromoteOffsetsToPointers(struct modeldef *modeldef, u32 arg1, uintptr_t arg2);
|
||||
s32 modelCalculateRwDataIndexes(struct modelnode *node);
|
||||
void modelAllocateRwData(struct modeldef *modeldef);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "types.h"
|
||||
|
||||
void mp3Init(ALHeap *heap);
|
||||
void mp3PlayFile(s32 romaddr, s32 filesize);
|
||||
void mp3PlayFile(uintptr_t romaddr, s32 filesize);
|
||||
void func00037e1c(void);
|
||||
void func00037e38(void);
|
||||
void func00037e68(void);
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
#include "types.h"
|
||||
|
||||
void rdpInit(void);
|
||||
void rdpCreateTask(Gfx *gdlstart, Gfx *gdlend, u32 arg2, s32 msg);
|
||||
void rdpCreateTask(Gfx *gdlstart, Gfx *gdlend, u32 arg2, uintptr_t msg);
|
||||
|
||||
#endif
|
||||
@@ -12,11 +12,11 @@ void snd0000ea80(u16 volume);
|
||||
void sndResetCurMp3(void);
|
||||
void sndLoadSfxCtl(void);
|
||||
void sndIncrementAges(void);
|
||||
ALEnvelope *sndLoadEnvelope(u32 offset, u16 index);
|
||||
ALKeyMap *sndLoadKeymap(u32 offset, u16 index);
|
||||
ALADPCMBook *sndLoadAdpcmBook(u32 offset, u16 index);
|
||||
ALADPCMloop *sndLoadAdpcmLoop(u32 offset, u16 index);
|
||||
ALWaveTable *sndLoadWavetable(u32 offset, u16 index);
|
||||
ALEnvelope *sndLoadEnvelope(uintptr_t offset, u16 index);
|
||||
ALKeyMap *sndLoadKeymap(uintptr_t offset, u16 index);
|
||||
ALADPCMBook* sndLoadAdpcmBook(uintptr_t offset, u16 index);
|
||||
ALADPCMloop* sndLoadAdpcmLoop(uintptr_t offset, u16 index);
|
||||
ALWaveTable* sndLoadWavetable(uintptr_t offset, u16 index);
|
||||
void sndSetSoundMode(s32 mode);
|
||||
ALSound *sndLoadSound(s16 soundnum);
|
||||
void seqInit(struct seqinstance *seq);
|
||||
|
||||
@@ -29,11 +29,6 @@
|
||||
#error "Unknown CPU arch."
|
||||
#endif
|
||||
|
||||
// TODO: remove this after 64-bit support is in place
|
||||
#ifdef PLATFORM_64BIT
|
||||
#error "64-bit platforms are currently not supported."
|
||||
#endif
|
||||
|
||||
// detect endianness
|
||||
#if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
|
||||
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
|
||||
+26
-18
@@ -27,7 +27,7 @@
|
||||
typedef s32 PakErr1;
|
||||
typedef s32 PakErr2;
|
||||
typedef s32 MenuDialogHandlerResult;
|
||||
typedef intptr_t MenuItemHandlerResult;
|
||||
typedef uintptr_t MenuItemHandlerResult;
|
||||
typedef s16 RoomNum;
|
||||
|
||||
#ifdef PLATFORM_N64
|
||||
@@ -541,6 +541,8 @@ struct modelrodata_type11 { // type 0x11
|
||||
u32 unk0c;
|
||||
u32 unk10;
|
||||
void *unk14;
|
||||
u32 unk18;
|
||||
u32 unk1c;
|
||||
};
|
||||
|
||||
struct modelrodata_toggle { // type 0x12
|
||||
@@ -551,6 +553,7 @@ struct modelrodata_toggle { // type 0x12
|
||||
struct modelrodata_positionheld { // type 0x15
|
||||
struct coord pos;
|
||||
s16 mtxindex;
|
||||
s32 unk10;
|
||||
};
|
||||
|
||||
struct modelrodata_stargunfire { // type 0x16
|
||||
@@ -2309,8 +2312,8 @@ struct hand {
|
||||
/*0x0dbc*/ u32 fspare7;
|
||||
/*0x0dc0*/ u32 fspare8;
|
||||
/*0x0dc4*/ struct abmag abmag;
|
||||
/*0x0dcc*/ s32 *unk0dcc;
|
||||
/*0x0dd0*/ s32 *unk0dd0;
|
||||
/*0x0dcc*/ uintptr_t *unk0dcc;
|
||||
/*0x0dd0*/ uintptr_t *unk0dd0;
|
||||
/*0x0dd4*/ s32 unk0dd4;
|
||||
/*0x0dd8*/ Mtxf *unk0dd8;
|
||||
};
|
||||
@@ -2357,8 +2360,8 @@ struct gunctrl {
|
||||
/*0x15b1*/ u8 gunloadstate;
|
||||
/*0x15b2*/ u16 loadfilenum;
|
||||
/*0x15b4*/ struct modeldef **loadtomodeldef;
|
||||
/*0x15b8*/ u32 *loadmemptr;
|
||||
/*0x15bc*/ u32 *loadmemremaining;
|
||||
/*0x15b8*/ uintptr_t *loadmemptr;
|
||||
/*0x15bc*/ uintptr_t*loadmemremaining;
|
||||
/*0x15c0*/ struct texpool texpool;
|
||||
/*0x15d0*/ u32 nexttexturetoload;
|
||||
/*0x15d4*/ struct fileinfo fileinfo;
|
||||
@@ -2850,6 +2853,7 @@ struct coverdefinition {
|
||||
struct coord pos;
|
||||
struct coord look;
|
||||
u16 flags;
|
||||
u16 unk1a;
|
||||
};
|
||||
|
||||
struct cover {
|
||||
@@ -2862,9 +2866,9 @@ struct cover {
|
||||
struct padsfileheader {
|
||||
s32 numpads;
|
||||
s32 numcovers;
|
||||
s32 waypointsoffset;
|
||||
s32 waygroupsoffset;
|
||||
s32 coversoffset;
|
||||
uintptr_t waypointsoffset;
|
||||
uintptr_t waygroupsoffset;
|
||||
uintptr_t coversoffset;
|
||||
u16 padoffsets[1];
|
||||
};
|
||||
|
||||
@@ -3354,8 +3358,8 @@ struct handlerdata_checkbox {
|
||||
};
|
||||
|
||||
struct handlerdata_dropdown {
|
||||
u32 value;
|
||||
u32 unk04;
|
||||
uintptr_t value;
|
||||
uintptr_t unk04;
|
||||
};
|
||||
|
||||
struct handlerdata_keyboard {
|
||||
@@ -3369,8 +3373,8 @@ struct handlerdata_label {
|
||||
|
||||
struct handlerdata_list {
|
||||
union {
|
||||
u32 value;
|
||||
s32 values32;
|
||||
uintptr_t value;
|
||||
intptr_t values32;
|
||||
};
|
||||
union {
|
||||
s32 unk04;
|
||||
@@ -3396,8 +3400,8 @@ struct menuitemrenderdata {
|
||||
struct handlerdata_type19 {
|
||||
Gfx *gdl;
|
||||
union {
|
||||
s32 unk04;
|
||||
u32 unk04u32;
|
||||
intptr_t unk04;
|
||||
uintptr_t unk04u32;
|
||||
};
|
||||
struct menuitemrenderdata *renderdata2;
|
||||
s32 unk0c;
|
||||
@@ -3433,7 +3437,7 @@ struct menuitem {
|
||||
intptr_t param3;
|
||||
|
||||
union {
|
||||
s32 (*handler)(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||
uintptr_t (*handler)(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||
void (*handlervoid)(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||
};
|
||||
};
|
||||
@@ -3883,7 +3887,11 @@ struct menumodel {
|
||||
/*0x05e*/ s16 curanimnum;
|
||||
/*0x060*/ struct model bodymodel;
|
||||
/*0x084*/ struct anim bodyanim;
|
||||
#ifdef PLATFORM_64BIT
|
||||
/*0x110*/ u32 rwdata[256+128];
|
||||
#else
|
||||
/*0x110*/ u32 rwdata[256];
|
||||
#endif
|
||||
/*0x510*/ f32 curposx;
|
||||
/*0x514*/ f32 curposy;
|
||||
/*0x518*/ f32 curposz;
|
||||
@@ -5183,7 +5191,7 @@ struct shieldhit {
|
||||
};
|
||||
|
||||
struct bgroom {
|
||||
u32 unk00;
|
||||
uintptr_t unk00;
|
||||
struct coord pos;
|
||||
u8 br_light_min;
|
||||
u8 br_light_max;
|
||||
@@ -5246,7 +5254,7 @@ struct mplockinfo {
|
||||
|
||||
struct boltbeam {
|
||||
union {
|
||||
s32 unk00;
|
||||
intptr_t unk00;
|
||||
struct prop *unk00_prop;
|
||||
};
|
||||
|
||||
@@ -5378,7 +5386,7 @@ struct guncmd {
|
||||
u8 type;
|
||||
u8 unk01;
|
||||
u16 unk02;
|
||||
s32 unk04;
|
||||
intptr_t unk04;
|
||||
};
|
||||
|
||||
struct pakthing {
|
||||
|
||||
Reference in new issue
Block a user