Enforce types.h typedefs (#193)

This commit is contained in:
Thaddeus Crews 2023-12-21 20:30:38 -06:00 committed by GitHub
parent db38c3c2cd
commit b758d29d33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
299 changed files with 1513 additions and 1480 deletions

View File

@ -52,7 +52,7 @@ struct ParmString : public BaseParm {
};
struct ParmEnum : public BaseParm {
ParmEnum(Parameters*, char**, u32, int, long, char*);
ParmEnum(Parameters*, char**, u32, int, s32, char*);
inline virtual int size() { return 4; }
virtual void write(Stream&);
virtual void read(Stream&);

View File

@ -40,10 +40,10 @@ struct Mgr : public CNode {
P2JME::Caption::TControl* getFreeMessage();
void reset();
void resetMessageObjs();
void update(long);
void update(s32);
// Unused/inlined:
void setCurrentNode(long);
void setCurrentNode(s32);
P2JME::Caption::TControl* mControls; // _18
Node* mNode; // _1C

View File

@ -32,7 +32,7 @@ void* OSAllocFromHeap(OSHeapHandle heap, u32 size);
void* OSAllocFixed(void** rStart, void** rEnd);
void OSDestroyHeap(OSHeapHandle heap);
void OSAddToHeap(OSHeapHandle heap, void* start, void* end);
long OSCheckHeap(OSHeapHandle heap);
s32 OSCheckHeap(OSHeapHandle heap);
void OSDumpHeap(OSHeapHandle heap);
u32 OSReferentSize(void* ptr);
void OSVisitAllocated(OSAllocVisitor visitor);

View File

@ -22,7 +22,7 @@ typedef u32 OSInterruptMask;
// Last interrupts.
extern volatile __OSInterrupt __OSLastInterrupt; // one of the Interrupt Codes below.
extern volatile u32 __OSLastInterruptSrr0; // SRR0 value at time of interrupt.
extern vu32 __OSLastInterruptSrr0; // SRR0 value at time of interrupt.
extern volatile OSTime __OSLastInterruptTime; // time of interrupt (from OSGetTime()).
// Interrupt global addresses.

View File

@ -113,7 +113,7 @@ BOOL OSJoinThread(OSThread* thread, void** val);
BOOL OSSetThreadPriority(OSThread* thread, OSPriority prio);
OSThread* OSSetIdleFunction(OSIdleFunction idleFunc, void* param, void* stack, u32 stackSize);
OSThread* OSGetIdleFunction();
long OSCheckActiveThreads();
s32 OSCheckActiveThreads();
//////////////////////////////////

View File

@ -44,14 +44,14 @@ DECL_SECT(".init") extern char _SDA2_BASE_[];
typedef struct __rom_copy_info {
char* rom;
char* addr;
unsigned int size;
uint size;
} __rom_copy_info;
DECL_SECT(".init") extern __rom_copy_info _rom_copy_info[];
typedef struct __bss_init_info {
char* addr;
unsigned int size;
uint size;
} __bss_init_info;
DECL_SECT(".init") extern __bss_init_info _bss_init_info[];

View File

@ -15,7 +15,7 @@ extern "C" {
#define __frsqrte(x) (x)
#endif
#define FABS(x) (float)__fabs(x)
#define FABS(x) (f32) __fabs(x)
#define fabs(x) __fabs(x)
// #define __frsqrtes opword
@ -66,7 +66,7 @@ static inline f32 dolsqrtf(f32 x)
{
static const f64 _half = .5;
static const f64 _three = 3.0;
volatile f32 y;
vf32 y;
if (x > 0.0f) {
f64 guess = __frsqrte((f64)x); // returns an approximation to

View File

@ -6,7 +6,7 @@ extern "C" {
#endif // ifdef __cplusplus
#ifndef size_t
typedef unsigned long size_t;
typedef u32 size_t;
#endif
DECL_SECT(".init") void* memcpy(void*, const void*, size_t);
@ -40,7 +40,7 @@ typedef __va_list va_list;
extern void __builtin_va_info(va_list*);
#endif
void* __va_arg(va_list v_list, unsigned char type);
void* __va_arg(va_list v_list, u8 type);
#define va_start(ap, fmt) ((void)fmt, __builtin_va_info(&ap))
#define va_arg(ap, t) (*((t*)__va_arg(ap, _var_arg_typeof(t))))

View File

@ -172,7 +172,7 @@ struct RandMapMgr : public CNode {
void create();
int getNumRooms();
char* getUseUnitName(int placedNodeIndex);
char* getRoomData(int placedNodeIndex, float& x, float& y, int& direction);
char* getRoomData(int placedNodeIndex, f32& x, f32& y, int& direction);
RoomLink* makeRoomLink(int placedNodeIndex);
ObjectLayoutInfo* makeObjectLayoutInfo(int placedNodeIndex);
void getStartPosition(Vector3f& position, int index);

View File

@ -105,8 +105,7 @@ enum DropGroup {
};
// Interface for specific overrides (e.g. PelplantInitialParams)
struct EnemyInitialParamBase {
};
struct EnemyInitialParamBase { };
struct EnemyKillArg : public CreatureKillArg {
inline EnemyKillArg(int flag)

View File

@ -237,7 +237,7 @@ struct MoviePlayer : public JKRDisposer {
void skip();
bool start(Camera*);
bool stop();
void unsuspend(long, bool);
void unsuspend(s32, bool);
bool update(Controller*, Controller*);
// unused/inlined
@ -249,7 +249,7 @@ struct MoviePlayer : public JKRDisposer {
void hasSuspendedContext();
void getSuspendedContext();
void do_stop();
void suspend(long);
void suspend(s32);
void isLoadingBlack();
void draw2d();

View File

@ -58,8 +58,8 @@ struct THPPlayer : public JKRDisposer, public CNode {
// vtable 2 (CNode + self)
virtual void update(); // _1C
virtual void draw(Graphics&); // _20
virtual void draw(Graphics&, long, long, u32, u32); // _24
virtual void draw(Graphics&, long, long, f32); // _28
virtual void draw(Graphics&, s32, s32, u32, u32); // _24
virtual void draw(Graphics&, s32, s32, f32); // _28
void load(EMovieIndex);
void load();

View File

@ -103,7 +103,7 @@ struct Cell {
CellLeg* mLeg; // _1C
Cell* mNextCell; // _20
Cell* mPrevCell; // _24
short mLayerIdx; // _28
s16 mLayerIdx; // _28
static CellPyramid* sCurrCellMgr;
};

View File

@ -115,7 +115,7 @@ struct MapUnit {
void save(Stream&);
void setupSizeInfo();
short _04; // _04
s16 _04; // _04
char* mName; // _08
J3DModelData* mModelData; // _0C
MapCollision mCollision; // _10

View File

@ -111,7 +111,7 @@ struct PelletMgr : public NodeObjectMgr<GenericObjectMgr> {
void makeOtakaraItemCode(char*, PelletMgr::OtakaraItemCode&);
void addMgr(BasePelletMgr*);
void setupSoundViewerAndBas();
void decode(long, u8&, int&);
void decode(s32, u8&, int&);
int encode(u8, int);
BasePelletMgr* getMgrByID(u8);
void calcNearestTreasure(Vector3f&, f32);
@ -270,13 +270,13 @@ struct Pellet : public DynCreature, public SysShape::MotionListener, public Carr
virtual void getLODSphere(Sys::Sphere& lodSphere); // _140
virtual void startPick(); // _148
virtual void endPick(bool); // _14C
virtual bool isSlotFree(short); // _168
virtual short getFreeStickSlot(); // _16C
virtual short getNearFreeStickSlot(Vector3f&); // _170
virtual short getRandomFreeStickSlot(); // _174
virtual void onSlotStickStart(Creature*, short); // _178
virtual void onSlotStickEnd(Creature*, short); // _17C
virtual void calcStickSlotGlobal(short, Vector3f&); // _180
virtual bool isSlotFree(s16); // _168
virtual s16 getFreeStickSlot(); // _16C
virtual s16 getNearFreeStickSlot(Vector3f&); // _170
virtual s16 getRandomFreeStickSlot(); // _174
virtual void onSlotStickStart(Creature*, s16); // _178
virtual void onSlotStickEnd(Creature*, s16); // _17C
virtual void calcStickSlotGlobal(s16, Vector3f&); // _180
virtual bool stimulate(Interaction& data); // _1A4
virtual char* getCreatureName(); // _1A8
virtual s32 getCreatureID(); // _1AC
@ -474,7 +474,7 @@ struct Pellet : public DynCreature, public SysShape::MotionListener, public Carr
int mMaxCarriers; // _3DC
f32 mAngleOffset; // _3E0
PelletSlots mSlots; // _3E4
short mSlotCount; // _3F4
s16 mSlotCount; // _3F4
u8 _3F6; // _3F6
u32 mPikminCount[PikiColorCount]; // _3F8
u32 mTotalCarriers; // _414, might be for non-pikmin carriers?

View File

@ -120,7 +120,7 @@ struct J2DPictureBlockTrailer {
u16 _04; // _04
u8 _06[2]; // _06 - padding?
s16 _08[2][2]; // _08
JGeometry::TVec2<short> _10[4]; // _10
JGeometry::TVec2<s16> _10[4]; // _10
_GXColor _20[4]; // _20
};
@ -564,7 +564,7 @@ struct J2DPicture : public J2DPane {
virtual JUtility::TColor getWhite() const { return mWhite; } // _138 (weak)
virtual J2DMaterial* getMaterial() const { return nullptr; } // _13C (weak)
virtual void drawFullSet(f32, f32, f32, f32, f32 (*)[3][4]); // _140
virtual void drawTexCoord(f32, f32, f32, f32, short, short, short, short, short, short, short, short, f32 (*)[3][4]); // _144
virtual void drawTexCoord(f32, f32, f32, f32, s16, s16, s16, s16, s16, s16, s16, s16, f32 (*)[3][4]); // _144
virtual u8 getUsableTlut(u8); // _148
void initinfo();
@ -688,7 +688,7 @@ struct J2DPictureEx : public J2DPicture {
virtual JUtility::TColor getWhite() const; // _138
virtual J2DMaterial* getMaterial() const; // _13C (weak)
virtual void drawFullSet(f32, f32, f32, f32, f32 (*)[3][4]); // _140
virtual void drawTexCoord(f32, f32, f32, f32, short, short, short, short, short, short, short, short, f32 (*)[3][4]); // _144
virtual void drawTexCoord(f32, f32, f32, f32, s16, s16, s16, s16, s16, s16, s16, s16, f32 (*)[3][4]); // _144
virtual u8 getUsableTlut(u8); // _148
void initialize(u32);

View File

@ -34,7 +34,7 @@ struct J2DPrint {
void doCtrlCode(int);
void doEscapeCode(const u8**, u8);
void initchar();
void getNumberS32(const u8**, long, long, int);
void getNumberS32(const u8**, s32, s32, int);
void getNumberF32(const u8**, f32, f32, int);
// unused/inlined:
@ -64,7 +64,7 @@ struct J2DPrint {
f32 _14; // _14
f32 _18; // _18
f32 _1C; // _1C
short _20; // _20
s16 _20; // _20
u8 _22; // _22 - could be padding
f32 _24; // _24
f32 _28; // _28
@ -79,7 +79,7 @@ struct J2DPrint {
f32 _4C; // _4C
f32 mGlyphWidth; // _50
f32 mGlyphHeight; // _54
short _58; // _58
s16 _58; // _58
u8 _5A; // _5A
};

View File

@ -8,7 +8,7 @@ struct J3DFrameCtrl {
virtual ~J3DFrameCtrl() { } // _08 (weak)
void init(short);
void init(s16);
void update();
// _00 VTBL

View File

@ -11,7 +11,7 @@ void J3DCalcBBoardMtx(f32 (*)[4]);
void J3DCalcYBBoardMtx(f32 (*)[4]);
void J3DPSCalcInverseTranspose(f32 (*)[4], f32 (*)[3]);
void J3DGetTranslateRotateMtx(const J3DTransformInfo&, f32 (*)[4]);
void J3DGetTranslateRotateMtx(short, short, short, f32, f32, f32, f32 (*)[4]);
void J3DGetTranslateRotateMtx(s16, s16, s16, f32, f32, f32, f32 (*)[4]);
void J3DGetTextureMtx(const J3DTextureSRTInfo&, const Vec&, f32 (*)[4]);
void J3DGetTextureMtxOld(const J3DTextureSRTInfo&, const Vec&, f32 (*)[4]);
void J3DGetTextureMtxMaya(const J3DTextureSRTInfo&, f32 (*)[4]);

View File

@ -51,10 +51,10 @@ struct DataLoadMgrNode : virtual public DataMgrBase {
virtual JKRHeap* getObjHeap() = 0; // _14
virtual JKRHeap* getDataHeap() = 0; // _18
virtual bool initInstance(void*, long) = 0; // _1C
virtual bool initInstance(void*, s32) = 0; // _1C
virtual bool initInstance() = 0; // _20
bool initInstanceExt(void*, long);
bool initInstanceExt(void*, s32);
void setFlagsAsExternal(void*);
// unused/inlined:
@ -97,7 +97,7 @@ struct DataMgrNode : public DataLoadMgrNode {
virtual void init() { DataLoadMgrNode::init(); } // _10 (weak)
virtual JKRHeap* getObjHeap() = 0; // _14
virtual JKRHeap* getDataHeap() = 0; // _18
virtual bool initInstance(void*, long) = 0; // _1C
virtual bool initInstance(void*, s32) = 0; // _1C
virtual bool initInstance() = 0; // _20
virtual char* getPath() { return mPath; } // _24 (weak)
virtual void setPath(char* path) { DataLoadMgrNode::setPath(path); } // _28 (weak)
@ -121,7 +121,7 @@ struct PrmDataMgrNode : public DataMgrNode {
virtual ~PrmDataMgrNode<A, B>() { } // _08 (weak)
virtual JKRHeap* getObjHeap(); // _14 (weak)
virtual JKRHeap* getDataHeap(); // _18 (weak)
virtual bool initInstance(void* buffer, long bufferLength)
virtual bool initInstance(void* buffer, s32 bufferLength)
{
bool success = initInstance();
if (success != false) {

View File

@ -50,7 +50,7 @@ struct JAIBasic {
static u8 checkAudioStopStatus();
static void stopAudio(u32, bool);
static long stopCallBack(void*);
static s32 stopCallBack(void*);
static u16 setParameterSeqSync(JASTrack*, u16);
template <typename T>
@ -87,7 +87,7 @@ struct JAIBasic {
void changeSoundScene(u32);
void setSeCancelSwitch(u8, u8);
void setSeCategoryVolume(u8, u8);
void allocStreamBuffer(void*, long);
void allocStreamBuffer(void*, s32);
void deallocStreamBuffer();
void resumeAudio();

View File

@ -21,8 +21,8 @@ void setParamInitDataFileName(char*);
void setParamSequenceArchivesFileName(char*);
void setParamDistanceParameterMoveTime(u8);
void setParamAudioCameraMax(u32);
void setParamSystemTrackMax(long);
void setParamSystemRootTrackMax(long);
void setParamSystemTrackMax(s32);
void setParamSystemRootTrackMax(s32);
void setParamSoundOutputMode(u32);
u32 getParamSeCategoryMax();
u32 getParamSoundSceneMax();
@ -112,8 +112,8 @@ void setParamStreamParameterLines(u8);
void setParamStreamPath(char*);
bool getParamStreamUseOffFlag();
void setParamStreamUseOffFlag(bool);
long getParamSystemTrackMax();
long getParamSystemRootTrackMax();
s32 getParamSystemTrackMax();
s32 getParamSystemRootTrackMax();
void setParamWavePath(char*);
extern u8 distanceParameterMoveTime;
@ -154,8 +154,8 @@ extern u32 dummyObjectLifeTime;
extern u32 dummyObjectMax;
extern u32 seqMuteMoveSpeedSePlay;
extern u32 audioCameraMax;
extern long systemTrackMax;
extern long systemRootTrackMax;
extern s32 systemTrackMax;
extern s32 systemRootTrackMax;
extern f32 panDistanceMax;
extern f32 panDistance2Max;
extern f32 panAngleParameter;

View File

@ -52,7 +52,7 @@ struct JAISequence : public JAISound {
void setSeqInterDolby(u8, f32, u32);
void setSeqTempoProportion(f32, u32);
void setSeqPortData(u8, u16, u32);
void setWaveReadMode(long, long);
void setWaveReadMode(s32, s32);
void setTrackVolume(u8, f32, u32);
void setTrackVolumeMulti(u8, u32, f32, u32);
void setTrackMuteSwitch(u8, u8);

View File

@ -79,7 +79,7 @@ struct JAISound : public JSULink<JAISound> {
virtual void setPrepareFlag(u8); // _A8
virtual void checkReady(); // _AC
virtual void setDistanceParameterMoveTime(u8); // _B0 (weak)
virtual void setAdjustPriority(short); // _B4 (weak)
virtual void setAdjustPriority(s16); // _B4 (weak)
virtual f32 setPositionDopplarCommon(u32); // _B8
virtual f32 setDistanceVolumeCommon(f32, u8); // _BC
virtual f32 setDistancePanCommon(); // _C0

View File

@ -202,7 +202,7 @@ struct SeParameter {
}
u8 _00[0x20]; // _00 - unknown
short _20; // _20
s16 _20; // _20
u8 _22[0x2]; // _22 - possibly padding
MoveParaSet _24[16]; // _24
MoveParaSet _124[8]; // _124
@ -268,7 +268,7 @@ struct SeqParameter : MoveParaSet {
u16** _274; // _274
u8 _278; // _278 - auto heap index?
u8 _279; // _279
short _27A; // _27A
s16 _27A; // _27A
u32 _27C; // _27C
u32 _280; // _280 - from here to (and including) _2B0 might be an array...
u32 _284; // _284
@ -320,7 +320,7 @@ void outerInit(SeqUpdateData*, JASTrack*, u32, u16, u8);
void setSePortParameter(JASPortArgs*);
// unused/inlined:
void setSeqPortargsPS16(JAInter::SeqUpdateData*, u32, u8, short*);
void setSeqPortargsPS16(JAInter::SeqUpdateData*, u32, u8, s16*);
JASTrack* trackToSeqp(JASTrack*, u8, u32);
void setPortParameter(JASPortArgs*, JASTrack*, u32, u32);
void JAIouterP(void*);

View File

@ -39,27 +39,27 @@ inline void assignWaveBanks()
typedef void (*LoadCallback)();
typedef void (*InitCallback)();
typedef void (*SceneSetFinishCallback)(long, long);
typedef void (*SceneSetFinishCallback)(s32, s32);
void finishSceneSet(u32);
void init();
void loadFirstStayWave();
void loadGroupWave(long, long);
void loadGroupWave(s32, s32);
void loadSecondStayWave();
void setFirstLoadCallback(LoadCallback);
void setInitCallback(InitCallback);
void setSecondLoadCallback(LoadCallback);
// unused/inlined:
void setWsGroupNumber(long, long);
void setWsLoadStatus(long, long);
long getWsGroupNumber(long);
long getWsLoadStatus(long);
void setWsGroupNumber(s32, s32);
void setWsLoadStatus(s32, s32);
s32 getWsGroupNumber(s32);
s32 getWsLoadStatus(s32);
void readInitSoundData();
void setSceneSetFinishCallback(SceneSetFinishCallback);
void loadSceneWave(long, long);
void checkSceneWaveOnMemory(long, long);
long getWaveGroupNumber(long);
long getWaveLoadStatus(long);
void loadSceneWave(s32, s32);
void checkSceneWaveOnMemory(s32, s32);
s32 getWaveGroupNumber(s32);
s32 getWaveLoadStatus(s32);
void checkAllWaveLoadStatus();
extern union Flags {
@ -74,8 +74,8 @@ extern int SceneSetFlag;
extern InitCallback initCallback;
extern LoadCallback firstLoadCallback;
extern LoadCallback secondLoadCallback;
extern long* wsGroupNumber;
extern long* wsLoadStatus;
extern s32* wsGroupNumber;
extern s32* wsLoadStatus;
extern int wsMax;
} // namespace BankWave
} // namespace JAInter

View File

@ -48,7 +48,7 @@ struct StreamUpdate {
JAIStream* _1C;
};
typedef BufferInfo (*AllocCallback)(long);
typedef BufferInfo (*AllocCallback)(s32);
typedef void (*DeallocCallback)();
typedef void (*ExternalAramBufferCallback)(JASHeap*);
typedef void (*MgrCallback)();
@ -62,7 +62,7 @@ void changeCallback();
void processGFrameStream();
void checkEntriedStream();
void systemCallBack(u32, JASAramStream*, void*);
void prepareSystem(long);
void prepareSystem(s32);
void playDirect(char* path);
void stopDirect();
void initChannel();

View File

@ -31,7 +31,7 @@ struct JASAramStream {
JASAramStream();
void init(u32, u32, JASAramStreamCallback, void*);
BOOL prepare(long inode, int p2);
BOOL prepare(s32 inode, int p2);
BOOL start();
int stop(u16);
bool pause(bool);
@ -49,8 +49,8 @@ struct JASAramStream {
static bool loadToAramTask(void*);
static void finishTask(void*);
static void prepareFinishTask(void*);
static long channelProcCallback(void*);
static long dvdErrorCheck(void*);
static s32 channelProcCallback(void*);
static s32 dvdErrorCheck(void*);
static void channelCallback(u32, JASChannel*, JASDsp::TChannel*, void*);
// unused/inlined:

View File

@ -21,7 +21,7 @@ struct JASAudioThread : public JKRThread {
static void DMACallback();
static void DSPCallback(void*);
static void create(long);
static void create(s32);
static void stop();
// unused/inlined:

View File

@ -78,7 +78,7 @@ struct TVmap {
JASBasicBank* createBasicBank(void* stream);
JASOscillator::Data* findOscPtr(JASBasicBank*, THeader*, TOsc*);
short* getOscTableEndPtr(short*);
s16* getOscTableEndPtr(s16*);
// unused/inlined:
u32 getUsedHeapSize();

View File

@ -5,7 +5,7 @@
#include "types.h"
namespace JASCalc {
void imixcopy(const short*, const short*, short*, u32);
void imixcopy(const s16*, const s16*, s16*, u32);
void bcopy(const void*, void*, u32);
void bzero(void*, u32);
@ -39,12 +39,12 @@ inline f32 clamp01(f32 value)
}
// unused/inlined:
void mixcopy(const short*, const short*, short*, u32);
void mixcopy(const s16*, const s16*, s16*, u32);
void bcopyfast(const void*, void*, u32);
void bzerofast(void*, u32);
void hannWindow(short*, u32);
void hammWindow(short*, u32);
void fft(f32*, f32*, u32, long);
void hannWindow(s16*, u32);
void hammWindow(s16*, u32);
void fft(f32*, f32*, u32, s32);
} // namespace JASCalc
#endif

View File

@ -3,7 +3,7 @@
#include "types.h"
typedef long JASCallback(void*);
typedef s32 JASCallback(void*);
struct JASCallbackMgr {
struct TCallback {

View File

@ -38,9 +38,9 @@ struct JASChannel : JSULink<JASChannel>,
BOOL playForce();
void release(u16);
void updateEffectorParam(JASDsp::TChannel*, u16*, const EffectOscParam&);
static long dspUpdateCallback(u32, JASDsp::TChannel*, void*);
static s32 dspUpdateCallback(u32, JASDsp::TChannel*, void*);
void initialUpdateDSPChannel(JASDsp::TChannel*);
long updateDSPChannel(JASDsp::TChannel*);
s32 updateDSPChannel(JASDsp::TChannel*);
f32 calcEffect(const PanVector*, const PanVector*, u8);
f32 calcPan(const PanVector*, const PanVector*, u8);
void updateAutoMixer(JASDsp::TChannel*, f32, f32, f32, f32);
@ -110,9 +110,9 @@ struct JASChannelUpdater {
f32 _08; // _08
f32 _0C; // _0C
f32 _10; // _10
short _14; // _14
s16 _14; // _14
u16 _16[7]; // _16 - unknown
short _24; // _24
s16 _24; // _24
u16 _26[3]; // _26 - unknown
u8 _2C[8]; // _2C - unknown
s16 _34; // _34 - unknown

View File

@ -113,7 +113,7 @@ struct TChannel {
s16 mFir8FilterParam[8]; // _120
u8 _130[0x18]; // _130
s16 mIirFilterParam[4]; // _148
short mDistFilter; // _150
s16 mDistFilter; // _150
};
struct FxlineConfig_ {
@ -144,11 +144,11 @@ f32 getDSPMixerLevel();
TChannel* getDSPHandle(int index);
void invalChannelAll();
void initBuffer();
bool setFXLine(u8, short*, JASDsp::FxlineConfig_*);
bool setFXLine(u8, s16*, JASDsp::FxlineConfig_*);
// unused/inlined:
void getDSPHandleNc(int);
void setFilterTable(short*, short*, u32);
void setFilterTable(s16*, s16*, u32);
void flushBuffer();
void flushChannelAll();
void cacheChannelAll();
@ -166,7 +166,7 @@ extern const u16 DSPRES_FILTER[640];
} // namespace JASDsp
struct JASDSPChannel {
typedef long (*Callback)(u32, JASDsp::TChannel*, void*);
typedef s32 (*Callback)(u32, JASDsp::TChannel*, void*);
JASDSPChannel();
void free();
void start();

View File

@ -19,7 +19,7 @@ struct DVDThreadCheckBackArgs {
};
void checkPassDvdT(u32, u32*, JASDvdCallback);
bool createThread(long, int, u32);
bool createThread(s32, int, u32);
void dvdThreadCheckBack(void*);
JASTaskThread* getThreadPointer();

View File

@ -16,20 +16,20 @@ JASCmdHeap* getCommandHeap();
JASHeap* getAramHeap();
void setupAramHeap(u32, u32);
void probeFinish(long);
void probeStart(long, char*);
void probeFinish(s32);
void probeStart(s32, char*);
// unused/inlined:
JKRSolidHeap* getRootHeap();
int getAramFreeSize();
int getAramSize();
void initProbe(long);
void initProbe(s32);
void resetProbe();
const char* getProbeName(long);
void getProbeLast(long);
void getProbeAvg(long);
void getProbeTotalAvg(long);
void getProbeMax(long);
const char* getProbeName(s32);
void getProbeLast(s32);
void getProbeAvg(s32);
void getProbeTotalAvg(s32);
void getProbeMax(s32);
}; // namespace JASKernel

View File

@ -7,8 +7,8 @@ struct JASOscillator {
struct Data {
u32 _00; // _00 - unknown
f32 _04; // _04
short* _08; // _08 - unknown
const short* _0C; // _0C - unknown pointer
s16* _08; // _08 - unknown
const s16* _0C; // _0C - unknown pointer
f32 _10; // _10
f32 _14; // _14
};
@ -20,7 +20,7 @@ struct JASOscillator {
void incCounter();
f32 getValue() const;
bool release();
f32 calc(const short*);
f32 calc(const s16*);
// unused/inlined
void forceStop();
@ -31,7 +31,7 @@ struct JASOscillator {
f32 _0C; // _0C
f32 _10; // _10
f32 _14; // _14
short _18; // _18
s16 _18; // _18
u16 _1A; // _1A
u8 _1C; // _1C
u8 _1D; // _1D

View File

@ -12,7 +12,7 @@ struct JASProbe {
void stop();
char* mName; // _00
long mStartTime; // _04
s32 mStartTime; // _04
f32 _08; // _08
f32 _0C; // _0C
f32 _10; // _10

View File

@ -74,7 +74,7 @@ struct JASOuterParam {
void setOuterUpdate(u16 newValue);
u16 getOuterUpdate();
s16 getIntFirFilter(u8 index);
void setFirFilter(short*);
void setFirFilter(s16*);
void onSwitch(u16);
f32 getTempo() const;
@ -168,11 +168,11 @@ struct JASTrack : JSUList<JASChannel> {
bool tryInterrupt();
void assignExtBuffer(JASOuterParam*);
void connectBus(int, int);
int noteOn(u8, long, long, long, u32);
int noteOn(u8, s32, s32, s32, u32);
void overwriteOsc(JASChannel*);
bool noteOff(u8, u16);
int gateOn(u8, long, long, long);
BOOL checkNoteStop(long);
int gateOn(u8, s32, s32, s32);
BOOL checkNoteStop(s32);
void oscSetupFull(u8, u32, u32);
void oscSetupSimpleEnv(u8, u32);
void oscSetupSimple(u8);
@ -181,9 +181,9 @@ struct JASTrack : JSUList<JASChannel> {
void updateTrack(u32);
void updateTempo();
void updateSeq(u32, bool);
void seqTimeToDspTime(long, u8);
void seqTimeToDspTime(s32, u8);
void setParam(int, f32, int);
bool setSeqData(u8*, long);
bool setSeqData(u8*, s32);
bool startSeq();
bool stopSeq();
void stopSeqMain();
@ -209,7 +209,7 @@ struct JASTrack : JSUList<JASChannel> {
void setNoteMask(u8);
void muteTrack(bool);
static long rootCallback(void*);
static s32 rootCallback(void*);
static void channelUpdateCallback(u32, JASChannel*, JASDsp::TChannel*, void*);
static void newMemPool(int);
static void registerSeqCallback(SeqCallback);
@ -257,7 +257,7 @@ struct JASTrack : JSUList<JASChannel> {
u8 _298[0x10]; // _298 - unknown
JASOscillator::Data _2A8[2]; // _2A8
u32 _2D8[2]; // _2D8
short _2E0[12]; // _2E0
s16 _2E0[12]; // _2E0
JASTrack* _2F8; // _2F8
JASTrack* _2FC[16]; // _2FC
JASOuterParam* mExtBuffer; // _33C

View File

@ -8,7 +8,7 @@ struct JASWaveArc : public JASDisposer {
/** @fabricated */
struct LoadToAramCallbackArgs {
JASWaveArc* mArc; // _00
long mFileNumber; // _04
s32 mFileNumber; // _04
u8* _08; // _08
u32 _0C; // _0C
};
@ -34,7 +34,7 @@ struct JASWaveArc : public JASDisposer {
void execLoad();
bool loadBlock(JASHeap*);
bool loadBlockTail(JASHeap*);
void setEntryNum(long);
void setEntryNum(s32);
JASHeap mHeap; // _04
u32 _48; // _48

View File

@ -1,6 +1,7 @@
#ifndef _JSYSTEM_JFW_JFWDISPLAY_H
#define _JSYSTEM_JFW_JFWDISPLAY_H
#include "types.h"
#include "JSystem/JUtility/TColor.h"
#include "JSystem/JUtility/JUTFader.h"
#include "JSystem/JUtility/JUTXfb.h"
@ -31,7 +32,7 @@ struct JFWDisplay {
static JFWDisplay* createManager(const _GXRenderModeObj*, JKRHeap*, JUTXfb::EXfbNumber, bool);
static void destroyManager();
void waitBlanking(int);
void threadSleep(long long);
void threadSleep(s64);
void clearEfb_init();
void clearEfb(GXColor);
void clearEfb(int, int, int, int, GXColor);

View File

@ -20,9 +20,9 @@ struct JFWSystem {
static size_t fifoBufSize;
static u32 aramAudioBufSize;
static u32 aramGraphBufSize;
static long streamPriority;
static long decompPriority;
static long aPiecePriority;
static s32 streamPriority;
static s32 decompPriority;
static s32 aPiecePriority;
static ResFONT* systemFontRes;
static GXRenderModeObj* renderMode;
static u32 exConsoleBufferSize;

View File

@ -5,7 +5,7 @@
#include "types.h"
#include "stl/float.h"
inline float fsqrt_step(float mag)
inline f32 fsqrt_step(f32 mag)
{
f32 root = __frsqrte(mag);
return 0.5f * root * (3.0f - mag * (root * root));

View File

@ -108,13 +108,13 @@ struct JKRDecompCommand {
// Size: 0x7C
struct JKRDecomp : public JKRThread {
JKRDecomp(long);
JKRDecomp(s32);
virtual ~JKRDecomp(); // _08
virtual void* run(); // _0C
static JKRCompression checkCompressed(u8*);
static JKRDecomp* create(long);
static JKRDecomp* create(s32);
static void decode(u8*, u8*, u32, u32);
static void decodeSZP(u8*, u8*, u32, u32);
static void decodeSZS(u8*, u8*, u32, u32);
@ -133,7 +133,7 @@ inline void JKRDecompress(u8* srcBuffer, u8* dstBuffer, u32 srcLength, u32 dstLe
JKRDecomp::orderSync(srcBuffer, dstBuffer, srcLength, dstLength);
}
inline JKRDecomp* JKRCreateDecompManager(long priority) { return JKRDecomp::create(priority); }
inline JKRDecomp* JKRCreateDecompManager(s32 priority) { return JKRDecomp::create(priority); }
inline int JKRCheckCompressed_noASR(u8* buf)
{

View File

@ -28,10 +28,10 @@ struct JKRDvdRipper {
};
static void* loadToMainRAM(const char*, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32, int*, u32*);
static void* loadToMainRAM(long, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32, int*, u32*);
static void* loadToMainRAM(s32, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32, int*, u32*);
static void* loadToMainRAM(JKRDvdFile*, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32, int*, u32*);
static void* loadToMainRAMAsync(const char*, u8*, JKRExpandSwitch, u32, JKRHeap*, u32*);
static void* loadToMainRAMAsync(long, u8*, JKRExpandSwitch, u32, JKRHeap*, u32*);
static void* loadToMainRAMAsync(s32, u8*, JKRExpandSwitch, u32, JKRHeap*, u32*);
static void syncAll(int);
static void countLeftSync();

View File

@ -75,7 +75,7 @@ struct JKRDvdFile : public JKRFile {
inline DVDFileInfo* getFileInfo() { return &mDvdPlayer; }
void initiate();
long sync();
s32 sync();
static void doneProcess(s32 result, DVDFileInfo* info);

View File

@ -36,7 +36,7 @@ struct JKRFileFinder : public JKRFileFinderBase {
};
struct JKRArcFinder : public JKRFileFinder {
JKRArcFinder(JKRArchive*, long, long);
JKRArcFinder(JKRArchive*, s32, s32);
virtual ~JKRArcFinder() { } // _08 (weak)
virtual bool findNextFile(); // _0C

View File

@ -20,14 +20,14 @@ struct JKRFileLoader : public JKRDisposer {
virtual void removeResourceAll() = 0; // _24
virtual bool removeResource(void*) = 0; // _28
virtual bool detachResource(void*) = 0; // _2C
virtual long getResSize(const void*) const = 0; // _30
virtual s32 getResSize(const void*) const = 0; // _30
virtual u32 countFile(const char*) const = 0; // _34
virtual JKRFileFinder* getFirstFile(const char*) const = 0; // _38
static void* getGlbResource(char const*);
static void* getGlbResource(char const*, JKRFileLoader*);
static JKRFileLoader* findVolume(char const**);
static const char* fetchVolumeName(char*, long, char const*);
static const char* fetchVolumeName(char*, s32, char const*);
bool isMounted() const { return mIsMounted; }
u32 getVolumeType() const { return mMagicWord; }

View File

@ -236,7 +236,7 @@ inline f32 fastReciprocal(f32 value) { return JMAFastReciprocal(value); }
} // namespace JMath
void JMAEulerToQuat(short, short, short, Quaternion*);
void JMAEulerToQuat(s16, s16, s16, Quaternion*);
void JMAQuatLerp(const Quaternion*, const Quaternion*, f32, Quaternion*);
void JMALagrangeInterpolation(int, f32*, f32*, f32);
void JMAFastVECMag(const Vec*);

View File

@ -409,7 +409,7 @@ struct JPAEmitterWorkData {
int mPlaneType; // _208
int mDLType; // _20C
int mPrjType; // _210
short mClrKeyFrame; // _214
s16 mClrKeyFrame; // _214
u8 mDrawCount; // _216
};

View File

@ -4,10 +4,10 @@
#include "Dolphin/mtx.h"
#include "JSystem/JGeometry.h"
void JPAConvertFixToFloat(short);
void JPAConvertFixToFloat(s16);
void JPAGetDirMtx(const JGeometry::TVec3<f32>&, Mtx);
void JPAGetYZRotateMtx(short, short, Mtx);
void JPAGetXYZRotateMtx(short, short, short, Mtx);
void JPAGetYZRotateMtx(s16, s16, Mtx);
void JPAGetXYZRotateMtx(s16, s16, s16, Mtx);
void JPASetRMtxfromMtx(const Mtx, Mtx);
void JPASetRMtxTVecfromMtx(const Mtx, Mtx, JGeometry::TVec3f*);
void JPASetRMtxSTVecfromMtx(const Mtx, Mtx, JGeometry::TVec3f*, JGeometry::TVec3f*);

View File

@ -72,11 +72,11 @@ struct JUTException : public JKRThread {
void printContext(u16, OSContext*, u32, u32);
void createFB();
static void waitTime(long);
static void waitTime(s32);
static JUTExceptionHandler setPreUserCallback(JUTExceptionHandler);
static void appendMapFile(const char*);
static bool queryMapAddress(char*, u32, long, u32*, u32*, char*, u32, bool, bool);
static bool queryMapAddress_single(char*, u32, long, u32*, u32*, char*, u32, bool, bool);
static bool queryMapAddress(char*, u32, s32, u32*, u32*, char*, u32, bool, bool);
static bool queryMapAddress_single(char*, u32, s32, u32*, u32*, char*, u32, bool, bool);
static JUTException* create(JUTDirectPrint*);
static void createConsole(void* buffer, u32 bufferSize);

View File

@ -88,9 +88,9 @@ struct MemoryCardMgr {
void setCommand(int);
bool setCommand(MemoryCardMgrCommandBase*);
void releaseCurrentCommand();
bool write(ECardSlot, const char*, u8*, long, long);
bool write(ECardSlot, const char*, u8*, s32, s32);
bool checkCardStat(ECardSlot, CARDFileInfo*);
bool read(ECardSlot, const char*, u8*, long, long);
bool read(ECardSlot, const char*, u8*, s32, s32);
void format(ECardSlot);
void attach(ECardSlot);
void detach(ECardSlot);

View File

@ -45,8 +45,8 @@ struct TControl : public P2JME::Window::TControl {
virtual void createSequenceProcessor() { mSequenceProc = new Caption::TSequenceProcessor(getReference(), this); } // _40 (weak)
virtual void createRenderingProcessor() { mTextRenderProc = new Caption::TRenderingProcessor(getReference()); } // _44 (weak)
bool updateSetFrame(long);
void start(char*, long, long);
bool updateSetFrame(s32);
void start(char*, s32, s32);
// _00 = VTBL
// _00-_5C = P2JME::Window::TControl

View File

@ -24,19 +24,19 @@ struct Module : public JADUtility::PrmSetBase {
// _00 = VTABLE
// _04-_64 = PrmSetBase
JADUtility::PrmSlider<short> _64; // _64
JADUtility::PrmSlider<short> _94; // _94
JADUtility::PrmSlider<s16> _64; // _64
JADUtility::PrmSlider<s16> _94; // _94
JADUtility::PrmSlider<u8> _C4; // _C4
JADUtility::PrmRadioButton<s8> _F4; // _F4
JADUtility::PrmSlider<u8> _124; // _124
JADUtility::PrmSlider<u8> _154; // _154
JADUtility::PrmSlider<short> _184; // _184
JADUtility::PrmSlider<short> _1B4; // _1B4
JADUtility::PrmSlider<short> _1E4; // _1E4
JADUtility::PrmSlider<s16> _184; // _184
JADUtility::PrmSlider<s16> _1B4; // _1B4
JADUtility::PrmSlider<s16> _1E4; // _1E4
JADUtility::PrmSlider<u8> _214; // _214
JADUtility::PrmSlider<u8> _244; // _244
JADUtility::PrmRadioButton<u8> _274; // _274
short _2A4; // _2A4
s16 _2A4; // _2A4
uint _2A8; // _2A8
u8 _2AC; // _2AC - unknown
uint _2B0; // _2B0

View File

@ -130,7 +130,7 @@ struct ActorDirector_TempoChange : public TempoChangeDirectorBase {
};
struct TrackOnDirectorBase : public SwitcherDirector {
TrackOnDirectorBase(int, const char*, long, long);
TrackOnDirectorBase(int, const char*, s32, s32);
virtual ~TrackOnDirectorBase() { } // _08 (weak)
virtual void directOnTrack(::PSSystem::SeqTrackBase&); // _20
@ -139,8 +139,8 @@ struct TrackOnDirectorBase : public SwitcherDirector {
// _00 = VTBL
// _00-_48 = SwitcherDirector
long mFadeInValue; // _48
long mFadeOutValue; // _4C
s32 mFadeInValue; // _48
s32 mFadeOutValue; // _4C
u8 mEnableType; // _50
};
@ -224,7 +224,7 @@ struct ExiteDirector : public TrackOnDirectorBase {
* @size{0x58}
*/
struct ActorDirector_TrackOn : public TrackOnDirectorBase {
ActorDirector_TrackOn(const char*, int, long, long);
ActorDirector_TrackOn(const char*, int, s32, s32);
virtual ~ActorDirector_TrackOn() { } // _08 (weak)
virtual void execInner(); // _1C
@ -238,7 +238,7 @@ struct ActorDirector_TrackOn : public TrackOnDirectorBase {
* @size{0x58}
*/
struct GroundDirector_Cave : public ActorDirector_TrackOn {
GroundDirector_Cave(const char* name, int tracks, long a1, long a2)
GroundDirector_Cave(const char* name, int tracks, s32 a1, s32 a2)
: ActorDirector_TrackOn(name, tracks, a1, a2)
{
}
@ -255,7 +255,7 @@ struct GroundDirector_Cave : public ActorDirector_TrackOn {
* @size{0x68}
*/
struct ActorDirector_Scaled : public TrackOnDirector_Scaled {
ActorDirector_Scaled(const char*, int, f32, f32, long, long, u32);
ActorDirector_Scaled(const char*, int, f32, f32, s32, s32, u32);
virtual ~ActorDirector_Scaled() { } // _08 (weak)
virtual void execInner(); // _1C
@ -270,7 +270,7 @@ struct ActorDirector_Scaled : public TrackOnDirector_Scaled {
* @size{0x6C}
*/
struct ActorDirector_Enemy : public ActorDirector_Scaled {
ActorDirector_Enemy(const char*, int, long, long, u32);
ActorDirector_Enemy(const char*, int, s32, s32, u32);
virtual ~ActorDirector_Enemy() { } // _08 (weak)
virtual void underDirection(); // _18
@ -287,7 +287,7 @@ struct ActorDirector_Enemy : public ActorDirector_Scaled {
* @size{0x6C}
*/
struct ActorDirector_Battle : public ActorDirector_Enemy {
ActorDirector_Battle(const char* name, int tracks, long a1, long a2, u32 a3)
ActorDirector_Battle(const char* name, int tracks, s32 a1, s32 a2, u32 a3)
: ActorDirector_Enemy(name, tracks, a1, a2, a3)
{
}
@ -304,7 +304,7 @@ struct ActorDirector_Battle : public ActorDirector_Enemy {
* @size{0x6C}
*/
struct ActorDirector_Kehai : public ActorDirector_Enemy {
ActorDirector_Kehai(const char* name, int tracks, long a1, long a2, u32 a3)
ActorDirector_Kehai(const char* name, int tracks, s32 a1, s32 a2, u32 a3)
: ActorDirector_Enemy(name, tracks, a1, a2, a3)
{
}

View File

@ -111,9 +111,9 @@ struct JumpBgmSeq : public DirectedBgm {
// _6C-_B8 = DirectedBgm
OSMutex _B8; // _B8
short _D0; // _D0
s16 _D0; // _D0
OSMutex _D4; // _D4
short _EC; // _EC
s16 _EC; // _EC
OSMutex _F0; // _F0
u16 _108; // _108
OSMutex _10C; // _10C

View File

@ -3,8 +3,8 @@
#include "types.h"
typedef unsigned long __file_handle;
typedef unsigned long fpos_t;
typedef u32 __file_handle;
typedef u32 fpos_t;
typedef struct _IO_FILE _IO_FILE, *P_IO_FILE;
#define __ungetc_buffer_size 2

View File

@ -13,7 +13,7 @@ typedef struct {
} div_t;
int abs(int __x);
long labs(long __x);
s32 labs(s32 __x);
div_t div(s32 __numer, s32 __denom);
#ifdef __cplusplus

View File

@ -7,9 +7,9 @@
extern "C" {
#endif // ifdef __cplusplus
extern unsigned char __ctype_map[256];
extern unsigned char __lower_map[256];
extern unsigned char __upper_map[256];
extern u8 __ctype_map[256];
extern u8 __lower_map[256];
extern u8 __upper_map[256];
#define __control_char 0x01
#define __motion_char 0x02

View File

@ -53,7 +53,7 @@ inline int __fpclassifyd(f64 x)
return 4;
}
#define fpclassify(x) ((sizeof(x) == sizeof(float)) ? __fpclassifyf((float)(x)) : __fpclassifyd((double)(x)))
#define fpclassify(x) ((sizeof(x) == sizeof(f32)) ? __fpclassifyf((f32)(x)) : __fpclassifyd((f64)(x)))
#define isinf(x) ((fpclassify(x) == 2))
#define isfinite(x) ((fpclassify(x) > 2))

View File

@ -1,7 +1,9 @@
#ifndef _MSL_STRTOLD_H
#define _MSL_STRTOLD_H
long double __strtold(int max_width, int (*ReadProc)(void*, int, int), void* ReadProcArg, int* chars_scanned, int* overflow);
long strtol(const char* str, char** end, int base);
#include "types.h"
f128 __strtold(int max_width, int (*ReadProc)(void*, int, int), void* ReadProcArg, int* chars_scanned, int* overflow);
s32 strtol(const char* str, char** end, int base);
#endif

View File

@ -1,10 +1,12 @@
#ifndef _MSL_STRTOUL_H
#define _MSL_STRTOUL_H
unsigned long __strtoul(int base, int max_width, int (*ReadProc)(void*, int, int), void* ReadProcArg, int* chars_scanned, int* negative,
#include "types.h"
u32 __strtoul(int base, int max_width, int (*ReadProc)(void*, int, int), void* ReadProcArg, int* chars_scanned, int* negative,
int* overflow);
u64 __strtoull(int base, int max_width, int (*ReadProc)(void*, int, int), void* ReadProcArg, int* chars_scanned, int* negative,
int* overflow);
unsigned long long __strtoull(int base, int max_width, int (*ReadProc)(void*, int, int), void* ReadProcArg, int* chars_scanned,
int* negative, int* overflow);
int atoi(const char* str);
#endif

View File

@ -1,7 +1,7 @@
#ifndef _RUNTIME_GECKO_EXCEPTIONPPC_H
#define _RUNTIME_GECKO_EXCEPTIONPPC_H
typedef unsigned char exaction_type;
typedef u8 exaction_type;
#define EXACTION_ENDBIT 0x80
#define EXACTION_MASK 0x7F
@ -13,16 +13,16 @@ typedef unsigned char exaction_type;
typedef struct ex_branch {
exaction_type action;
unsigned char unused;
unsigned short target;
u8 unused;
u16 target;
} ex_branch;
#define EXACTION_DESTROYLOCAL 2
typedef struct ex_destroylocal {
exaction_type action;
unsigned char unused;
short local;
u8 unused;
s16 local;
void* dtor;
} ex_destroylocal;
@ -30,9 +30,9 @@ typedef struct ex_destroylocal {
typedef struct ex_destroylocalcond {
exaction_type action;
unsigned char dlc_field;
short cond;
short local;
u8 dlc_field;
s16 cond;
s16 local;
void* dtor;
} ex_destroylocalcond;
@ -43,8 +43,8 @@ typedef struct ex_destroylocalcond {
typedef struct ex_destroylocalpointer {
exaction_type action;
unsigned char dlp_field;
short pointer;
u8 dlp_field;
s16 pointer;
void* dtor;
} ex_destroylocalpointer;
@ -55,10 +55,10 @@ typedef struct ex_destroylocalpointer {
typedef struct ex_destroylocalarray {
exaction_type action;
unsigned char unused;
short localarray;
unsigned short elements;
unsigned short element_size;
u8 unused;
s16 localarray;
u16 elements;
u16 element_size;
void* dtor;
} ex_destroylocalarray;
@ -67,9 +67,9 @@ typedef struct ex_destroylocalarray {
typedef struct ex_destroymember {
exaction_type action;
unsigned char dm_field;
short objectptr;
long offset;
u8 dm_field;
s16 objectptr;
s32 offset;
void* dtor;
} ex_destroymember;
@ -80,10 +80,10 @@ typedef struct ex_destroymember {
typedef struct ex_destroymembercond {
exaction_type action;
unsigned char dmc_field;
short cond;
short objectptr;
long offset;
u8 dmc_field;
s16 cond;
s16 objectptr;
s32 offset;
void* dtor;
} ex_destroymembercond;
@ -95,11 +95,11 @@ typedef struct ex_destroymembercond {
typedef struct ex_destroymemberarray {
exaction_type action;
unsigned char dma_field;
short objectptr;
long offset;
long elements;
long element_size;
u8 dma_field;
s16 objectptr;
s32 offset;
s32 elements;
s32 element_size;
void* dtor;
} ex_destroymemberarray;
@ -110,8 +110,8 @@ typedef struct ex_destroymemberarray {
typedef struct ex_deletepointer {
exaction_type action;
unsigned char dp_field;
short objectptr;
u8 dp_field;
s16 objectptr;
void* deletefunc;
} ex_deletepointer;
@ -122,9 +122,9 @@ typedef struct ex_deletepointer {
typedef struct ex_deletepointercond {
exaction_type action;
unsigned char dpc_field;
short cond;
short objectptr;
u8 dpc_field;
s16 cond;
s16 objectptr;
void* deletefunc;
} ex_deletepointercond;
@ -136,35 +136,35 @@ typedef struct ex_deletepointercond {
typedef struct ex_catchblock {
exaction_type action;
unsigned char unused;
u8 unused;
char* catch_type;
unsigned short catch_pcoffset;
short cinfo_ref;
u16 catch_pcoffset;
s16 cinfo_ref;
} ex_catchblock;
#define EXACTION_ACTIVECATCHBLOCK 13
typedef struct ex_activecatchblock {
exaction_type action;
unsigned char unused;
short cinfo_ref;
u8 unused;
s16 cinfo_ref;
} ex_activecatchblock;
#define EXACTION_TERMINATE 14
typedef struct ex_terminate {
exaction_type action;
unsigned char unused;
u8 unused;
} ex_terminate;
#define EXACTION_SPECIFICATION 15
typedef struct ex_specification {
exaction_type action;
unsigned char unused;
unsigned short specs;
long pcoffset;
long cinfo_ref;
u8 unused;
u16 specs;
s32 pcoffset;
s32 cinfo_ref;
char* spec[];
} ex_specification;
@ -172,34 +172,34 @@ typedef struct ex_specification {
typedef struct ex_catchblock_32 {
exaction_type action;
unsigned char unused;
u8 unused;
char* catch_type;
long catch_pcoffset;
long cinfo_ref;
s32 catch_pcoffset;
s32 cinfo_ref;
} ex_catchblock_32;
// Other structs
typedef struct ExceptionRangeSmall {
unsigned short start;
unsigned short end;
unsigned short action;
u16 start;
u16 end;
u16 action;
} ExceptionRangeSmall;
typedef struct ExceptionTableSmall {
unsigned short et_field;
u16 et_field;
ExceptionRangeSmall ranges[0];
} ExceptionTableSmall;
typedef struct ExceptionRangeLarge {
unsigned long start;
unsigned short size;
unsigned short action;
u32 start;
u16 size;
u16 action;
} ExceptionRangeLarge;
typedef struct ExceptionTableLarge {
unsigned short et_field;
unsigned short et_field2;
u16 et_field;
u16 et_field2;
ExceptionRangeLarge ranges[];
} ExceptionTableLarge;
@ -217,12 +217,12 @@ typedef struct ExceptionTableLarge {
#define ET_HasElfVector(field) (((field) >> 1) & 0x1)
typedef struct ExceptionTableIndex {
unsigned long functionoffset;
unsigned long eti_field;
unsigned long exceptionoffset;
u32 functionoffset;
u32 eti_field;
u32 exceptionoffset;
} ExceptionTableIndex;
#define ETI_MakeField(direct, fsize) ((((long)(direct)) << 31) | ((fsize)&0x7fffffff))
#define ETI_MakeField(direct, fsize) ((((s32)(direct)) << 31) | ((fsize) & 0x7fffffff))
#define ETI_GetDirectStore(field) ((field) >> 31)
#define ETI_GetFunctionSize(field) ((field) & 0x7fffffff)

View File

@ -9,7 +9,7 @@
extern "C" {
#endif
typedef short vbase_ctor_arg_type;
typedef s16 vbase_ctor_arg_type;
typedef char local_cond_type;
typedef struct CatchInfo {
@ -17,7 +17,7 @@ typedef struct CatchInfo {
void* typeinfo;
void* dtor;
void* sublocation;
long pointercopy;
s32 pointercopy;
void* stacktop;
} CatchInfo;
@ -32,7 +32,7 @@ extern void __destroy_global_chain(void);
extern void __end__catch(CatchInfo* catchinfo);
extern void __throw(char* throwtype, void* location, void* dtor);
extern char __throw_catch_compare(const char* throwtype, const char* catchtype, long* offset_result);
extern char __throw_catch_compare(const char* throwtype, const char* catchtype, s32* offset_result);
extern void __unexpected(CatchInfo* catchinfo);
extern int __register_fragment(struct __eti_init_info* info, char* TOC);

View File

@ -16,14 +16,14 @@ DECL_SECT(".init") extern char _SDA2_BASE_[];
typedef struct __rom_copy_info {
char* rom;
char* addr;
unsigned int size;
uint size;
} __rom_copy_info;
DECL_SECT(".init") extern __rom_copy_info _rom_copy_info[];
typedef struct __bss_init_info {
char* addr;
unsigned int size;
uint size;
} __bss_init_info;
DECL_SECT(".init") extern __bss_init_info _bss_init_info[];
@ -32,7 +32,7 @@ typedef struct __eti_init_info {
void* eti_start;
void* eti_end;
void* code_start;
unsigned long code_size;
u32 code_size;
} __eti_init_info;
DECL_SECT(".init") extern __eti_init_info _eti_init_info[];

View File

@ -21,7 +21,7 @@ struct SceneInfoList : public CNode {
// virtual void _08() = 0; // _08
void set(long, og::Screen::DispMemberBase*);
void set(s32, og::Screen::DispMemberBase*);
SceneType mSceneType; // _18
u8 mDispMemberBuffer[0x400]; // _1C

View File

@ -6,7 +6,7 @@
// no idea if theres a better place to put this, its kind of a random single function
namespace kh {
namespace Screen {
::Screen::SceneBase* createScene_Koono(long);
::Screen::SceneBase* createScene_Koono(s32);
} // namespace Screen
} // namespace kh
@ -42,7 +42,7 @@ struct Mgr : public MgrBase {
virtual bool reset(); // _18
virtual void setColorBG(JUtility::TColor&) { } // _1C (weak)
virtual void setBGMode(int) { } // _20 (weak)
virtual ::Screen::SceneBase* doGetSceneBase(long); // _24
virtual ::Screen::SceneBase* doGetSceneBase(s32); // _24
virtual void drawBG(Graphics&) { } // _28 (weak)
virtual void drawWipe(Graphics&) { } // _2C (weak)
@ -68,7 +68,7 @@ struct Mgr : public MgrBase {
// unused/inline
void create();
void updateCurrentScene();
SceneBase* getSceneBase(long);
SceneBase* getSceneBase(s32);
void createNewBackupSceneInfo(SceneBase* scene);
inline void checkController()
@ -102,8 +102,8 @@ struct DispMemberCpy {
} // namespace Screen
namespace newScreen {
::Screen::SceneBase* createScene_Ogawa(long);
::Screen::SceneBase* createScene_Morimura(long);
::Screen::SceneBase* createScene_Ogawa(s32);
::Screen::SceneBase* createScene_Morimura(s32);
struct Mgr : public Screen::Mgr {
Mgr()
@ -119,7 +119,7 @@ struct Mgr : public Screen::Mgr {
virtual bool reset(); // _18
virtual void setColorBG(JUtility::TColor& col) { mBgColor = col; } // _1C (weak)
virtual void setBGMode(int mode) { mBgMode = mode; } // _20 (weak)
virtual ::Screen::SceneBase* doGetSceneBase(long); // _24
virtual ::Screen::SceneBase* doGetSceneBase(s32); // _24
virtual void drawBG(Graphics&); // _28
static Mgr* create();

View File

@ -8,7 +8,7 @@
#include "Vector3.h"
#include "Plane.h"
#define FABS(x) (float)__fabs(x)
#define FABS(x) (f32)__fabs(x)
// probably a Vector3.h thing
inline f32 lenVec(const Vector3f& a) { return pikmin2_sqrtf(dot(a, a)); }

View File

@ -38,7 +38,7 @@ struct TParticle2dMgr : public CNode, JKRDisposer {
void exitMgr();
void destroyHeap();
void setXfb(const struct ResTIMG*);
void showInfo(long, long, long, long);
void showInfo(s32, s32, s32, s32);
// _00 = VTBL
// _00-_18 = CNode

View File

@ -59,8 +59,8 @@ struct Vector2 {
T x, y;
};
// Use instead of Vector2<float> or Vector2<f32>
typedef Vector2<float> Vector2f;
// Use instead of Vector2<f32>
typedef Vector2<f32> Vector2f;
typedef Vector2<int> Vector2i;
inline Vector2f operator+(const Vector2f& a, f32 b) { return Vector2f(a.x + b, a.y + b); }

View File

@ -211,12 +211,12 @@ struct Vector3 {
static Vector3<T> zero;
};
// template <> struct Vector3<float> {
// static Vector3<float> zero;
// template <> struct Vector3<f32> {
// static Vector3<f32> zero;
// };
// Use instead of Vector3<float> or Vector3<f32>
typedef Vector3<float> Vector3f;
// Use instead of Vector3<f32>
typedef Vector3<f32> Vector3f;
typedef Vector3<int> Vector3i;
/**

View File

@ -533,7 +533,7 @@ struct TMgr {
void draw();
bool isGetEnd();
bool isFinish();
void showInfo(long, long, long, long);
void showInfo(s32, s32, s32, s32);
int getStateID();
inline void setCurrState(StateType* state) { mCurrentState = state; }

View File

@ -27,7 +27,7 @@ void E2DPane_setTreeInfluencedAlpha(J2DPane*, bool);
void E2DPane_setTreeShow(J2DPane*);
void E2DPane_setTreeHide(J2DPane*);
J2DPane* E2DScreen_searchAssert(J2DScreen*, u64);
void EUTDrawWindow(J2DGrafContext&, long, long, long, long);
void EUTDrawWindow(J2DGrafContext&, s32, s32, s32, s32);
} // namespace ebi
#endif

View File

@ -27,13 +27,13 @@ struct E3DAnimRes {
};
struct E3DAnimFolderBase {
virtual E3DAnimRes* getAnimRes(long) = 0; // _08
virtual E3DAnimRes* getAnimRes(s32) = 0; // _08
};
struct E3DAnimCtrl {
void setAnimFolder(ebi::E3DAnimFolderBase* animFolder);
void init(long id, f32 timeStep);
void init(s32 id, f32 timeStep);
void setStartFrame(); // UNUSED
void play();
void playStopEnd();

View File

@ -19,7 +19,7 @@ struct TScreenProgre {
virtual void setArchive(JKRArchive*); // _08
void loadResource();
void startScreen(long, u32);
void startScreen(s32, u32);
bool fadeout(u32);
bool isFinish();
void startState(enumState, u32);

View File

@ -72,7 +72,7 @@ struct TMemoryCard {
void loadResource(JKRHeap*);
void setArchive(JKRArchive*);
void destroyResource();
void open(long);
void open(s32);
void close();
void killScreen();
void setSelect_(bool);

View File

@ -122,7 +122,7 @@ struct TOmakeGame : public TScreenBase {
virtual char* getName() { return "TOmakeGame"; } // _48
bool isDelegateControl();
bool openMsg(long);
bool openMsg(s32);
void setController(Controller*);
void setSelfControl();
@ -131,7 +131,7 @@ struct TOmakeGame : public TScreenBase {
Controller* mInput; // _0C
bool mExitState; // _10 (false when press A to continue, true when press B to exit)
EUTPadInterface_countNum mPad; // _14
long mSelection; // _40
s32 mSelection; // _40
P2DScreen::Mgr_tuning* mScreenObj; // _44
J2DPane* mPaneGameSel[GameCount]; // _48
J2DPane* mPaneSelectBox[GameCount]; // _54

View File

@ -37,9 +37,9 @@ struct TOptionParameter {
bool mIsRubyFont; // _00
bool mIsRumble; // _01
long mSoundMode; // _04
long mBgmVolume; // _08
long mSeVolume; // _0C
s32 mSoundMode; // _04
s32 mBgmVolume; // _08
s32 mSeVolume; // _0C
bool mUseDeflicker; // _10
};
@ -110,8 +110,8 @@ struct TOption : public TScreenBase {
int mState; // _0F8
u32 mCounterOpen; // _0FC
u32 mCounterOpenMax; // _100
long mCurrMainSelection; // _104
long mNextSelection; // _108
s32 mCurrMainSelection; // _104
s32 mNextSelection; // _108
P2DScreen::Mgr_tuning* mMainScreen; // _10C
J2DTextBox* mPaneRumbleYes; // _110
J2DTextBox* mPaneRumbleNo; // _114

View File

@ -46,7 +46,7 @@ struct TSaveMenu : public TScreenBase {
virtual char* getName() { return "TSaveMenu"; } // _48 (weak)
void loadResource();
bool openMsg(long);
bool openMsg(s32);
bool closeMsg();
void noMsg();
bool isFinishMsg();

View File

@ -75,14 +75,14 @@ struct TTitleMenu : public TScreenBase {
bool openMenuSet(ArgOpen*);
bool isDecide();
bool isCancel();
void showPika_(long);
void hidePika_(long);
void showPika_(s32);
void hidePika_(s32);
// _00 = VTBL
// _00-_08 = TScreenBase
Controller* mController; // _0C
EUTPadInterface_countNum mPad; // _10
long mSelectID; // _3C
s32 mSelectID; // _3C
bool mDecidedMenuOption; // _40
bool mDoCloseMenu; // _41
u32 mMenuCloseCounter; // _44

View File

@ -20,11 +20,11 @@ struct TMainTitleMgr {
TMainTitleMgr();
void setMode(long);
void setMode(s32);
void loadResource();
void setController(Controller*);
void start();
void startMenuSet(long, long);
void startMenuSet(s32, s32);
void forceQuit();
bool isFinish();
bool isAnyKey();

View File

@ -55,7 +55,7 @@ struct TParam : public TParamBase {
};
struct TAnimFolder : public E3DAnimFolderBase {
virtual E3DAnimRes* getAnimRes(long id) { return &mAnims[id]; } // _08 (weak)
virtual E3DAnimRes* getAnimRes(s32 id) { return &mAnims[id]; } // _08 (weak)
void load(J3DModelData*, JKRArchive*);
E3DAnimRes* getAnimRes(int);

View File

@ -48,7 +48,7 @@ struct TParam : public TParamBase {
};
struct TAnimFolder : public E3DAnimFolderBase {
virtual E3DAnimRes* getAnimRes(long id) { return &mAnims[id]; } // _08 (weak)
virtual E3DAnimRes* getAnimRes(s32 id) { return &mAnims[id]; } // _08 (weak)
void load(J3DModelData*, JKRArchive*);

View File

@ -67,7 +67,7 @@ struct TParam : public TParamBase {
};
struct TAnimFolder : public E3DAnimFolderBase {
virtual E3DAnimRes* getAnimRes(long); // _08 (weak)
virtual E3DAnimRes* getAnimRes(s32); // _08 (weak)
void load(J3DModelData*, JKRArchive*);
E3DAnimRes* getAnimRes(int);
@ -177,7 +177,7 @@ struct TUnit : public TObjBase {
virtual u32 getCreatureType() { return TITLECREATURE_Pikmin; } // _08 (weak)
virtual bool isCalc(); // _0C
void init(TMgr*, long);
void init(TMgr*, s32);
void goDestination();
bool beAttacked();
void alive();
@ -228,7 +228,7 @@ struct TMgr : public CNode {
void enemyPushOut(TObjBase*);
void updateCalcBoid_();
bool isAssemble();
TUnit* getUnit(long);
TUnit* getUnit(s32);
// _00 = VTBL
// _00-_18 = CNode

View File

@ -38,7 +38,7 @@ struct TCoordMgr : public CNode {
void copyCoordinate(Vector2f*);
void readCoordinate(JKRArchive*, char*);
void readCoordinate(Stream&);
void getDestPos(long);
void getDestPos(s32);
// _00 = VTBL
// _00-_18 = CNode

View File

@ -280,7 +280,7 @@ struct TTitleMgr : public CNode, JKRDisposer {
bool breakup();
bool startKogane();
bool startChappy();
bool boidToAssemble(long);
bool boidToAssemble(s32);
bool isControllerOK();
bool isPressStart();
void startState(enumState);
@ -289,11 +289,11 @@ struct TTitleMgr : public CNode, JKRDisposer {
void checkEncounter_();
void draw();
void readTitleParam(JKRArchive*, char*);
void setDestToPiki(long);
void setPosToPiki(long);
void setDestToPiki(s32);
void setPosToPiki(s32);
Vector2f setStartPosToPiki();
void calcBreakupDestination();
void calcDestination(long);
void calcDestination(s32);
bool isAssemble();
void setDrawBufferToJ3DSys();
void inField(Vector2f&);
@ -302,7 +302,7 @@ struct TTitleMgr : public CNode, JKRDisposer {
void windBlow();
void boid3ToAssemble();
void isAnyKey();
void showInfo(long, long, long, long);
void showInfo(s32, s32, s32, s32);
// _00 = VTBL
// _00-_18 = CNode

View File

@ -18,13 +18,13 @@ struct TCursor : public TBase {
virtual void forceKill() { mOneEmitter.forceKill(); } // _0C (weak)
virtual void fade() { mOneEmitter.fade(); } // _10 (weak)
void init(long, long);
void init(s32, s32);
void update(Arg*);
void calcPos_(Vector3f*, f32, long);
void calcPos_(Vector3f*, f32, s32);
// _00 = VTBL
TOneEmitter mOneEmitter; // _04
long mContextNum; // _38
s32 mContextNum; // _38
Context mContextArray[WHISTLE_CONTEXT_NUM]; // _3C
Vector3f mPosition; // _27C
f32 mAngleTimer; // _288

View File

@ -23,10 +23,10 @@ void createSimpleGedoku(Vector3f&);
void createSimpleBlackDrop(Vector3f&);
void createSimpleDig(Vector3f&);
void createSimpleDive(Vector3f&);
void createSimpleChiru(Vector3f&, long);
void createSimpleChiru(Vector3f&, s32);
void createSimpleInattack(Vector3f&);
void createSimpleInstick(Vector3f&);
void createSimpleDead(Vector3f&, long);
void createSimpleDead(Vector3f&, s32);
void createSimpleBridgeAttack(Vector3f&);
void createSimpleGate1Attack(Vector3f&);
void createSimpleGate2Attack(Vector3f&);
@ -386,7 +386,7 @@ struct TPkEffectMgr : public JKRDisposer {
void exitMgr();
void resetContextS();
void createS_Dead(Vector3f&, long);
void createS_Dead(Vector3f&, s32);
void createS_Chinka(Vector3f&);
void createS_Gedoku(Vector3f&);
void createS_WaterOff(Vector3f&);

View File

@ -64,11 +64,11 @@ struct ToeHamonB {
struct ToeKourin {
void create(Vector3f*, long);
void create(Vector3f*, s32);
void kill();
ContextChasePos mContext[1];
long mPikiKind;
s32 mPikiKind;
};
struct ToeMoeBC {

View File

@ -18,7 +18,7 @@ struct DispMemberAnaDemo;
namespace newScreen {
struct AnaDemo : public ::Screen::SceneBase {
AnaDemo(long);
AnaDemo(s32);
virtual const char* getResName() const { return "res_ana_demo.szs"; } // _1C (weak)
virtual SceneType getSceneType() { return mSceneType; } // _08 (weak)

View File

@ -178,7 +178,7 @@ struct ObjSMenuBase : public ::Screen::ObjBase {
virtual bool updateFadeOut(); // _A0
virtual void commonUpdate() = 0; // _A4
void setFinishState(long);
void setFinishState(s32);
void setSMenuScale(f32, f32);
void doCreateAfter(JKRArchive*, P2DScreen::Mgr*);
void commonUpdateBase();

View File

@ -1,6 +1,8 @@
#ifndef _FDLIBM_H
#define _FDLIBM_H
#include "types.h"
/* @(#)fdlibm.h 1.5 04/04/22 */
/**
* ====================================================
@ -48,7 +50,7 @@ extern "C" {
extern int signgam;
#define MAXFLOAT ((float)3.40282346638528860e+38)
#define MAXFLOAT ((f32)3.40282346638528860e+38)
enum fdversion { fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix };
@ -72,9 +74,9 @@ extern _LIB_VERSION_TYPE _LIB_VERSION;
struct exception {
int type;
char* name;
double arg1;
double arg2;
double retval;
f64 arg1;
f64 arg2;
f64 retval;
};
#define HUGE MAXFLOAT
@ -96,59 +98,59 @@ struct exception {
/**
* ANSI/POSIX
*/
extern double acos __P((double));
extern double asin __P((double));
extern double atan __P((double));
extern double atan2 __P((double, double));
extern double cos __P((double));
extern double sin __P((double));
extern double tan __P((double));
extern f64 acos __P((f64));
extern f64 asin __P((f64));
extern f64 atan __P((f64));
extern f64 atan2 __P((f64, f64));
extern f64 cos __P((f64));
extern f64 sin __P((f64));
extern f64 tan __P((f64));
extern double cosh __P((double));
extern double sinh __P((double));
extern double tanh __P((double));
extern f64 cosh __P((f64));
extern f64 sinh __P((f64));
extern f64 tanh __P((f64));
extern double exp __P((double));
extern double frexp __P((double, int*));
extern double ldexp __P((double, int));
extern double scalbn __P((double, int));
extern double log __P((double));
extern double log10 __P((double));
extern double modf __P((double, double*));
extern f64 exp __P((f64));
extern f64 frexp __P((f64, int*));
extern f64 ldexp __P((f64, int));
extern f64 scalbn __P((f64, int));
extern f64 log __P((f64));
extern f64 log10 __P((f64));
extern f64 modf __P((f64, f64*));
extern double pow __P((double, double));
extern double sqrt __P((double));
extern f64 pow __P((f64, f64));
extern f64 sqrt __P((f64));
extern double ceil __P((double));
extern double fabs __P((double));
extern double floor __P((double));
extern double fmod __P((double, double));
extern f64 ceil __P((f64));
extern f64 fabs __P((f64));
extern f64 floor __P((f64));
extern f64 fmod __P((f64, f64));
extern double erf __P((double));
extern double erfc __P((double));
extern double gamma __P((double));
extern double hypot __P((double, double));
extern int isnan __P((double));
extern int finite __P((double));
extern double j0 __P((double));
extern double j1 __P((double));
extern double jn __P((int, double));
extern double lgamma __P((double));
extern double y0 __P((double));
extern double y1 __P((double));
extern double yn __P((int, double));
extern f64 erf __P((f64));
extern f64 erfc __P((f64));
extern f64 gamma __P((f64));
extern f64 hypot __P((f64, f64));
extern int isnan __P((f64));
extern int finite __P((f64));
extern f64 j0 __P((f64));
extern f64 j1 __P((f64));
extern f64 jn __P((int, f64));
extern f64 lgamma __P((f64));
extern f64 y0 __P((f64));
extern f64 y1 __P((f64));
extern f64 yn __P((int, f64));
extern double acosh __P((double));
extern double asinh __P((double));
extern double atanh __P((double));
extern double cbrt __P((double));
extern double logb __P((double));
extern double nextafter __P((double, double));
extern double remainder __P((double, double));
extern f64 acosh __P((f64));
extern f64 asinh __P((f64));
extern f64 atanh __P((f64));
extern f64 cbrt __P((f64));
extern f64 logb __P((f64));
extern f64 nextafter __P((f64, f64));
extern f64 remainder __P((f64, f64));
#ifdef _SCALB_INT
extern double scalb __P((double, int));
extern f64 scalb __P((f64, int));
#else
extern double scalb __P((double, double));
extern f64 scalb __P((f64, f64));
#endif
extern int matherr __P((struct exception*));
@ -156,70 +158,70 @@ extern int matherr __P((struct exception*));
/**
* IEEE Test Vector
*/
extern double significand __P((double));
extern f64 significand __P((f64));
/**
* Functions callable from C, intended to support IEEE arithmetic.
*/
extern double copysign __P((double, double));
extern int ilogb __P((double));
extern double rint __P((double));
extern double scalbn __P((double, int));
extern f64 copysign __P((f64, f64));
extern int ilogb __P((f64));
extern f64 rint __P((f64));
extern f64 scalbn __P((f64, int));
/**
* BSD math library entry points
*/
extern double expm1 __P((double));
extern double log1p __P((double));
extern f64 expm1 __P((f64));
extern f64 log1p __P((f64));
/**
* Reentrant version of gamma & lgamma; passes signgam back by reference
* as the second argument; user must allocate space for signgam.
*/
#ifdef _REENTRANT
extern double gamma_r __P((double, int*));
extern double lgamma_r __P((double, int*));
extern f64 gamma_r __P((f64, int*));
extern f64 lgamma_r __P((f64, int*));
#endif /* _REENTRANT */
/* ieee style elementary functions */
extern double __ieee754_sqrt __P((double));
extern double __ieee754_acos __P((double));
extern double __ieee754_acosh __P((double));
extern double __ieee754_log __P((double));
extern double __ieee754_atanh __P((double));
extern double __ieee754_asin __P((double));
extern double __ieee754_atan2 __P((double, double));
extern double __ieee754_exp __P((double));
extern double __ieee754_cosh __P((double));
extern double __ieee754_fmod __P((double, double));
extern double __ieee754_pow __P((double, double));
extern double __ieee754_lgamma_r __P((double, int*));
extern double __ieee754_gamma_r __P((double, int*));
extern double __ieee754_lgamma __P((double));
extern double __ieee754_gamma __P((double));
extern double __ieee754_log10 __P((double));
extern double __ieee754_sinh __P((double));
extern double __ieee754_hypot __P((double, double));
extern double __ieee754_j0 __P((double));
extern double __ieee754_j1 __P((double));
extern double __ieee754_y0 __P((double));
extern double __ieee754_y1 __P((double));
extern double __ieee754_jn __P((int, double));
extern double __ieee754_yn __P((int, double));
extern double __ieee754_remainder __P((double, double));
extern int __ieee754_rem_pio2 __P((double, double*));
extern f64 __ieee754_sqrt __P((f64));
extern f64 __ieee754_acos __P((f64));
extern f64 __ieee754_acosh __P((f64));
extern f64 __ieee754_log __P((f64));
extern f64 __ieee754_atanh __P((f64));
extern f64 __ieee754_asin __P((f64));
extern f64 __ieee754_atan2 __P((f64, f64));
extern f64 __ieee754_exp __P((f64));
extern f64 __ieee754_cosh __P((f64));
extern f64 __ieee754_fmod __P((f64, f64));
extern f64 __ieee754_pow __P((f64, f64));
extern f64 __ieee754_lgamma_r __P((f64, int*));
extern f64 __ieee754_gamma_r __P((f64, int*));
extern f64 __ieee754_lgamma __P((f64));
extern f64 __ieee754_gamma __P((f64));
extern f64 __ieee754_log10 __P((f64));
extern f64 __ieee754_sinh __P((f64));
extern f64 __ieee754_hypot __P((f64, f64));
extern f64 __ieee754_j0 __P((f64));
extern f64 __ieee754_j1 __P((f64));
extern f64 __ieee754_y0 __P((f64));
extern f64 __ieee754_y1 __P((f64));
extern f64 __ieee754_jn __P((int, f64));
extern f64 __ieee754_yn __P((int, f64));
extern f64 __ieee754_remainder __P((f64, f64));
extern int __ieee754_rem_pio2 __P((f64, f64*));
#ifdef _SCALB_INT
extern double __ieee754_scalb __P((double, int));
extern f64 __ieee754_scalb __P((f64, int));
#else
extern double __ieee754_scalb __P((double, double));
extern f64 __ieee754_scalb __P((f64, f64));
#endif
/* fdlibm kernel function */
extern double __kernel_standard __P((double, double, int));
extern double __kernel_sin __P((double, double, int));
extern double __kernel_cos __P((double, double));
extern double __kernel_tan __P((double, double, int));
extern int __kernel_rem_pio2 __P((double*, double*, int, int, int, const int*));
extern f64 __kernel_standard __P((f64, f64, int));
extern f64 __kernel_sin __P((f64, f64, int));
extern f64 __kernel_cos __P((f64, f64));
extern f64 __kernel_tan __P((f64, f64, int));
extern int __kernel_rem_pio2 __P((f64*, f64*, int, int, int, const int*));
#ifdef __cplusplus
};

View File

@ -1,6 +1,8 @@
#ifndef _FLOAT_H
#define _FLOAT_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif // ifdef __cplusplus
@ -22,8 +24,8 @@ extern int __float_epsilon[];
// #define FLT_EPSILON 0x1.000000P-23F
#define FLT_MIN 0x1.000000P-126F
#define FLT_MAX (*(float*)__float_max)
#define FLT_EPSILON (*(float*)__float_epsilon)
#define FLT_MAX (*(f32*)__float_max)
#define FLT_EPSILON (*(f32*)__float_epsilon)
#define DBL_MANT_DIG 53
#define DBL_DIG 15
@ -36,7 +38,7 @@ extern int __float_epsilon[];
#define DBL_EPSILON 0x1.0000000000000P-52
#define DBL_MIN 0x1.0000000000000P-1022
#define DBL_MAX (*(double*)__double_max)
#define DBL_MAX (*(f64*)__double_max)
#define LDBL_MANT_DIG 53
#define LDBL_DIG 15
@ -49,8 +51,8 @@ extern int __float_epsilon[];
#define LDBL_EPSILON 0x1.0000000000000P-52L
// #define LDBL_MIN 0x1.0000000000000P-1022L
#define LDBL_MAX (*(long double*)__extended_max)
#define LDBL_MIN (*(long double*)__extended_min)
#define LDBL_MAX (*(f128*)__extended_max)
#define LDBL_MIN (*(f128*)__extended_min)
#ifdef __cplusplus
};

View File

@ -3,7 +3,7 @@
#ifdef __cplusplus
namespace std {
typedef long ptrdiff_t;
typedef s32 ptrdiff_t;
struct input_iterator_tag {
};

View File

@ -51,10 +51,10 @@ public:
};
template <>
class numeric_limits<short> {
class numeric_limits<s16> {
public:
inline static short min() { return -0x8000; }
inline static short max() { return 0x7FFF; }
inline static s16 min() { return -0x8000; }
inline static s16 max() { return 0x7FFF; }
};
template <>
@ -65,38 +65,38 @@ public:
};
template <>
class numeric_limits<long> {
class numeric_limits<s32> {
public:
inline static long min() { return -0x80000000; }
inline static long max() { return 0x7FFFFFFF; }
inline static s32 min() { return -0x80000000; }
inline static s32 max() { return 0x7FFFFFFF; }
};
template <>
class numeric_limits<unsigned char> {
class numeric_limits<u8> {
public:
inline static unsigned char min() { return 0x0; }
inline static unsigned char max() { return 0xFF; }
inline static u8 min() { return 0x0; }
inline static u8 max() { return 0xFF; }
};
template <>
class numeric_limits<unsigned short> {
class numeric_limits<u16> {
public:
inline static unsigned short min() { return 0x0; }
inline static unsigned short max() { return 0xFFFF; }
inline static u16 min() { return 0x0; }
inline static u16 max() { return 0xFFFF; }
};
template <>
class numeric_limits<unsigned int> {
class numeric_limits<uint> {
public:
inline static unsigned int min() { return 0x0; }
inline static unsigned int max() { return 0xFFFFFFFF; }
inline static uint min() { return 0x0; }
inline static uint max() { return 0xFFFFFFFF; }
};
template <>
class numeric_limits<unsigned long> {
class numeric_limits<u32> {
public:
inline static unsigned long min() { return 0x0; }
inline static unsigned long max() { return 0xFFFFFFFF; }
inline static u32 min() { return 0x0; }
inline static u32 max() { return 0xFFFFFFFF; }
};
} // namespace std

View File

@ -86,17 +86,17 @@ struct _loc_coll_cmpt {
char CmptName[8];
int char_start_value;
int char_coll_tab_size;
short char_spec_accents;
unsigned short* char_coll_table_ptr;
unsigned short* wchar_coll_seq_ptr;
s16 char_spec_accents;
u16* char_coll_table_ptr;
u16* wchar_coll_seq_ptr;
};
struct _loc_ctype_cmpt {
char CmptName[8];
const unsigned short* ctype_map_ptr;
const unsigned char* upper_map_ptr;
const unsigned char* lower_map_ptr;
const unsigned short* wctype_map_ptr;
const u16* ctype_map_ptr;
const u8* upper_map_ptr;
const u8* lower_map_ptr;
const u16* wctype_map_ptr;
const wchar_t* wupper_map_ptr;
const wchar_t* wlower_map_ptr;
__decode_mbyte decode_mb;

View File

@ -14,7 +14,7 @@ extern "C" {
#define __frsqrte(x) (x)
#endif
#define FABS(x) (float)__fabs(x)
#define FABS(x) (f32) __fabs(x)
#define fabs(x) __fabs(x)
// #define __frsqrtes opword
@ -32,50 +32,50 @@ extern int __float_nan[];
extern int __float_huge[];
extern int __double_huge[];
#define INFINITY (*(float*)__float_huge)
#define NAN (*(float*)__float_nan)
#define HUGE_VAL (*(double*)__double_huge)
#define INFINITY (*(f32*)__float_huge)
#define NAN (*(f32*)__float_nan)
#define HUGE_VAL (*(f64*)__double_huge)
inline long double fabsl(long double x) { return __fabs((double)x); }
inline f128 fabsl(f128 x) { return __fabs((f64)x); }
double acos(double);
double asin(double);
double atan(double);
double atan2(double, double);
double ceil(double);
double floor(double);
double frexp(double, int*);
double ldexp(double, int);
double sqrt(double);
f64 acos(f64);
f64 asin(f64);
f64 atan(f64);
f64 atan2(f64, f64);
f64 ceil(f64);
f64 floor(f64);
f64 frexp(f64, int*);
f64 ldexp(f64, int);
f64 sqrt(f64);
double pow(double, double);
f64 pow(f64, f64);
double log(double);
double log10(double);
f64 log(f64);
f64 log10(f64);
double fmod(double, double);
f64 fmod(f64, f64);
double sin(double x);
double cos(double x);
f64 sin(f64 x);
f64 cos(f64 x);
double __ieee754_acos(double);
double __ieee754_fmod(double, double);
double __ieee754_log(double);
double __ieee754_log10(double);
double __ieee754_pow(double, double);
double __ieee754_sqrt(double);
double __ieee754_atan2(double, double);
double __ieee754_asin(double);
f64 __ieee754_acos(f64);
f64 __ieee754_fmod(f64, f64);
f64 __ieee754_log(f64);
f64 __ieee754_log10(f64);
f64 __ieee754_pow(f64, f64);
f64 __ieee754_sqrt(f64);
f64 __ieee754_atan2(f64, f64);
f64 __ieee754_asin(f64);
double scalbn(double, int);
f64 scalbn(f64, int);
double __kernel_sin(double, double, int);
double __kernel_cos(double, double);
double __kernel_tan(double, double, int);
f64 __kernel_sin(f64, f64, int);
f64 __kernel_cos(f64, f64);
f64 __kernel_tan(f64, f64, int);
int __ieee754_rem_pio2(double, double*);
int __ieee754_rem_pio2(f64, f64*);
// float sqrtf(float);
// f32 sqrtf(f32);
#ifdef __cplusplus
};

View File

@ -20,7 +20,7 @@ typedef __va_list va_list;
extern void __builtin_va_info(va_list*);
#endif
void* __va_arg(va_list v_list, unsigned char type);
void* __va_arg(va_list v_list, u8 type);
#define va_start(ap, fmt) ((void)fmt, __builtin_va_info(&ap))
#define va_arg(ap, t) (*((t*)__va_arg(ap, _var_arg_typeof(t))))

View File

@ -9,7 +9,7 @@ struct pair {
};
template <>
struct pair<float, float> {
struct pair<f32, f32> {
/**
* @note Address: 0x80035520
* @note Size: 0x10
@ -18,8 +18,8 @@ struct pair<float, float> {
pair()
: first(0.0f)
, second(0.0f) {};
float first;
float second;
f32 first;
f32 second;
};
} // namespace std

Some files were not shown because too many files have changed in this diff Show More