mirror of
https://github.com/zeldaret/tp
synced 2026-08-30 01:20:14 -04:00
some J3D/misc cleanup (#2628)
* some j3d cleanup * begin using uintptr_t * j3dgraphbase cleanup * j3dgraphanimator cleanup
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "JSystem/JUtility/JUTDirectFile.h"
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
#include <stdint.h>
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
@@ -47,7 +48,7 @@ JUTDirectFile::JUTDirectFile() {
|
||||
mLength = 0;
|
||||
mPos = 0;
|
||||
mToRead = 0;
|
||||
mSectorStart = (u8*)ALIGN_NEXT((u32)mBuffer, DVD_MIN_TRANSFER_SIZE);
|
||||
mSectorStart = (u8*)ALIGN_NEXT((uintptr_t)mBuffer, DVD_MIN_TRANSFER_SIZE);
|
||||
mIsOpen = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ void JUTDirectPrint::printSub(u16 position_x, u16 position_y, char const* format
|
||||
return;
|
||||
}
|
||||
|
||||
int buffer_length = vsnprintf(buffer, ARRAY_SIZE(buffer), format, args);
|
||||
int buffer_length = vsnprintf(buffer, ARRAY_SIZEU(buffer), format, args);
|
||||
u16 x = position_x;
|
||||
if (buffer_length > 0) {
|
||||
if (clear) {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <dolphin.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* 803CC620-803CC640 029740 0020+00 3/3 0/0 0/0 .data sMessageQueue__12JUTException */
|
||||
OSMessageQueue JUTException::sMessageQueue = {0};
|
||||
@@ -191,7 +192,7 @@ void JUTException::panic_f_va(char const* file, int line, char const* format, va
|
||||
|
||||
OSContext* current_context = OSGetCurrentContext();
|
||||
memcpy(&context, current_context, sizeof(OSContext));
|
||||
sErrorManager->mStackPointer = (u32)OSGetStackPointer();
|
||||
sErrorManager->mStackPointer = (uintptr_t)OSGetStackPointer();
|
||||
|
||||
exCallbackObject.callback = sPreUserCallback;
|
||||
exCallbackObject.error = 0xFF;
|
||||
@@ -468,10 +469,10 @@ bool JUTException::showMapInfo_subroutine(u32 address, bool begin_with_newline)
|
||||
if (result == true) {
|
||||
result =
|
||||
queryMapAddress((char*)name_part, section_offset, section_id, &out_addr, &out_size,
|
||||
out_line, ARRAY_SIZE(out_line), true, begin_with_newline);
|
||||
out_line, ARRAY_SIZEU(out_line), true, begin_with_newline);
|
||||
} else {
|
||||
result = queryMapAddress(NULL, address, -1, &out_addr, &out_size, out_line,
|
||||
ARRAY_SIZE(out_line), true, begin_with_newline);
|
||||
ARRAY_SIZEU(out_line), true, begin_with_newline);
|
||||
}
|
||||
|
||||
if (result == true) {
|
||||
@@ -826,7 +827,7 @@ void JUTException::createFB() {
|
||||
u32 pixel_count = width * height;
|
||||
u32 size = pixel_count * 2;
|
||||
|
||||
void* begin = (void*)ALIGN_PREV((u32)end - size, 32);
|
||||
void* begin = (void*)ALIGN_PREV((uintptr_t)end - size, 32);
|
||||
void* object = (void*)ALIGN_PREV((s32)begin - sizeof(JUTExternalFB), 32);
|
||||
new (object) JUTExternalFB(renderMode, GX_GM_1_7, begin, size);
|
||||
|
||||
@@ -934,7 +935,7 @@ bool JUTException::queryMapAddress_single(char* mapPath, u32 address, s32 sectio
|
||||
char* src;
|
||||
char* dst;
|
||||
|
||||
if (file.fgets(buffer, ARRAY_SIZE(buffer)) < 0)
|
||||
if (file.fgets(buffer, ARRAY_SIZEU(buffer)) < 0)
|
||||
break;
|
||||
if (buffer[0] != '.')
|
||||
continue;
|
||||
@@ -968,7 +969,7 @@ bool JUTException::queryMapAddress_single(char* mapPath, u32 address, s32 sectio
|
||||
int length;
|
||||
|
||||
while (true) {
|
||||
if ((length = file.fgets(buffer, ARRAY_SIZE(buffer))) <= 4)
|
||||
if ((length = file.fgets(buffer, ARRAY_SIZEU(buffer))) <= 4)
|
||||
break;
|
||||
if ((length < 28))
|
||||
continue;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTVideo.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/* 802E5888-802E599C 2E01C8 0114+00 1/1 0/0 0/0 .text __ct__10JUTProcBarFv */
|
||||
JUTProcBar::JUTProcBar() {
|
||||
@@ -263,7 +264,7 @@ void JUTProcBar::drawProcessBar() {
|
||||
|
||||
/* 802E6D3C-802E6DA4 2E167C 0068+00 2/2 0/0 0/0 .text addrToXPos__FPvi */
|
||||
static int addrToXPos(void* param_0, int param_1) {
|
||||
return param_1 * (((u32)param_0 - 0x80000000) / (float)JKRHeap::mMemorySize);
|
||||
return param_1 * (((uintptr_t)param_0 - 0x80000000) / (float)JKRHeap::mMemorySize);
|
||||
}
|
||||
|
||||
/* 802E6DA4-802E6E0C 2E16E4 0068+00 2/2 0/0 0/0 .text byteToXLen__Fii */
|
||||
|
||||
Reference in New Issue
Block a user