diff options
author | Treeki <treeki@gmail.com> | 2012-12-09 22:56:01 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-12-09 22:56:01 +0100 |
commit | f96e157709d4a4f1e6c68791de7e651cf1e8e538 (patch) | |
tree | 647031561c2230002359af8cc434a08235a9e36b | |
parent | 224e27424f44b528c6c5ce8a8535566d9c0204ab (diff) | |
download | kamek-f96e157709d4a4f1e6c68791de7e651cf1e8e538.tar.gz kamek-f96e157709d4a4f1e6c68791de7e651cf1e8e538.zip |
Starman on world maps
Diffstat (limited to '')
-rwxr-xr-x | include/game.h | 10 | ||||
-rw-r--r-- | koopatlas.yaml | 5 | ||||
-rw-r--r-- | src/koopatlas/player.cpp | 10 |
3 files changed, 19 insertions, 6 deletions
diff --git a/include/game.h b/include/game.h index 780b76c..e19166a 100755 --- a/include/game.h +++ b/include/game.h @@ -2657,7 +2657,7 @@ public: u32 _174;
u8 _178;
char padding[3]; // not needed?
- u32 model_visibility_flags_maybe;
+ u32 model_visibility_flags_maybe; // 0x100=star glow, 0x200=star effects
u32 mode_maybe;
float _184;
float _188;
@@ -2689,10 +2689,10 @@ public: virtual void setPowerupTexture(); // 800D5CC0
virtual void _vf38(); // 800D6D80
virtual void _vf3C(); // 800BD750
- virtual void _vf40(); // 800D6D70
- virtual void _vf44(); // 800D6D60
- virtual void _vf48(); // 800BD740
- virtual void _vf4C(); // 800BD730
+ virtual void enableStarColours(); // 800D6D70
+ virtual void disableStarColours(); // 800D6D60
+ virtual void enableStarEffects(); // 800BD740
+ virtual void disableStarEffects(); // 800BD730
virtual void getModelMatrix(u32 unk, MtxPtr dest); // 800D5820
virtual int _vf54(); // 80318D0C
virtual bool _vf58(int type, char *buf, bool unk); // 800D6930
diff --git a/koopatlas.yaml b/koopatlas.yaml index e71dbdc..5c9c081 100644 --- a/koopatlas.yaml +++ b/koopatlas.yaml @@ -93,3 +93,8 @@ hooks: addr_pal: 0x800696CC data: '38600020' + - name: StarMarioOnMaps + type: patch + addr_pal: 0x800D52F0 + data: '41820010' + diff --git a/src/koopatlas/player.cpp b/src/koopatlas/player.cpp index abfb329..351ba88 100644 --- a/src/koopatlas/player.cpp +++ b/src/koopatlas/player.cpp @@ -6,11 +6,17 @@ int daWMPlayer_c::onCreate() { this->modelHandler = new dPlayerModelHandler_c(0); // loadModel(u8 player_id, int powerup_id, int unk); - this->modelHandler->loadModel(0, 3, 2); + // Unk is some kind of mode: 0=in-game, 1=map, 2=2D + this->modelHandler->loadModel(0, 3, 1); this->modelHandler->mdlClass->startAnimation(0, 1.2, 10.0, 0.0); this->modelHandler->setSRT((Vec){0.0,100.0,-100.0}, (S16Vec){0,0,0}, (Vec){2.0,2.0,2.0}); this->modelHandler->draw(); + if (Player_Flags[0] & 1) { + modelHandler->mdlClass->enableStarColours(); + modelHandler->mdlClass->enableStarEffects(); + } + hammerSuit.setup(this->modelHandler); pos = (Vec){0.0f,0.0f,3000.0f}; @@ -39,6 +45,8 @@ int daWMPlayer_c::onExecute() { if (!dScKoopatlas_c::instance->mapIsRunning()) return true; + OSReport("Flags: %08x ; Mode: %d\n", modelHandler->mdlClass->model_visibility_flags_maybe, modelHandler->mdlClass->mode_maybe); + dScKoopatlas_c::instance->pathManager.execute(); this->modelHandler->update(); |