forked from Ports/perfect_dark
Introduce support for gcc
This commit is contained in:
1 parent
4b7e93de8a
commit
17583575e4
266 files changed
+2277
-1640
No files matched your search
@@ -21,6 +21,7 @@
|
||||
#define _GBI_H_
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "gbiex.h"
|
||||
|
||||
/*
|
||||
* To use the F3DEX ucodes, define F3DEX_GBI before include this file.
|
||||
|
||||
+25
-25
@@ -32,7 +32,7 @@
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
#define M_PI 3.14159265358979323846
|
||||
#define OS_M_PI 3.14159265358979323846
|
||||
#define M_DTOR (3.14159265358979323846/180.0)
|
||||
|
||||
#define FTOFIX32(x) (long)((x) * (float)0x00010000)
|
||||
@@ -69,10 +69,10 @@ typedef struct {
|
||||
* Function Prototypes
|
||||
*/
|
||||
|
||||
extern int guLoadTextureBlockMipMap(Gfx **glist, unsigned char *tbuf, Image *im,
|
||||
unsigned char startTile, unsigned char pal, unsigned char cms,
|
||||
unsigned char cmt, unsigned char masks, unsigned char maskt,
|
||||
unsigned char shifts, unsigned char shiftt, unsigned char cfs,
|
||||
extern int guLoadTextureBlockMipMap(Gfx **glist, unsigned char *tbuf, Image *im,
|
||||
unsigned char startTile, unsigned char pal, unsigned char cms,
|
||||
unsigned char cmt, unsigned char masks, unsigned char maskt,
|
||||
unsigned char shifts, unsigned char shiftt, unsigned char cfs,
|
||||
unsigned char cft);
|
||||
|
||||
extern int guGetDPLoadTextureTileSz (int ult, int lrt);
|
||||
@@ -86,7 +86,7 @@ extern void guDPLoadTextureTile (Gfx *glistp, void *timg,
|
||||
int shifts, int shiftt);
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* matrix operations:
|
||||
*
|
||||
* The 'F' version is floating point, in case the application wants
|
||||
@@ -95,19 +95,19 @@ extern void guDPLoadTextureTile (Gfx *glistp, void *timg,
|
||||
*/
|
||||
extern void guMtxIdent(Mtx *m);
|
||||
extern void guMtxIdentF(float mf[4][4]);
|
||||
extern void guOrtho(Mtx *m, float l, float r, float b, float t,
|
||||
extern void guOrtho(Mtx *m, float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guOrthoF(float mf[4][4], float l, float r, float b, float t,
|
||||
extern void guOrthoF(float mf[4][4], float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guFrustum(Mtx *m, float l, float r, float b, float t,
|
||||
extern void guFrustum(Mtx *m, float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guFrustumF(float mf[4][4], float l, float r, float b, float t,
|
||||
extern void guFrustumF(float mf[4][4], float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guPerspective(Mtx *m, u16 *perspNorm, float fovy,
|
||||
extern void guPerspective(Mtx *m, u16 *perspNorm, float fovy,
|
||||
float aspect, float near, float far, float scale);
|
||||
extern void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy,
|
||||
extern void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy,
|
||||
float aspect, float near, float far, float scale);
|
||||
extern void guLookAt(Mtx *m,
|
||||
extern void guLookAt(Mtx *m,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
@@ -118,7 +118,7 @@ extern void guLookAtReflect(Mtx *m, LookAt *l,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
extern void guLookAtReflectF(float mf[4][4], LookAt *l,
|
||||
extern void guLookAtReflectF(float mf[4][4], LookAt *l,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
@@ -129,22 +129,22 @@ extern void guLookAtHilite(Mtx *m, LookAt *l, Hilite *h,
|
||||
float xl1, float yl1, float zl1,
|
||||
float xl2, float yl2, float zl2,
|
||||
int twidth, int theight);
|
||||
extern void guLookAtHiliteF(float mf[4][4], LookAt *l, Hilite *h,
|
||||
extern void guLookAtHiliteF(float mf[4][4], LookAt *l, Hilite *h,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float xl1, float yl1, float zl1,
|
||||
float xl2, float yl2, float zl2,
|
||||
int twidth, int theight);
|
||||
extern void guLookAtStereo(Mtx *m,
|
||||
extern void guLookAtStereo(Mtx *m,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float xUp, float yUp, float zUp,
|
||||
float eyedist);
|
||||
extern void guLookAtStereoF(float mf[4][4],
|
||||
extern void guLookAtStereoF(float mf[4][4],
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float xUp, float yUp, float zUp,
|
||||
float eyedist);
|
||||
extern void guRotate(Mtx *m, float a, float x, float y, float z);
|
||||
extern void guRotateF(float mf[4][4], float a, float x, float y, float z);
|
||||
@@ -164,9 +164,9 @@ extern void guMtxF2L(float mf[4][4], Mtx *m);
|
||||
extern void guMtxL2F(float mf[4][4], Mtx *m);
|
||||
extern void guMtxCatF(float m[4][4], float n[4][4], float r[4][4]);
|
||||
extern void guMtxCatL(Mtx *m, Mtx *n, Mtx *res);
|
||||
extern void guMtxXFMF(float mf[4][4], float x, float y, float z,
|
||||
extern void guMtxXFMF(float mf[4][4], float x, float y, float z,
|
||||
float *ox, float *oy, float *oz);
|
||||
extern void guMtxXFML(Mtx *m, float x, float y, float z,
|
||||
extern void guMtxXFML(Mtx *m, float x, float y, float z,
|
||||
float *ox, float *oy, float *oz);
|
||||
|
||||
/* vector utility: */
|
||||
@@ -207,8 +207,8 @@ extern float sqrtf(float value);
|
||||
extern void guParseRdpDL(u64 *rdp_dl, u64 nbytes, u8 flags);
|
||||
extern void guParseString(char *StringPointer, u64 nbytes);
|
||||
|
||||
/*
|
||||
* NO LONGER SUPPORTED,
|
||||
/*
|
||||
* NO LONGER SUPPORTED,
|
||||
* use guParseRdpDL with GU_PARSERDP_DUMPONLY flags
|
||||
*/
|
||||
/* extern void guDumpRawRdpDL(u64 *rdp_dl, u64 nbytes); */
|
||||
@@ -223,7 +223,7 @@ guBlinkRdpDL(u64 *rdp_dl_in, u64 nbytes_in,
|
||||
u32 x, u32 y, u32 radius,
|
||||
u8 red, u8 green, u8 blue,
|
||||
u8 flags);
|
||||
|
||||
|
||||
/* flag values for guParseGbiDL() */
|
||||
#define GU_PARSEGBI_ROWMAJOR 1
|
||||
#define GU_PARSEGBI_NONEST 2
|
||||
@@ -252,7 +252,7 @@ typedef struct {
|
||||
u32 paddr;
|
||||
} guDLPrintCB;
|
||||
|
||||
void guSprite2DInit(uSprite *SpritePointer,
|
||||
void guSprite2DInit(uSprite *SpritePointer,
|
||||
void *SourceImagePointer,
|
||||
void *TlutPointer,
|
||||
int Stride,
|
||||
|
||||
@@ -34,6 +34,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/abi.h>
|
||||
#include <PR/mbi.h>
|
||||
|
||||
/***********************************************************************
|
||||
@@ -300,10 +301,7 @@ typedef struct {
|
||||
ALHeap *heap;
|
||||
s32 outputRate; /* output sample rate */
|
||||
ALFxId fxTypes[4];
|
||||
|
||||
// This should be [4], but this causes too much stack usage in sndInit.
|
||||
// May have to figure out what sndInit's sp7c is before this can be fixed.
|
||||
s32 *params[1];
|
||||
s32 *params[2];
|
||||
} ALSynConfig;
|
||||
|
||||
typedef struct ALPlayer_s {
|
||||
|
||||
@@ -402,6 +402,8 @@ extern long long int n_aspMainDataStart[], n_aspMainDataEnd[];
|
||||
|
||||
f32 func0003b9d4(s32 arg0);
|
||||
void func0003ba64(struct fx *fx, f32 outputrate);
|
||||
s16 _getRate(f32 vol, f32 tgt, s32 count, u16 *ratel);
|
||||
s16 _getVol(s16 ivol, s32 samples, s16 ratem, u16 ratel);
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo.
|
||||
|
||||
|
||||
$RCSfile: os_motor.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:15 $
|
||||
@@ -68,6 +68,7 @@ extern s32 osMotorInit(OSMesgQueue *, OSPfs *, int);
|
||||
#define osMotorStart(x) __osMotorAccess((x), MOTOR_START)
|
||||
#define osMotorStop(x) __osMotorAccess((x), MOTOR_STOP)
|
||||
extern s32 __osMotorAccess(OSPfs *, s32);
|
||||
s32 osMotorProbe(OSMesgQueue* ctrlrqueue, OSPfs* pfs, s32 channel);
|
||||
#else
|
||||
extern s32 osMotorStop(OSPfs *);
|
||||
extern s32 osMotorStart(OSPfs *);
|
||||
|
||||
+15
-15
@@ -153,21 +153,21 @@ s32 osPfsInitPak(OSMesgQueue *queue, OSPfs *pfs, s32 channel, s32 *arg3);
|
||||
#else
|
||||
s32 osPfsInitPak(OSMesgQueue *queue, OSPfs *pfs, s32 channel);
|
||||
#endif
|
||||
extern s32 osPfsRepairId(OSPfs *);
|
||||
extern s32 osPfsInit(OSMesgQueue *, OSPfs *, int);
|
||||
extern s32 osPfsReFormat(OSPfs *, OSMesgQueue *, int);
|
||||
extern s32 osPfsChecker(OSPfs *);
|
||||
extern s32 osPfsAllocateFile(OSPfs *, u16, u32, u8 *, u8 *, int, s32 *);
|
||||
extern s32 osPfsFindFile(OSPfs *, u16, u32, u8 *, u8 *, s32 *);
|
||||
extern s32 osPfsDeleteFile(OSPfs *, u16, u32, u8 *, u8 *);
|
||||
extern s32 osPfsReadWriteFile(OSPfs *, s32, u8, int, int, u8 *);
|
||||
extern s32 osPfsFileState(OSPfs *, s32, OSPfsState *);
|
||||
extern s32 osPfsGetLabel(OSPfs *, u8 *, int *);
|
||||
extern s32 osPfsSetLabel(OSPfs *, u8 *);
|
||||
extern s32 osPfsIsPlug(OSMesgQueue *, u8 *);
|
||||
extern s32 osPfsFreeBlocks(OSPfs *, s32 *);
|
||||
extern s32 osPfsNumFiles(OSPfs *, s32 *, s32 *);
|
||||
|
||||
s32 osPfsRepairId(OSPfs *);
|
||||
s32 osPfsInit(OSMesgQueue *, OSPfs *, int);
|
||||
s32 osPfsReFormat(OSPfs *, OSMesgQueue *, int);
|
||||
s32 osPfsChecker(OSPfs *);
|
||||
s32 osPfsAllocateFile(OSPfs *, u16, u32, u8 *, u8 *, int, s32 *);
|
||||
s32 osPfsFindFile(OSPfs *, u16, u32, u8 *, u8 *, s32 *);
|
||||
s32 osPfsDeleteFile(OSPfs *, u16, u32, u8 *, u8 *);
|
||||
s32 osPfsReadWriteFile(OSPfs *, s32, u8, int, int, u8 *);
|
||||
s32 osPfsFileState(OSPfs *, s32, OSPfsState *);
|
||||
s32 osPfsGetLabel(OSPfs *, u8 *, int *);
|
||||
s32 osPfsSetLabel(OSPfs *, u8 *);
|
||||
s32 osPfsIsPlug(OSMesgQueue *, u8 *);
|
||||
s32 osPfsFreeBlocks(OSPfs *, s32 *);
|
||||
s32 osPfsNumFiles(OSPfs *, s32 *, s32 *);
|
||||
s32 osPfsReSizeFile(OSPfs *pfs, u16 company_code, u32 game_code, u8 *game_name, u8 *ext_name, int length);
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
|
||||
Reference in new issue
Block a user