mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-24 04:09:15 +01:00
88955e9461
which has enough space left instead of fixed memory in most parts -fixed alot of things about banner playing, now shouldnt randomly codedump anymore or things like this, also some banner sounds which did not play before should work fine now -removed unused code and added better debug prints -using some fixed voice for game banner and not always a new one per banner -fixed DIOS-MIOS cheats for sure now :P -fixed possible memory allocation bug in wbfs alloc (thanks to cfg-loader) -removed MEM2_memalign since it did not work correctly -fixed a few wrong memset sizes
39 lines
873 B
C++
39 lines
873 B
C++
// 1 MEM2 allocator, one for general purpose
|
|
// Aligned and padded to 32 bytes, as required by many functions
|
|
|
|
#ifndef __MEM2_HPP
|
|
#define __MEM2_HPP
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#define MAX_MEM1_ARENA_LO ((void *)(0x81700000-size))
|
|
#define MEM2_PRIORITY_SIZE 0x1000
|
|
|
|
void *MEM1_alloc(unsigned int s);
|
|
void *MEM1_memalign(unsigned int a, unsigned int s);
|
|
void *MEM1_realloc(void *p, unsigned int s);
|
|
void MEM1_free(void *p);
|
|
unsigned int MEM1_freesize();
|
|
void MEM2_init(unsigned int mem2Size);
|
|
void MEM2_cleanup(void);
|
|
void MEM2_clear(void);
|
|
void MEM2_free(void *p);
|
|
void *MEM2_alloc(unsigned int s);
|
|
void *MEM2_realloc(void *p, unsigned int s);
|
|
unsigned int MEM2_usableSize(void *p);
|
|
unsigned int MEM2_freesize();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
enum Alloc
|
|
{
|
|
ALLOC_MALLOC,
|
|
ALLOC_MEM2,
|
|
};
|
|
|
|
#endif // !defined(__MEM2_HPP)
|