mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-03 00:24:19 +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
45 lines
954 B
C
45 lines
954 B
C
|
|
#ifndef LIBWBFS_GLUE_H
|
|
#define LIBWBFS_GLUE_H
|
|
|
|
#include <gctypes.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <gccore.h>
|
|
#include <malloc.h>
|
|
|
|
#include "utils.h"
|
|
#include "mem2.hpp"
|
|
#include "gecko/gecko.h"
|
|
#include "loader/disc.h"
|
|
|
|
#define wbfs_fatal(x) do { gprintf(x); wd_last_error = 1; } while(0)
|
|
#define wbfs_error(x) do { gprintf(x); wd_last_error = 2; } while(0)
|
|
|
|
/* Thanks to cfg-loader */
|
|
#define wbfs_malloc(x) calloc(x, 1)
|
|
#define wbfs_free(x) free(x)
|
|
|
|
static inline void *wbfs_ioalloc(size_t x)
|
|
{
|
|
void *p = memalign(32, x);
|
|
if(p)
|
|
memset(p, 0, x);
|
|
return p;
|
|
}
|
|
#define wbfs_iofree(x) free(x)
|
|
|
|
#define wbfs_be16(x) (*((u16*)(x)))
|
|
#define wbfs_be32(x) (*((u32*)(x)))
|
|
#define wbfs_ntohl(x) (x)
|
|
#define wbfs_htonl(x) (x)
|
|
#define wbfs_ntohs(x) (x)
|
|
#define wbfs_htons(x) (x)
|
|
|
|
#define wbfs_memcmp(x,y,z) memcmp(x,y,z)
|
|
#define wbfs_memcpy(x,y,z) memcpy(x,y,z)
|
|
#define wbfs_memset(x,y,z) memset(x,y,z)
|
|
|
|
#endif
|