mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-23 13:40:02 +00:00
TPL 100%
This commit is contained in:
parent
caf329362c
commit
fe65cd6b88
@ -3,7 +3,24 @@
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "Game/System/NerveExecutor.h"
|
||||
|
||||
class AnimScaleParam;
|
||||
class AnimScaleParam {
|
||||
public:
|
||||
AnimScaleParam();
|
||||
|
||||
f32 _0;
|
||||
f32 _4;
|
||||
f32 _8;
|
||||
f32 _C;
|
||||
f32 _10;
|
||||
f32 _14;
|
||||
f32 _18;
|
||||
f32 _1C;
|
||||
f32 _20;
|
||||
f32 _24;
|
||||
f32 _28;
|
||||
u32 _2C;
|
||||
f32 _30;
|
||||
};
|
||||
|
||||
class AnimScaleController : public NerveExecutor {
|
||||
public:
|
||||
|
@ -220,7 +220,7 @@ def check_symbol(function_library, mangled_symbol, obj_name, readonly):
|
||||
print(f"Library {library} is currently not supported.")
|
||||
return False
|
||||
|
||||
obj_files = glob.glob(f"build/*/{library}/{obj_name}", recursive=True)
|
||||
obj_files = glob.glob(f"build/**/{obj_name}", recursive=True)
|
||||
|
||||
if len(obj_files) > 1:
|
||||
print("Found multiple .o files. This should not happen.")
|
||||
|
@ -1,3 +1,3 @@
|
||||
Symbol Name, Object File, Library Archive, Matching
|
||||
TPLBind,TPL.o,tpl.a,false
|
||||
TPLGet,TPL.o,tpl.a,false
|
||||
TPLBind,TPL.o,tpl.a,true
|
||||
TPLGet,TPL.o,tpl.a,true
|
||||
|
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "SDK",
|
||||
"message": "1.1788394883175823%",
|
||||
"message": "1.2305812532728226%",
|
||||
"color": "blue"
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
| [gd](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/gd.md) | 0.0% |
|
||||
| [gx](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/gx.md) | 3.0502169869807814% |
|
||||
| [ipc](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/ipc.md) | 0.0% |
|
||||
| [mem](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/mem.md) | 9.312638580931264% |
|
||||
| [mem](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/mem.md) | 9.977827050997783% |
|
||||
| [mtx](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/mtx.md) | 0.0% |
|
||||
| [nand](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/nand.md) | 0.0% |
|
||||
| [net](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/net.md) | 0.0% |
|
||||
@ -27,7 +27,7 @@
|
||||
| [sc](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/sc.md) | 0.0% |
|
||||
| [si](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/si.md) | 0.0% |
|
||||
| [thp](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/thp.md) | 0.0% |
|
||||
| [tpl](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/tpl.md) | 0.0% |
|
||||
| [tpl](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/tpl.md) | 100.0% |
|
||||
| [usb](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/usb.md) | 0.0% |
|
||||
| [vf](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/vf.md) | 0.0% |
|
||||
| [vi](https://github.com/shibbo/Petari/tree/master/libs/RVL_SDK/docs/lib/vi.md) | 0.0% |
|
||||
|
@ -11,7 +11,7 @@
|
||||
| mem_heapCommon.o | 0.0% | 0 / 3 | 0.0% | :x:
|
||||
| mem_expHeap.o | 0.0% | 0 / 9 | 0.0% | :x:
|
||||
| mem_allocator.o | 100.0% | 5 / 5 | 100.0% | :white_check_mark:
|
||||
| mem_list.o | 91.30434782608695% | 3 / 4 | 75.0% | :eight_pointed_black_star:
|
||||
| mem_list.o | 100.0% | 4 / 4 | 100.0% | :white_check_mark:
|
||||
|
||||
|
||||
# mem_heapCommon.o
|
||||
@ -49,7 +49,7 @@
|
||||
# mem_list.o
|
||||
| Symbol | Decompiled? |
|
||||
| ------------- | ------------- |
|
||||
| MEMInitList | :x: |
|
||||
| MEMInitList | :white_check_mark: |
|
||||
| MEMAppendListObject | :white_check_mark: |
|
||||
| MEMRemoveListObject | :white_check_mark: |
|
||||
| MEMGetNextListObject | :white_check_mark: |
|
||||
|
@ -8,13 +8,13 @@
|
||||
|
||||
| Object | Percentage (of Bytes) | Functions Done / Total Functions | Percentage (Functions) | Status
|
||||
| ------------- | ------------- | ------------- | ------------- | -------------
|
||||
| TPL.o | 0.0% | 0 / 2 | 0.0% | :x:
|
||||
| TPL.o | 100.0% | 2 / 2 | 100.0% | :white_check_mark:
|
||||
|
||||
|
||||
# TPL.o
|
||||
| Symbol | Decompiled? |
|
||||
| ------------- | ------------- |
|
||||
| TPLBind | :x: |
|
||||
| TPLGet | :x: |
|
||||
| TPLBind | :white_check_mark: |
|
||||
| TPLGet | :white_check_mark: |
|
||||
|
||||
|
||||
|
@ -730,6 +730,14 @@ typedef enum _GXCopyMode {
|
||||
GX_COPY_INTLC_ODD = 3
|
||||
} GXCopyMode;
|
||||
|
||||
typedef enum _GXTlutFmt {
|
||||
GX_TL_IA8 = 0x0,
|
||||
GX_TL_RGB565 = 0x1,
|
||||
GX_TL_RGB5A3 = 0x2,
|
||||
GX_MAX_TLUTFMT
|
||||
|
||||
} GXTlutFmt;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
41
libs/RVL_SDK/include/revolution/tpl.h
Normal file
41
libs/RVL_SDK/include/revolution/tpl.h
Normal file
@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include "revolution/gx.h"
|
||||
|
||||
typedef struct {
|
||||
u16 numEntries;
|
||||
u8 unpacked;
|
||||
u8 _4;
|
||||
GXTlutFmt format;
|
||||
char* data;
|
||||
} TPLClutHeader, *TPLClutHeaderPtr;
|
||||
|
||||
typedef struct {
|
||||
u16 height;
|
||||
u16 width;
|
||||
u32 format;
|
||||
char* data;
|
||||
GXTexWrapMode wrapS;
|
||||
GXTexWrapMode wrapT;
|
||||
GXTexFilter minFilter;
|
||||
GXTexFilter magFilter;
|
||||
f32 LODBias;
|
||||
u8 edgeLODEnable;
|
||||
u8 minLOD;
|
||||
u8 maxLOD;
|
||||
u8 unpacked;
|
||||
} TPLHeader, *TPLHeaderPtr;
|
||||
|
||||
typedef struct {
|
||||
TPLHeaderPtr textureHeader;
|
||||
TPLClutHeaderPtr CLUTHeader;
|
||||
} TPLDescriptor, *TPLDescriptorPtr;
|
||||
|
||||
typedef struct {
|
||||
u32 versionNumber;
|
||||
u32 numDescriptors;
|
||||
TPLDescriptorPtr descriptorArray;
|
||||
} TPLPalette, *TPLPalettePtr;
|
||||
|
||||
void TPLBind(TPLPalettePtr);
|
||||
TPLDescriptorPtr TPLGet(TPLPalettePtr, u32);
|
37
libs/RVL_SDK/source/revolution/TPL.c
Normal file
37
libs/RVL_SDK/source/revolution/TPL.c
Normal file
@ -0,0 +1,37 @@
|
||||
#include "revolution/tpl.h"
|
||||
#include "revolution/os.h"
|
||||
|
||||
void TPLBind(TPLPalettePtr ptr) {
|
||||
u16 i;
|
||||
|
||||
if (ptr->versionNumber != 2142000) {
|
||||
OSPanic(__FILE__, 0x19, "invalid version number for texture palette");
|
||||
}
|
||||
|
||||
ptr->descriptorArray = (TPLDescriptorPtr)(((u32)(ptr->descriptorArray)) + ((u32)ptr));
|
||||
|
||||
for (i = 0; i < ptr->numDescriptors; i++) {
|
||||
if (ptr->descriptorArray[i].textureHeader) {
|
||||
ptr->descriptorArray[i].textureHeader = (TPLHeaderPtr)(((u32)(ptr->descriptorArray[i].textureHeader)) + ((u32)ptr));
|
||||
|
||||
if (!ptr->descriptorArray[i].textureHeader->unpacked) {
|
||||
ptr->descriptorArray[i].textureHeader->data = (char*)((u32)(ptr->descriptorArray[i].textureHeader->data) + (u32)ptr);
|
||||
ptr->descriptorArray[i].textureHeader->unpacked = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr->descriptorArray[i].CLUTHeader) {
|
||||
ptr->descriptorArray[i].CLUTHeader = (TPLClutHeaderPtr)((u32)(ptr->descriptorArray[i].CLUTHeader) + (u32)ptr);
|
||||
|
||||
if (!ptr->descriptorArray[i].CLUTHeader->unpacked) {
|
||||
ptr->descriptorArray[i].CLUTHeader->data = (char*)((u32)(ptr->descriptorArray[i].CLUTHeader->data) + (u32)ptr);
|
||||
ptr->descriptorArray[i].CLUTHeader->unpacked = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TPLDescriptorPtr TPLGet(TPLPalettePtr ptr, u32 id) {
|
||||
id %= ptr->numDescriptors;
|
||||
return &ptr->descriptorArray[id];
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
#include <revolution/dsp/dsp_debug.h>
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
#include <va_list.h>
|
||||
|
||||
void __DSP_debug_printf(char *pFormat, ...) {
|
||||
// oops. code was probably #ifdef'd out at some point
|
||||
|
Loading…
Reference in New Issue
Block a user