AstroMapObjFunction progress

This commit is contained in:
shibbo 2022-10-31 20:30:00 -04:00
parent bbcd67913a
commit f31dade51a
21 changed files with 350 additions and 49 deletions

View File

@ -235,7 +235,7 @@ def check_symbol(function_library, mangled_symbol, obj_name, readonly):
symtab = elf_file.get_section_by_name('.symtab')
if symtab.get_symbol_by_name(mangled_symbol) is None:
print("Could not find symbol in object file. This may be caused by the code not being compiled, the function being in the wrong C++ source file or the function signature being wrong.")
print(f"Could not find symbol in object file. This may be caused by the code not being compiled, the function being in the wrong C++ source file or the function signature being wrong. File: {obj_files}")
return False
compiled_symbol = symtab.get_symbol_by_name(mangled_symbol)[0]

View File

@ -465,16 +465,16 @@ initCaseNoUseSwitchB__11AstroMapObjFRC19MapObjActorInitInfo,AstroMapObj.o,MapObj
initCaseUseSwitchB__11AstroMapObjFRC19MapObjActorInitInfo,AstroMapObj.o,MapObj.a,false
initCaseNoUseSwitchA__11AstroMapObjFRC19MapObjActorInitInfo,AstroMapObj.o,MapObj.a,false
initCaseUseSwitchA__11AstroMapObjFRC19MapObjActorInitInfo,AstroMapObj.o,MapObj.a,false
getNumGrandStarForRevival__33@unnamed@AstroMapObjFunction_cpp@FPCcl,AstroMapObjFunction.o,MapObj.a,false
getNumGrandStarForOpen__33@unnamed@AstroMapObjFunction_cpp@FPCcl,AstroMapObjFunction.o,MapObj.a,false
makeArchiveListFromArg0__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter,AstroMapObjFunction.o,MapObj.a,false
makeArchiveListAstroNamePlate__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter,AstroMapObjFunction.o,MapObj.a,false
isAlreadyRevival__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,false
isEnableRevival__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,false
isAlreadyOpen__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,false
isEnableOpen__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,false
getDomeIdFromArg0__19AstroMapObjFunctionFRC12JMapInfoIter,AstroMapObjFunction.o,MapObj.a,false
getModelName__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,false
getNumGrandStarForRevival__33@unnamed@AstroMapObjFunction_cpp@FPCcl,AstroMapObjFunction.o,MapObj.a,true
getNumGrandStarForOpen__33@unnamed@AstroMapObjFunction_cpp@FPCcl,AstroMapObjFunction.o,MapObj.a,true
makeArchiveListFromArg0__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter,AstroMapObjFunction.o,MapObj.a,true
makeArchiveListAstroNamePlate__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter,AstroMapObjFunction.o,MapObj.a,true
isAlreadyRevival__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,true
isEnableRevival__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,true
isAlreadyOpen__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,true
isEnableOpen__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,true
getDomeIdFromArg0__19AstroMapObjFunctionFRC12JMapInfoIter,AstroMapObjFunction.o,MapObj.a,true
getModelName__19AstroMapObjFunctionFPCcl,AstroMapObjFunction.o,MapObj.a,true
createAstroNamePlateParser__19AstroMapObjFunctionFv,AstroMapObjFunction.o,MapObj.a,false
trySetAndShowNamePlate__19AstroMapObjFunctionFP15GalaxyNamePlatePC8JMapInfoRCQ29JGeometry8TVec3<f>PCclb,AstroMapObjFunction.o,MapObj.a,false
tryRegisterMultiDemoAndFunction__19AstroMapObjFunctionFPCcP9LiveActorRC12JMapInfoIterRCQ22MR11FunctorBase,AstroMapObjFunction.o,MapObj.a,false

1 Symbol Name Object File Library Archive Matching
465 initCaseUseSwitchB__11AstroMapObjFRC19MapObjActorInitInfo AstroMapObj.o MapObj.a false
466 initCaseNoUseSwitchA__11AstroMapObjFRC19MapObjActorInitInfo AstroMapObj.o MapObj.a false
467 initCaseUseSwitchA__11AstroMapObjFRC19MapObjActorInitInfo AstroMapObj.o MapObj.a false
468 getNumGrandStarForRevival__33@unnamed@AstroMapObjFunction_cpp@FPCcl AstroMapObjFunction.o MapObj.a false true
469 getNumGrandStarForOpen__33@unnamed@AstroMapObjFunction_cpp@FPCcl AstroMapObjFunction.o MapObj.a false true
470 makeArchiveListFromArg0__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter AstroMapObjFunction.o MapObj.a false true
471 makeArchiveListAstroNamePlate__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter AstroMapObjFunction.o MapObj.a false true
472 isAlreadyRevival__19AstroMapObjFunctionFPCcl AstroMapObjFunction.o MapObj.a false true
473 isEnableRevival__19AstroMapObjFunctionFPCcl AstroMapObjFunction.o MapObj.a false true
474 isAlreadyOpen__19AstroMapObjFunctionFPCcl AstroMapObjFunction.o MapObj.a false true
475 isEnableOpen__19AstroMapObjFunctionFPCcl AstroMapObjFunction.o MapObj.a false true
476 getDomeIdFromArg0__19AstroMapObjFunctionFRC12JMapInfoIter AstroMapObjFunction.o MapObj.a false true
477 getModelName__19AstroMapObjFunctionFPCcl AstroMapObjFunction.o MapObj.a false true
478 createAstroNamePlateParser__19AstroMapObjFunctionFv AstroMapObjFunction.o MapObj.a false
479 trySetAndShowNamePlate__19AstroMapObjFunctionFP15GalaxyNamePlatePC8JMapInfoRCQ29JGeometry8TVec3<f>PCclb AstroMapObjFunction.o MapObj.a false
480 tryRegisterMultiDemoAndFunction__19AstroMapObjFunctionFPCcP9LiveActorRC12JMapInfoIterRCQ22MR11FunctorBase AstroMapObjFunction.o MapObj.a false

View File

@ -927,13 +927,13 @@ execute__Q228@unnamed@GalaxyMapTitle_cpp@18GalaxyMapTitleHideCFP5Spine,GalaxyMap
__ct__15GalaxyNamePlateFPCcb,GalaxyNamePlate.o,Screen.a,false
init__15GalaxyNamePlateFRC12JMapInfoIter,GalaxyNamePlate.o,Screen.a,false
kill__15GalaxyNamePlateFv,GalaxyNamePlate.o,Screen.a,false
showUnknown__15GalaxyNamePlateFb,GalaxyNamePlate.o,Screen.a,false
showNew__15GalaxyNamePlateFb,GalaxyNamePlate.o,Screen.a,false
showOpen__15GalaxyNamePlateFb,GalaxyNamePlate.o,Screen.a,false
show__15GalaxyNamePlateFPCwb,GalaxyNamePlate.o,Screen.a,false
showUnknown__15GalaxyNamePlateFb,GalaxyNamePlate.o,Screen.a,true
showNew__15GalaxyNamePlateFb,GalaxyNamePlate.o,Screen.a,true
showOpen__15GalaxyNamePlateFb,GalaxyNamePlate.o,Screen.a,true
show__15GalaxyNamePlateFPCwb,GalaxyNamePlate.o,Screen.a,true
setPos3D__15GalaxyNamePlateFRCQ29JGeometry8TVec3<f>,GalaxyNamePlate.o,Screen.a,false
setShowBalloonNozzle__15GalaxyNamePlateFb,GalaxyNamePlate.o,Screen.a,false
control__15GalaxyNamePlateFv,GalaxyNamePlate.o,Screen.a,false
setShowBalloonNozzle__15GalaxyNamePlateFb,GalaxyNamePlate.o,Screen.a,true
control__15GalaxyNamePlateFv,GalaxyNamePlate.o,Screen.a,true
show__15GalaxyNamePlateFPCwlbb,GalaxyNamePlate.o,Screen.a,false
exeAppearReady__15GalaxyNamePlateFv,GalaxyNamePlate.o,Screen.a,false
exeAppear__15GalaxyNamePlateFv,GalaxyNamePlate.o,Screen.a,false

1 Symbol Name Object File Library Archive Matching
927 __ct__15GalaxyNamePlateFPCcb GalaxyNamePlate.o Screen.a false
928 init__15GalaxyNamePlateFRC12JMapInfoIter GalaxyNamePlate.o Screen.a false
929 kill__15GalaxyNamePlateFv GalaxyNamePlate.o Screen.a false
930 showUnknown__15GalaxyNamePlateFb GalaxyNamePlate.o Screen.a false true
931 showNew__15GalaxyNamePlateFb GalaxyNamePlate.o Screen.a false true
932 showOpen__15GalaxyNamePlateFb GalaxyNamePlate.o Screen.a false true
933 show__15GalaxyNamePlateFPCwb GalaxyNamePlate.o Screen.a false true
934 setPos3D__15GalaxyNamePlateFRCQ29JGeometry8TVec3<f> GalaxyNamePlate.o Screen.a false
935 setShowBalloonNozzle__15GalaxyNamePlateFb GalaxyNamePlate.o Screen.a false true
936 control__15GalaxyNamePlateFv GalaxyNamePlate.o Screen.a false true
937 show__15GalaxyNamePlateFPCwlbb GalaxyNamePlate.o Screen.a false
938 exeAppearReady__15GalaxyNamePlateFv GalaxyNamePlate.o Screen.a false
939 exeAppear__15GalaxyNamePlateFv GalaxyNamePlate.o Screen.a false

View File

@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "Game",
"message": "9.30648392682621%",
"message": "9.351856194798271%",
"color": "blue"
}

View File

@ -12,7 +12,7 @@
| [Gravity](https://github.com/shibbo/Petari/blob/master/docs/lib/Gravity.md) | 56.286937028734464% |
| [LiveActor](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor.md) | 38.87044721069618% |
| [Map](https://github.com/shibbo/Petari/blob/master/docs/lib/Map.md) | 13.156184427979872% |
| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 21.44640089860529% |
| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 21.65441138233367% |
| [NameObj](https://github.com/shibbo/Petari/blob/master/docs/lib/NameObj.md) | 27.009618687736175% |
| [NPC](https://github.com/shibbo/Petari/blob/master/docs/lib/NPC.md) | 0.7591369440774989% |
| [NWC24](https://github.com/shibbo/Petari/blob/master/docs/lib/NWC24.md) | 0.0% |
@ -20,7 +20,7 @@
| [RhythmLib](https://github.com/shibbo/Petari/blob/master/docs/lib/RhythmLib.md) | 0.0% |
| [Ride](https://github.com/shibbo/Petari/blob/master/docs/lib/Ride.md) | 0.0% |
| [Scene](https://github.com/shibbo/Petari/blob/master/docs/lib/Scene.md) | 7.59493670886076% |
| [Screen](https://github.com/shibbo/Petari/blob/master/docs/lib/Screen.md) | 2.911542934803915% |
| [Screen](https://github.com/shibbo/Petari/blob/master/docs/lib/Screen.md) | 3.008245886857546% |
| [Speaker](https://github.com/shibbo/Petari/blob/master/docs/lib/Speaker.md) | 49.743881616391576% |
| [System](https://github.com/shibbo/Petari/blob/master/docs/lib/System.md) | 7.724349605378544% |
| [Util](https://github.com/shibbo/Petari/blob/master/docs/lib/Util.md) | 9.661178747499052% |

View File

@ -29,7 +29,7 @@
| AstroDomeSky.o | 0.0% | 0 / 31 | 0.0% | :x:
| AstroMapBoard.o | 0.0% | 0 / 8 | 0.0% | :x:
| AstroMapObj.o | 4.513540621865597% | 2 / 40 | 5.0% | :eight_pointed_black_star:
| AstroMapObjFunction.o | 0.0% | 0 / 14 | 0.0% | :x:
| AstroMapObjFunction.o | 59.08419497784343% | 10 / 14 | 71.42857142857143% | :eight_pointed_black_star:
| AstroOverlookObj.o | 100.0% | 3 / 3 | 100.0% | :white_check_mark:
| BallOpener.o | 0.0% | 0 / 17 | 0.0% | :x:
| BallRail.o | 0.0% | 0 / 19 | 0.0% | :x:
@ -901,16 +901,16 @@
# AstroMapObjFunction.o
| Symbol | Decompiled? |
| ------------- | ------------- |
| getNumGrandStarForRevival__33@unnamed@AstroMapObjFunction_cpp@FPCcl | :x: |
| getNumGrandStarForOpen__33@unnamed@AstroMapObjFunction_cpp@FPCcl | :x: |
| makeArchiveListFromArg0__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter | :x: |
| makeArchiveListAstroNamePlate__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter | :x: |
| isAlreadyRevival__19AstroMapObjFunctionFPCcl | :x: |
| isEnableRevival__19AstroMapObjFunctionFPCcl | :x: |
| isAlreadyOpen__19AstroMapObjFunctionFPCcl | :x: |
| isEnableOpen__19AstroMapObjFunctionFPCcl | :x: |
| getDomeIdFromArg0__19AstroMapObjFunctionFRC12JMapInfoIter | :x: |
| getModelName__19AstroMapObjFunctionFPCcl | :x: |
| getNumGrandStarForRevival__33@unnamed@AstroMapObjFunction_cpp@FPCcl | :white_check_mark: |
| getNumGrandStarForOpen__33@unnamed@AstroMapObjFunction_cpp@FPCcl | :white_check_mark: |
| makeArchiveListFromArg0__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter | :white_check_mark: |
| makeArchiveListAstroNamePlate__19AstroMapObjFunctionFP27NameObjArchiveListCollectorRC12JMapInfoIter | :white_check_mark: |
| isAlreadyRevival__19AstroMapObjFunctionFPCcl | :white_check_mark: |
| isEnableRevival__19AstroMapObjFunctionFPCcl | :white_check_mark: |
| isAlreadyOpen__19AstroMapObjFunctionFPCcl | :white_check_mark: |
| isEnableOpen__19AstroMapObjFunctionFPCcl | :white_check_mark: |
| getDomeIdFromArg0__19AstroMapObjFunctionFRC12JMapInfoIter | :white_check_mark: |
| getModelName__19AstroMapObjFunctionFPCcl | :white_check_mark: |
| createAstroNamePlateParser__19AstroMapObjFunctionFv | :x: |
| trySetAndShowNamePlate__19AstroMapObjFunctionFP15GalaxyNamePlatePC8JMapInfoRCQ29JGeometry8TVec3&lt;f&gt;PCclb | :x: |
| tryRegisterMultiDemoAndFunction__19AstroMapObjFunctionFPCcP9LiveActorRC12JMapInfoIterRCQ22MR11FunctorBase | :x: |

View File

@ -50,7 +50,7 @@
| GalaxyMapSelectButton.o | 0.0% | 0 / 31 | 0.0% | :x:
| GalaxyMapTicoIcon.o | 0.0% | 0 / 9 | 0.0% | :x:
| GalaxyMapTitle.o | 0.0% | 0 / 24 | 0.0% | :x:
| GalaxyNamePlate.o | 0.0% | 0 / 22 | 0.0% | :x:
| GalaxyNamePlate.o | 16.591928251121075% | 6 / 22 | 27.27272727272727% | :eight_pointed_black_star:
| GalaxyNamePlateDrawer.o | 0.0% | 0 / 10 | 0.0% | :x:
| GalaxySelectBackButton.o | 0.0% | 0 / 20 | 0.0% | :x:
| GalaxySelectInfo.o | 0.0% | 0 / 17 | 0.0% | :x:
@ -1288,13 +1288,13 @@
| __ct__15GalaxyNamePlateFPCcb | :x: |
| init__15GalaxyNamePlateFRC12JMapInfoIter | :x: |
| kill__15GalaxyNamePlateFv | :x: |
| showUnknown__15GalaxyNamePlateFb | :x: |
| showNew__15GalaxyNamePlateFb | :x: |
| showOpen__15GalaxyNamePlateFb | :x: |
| show__15GalaxyNamePlateFPCwb | :x: |
| showUnknown__15GalaxyNamePlateFb | :white_check_mark: |
| showNew__15GalaxyNamePlateFb | :white_check_mark: |
| showOpen__15GalaxyNamePlateFb | :white_check_mark: |
| show__15GalaxyNamePlateFPCwb | :white_check_mark: |
| setPos3D__15GalaxyNamePlateFRCQ29JGeometry8TVec3&lt;f&gt; | :x: |
| setShowBalloonNozzle__15GalaxyNamePlateFb | :x: |
| control__15GalaxyNamePlateFv | :x: |
| setShowBalloonNozzle__15GalaxyNamePlateFb | :white_check_mark: |
| control__15GalaxyNamePlateFv | :white_check_mark: |
| show__15GalaxyNamePlateFPCwlbb | :x: |
| exeAppearReady__15GalaxyNamePlateFv | :x: |
| exeAppear__15GalaxyNamePlateFv | :x: |

View File

@ -0,0 +1,23 @@
#pragma once
#include "Game/LiveActor/LiveActor.h"
#include <revolution.h>
namespace {
const char* cGrandStarReturnDemoTable[6] = {
"グランドスター1帰還",
"グランドスター2帰還",
"グランドスター3帰還",
"グランドスター4帰還",
"グランドスター5帰還",
"グランドスター6帰還"
};
};
class AstroDemoFunction {
public:
static s32 getOpenedAstroDomeNum();
static const char* getGrandStarReturnDemoName(int);
static s32 getActiveGrandStarReturnDemoIndex();
static bool tryRegisterDemo(LiveActor *, const char *, const JMapInfoIter &);
};

View File

@ -0,0 +1,68 @@
#pragma once
#include "Game/NameObj/NameObj.h"
#include "Game/NameObj/NameObjArchiveListCollector.h"
class GalaxyNamePlate;
class LiveActor;
namespace {
s32 getNumGrandStarForRevival(const char *, s32) NO_INLINE;
s32 getNumGrandStarForOpen(const char *, s32) NO_INLINE;
const char* cAstroDomeNameTable[6] = {
"AstroDomeObservatory",
"AstroDomeWell",
"AstroDomeKitchen",
"AstroDomeBedRoom",
"AstroDomeMachine",
"AstroDomeTower"
};
const char* cAstroDomeSkyNameTable[6] = {
"AstroDomeSkyA",
"AstroDomeSkyB",
"AstroDomeSkyC",
"AstroDomeSkyA",
"AstroDomeSkyB",
"AstroDomeSkyC"
};
const char* cAstroDomeEntranceNameTable[6] = {
"AstroDomeEntranceObservatory",
"AstroDomeEntranceWell",
"AstroDomeEntranceKitchen",
"AstroDomeEntranceBedRoom",
"AstroDomeEntranceMachine",
"AstroDomeEntranceTower"
};
const char* cAstroStarPlateNameTable[6] = {
"AstroStarPlateObservatory",
"AstroStarPlateWell",
"AstroStarPlateKitchen",
"AstroStarPlateBedRoom",
"AstroStarPlateMachine",
"AstroStarPlateTower"
};
const char* cAstroNamePlateArcName = "AstroNamePlateData";
const char* cAstroNamePlateFileName = "AstroNamePlateData.bcsv";
};
class AstroMapObjFunction {
public:
static void makeArchiveListFromArg0(NameObjArchiveListCollector *, const JMapInfoIter &);
static void makeArchiveListAstroNamePlate(NameObjArchiveListCollector *, const JMapInfoIter &);
static bool isAlreadyRevival(const char *, s32);
static bool isEnableRevival(const char *, s32);
static bool isAlreadyOpen(const char *, s32);
static bool isEnableOpen(const char *, s32);
static s32 getDomeIdFromArg0(const JMapInfoIter &);
static const char* getModelName(const char *, s32);
static JMapInfo* createAstroNamePlateParser();
static bool trySetAndShowNamePlate(GalaxyNamePlate *, const JMapInfo *, const TVec3f &, const char *, s32, bool);
static bool tryRegisterMultiDemoAndFunction(const char *, LiveActor *, const JMapInfoIter &, const MR::FunctorBase &);
static void initilizePeculiar(const char *, LiveActor *, const JMapInfoIter &);
};

View File

@ -20,7 +20,7 @@ public:
void showNew(bool);
void showOpen(bool);
void show(const wchar_t *, bool);
void setPos3D(const TVec3f &);a
void setPos3D(const TVec3f &);
void setShowBalloonNozzle(bool);
void show(const wchar_t *, s32, bool, bool);
@ -28,7 +28,7 @@ public:
void exeAppear();
void exeWait();
const char* mName; // _20
const char* mGalaxyName; // _20
bool _24;
bool _25;
bool mShowBalloonNozzle; // _26

View File

@ -52,6 +52,8 @@ namespace MR {
void calcScreenPosition(TVec2f *, const TVec3f &);
bool calcScreenPosition(TVec3f *, const TVec3f &);
void declareEventCameraAnim(const ActorCameraInfo *, const char *, void *);
void initActorCamera(const LiveActor *, const JMapInfoIter &, ActorCameraInfo **);

View File

@ -9,6 +9,23 @@ namespace MR {
bool isOnGameEventFlagChildsRoom();
bool isOnGameEventFlagLibraryRoom();
bool isOnGameEventFlagRosettaTalkAboutTicoInTower();
bool isRosettaTalkTorchProgress();
bool isRosettaTalkCountDownStart();
bool isRosettaTalkAstroDomeRecover();
bool isRosettaTalkKoopa();
bool isRosettaTalkTorchLecture();
bool isKinopioExplorerCompleteTrickComet();
bool isKinopioExplorerTalkGoFinalBattle();
bool isKinopioExplorerTalkGetGrandStar6();
bool isKinopioExplorerTalkGetGrandStar5();
bool isKinopioExplorerTalkGetGrandStar4();
bool isKinopioExplorerTalkGetGrandStar3();
bool isKinopioExplorerTrickComet();
bool isKinopioExplorerTalkGetGrandStar2();
bool isUFOKinokoBeforeConstruction();
bool isOnGameEventFlagGreenDriver();
bool hasGrandStar(int);

View File

@ -1,5 +1,6 @@
#pragma once
namespace MR {
void* getGameMessageDirect(const char *);
const wchar_t* getGameMessageDirect(const char *);
const wchar_t* getGalaxyNameShortOnCurrentLanguage(const char *);
};

View File

@ -86,7 +86,7 @@ namespace MR {
void requestMovementOn(NameObj *);
void requestMovementOff(NameObj *);
const JMapInfo* createCsvParser(const char *, const char *, ...);
JMapInfo* createCsvParser(const char *, const char *, ...);
JMapInfo* tryCreateCsvParser(const ResourceHolder *, const char *, ...);
s32 getCsvDataElementNum(const JMapInfo *);

View File

@ -2,8 +2,6 @@
#include "revolution.h"
//#include "string.h"
namespace MR {
const char* getBasename(const char *);
void extractString(char *, const char *, u32, u32);

View File

@ -5,6 +5,7 @@
extern "C" {
#endif
#include <size_t.h>
#include <va_list.h>
#include <cstring>
@ -12,6 +13,8 @@ int sprintf(char *pStr, const char *pFormat, ...);
int snprintf(char *pStr, std::size_t n, const char *pFormat, ...);
int vprintf(const char *, va_list);
int snprintf(char *, std::size_t, const char *, ...);
int sscanf(const char *, const char *, ...);
#ifdef __cplusplus

View File

@ -10,7 +10,7 @@ u32 FileSelectFunc::getMiiNameBufferSize() {
void FileSelectFunc::copyMiiName(u16 *pData, const FileSelectIconID &rIcon) {
if (rIcon.isFellow()) {
u32 fellowID = rIcon.getFellowID();
void* msg = MR::getGameMessageDirect(sIconNameMessageID[fellowID]);
const wchar_t* msg = MR::getGameMessageDirect(sIconNameMessageID[fellowID]);
MR::copyMemory(pData, msg, 0x16);
}
else {

View File

@ -0,0 +1,164 @@
#include "Game/MapObj/AstroMapObjFunction.h"
#include "Game/Demo/AstroDemoFunction.h"
#include <cstdio>
namespace {
s32 getNumGrandStarForRevival(const char *pName, s32 domeId) {
const char* modelName = AstroMapObjFunction::getModelName(pName, domeId);
if ( MR::isEqualString(modelName, "AstroDomeEntranceObservatory") )
return 1;
if ( MR::isEqualString(modelName, "AstroDomeEntranceWell") )
return 1;
if ( MR::isEqualString(modelName, "AstroBaseA") )
return 1;
if ( MR::isEqualString(modelName, "AstroBaseCenterB") )
return 1;
if ( MR::isEqualString(modelName, "AstroRotateStepA") )
return 1;
if ( MR::isEqualString(modelName, "AstroDecoratePartsA") )
return 1;
if ( MR::isEqualString(modelName, "AstroDecoratePartsGearA") )
return 1;
if ( MR::isEqualString(modelName, "AstroParking") )
return 1;
if ( MR::isEqualString(modelName, "AstroDomeEntranceKitchen") )
return 3;
if ( MR::isEqualString(modelName, "AstroDomeEntranceBedRoom") )
return 3;
if ( MR::isEqualString(modelName, "AstroBaseB") )
return 3;
if ( MR::isEqualString(modelName, "AstroBaseKitchen") )
return 3;
if ( MR::isEqualString(modelName, "AstroLibrary") )
return 3;
if ( MR::isEqualString(modelName, "AstroCountDownPlate") )
return 5;
if ( MR::isEqualString(modelName, "AstroDomeEntranceMachine") )
return 5;
if ( MR::isEqualString(modelName, "AstroDomeEntranceTower") )
return 5;
if ( MR::isEqualString(modelName, "AstroBaseC") )
return 5;
if ( MR::isEqualString(modelName, "AstroBaseCenterA") )
return 5;
if ( MR::isEqualString(modelName, "AstroBaseCenterTop") )
return 5;
if ( MR::isEqualString(modelName, "AstroRotateStepB") )
return 5;
s32 res = -1;
if ( domeId != -1 )
res = domeId;
return res;
}
s32 getNumGrandStarForOpen(const char *pName, s32 domeId) {
s32 num = -1;
if (domeId != -1) {
num = domeId;
}
return num;
}
};
void AstroMapObjFunction::makeArchiveListFromArg0(NameObjArchiveListCollector *pList, const JMapInfoIter &rIter) {
s32 domeId = -1;
MR::getJMapInfoArg0NoInit(rIter, &domeId);
s32 domeIdx = domeId;
const char* objName;
MR::getObjectName(&objName, rIter);
const char* modelName = AstroMapObjFunction::getModelName(objName, domeIdx);
pList->addArchive(modelName);
if (MR::isEqualString(modelName, "AstroDomeEntrance")) {
pList->addArchive("GalaxyNamePlate");
pList->addArchive(cAstroNamePlateArcName);
}
}
void AstroMapObjFunction::makeArchiveListAstroNamePlate(NameObjArchiveListCollector *pList, const JMapInfoIter &rIter) {
pList->addArchive("GalaxyNamePlate");
pList->addArchive(cAstroNamePlateArcName);
}
bool AstroMapObjFunction::isAlreadyRevival(const char *pName, s32 domeId) {
if (MR::isEqualString(pName, "AstroChildRoom")) {
return MR::isOnGameEventFlagChildsRoom();
}
if (MR::isEqualString(pName, "TridentPlanet")) {
return MR::isOnGameEventFlagGreenDriver();
}
s32 openNum = AstroDemoFunction::getOpenedAstroDomeNum();
return openNum >= ::getNumGrandStarForRevival(pName, domeId);
}
bool AstroMapObjFunction::isEnableRevival(const char *pName, s32 domeId) {
if (MR::isEqualString(pName, "AstroChildRoom")) {
return true;
}
s32 openNum = AstroDemoFunction::getOpenedAstroDomeNum();
return ::getNumGrandStarForRevival(pName, domeId) == openNum + 1;
}
bool AstroMapObjFunction::isAlreadyOpen(const char *pName, s32 domeId) {
if (MR::isEqualString(pName, "AstroLibrary")) {
return MR::isOnGameEventFlagLibraryRoom();
}
s32 openNum = AstroDemoFunction::getOpenedAstroDomeNum();
return openNum >= ::getNumGrandStarForOpen(pName, domeId);
}
bool AstroMapObjFunction::isEnableOpen(const char *pName, s32 domeId) {
s32 openNum = AstroDemoFunction::getOpenedAstroDomeNum();
return ::getNumGrandStarForOpen(pName, domeId) == openNum + 1;
}
s32 AstroMapObjFunction::getDomeIdFromArg0(const JMapInfoIter &rIter) {
s32 domeId = -1;
MR::getJMapInfoArg0NoInit(rIter, &domeId);
return domeId;
}
const char* AstroMapObjFunction::getModelName(const char *pName, s32 domeIdx) {
const char** tbl = NULL;
if (MR::isEqualString(pName, "AstroDome")) {
tbl = cAstroDomeNameTable;
}
else if (MR::isEqualString(pName, "AstroDomeSky")) {
tbl = cAstroDomeSkyNameTable;
}
else if (MR::isEqualString(pName, "AstroDomeEntrance")) {
tbl = cAstroDomeEntranceNameTable;
}
else if (MR::isEqualString(pName, "AstroStarPlate")) {
tbl = cAstroStarPlateNameTable;
}
if (tbl != NULL) {
return tbl[domeIdx - 1];
}
else {
return pName;
}
}
#ifndef NON_MATCHING
JMapInfo* AstroMapObjFunction::createAstroNamePlateParser() {
char buf[0x40];
snprintf(buf, 0x40, "%s.arc", cAstroNamePlateArcName);
return MR::createCsvParser(buf, cAstroNamePlateFileName);
}
#endif
// AstroMapObjFunction::trySetAndShowNamePlate
// AstroMapObjFunction::tryRegisterMultiDemoAndFunction
// AstroMapObjFunction::initilizePeculiar

View File

@ -234,7 +234,7 @@ JMapInfoIter StageDataHolder::getStartJMapInfoIterFromStartDataIndex(int idx_) c
const JMapData * curData = inf->mData;
isValid = curData;
curIdx = isValid ? curData->_0 : 0;
curIdx = isValid ? curData->mNumEntries : 0;
if (idx < curIdx) {
JMapInfoIter iter;
@ -243,7 +243,7 @@ JMapInfoIter StageDataHolder::getStartJMapInfoIterFromStartDataIndex(int idx_) c
return iter;
}
curIdx = isValid ? curData->_0 : 0;
curIdx = isValid ? curData->mNumEntries : 0;
idx -= curIdx;
@ -298,7 +298,7 @@ void StageDataHolder::updateDataAddress(const MR::AssignableArray<JMapInfo> *pIn
_E4 = (u32)inf->mData;
}
u32 addr = (inf->mData->_C * inf->mData->_0) + ((s32)inf->mData + inf->mData->mDataOffset);
u32 addr = (inf->mData->mEntrySize * inf->mData->mNumEntries) + ((s32)inf->mData + inf->mData->mDataOffset);
if (_E8 < addr) {
_E8 = addr;

View File

@ -0,0 +1,25 @@
#include "Game/Screen/GalaxyNamePlate.h"
void GalaxyNamePlate::showUnknown(bool a1) {
show(MR::getGameMessageDirect("GalaxyNameShort_Unkonwn"), 0, true, a1);
}
void GalaxyNamePlate::showNew(bool a1) {
show(MR::getGameMessageDirect("GalaxyNameShort_New"), 1, true, a1);
}
void GalaxyNamePlate::showOpen(bool a1) {
show(MR::getGalaxyNameShortOnCurrentLanguage(mGalaxyName), 2, true, a1);
}
void GalaxyNamePlate::show(const wchar_t *pName, bool a2) {
show(pName, 2, a2, true);
}
void GalaxyNamePlate::setShowBalloonNozzle(bool show) {
mShowBalloonNozzle = show;
}
void GalaxyNamePlate::control() {
_24 = false;
}

View File

@ -22,7 +22,7 @@ const char* ScenarioData::getZoneName(s32 zoneID) const {
s32 ScenarioData::getZoneNum() const {
if (mZoneList->mData) {
return mZoneList->mData->_0;
return mZoneList->mData->mNumEntries;
}
return 0;