Skip to content

Commit

Permalink
Match .data and .rodata for d_magma
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jun 29, 2024
1 parent 9eea54f commit d5dfbda
Showing 1 changed file with 81 additions and 8 deletions.
89 changes: 81 additions & 8 deletions src/d/d_magma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "m_Do/m_Do_lib.h"
#include "JSystem/JKernel/JKRHeap.h"

static Vec dummy_3569;
Mtx l_kuroOrthoMtx;
Mtx l_colOrthoMtx;
GXTexObj dMagma_packet_c::mKuroTexObj;
Expand All @@ -19,13 +20,85 @@ GXTexObj dMagma_packet_c::mColTexObj;
Mtx dMagma_packet_c::mFloorMtx;
Mtx dMagma_packet_c::mBallMtx;

Vec dummy[2] = {};
Vec l_YfloorPos[4] = {};
u8 l_YfloorDL[0x27] ALIGN_DECL(32) = {};
u8 l_YfloorMatDL[0x55] ALIGN_DECL(32) = {};
Vec l_YballPos[0x21] = {};
u8 l_YballDL[0x76] ALIGN_DECL(32) = {};
u8 l_YballMatDL[0x4b] ALIGN_DECL(32) = {};
// Needed for the .data section to match.
static Vec dummy_2100 = {1.0f, 1.0f, 1.0f};
static Vec dummy_2080 = {1.0f, 1.0f, 1.0f};

u8 l_YfloorPos[] = {
0xC3, 0xFA, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00, 0xC3, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC3, 0xFA, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0xFA, 0x00, 0x00,
};

u8 l_YfloorDL[] ALIGN_DECL(32) = {
0x98, 0x00, 0x04, 0x01, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

u8 l_YfloorMatDL[] ALIGN_DECL(32) = {
0x61, 0xC0, 0x08, 0xF4, 0x8F, 0x61, 0xC1, 0x08, 0x9F, 0xF0, 0x61, 0x43, 0x00, 0x00, 0x01, 0x61,
0x40, 0x00, 0x00, 0x07, 0x61, 0x41, 0x00, 0x01, 0x0C, 0x61, 0xF3, 0x64, 0x80, 0x80, 0x10, 0x00,
0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x00,
0x61, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};

Vec l_YballPos[] = {
{172.280487f, -7.398514f, -167.445663f},
{0.000006f, -7.398514f, -236.803879f},
{-172.280487f, -7.398515f, -167.445648f},
{-243.641357f, -7.398515f, 0.000004f},
{-172.280487f, -7.398514f, 167.445602f},
{0.000008f, -7.398514f, 236.803879f},
{172.280487f, -7.398514f, 167.445602f},
{243.641403f, -7.398514f, -0.000015f},
{150.773376f, 13.801255f, -149.81015f},
{0.000006f, 13.801253f, -211.863525f},
{-150.773346f, 13.801253f, -149.81015f},
{-213.225739f, 13.801253f, 0.000002f},
{-150.773346f, 13.801253f, 149.810089f},
{0.000008f, 13.801253f, 211.86348f},
{150.773376f, 13.801255f, 149.81012f},
{213.225739f, 13.801255f, -0.000014f},
{121.820717f, 31.773548f, -118.401939f},
{0.000006f, 31.773548f, -167.445648f},
{-121.820679f, 31.773542f, -118.401939f},
{-172.280487f, 31.773542f, 0.000001f},
{-121.820679f, 31.773542f, 118.401939f},
{0.000007f, 31.773548f, 167.445602f},
{121.820717f, 31.773548f, 118.401909f},
{172.280487f, 31.773548f, -0.000012f},
{65.928886f, 43.782257f, -64.078682f},
{0.000006f, 43.782257f, -90.620918f},
{-65.928879f, 43.782257f, -64.078674f},
{-93.237503f, 43.782257f, -0.000002f},
{-65.928879f, 43.782257f, 64.078667f},
{0.000007f, 43.782257f, 90.620911f},
{65.928886f, 43.782257f, 64.078667f},
{93.237541f, 43.782257f, -0.000009f},
{0.000007f, 47.999146f, -0.000006f},
};

u8 l_YballDL[] ALIGN_DECL(32) = {
0x98, 0x00, 0x12, 0x00, 0x09, 0x01, 0x0A, 0x02, 0x0B, 0x03, 0x0C, 0x04, 0x0D, 0x05, 0x0E, 0x06,
0x0F, 0x07, 0x08, 0x00, 0x09, 0x98, 0x00, 0x12, 0x0C, 0x15, 0x0D, 0x16, 0x0E, 0x17, 0x0F, 0x10,
0x08, 0x11, 0x09, 0x12, 0x0A, 0x13, 0x0B, 0x14, 0x0C, 0x15, 0x98, 0x00, 0x12, 0x10, 0x19, 0x11,
0x1A, 0x12, 0x1B, 0x13, 0x1C, 0x14, 0x1D, 0x15, 0x1E, 0x16, 0x1F, 0x17, 0x18, 0x10, 0x19, 0x98,
0x00, 0x05, 0x18, 0x1F, 0x20, 0x1E, 0x1D, 0x98, 0x00, 0x05, 0x1D, 0x1C, 0x20, 0x1B, 0x1A, 0x98,
0x00, 0x04, 0x1A, 0x19, 0x20, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

u8 l_YballMatDL[] ALIGN_DECL(32) = {
0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x17, 0x61, 0x41, 0x00, 0x01, 0x0C, 0x61,
0xF3, 0x7F, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00,
0x10, 0x09, 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

/* 800755A4-800756B8 .text draw__13dMagma_ball_cFv */
void dMagma_ball_c::draw() {
Expand Down Expand Up @@ -127,7 +200,7 @@ void dMagma_floor_c::draw() {
/* 80075CB8-80075DD8 .text calc__14dMagma_floor_cFi */
void dMagma_floor_c::calc(int i_roomNo) {
mDoMtx_stack_c::scaleS(1.0f, 0.05f, 1.0f);
if (strcmp(dComIfGp_getStartStageName(), "MDrag_B") == 0 || strcmp(dComIfGp_getStartStageName(), "Xboss0") == 0)
if (strcmp(dComIfGp_getStartStageName(), "M_DragB") == 0 || strcmp(dComIfGp_getStartStageName(), "Xboss0") == 0)
mDoMtx_stack_c::transM(0.0f, -(mPos.y + 20.0f), 0.0f);
else
mDoMtx_stack_c::transM(0.0f, -(mPos.y + 30.0f), 0.0f);
Expand Down

0 comments on commit d5dfbda

Please sign in to comment.