Skip to content

Commit a096d93

Browse files
committed
fixes
1 parent 6b34284 commit a096d93

29 files changed

+246
-355
lines changed

base/SymbolsResort.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ __cvt_dbl_sll=0x80007d18
127127
__cvt_dbl_ull=0x80007dc8
128128
__wStringWrite=0x80012a28
129129
__wpformatter=0x8001209c
130+
tan=0x80016d80
131+
pow=0x80016e10
130132

131133
__DBIntrHandler=0x8001c204
132134
DBInitComm=0x8001c228
@@ -2190,6 +2192,9 @@ nanddrv_unmount=0x800fe760
21902192
nanddrv_physical_read=0x800fe970
21912193
RFLiInitCharModel=0x80102634
21922194
RFLGetFavoriteColor=0x80102a20
2195+
List_Init__Q24nw4r2utFPQ34nw4r2ut4ListUs=0x8010b9e0
2196+
List_Append__Q24nw4r2utFPQ34nw4r2ut4ListPv=0x8010ba00
2197+
List_GetNext__Q24nw4r2utFPCQ34nw4r2ut4ListPCv=0x8010bc00
21932198
Skip__Q44nw4r2ut10FileStream12FilePositionFl=0x8010c9c0
21942199
Append__Q44nw4r2ut10FileStream12FilePositionFl=0x8010ca30
21952200
Seek__Q44nw4r2ut10FileStream12FilePositionFlUl=0x8010ca80
@@ -2417,6 +2422,8 @@ Draw__Q34nw4r2ef24DrawSmoothStripeStrategyFRCQ34nw4r2ef8DrawInfoPQ34nw4r2ef15Par
24172422
FLog__Q34nw4r4math6detailFf=0x8013b9b0
24182423
Hermite__Q24nw4r4mathFfffff=0x8013ba80
24192424
Bezier__Q24nw4r4mathFfffff=0x8013bac0
2425+
FrSqrt__Q24nw4r4mathFf=0x8013ba50
2426+
SinFIdx__Q24nw4r4mathFf=0x8013bba0
24202427
CosFIdx__Q24nw4r4mathFf=0x8013bc10
24212428
SinCosFIdx__Q24nw4r4mathFPfPff=0x8013bc70
24222429
AtanFIdx__Q24nw4r4mathFf=0x8013bce0
@@ -3590,13 +3597,22 @@ create__Q23EGG7ExpHeapFUlPQ23EGG4HeapUs=0x801c0e58
35903597
alloc__Q23EGG4HeapFUliPQ23EGG4Heap=0x801c1654
35913598
free__Q23EGG4HeapFPvPQ23EGG4Heap=0x801c19c4
35923599
sConfigData__11RPSysSystem=0x807ceb60
3593-
getCoreStatus__Q23EGG14CoreControllerCFi=0x801c4380
3600+
getCoreStatus__Q23EGG14CoreControllerFi=0x801c4380
35943601
getNthController__Q23EGG17CoreControllerMgrFi=0x801c4ab8
35953602
__dt__Q23EGG5SceneFv=0x801c8318
35963603
sCurrentHeap__Q23EGG4Heap=0x806f49b0
35973604
sTVMode__Q23EGG6Screen=0x806f4938
3598-
sTVInfo__Q23EGG6Screen=0x806b4ad8
3605+
sTVModeInfo__Q23EGG6Screen=0x806b4ad8
35993606
__ct__Q23EGG6ScreenFv=0x801b83d0
3607+
__ct__Q23EGG8DisposerFv=0x801c9238
3608+
__vt__Q23EGG7Archive=0x806b4fe0
3609+
sIsArchiveListInitialized__Q23EGG7Archive=0x806f4a38
3610+
sArchiveList__Q23EGG7Archive=0x807ce190
3611+
3612+
BeginDrawQuad__Q23EGG6DrawGXFQ33EGG6DrawGX12ColorChannelQ33EGG6DrawGX5ZModeQ33EGG6DrawGX5Blendbb=0x801a68f4
3613+
makeIdentity__Q23EGG9Matrix34fFv=0x801c0678
3614+
s_cameraMtx__Q23EGG6DrawGX=0x807cc980
3615+
DrawDL__Q23EGG6DrawGXFQ33EGG6DrawGX2DLRCQ34nw4r4math5MTX34=0x801a8700
36003616

36013617
spInstance__11RPSysSystem=0x806f4c68
36023618
spInstance__13RPSysSceneMgr=0x806f4c98
@@ -3611,6 +3627,7 @@ draw__10RPSysSceneFv=0x8022f73c
36113627
enter__10RPSysSceneFv=0x8022f9d8
36123628
exit__10RPSysSceneFv=0x8022f694
36133629
reinit__10RPSysSceneFv=0x8022f960
3630+
isNandAccessEnable__10RPSysSceneCFv=0x8022fdb8
36143631
incoming_childDestroy__10RPSysSceneFv=0x8022f900
36153632
outgoing_childCreate__10RPSysSceneFv=0x8022f6fc
36163633
pauseCallBack__10RPSysSceneFb=0x801cf764

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# PACK_{NAME}, (i.e. PACK_SPORTS, PACK_RESORT).
2525
#
2626
# =============================================================================#
27-
proj.packs = ["play"]
27+
proj.packs = ["resort"]
2828

2929
# =============================================================================#
3030
# Common compiler flags to apply across all code.

include/Pack/RPGraphics/RPGrpModel.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,17 @@ class RPGrpModel {
4848
return mModelEx->getScnMdlSimple();
4949
}
5050

51+
#if !defined(PACK_RESORT)
5152
RPGrpModelAnm* GetModelAnm() const {
5253
return mModelAnm;
5354
}
55+
#endif
56+
5457
RPGrpModelMaterial* GetMaterial(u32 id) const {
5558
return mppMaterials[id];
5659
}
5760

61+
#if !defined(PACK_RESORT)
5862
void SetDrawScene(u8 scene) {
5963
mDrawScene = scene;
6064
}
@@ -66,6 +70,7 @@ class RPGrpModel {
6670
SetShapeVisible(enable);
6771
SetJointVisible(enable);
6872
}
73+
#endif
6974

7075
public:
7176
virtual UNKTYPE VF_0x8(UNKTYPE) = 0; // at 0x8

include/egg/core/eggController.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,18 @@ class CoreController {
259259
u32 mFSStickTrig; // at 0xC
260260
u32 mFSStickRelease; // at 0x10
261261

262+
#if defined(PACK_RESORT)
263+
char _14[0x4];
264+
#endif
265+
262266
CoreStatus mCoreStatus[KPAD_MAX_SAMPLES]; // at 0x14
263-
s32 mKPADReadLength; // at 0x854
264-
Vector3f mAccelPrev; // at 0x858
267+
268+
#if defined(PACK_RESORT)
269+
char _858[0xF18 - 0x858];
270+
#endif
271+
272+
s32 mKPADReadLength; // at 0x854
273+
Vector3f mAccelPrev; // at 0x858
265274

266275
u32 mSimpleRumblePattern; // at 0x864
267276
bool mEnableSimpleRumble; // at 0x868

include/egg/core/eggScene.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22
#define EGG_CORE_SCENE_H
33
#include <egg/types_egg.h>
44

5+
#include <egg/core/eggDisposer.h>
6+
57
namespace EGG {
68

79
// Forward declarations
810
class Heap;
911
class SceneManager;
1012

11-
class Scene {
13+
class Scene
14+
#if defined(PACK_RESORT)
15+
: public Disposer
16+
#endif
17+
{
1218
public:
1319
Scene();
1420
virtual ~Scene(); // at 0x8

include/egg/gfx/eggModelEx.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,17 @@ class ModelEx {
3030
enum EDrawShape { cDrawShape_None = (1 << 0) };
3131

3232
private:
33+
#if defined(PACK_RESORT)
34+
nw4r::g3d::ScnObj* mScnObj; // at 0x0
35+
EType mType; // at 0x4
36+
u16 mFlag; // at 0x8
37+
ModelBoundingInfo* mpBV; // at 0xC
38+
#else
3339
EType mType; // at 0x0
3440
u16 mFlag; // at 0x4
3541
nw4r::g3d::ScnObj* mScnObj; // at 0x8
3642
ModelBoundingInfo* mpBV; // at 0xC
43+
#endif
3744

3845
static u32 sDrawFlag;
3946
static const char* sByteCodeCalcStr;

include/egg/gfx/eggScreen.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,21 @@ class Screen : public Frustum {
9090
mPosition = rPos;
9191
}
9292

93+
#if defined(PACK_SPORTS) || defined(PACK_PLAY)
9394
static u16 GetSizeXMax() {
9495
return sTVModeWidths[sTVMode];
9596
}
9697
static u16 GetSizeYMax() {
9798
return sTVModeHeights[sTVMode];
9899
}
100+
#elif defined(PACK_RESORT)
101+
static u16 GetSizeXMax() {
102+
return sTVModeInfo[sTVMode].width;
103+
}
104+
static u16 GetSizeYMax() {
105+
return sTVModeInfo[sTVMode].height;
106+
}
107+
#endif
99108

100109
private:
101110
enum {
@@ -113,6 +122,14 @@ class Screen : public Frustum {
113122
f32 heightRatio; // at 0x4
114123
};
115124

125+
#if defined(PACK_RESORT)
126+
struct TVModeInfo {
127+
u16 width;
128+
u16 height;
129+
nw4r::math::VEC2 ratios;
130+
};
131+
#endif
132+
116133
private:
117134
void Configure();
118135

@@ -128,8 +145,13 @@ class Screen : public Frustum {
128145

129146
static TVMode sTVMode;
130147
static TVModeRatio sTVModeRatios[Screen::TV_MODE_MAX];
148+
149+
#if defined(PACK_SPORTS) || defined(PACK_PLAY)
131150
static u16 sTVModeWidths[TV_MODE_MAX];
132151
static u16 sTVModeHeights[TV_MODE_MAX];
152+
#elif defined(PACK_RESORT)
153+
static TVModeInfo sTVModeInfo[TV_MODE_MAX];
154+
#endif
133155

134156
static Screen* spRoot;
135157

lib/libkiwi/core/kiwiSceneHookMgr.cpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ void SceneHookMgr::DoConfigure() {
8888
}
8989
}
9090
}
91-
KOKESHI_BY_PACK(KM_CALL(0x8018532c, SceneHookMgr::DoConfigure), // Wii Sports
92-
KM_CALL(0x80184d24, SceneHookMgr::DoConfigure), // Wii Play
93-
KM_CALL(0x8022fae4,
94-
SceneHookMgr::DoConfigure)); // Wii Sports Resort
91+
KOKESHI_BY_PACK(KM_CALL(0x8018532c, SceneHookMgr::DoConfigure), // Wii Sports
92+
KM_CALL(0x80184d24, SceneHookMgr::DoConfigure), // Wii Play
93+
KM_CALL(0x8022fae4, SceneHookMgr::DoConfigure)); // Wii Sports Resort
9594

9695
/**
9796
* @brief Runs active hooks and scene function(s) for the Reset state
@@ -126,15 +125,13 @@ void SceneHookMgr::DoReset() {
126125
}
127126
}
128127
// RPSysScene::reinit
129-
KOKESHI_BY_PACK(KM_CALL(0x801852d8, SceneHookMgr::DoReset), // Wii Sports
130-
KM_CALL(0x80184cd0, SceneHookMgr::DoReset), // Wii Play
131-
KM_CALL(0x8022f9ac,
132-
SceneHookMgr::DoReset)); // Wii Sports Resort
128+
KOKESHI_BY_PACK(KM_CALL(0x801852d8, SceneHookMgr::DoReset), // Wii Sports
129+
KM_CALL(0x80184cd0, SceneHookMgr::DoReset), // Wii Play
130+
KM_CALL(0x8022f9ac, SceneHookMgr::DoReset)); // Wii Sports Resort
133131
// RPSysScene::enter
134-
KOKESHI_BY_PACK(KM_CALL(0x801853d4, SceneHookMgr::DoReset), // Wii Sports
135-
KM_CALL(0x80184dcc, SceneHookMgr::DoReset), // Wii Play
136-
KM_CALL(0x8022fb54,
137-
SceneHookMgr::DoReset)); // Wii Sports Resort
132+
KOKESHI_BY_PACK(KM_CALL(0x801853d4, SceneHookMgr::DoReset), // Wii Sports
133+
KM_CALL(0x80184dcc, SceneHookMgr::DoReset), // Wii Play
134+
KM_CALL(0x8022fb54, SceneHookMgr::DoReset)); // Wii Sports Resort
138135

139136
/**
140137
* @brief Runs active hooks and scene function(s) for the LoadResource state
@@ -194,7 +191,7 @@ void SceneHookMgr::DoCalculate() {
194191
}
195192
KOKESHI_BY_PACK(KM_CALL(0x80185110, SceneHookMgr::DoCalculate), // Wii Sports
196193
KM_CALL(0x80184b08, SceneHookMgr::DoCalculate), // Wii Play
197-
KM_CALL(0x8023016c, SceneHookMgr::DoCalculate)); // Wii Sports Resort
194+
KM_CALL(0x8022f870, SceneHookMgr::DoCalculate)); // Wii Sports Resort
198195

199196
/**
200197
* @brief Runs active hooks and scene function(s) for the Exit state

lib/libkiwi/libkiwi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
#include <libkiwi/test/kiwiUnitTestMgr.h>
8787
#include <libkiwi/util/kiwiBitUtil.h>
8888
#include <libkiwi/util/kiwiDynamicSingleton.h>
89-
#include <libkiwi/util/kiwiEffectUtil.h>
9089
#include <libkiwi/util/kiwiExtension.h>
9190
#include <libkiwi/util/kiwiGlobalInstance.h>
9291
#include <libkiwi/util/kiwiIosDevice.h>

lib/libkiwi/resource/kiwiMultiArchive.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// TODO(kiwi) Needs changes for WSR
2+
#if !defined(PACK_RESORT)
3+
14
// Implementation must be visible to the extension
25
#define private protected
36
#include <egg/core/eggArchive.h>
@@ -141,4 +144,6 @@ MultiArchive* MultiArchive::FindArchive(const Resource& rResource) {
141144
return nullptr;
142145
}
143146

144-
} // namespace kiwi
147+
} // namespace kiwi
148+
149+
#endif

0 commit comments

Comments
 (0)