mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-24 14:09:51 +00:00
some small NameObj functions
This commit is contained in:
parent
6057eb30e6
commit
200a9b63dc
3
check.py
3
check.py
@ -372,7 +372,8 @@ def check_symbol(function_library, mangled_symbol, obj_name, readonly):
|
||||
#print_instruction_comparison_warning(f"Skipping branch instruction at line {line_string}.", original_instruction, custom_instruction)
|
||||
warning_count += 1
|
||||
else:
|
||||
print_instruction_comparison_error(f"Instruction mismatch on line {line_string}.", original_instruction, custom_instruction)
|
||||
print(f"{Fore.RED}{str(original_instruction):<80}{custom_instruction}{Style.RESET_ALL}")
|
||||
#print_instruction_comparison_error(f"Instruction mismatch on line {line_string}.", original_instruction, custom_instruction)
|
||||
error_count += 1
|
||||
elif original_instruction.id == PPC_INS_ADDI and custom_instruction.id == PPC_INS_LI:
|
||||
assert(len(original_operands) == 3 and len(custom_operands) == 2)
|
||||
|
@ -29,11 +29,11 @@ calcViewAndEntry__7NameObjFv,NameObj.o,NameObj.a,true
|
||||
initWithoutIter__7NameObjFv,NameObj.o,NameObj.a,true
|
||||
setName__7NameObjFPCc,NameObj.o,NameObj.a,true
|
||||
executeMovement__7NameObjFv,NameObj.o,NameObj.a,true
|
||||
requestSuspend__7NameObjFv,NameObj.o,NameObj.a,false
|
||||
requestResume__7NameObjFv,NameObj.o,NameObj.a,false
|
||||
requestSuspend__7NameObjFv,NameObj.o,NameObj.a,true
|
||||
requestResume__7NameObjFv,NameObj.o,NameObj.a,true
|
||||
syncWithFlags__7NameObjFv,NameObj.o,NameObj.a,false
|
||||
requestMovementOn__15NameObjFunctionFP7NameObj,NameObj.o,NameObj.a,false
|
||||
requestMovementOff__15NameObjFunctionFP7NameObj,NameObj.o,NameObj.a,false
|
||||
requestMovementOn__15NameObjFunctionFP7NameObj,NameObj.o,NameObj.a,true
|
||||
requestMovementOff__15NameObjFunctionFP7NameObj,NameObj.o,NameObj.a,true
|
||||
__ct__14NameObjAdaptorFPCc,NameObjAdaptor.o,NameObj.a,true
|
||||
__dt__14NameObjAdaptorFv,NameObjAdaptor.o,NameObj.a,true
|
||||
movement__14NameObjAdaptorFv,NameObjAdaptor.o,NameObj.a,true
|
||||
@ -56,11 +56,11 @@ add__19NameObjCategoryListFP7NameObji,NameObjCategoryList.o,NameObj.a,true
|
||||
remove__19NameObjCategoryListFP7NameObji,NameObjCategoryList.o,NameObj.a,false
|
||||
registerExecuteBeforeFunction__19NameObjCategoryListFRCQ22MR11FunctorBasei,NameObjCategoryList.o,NameObj.a,true
|
||||
initTable__19NameObjCategoryListFUlPC24CategoryListInitialTable,NameObjCategoryList.o,NameObj.a,true
|
||||
__ct__Q219NameObjCategoryList12CategoryInfoFv,NameObjCategoryList.o,NameObj.a,false
|
||||
__ct__Q219NameObjCategoryList12CategoryInfoFv,NameObjCategoryList.o,NameObj.a,true
|
||||
__dt__Q219NameObjCategoryList12CategoryInfoFv,NameObjCategoryList.o,NameObj.a,false
|
||||
__cl__Q233@unnamed@NameObjCategoryList_cpp@40NameObjRealDelegator<M7NameObjFPCvPCv_v>FP7NameObj,NameObjCategoryList.o,NameObj.a,false
|
||||
__cl__Q233@unnamed@NameObjCategoryList_cpp@40NameObjRealDelegator<M7NameObjFPCvPCv_v>FP7NameObj,NameObjCategoryList.o,NameObj.a,true
|
||||
__cl__Q233@unnamed@NameObjCategoryList_cpp@39NameObjRealDelegator<M7NameObjFPCvPv_v>FP7NameObj,NameObjCategoryList.o,NameObj.a,true
|
||||
__dt__Q22MR54AssignableArray<Q219NameObjCategoryList12CategoryInfo>Fv,NameObjCategoryList.o,NameObj.a,false
|
||||
__dt__Q22MR54AssignableArray<Q219NameObjCategoryList12CategoryInfo>Fv,NameObjCategoryList.o,NameObj.a,true
|
||||
__ct__18NameObjExecuteInfoFv,NameObjExecuteHolder.o,NameObj.a,true
|
||||
setConnectInfo__18NameObjExecuteInfoFP7NameObjiiii,NameObjExecuteHolder.o,NameObj.a,true
|
||||
initConnectting__18NameObjExecuteInfoFv,NameObjExecuteHolder.o,NameObj.a,true
|
||||
|
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "decompiled",
|
||||
"message": "4.63524175758314%",
|
||||
"message": "4.643265220896579%",
|
||||
"color": "blue"
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
| [LiveActor](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor.md) | 35.83679114799447% |
|
||||
| [Map](https://github.com/shibbo/Petari/blob/master/docs/lib/Map.md) | 9.108127680909142% |
|
||||
| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 3.201281344579767% |
|
||||
| [NameObj](https://github.com/shibbo/Petari/blob/master/docs/lib/NameObj.md) | 18.945379594641018% |
|
||||
| [NameObj](https://github.com/shibbo/Petari/blob/master/docs/lib/NameObj.md) | 19.658193060803846% |
|
||||
| [NPC](https://github.com/shibbo/Petari/blob/master/docs/lib/NPC.md) | 0.35402906208718626% |
|
||||
| [Player](https://github.com/shibbo/Petari/blob/master/docs/lib/Player.md) | 0.14184156212575486% |
|
||||
| [RhythmLib](https://github.com/shibbo/Petari/blob/master/docs/lib/RhythmLib.md) | 0.0% |
|
||||
|
@ -3,10 +3,10 @@
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| ModelChangableObjFactory.o | 0.0% | 0 / 13 | 0.0% |
|
||||
| MovementOnOffGroupHolder.o | 100.0% | 6 / 6 | 100.0% |
|
||||
| NameObj.o | 55.46875% | 11 / 16 | 68.75% |
|
||||
| NameObj.o | 86.71875% | 15 / 16 | 93.75% |
|
||||
| NameObjAdaptor.o | 100.0% | 9 / 9 | 100.0% |
|
||||
| NameObjArchiveListCollector.o | 100.0% | 3 / 3 | 100.0% |
|
||||
| NameObjCategoryList.o | 76.39593908629442% | 10 / 15 | 66.66666666666666% |
|
||||
| NameObjCategoryList.o | 87.30964467005076% | 13 / 15 | 86.66666666666667% |
|
||||
| NameObjExecuteHolder.o | 94.73684210526315% | 44 / 49 | 89.79591836734694% |
|
||||
| NameObjFactory.o | 3.7077907746634295% | 20 / 568 | 3.5211267605633805% |
|
||||
| NameObjFinder.o | 0.0% | 0 / 1 | 0.0% |
|
||||
@ -59,11 +59,11 @@
|
||||
| initWithoutIter__7NameObjFv | :white_check_mark: |
|
||||
| setName__7NameObjFPCc | :white_check_mark: |
|
||||
| executeMovement__7NameObjFv | :white_check_mark: |
|
||||
| requestSuspend__7NameObjFv | :x: |
|
||||
| requestResume__7NameObjFv | :x: |
|
||||
| requestSuspend__7NameObjFv | :white_check_mark: |
|
||||
| requestResume__7NameObjFv | :white_check_mark: |
|
||||
| syncWithFlags__7NameObjFv | :x: |
|
||||
| requestMovementOn__15NameObjFunctionFP7NameObj | :x: |
|
||||
| requestMovementOff__15NameObjFunctionFP7NameObj | :x: |
|
||||
| requestMovementOn__15NameObjFunctionFP7NameObj | :white_check_mark: |
|
||||
| requestMovementOff__15NameObjFunctionFP7NameObj | :white_check_mark: |
|
||||
|
||||
|
||||
# NameObjAdaptor.o
|
||||
@ -101,11 +101,11 @@
|
||||
| remove__19NameObjCategoryListFP7NameObji | :x: |
|
||||
| registerExecuteBeforeFunction__19NameObjCategoryListFRCQ22MR11FunctorBasei | :white_check_mark: |
|
||||
| initTable__19NameObjCategoryListFUlPC24CategoryListInitialTable | :white_check_mark: |
|
||||
| __ct__Q219NameObjCategoryList12CategoryInfoFv | :x: |
|
||||
| __ct__Q219NameObjCategoryList12CategoryInfoFv | :white_check_mark: |
|
||||
| __dt__Q219NameObjCategoryList12CategoryInfoFv | :x: |
|
||||
| __cl__Q233@unnamed@NameObjCategoryList_cpp@40NameObjRealDelegator<M7NameObjFPCvPCv_v>FP7NameObj | :x: |
|
||||
| __cl__Q233@unnamed@NameObjCategoryList_cpp@40NameObjRealDelegator<M7NameObjFPCvPCv_v>FP7NameObj | :white_check_mark: |
|
||||
| __cl__Q233@unnamed@NameObjCategoryList_cpp@39NameObjRealDelegator<M7NameObjFPCvPv_v>FP7NameObj | :white_check_mark: |
|
||||
| __dt__Q22MR54AssignableArray<Q219NameObjCategoryList12CategoryInfo>Fv | :x: |
|
||||
| __dt__Q22MR54AssignableArray<Q219NameObjCategoryList12CategoryInfo>Fv | :white_check_mark: |
|
||||
|
||||
|
||||
# NameObjExecuteHolder.o
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include <revolution.h>
|
||||
|
||||
namespace MR {
|
||||
void notifyRequestNameObjMovementOnOff();
|
||||
}
|
||||
|
||||
class NameObj {
|
||||
public:
|
||||
NameObj(const char *);
|
||||
@ -24,6 +28,12 @@ public:
|
||||
void syncWithFlags();
|
||||
|
||||
const char* mName; // _4
|
||||
u16 mFlags; // _8
|
||||
volatile u16 mFlags; // _8
|
||||
s16 _A;
|
||||
};
|
||||
|
||||
class NameObjFunction {
|
||||
public:
|
||||
static void requestMovementOn(NameObj *);
|
||||
static void requestMovementOff(NameObj *);
|
||||
};
|
@ -1,6 +1,7 @@
|
||||
#include "Game/NameObj/NameObj.h"
|
||||
#include "Game/NameObj/NameObjRegister.h"
|
||||
#include "Game/SingletonHolder.h"
|
||||
#include "Game/Util.h"
|
||||
|
||||
NameObj::NameObj(const char *pName) {
|
||||
mName = pName;
|
||||
@ -54,18 +55,46 @@ void NameObj::executeMovement() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// mFlags does not get reloaded in the block
|
||||
void NameObj::requestSuspend() {
|
||||
if ((mFlags & 0x4) == 0x4) {
|
||||
mFlags &= 0xFFFFFFFB;
|
||||
u16 flag = (mFlags & 0x4);
|
||||
if (flag == 0x4) {
|
||||
mFlags &= ~0x4;
|
||||
}
|
||||
mFlags |= 2;
|
||||
}
|
||||
|
||||
void NameObj::requestResume() {
|
||||
u16 flag = (mFlags & 0x2);
|
||||
if (flag == 0x2) {
|
||||
mFlags &= ~0x2;
|
||||
}
|
||||
mFlags |= 4;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void NameObj::syncWithFlags() {
|
||||
u16 flag = (mFlags & 0x2);
|
||||
if (flag == 0x2) {
|
||||
flag = mFlags;
|
||||
flag &= (~0x2);
|
||||
flag |= 0x1;
|
||||
mFlags = flag;
|
||||
}
|
||||
|
||||
mFlags |= 2;
|
||||
flag = (mFlags & 0x4);
|
||||
if (flag == 0x4) {
|
||||
mFlags = (mFlags & 0xFFFFFFFA);
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// same issues will persist with these, decomp when requestSuspend matches
|
||||
void NameObjFunction::requestMovementOn(NameObj *pObj) {
|
||||
pObj->requestResume();
|
||||
MR::notifyRequestNameObjMovementOnOff();
|
||||
}
|
||||
|
||||
// NameObj::requestResume
|
||||
// NameObj::syncWithFlags
|
||||
void NameObjFunction::requestMovementOff(NameObj *pObj) {
|
||||
pObj->requestSuspend();
|
||||
MR::notifyRequestNameObjMovementOnOff();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user