mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
j2d / map_path work, d_drawlist / d_attention cleanup (#208)
* work on fop actor / actor mng, daalink, d_a_obj_item * d_a_title mostly decompiled * daalink / d_event / JMessage / dmsg_out_font work * msg_scrn_base / msg_scrn_boss * some work on mDo machine, d_menu_save, d_tresure, and various * remove asm * progress * finish d_menu_save / d_pane_class_alpha / d_pane_class / rename some data * rename more data * remove asm / progress * match all of d_pane_class * fixes / some dKankyo doc * bunch of j2d work. d_drawlist / d_attention cleanup * progress / asm * cleanup wip * decompile JStage * setup some more JStudio structs * set up d_demo classes * some d_demo work * cleanup dolphin os stuff * some initial dEvent documentation * some At collision documentation * match JUTConsole::doDraw * dbgs work / split up some of d_a_alink into .inc files * d_a_alink_spinner work
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -171,7 +171,7 @@ void J2DGrafContext::fillBox(JGeometry::TBox2<f32> const& box) {
|
||||
GXColor1u32(mColorBL);
|
||||
GXPosition3f32(box.i.x, box.f.y, 0);
|
||||
GXColor1u32(mColorBR);
|
||||
GXEnd();
|
||||
i_GXEnd();
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGBA4, 0);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ void J2DGrafContext::drawFrame(JGeometry::TBox2<f32> const& box) {
|
||||
GXColor1u32(mColorBR);
|
||||
GXPosition3f32(box.i.x, box.i.y, 0);
|
||||
GXColor1u32(mColorTL);
|
||||
GXEnd();
|
||||
i_GXEnd();
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGBA4, 0);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ void J2DGrafContext::line(JGeometry::TVec2<f32> start, JGeometry::TVec2<f32> end
|
||||
GXColor1u32(mColorTL);
|
||||
GXPosition3f32(end.x, end.y, 0);
|
||||
GXColor1u32(mColorBR);
|
||||
GXEnd();
|
||||
i_GXEnd();
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGBA4, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ void* J2DDataManage::get(char const* name) {
|
||||
void* J2DDataManage::get(JSUInputStream* inputStream) {
|
||||
inputStream->skip(1);
|
||||
u8 nameLen = inputStream->readU8();
|
||||
|
||||
if (nameLen == 0) {
|
||||
return NULL;
|
||||
} else {
|
||||
@@ -45,18 +46,18 @@ s8* J2DResReference::getResReference(u16 idx) const {
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804349C0-80434AC8 0616E0 0101+07 1/1 0/0 0/0 .bss p_name$494 */
|
||||
static char p_name[257];
|
||||
|
||||
/* 8030CF44-8030D098 307884 0154+00 0/0 2/2 0/0 .text getName__15J2DResReferenceCFUs */
|
||||
char* J2DResReference::getName(u16 idx) const {
|
||||
static char p_name[257];
|
||||
|
||||
s8* resRef = this->getResReference(idx);
|
||||
|
||||
if (resRef == NULL) {
|
||||
p_name[0] = 0;
|
||||
return p_name;
|
||||
} else {
|
||||
s8 first = resRef[0];
|
||||
|
||||
switch (first) {
|
||||
case 2:
|
||||
case 3:
|
||||
@@ -72,6 +73,7 @@ char* J2DResReference::getName(u16 idx) const {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
s32 i = 0;
|
||||
pos++;
|
||||
for (; pos < resRef[1] + 2; i++, pos++) {
|
||||
|
||||
+1490
-1506
File diff suppressed because it is too large
Load Diff
@@ -456,7 +456,8 @@ asm J2DColorBlock::~J2DColorBlock() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm J2DIndBlock::~J2DIndBlock() {
|
||||
// asm J2DIndBlock::~J2DIndBlock() {
|
||||
extern "C" asm void __dt__11J2DIndBlockFv() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DMaterial/__dt__11J2DIndBlockFv.s"
|
||||
}
|
||||
@@ -466,7 +467,8 @@ asm J2DIndBlock::~J2DIndBlock() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm J2DTevBlock::~J2DTevBlock() {
|
||||
// asm J2DTevBlock::~J2DTevBlock() {
|
||||
extern "C" asm void __dt__11J2DTevBlockFv() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DMaterial/__dt__11J2DTevBlockFv.s"
|
||||
}
|
||||
@@ -508,7 +510,7 @@ extern "C" void setGX__15J2DIndBlockNullFv() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J2DIndBlockNull::getType() {
|
||||
asm u32 J2DIndBlockNull::getType() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DMaterial/getType__15J2DIndBlockNullFv.s"
|
||||
}
|
||||
|
||||
+260
-217
File diff suppressed because it is too large
Load Diff
@@ -274,6 +274,13 @@ asm J2DPicture::J2DPicture() {
|
||||
|
||||
/* 802FC118-802FC1D4 2F6A58 00BC+00 0/0 1/1 0/0 .text
|
||||
* __ct__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP10JKRArchive */
|
||||
#ifdef NONMATCHING
|
||||
J2DPicture::J2DPicture(J2DPane* p_pane, JSURandomInputStream* p_stream, JKRArchive* p_archive)
|
||||
: field_0x10a(), field_0x12c(NULL), mWhite(), mBlack(), mCornerColor(), field_0x148(),
|
||||
field_0x14c() {
|
||||
private_readStream(p_pane, p_stream, p_archive);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -282,6 +289,7 @@ asm J2DPicture::J2DPicture(J2DPane* param_0, JSURandomInputStream* param_1, JKRA
|
||||
#include "asm/JSystem/J2DGraph/J2DPicture/__ct__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP10JKRArchive.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80456260-80456268 004860 0008+00 1/1 0/0 0/0 .sdata2 @1739 */
|
||||
@@ -289,6 +297,111 @@ SECTION_SDATA2 static f64 lit_1739 = 4503599627370496.0 /* cast u32 to float */;
|
||||
|
||||
/* 802FC1D4-802FC708 2F6B14 0534+00 0/0 1/1 0/0 .text
|
||||
* __ct__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP11J2DMaterial */
|
||||
#ifdef NONMATCHING
|
||||
J2DPicture::J2DPicture(J2DPane* p_pane, JSURandomInputStream* p_stream, J2DMaterial* p_material)
|
||||
: field_0x10a(), mPalette(NULL), mWhite(), mBlack(), mCornerColor(), field_0x148(),
|
||||
field_0x14c() {
|
||||
int position = p_stream->getPosition();
|
||||
|
||||
J2DPicHeader header;
|
||||
p_stream->read(&header, sizeof(header));
|
||||
mKind = 'PIC1';
|
||||
|
||||
int position2 = p_stream->getPosition();
|
||||
|
||||
J2DPaneHeader panHeader;
|
||||
p_stream->peek(&panHeader, sizeof(panHeader));
|
||||
p_pane->makePaneExStream(p_pane, p_stream);
|
||||
p_stream->seek(position2 + panHeader.mSize, JSUStreamSeekFrom_SET);
|
||||
|
||||
J2DScrnBlockPictureParameter picInfo;
|
||||
p_stream->read(&picInfo, sizeof(picInfo));
|
||||
u16 matNum = picInfo.field_0x4;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
field_0x10a[i] = picInfo.field_0x10[i];
|
||||
mCornerColor[i] = picInfo.mCornerColor[i];
|
||||
}
|
||||
|
||||
p_stream->seek(position + header.mSize, JSUStreamSeekFrom_SET);
|
||||
|
||||
J2DMaterial* material = NULL;
|
||||
if (matNum != 0xFFFF) {
|
||||
material = &p_material[matNum];
|
||||
}
|
||||
|
||||
mAlpha = 255;
|
||||
if (material != NULL) {
|
||||
mAlpha = material->getColorBlock()->getMatColor(0)->a;
|
||||
}
|
||||
|
||||
mBlack = JUtility::TColor(0);
|
||||
mWhite = JUtility::TColor(0xFFFFFFFF);
|
||||
mTextureCount = 0;
|
||||
|
||||
if (material != NULL && material->getTevBlock() != NULL) {
|
||||
u8 texgenNum = material->getTexGenBlock()->getTexGenNum();
|
||||
u32 stageNum = material->getTevBlock()->getTevStageNum();
|
||||
|
||||
if ((texgenNum == 1 && stageNum != 1) || (texgenNum != 1 && (int)stageNum != texgenNum + 1)) {
|
||||
J2DGXColorS10* color0p = material->getTevBlock()->getTevColor(0);
|
||||
GXColorS10 color0;
|
||||
color0.r = color0p->r;
|
||||
color0.g = color0p->g;
|
||||
color0.b = color0p->b;
|
||||
color0.a = color0p->a;
|
||||
|
||||
J2DGXColorS10* color1p = material->getTevBlock()->getTevColor(1);
|
||||
GXColorS10 color1;
|
||||
color1.r = color1p->r;
|
||||
color1.g = color1p->g;
|
||||
color1.b = color1p->b;
|
||||
color1.a = color1p->a;
|
||||
|
||||
mBlack = JUtility::TColor(((u8)color0.r << 0x18) | ((u8)color0.g << 0x10) |
|
||||
((u8)color0.b << 8) | (u8)color0.a);
|
||||
mWhite = JUtility::TColor(((u8)color1.r << 0x18) | ((u8)color1.g << 0x10) |
|
||||
((u8)color1.b << 8) | (u8)color1.a);
|
||||
}
|
||||
|
||||
if (texgenNum <= 2) {
|
||||
texgenNum = 2;
|
||||
}
|
||||
mTextureCount = texgenNum;
|
||||
}
|
||||
|
||||
field_0x109 = 0;
|
||||
|
||||
for (u32 i = 0; i < 2; i++) {
|
||||
mTexture[i] = NULL;
|
||||
|
||||
if (material != NULL && material->getTevBlock() != NULL) {
|
||||
JUTTexture* tex = material->getTevBlock()->getTexture(i);
|
||||
|
||||
if (tex != NULL) {
|
||||
mTexture[i] = tex;
|
||||
field_0x109 |= (1 << i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (material != NULL && material->getTevBlock() != NULL) {
|
||||
material->getTevBlock()->setUndeleteFlag(0xF0);
|
||||
}
|
||||
|
||||
mPalette = NULL;
|
||||
|
||||
JUtility::TColor color(0xFFFFFFFF);
|
||||
JUtility::TColor alpha(0xFFFFFFFF);
|
||||
if (material != NULL && material->getTevBlock() != NULL) {
|
||||
color = *material->getTevBlock()->getTevKColor(3);
|
||||
alpha = *material->getTevBlock()->getTevKColor(1);
|
||||
}
|
||||
|
||||
setBlendColorRatio(color.a, color.b);
|
||||
setBlendAlphaRatio(alpha.a, alpha.b);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -297,12 +410,31 @@ asm J2DPicture::J2DPicture(J2DPane* param_0, JSURandomInputStream* param_1, J2DM
|
||||
#include "asm/JSystem/J2DGraph/J2DPicture/__ct__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP11J2DMaterial.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80456268-8045626C 004868 0004+00 9/9 0/0 0/0 .sdata2 @1767 */
|
||||
SECTION_SDATA2 static f32 lit_1767 = 1.0f;
|
||||
|
||||
/* 802FC708-802FC800 2F7048 00F8+00 0/0 20/20 1/1 .text __ct__10J2DPictureFPC7ResTIMG */
|
||||
#ifdef NONMATCHING
|
||||
J2DPicture::J2DPicture(ResTIMG const* p_timg)
|
||||
: field_0x10a(), mWhite(), mBlack(), mCornerColor(), field_0x148(),
|
||||
field_0x14c() {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mTexture[i] = NULL;
|
||||
}
|
||||
|
||||
field_0x109 = 0;
|
||||
mTextureCount = 0;
|
||||
|
||||
if (p_timg != NULL) {
|
||||
append(p_timg, 1.0f);
|
||||
}
|
||||
mPalette = NULL;
|
||||
initinfo();
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -311,9 +443,26 @@ asm J2DPicture::J2DPicture(ResTIMG const* param_0) {
|
||||
#include "asm/JSystem/J2DGraph/J2DPicture/__ct__10J2DPictureFPC7ResTIMG.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802FC800-802FC8E8 2F7140 00E8+00 0/0 5/5 0/0 .text
|
||||
* __ct__10J2DPictureFUxRCQ29JGeometry8TBox2<f>PC7ResTIMGPC7ResTLUT */
|
||||
#ifdef NONMATCHING
|
||||
J2DPicture::J2DPicture(u64 tag, JGeometry::TBox2<f32> const& bounds,
|
||||
ResTIMG const* p_timg, ResTLUT const* p_tlut)
|
||||
: J2DPane(tag, bounds), field_0x10a(), mPalette(NULL), mWhite(), mBlack(), mCornerColor(), field_0x148(),
|
||||
field_0x14c() {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mTexture[i] = NULL;
|
||||
}
|
||||
|
||||
field_0x109 = 0;
|
||||
mTextureCount = 0;
|
||||
|
||||
private_initiate(p_timg, p_tlut);
|
||||
initinfo();
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -323,6 +472,7 @@ asm J2DPicture::J2DPicture(u64 param_0, JGeometry::TBox2<f32> const& param_1,
|
||||
#include "asm/JSystem/J2DGraph/J2DPicture/func_802FC800.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802FC8E8-802FCCDC 2F7228 03F4+00 1/1 0/0 0/0 .text
|
||||
* private_readStream__10J2DPictureFP7J2DPaneP20JSURandomInputStreamP10JKRArchive */
|
||||
@@ -374,7 +524,7 @@ asm void J2DPicture::private_initiate(ResTIMG const* param_0, ResTLUT const* par
|
||||
// matches with real literal
|
||||
#ifdef NONMATCHING
|
||||
void J2DPicture::initinfo() {
|
||||
id = 'PIC1';
|
||||
mKind = 'PIC1';
|
||||
setTexCoord(NULL, BIND15, MIRROR0, false);
|
||||
setBlendRatio(lit_1767, lit_1767);
|
||||
|
||||
@@ -400,7 +550,7 @@ J2DPicture::~J2DPicture() {
|
||||
delete mTexture[i];
|
||||
}
|
||||
}
|
||||
delete field_0x12c;
|
||||
delete mPalette;
|
||||
}
|
||||
|
||||
/* 802FD098-802FD168 2F79D8 00D0+00 1/0 0/0 0/0 .text prepareTexture__10J2DPictureFUc */
|
||||
|
||||
+110
-121
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -148,7 +148,7 @@ void J3DSys::drawInit() {
|
||||
GXSetCurrentMtx(GX_PNMTX0);
|
||||
GXSetCullMode(GX_CULL_BACK);
|
||||
GXSetCoPlanar(GX_FALSE);
|
||||
GXSetClipMode(GX_FALSE);
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
GXSetColorUpdate(GX_TRUE);
|
||||
GXSetDither(GX_TRUE);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_NOOP);
|
||||
@@ -244,7 +244,7 @@ void J3DSys::drawInit() {
|
||||
GXSetTevIndirect((GXTevStageID)i, GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_NONE, GX_ITM_OFF,
|
||||
GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
|
||||
|
||||
OSInitFastCast();
|
||||
i_OSInitFastCast();
|
||||
setTexCacheRegion(GX_TEXCACHE_32K);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,27 +7,6 @@
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JGeometry {
|
||||
template <typename A1>
|
||||
struct TVec3 {};
|
||||
/* TVec3<f32> */
|
||||
struct TVec3__template0 {};
|
||||
};
|
||||
|
||||
struct JAISoundID {};
|
||||
|
||||
struct JAISoundHandle {};
|
||||
|
||||
struct JAISoundStarter {
|
||||
/* 802A2F6C */ JAISoundStarter(bool);
|
||||
/* 802A2F88 */ ~JAISoundStarter();
|
||||
/* 802A2FEC */ void startLevelSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*);
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
@@ -39,9 +39,6 @@ extern "C" void* __nw__FUlP7JKRHeapi();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void __ct__9JKRThreadFP7JKRHeapUlii();
|
||||
extern "C" void __dt__9JKRThreadFv();
|
||||
extern "C" void OSInitThreadQueue();
|
||||
extern "C" void OSSleepThread();
|
||||
extern "C" void OSWakeupThread();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _savegpr_27();
|
||||
extern "C" void _savegpr_28();
|
||||
|
||||
@@ -560,7 +560,7 @@ void JFWDisplay::threadSleep(s64 time) {
|
||||
s32 status = OSDisableInterrupts();
|
||||
alarm.appendLink();
|
||||
|
||||
OSSetAlarm(&alarm, time, JFWThreadAlarmHandler);
|
||||
OSSetAlarm(&alarm, time, (OSAlarmHandler*)JFWThreadAlarmHandler);
|
||||
OSSuspendThread(alarm.getThread());
|
||||
OSRestoreInterrupts(status);
|
||||
}
|
||||
@@ -681,7 +681,7 @@ static void JFWDrawDoneAlarm() {
|
||||
s32 status = OSDisableInterrupts();
|
||||
alarm.createAlarm();
|
||||
alarm.appendLink();
|
||||
OSSetAlarm(&alarm, 0.5 * (*(u32*)0x800000F8 / 4), JFWGXAbortAlarmHandler);
|
||||
OSSetAlarm(&alarm, 0.5 * (*(u32*)0x800000F8 / 4), (OSAlarmHandler*)JFWGXAbortAlarmHandler);
|
||||
GXDrawDone();
|
||||
alarm.cancelAlarm();
|
||||
alarm.removeLink();
|
||||
|
||||
@@ -205,7 +205,7 @@ bool JKRAramArchive::open(s32 entryNum) {
|
||||
mExpandedSize =
|
||||
(s32*)JKRAllocFromHeap(mHeap, mArcInfoBlock->num_file_entries * 4, abs(align));
|
||||
if (mExpandedSize == NULL) {
|
||||
JKRFree(mArcInfoBlock);
|
||||
i_JKRFree(mArcInfoBlock);
|
||||
mMountMode = UNKNOWN_MOUNT_MODE;
|
||||
goto end;
|
||||
} else {
|
||||
@@ -218,10 +218,10 @@ bool JKRAramArchive::open(s32 entryNum) {
|
||||
mMountDirection == MOUNT_DIRECTION_HEAD ? JKRAramHeap::HEAD : JKRAramHeap::TAIL));
|
||||
if (mBlock == NULL) {
|
||||
if (mArcInfoBlock != NULL) {
|
||||
JKRFree(mArcInfoBlock);
|
||||
i_JKRFree(mArcInfoBlock);
|
||||
}
|
||||
if (mExpandedSize != NULL) {
|
||||
JKRFree(mExpandedSize);
|
||||
i_JKRFree(mExpandedSize);
|
||||
}
|
||||
mMountMode = UNKNOWN_MOUNT_MODE;
|
||||
} else {
|
||||
|
||||
@@ -200,7 +200,7 @@ s32 JKRAramStream::writeToAram(JKRAramStreamCommand* command) {
|
||||
}
|
||||
|
||||
if (command->mAllocatedTransferBuffer) {
|
||||
JKRFree(buffer);
|
||||
i_JKRFree(buffer);
|
||||
command->mAllocatedTransferBuffer = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ JKRDvdArchive::~JKRDvdArchive() {
|
||||
}
|
||||
|
||||
if (mExpandedSize) {
|
||||
JKRFree(mExpandedSize);
|
||||
i_JKRFree(mExpandedSize);
|
||||
mExpandedSize = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,12 +97,12 @@ extern "C" u8 mErrorHandler__7JKRHeap[4];
|
||||
//
|
||||
|
||||
/* 802CEDB4-802CEE2C 2C96F4 0078+00 0/0 1/1 0/0 .text createRoot__10JKRExpHeapFib */
|
||||
JKRExpHeap* JKRExpHeap::createRoot(int param_0, bool errorFlag) {
|
||||
JKRExpHeap* JKRExpHeap::createRoot(int maxHeaps, bool errorFlag) {
|
||||
JKRExpHeap* heap = NULL;
|
||||
if (!sRootHeap) {
|
||||
void* memory;
|
||||
u32 memorySize;
|
||||
initArena((char**)&memory, &memorySize, param_0);
|
||||
initArena((char**)&memory, &memorySize, maxHeaps);
|
||||
u8* start = (u8*)memory + ALIGN_NEXT(sizeof(JKRExpHeap), 0x10);
|
||||
u32 alignedSize = memorySize - ALIGN_NEXT(sizeof(JKRExpHeap), 0x10);
|
||||
heap = new (memory) JKRExpHeap(start, alignedSize, NULL, errorFlag);
|
||||
|
||||
@@ -204,27 +204,27 @@ void* JKRHeap::mUserRamEnd;
|
||||
u32 JKRHeap::mMemorySize;
|
||||
|
||||
/* 802CE378-802CE428 2C8CB8 00B0+00 0/0 1/1 0/0 .text initArena__7JKRHeapFPPcPUli */
|
||||
bool JKRHeap::initArena(char** memory, u32* size, int param_3) {
|
||||
bool JKRHeap::initArena(char** memory, u32* size, int maxHeaps) {
|
||||
u32 ram_start;
|
||||
u32 ram_end;
|
||||
u32 ram;
|
||||
void* ram;
|
||||
|
||||
u32 low = OSGetArenaLo();
|
||||
u32 high = OSGetArenaHi();
|
||||
void* low = OSGetArenaLo();
|
||||
void* high = OSGetArenaHi();
|
||||
if (low == high)
|
||||
return false;
|
||||
|
||||
ram = OSInitAlloc(low, high, param_3);
|
||||
ram_start = ALIGN_NEXT(ram, 0x20);
|
||||
ram_end = ALIGN_PREV(high, 0x20);
|
||||
ram = OSInitAlloc(low, high, maxHeaps);
|
||||
ram_start = ALIGN_NEXT((u32)ram, 0x20);
|
||||
ram_end = ALIGN_PREV((u32)high, 0x20);
|
||||
GLOBAL_MEMORY* globalMemory = (GLOBAL_MEMORY*)OSPhysicalToCached(0);
|
||||
mCodeStart = globalMemory;
|
||||
mCodeEnd = (void*)ram_start;
|
||||
mUserRamStart = (void*)ram_start;
|
||||
mUserRamEnd = (void*)ram_end;
|
||||
mMemorySize = globalMemory->memory_size;
|
||||
OSSetArenaLo(ram_end);
|
||||
OSSetArenaHi(ram_end);
|
||||
OSSetArenaLo((void*)ram_end);
|
||||
OSSetArenaHi((void*)ram_end);
|
||||
*memory = (char*)ram_start;
|
||||
*size = ram_end - ram_start;
|
||||
return true;
|
||||
|
||||
@@ -134,7 +134,6 @@ extern "C" void orderSync__9JKRDecompFPUcPUcUlUl();
|
||||
extern "C" void prepend__10JSUPtrListFP10JSUPtrLink();
|
||||
extern "C" void remove__10JSUPtrListFP10JSUPtrLink();
|
||||
extern "C" void panic_f__12JUTExceptionFPCciPCce();
|
||||
extern "C" void DCInvalidateRange();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_28();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user