Change int to s32
This commit is contained in:
parent
206fb7d931
commit
ec5f686ffb
20 changed files with 172 additions and 175 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ void HuSysBeforeRender()
|
|||
|
||||
void HuSysDoneRender(s32 retrace_count)
|
||||
{
|
||||
int retrace_dist;
|
||||
s32 retrace_dist;
|
||||
if(DemoStatEnable) {
|
||||
GXDrawDone();
|
||||
DEMOUpdateStats(1);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue