mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Added function signatures to asset_loading.h, and cleaned up one from memory
This commit is contained in:
+3
-8
@@ -5,7 +5,6 @@
|
||||
#include "memory.h"
|
||||
|
||||
//#include "assets.h"
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "ultra64.h"
|
||||
|
||||
@@ -23,16 +22,12 @@ s32 *gAssetsLookupTable;
|
||||
|
||||
// These are both defined in the generated dkr.ld file.
|
||||
extern u8 __ASSETS_LUT_START, __ASSETS_LUT_END; // __ASSETS_LUT_START = 0xECB60, _END = 0xECC30
|
||||
|
||||
void *allocate_from_main_pool_safe(s32, s32);
|
||||
s32 func_80071478(s32*);
|
||||
void dmacopy(u32 romOffset, u8 *ramAddress, s32 numBytes);
|
||||
|
||||
void func_80076BA0(void) {
|
||||
u32 assetTableSize;
|
||||
osCreateMesgQueue(&D_80124278, &D_80124238, 16);
|
||||
osCreateMesgQueue(&D_80124220, &D_80124218, 1);
|
||||
osCreatePiManager(150, &D_80124278, &D_80124238, 16);
|
||||
osCreatePiManager((OSPri) 150, &D_80124278, &D_80124238, 16);
|
||||
assetTableSize = &__ASSETS_LUT_END - &__ASSETS_LUT_START;
|
||||
gAssetsLookupTable = (s32*)allocate_from_main_pool_safe(assetTableSize, COLOR_TAG_GRAY);
|
||||
func_80071478(gAssetsLookupTable);
|
||||
@@ -180,8 +175,8 @@ s32 get_size_of_asset_section(u32 assetIndex) {
|
||||
/**
|
||||
* Copies data from the game cartridge to a ram address.
|
||||
*/
|
||||
void dmacopy(u32 romOffset, u8 *ramAddress, s32 numBytes) {
|
||||
s32 sp4C;
|
||||
void dmacopy(u32 romOffset, u32 ramAddress, s32 numBytes) {
|
||||
OSMesg *sp4C;
|
||||
s32 numBytesToDMA;
|
||||
|
||||
osInvalDCache(ramAddress, numBytes);
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef _UNKNOWN_0777A0_H_
|
||||
#define _UNKNOWN_0777A0_H_
|
||||
|
||||
#include "types.h"
|
||||
|
||||
void func_80076BA0(void);
|
||||
s32 *load_asset_section_from_rom(u32 assetIndex);
|
||||
s32 load_asset_section_from_rom_to_address(u32 assetIndex, s32 *address);
|
||||
s32 load_asset_to_address(u32 assetIndex, s32 *address, s32 assetOffset, s32 size);
|
||||
u8 *get_rom_offset_of_asset(u32 assetIndex, s32 assetOffset);
|
||||
s32 get_size_of_asset_section(u32 assetIndex);
|
||||
void dmacopy(u32 romOffset, u32 ramAddress, s32 numBytes);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -124,7 +124,6 @@ typedef struct audioMgrConfig_s{
|
||||
void func_80000968(s32 arg0);
|
||||
ALCSPlayer *func_80002224(s32, s32);
|
||||
void func_8000B010(ALCSPlayer*, u8);
|
||||
void *allocate_from_main_pool_safe(u32, u32);
|
||||
void *load_asset_section_from_rom(u32);
|
||||
void *alHeapDBAlloc(u8 *file, s32 line, ALHeap *hp, s32 num, s32 size);
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef _MEMORY_H_
|
||||
#define _MEMORY_H_
|
||||
|
||||
#include "types.h"
|
||||
|
||||
// Animation related?
|
||||
#define COLOR_TAG_RED 0xFF0000FF
|
||||
// Object related?
|
||||
@@ -22,4 +24,7 @@
|
||||
// ???
|
||||
#define COLOR_TAG_BLACK 0x000000FF
|
||||
|
||||
void *allocate_from_main_pool_safe(s32 size, u32 colorTag);
|
||||
s32 func_80071478(u8 *address);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -209,7 +209,6 @@ s32 is_in_tracks_mode(void);
|
||||
s32 *load_asset_section_from_rom(s32);
|
||||
void load_asset_to_address(u32, s32*, s32, s32);
|
||||
void free_from_memory_pool(s32*);
|
||||
void *allocate_from_main_pool_safe(s32, s32);
|
||||
void func_8006C1AC(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
|
||||
void func_8006C2E4(void);
|
||||
s16 func_8006C2F0(void);
|
||||
|
||||
Reference in New Issue
Block a user