Merge pull request #298 from gamemasterplc/main

Several cleanups
This commit is contained in:
Liam Coleman 2024-05-10 20:50:47 -05:00 committed by GitHub
commit 440e47ec2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 240 additions and 237 deletions

View file

@ -5,7 +5,9 @@
extern "C" {
#endif
extern int _prolog();
#include "dolphin/types.h"
extern s32 _prolog();
extern void _epilog();
typedef void (*VoidFunc)(void);

View file

@ -5,7 +5,9 @@
extern "C" {
#endif
extern int _prolog();
#include "dolphin/types.h"
extern s32 _prolog();
extern void _epilog();
typedef void (*VoidFunc)(void);

View file

@ -10,7 +10,7 @@ void BoardWinUnusedArraySet(f32*);
void BoardWinKillAll(void);
void BoardWinDestroy(void);
void BoardWinProc(void);
int BoardWinChoiceGet(void);
s32 BoardWinChoiceGet(void);
void BoardWinPause(void);
void BoardWinCreateChoice(s32 pos, u32 mess, s32 portrait, s32 choice);
void BoardWinCreate(s32 pos, u32 mess, s32 portrait);
@ -21,7 +21,7 @@ void BoardWinAttrSet(s32 attr);
void BoardWinAttrReset(s32 attr);
void BoardWinChoiceDisable(s32 choice);
void BoardWinKeyWait(void);
int BoardWinSpeedGet(void);
s32 BoardWinSpeedGet(void);
void BoardWinSpeedSet(s32 value);
s16 BoardWinChoiceNowGet(void);
void BoardWinPriSet(s16 prio);

View file

@ -30,7 +30,7 @@ typedef struct data_read_stat {
} DataReadStat;
void HuDataInit(void);
int HuDataReadChk(s32 data_num);
s32 HuDataReadChk(s32 data_num);
DataReadStat *HuDataGetStatus(void *dir_ptr);
void *HuDataGetDirPtr(s32 data_num);
DataReadStat *HuDataDirRead(s32 data_num);
@ -52,7 +52,7 @@ void HuDataDirClose(s32 data_id);
void HuDataDirCloseNum(s32 num);
void *HuDataReadNumHeapShortForce(s32 data_id, s32 num, HeapID heap);
void HuDecodeData(void *src, void *dst, u32 size, int decode_type);
void HuDecodeData(void *src, void *dst, u32 size, s32 decode_type);
extern u32 DirDataSize;

View file

@ -7,30 +7,30 @@ void GWInit(void);
void GWGameStatReset(void);
s32 GWMessSpeedGet(void);
s32 GWMessDelayGet(void);
void GWMGRecordSet(int index, s32 value);
s32 GWMGRecordGet(int index);
void GWCharColorGet(int character, GXColor *color);
void GWBoardPlayCountSet(int board, u8 value);
void GWBoardPlayCountAdd(int board, u8 value);
u8 GWBoardPlayCountGet(int board);
void GWBoardMaxStarsSet(int board, int value);
u16 GWBoardMaxStarsGet(int board);
void GWBoardMaxCoinsSet(int board, int value);
u16 GWBoardMaxCoinsGet(int board);
int GWBoardWinCountInc(int character, int board);
int GWBoardWinCountGet(int character, int board);
void GWBoardWinCountSet(int character, int board, int value);
int GWMGAvailGet(int id);
int GWMGAvailSet(int id);
int GWMGCustomGet(int id);
int GWMGCustomSet(int id);
int GWMGCustomReset(int id);
s16 GWCoinsGet(int player);
void GWCoinsSet(int player, s16 value);
void GWCoinsAdd(int player, s16 amount);
void GWStarsSet(int player, s16 value);
void GWStarsAdd(int player, s16 amount);
s32 GWStarsGet(int player);
void GWMGRecordSet(s32 index, s32 value);
s32 GWMGRecordGet(s32 index);
void GWCharColorGet(s32 character, GXColor *color);
void GWBoardPlayCountSet(s32 board, u8 value);
void GWBoardPlayCountAdd(s32 board, u8 value);
u8 GWBoardPlayCountGet(s32 board);
void GWBoardMaxStarsSet(s32 board, s32 value);
u16 GWBoardMaxStarsGet(s32 board);
void GWBoardMaxCoinsSet(s32 board, s32 value);
u16 GWBoardMaxCoinsGet(s32 board);
s32 GWBoardWinCountInc(s32 character, s32 board);
s32 GWBoardWinCountGet(s32 character, s32 board);
void GWBoardWinCountSet(s32 character, s32 board, s32 value);
s32 GWMGAvailGet(s32 id);
s32 GWMGAvailSet(s32 id);
s32 GWMGCustomGet(s32 id);
s32 GWMGCustomSet(s32 id);
s32 GWMGCustomReset(s32 id);
s16 GWCoinsGet(s32 player);
void GWCoinsSet(s32 player, s16 value);
void GWCoinsAdd(s32 player, s16 amount);
void GWStarsSet(s32 player, s16 value);
void GWStarsAdd(s32 player, s16 amount);
s32 GWStarsGet(s32 player);
void GWTotalStarsSet(s16 value);
void GWTotalStarsAdd(s16 amount);
u16 GWTotalStarsGet(void);

View file

@ -186,6 +186,12 @@ static inline void GWRumbleSet(s32 value)
}
}
static inline s32 GWBonusStarGet(void)
{
return GWSystem.bonus_star;
}
static inline s32 GWMGExplainGet(void)
{
return GWSystem.explain_mg;

View file

@ -7,6 +7,6 @@ HsfData *LoadHSF(void *data);
void ClusterAdjustObject(HsfData *model, HsfData *src_model);
char *SetName(u32 *str_ofs);
char *MakeObjectName(char *name);
int CmpObjectName(char *name1, char *name2);
s32 CmpObjectName(char *name1, char *name2);
#endif

View file

@ -13,7 +13,7 @@ typedef struct jump_buf {
double flt_regs[19];
} jmp_buf;
int gcsetjmp(jmp_buf *jump);
int gclongjmp(jmp_buf *jump, int status);
s32 gcsetjmp(jmp_buf *jump);
s32 gclongjmp(jmp_buf *jump, s32 status);
#endif

View file

@ -43,8 +43,8 @@
typedef struct seq_work SeqWork;
typedef int (*SeqUpdateFunc)(SeqWork *work);
typedef int (*SeqInitFunc)(SeqWork *work, va_list params);
typedef s32 (*SeqUpdateFunc)(SeqWork *work);
typedef s32 (*SeqInitFunc)(SeqWork *work, va_list params);
typedef struct seq_work {
SeqUpdateFunc update;

View file

@ -32,8 +32,8 @@ typedef void (*omObjFunc)(struct om_obj_data *);
typedef struct om_ovl_his_data {
OverlayID overlay;
int event;
int stat;
s32 event;
s32 stat;
} omOvlHisData;
typedef struct om_obj_data {
@ -65,14 +65,14 @@ typedef struct om_dll_data {
s32 ret;
} omDllData;
void omMasterInit(int prio, FileListEntry *ovl_list, int ovl_count, OverlayID start_ovl);
void omOvlCallEx(OverlayID overlay, s16 arg2, int event, int stat);
void omOvlGotoEx(OverlayID overlay, s16 arg2, int event, int stat);
void omMasterInit(s32 prio, FileListEntry *ovl_list, s32 ovl_count, OverlayID start_ovl);
void omOvlCallEx(OverlayID overlay, s16 arg2, s32 event, s32 stat);
void omOvlGotoEx(OverlayID overlay, s16 arg2, s32 event, s32 stat);
void omOvlReturnEx(s16 level, s16 arg2);
void omOvlKill(s16 arg);
void omOvlHisChg(s32 level, OverlayID overlay, int event, int stat);
void omOvlHisChg(s32 level, OverlayID overlay, s32 event, s32 stat);
omOvlHisData *omOvlHisGet(s32 level);
Process *omInitObjMan(s16 max_objs, int prio);
Process *omInitObjMan(s16 max_objs, s32 prio);
void omDestroyObjMan(void);
omObjData *omAddObjEx(Process *objman_process, s16 prio, u16 mdlcnt, u16 mtncnt, s16 group, omObjFunc func);
void omAddMember(Process *objman_process, u16 group, omObjData *object);
@ -93,7 +93,7 @@ OverlayID omCurrentOvlGet(void);
void omDLLDBGOut(void);
void omDLLInit(FileListEntry *ovl_list);
int omDLLStart(s16 overlay, s16 flag);
s32 omDLLStart(s16 overlay, s16 flag);
void omDLLNumEnd(s16 overlay, s16 flag);
void omDLLEnd(s16 dllno, s16 flag);
omDllData *omDLLLink(omDllData **dll_ptr, s16 overlay, s16 flag);
@ -113,11 +113,11 @@ extern omObjData *omDBGSysKeyObj;
extern Process *omwatchproc;
extern OverlayID omnextovl;
extern OverlayID omcurovl;
extern int omcurdll;
extern int omovlhisidx;
extern int omovlevtno;
extern int omnextovlevtno;
extern int omovlstat;
extern s32 omcurdll;
extern s32 omovlhisidx;
extern s32 omovlevtno;
extern s32 omnextovlevtno;
extern s32 omovlstat;
extern char omUPauseFlag;
extern s16 omSysExitReq;
extern s16 omdispinfo;

View file

@ -20,7 +20,7 @@ typedef struct process {
u16 exec;
u16 stat;
u16 prio;
int sleep_time;
s32 sleep_time;
u32 base_sp;
jmp_buf jump;
void (*dtor)(void);
@ -35,19 +35,19 @@ void HuPrcChildUnlink(Process *process);
Process *HuPrcChildCreate(void (*func)(void), u16 prio, u32 stack_size, s32 extra_size, Process *parent);
void HuPrcChildWatch(void);
Process *HuPrcCurrentGet(void);
int HuPrcKill(Process *process);
s32 HuPrcKill(Process *process);
void HuPrcChildKill(Process *process);
void HuPrcSleep(int time);
void HuPrcSleep(s32 time);
void HuPrcVSleep();
void HuPrcWakeup(Process *process);
void HuPrcDestructorSet2(Process *process, void (*func)(void));
void HuPrcDestructorSet(void (*func)(void));
void HuPrcCall(int tick);
void HuPrcCall(s32 tick);
void *HuPrcMemAlloc(s32 size);
void HuPrcMemFree(void *ptr);
void HuPrcSetStat(Process *process, u16 value);
void HuPrcResetStat(Process *process, u16 value);
void HuPrcAllPause(int flag);
void HuPrcAllUPause(int flag);
void HuPrcAllPause(s32 flag);
void HuPrcAllUPause(s32 flag);
#endif

View file

@ -5,7 +5,7 @@ static void InitBoard(void) {
BoardCommonInit(BoardCreate, BoardDestroy);
}
int _prolog(void) {
s32 _prolog(void) {
const VoidFunc* ctors = _ctors;
while (*ctors != 0) {
(**ctors)();

View file

@ -1,6 +1,6 @@
#include "REL/executor.h"
int _prolog(void) {
s32 _prolog(void) {
const VoidFunc* ctors = _ctors;
while (*ctors != 0) {
(**ctors)();

View file

@ -453,7 +453,7 @@ void fn_1_EC(void)
}
}
int _prolog(void) {
s32 _prolog(void) {
const VoidFunc* ctors = _ctors;
while (*ctors != 0) {
(**ctors)();

View file

@ -677,7 +677,7 @@ s32 BoardSpaceBlockExec(s32 player, s32 space)
if(space == GWSystem.block_pos) {
event_exec = 1;
}
if((int)GWSystem.bonus_star == 0 && GWPartyGet() == 1 && !_CheckFlag(FLAG_ID_MAKE(1, 11))) {
if(!GWBonusStarGet() && GWPartyGet() == 1 && !_CheckFlag(FLAG_ID_MAKE(1, 11))) {
event_exec = 0;
}
if(GWBoardGet() == 7 || GWBoardGet() == 8) {

View file

@ -172,7 +172,7 @@ static void ExecBoardWindow(void) {
HuPrcEnd();
}
int BoardWinChoiceGet(void) {
s32 BoardWinChoiceGet(void) {
return winChoice;
}
@ -292,7 +292,7 @@ void BoardWinKeyWait(void) {
winWait = 1;
}
int BoardWinSpeedGet(void) {
s32 BoardWinSpeedGet(void) {
return winSpeedTbl[GWMessSpeedGet()];
}

View file

@ -26,7 +26,7 @@ static DataReadStat ATTRIBUTE_ALIGN(32) ReadDataStat[DATA_MAX_READSTAT];
void HuDataInit(void)
{
int i = 0;
s32 i = 0;
FileListEntry *dir_stat = DataDirStat;
DataReadStat *read_stat;
while(dir_stat->name) {
@ -45,9 +45,9 @@ void HuDataInit(void)
}
}
static int HuDataReadStatusGet(void)
static s32 HuDataReadStatusGet(void)
{
int i;
s32 i;
for(i=0; i<DATA_MAX_READSTAT; i++) {
if(ReadDataStat[i].dir_id == -1) {
break;
@ -59,9 +59,9 @@ static int HuDataReadStatusGet(void)
return i;
}
int HuDataReadChk(s32 data_num)
s32 HuDataReadChk(s32 data_num)
{
int i;
s32 i;
data_num >>= 16;
for(i=0; i<DATA_MAX_READSTAT; i++) {
if(ReadDataStat[i].dir_id == data_num && ReadDataStat[i].status != 1) {
@ -76,7 +76,7 @@ int HuDataReadChk(s32 data_num)
DataReadStat *HuDataGetStatus(void *dir_ptr)
{
int i;
s32 i;
for(i=0; i<DATA_MAX_READSTAT; i++) {
if(ReadDataStat[i].dir == dir_ptr) {
break;
@ -90,7 +90,7 @@ DataReadStat *HuDataGetStatus(void *dir_ptr)
void *HuDataGetDirPtr(s32 data_num)
{
int status = HuDataReadChk(data_num);
s32 status = HuDataReadChk(data_num);
if(status < 0) {
return NULL;
}
@ -100,7 +100,7 @@ void *HuDataGetDirPtr(s32 data_num)
DataReadStat *HuDataDirRead(s32 data_num)
{
DataReadStat *read_stat;
int status;
s32 status;
s32 dir_id;
dir_id = data_num >> 16;
if(DataDirMax <= dir_id) {
@ -135,7 +135,7 @@ DataReadStat *HuDataDirRead(s32 data_num)
static DataReadStat *HuDataDirReadNum(s32 data_num, s32 num)
{
DataReadStat *read_stat;
int status;
s32 status;
s32 dir_id;
dir_id = data_num >> 16;
if(DataDirMax <= dir_id) {
@ -176,7 +176,7 @@ static DataReadStat *HuDataDirReadNum(s32 data_num, s32 num)
DataReadStat *HuDataDirSet(void *dir_ptr, s32 data_num)
{
DataReadStat *read_stat = HuDataGetStatus(dir_ptr);
int status;
s32 status;
if((status = HuDataReadChk(read_stat->dir_id << 16)) >= 0) {
HuDataDirClose(data_num);
}
@ -194,7 +194,7 @@ DataReadStat *HuDataDirSet(void *dir_ptr, s32 data_num)
void HuDataDirReadAsyncCallBack(s32 result, DVDFileInfo* fileInfo)
{
DataReadStat *read_stat;
int i;
s32 i;
for(i=0; i<DATA_MAX_READSTAT; i++) {
if(ReadDataStat[i].status == 1 && ReadDataStat[i].file_info.startAddr == fileInfo->startAddr) {
break;
@ -211,7 +211,7 @@ void HuDataDirReadAsyncCallBack(s32 result, DVDFileInfo* fileInfo)
s32 HuDataDirReadAsync(s32 data_num)
{
DataReadStat *read_stat;
int status;
s32 status;
s32 dir_id;
dir_id = data_num >> 16;
if(DataDirMax <= dir_id) {
@ -244,7 +244,7 @@ s32 HuDataDirReadAsync(s32 data_num)
s32 HuDataDirReadNumAsync(s32 data_num, s32 num)
{
DataReadStat *read_stat;
int status;
s32 status;
s32 dir_id;
dir_id = data_num >> 16;
if(DataDirMax <= dir_id) {
@ -291,7 +291,7 @@ static void GetFileInfo(DataReadStat *read_stat, s32 file_num)
void *HuDataRead(s32 data_num)
{
DataReadStat *read_stat;
int status;
s32 status;
void *buf;
if(!HuDataDirRead(data_num)) {
(void)data_num;
@ -312,7 +312,7 @@ void *HuDataRead(s32 data_num)
void *HuDataReadNum(s32 data_num, s32 num)
{
DataReadStat *read_stat;
int status;
s32 status;
void *buf;
if(!HuDataDirReadNum(data_num, num)) {
return NULL;
@ -332,7 +332,7 @@ void *HuDataReadNum(s32 data_num, s32 num)
void *HuDataSelHeapRead(s32 data_num, HeapID heap)
{
DataReadStat *read_stat;
int status;
s32 status;
void *buf;
if(!HuDataDirRead(data_num)) {
return NULL;
@ -368,7 +368,7 @@ void *HuDataSelHeapRead(s32 data_num, HeapID heap)
void *HuDataSelHeapReadNum(s32 data_num, s32 num, HeapID heap)
{
DataReadStat *read_stat;
int status;
s32 status;
void *buf;
if(!HuDataDirReadNum(data_num, num)) {
return NULL;
@ -412,7 +412,7 @@ static void **HuDataReadMultiSub(s32 *data_ids, BOOL use_num, s32 num)
char **paths;
void **dir_ptrs;
void **out_ptrs;
int i, count, total_files;
s32 i, count, total_files;
u32 dir_id;
for(i=0, count=0; data_ids[i] != -1; i++) {
dir_id = data_ids[i] >> 16;
@ -433,7 +433,7 @@ static void **HuDataReadMultiSub(s32 *data_ids, BOOL use_num, s32 num)
for(i=0, count=0; data_ids[i] != -1; i++) {
dir_id = data_ids[i] >> 16;
if(HuDataReadChk(data_ids[i]) < 0) {
int j;
s32 j;
for(j=0; dir_ids[j] != -1; j++) {
if(dir_ids[j] == dir_id){
break;
@ -481,7 +481,7 @@ static void **HuDataReadMultiSub(s32 *data_ids, BOOL use_num, s32 num)
s32 HuDataGetSize(s32 data_num)
{
DataReadStat *read_stat;
int status;
s32 status;
if((status = HuDataReadChk(data_num)) == -1) {
return -1;
}
@ -499,7 +499,7 @@ void HuDataClose(void *ptr)
void HuDataCloseMulti(void **ptrs)
{
int i;
s32 i;
for(i=0; ptrs[i]; i++) {
void *ptr = ptrs[i];
if(ptr) {
@ -514,7 +514,7 @@ void HuDataCloseMulti(void **ptrs)
void HuDataDirClose(s32 data_id)
{
DataReadStat *read_stat;
int i;
s32 i;
s32 dir_id = data_id >> 16;
for(i=0; i<DATA_MAX_READSTAT; i++) {
if(ReadDataStat[i].dir_id == dir_id) {
@ -537,7 +537,7 @@ void HuDataDirClose(s32 data_id)
void HuDataDirCloseNum(s32 num)
{
int i;
s32 i;
for(i=0; i<DATA_MAX_READSTAT; i++) {
if(ReadDataStat[i].used == TRUE && ReadDataStat[i].num == num) {
HuDataDirClose(ReadDataStat[i].dir_id << 16);

View file

@ -21,7 +21,7 @@ static void HuDecodeNone(struct decode_data *decode)
static void HuDecodeLz(struct decode_data *decode)
{
u16 flag, pos;
int i, j, copy_len;
s32 i, j, copy_len;
flag = 0;
pos = 958;
@ -54,7 +54,7 @@ static void HuDecodeLz(struct decode_data *decode)
static inline void SlideReadHeader(struct decode_data *decode)
{
int size;
s32 size;
size = (*decode->src++) << 24;
size += (*decode->src++) << 16;
size += (*decode->src++) << 8;
@ -78,7 +78,7 @@ static void HuDecodeSlide(struct decode_data *decode)
num_bits = 32;
}
if(flag >> 31) {
*decode->dst++ = (int)*decode->src++;
*decode->dst++ = (s32)*decode->src++;
decode->size--;
} else {
u8 *src;
@ -125,7 +125,7 @@ static void HuDecodeFslide(struct decode_data *decode)
num_bits = 32;
}
if(flag >> 31) {
*decode->dst++ = (int)*decode->src++;
*decode->dst++ = (s32)*decode->src++;
decode->size--;
} else {
u8 *src;
@ -155,11 +155,11 @@ static void HuDecodeFslide(struct decode_data *decode)
static void HuDecodeRle(struct decode_data *decode)
{
int i;
s32 i;
while(decode->size) {
int size = *decode->src++;
s32 size = *decode->src++;
if(size < 128) {
int fill = *decode->src++;
s32 fill = *decode->src++;
for(i=0; i<size; i++) {
*decode->dst++ = fill;
}
@ -173,7 +173,7 @@ static void HuDecodeRle(struct decode_data *decode)
}
}
void HuDecodeData(void *src, void *dst, u32 size, int decode_type)
void HuDecodeData(void *src, void *dst, u32 size, s32 decode_type)
{
struct decode_data decode;
struct decode_data *decode_ptr = &decode;

View file

@ -147,19 +147,19 @@ s32 GWMessDelayGet(void)
return GWSystem.mess_delay;
}
void GWMGRecordSet(int index, s32 value)
void GWMGRecordSet(s32 index, s32 value)
{
if(!_CheckFlag(FLAG_ID_MAKE(1, 12))) {
GWGameStat.mg_record[index] = value;
}
}
s32 GWMGRecordGet(int index)
s32 GWMGRecordGet(s32 index)
{
return GWGameStat.mg_record[index];
}
void GWCharColorGet(int character, GXColor *color)
void GWCharColorGet(s32 character, GXColor *color)
{
GXColor char_color[] = {
{ 227, 67, 67, 255 },
@ -174,7 +174,7 @@ void GWCharColorGet(int character, GXColor *color)
*color = char_color[character];
}
void GWBoardPlayCountSet(int board, u8 value)
void GWBoardPlayCountSet(s32 board, u8 value)
{
if(value > 99) {
value = 99;
@ -182,7 +182,7 @@ void GWBoardPlayCountSet(int board, u8 value)
GWGameStat.board_play_count[board] = value;
}
void GWBoardPlayCountAdd(int board, u8 value)
void GWBoardPlayCountAdd(s32 board, u8 value)
{
value += GWGameStat.board_play_count[board];
if(value > 99) {
@ -192,34 +192,34 @@ void GWBoardPlayCountAdd(int board, u8 value)
}
u8 GWBoardPlayCountGet(int board)
u8 GWBoardPlayCountGet(s32 board)
{
return GWGameStat.board_play_count[board];
}
void GWBoardMaxStarsSet(int board, int value)
void GWBoardMaxStarsSet(s32 board, s32 value)
{
GWGameStat.board_max_stars[board] = value;
}
u16 GWBoardMaxStarsGet(int board)
u16 GWBoardMaxStarsGet(s32 board)
{
return GWGameStat.board_max_stars[board];
}
void GWBoardMaxCoinsSet(int board, int value)
void GWBoardMaxCoinsSet(s32 board, s32 value)
{
GWGameStat.board_max_coins[board] = value;
}
u16 GWBoardMaxCoinsGet(int board)
u16 GWBoardMaxCoinsGet(s32 board)
{
return GWGameStat.board_max_coins[board];
}
int GWBoardWinCountInc(int character, int board)
s32 GWBoardWinCountInc(s32 character, s32 board)
{
int win_count = GWGameStat.board_win_count[board][character]+1;
s32 win_count = GWGameStat.board_win_count[board][character]+1;
if(win_count > 99) {
win_count = 99;
}
@ -227,20 +227,20 @@ int GWBoardWinCountInc(int character, int board)
return win_count;
}
int GWBoardWinCountGet(int character, int board)
s32 GWBoardWinCountGet(s32 character, s32 board)
{
return GWGameStat.board_win_count[board][character];
}
void GWBoardWinCountSet(int character, int board, int value)
void GWBoardWinCountSet(s32 character, s32 board, s32 value)
{
GWGameStat.board_win_count[board][character] = value;
}
int GWMGAvailGet(int id)
s32 GWMGAvailGet(s32 id)
{
int word;
int bit;
s32 word;
s32 bit;
id -= 401;
word = id >> 5;
bit = id % 32;
@ -251,20 +251,20 @@ int GWMGAvailGet(int id)
}
}
int GWMGAvailSet(int id)
s32 GWMGAvailSet(s32 id)
{
int word;
int bit;
s32 word;
s32 bit;
id -= 401;
word = id >> 5;
bit = id % 32;
GWGameStat.mg_avail[word] |= (1 << bit);
}
int GWMGCustomGet(int id)
s32 GWMGCustomGet(s32 id)
{
int word;
int bit;
s32 word;
s32 bit;
id -= 401;
word = id >> 5;
bit = id % 32;
@ -275,32 +275,32 @@ int GWMGCustomGet(int id)
}
}
int GWMGCustomSet(int id)
s32 GWMGCustomSet(s32 id)
{
int word;
int bit;
s32 word;
s32 bit;
id -= 401;
word = id >> 5;
bit = id % 32;
GWGameStat.mg_custom[word] |= (1 << bit);
}
int GWMGCustomReset(int id)
s32 GWMGCustomReset(s32 id)
{
int word;
int bit;
s32 word;
s32 bit;
id -= 401;
word = id >> 5;
bit = id % 32;
GWGameStat.mg_custom[word] &= ~(1 << bit);
}
s16 GWCoinsGet(int player)
s16 GWCoinsGet(s32 player)
{
return GWPlayer[player].coins;
}
void GWCoinsSet(int player, s16 value)
void GWCoinsSet(s32 player, s16 value)
{
if(!_CheckFlag(FLAG_ID_MAKE(1, 12))) {
if(value < 0) {
@ -316,12 +316,12 @@ void GWCoinsSet(int player, s16 value)
}
}
void GWCoinsAdd(int player, s16 amount)
void GWCoinsAdd(s32 player, s16 amount)
{
GWCoinsSet(player, GWPlayer[player].coins+amount);
}
void GWStarsSet(int player, s16 value)
void GWStarsSet(s32 player, s16 value)
{
if(value < 0) {
value = 0;
@ -335,12 +335,12 @@ void GWStarsSet(int player, s16 value)
GWPlayer[player].stars = value;
}
void GWStarsAdd(int player, s16 amount)
void GWStarsAdd(s32 player, s16 amount)
{
GWStarsSet(player, GWPlayer[player].stars+amount);
}
s32 GWStarsGet(int player)
s32 GWStarsGet(s32 player)
{
return GWPlayer[player].stars;
}

View file

@ -981,7 +981,7 @@ static void PaletteLoad(void)
char *MakeObjectName(char *name)
{
static char buf[768];
int index, num_minus;
s32 index, num_minus;
char *temp_name;
num_minus = 0;
index = 0;
@ -1009,9 +1009,9 @@ char *MakeObjectName(char *name)
return buf;
}
int CmpObjectName(char *name1, char *name2)
s32 CmpObjectName(char *name1, char *name2)
{
int temp = 0;
s32 temp = 0;
return strcmp(name1, name2);
}
@ -1054,7 +1054,7 @@ static inline s32 FindClusterName(char *name)
return -1;
}
static inline int FindMotionClusterName(char *name)
static inline s32 FindMotionClusterName(char *name)
{
s32 i;
HsfCluster *cluster;
@ -1085,7 +1085,7 @@ static inline s32 FindAttributeName(char *name)
return -1;
}
static inline int FindMotionAttributeName(char *name)
static inline s32 FindMotionAttributeName(char *name)
{
s32 i;
HsfAttribute *attribute;

View file

@ -166,7 +166,7 @@ void HuSysBeforeRender()
void HuSysDoneRender(s32 retrace_count)
{
int retrace_dist;
s32 retrace_dist;
if(DemoStatEnable) {
GXDrawDone();
DEMOUpdateStats(1);

View file

@ -1,6 +1,6 @@
#include "game/jmp.h"
int gcsetjmp(register jmp_buf *jump) {
s32 gcsetjmp(register jmp_buf *jump) {
// clang-format off
asm {
mflr r5
@ -36,7 +36,7 @@ int gcsetjmp(register jmp_buf *jump) {
}
// clang-format off
asm int gclongjmp(register jmp_buf *jump, register int status) {
asm s32 gclongjmp(register jmp_buf *jump, register s32 status) {
nofralloc
lwz r5, jump->lr
lwz r6, jump->cr

View file

@ -7,7 +7,7 @@ static void *HeapTbl[HEAP_MAX];
void HuMemInitAll(void)
{
int i;
s32 i;
void *ptr;
u32 free_size;
for(i=0; i<4; i++) {

View file

@ -31,30 +31,30 @@ typedef struct seq_info {
s32 time_max;
} SeqInfo;
static int SeqInitTimer(SeqWork *work, va_list params);
static int SeqUpdateTimer(SeqWork *work);
static s32 SeqInitTimer(SeqWork *work, va_list params);
static s32 SeqUpdateTimer(SeqWork *work);
static int SeqInitType2(SeqWork *work, va_list params);
static int SeqUpdateType2(SeqWork *work);
static s32 SeqInitType2(SeqWork *work, va_list params);
static s32 SeqUpdateType2(SeqWork *work);
static int SeqInitMGBasic(SeqWork *work, va_list params);
static int SeqUpdateMGBasic(SeqWork *work);
static int SeqInitMGCommon(SeqWork *work, va_list params);
static int SeqUpdateMG1vs3(SeqWork *work);
static int SeqUpdateMGBattle(SeqWork *work);
static int SeqUpdateMGStory(SeqWork *work);
static int SeqUpdateMG2vs2(SeqWork *work);
static int SeqUpdateMGBowser(SeqWork *work);
static s32 SeqInitMGBasic(SeqWork *work, va_list params);
static s32 SeqUpdateMGBasic(SeqWork *work);
static s32 SeqInitMGCommon(SeqWork *work, va_list params);
static s32 SeqUpdateMG1vs3(SeqWork *work);
static s32 SeqUpdateMGBattle(SeqWork *work);
static s32 SeqUpdateMGStory(SeqWork *work);
static s32 SeqUpdateMG2vs2(SeqWork *work);
static s32 SeqUpdateMGBowser(SeqWork *work);
static int SeqInitWin(SeqWork *work, va_list params);
static int SeqUpdateWin(SeqWork *work);
static int SeqInitDraw(SeqWork *work, va_list params);
static int SeqUpdateDraw(SeqWork *work);
static int SeqInitRecord(SeqWork *work, va_list params);
static int SeqUpdateRecord(SeqWork *work);
static s32 SeqInitWin(SeqWork *work, va_list params);
static s32 SeqUpdateWin(SeqWork *work);
static s32 SeqInitDraw(SeqWork *work, va_list params);
static s32 SeqUpdateDraw(SeqWork *work);
static s32 SeqInitRecord(SeqWork *work, va_list params);
static s32 SeqUpdateRecord(SeqWork *work);
static int SeqInitFlip(SeqWork *work, va_list params);
static int SeqUpdateFlip(SeqWork *work);
static s32 SeqInitFlip(SeqWork *work, va_list params);
static s32 SeqUpdateFlip(SeqWork *work);
OverlayID mgSeqOvlPrev = OVL_INVALID;
@ -118,7 +118,7 @@ static u8 seqDoneF;
u8 lbl_801D3D94;
static s16 seqSpeed;
static s16 seqPauseF;
static s32 seqRecordVal;
static int seqRecordVal;
static s32 pauseWaitF;
static s32 pauseExitF;
static s32 pauseActiveF;
@ -130,7 +130,7 @@ void fn_80036BC8(void);
void MGSeqInit(void)
{
int i;
s32 i;
SeqWork *work;
work = &seqWorkData[0];
for(i=8; i!=0; i--, work++) {
@ -204,8 +204,8 @@ static s16 CreateSeq(s16 seq_no, va_list params)
{
SeqWork *work;
SeqInfo *info;
int i;
int temp;
s32 i;
s32 temp;
work = seqWorkData;
info = &seqInfoTbl[(u8)seq_no];
for(i=0; i<8; i++, work++) {
@ -269,7 +269,7 @@ u8 MGSeqStatGet(s16 id)
SeqWork *work;
u8 ret = 0;
if(id < 0) {
int i;
s32 i;
work = seqWorkData;
for(i=8; i != 0; i--, work++) {
ret |= work->stat;
@ -334,7 +334,7 @@ void MGSeqStub(void)
void MGSeqSprKill(SeqWork *work)
{
int i;
s32 i;
for(i=0; i<16; i++) {
if(work->spr_grp[i] >= 0) {
HuSprGrpKill(work->spr_grp[i]);
@ -350,7 +350,7 @@ static void *SeqReadFile(s32 file)
return HuAR_ARAMtoMRAMFileRead(file, MEMORY_DEFAULT_NUM, HEAP_DATA);
}
static int SeqInitTimer(SeqWork *work, va_list params)
static s32 SeqInitTimer(SeqWork *work, va_list params)
{
AnimData *spr_anim;
s16 sprite;
@ -407,7 +407,7 @@ static int SeqInitTimer(SeqWork *work, va_list params)
return 1;
}
static int SeqUpdateTimer(SeqWork *work)
static s32 SeqUpdateTimer(SeqWork *work)
{
float scale;
float tp_lvl;
@ -563,7 +563,7 @@ static int SeqUpdateTimer(SeqWork *work)
}
}
static int SeqInitType2(SeqWork *work, va_list params)
static s32 SeqInitType2(SeqWork *work, va_list params)
{
s16 spr_idx;
s16 spr_grp;
@ -662,7 +662,7 @@ static int SeqInitType2(SeqWork *work, va_list params)
return 1;
}
static int SeqUpdateType2(SeqWork *work)
static s32 SeqUpdateType2(SeqWork *work)
{
float tp_lvl;
s16 spr_grp;
@ -920,7 +920,7 @@ static float ForceDefine480()
static void SeqPlayStartFX(void);
static int SeqInitMGBasic(SeqWork *work, va_list params)
static s32 SeqInitMGBasic(SeqWork *work, va_list params)
{
s16 i;
s16 word_grp;
@ -967,7 +967,7 @@ static int SeqInitMGBasic(SeqWork *work, va_list params)
return 1;
}
static int SeqUpdateMGBasic(SeqWork *work)
static s32 SeqUpdateMGBasic(SeqWork *work)
{
s16 idx;
float scale;
@ -1130,7 +1130,7 @@ static int SeqUpdateMGBasic(SeqWork *work)
return 1;
}
static int SeqInitMGCommon(SeqWork *work, va_list params)
static s32 SeqInitMGCommon(SeqWork *work, va_list params)
{
s16 i;
float tp_lvl;
@ -1204,7 +1204,7 @@ static int SeqInitMGCommon(SeqWork *work, va_list params)
return 1;
}
static int SeqUpdateMGBattle(SeqWork *work)
static s32 SeqUpdateMGBattle(SeqWork *work)
{
s16 idx;
float scale;
@ -1446,7 +1446,7 @@ static int SeqUpdateMGBattle(SeqWork *work)
return 1;
}
static int SeqUpdateMG1vs3(SeqWork *work)
static s32 SeqUpdateMG1vs3(SeqWork *work)
{
s16 idx;
float scale;
@ -1652,7 +1652,7 @@ static int SeqUpdateMG1vs3(SeqWork *work)
return 1;
}
static int SeqUpdateMGStory(SeqWork *work)
static s32 SeqUpdateMGStory(SeqWork *work)
{
s16 idx;
float scale;
@ -1859,7 +1859,7 @@ static int SeqUpdateMGStory(SeqWork *work)
return 1;
}
static int SeqUpdateMG2vs2(SeqWork *work)
static s32 SeqUpdateMG2vs2(SeqWork *work)
{
s16 idx;
float scale;
@ -2036,7 +2036,7 @@ static int SeqUpdateMG2vs2(SeqWork *work)
return 1;
}
static int SeqInitFlip(SeqWork *work, va_list params)
static s32 SeqInitFlip(SeqWork *work, va_list params)
{
s16 i;
s16 word_grp;
@ -2117,7 +2117,7 @@ static int SeqInitFlip(SeqWork *work, va_list params)
return 1;
}
static int SeqUpdateFlip(SeqWork *work)
static s32 SeqUpdateFlip(SeqWork *work)
{
s16 idx;
float scale;
@ -2285,7 +2285,7 @@ static int SeqUpdateFlip(SeqWork *work)
return 1;
}
static int SeqUpdateMGBowser(SeqWork *work)
static s32 SeqUpdateMGBowser(SeqWork *work)
{
s16 idx;
float scale;
@ -2500,7 +2500,7 @@ static int SeqUpdateMGBowser(SeqWork *work)
return 1;
}
static int SeqInitDraw(SeqWork *work, va_list params)
static s32 SeqInitDraw(SeqWork *work, va_list params)
{
s16 word_grp;
work->state = 2;
@ -2529,7 +2529,7 @@ static int SeqInitDraw(SeqWork *work, va_list params)
return 1;
}
static int SeqUpdateDraw(SeqWork *work)
static s32 SeqUpdateDraw(SeqWork *work)
{
s16 idx;
float scale;
@ -2700,9 +2700,9 @@ static s16 winnerNameW[8];
#define GET_WIN_KANAF() ((seqLanguage == 0) ? 1 : 0)
static int SeqInitWin(SeqWork *work, va_list params)
static s32 SeqInitWin(SeqWork *work, va_list params)
{
s32 win_type = va_arg(params, int);
int win_type = va_arg(params, int);
s16 word_idx;
s16 word_grp;
s32 i;
@ -2731,7 +2731,7 @@ static int SeqInitWin(SeqWork *work, va_list params)
num_winners = 0;
work->win_scale = 1.0f;
for(j=0; j<4; j++) {
s32 winner = va_arg(params, int);
int winner = va_arg(params, int);
if(winner < 0) {
continue;
}
@ -2825,7 +2825,7 @@ static int SeqInitWin(SeqWork *work, va_list params)
}
static int SeqUpdateWin(SeqWork *work)
static s32 SeqUpdateWin(SeqWork *work)
{
s32 idx;
float tp_lvl;
@ -2948,7 +2948,7 @@ static int SeqUpdateWin(SeqWork *work)
return 1;
}
static int SeqInitRecord(SeqWork *work, va_list params)
static s32 SeqInitRecord(SeqWork *work, va_list params)
{
AnimData *spr_data;
s16 spr_grp;
@ -3063,7 +3063,7 @@ static int SeqInitRecord(SeqWork *work, va_list params)
return 1;
}
static int SeqUpdateRecord(SeqWork *work)
static s32 SeqUpdateRecord(SeqWork *work)
{
s16 group;
if(_CheckFlag(0x1000C)) {

View file

@ -16,7 +16,7 @@ void omDLLDBGOut(void)
void omDLLInit(FileListEntry *ovl_list)
{
int i;
s32 i;
OSReport("DLL DBG OUT\n");
for(i=0; i<OM_DLL_MAX; i++) {
omDLLinfoTbl[i] = NULL;
@ -24,9 +24,9 @@ void omDLLInit(FileListEntry *ovl_list)
omDLLFileList = ovl_list;
}
int omDLLStart(s16 overlay, s16 flag)
s32 omDLLStart(s16 overlay, s16 flag)
{
int dllno;
s32 dllno;
OSReport("DLLStart %d %d\n", overlay, flag);
dllno = omDLLSearch(overlay);
if(dllno >= 0 && !flag) {

View file

@ -34,12 +34,12 @@ omObjData *omDBGSysKeyObj;
Process *omwatchproc;
OverlayID omnextovl;
OverlayID omcurovl;
int omcurdll;
int omovlhisidx;
int omovlevtno;
int omnextovlevtno;
int omovlstat;
static int omnextovlstat;
s32 omcurdll;
s32 omovlhisidx;
s32 omovlevtno;
s32 omnextovlevtno;
s32 omovlstat;
static s32 omnextovlstat;
char omUPauseFlag;
s16 omSysExitReq;
s16 omdispinfo;
@ -52,7 +52,7 @@ OverlayID omprevovl = OVL_INVALID;
static void omWatchOverlayProc(void);
static void omInsertObj(Process *objman_process, omObjData *object);
void omMasterInit(int prio, FileListEntry *ovl_list, int ovl_count, OverlayID start_ovl)
void omMasterInit(s32 prio, FileListEntry *ovl_list, s32 ovl_count, OverlayID start_ovl)
{
omDLLInit(ovl_list);
omwatchproc = HuPrcCreate(omWatchOverlayProc, prio, 8192, 0);
@ -106,7 +106,7 @@ static void omWatchOverlayProc(void)
}
}
void omOvlCallEx(OverlayID overlay, s16 arg2, int event, int stat)
void omOvlCallEx(OverlayID overlay, s16 arg2, s32 event, s32 stat)
{
OSReport("objman>Call New Ovl %d(%d)\n", overlay, arg2);
if(omovlhisidx >= OM_OVL_HIS_MAX) {
@ -119,7 +119,7 @@ void omOvlCallEx(OverlayID overlay, s16 arg2, int event, int stat)
omOvlGotoEx(overlay, arg2, event, stat);
}
void omOvlGotoEx(OverlayID overlay, s16 arg2, int event, int stat)
void omOvlGotoEx(OverlayID overlay, s16 arg2, s32 event, s32 stat)
{
omprevovl = omcurovl;
if(omcurovl >= 0) {
@ -162,7 +162,7 @@ void omOvlKill(s16 arg)
omDBGSysKeyObj = NULL;
}
void omOvlHisChg(s32 level, OverlayID overlay, int event, int stat)
void omOvlHisChg(s32 level, OverlayID overlay, s32 event, s32 stat)
{
omOvlHisData *history;
if(omovlhisidx-level < 0 || omovlhisidx-level >= OM_OVL_HIS_MAX) {
@ -184,12 +184,12 @@ omOvlHisData *omOvlHisGet(s32 level)
return &omovlhis[omovlhisidx-level];
}
Process *omInitObjMan(s16 max_objs, int prio)
Process *omInitObjMan(s16 max_objs, s32 prio)
{
omObjGroup *group_all;
omObjData *obj_all;
omObjData *obj;
int i;
s32 i;
omObjMan *objman;
Process *process;
OSReport("objman>InitObjMan start\n");
@ -245,7 +245,7 @@ void omDestroyObjMan(void)
omObjData *omAddObjEx(Process *objman_process, s16 prio, u16 mdlcnt, u16 mtncnt, s16 group, void (*func)(omObjData *))
{
int i;
s32 i;
omObjData *object;
s16 next_idx;
omObjMan *objman = objman_process->user_data;
@ -408,7 +408,7 @@ void omDelMember(Process *objman_process, omObjData *object)
void omMakeGroupEx(Process *objman_process, u16 group, u16 max_objs)
{
int i;
s32 i;
omObjMan *objman = objman_process->user_data;
omObjGroup *group_ptr = &objman->group[group];
if(group_ptr->obj != NULL) {
@ -521,7 +521,7 @@ static void omDumpObj(Process *objman_process)
{
omObjMan *objman = objman_process->user_data;
omObjData *obj_all = objman->obj;
int i;
s32 i;
OSReport("=================== 現在登録されている OBJECT ==================\n");
OSReport("STAT PRI GRPN MEMN PROG (TRA) (ROT) (SCA) mdlcnt mtncnt work[0] work[1] work[2] work[3] *data\n");
for(i=0; i<objman->max_objs; i++) {
@ -540,7 +540,7 @@ void omAllPause(BOOL pause)
{
Process *objman_process = HuPrcCurrentGet();
omObjMan *objman = objman_process->user_data;
int i;
s32 i;
if(pause) {
for(i=0; i<objman->max_objs; i++) {
if((objman->obj[i].stat & (OM_STAT_DELETED|OM_STAT_NOPAUSE)) == 0) {

View file

@ -95,7 +95,7 @@ void omSystemKeyCheck(omObjData *object)
HuAudSeqPauseAll(0);
}
} else {
int i;
s32 i;
s16 pause = 0;
if(WipeStatGet() || omCurrentOvlGet() == OVL_INVALID || omSysExitReq) {
return;

View file

@ -2,7 +2,7 @@
#include "game/memory.h"
#include "dolphin/os.h"
#define PROCESS_MEMORY_RETADDR 0xA5A5A5A5
#define FAKE_RETADDR 0xA5A5A5A5
#define EXEC_NORMAL 0
#define EXEC_SLEEP 1
@ -15,7 +15,6 @@ static Process *processcur;
static u16 processcnt;
u32 procfunc;
void HuPrcInit(void)
{
processcnt = 0;
@ -49,12 +48,9 @@ static void UnlinkProcess(Process **root, Process *process) {
if (process->next) {
process->next->prev = process->prev;
}
if (process->prev) {
process->prev->next = process->next;
}
else {
} else {
*root = process->next;
}
}
@ -75,13 +71,13 @@ Process *HuPrcCreate(void (*func)(void), u16 prio, u32 stack_size, s32 extra_siz
return NULL;
}
HuMemHeapInit(heap, alloc_size);
process = HuMemMemoryAlloc(heap, sizeof(Process), PROCESS_MEMORY_RETADDR);
process = HuMemMemoryAlloc(heap, sizeof(Process), FAKE_RETADDR);
process->heap = heap;
process->exec = EXEC_NORMAL;
process->stat = 0;
process->prio = prio;
process->sleep_time = 0;
process->base_sp = ((u32)HuMemMemoryAlloc(heap, stack_size, PROCESS_MEMORY_RETADDR))+stack_size-8;
process->base_sp = ((u32)HuMemMemoryAlloc(heap, stack_size, FAKE_RETADDR))+stack_size-8;
gcsetjmp(&process->jump);
process->jump.lr = (u32)func;
process->jump.sp = process->base_sp;
@ -144,7 +140,7 @@ Process *HuPrcCurrentGet()
return processcur;
}
static int SetKillStatusProcess(Process *process)
static s32 SetKillStatusProcess(Process *process)
{
if(process->exec != EXEC_KILLED) {
HuPrcWakeup(process);
@ -155,7 +151,7 @@ static int SetKillStatusProcess(Process *process)
}
}
int HuPrcKill(Process *process)
s32 HuPrcKill(Process *process)
{
if(process == NULL) {
process = HuPrcCurrentGet();
@ -196,7 +192,7 @@ void HuPrcEnd()
gcTerminateProcess(process);
}
void HuPrcSleep(int time)
void HuPrcSleep(s32 time)
{
Process *process = HuPrcCurrentGet();
if(time != 0 && process->exec != EXEC_KILLED) {
@ -210,10 +206,7 @@ void HuPrcSleep(int time)
void HuPrcVSleep()
{
Process *process = HuPrcCurrentGet();
if(!gcsetjmp(&process->jump)) {
gclongjmp(&processjmpbuf, 1);
}
HuPrcSleep(0);
}
void HuPrcWakeup(Process *process)
@ -232,10 +225,10 @@ void HuPrcDestructorSet(void (*func)(void))
process->dtor = func;
}
void HuPrcCall(int tick)
void HuPrcCall(s32 tick)
{
Process *process;
int ret;
s32 ret;
processcur = processtop;
ret = gcsetjmp(&processjmpbuf);
while(1) {
@ -293,12 +286,12 @@ void HuPrcCall(int tick)
void *HuPrcMemAlloc(s32 size)
{
Process *process = HuPrcCurrentGet();
return HuMemMemoryAlloc(process->heap, size, PROCESS_MEMORY_RETADDR);
return HuMemMemoryAlloc(process->heap, size, FAKE_RETADDR);
}
void HuPrcMemFree(void *ptr)
{
HuMemMemoryFree(ptr, PROCESS_MEMORY_RETADDR);
HuMemMemoryFree(ptr, FAKE_RETADDR);
}
void HuPrcSetStat(Process *process, u16 value)
@ -311,7 +304,7 @@ void HuPrcResetStat(Process *process, u16 value)
process->stat &= ~value;
}
void HuPrcAllPause(int flag)
void HuPrcAllPause(s32 flag)
{
Process *process = processtop;
if(flag) {
@ -333,7 +326,7 @@ void HuPrcAllPause(int flag)
}
}
void HuPrcAllUPause(int flag)
void HuPrcAllUPause(s32 flag)
{
Process *process = processtop;
if(flag) {

View file

@ -6,7 +6,7 @@
s16 HuSysVWaitGet(s16 old);
typedef int (*fadeFunc)(void);
typedef s32 (*fadeFunc)(void);
WipeState wipeData;
BOOL wipeFadeInF;
@ -15,9 +15,9 @@ static void WipeColorFill(GXColor color);
static void WipeFrameStill(GXColor color);
static int WipeNormalFade(void);
static int WipeCrossFade(void);
static int WipeDummyFade(void);
static s32 WipeNormalFade(void);
static s32 WipeCrossFade(void);
static s32 WipeDummyFade(void);
static fadeFunc fadeInFunc[3] = { WipeNormalFade, WipeCrossFade, WipeDummyFade };
static fadeFunc fadeOutFunc[3] = { WipeNormalFade, WipeCrossFade, WipeDummyFade };
@ -25,7 +25,7 @@ static fadeFunc fadeOutFunc[3] = { WipeNormalFade, WipeCrossFade, WipeDummyFade
void WipeInit(GXRenderModeObj *rmode)
{
WipeState *wipe;
int i;
s32 i;
wipe = &wipeData;
wipe->unk00 = 0;
wipe->unk04 = 0;
@ -46,7 +46,7 @@ void WipeInit(GXRenderModeObj *rmode)
void WipeExecAlways(void)
{
int i;
s32 i;
WipeState *wipe;
wipe = &wipeData;
switch(wipe->mode) {
@ -151,12 +151,12 @@ u8 WipeStatGet(void)
return wipeData.stat;
}
static int WipeDummyFade(void)
static s32 WipeDummyFade(void)
{
return 0;
}
static int WipeNormalFade(void)
static s32 WipeNormalFade(void)
{
u8 alpha;
WipeState *wipe = &wipeData;
@ -192,9 +192,9 @@ static void WipeColorFill(GXColor color)
WipeState *wipe;
u16 ulx, lrx, uly, lry;
wipe = &wipeData;
ulx = (int)wipe->x;
ulx = (s32)wipe->x;
lrx = wipe->x+wipe->w;
uly = (int)wipe->y;
uly = (s32)wipe->y;
lry = wipe->x+wipe->h+1;
MTXOrtho(proj, uly, lry, ulx, lrx, 0, 10);
GXSetProjection(proj, GX_ORTHOGRAPHIC);
@ -227,7 +227,7 @@ static void WipeColorFill(GXColor color)
GXSetChanMatColor(GX_COLOR0A0, colorN);
}
static int WipeCrossFade(void)
static s32 WipeCrossFade(void)
{
u32 size;
u8 alpha;
@ -273,9 +273,9 @@ static void WipeFrameStill(GXColor color)
WipeState *wipe;
u16 ulx, lrx, uly, lry;
wipe = &wipeData;
ulx = (int)wipe->x;
ulx = (s32)wipe->x;
lrx = wipe->x+wipe->w;
uly = (int)wipe->y;
uly = (s32)wipe->y;
lry = wipe->x+wipe->h+1;
MTXOrtho(proj, uly, lry, ulx, lrx, 0, 10);
GXSetProjection(proj, GX_ORTHOGRAPHIC);