match and link MapCreator.cpp

also ddh/main.c progress
This commit is contained in:
EpochFlame 2022-02-28 18:06:32 -05:00
parent c5a3e0dd8e
commit 0f6678438a
8 changed files with 43 additions and 312 deletions

View File

@ -130,6 +130,7 @@ pikmin2.usa.dol: `sha1: 90d328bf8f190c90472e8c19e7e53c6ad0fe0d1a`
- <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KumaChappyAnimator.cpp">plugProjectNishimuraU/KumaChappyAnimator.cpp</a>
- <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KumaKochappyAnimator.cpp">plugProjectNishimuraU/KumaKochappyAnimator.cpp</a>
- <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KurageAnimator.cpp">plugProjectNishimuraU/KurageAnimator.cpp</a>
- <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MapCreator.cpp">plugProjectNishimuraU/MapCreator.cpp</a>
- <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MarAnimator.cpp">plugProjectNishimuraU/MarAnimator.cpp</a>
- <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MiniHoudaiAnimator.cpp">plugProjectNishimuraU/MiniHoudaiAnimator.cpp</a>
- <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ObjectLayout.cpp">plugProjectNishimuraU/ObjectLayout.cpp</a>

View File

@ -1,191 +0,0 @@
.include "macros.inc"
.section .sdata2, "a" # 0x80516360 - 0x80520E40
.balign 8
.global lbl_8051A7F0
lbl_8051A7F0:
.4byte 0x00000000
.4byte 0x00000000
.section .text, "ax" # 0x800056C0 - 0x80472F00
.global nishimuraCreateRandomMap__Q24Game10RoomMapMgrFPQ24Game16MapUnitInterfaceiPQ34Game4Cave9FloorInfobPQ34Game4Cave11EditMapUnit
nishimuraCreateRandomMap__Q24Game10RoomMapMgrFPQ24Game16MapUnitInterfaceiPQ34Game4Cave9FloorInfobPQ34Game4Cave11EditMapUnit:
/* 8024C5E4 00249524 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 8024C5E8 00249528 7C 08 02 A6 */ mflr r0
/* 8024C5EC 0024952C 90 01 00 34 */ stw r0, 0x34(r1)
/* 8024C5F0 00249530 BF 21 00 14 */ stmw r25, 0x14(r1)
/* 8024C5F4 00249534 7C 7F 1B 78 */ mr r31, r3
/* 8024C5F8 00249538 7C 99 23 78 */ mr r25, r4
/* 8024C5FC 0024953C 7C BA 2B 78 */ mr r26, r5
/* 8024C600 00249540 7C DB 33 78 */ mr r27, r6
/* 8024C604 00249544 7C FC 3B 78 */ mr r28, r7
/* 8024C608 00249548 7D 1D 43 78 */ mr r29, r8
/* 8024C60C 0024954C 3B C0 00 00 */ li r30, 0
/* 8024C610 00249550 81 2D 93 E8 */ lwz r9, gameSystem__4Game@sda21(r13)
/* 8024C614 00249554 28 09 00 00 */ cmplwi r9, 0
/* 8024C618 00249558 41 82 00 28 */ beq lbl_8024C640
/* 8024C61C 0024955C 80 09 00 44 */ lwz r0, 0x44(r9)
/* 8024C620 00249560 2C 00 00 01 */ cmpwi r0, 1
/* 8024C624 00249564 40 82 00 1C */ bne lbl_8024C640
/* 8024C628 00249568 3C 60 80 51 */ lis r3, gGameConfig__4Game@ha
/* 8024C62C 0024956C 38 63 41 FC */ addi r3, r3, gGameConfig__4Game@l
/* 8024C630 00249570 80 03 01 A8 */ lwz r0, 0x1a8(r3)
/* 8024C634 00249574 2C 00 00 00 */ cmpwi r0, 0
/* 8024C638 00249578 41 82 00 08 */ beq lbl_8024C640
/* 8024C63C 0024957C 3B C0 00 01 */ li r30, 1
lbl_8024C640:
/* 8024C640 00249580 38 60 00 48 */ li r3, 0x48
/* 8024C644 00249584 4B DD 78 61 */ bl __nw__FUl
/* 8024C648 00249588 7C 60 1B 79 */ or. r0, r3, r3
/* 8024C64C 0024958C 41 82 00 10 */ beq lbl_8024C65C
/* 8024C650 00249590 7F C4 F3 78 */ mr r4, r30
/* 8024C654 00249594 4B FF 7E D5 */ bl __ct__Q34Game4Cave10RandMapMgrFb
/* 8024C658 00249598 7C 60 1B 78 */ mr r0, r3
lbl_8024C65C:
/* 8024C65C 0024959C 90 0D 96 88 */ stw r0, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C660 002495A0 7C 03 03 78 */ mr r3, r0
/* 8024C664 002495A4 7F 24 CB 78 */ mr r4, r25
/* 8024C668 002495A8 7F 45 D3 78 */ mr r5, r26
/* 8024C66C 002495AC 7F 66 DB 78 */ mr r6, r27
/* 8024C670 002495B0 7F 87 E3 78 */ mr r7, r28
/* 8024C674 002495B4 7F A8 EB 78 */ mr r8, r29
/* 8024C678 002495B8 4B FF 7F 39 */ bl loadResource__Q34Game4Cave10RandMapMgrFPQ24Game16MapUnitInterfaceiPQ34Game4Cave9FloorInfobPQ34Game4Cave11EditMapUnit
/* 8024C67C 002495BC 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C680 002495C0 4B FF 80 D5 */ bl create__Q34Game4Cave10RandMapMgrFv
/* 8024C684 002495C4 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C688 002495C8 4B FF 81 D1 */ bl getNumRooms__Q34Game4Cave10RandMapMgrFv
/* 8024C68C 002495CC 7C 7E 1B 78 */ mr r30, r3
/* 8024C690 002495D0 3B A0 00 00 */ li r29, 0
/* 8024C694 002495D4 48 00 00 24 */ b lbl_8024C6B8
lbl_8024C698:
/* 8024C698 002495D8 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C69C 002495DC 7F A4 EB 78 */ mr r4, r29
/* 8024C6A0 002495E0 4B FF 81 ED */ bl getUseUnitName__Q34Game4Cave10RandMapMgrFi
/* 8024C6A4 002495E4 7C 60 1B 78 */ mr r0, r3
/* 8024C6A8 002495E8 7F E3 FB 78 */ mr r3, r31
/* 8024C6AC 002495EC 7C 04 03 78 */ mr r4, r0
/* 8024C6B0 002495F0 4B F6 C9 D1 */ bl useUnit__Q24Game10RoomMapMgrFPc
/* 8024C6B4 002495F4 3B BD 00 01 */ addi r29, r29, 1
lbl_8024C6B8:
/* 8024C6B8 002495F8 7C 1D F0 00 */ cmpw r29, r30
/* 8024C6BC 002495FC 41 80 FF DC */ blt lbl_8024C698
/* 8024C6C0 00249600 BB 21 00 14 */ lmw r25, 0x14(r1)
/* 8024C6C4 00249604 80 01 00 34 */ lwz r0, 0x34(r1)
/* 8024C6C8 00249608 7C 08 03 A6 */ mtlr r0
/* 8024C6CC 0024960C 38 21 00 30 */ addi r1, r1, 0x30
/* 8024C6D0 00249610 4E 80 00 20 */ blr
.global nishimuraPlaceRooms__Q24Game10RoomMapMgrFv
nishimuraPlaceRooms__Q24Game10RoomMapMgrFv:
/* 8024C6D4 00249614 94 21 FF B0 */ stwu r1, -0x50(r1)
/* 8024C6D8 00249618 7C 08 02 A6 */ mflr r0
/* 8024C6DC 0024961C 90 01 00 54 */ stw r0, 0x54(r1)
/* 8024C6E0 00249620 DB E1 00 40 */ stfd f31, 0x40(r1)
/* 8024C6E4 00249624 F3 E1 00 48 */ psq_st f31, 72(r1), 0, qr0
/* 8024C6E8 00249628 BF 61 00 2C */ stmw r27, 0x2c(r1)
/* 8024C6EC 0024962C 7C 7B 1B 78 */ mr r27, r3
/* 8024C6F0 00249630 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C6F4 00249634 4B FF 81 65 */ bl getNumRooms__Q34Game4Cave10RandMapMgrFv
/* 8024C6F8 00249638 7C 60 1B 78 */ mr r0, r3
/* 8024C6FC 0024963C 7F 63 DB 78 */ mr r3, r27
/* 8024C700 00249640 7C 1F 03 78 */ mr r31, r0
/* 8024C704 00249644 7F E4 FB 78 */ mr r4, r31
/* 8024C708 00249648 4B F6 CE 45 */ bl allocRooms__Q24Game10RoomMapMgrFi
/* 8024C70C 0024964C 3B C0 00 00 */ li r30, 0
/* 8024C710 00249650 48 00 00 6C */ b lbl_8024C77C
lbl_8024C714:
/* 8024C714 00249654 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C718 00249658 7F C4 F3 78 */ mr r4, r30
/* 8024C71C 0024965C 38 A1 00 10 */ addi r5, r1, 0x10
/* 8024C720 00249660 38 C1 00 0C */ addi r6, r1, 0xc
/* 8024C724 00249664 38 E1 00 08 */ addi r7, r1, 8
/* 8024C728 00249668 4B FF 81 A1 */ bl getRoomData__Q34Game4Cave10RandMapMgrFiRfRfRi
/* 8024C72C 0024966C 7C 60 1B 78 */ mr r0, r3
/* 8024C730 00249670 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C734 00249674 7C 1D 03 78 */ mr r29, r0
/* 8024C738 00249678 7F C4 F3 78 */ mr r4, r30
/* 8024C73C 0024967C 4B FF 82 11 */ bl makeRoomLink__Q34Game4Cave10RandMapMgrFi
/* 8024C740 00249680 7C 60 1B 78 */ mr r0, r3
/* 8024C744 00249684 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C748 00249688 7C 1C 03 78 */ mr r28, r0
/* 8024C74C 0024968C 7F C4 F3 78 */ mr r4, r30
/* 8024C750 00249690 4B FF 82 E1 */ bl makeObjectLayoutInfo__Q34Game4Cave10RandMapMgrFi
/* 8024C754 00249694 C0 21 00 10 */ lfs f1, 0x10(r1)
/* 8024C758 00249698 7C 68 1B 78 */ mr r8, r3
/* 8024C75C 0024969C C0 41 00 0C */ lfs f2, 0xc(r1)
/* 8024C760 002496A0 7F 63 DB 78 */ mr r3, r27
/* 8024C764 002496A4 80 A1 00 08 */ lwz r5, 8(r1)
/* 8024C768 002496A8 7F A4 EB 78 */ mr r4, r29
/* 8024C76C 002496AC 7F C6 F3 78 */ mr r6, r30
/* 8024C770 002496B0 7F 87 E3 78 */ mr r7, r28
/* 8024C774 002496B4 4B F6 CF CD */ bl makeRoom__Q24Game10RoomMapMgrFPcffiiPQ24Game8RoomLinkPQ24Game16ObjectLayoutInfo
/* 8024C778 002496B8 3B DE 00 01 */ addi r30, r30, 1
lbl_8024C77C:
/* 8024C77C 002496BC 7C 1E F8 00 */ cmpw r30, r31
/* 8024C780 002496C0 41 80 FF 94 */ blt lbl_8024C714
/* 8024C784 002496C4 C3 E2 C4 90 */ lfs f31, lbl_8051A7F0@sda21(r2)
/* 8024C788 002496C8 7F 7F DB 78 */ mr r31, r27
/* 8024C78C 002496CC 3B 80 00 00 */ li r28, 0
lbl_8024C790:
/* 8024C790 002496D0 D3 E1 00 14 */ stfs f31, 0x14(r1)
/* 8024C794 002496D4 7F 85 E3 78 */ mr r5, r28
/* 8024C798 002496D8 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C79C 002496DC 38 81 00 14 */ addi r4, r1, 0x14
/* 8024C7A0 002496E0 D3 E1 00 18 */ stfs f31, 0x18(r1)
/* 8024C7A4 002496E4 D3 E1 00 1C */ stfs f31, 0x1c(r1)
/* 8024C7A8 002496E8 4B FF 83 0D */ bl "getStartPosition__Q34Game4Cave10RandMapMgrFR10Vector3<f>i"
/* 8024C7AC 002496EC C0 01 00 14 */ lfs f0, 0x14(r1)
/* 8024C7B0 002496F0 3B 9C 00 01 */ addi r28, r28, 1
/* 8024C7B4 002496F4 2C 1C 00 02 */ cmpwi r28, 2
/* 8024C7B8 002496F8 D0 1F 00 FC */ stfs f0, 0xfc(r31)
/* 8024C7BC 002496FC C0 01 00 18 */ lfs f0, 0x18(r1)
/* 8024C7C0 00249700 D0 1F 01 00 */ stfs f0, 0x100(r31)
/* 8024C7C4 00249704 C0 01 00 1C */ lfs f0, 0x1c(r1)
/* 8024C7C8 00249708 D0 1F 01 04 */ stfs f0, 0x104(r31)
/* 8024C7CC 0024970C 3B FF 00 0C */ addi r31, r31, 0xc
/* 8024C7D0 00249710 41 80 FF C0 */ blt lbl_8024C790
/* 8024C7D4 00249714 E3 E1 00 48 */ psq_l f31, 72(r1), 0, qr0
/* 8024C7D8 00249718 CB E1 00 40 */ lfd f31, 0x40(r1)
/* 8024C7DC 0024971C BB 61 00 2C */ lmw r27, 0x2c(r1)
/* 8024C7E0 00249720 80 01 00 54 */ lwz r0, 0x54(r1)
/* 8024C7E4 00249724 7C 08 03 A6 */ mtlr r0
/* 8024C7E8 00249728 38 21 00 50 */ addi r1, r1, 0x50
/* 8024C7EC 0024972C 4E 80 00 20 */ blr
.global nishimuraSetTexture__Q24Game10RoomMapMgrFv
nishimuraSetTexture__Q24Game10RoomMapMgrFv:
/* 8024C7F0 00249730 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8024C7F4 00249734 7C 08 02 A6 */ mflr r0
/* 8024C7F8 00249738 90 01 00 24 */ stw r0, 0x24(r1)
/* 8024C7FC 0024973C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8024C800 00249740 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8024C804 00249744 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8024C808 00249748 7C 7D 1B 78 */ mr r29, r3
/* 8024C80C 0024974C 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C810 00249750 4B FF 80 49 */ bl getNumRooms__Q34Game4Cave10RandMapMgrFv
/* 8024C814 00249754 7C 7F 1B 78 */ mr r31, r3
/* 8024C818 00249758 3B C0 00 00 */ li r30, 0
/* 8024C81C 0024975C 48 00 00 38 */ b lbl_8024C854
lbl_8024C820:
/* 8024C820 00249760 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C824 00249764 7F C4 F3 78 */ mr r4, r30
/* 8024C828 00249768 4B FF 80 65 */ bl getUseUnitName__Q34Game4Cave10RandMapMgrFi
/* 8024C82C 0024976C 7C 60 1B 78 */ mr r0, r3
/* 8024C830 00249770 7F A3 EB 78 */ mr r3, r29
/* 8024C834 00249774 7C 04 03 78 */ mr r4, r0
/* 8024C838 00249778 4B F6 CB 05 */ bl getTexture__Q24Game10RoomMapMgrFPc
/* 8024C83C 0024977C 7C 60 1B 78 */ mr r0, r3
/* 8024C840 00249780 80 6D 96 88 */ lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
/* 8024C844 00249784 7C 05 03 78 */ mr r5, r0
/* 8024C848 00249788 7F C4 F3 78 */ mr r4, r30
/* 8024C84C 0024978C 4B FF 85 19 */ bl setUnitTexture__Q34Game4Cave10RandMapMgrFiP10JUTTexture
/* 8024C850 00249790 3B DE 00 01 */ addi r30, r30, 1
lbl_8024C854:
/* 8024C854 00249794 7C 1E F8 00 */ cmpw r30, r31
/* 8024C858 00249798 41 80 FF C8 */ blt lbl_8024C820
/* 8024C85C 0024979C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8024C860 002497A0 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8024C864 002497A4 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8024C868 002497A8 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8024C86C 002497AC 7C 08 03 A6 */ mtlr r0
/* 8024C870 002497B0 38 21 00 20 */ addi r1, r1, 0x20
/* 8024C874 002497B4 4E 80 00 20 */ blr

View File

@ -6,6 +6,14 @@
namespace Game {
struct ObjectLayoutNode : public CNode {
virtual int getObjectId();
virtual u8 getObjectType();
virtual int getBirthCount();
virtual double getDirection();
virtual int getBirthDoorIndex();
virtual void getBirthPosition(float&, float&);
virtual u32 getExtraCode();
virtual bool isFixedBattery();
};
struct ObjectLayoutInfo {

View File

@ -2,6 +2,7 @@
#define _GAME_CAVE_RANDMAPMGR_H
#include "types.h"
#include "Game/mapParts.h"
#include "Game/Cave/RandMapUnit.h"
#include "JSystem/JUT/JUTTexture.h"
@ -50,6 +51,7 @@ struct RandMapMgr : public CNode {
RoomLink* makeRoomLink(int);
ObjectLayoutInfo* makeObjectLayoutInfo(int);
void getStartPosition(Vector3f&, int);
void setUnitTexture(int, JUTTexture*);
};
} // namespace Cave
} // namespace Game

View File

@ -200,17 +200,6 @@ struct MapRoom : public CellObject {
Sys::Sphere _190; // _190
};
struct ObjectLayoutNode : public CNode {
virtual int getObjectId();
virtual u8 getObjectType();
virtual int getBirthCount();
virtual double getDirection();
virtual int getBirthDoorIndex();
virtual void getBirthPosition(float&, float&);
virtual u32 getExtraCode();
virtual bool isFixedBattery();
};
struct RoomMapMgr : public MapMgr {
SysShape::Model* m_modelOrCaveVRBoxOrBothMaybe; // _24
Cave::CaveInfo* m_caveInfo; // _28
@ -242,6 +231,7 @@ struct RoomMapMgr : public MapMgr {
void useUnit(char*);
void allocRooms(int);
void makeRoom(char*, float, float, int, int, Game::RoomLink*, Game::ObjectLayoutInfo*);
JUTTexture* getTexture(char*);
};
struct CaveVRBox {

View File

@ -641,7 +641,7 @@ NISHIMURA:=\
$(BUILD_DIR)/asm/plugProjectNishimuraU/RandEnemyUnit.o\
$(BUILD_DIR)/asm/plugProjectNishimuraU/DoorNode.o\
$(BUILD_DIR)/asm/plugProjectNishimuraU/MapUnitGenerator.o\
$(BUILD_DIR)/asm/plugProjectNishimuraU/MapCreator.o\
$(BUILD_DIR)/src/plugProjectNishimuraU/MapCreator.o\
$(BUILD_DIR)/asm/plugProjectNishimuraU/RandMapScore.o\
$(BUILD_DIR)/asm/plugProjectNishimuraU/ItemUnit.o\
$(BUILD_DIR)/asm/plugProjectNishimuraU/RandItemUnit.o\

View File

@ -1,4 +1,5 @@
#include "types.h"
#include "trk.h"
#include "Dolphin/AmcExi2Stubs.h"
/*
* --INFO--
@ -16,47 +17,21 @@ BOOL ddh_cc_initinterrupts(void)
* Address: 800C0C74
* Size: 000070
*/
void ddh_cc_peek(void)
int ddh_cc_peek(void)
{
/*
.loc_0x0:
stwu r1, -0x810(r1)
mflr r0
stw r0, 0x814(r1)
stw r31, 0x80C(r1)
bl 0x119C8
mr. r31, r3
bgt- .loc_0x24
li r3, 0
b .loc_0x5C
s32 temp_r3;
u8 sp8[2048];
.loc_0x24:
mr r4, r31
addi r3, r1, 0x8
bl 0x119B4
cmpwi r3, 0
bne- .loc_0x50
lis r3, 0x804F
mr r5, r31
addi r3, r3, 0x5020
addi r4, r1, 0x8
bl 0x3E0
b .loc_0x58
.loc_0x50:
li r3, -0x2719
b .loc_0x5C
.loc_0x58:
mr r3, r31
.loc_0x5C:
lwz r0, 0x814(r1)
lwz r31, 0x80C(r1)
mtlr r0
addi r1, r1, 0x810
blr
*/
temp_r3 = EXI2_Poll();
if (temp_r3 <= 0) {
return 0;
}
if (EXI2_ReadN(sp8, temp_r3) == 0) {
CircleBufferWriteBytes(gRecvCB, sp8, temp_r3);
} else {
return -0x2719;
}
return temp_r3;
}
/*
@ -64,20 +39,10 @@ void ddh_cc_peek(void)
* Address: 800C0CE4
* Size: 000024
*/
void ddh_cc_post_stop(void)
BOOL ddh_cc_post_stop(void)
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
bl 0x11974
lwz r0, 0x14(r1)
li r3, 0
mtlr r0
addi r1, r1, 0x10
blr
*/
EXI2_Reserve();
return FALSE;
}
/*
@ -85,20 +50,10 @@ void ddh_cc_post_stop(void)
* Address: 800C0D08
* Size: 000024
*/
void ddh_cc_pre_continue(void)
BOOL ddh_cc_pre_continue(void)
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
bl 0x11954
lwz r0, 0x14(r1)
li r3, 0
mtlr r0
addi r1, r1, 0x10
blr
*/
EXI2_Unreserve();
return FALSE;
}
/*

View File

@ -58,10 +58,9 @@ void RoomMapMgr::nishimuraPlaceRooms(void)
Vector3f startPos(0.0f, 0.0f, 0.0f);
Cave::randMapMgr->getStartPosition(startPos, i);
Vector3f* pStartPos = &m_startPositions[i];
pStartPos->x = startPos.x;
pStartPos->y = startPos.y;
pStartPos->z = startPos.z;
m_startPositions[i].x = startPos.x;
m_startPositions[i].y = startPos.y;
m_startPositions[i].z = startPos.z;
}
}
@ -69,48 +68,15 @@ void RoomMapMgr::nishimuraPlaceRooms(void)
* --INFO--
* Address: 8024C7F0
* Size: 000088
* Matches!
*/
void RoomMapMgr::nishimuraSetTexture(void)
{
/*
stwu r1, -0x20(r1)
mflr r0
stw r0, 0x24(r1)
stw r31, 0x1c(r1)
stw r30, 0x18(r1)
stw r29, 0x14(r1)
mr r29, r3
lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
bl getNumRooms__Q34Game4Cave10RandMapMgrFv
mr r31, r3
li r30, 0
b lbl_8024C854
lbl_8024C820:
lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
mr r4, r30
bl getUseUnitName__Q34Game4Cave10RandMapMgrFi
mr r0, r3
mr r3, r29
mr r4, r0
bl getTexture__Q24Game10RoomMapMgrFPc
mr r0, r3
lwz r3, randMapMgr__Q24Game4Cave@sda21(r13)
mr r5, r0
mr r4, r30
bl setUnitTexture__Q34Game4Cave10RandMapMgrFiP10JUTTexture
addi r30, r30, 1
lbl_8024C854:
cmpw r30, r31
blt lbl_8024C820
lwz r0, 0x24(r1)
lwz r31, 0x1c(r1)
lwz r30, 0x18(r1)
lwz r29, 0x14(r1)
mtlr r0
addi r1, r1, 0x20
blr
*/
int numRooms = Cave::randMapMgr->getNumRooms();
for (int unitIndex = 0; unitIndex < numRooms; unitIndex++) {
char* unitName = Cave::randMapMgr->getUseUnitName(unitIndex);
JUTTexture* texture = getTexture(unitName);
Cave::randMapMgr->setUnitTexture(unitIndex, texture);
}
}
} // namespace Game