diff options
-rwxr-xr-x | include/game.h | 10 | ||||
-rw-r--r-- | kamek_pal.x | 3 | ||||
-rw-r--r-- | src/koopatlas/map.cpp | 10 | ||||
-rw-r--r-- | src/koopatlas/map.h | 2 |
4 files changed, 25 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h index 169b01d..a5fa86b 100755 --- a/include/game.h +++ b/include/game.h @@ -3092,5 +3092,15 @@ extern "C" u32 GetActivePlayerCount(); #include "newer.h"
+class BGGMEffectRenderer : public m3d::proc_c {
+ private:
+ u32 effectGroupID;
+ public:
+ ~BGGMEffectRenderer();
+ void drawOpa();
+ void drawXlu();
+ virtual bool setupEffectRenderer(mAllocator_c *allocator, int opaPrio, int xluPrio, int groupID);
+};
+
#endif
diff --git a/kamek_pal.x b/kamek_pal.x index 02bc004..c0f9887 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -1,6 +1,9 @@ SECTIONS { /* Scrolling is annoying, clown car goes here! */ + __dt__18BGGMEffectRendererFv = 0x80092E30; + __vt__18BGGMEffectRenderer = 0x80311908; + __construct_array = 0x802DCC90; m2d__Anm_c__Load = 0x801644F0; m2d__AnmResHandler_c__Load = 0x80163FA0; diff --git a/src/koopatlas/map.cpp b/src/koopatlas/map.cpp index 316c001..ff28e19 100644 --- a/src/koopatlas/map.cpp +++ b/src/koopatlas/map.cpp @@ -62,6 +62,12 @@ int dWMMap_c::onCreate() { bgSrtAnm.bindEntry(&bgModel, anmRes, 0, 0); bgModel.bindAnim(&bgSrtAnm, 0.0f); + static int EffectGroups[] = {1,0,4,5,7,8,9,10,11,12,13,14}; + static int EffectPrios[] = {141,142,143,129,144,145,146,147,148,149,150,151}; + for (int i = 0; i < EFFECT_RENDERER_COUNT; i++) { + effectRenderers[i].setupEffectRenderer(&allocator, -1, EffectPrios[i], EffectGroups[i]); + } + allocator.unlink(); return true; @@ -83,6 +89,10 @@ int dWMMap_c::onDraw() { renderer.scheduleForDrawing(); bgModel.scheduleForDrawing(); + for (int i = 0; i < EFFECT_RENDERER_COUNT; i++) { + effectRenderers[i].scheduleForDrawing(); + } + dKPMapData_c *dataCls = &dScKoopatlas_c::instance->mapData; renderPathLayer(dataCls->pathLayer); diff --git a/src/koopatlas/map.h b/src/koopatlas/map.h index 8d3e2ae..82bee1f 100644 --- a/src/koopatlas/map.h +++ b/src/koopatlas/map.h @@ -58,6 +58,8 @@ class dWMMap_c : public dBase_c { }; renderer_c renderer; + enum EffRenderCount { EFFECT_RENDERER_COUNT = 12 }; + BGGMEffectRenderer effectRenderers[EFFECT_RENDERER_COUNT]; mHeapAllocator_c allocator; m3d::mdl_c bgModel; |