mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-19 05:02:12 -04:00
Misc framework fixes (#2578)
This commit is contained in:
@@ -299,6 +299,22 @@ void cCcD_ShapeAttr::getShapeAccess(cCcD_ShapeAttr::Shape* pshape) const {
|
||||
pshape->_4.x = 0.0f;
|
||||
}
|
||||
|
||||
bool cCcD_PntAttr::GetNVec(cXyz const& param_0, cXyz* param_1) const {
|
||||
param_1->x = param_0.x - vtx.x;
|
||||
param_1->y = param_0.y - vtx.y;
|
||||
param_1->z = param_0.z - vtx.z;
|
||||
if (cM3d_IsZero(PSVECMag(param_1))) {
|
||||
param_1->x = 0.0f;
|
||||
param_1->y = 0.0f;
|
||||
param_1->z = 0.0f;
|
||||
return false;
|
||||
} else {
|
||||
PSVECNormalize(param_1, param_1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 80263A88-80263B58 25E3C8 00D0+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_TriAttrCFRC12cCcD_CpsAttrP4cXyz */
|
||||
bool cCcD_TriAttr::CrossAtTg(const cCcD_CpsAttr& cpsAttr, cXyz* pxyz) const {
|
||||
|
||||
@@ -248,7 +248,7 @@ daNpc_Saru_c::~daNpc_Saru_c() {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80AC44F8-80AC4588 000000 0090+00 9/9 0/0 0/0 .rodata m__18daNpc_Saru_Param_c */
|
||||
daNpc_Saru_HIO_c const daNpc_Saru_Param_c::m = {
|
||||
daNpc_Saru_HIOParam const daNpc_Saru_Param_c::m = {
|
||||
140.0f,
|
||||
-3.0f,
|
||||
1.0f,
|
||||
|
||||
@@ -364,6 +364,10 @@ dCcD_GObjInf* dCcD_GetGObjInf(cCcD_Obj* p_obj) {
|
||||
return (dCcD_GObjInf*)p_obj->GetGObjInf();
|
||||
}
|
||||
|
||||
cCcD_ShapeAttr* dCcD_Pnt::GetShapeAttr() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/* 800847D0-80084814 07F110 0044+00 0/0 1/1 20/20 .text Set__8dCcD_CpsFRC11dCcD_SrcCps */
|
||||
void dCcD_Cps::Set(dCcD_SrcCps const& src) {
|
||||
dCcD_GObjInf::Set(src.mObjInf);
|
||||
|
||||
+25
-2
@@ -4,17 +4,18 @@
|
||||
//
|
||||
|
||||
#include "d/d_drawlist.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "JSystem/J2DGraph/J2DAnimation.h"
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
#include "JSystem/J2DGraph/J2DScreen.h"
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "SSystem/SComponent/c_bg_s_shdw_draw.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "dol2asm.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
|
||||
class dDlst_blo_c : public dDlst_base_c {
|
||||
public:
|
||||
@@ -911,6 +912,11 @@ void dDlst_2DMt_c::draw() {
|
||||
}
|
||||
}
|
||||
|
||||
// stand-in for a stripped function that calls J2DPicture::getTexture
|
||||
JUTTexture* dummy_getTexture(J2DPicture* picture) {
|
||||
return picture->getTexture(0);
|
||||
}
|
||||
|
||||
/* 80053A00-80053A9C 04E340 009C+00 0/0 1/1 0/0 .text __ct__10dDlst_2D_cFP7ResTIMGssssUc
|
||||
*/
|
||||
dDlst_2D_c::dDlst_2D_c(ResTIMG* i_timg, s16 i_posX, s16 i_posY, s16 i_sizeX, s16 i_sizeY,
|
||||
@@ -934,6 +940,23 @@ void dDlst_blo_c::draw() {
|
||||
mScreen.draw(field_0x120, field_0x124, dComIfGp_getCurrentGrafPort());
|
||||
}
|
||||
|
||||
// stand-in for a function that pulls in a bunch of inline functions but was presumably stripped
|
||||
void dummy_misc() {
|
||||
J2DScreen* screen;
|
||||
J2DPane* pane;
|
||||
J2DPicture* picture;
|
||||
J2DAnmBase* anmBase;
|
||||
J2DAnmColor* anmColor;
|
||||
delete anmBase;
|
||||
picture->setBlack(JUtility::TColor(0, 0, 0, 0));
|
||||
picture->setWhite(JUtility::TColor(0, 0, 0, 0));
|
||||
pane->getTypeID();
|
||||
pane->makeMatrix(0.0f, 0.0f);
|
||||
pane->calcMtx();
|
||||
screen->clearAnmTransform();
|
||||
anmColor->searchUpdateMaterialID(screen);
|
||||
}
|
||||
|
||||
/* 80053CDC-80053CEC 04E61C 0010+00 0/0 2/2 0/0 .text init__8cM_rnd_cFiii */
|
||||
void cM_rnd_c::init(int s0, int s1, int s2) {
|
||||
seed0 = s0;
|
||||
|
||||
@@ -17,7 +17,12 @@
|
||||
#include "m_Do/m_Do_machine.h"
|
||||
#include "m_Do/m_Do_main.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
// Possibly fakematch?
|
||||
// Using `sym off` for this header fixes J2DOrthoGraph::~J2DOrthoGraph being
|
||||
// incorrectly placed in a separate .text section.
|
||||
#pragma sym off
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#pragma sym on
|
||||
#include "JSystem/JParticle/JPADrawInfo.h"
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JFramework/JFWSystem.h"
|
||||
@@ -510,7 +515,7 @@ static void drawDepth2(view_class* param_0, view_port_class* param_1, int param_
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
GXPosition3s16(x_orig, y_orig_pos, -5);
|
||||
GXTexCoord2s8(0, 0);
|
||||
GXPosition3s16(width, y_orig_pos, -5);
|
||||
GXPosition3s16(width, y_orig_pos, -5);
|
||||
GXTexCoord2s8(1, 0);
|
||||
GXPosition3s16(width, height, -5);
|
||||
GXTexCoord2s8(1, 1);
|
||||
|
||||
Reference in New Issue
Block a user