mirror of
https://github.com/zeldaret/tp
synced 2026-08-11 03:26:25 -04:00
run clang-format
This commit is contained in:
+55
-54
@@ -1,26 +1,26 @@
|
||||
#include "d/d_a/d_a_alink/d_a_alink.h"
|
||||
#include "f/f_pc/f_pc_searcher.h"
|
||||
|
||||
u32 daAlink_c::getE3Zhint(void){
|
||||
u32 daAlink_c::getE3Zhint(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
asm const char* daAlink_c::getAlinkArcName(void){
|
||||
asm const char* daAlink_c::getAlinkArcName(void) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009D884.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009D884.s"
|
||||
}
|
||||
|
||||
asm void daAlink_tgHitCallback(fopAc_ac_c*, dCcD_GObjInf*,fopAc_ac_c*, dCcD_GObjInf*){
|
||||
asm void daAlink_tgHitCallback(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009D88C.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009D88C.s"
|
||||
}
|
||||
|
||||
asm void daAlink_coHitCallback(fopAc_ac_c*, dCcD_GObjInf*,fopAc_ac_c*, dCcD_GObjInf*){
|
||||
asm void daAlink_coHitCallback(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009D8B8.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009D8B8.s"
|
||||
}
|
||||
|
||||
void daAlink_matAnm_c::init(void){
|
||||
void daAlink_matAnm_c::init(void) {
|
||||
float init = lbl_80452CC0;
|
||||
|
||||
unk244 = init;
|
||||
@@ -32,119 +32,120 @@ void daAlink_matAnm_c::init(void){
|
||||
unk260 = 0;
|
||||
}
|
||||
|
||||
asm void daAlink_matAnm_c::calc(J3DMaterial*) const{
|
||||
asm void daAlink_matAnm_c::calc(J3DMaterial*) const {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009D90C.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009D90C.s"
|
||||
}
|
||||
|
||||
// 1 missing mr instruction
|
||||
#ifdef NONMATCHING
|
||||
u32 daAlink_c::checkStageName(const char* stage){
|
||||
return (u32)__cntlzw(strcmp(g_dComIfG_gameInfo.stage,(char*)stage)) >> 5; // no idea if current stage vars are a struct or part of some class
|
||||
u32 daAlink_c::checkStageName(const char* stage) {
|
||||
return (u32)__cntlzw(strcmp(g_dComIfG_gameInfo.stage, (char*)stage)) >>
|
||||
5; // no idea if current stage vars are a struct or part of some class
|
||||
}
|
||||
#else
|
||||
asm u32 daAlink_c::checkStageName(char const* stage){
|
||||
asm u32 daAlink_c::checkStageName(char const* stage) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DA60.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DA60.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
asm void daAlink_c::tgHitCallback(fopAc_ac_c*, dCcD_GObjInf*, dCcD_GObjInf*){
|
||||
asm void daAlink_c::tgHitCallback(fopAc_ac_c*, dCcD_GObjInf*, dCcD_GObjInf*) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DA98.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DA98.s"
|
||||
}
|
||||
|
||||
asm void daAlink_c::coHitCallback(fopAc_ac_c*, dCcD_GObjInf*){
|
||||
asm void daAlink_c::coHitCallback(fopAc_ac_c*, dCcD_GObjInf*) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DB64.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DB64.s"
|
||||
}
|
||||
|
||||
asm void daAlink_c::setMatrixWorldAxisRot(float(*)[4],short,short,short,int,const cXyz*){
|
||||
asm void daAlink_c::setMatrixWorldAxisRot(float (*)[4], short, short, short, int, const cXyz*) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DC6C.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DC6C.s"
|
||||
}
|
||||
|
||||
asm bool daAlink_c::jointControll(int){
|
||||
asm bool daAlink_c::jointControll(int) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DD90.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009DD90.s"
|
||||
}
|
||||
|
||||
asm void daAlink_c::setUpperFront(void){
|
||||
asm void daAlink_c::setUpperFront(void) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009E7B8.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009E7B8.s"
|
||||
}
|
||||
|
||||
asm void daAlink_c::changeBlendRate(int){
|
||||
asm void daAlink_c::changeBlendRate(int) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009E91C.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009E91C.s"
|
||||
}
|
||||
|
||||
asm void daAlink_c::resetRootMtx(void){
|
||||
asm void daAlink_c::resetRootMtx(void) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EB18.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EB18.s"
|
||||
}
|
||||
|
||||
asm bool daAlink_c::modelCallBack(int){
|
||||
asm bool daAlink_c::modelCallBack(int) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EB58.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EB58.s"
|
||||
}
|
||||
|
||||
asm bool daAlink_modelCallBack(J3DJoint*, int){
|
||||
asm bool daAlink_modelCallBack(J3DJoint*, int) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EC28.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EC28.s"
|
||||
}
|
||||
|
||||
asm bool daAlink_c::headModelCallBack(int){
|
||||
asm bool daAlink_c::headModelCallBack(int) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009ECA0.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009ECA0.s"
|
||||
}
|
||||
|
||||
asm bool daAlink_headModelCallBack(J3DJoint*, int){
|
||||
asm bool daAlink_headModelCallBack(J3DJoint*, int) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EF38.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EF38.s"
|
||||
}
|
||||
|
||||
asm bool daAlink_c::wolfModelCallBack(int){
|
||||
asm bool daAlink_c::wolfModelCallBack(int) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EF7C.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EF7C.s"
|
||||
}
|
||||
|
||||
asm bool daAlink_wolfModelCallBack(J3DJoint*, int){
|
||||
asm bool daAlink_wolfModelCallBack(J3DJoint*, int) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EFF0.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009EFF0.s"
|
||||
}
|
||||
|
||||
asm void daAlink_c::setHatAngle(void){
|
||||
asm void daAlink_c::setHatAngle(void) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009F034.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009F034.s"
|
||||
}
|
||||
|
||||
asm void daAlink_c::calcHairAngle(short*){
|
||||
asm void daAlink_c::calcHairAngle(short*) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_8009FFF8.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_8009FFF8.s"
|
||||
}
|
||||
|
||||
asm void daAlink_c::setHairAngle(cXyz*,float,float){
|
||||
asm void daAlink_c::setHairAngle(cXyz*, float, float) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_800A002C.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_800A002C.s"
|
||||
}
|
||||
|
||||
asm void daAlink_c::setLookPosFromOut(cXyz*){
|
||||
asm void daAlink_c::setLookPosFromOut(cXyz*) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_800A0744.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_800A0744.s"
|
||||
}
|
||||
|
||||
asm int daAlink_c::checkAttentionPosAngle(cXyz*){
|
||||
asm int daAlink_c::checkAttentionPosAngle(cXyz*) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_800A07D8.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_800A07D8.s"
|
||||
}
|
||||
|
||||
asm bool daAlink_c::checkActorPosAngle(fopAc_ac_c*, cXyz**){
|
||||
asm bool daAlink_c::checkActorPosAngle(fopAc_ac_c*, cXyz**) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_800A0868.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_800A0868.s"
|
||||
}
|
||||
|
||||
asm cXyz* daAlink_c::getNeckAimPos(cXyz*, int*, int){
|
||||
asm cXyz* daAlink_c::getNeckAimPos(cXyz*, int*, int) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_alink/asm/func_800A093C.s"
|
||||
#include "d/d_a/d_a_alink/asm/func_800A093C.s"
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "d/d_a/d_a_horse_static/d_a_horse_static.h"
|
||||
#include "global.h"
|
||||
|
||||
u32 e_wb_class::checkWait(void){
|
||||
u32 e_wb_class::checkWait(void) {
|
||||
u32 temp;
|
||||
|
||||
temp = __cntlzw(0x2a - this->unk1460);
|
||||
return (u8)(temp >> 5);
|
||||
}
|
||||
|
||||
void e_wb_class::setPlayerRideNow(void){
|
||||
void e_wb_class::setPlayerRideNow(void) {
|
||||
this->unk1680 = 0x67;
|
||||
this->unk1460 = 0;
|
||||
this->unk1726 |= 3;
|
||||
@@ -16,68 +16,67 @@ void e_wb_class::setPlayerRideNow(void){
|
||||
|
||||
// 2 instructions off
|
||||
#ifdef NONMATCHING
|
||||
void e_wb_class::setPlayerRide(void){
|
||||
void e_wb_class::setPlayerRide(void) {
|
||||
this->unk1680 = 0x65;
|
||||
this->unk1460 = 0;
|
||||
this->unk1726 |= 3;
|
||||
|
||||
setLinkRiding(true); // needs to call Z2CreatureRide
|
||||
setLinkRiding(true); // needs to call Z2CreatureRide
|
||||
}
|
||||
#else
|
||||
asm void e_wb_class::setPlayerRide(void) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_horse_static/asm/func_80037CB0.s"
|
||||
#include "d/d_a/d_a_horse_static/asm/func_80037CB0.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
// 2 instructions off
|
||||
#ifdef NONMATCHING
|
||||
void e_wb_class::getOff(void){
|
||||
void e_wb_class::getOff(void) {
|
||||
int temp;
|
||||
|
||||
temp = checkDownDamage();
|
||||
if((temp == 0) || (this->unk1680 == 0x67)){
|
||||
if ((temp == 0) || (this->unk1680 == 0x67)) {
|
||||
this->unk1680 = 0;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
this->unk1682 = 0;
|
||||
}
|
||||
this->unk1460 = 0;
|
||||
this->unk1726 &= 0xfffc;
|
||||
setLinkRiding(false); // same issue as above
|
||||
setLinkRiding(false); // same issue as above
|
||||
}
|
||||
#else
|
||||
asm void e_wb_class::getOff(void) {
|
||||
nofralloc
|
||||
#include "d/d_a/d_a_horse_static/asm/func_80037CF4.s"
|
||||
#include "d/d_a/d_a_horse_static/asm/func_80037CF4.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
u8 e_wb_class::checkDownDamage(){
|
||||
u8 e_wb_class::checkDownDamage() {
|
||||
u8 temp1;
|
||||
s16 temp2;
|
||||
|
||||
temp1 = 0;
|
||||
temp2 = this->unk1680;
|
||||
if((temp2 != 0x65) && (temp2 != 0x66) && (temp2 != 0x15)){
|
||||
if ((temp2 != 0x65) && (temp2 != 0x66) && (temp2 != 0x15)) {
|
||||
temp1 = 1;
|
||||
}
|
||||
return (u8)temp1;
|
||||
}
|
||||
|
||||
u8 e_wb_class::checkNormalRideMode(void) const{
|
||||
u8 e_wb_class::checkNormalRideMode(void) const {
|
||||
u8 temp;
|
||||
|
||||
temp = 0;
|
||||
if((this->unk1680 != 0x66) || (this->unk1460 < 1)){
|
||||
if ((this->unk1680 != 0x66) || (this->unk1460 < 1)) {
|
||||
temp = 1;
|
||||
}
|
||||
|
||||
return (u8)temp;
|
||||
}
|
||||
|
||||
void e_wb_class::setRunRideMode(void){
|
||||
if(this->unk1680 == 0x65){
|
||||
void e_wb_class::setRunRideMode(void) {
|
||||
if (this->unk1680 == 0x65) {
|
||||
this->unk1460 = 0;
|
||||
this->unk1680 = 0x15;
|
||||
this->unk1682 = 0x65;
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#include "d/d_a/d_a_item_static/d_a_item_static.h"
|
||||
#include "global.h"
|
||||
|
||||
u32 daItem_c::startCtrl(void){
|
||||
u32 daItem_c::startCtrl(void) {
|
||||
this->unk2376 |= 4;
|
||||
return 1;
|
||||
}
|
||||
|
||||
u32 daItem_c::startControl(void){
|
||||
u32 daItem_c::startControl(void) {
|
||||
this->unk2378 = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
u32 daItem_c::endControl(void){
|
||||
u32 daItem_c::endControl(void) {
|
||||
this->unk2378 = 0;
|
||||
return 1;
|
||||
}
|
||||
+6
-6
@@ -1,17 +1,17 @@
|
||||
#include "d/d_bomb/d_bomb.h"
|
||||
|
||||
bool dBomb_c::checkStateCarry(){
|
||||
return ((unk_3 & 0x2000) != 0 || (unk_3 & 0x100000) != 0 || unk_2 == 2 || unk_2 == 1);
|
||||
bool dBomb_c::checkStateCarry() {
|
||||
return ((unk_3 & 0x2000) != 0 || (unk_3 & 0x100000) != 0 || unk_2 == 2 || unk_2 == 1);
|
||||
}
|
||||
|
||||
bool dBomb_c::checkFlowerBombWait(fopAc_ac_c* param_1){
|
||||
bool dBomb_c::checkFlowerBombWait(fopAc_ac_c* param_1) {
|
||||
return (unk_1 == 0x221 && unk_2 == 4);
|
||||
}
|
||||
|
||||
bool dBomb_c::checkWaterBomb(fopAc_ac_c* param_1){
|
||||
return (unk_1 == 0x221 && (unk_4 & 0x10)!=0);
|
||||
bool dBomb_c::checkWaterBomb(fopAc_ac_c* param_1) {
|
||||
return (unk_1 == 0x221 && (unk_4 & 0x10) != 0);
|
||||
}
|
||||
|
||||
bool dBomb_c::checkInsectBombMove(fopAc_ac_c* param_1){
|
||||
bool dBomb_c::checkInsectBombMove(fopAc_ac_c* param_1) {
|
||||
return (unk_1 == 0x221 && unk_2 == 7);
|
||||
}
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
asm void dComIfG_play_c::ct(void) {
|
||||
nofralloc
|
||||
#include "d/d_com/d_com_inf_game/asm/func_8002B1DC.s"
|
||||
#include "d/d_com/d_com_inf_game/asm/func_8002B1DC.s"
|
||||
}
|
||||
|
||||
asm void dComIfG_play_c::init(void) {
|
||||
nofralloc
|
||||
#include "d/d_com/d_com_inf_game/asm/func_8002B22C.s"
|
||||
#include "d/d_com/d_com_inf_game/asm/func_8002B22C.s"
|
||||
}
|
||||
|
||||
void dComIfGp_checkItemGet(u8 param_1, int param_2) {
|
||||
|
||||
@@ -2,27 +2,24 @@
|
||||
#include "d/d_com/d_com_inf_game/d_com_inf_game.h"
|
||||
#include "global.h"
|
||||
|
||||
asm dFile_info_c::dFile_info_c(JKRArchive*,u8) {
|
||||
asm dFile_info_c::dFile_info_c(JKRArchive*, u8) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192434.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192434.s"
|
||||
}
|
||||
|
||||
asm dFile_info_c::~dFile_info_c(void) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_801924A0.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_801924A0.s"
|
||||
}
|
||||
|
||||
asm void dFile_info_c::screenSet(void) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192570.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192570.s"
|
||||
}
|
||||
|
||||
|
||||
// not even close
|
||||
#if NONMATCHING
|
||||
class JMSMesgEntry_c {
|
||||
|
||||
};
|
||||
class JMSMesgEntry_c {};
|
||||
|
||||
extern void dMeter2Info_c_NS_getString(u32, char*, JMSMesgEntry_c*);
|
||||
extern u8 DAT_804070D8;
|
||||
@@ -40,18 +37,18 @@ s32 dFile_info_c::setSaveData(dSv_save_c* save_file, int param_2, u8 param_3) {
|
||||
save_file->getPlayer().getPlayerStatusA().getCurrentHealth() = DAT_804061C2;
|
||||
this->setHeartCnt(save_file);
|
||||
save_file->getPlayer().getPlayerStatusA().getCurrentHealth() = 0xC;
|
||||
strcpy(this->unk44,DAT_80406374);
|
||||
strcpy(this->unk44, DAT_80406374);
|
||||
strcpy(this->save_date, (char*)DAT_803948D8);
|
||||
strcpy(this->play_time, (char*)DAT_803948D8);
|
||||
dMeter2Info_c_NS_getString(0x4d,this->unk56,0);
|
||||
dMeter2Info_c_NS_getString(0x4d, this->unk56, 0);
|
||||
return 2;
|
||||
} else {
|
||||
dMeter2Info_c_NS_getString(0x4d,this->unk56,0);
|
||||
dMeter2Info_c_NS_getString(0x4d, this->unk56, 0);
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
this->setHeartCnt(save_file);
|
||||
strcpy(this->unk44,save_file->getPlayer().getPlayerInfo().getLinkName());
|
||||
strcpy(this->unk44, save_file->getPlayer().getPlayerInfo().getLinkName());
|
||||
setSaveDate(save_file);
|
||||
setPlayTime(save_file);
|
||||
return 0;
|
||||
@@ -61,51 +58,51 @@ s32 dFile_info_c::setSaveData(dSv_save_c* save_file, int param_2, u8 param_3) {
|
||||
#else
|
||||
asm s32 dFile_info_c::setSaveData(dSv_save_c* save_file, int param_2, u8 param_3) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192954.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192954.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
asm void dFile_info_c::setHeartCnt(dSv_save_c*) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192AA0.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192AA0.s"
|
||||
}
|
||||
|
||||
asm void dFile_info_c::setSaveDate(dSv_save_c*) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192C08.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192C08.s"
|
||||
}
|
||||
|
||||
asm void dFile_info_c::setPlayTime(dSv_save_c*) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192C70.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192C70.s"
|
||||
}
|
||||
|
||||
asm void dFile_info_c::modeWait(void) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192D58.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192D58.s"
|
||||
}
|
||||
|
||||
asm void dFile_info_c::modeMove(void) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192D5C.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192D5C.s"
|
||||
}
|
||||
|
||||
asm void dFile_info_c::_draw(void) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192D60.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192D60.s"
|
||||
}
|
||||
|
||||
asm void dDlst_FileInfo_c::draw(void) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192D9C.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192D9C.s"
|
||||
}
|
||||
|
||||
asm void _sinit_d_file_sel_info_cpp(void) {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192E88.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192E88.s"
|
||||
}
|
||||
|
||||
asm dDlst_FileInfo_c::~dDlst_FileInfo_c() {
|
||||
nofralloc
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192EC8.s"
|
||||
#include "d/d_file/d_file_sel_info/asm/func_80192EC8.s"
|
||||
}
|
||||
+685
-527
File diff suppressed because it is too large
Load Diff
+79
-71
@@ -5,14 +5,14 @@
|
||||
|
||||
u8 dSv_item_rename(u8 item_id) {
|
||||
switch (item_id) {
|
||||
case OIL_BOTTLE_2:
|
||||
return OIL_BOTTLE;
|
||||
case RED_BOTTLE_2:
|
||||
return RED_BOTTLE;
|
||||
case OIL2:
|
||||
return OIL;
|
||||
default:
|
||||
return item_id;
|
||||
case OIL_BOTTLE_2:
|
||||
return OIL_BOTTLE;
|
||||
case RED_BOTTLE_2:
|
||||
return RED_BOTTLE;
|
||||
case OIL2:
|
||||
return OIL;
|
||||
default:
|
||||
return item_id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,12 +80,12 @@ u8 dSv_player_status_a_c::getMixItemIndex(signed int i_no) const {
|
||||
u16 dSv_player_status_a_c::getRupeeMax(void) const {
|
||||
if (mCurrentWallet < 3) { // if you make this a default, it wont match. Compiler, pls.
|
||||
switch (mCurrentWallet) {
|
||||
case WALLET:
|
||||
return 300;
|
||||
case BIG_WALLET:
|
||||
return 600;
|
||||
case GIANT_WALLET:
|
||||
return 1000;
|
||||
case WALLET:
|
||||
return 300;
|
||||
case BIG_WALLET:
|
||||
return 600;
|
||||
case GIANT_WALLET:
|
||||
return 1000;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -127,7 +127,7 @@ void dSv_player_status_b_c::onTransformLV(int flagOnOff) {
|
||||
BOOL dSv_player_status_b_c::isTransformLV(int unk) const {
|
||||
return this->mTransformLevelFlag & (u8)(1 << unk) ? TRUE : FALSE;
|
||||
}
|
||||
//extern u8 lbl_80379234[16];
|
||||
// extern u8 lbl_80379234[16];
|
||||
void dSv_horse_place_c::init(void) {
|
||||
f32 position_val;
|
||||
char* default_stage;
|
||||
@@ -142,7 +142,8 @@ void dSv_horse_place_c::init(void) {
|
||||
this->mRoomId = 0;
|
||||
}
|
||||
|
||||
void dSv_horse_place_c::set(const char* i_name, const cXyz& i_position, s16 i_x_rot, signed char i_room_id) {
|
||||
void dSv_horse_place_c::set(const char* i_name, const cXyz& i_position, s16 i_x_rot,
|
||||
signed char i_room_id) {
|
||||
strcpy(mCurrentStage, i_name);
|
||||
this->mPosition.x = i_position.x;
|
||||
this->mPosition.y = i_position.y;
|
||||
@@ -185,7 +186,9 @@ void dSv_player_field_last_stay_info_c::init() {
|
||||
}
|
||||
}
|
||||
|
||||
void dSv_player_field_last_stay_info_c::set(const char* i_name, const cXyz& i_last_position, s16 i_last_angle, signed char i_last_spawn_id, u8 i_last_room_id) {
|
||||
void dSv_player_field_last_stay_info_c::set(const char* i_name, const cXyz& i_last_position,
|
||||
s16 i_last_angle, signed char i_last_spawn_id,
|
||||
u8 i_last_room_id) {
|
||||
strcpy(mLastStage, i_name);
|
||||
|
||||
this->mLastPosition = i_last_position;
|
||||
@@ -229,7 +232,9 @@ void dSv_player_last_mark_info_c::init(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void dSv_player_last_mark_info_c::setWarpItemData(const char* i_ooccoo_stage, const cXyz& i_ooccoo_position, s16 i_ooccoo_angle, s8 i_ooccoo_room_id, u8 unk1, u8 unk2) {
|
||||
void dSv_player_last_mark_info_c::setWarpItemData(const char* i_ooccoo_stage,
|
||||
const cXyz& i_ooccoo_position, s16 i_ooccoo_angle,
|
||||
s8 i_ooccoo_room_id, u8 unk1, u8 unk2) {
|
||||
strcpy(mOoccooStage, i_ooccoo_stage);
|
||||
this->mOoccooPosition = i_ooccoo_position;
|
||||
this->mOoccooXRotation = i_ooccoo_angle;
|
||||
@@ -252,7 +257,9 @@ void dSv_player_item_c::setItem(int current_items_index, u8 new_items_index) {
|
||||
int select_item_index = DEFAULT_SELECT_ITEM_INDEX;
|
||||
|
||||
do {
|
||||
if (current_items_index == g_dComIfG_gameInfo.info.getSaveFile().getPlayerStatusA().getSelectItemIndex(select_item_index)) {
|
||||
if (current_items_index ==
|
||||
g_dComIfG_gameInfo.info.getSaveFile().getPlayerStatusA().getSelectItemIndex(
|
||||
select_item_index)) {
|
||||
dComIfGp_setSelectItem(select_item_index);
|
||||
}
|
||||
select_item_index++;
|
||||
@@ -270,8 +277,10 @@ u8 dSv_player_item_c::getItem(int param_1, bool param_2) const {
|
||||
for (int select_item_index = 0; select_item_index < 2; select_item_index++) {
|
||||
current_select_item_index = getSelectItemIndex(select_item_index);
|
||||
if (((param_1 == (current_select_item_index)) ||
|
||||
(current_select_item_index = dComIfGs_getMixItemIndex(select_item_index), param_1 == (current_select_item_index))) &&
|
||||
(current_select_item_index = dComIfGs_getMixItemIndex(select_item_index), (current_select_item_index) != NO_ITEM)) {
|
||||
(current_select_item_index = dComIfGs_getMixItemIndex(select_item_index),
|
||||
param_1 == (current_select_item_index))) &&
|
||||
(current_select_item_index = dComIfGs_getMixItemIndex(select_item_index),
|
||||
(current_select_item_index) != NO_ITEM)) {
|
||||
current_select_item_index = getSelectItemIndex(select_item_index);
|
||||
IVar1 = items[current_select_item_index];
|
||||
current_select_item_index = dComIfGs_getMixItemIndex(select_item_index);
|
||||
@@ -307,7 +316,8 @@ u8 dSv_player_item_c::getItem(int param_1, bool param_2) const {
|
||||
if (((select_item_index == 0x3) &&
|
||||
(current_select_item_index = getSelectItemIndex(0x3),
|
||||
(current_select_item_index & 0xff) == 0x0)) &&
|
||||
(current_select_item_index = dComIfGs_getMixItemIndex(0x3), (current_select_item_index & 0xff) == 0x0)) {
|
||||
(current_select_item_index = dComIfGs_getMixItemIndex(0x3),
|
||||
(current_select_item_index & 0xff) == 0x0)) {
|
||||
dComIfGs_setSelectItemIndex(0x3, -0x1);
|
||||
dComIfGs_setMixItemIndex(0x3, -0x1);
|
||||
return 0xff;
|
||||
@@ -438,8 +448,7 @@ u8 dSv_player_item_c::checkBottle(u8 i_item_id) {
|
||||
return num_bottles;
|
||||
}
|
||||
|
||||
asm u8 dSv_player_item_c::checkInsectBottle(void){
|
||||
nofralloc
|
||||
asm u8 dSv_player_item_c::checkInsectBottle(void){nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033754.s"
|
||||
}
|
||||
|
||||
@@ -496,8 +505,7 @@ asm void dSv_player_item_c::setEmptyBombBag(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
asm void dSv_player_item_c::setEmptyBombBag(u8, u8){
|
||||
nofralloc
|
||||
asm void dSv_player_item_c::setEmptyBombBag(u8, u8){nofralloc
|
||||
#include "d/d_save/d_save/asm/func_80033B08.s"
|
||||
}
|
||||
|
||||
@@ -522,18 +530,18 @@ void dSv_player_item_c::setRodTypeLevelUp(void) {
|
||||
int current_fishing_rod_item_id = this->mItems[SLOT_20];
|
||||
|
||||
switch (current_fishing_rod_item_id) {
|
||||
case BEE_ROD: {
|
||||
this->mItems[SLOT_20] = JEWEL_BEE_ROD;
|
||||
break;
|
||||
}
|
||||
case WORM_ROD: {
|
||||
this->mItems[SLOT_20] = JEWEL_WORM_ROD;
|
||||
break;
|
||||
}
|
||||
case FISHING_ROD_1: {
|
||||
this->mItems[SLOT_20] = JEWEL_ROD;
|
||||
break;
|
||||
}
|
||||
case BEE_ROD: {
|
||||
this->mItems[SLOT_20] = JEWEL_BEE_ROD;
|
||||
break;
|
||||
}
|
||||
case WORM_ROD: {
|
||||
this->mItems[SLOT_20] = JEWEL_WORM_ROD;
|
||||
break;
|
||||
}
|
||||
case FISHING_ROD_1: {
|
||||
this->mItems[SLOT_20] = JEWEL_ROD;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
@@ -545,18 +553,18 @@ void dSv_player_item_c::setRodTypeLevelUp(void) {
|
||||
#ifdef NONMATCHING
|
||||
void dSv_player_item_c::setBaitItem(u8 param_1) {
|
||||
switch (param_1) {
|
||||
case BEE_CHILD: {
|
||||
isFirstBit(61) ? this->mItems[SLOT_20] = JEWEL_BEE_ROD : this->mItems[SLOT_20] = BEE_ROD;
|
||||
break;
|
||||
}
|
||||
case WORM: {
|
||||
isFirstBit(61) ? this->mItems[SLOT_20] = JEWEL_WORM_ROD : this->mItems[SLOT_20] = WORM_ROD;
|
||||
break;
|
||||
}
|
||||
case NO_ITEM: {
|
||||
isFirstBit(61) ? this->mItems[SLOT_20] = JEWEL_ROD : this->mItems[SLOT_20] = FISHING_ROD_1;
|
||||
break;
|
||||
}
|
||||
case BEE_CHILD: {
|
||||
isFirstBit(61) ? this->mItems[SLOT_20] = JEWEL_BEE_ROD : this->mItems[SLOT_20] = BEE_ROD;
|
||||
break;
|
||||
}
|
||||
case WORM: {
|
||||
isFirstBit(61) ? this->mItems[SLOT_20] = JEWEL_WORM_ROD : this->mItems[SLOT_20] = WORM_ROD;
|
||||
break;
|
||||
}
|
||||
case NO_ITEM: {
|
||||
isFirstBit(61) ? this->mItems[SLOT_20] = JEWEL_ROD : this->mItems[SLOT_20] = FISHING_ROD_1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
@@ -660,15 +668,15 @@ void dSv_player_item_max_c::init(void) {
|
||||
|
||||
void dSv_player_item_max_c::setBombNum(u8 bomb_id, u8 bomb_max) {
|
||||
switch (bomb_id) {
|
||||
case NORMAL_BOMB:
|
||||
this->mItemCapacities[1] = bomb_max;
|
||||
return;
|
||||
case WATER_BOMB:
|
||||
this->mItemCapacities[2] = bomb_max;
|
||||
return;
|
||||
case POKE_BOMB:
|
||||
this->mItemCapacities[6] = bomb_max;
|
||||
return;
|
||||
case NORMAL_BOMB:
|
||||
this->mItemCapacities[1] = bomb_max;
|
||||
return;
|
||||
case WATER_BOMB:
|
||||
this->mItemCapacities[2] = bomb_max;
|
||||
return;
|
||||
case POKE_BOMB:
|
||||
this->mItemCapacities[6] = bomb_max;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -681,14 +689,14 @@ u8 dSv_player_item_max_c::getBombNum(u8 param_1) const {
|
||||
}
|
||||
|
||||
switch (param_1) {
|
||||
case NORMAL_BOMB:
|
||||
return (u8)(this->mItemCapacities[0x1] * iVar3);
|
||||
case WATER_BOMB:
|
||||
return (u8)(this->mItemCapacities[0x2] * iVar3);
|
||||
case POKE_BOMB:
|
||||
return (u8)(this->mItemCapacities[0x6] * iVar3);
|
||||
default:
|
||||
return 0;
|
||||
case NORMAL_BOMB:
|
||||
return (u8)(this->mItemCapacities[0x1] * iVar3);
|
||||
case WATER_BOMB:
|
||||
return (u8)(this->mItemCapacities[0x2] * iVar3);
|
||||
case POKE_BOMB:
|
||||
return (u8)(this->mItemCapacities[0x6] * iVar3);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -817,10 +825,10 @@ void dSv_fishing_info_c::addFishCount(u8 fish_index) {
|
||||
// a few instructions off
|
||||
#ifdef NONMATCHING
|
||||
namespace d_meter2_info {
|
||||
class dMeter2Info_c {
|
||||
public:
|
||||
void getString(unsigned long, char*, JMSMesgEntry_c*);
|
||||
};
|
||||
class dMeter2Info_c {
|
||||
public:
|
||||
void getString(unsigned long, char*, JMSMesgEntry_c*);
|
||||
};
|
||||
} // namespace d_meter2_info
|
||||
|
||||
void dSv_player_info_c::init(void) {
|
||||
|
||||
@@ -4,21 +4,18 @@
|
||||
|
||||
#ifdef NONMATCHING
|
||||
dSvBit_childSwPerfectionHIO_c::dSvBit_childSwPerfectionHIO_c() {
|
||||
|
||||
this->__vt = (dSvBit_childSwPerfectionHIO_c_vtable *)0x803C3384;
|
||||
this->__vt = (dSvBit_childSwPerfectionHIO_c_vtable*)0x803C3384;
|
||||
for (int i = 0; i < 0x80; i++) {
|
||||
|
||||
}
|
||||
}
|
||||
#else
|
||||
asm dSvBit_childSwPerfectionHIO_c::dSvBit_childSwPerfectionHIO_c() {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save_HIO/asm/func_8025BB78.s"
|
||||
#include "d/d_save/d_save_HIO/asm/func_8025BB78.s"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
asm void dSvBit_childSwPerfectionHIO_c::init(void) {
|
||||
nofralloc
|
||||
#include "d/d_save/d_save_HIO/asm/func_8025BBAC.s"
|
||||
#include "d/d_save/d_save_HIO/asm/func_8025BBAC.s"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "f/f_op/f_op_actor_tag.h"
|
||||
#include "global.h"
|
||||
#include "SComponent/c_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
// f_op_actor_tag::g_fopAcTg_Queue
|
||||
extern node_list_class lbl_803A35E0;
|
||||
@@ -19,5 +19,4 @@ u32 fopAcTg_Init(create_tag_class* pTag, void* data) {
|
||||
cTg_Create(pTag, data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,43 +4,38 @@
|
||||
#include "SComponent/c_phase.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_create_iter.h"
|
||||
#include "f/f_pc/f_pc_deletor.h"
|
||||
#include "f/f_pc/f_pc_executor.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_method.h"
|
||||
#include "f/f_pc/f_pc_executor.h"
|
||||
#include "f/f_pc/f_pc_deletor.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
bool fpcCtRq_isCreatingByID(create_tag *pTag, int *pId)
|
||||
{
|
||||
create_request *pReq = (create_request *) (pTag->mpTagData);
|
||||
bool fpcCtRq_isCreatingByID(create_tag* pTag, int* pId) {
|
||||
create_request* pReq = (create_request*)(pTag->mpTagData);
|
||||
return pReq->mBsPcId == *pId;
|
||||
}
|
||||
|
||||
bool fpcCtRq_IsCreatingByID(unsigned int id)
|
||||
{
|
||||
return fpcCtIt_Judge((cNdIt_JudgeFunc) fpcCtRq_isCreatingByID, &id) != NULL;
|
||||
bool fpcCtRq_IsCreatingByID(unsigned int id) {
|
||||
return fpcCtIt_Judge((cNdIt_JudgeFunc)fpcCtRq_isCreatingByID, &id) != NULL;
|
||||
}
|
||||
|
||||
void fpcCtRq_CreateQTo(create_request *pReq)
|
||||
{
|
||||
void fpcCtRq_CreateQTo(create_request* pReq) {
|
||||
fpcCtTg_CreateQTo(pReq);
|
||||
fpcLy_CreatedMesg(pReq->mpLayer);
|
||||
fpcLy_CancelQTo(&pReq->mMtdTg);
|
||||
}
|
||||
|
||||
void fpcCtRq_ToCreateQ(create_request *pReq)
|
||||
{
|
||||
void fpcCtRq_ToCreateQ(create_request* pReq) {
|
||||
fpcLy_CreatingMesg(pReq->mpLayer);
|
||||
fpcLy_ToCancelQ(pReq->mpLayer, &pReq->mMtdTg);
|
||||
fpcCtTg_ToCreateQ(pReq);
|
||||
}
|
||||
|
||||
extern void cMl_NS_free(void *pPtr);
|
||||
extern void cMl_NS_free(void* pPtr);
|
||||
|
||||
#if NON_MATCHING
|
||||
bool fpcCtRq_Delete(create_request *pReq)
|
||||
{
|
||||
bool fpcCtRq_Delete(create_request* pReq) {
|
||||
fpcCtRq_CreateQTo(pReq);
|
||||
if (pReq->mpCtRqMtd != NULL) {
|
||||
// flow control
|
||||
@@ -56,49 +51,64 @@ bool fpcCtRq_Delete(create_request *pReq)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
asm bool fpcCtRq_Delete(create_request *pReq)
|
||||
{
|
||||
asm bool fpcCtRq_Delete(create_request* pReq) {
|
||||
nofralloc
|
||||
/* 80020BA0 0001DAE0 94 21 FF F0 */ stwu r1, -0x10(r1)
|
||||
/* 80020BA4 0001DAE4 7C 08 02 A6 */ mflr r0
|
||||
/* 80020BA8 0001DAE8 90 01 00 14 */ stw r0, 0x14(r1)
|
||||
/* 80020BAC 0001DAEC 93 E1 00 0C */ stw r31, 0xc(r1)
|
||||
/* 80020BB0 0001DAF0 7C 7F 1B 78 */ mr r31, r3
|
||||
/* 80020BB4 0001DAF4 4B FF FF 6D */ bl fpcCtRq_CreateQTo
|
||||
/* 80020BB8 0001DAF8 80 7F 00 34 */ lwz r3, 0x34(r31)
|
||||
/* 80020BBC 0001DAFC 28 03 00 00 */ cmplwi r3, 0
|
||||
/* 80020BC0 0001DB00 41 82 00 20 */ beq lbl_80020BE0
|
||||
/* 80020BC4 0001DB04 80 63 00 08 */ lwz r3, 8(r3)
|
||||
/* 80020BC8 0001DB08 7F E4 FB 78 */ mr r4, r31
|
||||
/* 80020BCC 0001DB0C 48 00 18 5D */ bl fpcMtd_Method
|
||||
/* 80020BD0 0001DB10 2C 03 00 00 */ cmpwi r3, 0
|
||||
/* 80020BD4 0001DB14 40 82 00 0C */ bne lbl_80020BE0
|
||||
/* 80020BD8 0001DB18 38 60 00 00 */ li r3, 0
|
||||
/* 80020BDC 0001DB1C 48 00 00 24 */ b lbl_80020C00
|
||||
lbl_80020BE0:
|
||||
/* 80020BE0 0001DB20 80 7F 00 40 */ lwz r3, 0x40(r31)
|
||||
/* 80020BE4 0001DB24 28 03 00 00 */ cmplwi r3, 0
|
||||
/* 80020BE8 0001DB28 41 82 00 0C */ beq lbl_80020BF4
|
||||
/* 80020BEC 0001DB2C 38 00 00 00 */ li r0, 0
|
||||
/* 80020BF0 0001DB30 90 03 00 14 */ stw r0, 0x14(r3)
|
||||
lbl_80020BF4:
|
||||
/* 80020BF4 0001DB34 7F E3 FB 78 */ mr r3, r31
|
||||
/* 80020BF8 0001DB38 48 24 26 69 */ bl cMl_NS_free
|
||||
/* 80020BFC 0001DB3C 38 60 00 01 */ li r3, 1
|
||||
lbl_80020C00:
|
||||
/* 80020C00 0001DB40 83 E1 00 0C */ lwz r31, 0xc(r1)
|
||||
/* 80020C04 0001DB44 80 01 00 14 */ lwz r0, 0x14(r1)
|
||||
/* 80020C08 0001DB48 7C 08 03 A6 */ mtlr r0
|
||||
/* 80020C0C 0001DB4C 38 21 00 10 */ addi r1, r1, 0x10
|
||||
/* 80020C10 0001DB50 4E 80 00 20 */ blr
|
||||
/* 80020BA0 0001DAE0 94 21 FF F0 */ stwu r1,
|
||||
-0x10(r1)
|
||||
/* 80020BA4 0001DAE4 7C 08 02 A6 */ mflr r0
|
||||
/* 80020BA8 0001DAE8 90 01 00 14 */ stw r0,
|
||||
0x14(r1)
|
||||
/* 80020BAC 0001DAEC 93 E1 00 0C */ stw r31,
|
||||
0xc(r1)
|
||||
/* 80020BB0 0001DAF0 7C 7F 1B 78 */ mr r31,
|
||||
r3
|
||||
/* 80020BB4 0001DAF4 4B FF FF 6D */ bl fpcCtRq_CreateQTo
|
||||
/* 80020BB8 0001DAF8 80 7F 00 34 */ lwz r3,
|
||||
0x34(r31)
|
||||
/* 80020BBC 0001DAFC 28 03 00 00 */ cmplwi r3,
|
||||
0
|
||||
/* 80020BC0 0001DB00 41 82 00 20 */ beq lbl_80020BE0
|
||||
/* 80020BC4 0001DB04 80 63 00 08 */ lwz r3,
|
||||
8(r3)
|
||||
/* 80020BC8 0001DB08 7F E4 FB 78 */ mr r4,
|
||||
r31
|
||||
/* 80020BCC 0001DB0C 48 00 18 5D */ bl fpcMtd_Method
|
||||
/* 80020BD0 0001DB10 2C 03 00 00 */ cmpwi r3,
|
||||
0
|
||||
/* 80020BD4 0001DB14 40 82 00 0C */ bne lbl_80020BE0
|
||||
/* 80020BD8 0001DB18 38 60 00 00 */ li r3,
|
||||
0
|
||||
/* 80020BDC 0001DB1C 48 00 00 24 */ b lbl_80020C00 lbl_80020BE0 :
|
||||
/* 80020BE0 0001DB20 80 7F 00 40 */ lwz r3,
|
||||
0x40(r31)
|
||||
/* 80020BE4 0001DB24 28 03 00 00 */ cmplwi r3,
|
||||
0
|
||||
/* 80020BE8 0001DB28 41 82 00 0C */ beq lbl_80020BF4
|
||||
/* 80020BEC 0001DB2C 38 00 00 00 */ li r0,
|
||||
0
|
||||
/* 80020BF0 0001DB30 90 03 00 14 */ stw r0,
|
||||
0x14(r3)lbl_80020BF4 :
|
||||
/* 80020BF4 0001DB34 7F E3 FB 78 */ mr r3,
|
||||
r31
|
||||
/* 80020BF8 0001DB38 48 24 26 69 */ bl cMl_NS_free
|
||||
/* 80020BFC 0001DB3C 38 60 00 01 */ li r3,
|
||||
1 lbl_80020C00 :
|
||||
/* 80020C00 0001DB40 83 E1 00 0C */ lwz r31,
|
||||
0xc(r1)
|
||||
/* 80020C04 0001DB44 80 01 00 14 */ lwz r0,
|
||||
0x14(r1)
|
||||
/* 80020C08 0001DB48 7C 08 03 A6 */ mtlr r0
|
||||
/* 80020C0C 0001DB4C 38 21 00 10 */ addi r1,
|
||||
r1,
|
||||
0x10
|
||||
/* 80020C10 0001DB50 4E 80 00 20 */ blr
|
||||
}
|
||||
#endif
|
||||
|
||||
bool fpcCtRq_Cancel(create_request *pReq)
|
||||
{
|
||||
bool fpcCtRq_Cancel(create_request* pReq) {
|
||||
if (pReq != NULL && !pReq->mbIsCancelling) {
|
||||
pReq->mbIsCancelling = true;
|
||||
base_process_class *pProc = pReq->mpRes;
|
||||
base_process_class* pProc = pReq->mpRes;
|
||||
|
||||
if (pProc != NULL && !fpcDt_Delete(pProc))
|
||||
return false;
|
||||
@@ -112,16 +122,14 @@ bool fpcCtRq_Cancel(create_request *pReq)
|
||||
}
|
||||
}
|
||||
|
||||
int fpcCtRq_IsDoing(create_request *pReq)
|
||||
{
|
||||
int fpcCtRq_IsDoing(create_request* pReq) {
|
||||
if (pReq != NULL)
|
||||
return pReq->mbIsCreating;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool fpcCtRq_Do(create_request *pReq)
|
||||
{
|
||||
static bool fpcCtRq_Do(create_request* pReq) {
|
||||
int ret = cPhs_COMPLEATE_e;
|
||||
|
||||
if (pReq->mpCtRqMtd != NULL) {
|
||||
@@ -149,21 +157,20 @@ static bool fpcCtRq_Do(create_request *pReq)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void fpcCtRq_Handler(void)
|
||||
{
|
||||
fpcCtIt_Method((cNdIt_MethodFunc) fpcCtRq_Do, NULL);
|
||||
void fpcCtRq_Handler(void) {
|
||||
fpcCtIt_Method((cNdIt_MethodFunc)fpcCtRq_Do, NULL);
|
||||
}
|
||||
|
||||
extern void * cMl_NS_memalignB(int, unsigned long);
|
||||
extern void* cMl_NS_memalignB(int, unsigned long);
|
||||
extern int fpcBs_MakeOfId(void);
|
||||
|
||||
create_request * fpcCtRq_Create(layer_class *pLayer, unsigned long size, create_request_method_class *pMthd)
|
||||
{
|
||||
create_request *pReq = (create_request *) cMl_NS_memalignB(-4, size);
|
||||
create_request* fpcCtRq_Create(layer_class* pLayer, unsigned long size,
|
||||
create_request_method_class* pMthd) {
|
||||
create_request* pReq = (create_request*)cMl_NS_memalignB(-4, size);
|
||||
|
||||
if (pReq != NULL) {
|
||||
fpcCtTg_Init(pReq, pReq);
|
||||
fpcMtdTg_Init(&pReq->mMtdTg, (process_method_tag_func) fpcCtRq_Cancel, pReq);
|
||||
fpcMtdTg_Init(&pReq->mMtdTg, (process_method_tag_func)fpcCtRq_Cancel, pReq);
|
||||
pReq->mpLayer = pLayer;
|
||||
pReq->mpCtRqMtd = pMthd;
|
||||
pReq->mBsPcId = fpcBs_MakeOfId();
|
||||
@@ -174,5 +181,4 @@ create_request * fpcCtRq_Create(layer_class *pLayer, unsigned long size, create_
|
||||
|
||||
return pReq;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_create_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
// g_fpcCtTg_Queue
|
||||
extern node_list_class lbl_803A3990;
|
||||
|
||||
extern "C" {
|
||||
|
||||
void fpcCtTg_ToCreateQ(create_tag_class *pTag)
|
||||
{
|
||||
void fpcCtTg_ToCreateQ(create_tag_class* pTag) {
|
||||
cTg_Addition(&lbl_803A3990, pTag);
|
||||
}
|
||||
|
||||
void fpcCtTg_CreateQTo(create_tag_class *pTag)
|
||||
{
|
||||
void fpcCtTg_CreateQTo(create_tag_class* pTag) {
|
||||
cTg_SingleCut(pTag);
|
||||
}
|
||||
|
||||
int fpcCtTg_Init(create_tag *pTag, void *pUserData)
|
||||
{
|
||||
int fpcCtTg_Init(create_tag* pTag, void* pUserData) {
|
||||
cTg_Create(pTag, pUserData);
|
||||
return 1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -5,24 +5,19 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
bool fpcCt_IsCreatingByID(unsigned int id)
|
||||
{
|
||||
bool fpcCt_IsCreatingByID(unsigned int id) {
|
||||
return fpcCtRq_IsCreatingByID(id);
|
||||
}
|
||||
|
||||
int fpcCt_IsDoing(base_process_class *pProc)
|
||||
{
|
||||
int fpcCt_IsDoing(base_process_class* pProc) {
|
||||
return fpcCtRq_IsDoing(pProc->mpCtRq);
|
||||
}
|
||||
|
||||
void fpcCt_Abort(base_process_class *pProc)
|
||||
{
|
||||
void fpcCt_Abort(base_process_class* pProc) {
|
||||
fpcCtRq_Cancel(pProc->mpCtRq);
|
||||
}
|
||||
|
||||
void fpcCt_Handler(void)
|
||||
{
|
||||
void fpcCt_Handler(void) {
|
||||
fpcCtRq_Handler();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,30 +1,26 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_delete_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
// g_fpcDtTg_Queue
|
||||
extern node_list_class lbl_803A39A0;
|
||||
|
||||
extern "C" {
|
||||
|
||||
bool fpcDtTg_IsEmpty(delete_tag_class *pTag)
|
||||
{
|
||||
bool fpcDtTg_IsEmpty(delete_tag_class* pTag) {
|
||||
return lbl_803A39A0.mSize == 0;
|
||||
}
|
||||
|
||||
void fpcDtTg_ToDeleteQ(delete_tag_class *pTag)
|
||||
{
|
||||
void fpcDtTg_ToDeleteQ(delete_tag_class* pTag) {
|
||||
pTag->mTimer = 1;
|
||||
cTg_Addition(&lbl_803A39A0, pTag);
|
||||
}
|
||||
|
||||
void fpcDtTg_DeleteQTo(delete_tag_class *pTag)
|
||||
{
|
||||
void fpcDtTg_DeleteQTo(delete_tag_class* pTag) {
|
||||
cTg_SingleCut(pTag);
|
||||
}
|
||||
|
||||
int fpcDtTg_Do(delete_tag_class *pTag, delete_tag_func pFunc)
|
||||
{
|
||||
int fpcDtTg_Do(delete_tag_class* pTag, delete_tag_func pFunc) {
|
||||
if (pTag->mTimer <= 0) {
|
||||
fpcDtTg_DeleteQTo(pTag);
|
||||
int ret = pFunc(pTag->mpTagData);
|
||||
@@ -40,10 +36,8 @@ int fpcDtTg_Do(delete_tag_class *pTag, delete_tag_func pFunc)
|
||||
}
|
||||
}
|
||||
|
||||
int fpcDtTg_Init(delete_tag_class *pTag, void *pUserData)
|
||||
{
|
||||
int fpcDtTg_Init(delete_tag_class* pTag, void* pUserData) {
|
||||
cTg_Create(pTag, pUserData);
|
||||
return 1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
|
||||
#include "f/f_pc/f_pc_creator.h"
|
||||
#include "f/f_pc/f_pc_deletor.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_creator.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcDt_Delete(base_process_class *pProc)
|
||||
{
|
||||
int fpcDt_Delete(base_process_class* pProc) {
|
||||
if (pProc != NULL) {
|
||||
if (fpcCt_IsDoing(pProc) == 1)
|
||||
return 0;
|
||||
@@ -19,5 +18,4 @@ int fpcDt_Delete(base_process_class *pProc)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_draw_priority.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcDwPi_Get(draw_priority_class *pDwPi)
|
||||
{
|
||||
int fpcDwPi_Get(draw_priority_class* pDwPi) {
|
||||
return pDwPi->mPriority;
|
||||
}
|
||||
|
||||
void fpcDwPi_Set(draw_priority_class *pDwPi, int p)
|
||||
{
|
||||
void fpcDwPi_Set(draw_priority_class* pDwPi, int p) {
|
||||
pDwPi->mPriority = p;
|
||||
}
|
||||
|
||||
void fpcDwPi_Init(draw_priority_class *pDwPi, int p)
|
||||
{
|
||||
void fpcDwPi_Init(draw_priority_class* pDwPi, int p) {
|
||||
fpcDwPi_Set(pDwPi, p);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,50 +1,46 @@
|
||||
|
||||
#include "f/f_pc/f_pc_executor.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_line_iter.h"
|
||||
#include "f/f_pc/f_pc_layer_tag.h"
|
||||
#include "f/f_pc/f_pc_layer_iter.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_layer_iter.h"
|
||||
#include "f/f_pc/f_pc_layer_tag.h"
|
||||
#include "f/f_pc/f_pc_line_iter.h"
|
||||
#include "f/f_pc/f_pc_node.h"
|
||||
#include "f/f_pc/f_pc_searcher.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
extern int fpcPause_IsEnable(base_process_class *pProc, int);
|
||||
extern int fpcPause_IsEnable(base_process_class* pProc, int);
|
||||
|
||||
// g_fpcNd_type
|
||||
extern int lbl_80450D40;
|
||||
|
||||
base_process_class * fpcEx_Search(void *pFunc, void *pUserData)
|
||||
{
|
||||
return (base_process_class *) fpcLyIt_AllJudge((cNdIt_MethodFunc) pFunc, pUserData);
|
||||
base_process_class* fpcEx_Search(void* pFunc, void* pUserData) {
|
||||
return (base_process_class*)fpcLyIt_AllJudge((cNdIt_MethodFunc)pFunc, pUserData);
|
||||
}
|
||||
|
||||
base_process_class * fpcEx_SearchByID(u32 id)
|
||||
{
|
||||
base_process_class* fpcEx_SearchByID(u32 id) {
|
||||
if (id + 2 <= 1)
|
||||
return NULL;
|
||||
|
||||
return fpcEx_Search(fpcSch_JudgeByID, &id);;
|
||||
return fpcEx_Search(fpcSch_JudgeByID, &id);
|
||||
;
|
||||
}
|
||||
|
||||
bool fpcEx_IsExist(int id)
|
||||
{
|
||||
bool fpcEx_IsExist(int id) {
|
||||
return fpcEx_SearchByID(id) != NULL;
|
||||
}
|
||||
|
||||
int fpcEx_Execute(base_process_class *pProc)
|
||||
{
|
||||
int fpcEx_Execute(base_process_class* pProc) {
|
||||
if (pProc->mInitState != 2 || fpcPause_IsEnable(pProc, 1) == 1)
|
||||
return 0;
|
||||
fpcBs_Execute(pProc);
|
||||
// TODO: missing return?
|
||||
}
|
||||
|
||||
int fpcEx_ToLineQ(base_process_class *pProc)
|
||||
{
|
||||
layer_class *pLayer = pProc->mLyTg.mpLayer;
|
||||
base_process_class *pLayerPcNode = pLayer->mpPcNode;
|
||||
int fpcEx_ToLineQ(base_process_class* pProc) {
|
||||
layer_class* pLayer = pProc->mLyTg.mpLayer;
|
||||
base_process_class* pLayerPcNode = pLayer->mpPcNode;
|
||||
|
||||
if (pLayer->mLayerID == 0 || cTg_IsUse(&pLayerPcNode->mLnTg) == true) {
|
||||
int ret = fpcLnTg_ToQueue(&pProc->mLnTg, pProc->mPi.mInfoCurr.mListID);
|
||||
@@ -55,8 +51,8 @@ int fpcEx_ToLineQ(base_process_class *pProc)
|
||||
|
||||
pProc->mInitState = 2;
|
||||
if (fpcBs_Is_JustOfType(lbl_80450D40, pProc->mSubType)) {
|
||||
process_node_class *pNode = (process_node_class *) pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc) fpcEx_ToLineQ, pNode);
|
||||
process_node_class* pNode = (process_node_class*)pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcEx_ToLineQ, pNode);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -65,8 +61,7 @@ int fpcEx_ToLineQ(base_process_class *pProc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fpcEx_ExecuteQTo(base_process_class *pProc)
|
||||
{
|
||||
int fpcEx_ExecuteQTo(base_process_class* pProc) {
|
||||
int ret = fpcLyTg_QueueTo(&pProc->mLyTg);
|
||||
if (ret == 1) {
|
||||
pProc->mInitState = 3;
|
||||
@@ -76,9 +71,9 @@ int fpcEx_ExecuteQTo(base_process_class *pProc)
|
||||
}
|
||||
}
|
||||
|
||||
int fpcEx_ToExecuteQ(base_process_class *pProc)
|
||||
{
|
||||
int ret = fpcLyTg_ToQueue(&pProc->mLyTg, pProc->mPi.mInfoCurr.mLayer, pProc->mPi.mInfoCurr.mListID, pProc->mPi.mInfoCurr.mListPrio);
|
||||
int fpcEx_ToExecuteQ(base_process_class* pProc) {
|
||||
int ret = fpcLyTg_ToQueue(&pProc->mLyTg, pProc->mPi.mInfoCurr.mLayer,
|
||||
pProc->mPi.mInfoCurr.mListID, pProc->mPi.mInfoCurr.mListPrio);
|
||||
if (ret == 1) {
|
||||
fpcEx_ToLineQ(pProc);
|
||||
return 1;
|
||||
@@ -87,9 +82,7 @@ int fpcEx_ToExecuteQ(base_process_class *pProc)
|
||||
}
|
||||
}
|
||||
|
||||
void fpcEx_Handler(cNdIt_MethodFunc pFunc)
|
||||
{
|
||||
void fpcEx_Handler(cNdIt_MethodFunc pFunc) {
|
||||
return fpcLnIt_Queue(pFunc);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+32
-32
@@ -1,10 +1,10 @@
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_method_tag.h"
|
||||
#include "f/f_pc/f_pc_method_iter.h"
|
||||
#include "f/f_pc/f_pc_method_tag.h"
|
||||
#include "global.h"
|
||||
|
||||
// f_pc_layer::l_fpcLy_CurrLayer_p
|
||||
extern layer_class *lbl_80450D18;
|
||||
extern layer_class* lbl_80450D18;
|
||||
extern s8 lbl_80450D20;
|
||||
// f_pc_layer::IsInitOfLayerList
|
||||
extern s32 lbl_80450D1C;
|
||||
@@ -18,71 +18,71 @@ extern layer_class lbl_803A39B0;
|
||||
|
||||
extern "C" {
|
||||
|
||||
void fpcLy_CancelQTo(process_method_tag_class *pMthd) {
|
||||
void fpcLy_CancelQTo(process_method_tag_class* pMthd) {
|
||||
fpcMtdTg_MethodQTo(pMthd);
|
||||
}
|
||||
|
||||
int fpcLy_ToCancelQ(layer_class *pLayer, process_method_tag_class *pMthd) {
|
||||
int fpcLy_ToCancelQ(layer_class* pLayer, process_method_tag_class* pMthd) {
|
||||
return fpcMtdTg_ToMethodQ(&pLayer->mCancelList, pMthd);
|
||||
}
|
||||
|
||||
bool fpcLy_CancelMethod(process_method_tag_class *pLayer) {
|
||||
bool fpcLy_CancelMethod(process_method_tag_class* pLayer) {
|
||||
return fpcMtdTg_Do(pLayer) == 1;
|
||||
}
|
||||
|
||||
int fpcLy_IntoQueue(layer_class *pLayer, int treeListIdx, create_tag_class *pTag, int idx) {
|
||||
int fpcLy_IntoQueue(layer_class* pLayer, int treeListIdx, create_tag_class* pTag, int idx) {
|
||||
return cTg_InsertToTree(&pLayer->mNodeListTree, treeListIdx, pTag, idx);
|
||||
}
|
||||
|
||||
int fpcLy_ToQueue(layer_class *pLayer, int treeListIdx, create_tag_class *pTag) {
|
||||
int fpcLy_ToQueue(layer_class* pLayer, int treeListIdx, create_tag_class* pTag) {
|
||||
return cTg_AdditionToTree(&pLayer->mNodeListTree, treeListIdx, pTag);
|
||||
}
|
||||
|
||||
int fpcLy_QueueTo(layer_class *pLayer, create_tag_class *pTag) {
|
||||
int fpcLy_QueueTo(layer_class* pLayer, create_tag_class* pTag) {
|
||||
return cTg_SingleCutFromTree(pTag);
|
||||
}
|
||||
|
||||
bool fpcLy_IsDeletingMesg(layer_class *pLayer) {
|
||||
bool fpcLy_IsDeletingMesg(layer_class* pLayer) {
|
||||
return pLayer->mDeletingCount > 0;
|
||||
}
|
||||
|
||||
void fpcLy_DeletingMesg(layer_class *pLayer) {
|
||||
void fpcLy_DeletingMesg(layer_class* pLayer) {
|
||||
pLayer->mDeletingCount++;
|
||||
}
|
||||
|
||||
void fpcLy_DeletedMesg(layer_class *pLayer) {
|
||||
void fpcLy_DeletedMesg(layer_class* pLayer) {
|
||||
if (pLayer->mDeletingCount > 0) {
|
||||
pLayer->mDeletingCount--;
|
||||
}
|
||||
}
|
||||
|
||||
bool fpcLy_IsCreatingMesg(layer_class *pLayer) {
|
||||
bool fpcLy_IsCreatingMesg(layer_class* pLayer) {
|
||||
return pLayer->mCreatingCount > 0;
|
||||
}
|
||||
|
||||
void fpcLy_CreatingMesg(layer_class *pLayer) {
|
||||
void fpcLy_CreatingMesg(layer_class* pLayer) {
|
||||
pLayer->mCreatingCount++;
|
||||
}
|
||||
|
||||
void fpcLy_CreatedMesg(layer_class *pLayer) {
|
||||
void fpcLy_CreatedMesg(layer_class* pLayer) {
|
||||
if (pLayer->mCreatingCount > 0) {
|
||||
pLayer->mCreatingCount--;
|
||||
}
|
||||
}
|
||||
|
||||
layer_class * fpcLy_RootLayer(void) {
|
||||
layer_class* fpcLy_RootLayer(void) {
|
||||
return (layer_class*)lbl_803A39DC.mpHead;
|
||||
}
|
||||
|
||||
void fpcLy_SetCurrentLayer(layer_class *pLayer) {
|
||||
void fpcLy_SetCurrentLayer(layer_class* pLayer) {
|
||||
lbl_80450D18 = pLayer;
|
||||
}
|
||||
|
||||
layer_class * fpcLy_CurrentLayer(void) {
|
||||
layer_class* fpcLy_CurrentLayer(void) {
|
||||
return lbl_80450D18;
|
||||
}
|
||||
|
||||
layer_class * fpcLy_Search(unsigned int id) {
|
||||
layer_class* fpcLy_Search(unsigned int id) {
|
||||
layer_class* iVar1 = fpcLy_RootLayer();
|
||||
while (iVar1 != NULL) {
|
||||
if (iVar1->mLayerID == id) {
|
||||
@@ -93,7 +93,7 @@ layer_class * fpcLy_Search(unsigned int id) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
layer_class * fpcLy_Layer(unsigned int id) {
|
||||
layer_class* fpcLy_Layer(unsigned int id) {
|
||||
if (id == 0 || fpcLy_RootLayer()->mLayerID == id) {
|
||||
return fpcLy_RootLayer();
|
||||
} else if (id == ~2 || fpcLy_CurrentLayer()->mLayerID == id) {
|
||||
@@ -103,34 +103,35 @@ layer_class * fpcLy_Layer(unsigned int id) {
|
||||
}
|
||||
}
|
||||
|
||||
void fpcLy_Regist(layer_class *pLayer) {
|
||||
void fpcLy_Regist(layer_class* pLayer) {
|
||||
cLs_Addition(&lbl_803A39DC, &pLayer->mNode);
|
||||
}
|
||||
|
||||
int fpcLy_Delete(layer_class *pLayer) {
|
||||
int fpcLy_Delete(layer_class* pLayer) {
|
||||
if (pLayer->mNodeListTree.mpLists->mSize == 0 && pLayer->mCancelList.mSize == 0) {
|
||||
cLs_SingleCut(&pLayer->mNode);
|
||||
*pLayer = lbl_803A39B0;
|
||||
*pLayer = lbl_803A39B0;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void fpcLy_Cancel(layer_class *pLayer) {
|
||||
void fpcLy_Cancel(layer_class* pLayer) {
|
||||
fpcMtdIt_Method(&pLayer->mCancelList, (cNdIt_MethodFunc)fpcLy_CancelMethod);
|
||||
}
|
||||
|
||||
void fpcLy_Create(layer_class *pLayer, process_node_class *pPcNode, node_list_class *pLists, int listNum) {
|
||||
void *pvVar1;
|
||||
void fpcLy_Create(layer_class* pLayer, process_node_class* pPcNode, node_list_class* pLists,
|
||||
int listNum) {
|
||||
void* pvVar1;
|
||||
int iVar2;
|
||||
|
||||
|
||||
if (lbl_80450D20 == 0) {
|
||||
lbl_80450D1C = 0x1; // IsInitOfLayerList
|
||||
lbl_80450D1C = 0x1; // IsInitOfLayerList
|
||||
lbl_80450D20 = 1;
|
||||
}
|
||||
if (lbl_80450D28 == 0) {
|
||||
lbl_80450D24 = 0; // layer_id
|
||||
lbl_80450D24 = 0; // layer_id
|
||||
lbl_80450D28 = 1;
|
||||
}
|
||||
*pLayer = lbl_803A39B0;
|
||||
@@ -144,9 +145,8 @@ void fpcLy_Create(layer_class *pLayer, process_node_class *pPcNode, node_list_cl
|
||||
}
|
||||
(pLayer->mNodeListTree).mpLists = pLists;
|
||||
(pLayer->mNodeListTree).mNumLists = listNum;
|
||||
cTr_Create(&pLayer->mNodeListTree,(pLayer->mNodeListTree).mpLists,
|
||||
(pLayer->mNodeListTree).mNumLists);
|
||||
cTr_Create(&pLayer->mNodeListTree, (pLayer->mNodeListTree).mpLists,
|
||||
(pLayer->mNodeListTree).mNumLists);
|
||||
fpcLy_Regist(pLayer);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
#include "f/f_pc/f_pc_layer_iter.h"
|
||||
#include "SComponent/c_tree_iter.h"
|
||||
#include "SComponent/c_tag_iter.h"
|
||||
#include "SComponent/c_tree_iter.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcLyIt_OnlyHere(layer_class *pLayer, cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
int fpcLyIt_OnlyHere(layer_class* pLayer, cNdIt_MethodFunc pFunc, void* pUserData) {
|
||||
layer_iter lIter;
|
||||
lIter.mpFunc = pFunc;
|
||||
lIter.mpUserData = pUserData;
|
||||
return cTrIt_Method(&pLayer->mNodeListTree,(cNdIt_MethodFunc) cTgIt_MethodCall, &lIter);
|
||||
return cTrIt_Method(&pLayer->mNodeListTree, (cNdIt_MethodFunc)cTgIt_MethodCall, &lIter);
|
||||
}
|
||||
|
||||
int fpcLyIt_OnlyHereLY(layer_class *pLayer, cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
int fpcLyIt_OnlyHereLY(layer_class* pLayer, cNdIt_MethodFunc pFunc, void* pUserData) {
|
||||
int result;
|
||||
layer_class* currentLayer = fpcLy_CurrentLayer();
|
||||
fpcLy_SetCurrentLayer(pLayer);
|
||||
@@ -20,21 +20,22 @@ int fpcLyIt_OnlyHereLY(layer_class *pLayer, cNdIt_MethodFunc pFunc, void *pUserD
|
||||
return result;
|
||||
}
|
||||
|
||||
void * fpcLyIt_Judge(layer_class *pLayer, cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
void* fpcLyIt_Judge(layer_class* pLayer, cNdIt_MethodFunc pFunc, void* pUserData) {
|
||||
layer_iter lIter;
|
||||
lIter.mpFunc = pFunc;
|
||||
lIter.mpUserData = pUserData;
|
||||
return cTrIt_Judge(&pLayer->mNodeListTree,(cNdIt_JudgeFunc) cTgIt_JudgeFilter, &lIter);
|
||||
return cTrIt_Judge(&pLayer->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter);
|
||||
}
|
||||
|
||||
void * fpcLyIt_AllJudge(cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
void* fpcLyIt_AllJudge(cNdIt_MethodFunc pFunc, void* pUserData) {
|
||||
layer_iter lIter;
|
||||
lIter.mpFunc = pFunc;
|
||||
lIter.mpUserData = pUserData;
|
||||
|
||||
|
||||
layer_class* current = fpcLy_RootLayer();
|
||||
while (current != NULL) {
|
||||
void* result = cTrIt_Judge(¤t->mNodeListTree,(cNdIt_JudgeFunc) cTgIt_JudgeFilter, &lIter);
|
||||
void* result =
|
||||
cTrIt_Judge(¤t->mNodeListTree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &lIter);
|
||||
if (result != NULL) {
|
||||
return result;
|
||||
}
|
||||
@@ -42,5 +43,4 @@ void * fpcLyIt_AllJudge(cNdIt_MethodFunc pFunc, void *pUserData) {
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_layer_tag.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "global.h"
|
||||
|
||||
// f_pc_layer_tag::crear
|
||||
extern layer_management_tag_class lbl_803A3A00;
|
||||
|
||||
extern "C" {
|
||||
|
||||
s32 fpcLyTg_ToQueue(layer_management_tag_class *pTag, u32 layerID, u16 listID, u16 listPrio) {
|
||||
s32 fpcLyTg_ToQueue(layer_management_tag_class* pTag, u32 layerID, u16 listID, u16 listPrio) {
|
||||
if (pTag->mpLayer == NULL && layerID == -1) {
|
||||
return 0;
|
||||
} else {
|
||||
@@ -22,7 +22,7 @@ s32 fpcLyTg_ToQueue(layer_management_tag_class *pTag, u32 layerID, u16 listID, u
|
||||
pTag->mNodeListIdx = tmp - 1;
|
||||
return 1;
|
||||
}
|
||||
} else if (fpcLy_IntoQueue(pTag->mpLayer,listID,&pTag->mCreateTag,listPrio) != 0x0) {
|
||||
} else if (fpcLy_IntoQueue(pTag->mpLayer, listID, &pTag->mCreateTag, listPrio) != 0x0) {
|
||||
pTag->mNodeListID = listID;
|
||||
pTag->mNodeListIdx = listPrio;
|
||||
return 1;
|
||||
@@ -31,8 +31,8 @@ s32 fpcLyTg_ToQueue(layer_management_tag_class *pTag, u32 layerID, u16 listID, u
|
||||
}
|
||||
}
|
||||
|
||||
s32 fpcLyTg_QueueTo(layer_management_tag_class *pTag) {
|
||||
if (fpcLy_QueueTo(pTag->mpLayer,&pTag->mCreateTag) == 1) {
|
||||
s32 fpcLyTg_QueueTo(layer_management_tag_class* pTag) {
|
||||
if (fpcLy_QueueTo(pTag->mpLayer, &pTag->mCreateTag) == 1) {
|
||||
pTag->mpLayer = NULL;
|
||||
pTag->mNodeListID = 0xFFFF;
|
||||
pTag->mNodeListIdx = 0xFFFF;
|
||||
@@ -42,22 +42,21 @@ s32 fpcLyTg_QueueTo(layer_management_tag_class *pTag) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 fpcLyTg_Move(layer_management_tag_class * pTag, u32 layerID, u16 listID, u16 listPrio) {
|
||||
layer_class *layer = fpcLy_Layer(layerID);
|
||||
s32 fpcLyTg_Move(layer_management_tag_class* pTag, u32 layerID, u16 listID, u16 listPrio) {
|
||||
layer_class* layer = fpcLy_Layer(layerID);
|
||||
if (layer == NULL) {
|
||||
return 0;
|
||||
}
|
||||
else if (fpcLyTg_QueueTo(pTag) == 0x1) {
|
||||
} else if (fpcLyTg_QueueTo(pTag) == 0x1) {
|
||||
pTag->mpLayer = layer;
|
||||
return fpcLyTg_ToQueue(pTag,layerID,listID,listPrio);
|
||||
return fpcLyTg_ToQueue(pTag, layerID, listID, listPrio);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
s32 fpcLyTg_Init(layer_management_tag_class * pTag, u32 param2, void * param3) {
|
||||
s32 fpcLyTg_Init(layer_management_tag_class* pTag, u32 param2, void* param3) {
|
||||
*pTag = lbl_803A3A00;
|
||||
cTg_Create(&pTag->mCreateTag, param3);
|
||||
cTg_Create(&pTag->mCreateTag, param3);
|
||||
layer_class* layer = fpcLy_Layer(param2);
|
||||
if (layer != NULL) {
|
||||
pTag->mpLayer = layer;
|
||||
@@ -66,5 +65,4 @@ s32 fpcLyTg_Init(layer_management_tag_class * pTag, u32 param2, void * param3) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,13 +3,11 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcLf_GetPriority(leafdraw_class *pLeaf)
|
||||
{
|
||||
int fpcLf_GetPriority(leafdraw_class* pLeaf) {
|
||||
return fpcDwPi_Get(&pLeaf->mDwPi);
|
||||
}
|
||||
|
||||
int fpcLf_DrawMethod(leafdraw_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcLf_DrawMethod(leafdraw_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpDrawFunc, pUserData);
|
||||
}
|
||||
|
||||
@@ -22,5 +20,4 @@ int fpcLf_Draw(leafdraw_class *pLeaf)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "SComponent/c_list.h"
|
||||
#include "global.h"
|
||||
|
||||
// l_fpcLn_Line
|
||||
extern node_list_class lbl_803F4CF0[16];
|
||||
|
||||
extern "C" {
|
||||
|
||||
void fpcLn_Create(void)
|
||||
{
|
||||
void fpcLn_Create(void) {
|
||||
int i = ARRAY_SIZE(lbl_803F4CF0);
|
||||
node_list_class *pLine = lbl_803F4CF0;
|
||||
node_list_class* pLine = lbl_803F4CF0;
|
||||
while (i-- > 0)
|
||||
cLs_Create(pLine++);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "SComponent/c_tag_iter.h"
|
||||
#include "SComponent/c_tree_iter.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
|
||||
// g_fpcLn_Queue
|
||||
extern node_lists_tree_class lbl_804505D8;
|
||||
|
||||
extern "C" {
|
||||
|
||||
static int fpcLnIt_MethodCall(create_tag_class *pTag, method_filter *pFilter)
|
||||
{
|
||||
layer_class *pLayer = ((base_process_class *) pTag->mpTagData)->mLyTg.mpLayer;
|
||||
layer_class *pCurLayer = fpcLy_CurrentLayer();
|
||||
static int fpcLnIt_MethodCall(create_tag_class* pTag, method_filter* pFilter) {
|
||||
layer_class* pLayer = ((base_process_class*)pTag->mpTagData)->mLyTg.mpLayer;
|
||||
layer_class* pCurLayer = fpcLy_CurrentLayer();
|
||||
|
||||
fpcLy_SetCurrentLayer(pLayer);
|
||||
int ret = cTgIt_MethodCall(pTag, pFilter);
|
||||
@@ -21,12 +20,10 @@ static int fpcLnIt_MethodCall(create_tag_class *pTag, method_filter *pFilter)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fpcLnIt_Queue(cNdIt_MethodFunc pFunc)
|
||||
{
|
||||
void fpcLnIt_Queue(cNdIt_MethodFunc pFunc) {
|
||||
method_filter filter;
|
||||
filter.mpMethodFunc = pFunc;
|
||||
filter.mpUserData = NULL;
|
||||
cTrIt_Method(&lbl_804505D8, (cNdIt_MethodFunc) fpcLnIt_MethodCall, &filter);
|
||||
cTrIt_Method(&lbl_804505D8, (cNdIt_MethodFunc)fpcLnIt_MethodCall, &filter);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -6,8 +6,7 @@ extern node_lists_tree_class lbl_804505D8;
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcLnTg_Move(line_tag *pLineTag, int newLineListID)
|
||||
{
|
||||
int fpcLnTg_Move(line_tag* pLineTag, int newLineListID) {
|
||||
if (pLineTag->mLineListID != newLineListID) {
|
||||
fpcLnTg_QueueTo(pLineTag);
|
||||
return fpcLnTg_ToQueue(pLineTag, newLineListID);
|
||||
@@ -16,14 +15,12 @@ int fpcLnTg_Move(line_tag *pLineTag, int newLineListID)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void fpcLnTg_QueueTo(line_tag *pLineTag)
|
||||
{
|
||||
void fpcLnTg_QueueTo(line_tag* pLineTag) {
|
||||
cTg_SingleCutFromTree(pLineTag);
|
||||
pLineTag->mLineListID = -1;
|
||||
}
|
||||
|
||||
int fpcLnTg_ToQueue(line_tag *pLineTag, int lineListID)
|
||||
{
|
||||
int fpcLnTg_ToQueue(line_tag* pLineTag, int lineListID) {
|
||||
int ret = cTg_AdditionToTree(&lbl_804505D8, lineListID, pLineTag);
|
||||
|
||||
if (ret) {
|
||||
@@ -34,11 +31,8 @@ int fpcLnTg_ToQueue(line_tag *pLineTag, int lineListID)
|
||||
}
|
||||
}
|
||||
|
||||
void fpcLnTg_Init(line_tag *pLineTag, void *pData)
|
||||
{
|
||||
void fpcLnTg_Init(line_tag* pLineTag, void* pData) {
|
||||
cTg_Create(pLineTag, pData);
|
||||
pLineTag->mLineListID = -1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "SComponent/c_phase.h"
|
||||
#include "f/f_pc/f_pc_load.h"
|
||||
#include "SComponent/c_phase.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -8,25 +8,21 @@ extern int cDyl_IsLinked(short procName);
|
||||
extern int cDyl_Unlink(short procName);
|
||||
extern int cDyl_LinkASync(short procName);
|
||||
|
||||
bool fpcLd_Use(u16 procName)
|
||||
{
|
||||
bool fpcLd_Use(u16 procName) {
|
||||
if (fpcLd_IsLoaded(procName) == true && fpcLd_Load(procName) == cPhs_COMPLEATE_e)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int fpcLd_IsLoaded(u16 procName)
|
||||
{
|
||||
int fpcLd_IsLoaded(u16 procName) {
|
||||
return cDyl_IsLinked(procName);
|
||||
}
|
||||
|
||||
void fpcLd_Free(u16 procName)
|
||||
{
|
||||
void fpcLd_Free(u16 procName) {
|
||||
cDyl_Unlink(procName);
|
||||
}
|
||||
|
||||
int fpcLd_Load(u16 procName)
|
||||
{
|
||||
int fpcLd_Load(u16 procName) {
|
||||
int phase = cDyl_LinkASync(procName);
|
||||
|
||||
switch (phase) {
|
||||
@@ -38,5 +34,4 @@ int fpcLd_Load(u16 procName)
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,35 +1,29 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_method.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcMtd_Method(process_method_func pFunc, void *pUserData)
|
||||
{
|
||||
int fpcMtd_Method(process_method_func pFunc, void* pUserData) {
|
||||
if (pFunc != NULL)
|
||||
return pFunc(pUserData);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fpcMtd_Execute(process_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcMtd_Execute(process_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpExecuteFunc, pUserData);
|
||||
}
|
||||
|
||||
int fpcMtd_IsDelete(process_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcMtd_IsDelete(process_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpIsDeleteFunc, pUserData);
|
||||
}
|
||||
|
||||
int fpcMtd_Delete(process_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcMtd_Delete(process_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpDeleteFunc, pUserData);
|
||||
}
|
||||
|
||||
int fpcMtd_Create(process_method_class *pMthd, void *pUserData)
|
||||
{
|
||||
int fpcMtd_Create(process_method_class* pMthd, void* pUserData) {
|
||||
return fpcMtd_Method(pMthd->mpCreateFunc, pUserData);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f/f_pc/f_pc_method_iter.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
void fpcMtdIt_Method(node_list_class *pList, cNdIt_MethodFunc pMethod)
|
||||
{
|
||||
void fpcMtdIt_Method(node_list_class* pList, cNdIt_MethodFunc pMethod) {
|
||||
cLsIt_Method(pList, pMethod, NULL);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -6,27 +6,22 @@ extern node_lists_tree_class lbl_804505D8;
|
||||
|
||||
extern "C" {
|
||||
|
||||
int fpcMtdTg_Do(process_method_tag_class *pMthd)
|
||||
{
|
||||
int fpcMtdTg_Do(process_method_tag_class* pMthd) {
|
||||
return pMthd->mpFunc(pMthd->mpMthdData);
|
||||
}
|
||||
|
||||
int fpcMtdTg_ToMethodQ(node_list_class *pList, process_method_tag_class *pMthd)
|
||||
{
|
||||
int fpcMtdTg_ToMethodQ(node_list_class* pList, process_method_tag_class* pMthd) {
|
||||
return cTg_Addition(pList, pMthd);
|
||||
}
|
||||
|
||||
void fpcMtdTg_MethodQTo(process_method_tag_class *pMthd)
|
||||
{
|
||||
void fpcMtdTg_MethodQTo(process_method_tag_class* pMthd) {
|
||||
cTg_SingleCut(pMthd);
|
||||
}
|
||||
|
||||
int fpcMtdTg_Init(process_method_tag_class *pMthd, process_method_tag_func pFunc, void *pMthdData)
|
||||
{
|
||||
int fpcMtdTg_Init(process_method_tag_class* pMthd, process_method_tag_func pFunc, void* pMthdData) {
|
||||
cTg_Create(pMthd, pMthd);
|
||||
pMthd->mpFunc = pFunc;
|
||||
pMthd->mpMthdData = pMthdData;
|
||||
return 1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+40
-31
@@ -4,65 +4,74 @@
|
||||
#include "f/f_pc/f_pc_layer_iter.h"
|
||||
#include "f/f_pc/f_pc_node.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
|
||||
// f_pc_node::g_fpcNd_type
|
||||
extern int lbl_80450D40;
|
||||
|
||||
#if NON_MATCHING
|
||||
bool fpcPause_IsEnable(void *pProcess, u8 flag)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pProcess;
|
||||
bool fpcPause_IsEnable(void* pProcess, u8 flag) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
// extra addic/subfe?
|
||||
return (pProc->mPauseFlag & flag) == flag;
|
||||
}
|
||||
#else
|
||||
asm bool fpcPause_IsEnable(void *pProcess, u8 flag)
|
||||
{
|
||||
asm bool fpcPause_IsEnable(void* pProcess, u8 flag) {
|
||||
nofralloc
|
||||
/* 80023844 00020784 54 84 06 3E */ clrlwi r4, r4, 0x18
|
||||
/* 80023848 00020788 88 03 00 0B */ lbz r0, 0xb(r3)
|
||||
/* 8002384C 0002078C 7C 80 00 38 */ and r0, r4, r0
|
||||
/* 80023850 00020790 7C 64 00 50 */ subf r3, r4, r0
|
||||
/* 80023854 00020794 30 03 FF FF */ addic r0, r3, -1
|
||||
/* 80023858 00020798 7C 00 19 10 */ subfe r0, r0, r3
|
||||
/* 8002385C 0002079C 7C 00 00 34 */ cntlzw r0, r0
|
||||
/* 80023860 000207A0 54 03 D9 7E */ srwi r3, r0, 5
|
||||
/* 80023864 000207A4 4E 80 00 20 */ blr
|
||||
/* 80023844 00020784 54 84 06 3E */ clrlwi r4,
|
||||
r4,
|
||||
0x18
|
||||
/* 80023848 00020788 88 03 00 0B */ lbz r0,
|
||||
0xb(r3)
|
||||
/* 8002384C 0002078C 7C 80 00 38 */
|
||||
and r0,
|
||||
r4,
|
||||
r0
|
||||
/* 80023850 00020790 7C 64 00 50 */ subf r3,
|
||||
r4,
|
||||
r0
|
||||
/* 80023854 00020794 30 03 FF FF */ addic r0,
|
||||
r3,
|
||||
-1
|
||||
/* 80023858 00020798 7C 00 19 10 */ subfe r0,
|
||||
r0,
|
||||
r3
|
||||
/* 8002385C 0002079C 7C 00 00 34 */ cntlzw r0,
|
||||
r0
|
||||
/* 80023860 000207A0 54 03 D9 7E */ srwi r3,
|
||||
r0,
|
||||
5
|
||||
/* 80023864 000207A4 4E 80 00 20 */ blr
|
||||
}
|
||||
#endif
|
||||
|
||||
int fpcPause_Enable(void *pProcess, u8 flag)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pProcess;
|
||||
int fpcPause_Enable(void* pProcess, u8 flag) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
pProc->mPauseFlag |= flag;
|
||||
|
||||
if (fpcBs_Is_JustOfType(lbl_80450D40, pProc->mSubType)) {
|
||||
process_node_class *pNode = (process_node_class *) pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Enable, (void*) (flag & 0xFF));
|
||||
process_node_class* pNode = (process_node_class*)pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Enable, (void*)(flag & 0xFF));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
// According to symbols, they used u8 instead of u32, but I can't get a match with u8 here. This is the best I got...
|
||||
int fpcPause_Disable(void *pProcess, u32 flag)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pProcess;
|
||||
// According to symbols, they used u8 instead of u32, but I can't get a match with u8 here. This is
|
||||
// the best I got...
|
||||
int fpcPause_Disable(void* pProcess, u32 flag) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
pProc->mPauseFlag &= (0xFF - flag) & 0xFF;
|
||||
|
||||
if (fpcBs_Is_JustOfType(lbl_80450D40, pProc->mSubType)) {
|
||||
process_node_class *pNode = (process_node_class *) pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Disable, (void*) (flag & 0xFF));
|
||||
process_node_class* pNode = (process_node_class*)pProc;
|
||||
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Disable, (void*)(flag & 0xFF));
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void fpcPause_Init(void *pProcess)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pProcess;
|
||||
void fpcPause_Init(void* pProcess) {
|
||||
base_process_class* pProc = (base_process_class*)pProcess;
|
||||
pProc->mPauseFlag = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
|
||||
#include "f/f_pc/f_pc_priority.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
#include "f/f_pc/f_pc_layer.h"
|
||||
#include "f/f_pc/f_pc_layer_tag.h"
|
||||
#include "f/f_pc/f_pc_base.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
|
||||
// f_pc_priority::crear$2186
|
||||
extern process_priority_queue_info lbl_804505E8;
|
||||
@@ -13,25 +12,22 @@ extern process_priority_queue_info lbl_804505E8;
|
||||
// f_pc_priority::l_fpcPi_Queue
|
||||
extern node_list_class lbl_803F4E58;
|
||||
|
||||
int fpcPi_IsInQueue(process_priority_class *pPi)
|
||||
{
|
||||
int fpcPi_IsInQueue(process_priority_class* pPi) {
|
||||
return cTg_IsUse(pPi);
|
||||
}
|
||||
|
||||
int fpcPi_QueueTo(process_priority_class *pPi)
|
||||
{
|
||||
int fpcPi_QueueTo(process_priority_class* pPi) {
|
||||
cTg_SingleCut(pPi);
|
||||
fpcLy_CancelQTo(&pPi->mMtdTag);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fpcPi_ToQueue(process_priority_class *pPi)
|
||||
{
|
||||
int fpcPi_ToQueue(process_priority_class* pPi) {
|
||||
u32 layer = pPi->mInfoQ.mLayer;
|
||||
|
||||
if (cTg_Addition(&lbl_803F4E58, pPi)) {
|
||||
if (layer != 0xFFFFFFFD) {
|
||||
layer_class *pLayer = fpcLy_Layer(layer);
|
||||
layer_class* pLayer = fpcLy_Layer(layer);
|
||||
|
||||
if (!fpcLy_ToCancelQ(pLayer, &pPi->mMtdTag)) {
|
||||
cTg_SingleCut(pPi);
|
||||
@@ -45,13 +41,12 @@ int fpcPi_ToQueue(process_priority_class *pPi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
process_priority_class * fpcPi_GetFromQueue(void)
|
||||
{
|
||||
process_priority_class *pPi = (process_priority_class *) cTg_GetFirst(&lbl_803F4E58);
|
||||
process_priority_class* fpcPi_GetFromQueue(void) {
|
||||
process_priority_class* pPi = (process_priority_class*)cTg_GetFirst(&lbl_803F4E58);
|
||||
|
||||
if (pPi != NULL) {
|
||||
base_process_class *pProc = (base_process_class *) pPi->mpTagData;
|
||||
process_priority_class *pProcPi = &pProc->mPi;
|
||||
base_process_class* pProc = (base_process_class*)pPi->mpTagData;
|
||||
process_priority_class* pProcPi = &pProc->mPi;
|
||||
fpcLy_CancelQTo(&pProcPi->mMtdTag);
|
||||
return pProcPi;
|
||||
}
|
||||
@@ -59,24 +54,22 @@ process_priority_class * fpcPi_GetFromQueue(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int fpcPi_Delete(process_priority_class *pPi)
|
||||
{
|
||||
int fpcPi_Delete(process_priority_class* pPi) {
|
||||
fpcPi_QueueTo(pPi);
|
||||
pPi->mInfoQ = lbl_804505E8;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fpcPi_IsNormal(unsigned int layer, unsigned short listID, unsigned short priority)
|
||||
{
|
||||
int fpcPi_IsNormal(unsigned int layer, unsigned short listID, unsigned short priority) {
|
||||
if ((layer < 0xFFFFFFFE) && (listID < 0xFFFE) && (priority < 0xFFFE))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fpcPi_Change(process_priority_class *pPi, unsigned int layer, unsigned short listID, unsigned short priority)
|
||||
{
|
||||
base_process_class *pProc = (base_process_class *) pPi->mpTagData;
|
||||
int fpcPi_Change(process_priority_class* pPi, unsigned int layer, unsigned short listID,
|
||||
unsigned short priority) {
|
||||
base_process_class* pProc = (base_process_class*)pPi->mpTagData;
|
||||
int changed = 0;
|
||||
|
||||
if (pProc->mInitState == 3)
|
||||
@@ -98,7 +91,7 @@ int fpcPi_Change(process_priority_class *pPi, unsigned int layer, unsigned short
|
||||
}
|
||||
|
||||
if (priority != 0xFFFD && pPi->mInfoCurr.mListPrio != priority) {
|
||||
pPi->mInfoQ.mListPrio = priority;
|
||||
pPi->mInfoQ.mListPrio = priority;
|
||||
changed = 1;
|
||||
}
|
||||
|
||||
@@ -113,13 +106,13 @@ int fpcPi_Change(process_priority_class *pPi, unsigned int layer, unsigned short
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fpcPi_Handler(void)
|
||||
{
|
||||
while (process_priority_class *pPi = fpcPi_GetFromQueue()) {
|
||||
base_process_class *pProc = (base_process_class *) pPi->mpTagData;
|
||||
layer_management_tag_class *pLayerTag = &pProc->mLyTg;
|
||||
line_tag *pLineTag = &pProc->mLnTg;
|
||||
if (fpcLyTg_Move(pLayerTag, pPi->mInfoQ.mLayer, pPi->mInfoQ.mListID, pPi->mInfoQ.mListPrio) == 1) {
|
||||
int fpcPi_Handler(void) {
|
||||
while (process_priority_class* pPi = fpcPi_GetFromQueue()) {
|
||||
base_process_class* pProc = (base_process_class*)pPi->mpTagData;
|
||||
layer_management_tag_class* pLayerTag = &pProc->mLyTg;
|
||||
line_tag* pLineTag = &pProc->mLnTg;
|
||||
if (fpcLyTg_Move(pLayerTag, pPi->mInfoQ.mLayer, pPi->mInfoQ.mListID,
|
||||
pPi->mInfoQ.mListPrio) == 1) {
|
||||
fpcLnTg_Move(pLineTag, pPi->mInfoCurr.mListID);
|
||||
pPi->mInfoCurr = pPi->mInfoQ;
|
||||
} else {
|
||||
@@ -130,8 +123,8 @@ int fpcPi_Handler(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fpcPi_Init(process_priority_class *pPi, void *pUserData, unsigned int layer, unsigned short listID, unsigned short priority)
|
||||
{
|
||||
int fpcPi_Init(process_priority_class* pPi, void* pUserData, unsigned int layer,
|
||||
unsigned short listID, unsigned short priority) {
|
||||
if (!fpcPi_IsNormal(layer, listID, priority))
|
||||
return 0;
|
||||
|
||||
@@ -140,8 +133,7 @@ int fpcPi_Init(process_priority_class *pPi, void *pUserData, unsigned int layer,
|
||||
pPi->mInfoQ.mListPrio = priority;
|
||||
pPi->mInfoCurr = pPi->mInfoQ;
|
||||
cTg_Create(pPi, pUserData);
|
||||
fpcMtdTg_Init(&pPi->mMtdTag, (process_method_tag_func) fpcPi_Delete, pPi);
|
||||
fpcMtdTg_Init(&pPi->mMtdTag, (process_method_tag_func)fpcPi_Delete, pPi);
|
||||
return 1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
#include "f/f_pc/f_pc_profile.h"
|
||||
|
||||
// g_fpcPf_ProfileList_p
|
||||
extern void ** lbl_80450D50;
|
||||
extern void** lbl_80450D50;
|
||||
|
||||
extern "C" {
|
||||
|
||||
void * fpcPf_Get(s16 profileID)
|
||||
{
|
||||
void* fpcPf_Get(s16 profileID) {
|
||||
return lbl_80450D50[profileID];
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -4,20 +4,17 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
void * fpcSch_JudgeForPName(base_process_class *pProc, void *pUserData)
|
||||
{
|
||||
void* fpcSch_JudgeForPName(base_process_class* pProc, void* pUserData) {
|
||||
short pname = *(short*)pUserData;
|
||||
if (pProc->mProcName == pname)
|
||||
return pProc;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void * fpcSch_JudgeByID(base_process_class *pProc, void *pUserData)
|
||||
{
|
||||
void* fpcSch_JudgeByID(base_process_class* pProc, void* pUserData) {
|
||||
int id = *(int*)pUserData;
|
||||
if (pProc->mBsPcId == id)
|
||||
return pProc;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "m_Do/m_Do_reset/m_Do_reset.h"
|
||||
#include "dvd/dvd.h"
|
||||
#include "JSystem/JUtility/JUTXfb/JUTXfb.h"
|
||||
#include "dvd/dvd.h"
|
||||
#include "global.h"
|
||||
|
||||
extern "C" {
|
||||
@@ -20,10 +20,10 @@ void destroyVideo() {
|
||||
|
||||
// TODO: cleanup
|
||||
void mDoRst::reset(s32 p1, u32 p2, s32 p3) {
|
||||
mDoCPd_c *pmVar1;
|
||||
mDoCPd_c* pmVar1;
|
||||
u32 uVar2;
|
||||
DVDState DVar3;
|
||||
OSThread *thread;
|
||||
OSThread* thread;
|
||||
s32 enable;
|
||||
/* sManager */ lbl_80451550->clearIndex();
|
||||
mDoDvdErr_ThdCleanup();
|
||||
@@ -38,7 +38,7 @@ void mDoRst::reset(s32 p1, u32 p2, s32 p3) {
|
||||
if ((s32)DVDGetDriveStatus() == (s32)DVD_STATE_BUSY) {
|
||||
OSAttention(lbl_80374198);
|
||||
}
|
||||
JASTaskThread *task_thread = JASDvd_NS_getThreadPointer();
|
||||
JASTaskThread* task_thread = JASDvd_NS_getThreadPointer();
|
||||
if (task_thread != NULL) {
|
||||
JASTaskThread_NS_pause(task_thread, true);
|
||||
thread = task_thread->thread;
|
||||
@@ -64,7 +64,7 @@ void mDoRst::reset(s32 p1, u32 p2, s32 p3) {
|
||||
GXDrawDone();
|
||||
|
||||
OSRestoreInterrupts(enable);
|
||||
|
||||
|
||||
destroyVideo();
|
||||
|
||||
// nb: probably fake match (i am not sure that it's actually attached to this label lol)
|
||||
@@ -75,7 +75,8 @@ void mDoRst::reset(s32 p1, u32 p2, s32 p3) {
|
||||
my_OSCancelAlarmAll();
|
||||
LCDisable();
|
||||
// probably false match; check out 80015728 or thereabouts in Ghidra
|
||||
OSSetSaveRegion(/* mResetData */ m_Do_Reset_NS_mDoRst_NS_mResetData, (u8*)(&getResetData__6mDoRstFv) + 0x18);
|
||||
OSSetSaveRegion(/* mResetData */ m_Do_Reset_NS_mDoRst_NS_mResetData,
|
||||
(u8*)(&getResetData__6mDoRstFv) + 0x18);
|
||||
OSResetSystem(p1, p2, p3);
|
||||
do {
|
||||
VIWaitForRetrace();
|
||||
|
||||
+17
-11
@@ -1,11 +1,12 @@
|
||||
#include "m_Do/m_Do_main/m_Do_main.h"
|
||||
#include "m_Do/m_Do_reset/m_Do_reset.h"
|
||||
#include "d/d_com/d_com_inf_game/d_com_inf_game.h"
|
||||
#include "dvd/dvd.h"
|
||||
#include "global.h"
|
||||
#include "m_Do/m_Do_reset/m_Do_reset.h"
|
||||
|
||||
void version_check(void) {
|
||||
if ((!strcmp((char*)lbl_803739A0, (char*)lbl_803739A0)) && (!strcmp(((char*)lbl_803739A0 + 0xA), ((char*)lbl_803739A0 + 0xA)))) {
|
||||
if ((!strcmp((char*)lbl_803739A0, (char*)lbl_803739A0)) &&
|
||||
(!strcmp(((char*)lbl_803739A0 + 0xA), ((char*)lbl_803739A0 + 0xA)))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -40,7 +41,8 @@ void CheckHeap(u32 param_1) {
|
||||
|
||||
unk = 0;
|
||||
|
||||
if ((((lbl_803DD2E8 + 0x30)[param_1 * 0x10] & 0xffffffef) == 0x60) && (((lbl_803DD2E8 + 0x30)[param_1 * 0x10] & 0x10) != 0)) {
|
||||
if ((((lbl_803DD2E8 + 0x30)[param_1 * 0x10] & 0xffffffef) == 0x60) &&
|
||||
(((lbl_803DD2E8 + 0x30)[param_1 * 0x10] & 0x10) != 0)) {
|
||||
unk = 1;
|
||||
}
|
||||
|
||||
@@ -63,8 +65,7 @@ asm void CheckHeap(u32 param_1) {
|
||||
}
|
||||
#endif
|
||||
|
||||
asm int countUsed(JKRExpHeap* heap){
|
||||
nofralloc
|
||||
asm int countUsed(JKRExpHeap* heap){nofralloc
|
||||
#include "m_Do/m_Do_main/asm/func_80005848.s"
|
||||
}
|
||||
|
||||
@@ -88,11 +89,14 @@ void HeapCheck::heapDisplay(void) const {
|
||||
JUTReport__FiiPCce(0x64, 0xfd, lbl_803739A0 + 0x71, heap_total_free_size - heap_size2);
|
||||
JUTReport__FiiPCce(0x64, 0x10a, lbl_803739A0 + 0x87, heap_free_size - heap_size2);
|
||||
JUTReport__FiiPCce(0x64, 0x117, lbl_803739A0 + 0x9D, heap_total_used_size);
|
||||
JUTReport__FiiPCce(0x64, 0x124, lbl_803739A0 + 0xB3, (int)(heap_total_used_size * 0x64) / (int)this->heap_size);
|
||||
JUTReport__FiiPCce(0x64, 0x124, lbl_803739A0 + 0xB3,
|
||||
(int)(heap_total_used_size * 0x64) / (int)this->heap_size);
|
||||
JUTReport__FiiPCce(0x64, 0x131, lbl_803739A0 + 0xCF, this->max_total_used_size);
|
||||
JUTReport__FiiPCce(0x64, 0x13e, lbl_803739A0 + 0xE5, (this->max_total_used_size * 0x64) / (int)this->heap_size);
|
||||
JUTReport__FiiPCce(0x64, 0x13e, lbl_803739A0 + 0xE5,
|
||||
(this->max_total_used_size * 0x64) / (int)this->heap_size);
|
||||
JUTReport__FiiPCce(0x64, 0x14b, lbl_803739A0 + 0x101, this->max_total_free_size - heap_size2);
|
||||
JUTReport__FiiPCce(0x64, 0x158, lbl_803739A0 + 0x117, ((this->max_total_free_size - heap_size2) * 0x64) / (int)this->heap_size);
|
||||
JUTReport__FiiPCce(0x64, 0x158, lbl_803739A0 + 0x117,
|
||||
((this->max_total_free_size - heap_size2) * 0x64) / (int)this->heap_size);
|
||||
heap_size2 = countUsed(this->heap);
|
||||
JUTReport__FiiPCce(0x64, 0x165, lbl_803739A0 + 0x133, heap_size2);
|
||||
}
|
||||
@@ -142,13 +146,15 @@ void debug(void) {
|
||||
CheckHeap(0x2);
|
||||
}
|
||||
|
||||
if (((m_gamePad.buttons.button_flags & 0xffffffef) == 0x20) && (m_gamePad.buttons.field_0x4 & 0x10)) {
|
||||
//if (1) {
|
||||
if (((m_gamePad.buttons.button_flags & 0xffffffef) == 0x20) &&
|
||||
(m_gamePad.buttons.field_0x4 & 0x10)) {
|
||||
// if (1) {
|
||||
DAT_80450b18 = DAT_80450b18 ^ 0x1;
|
||||
}
|
||||
|
||||
if (DAT_80450b18) {
|
||||
if (((m_gamePad.buttons.button_flags & 0xffffffef) == 0x40) && (m_gamePad.buttons.field_0x4 & 0x10)) {
|
||||
if (((m_gamePad.buttons.button_flags & 0xffffffef) == 0x40) &&
|
||||
(m_gamePad.buttons.field_0x4 & 0x10)) {
|
||||
if (DAT_80450588 < 0x5) {
|
||||
DAT_80450588 = DAT_80450588 + 0x1;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user