Start decompiling printfunc.c

This commit is contained in:
gamemasterplc 2023-11-23 15:55:25 -06:00
parent 39286d7a62
commit c21da819d8
8 changed files with 194 additions and 44 deletions

View file

@ -3,6 +3,7 @@
#include "types.h"
#include "common_structs.h"
#include "dolphin/gx/GXStruct.h"
void Hu3DBGColorSet(u8, u8, u8);
void Hu3DCameraCreate(s16);
@ -67,6 +68,10 @@ void omOvlGotoEx(int id, s16 end_mode, int stat, int event);
void omOvlReturnEx(int level, s16 end_mode);
void WipeCreate(char dir, char type, short duration);
u16 print8(s16 x, s16 y, float scale, char *str, ...);
void pfInit(void);
void pfClsScr(void);
s16 print8(s16 x, s16 y, float scale, char *str, ...);
s16 printWin(s16 x, s16 y, s16 w, s16 h, GXColor *color);
void pfDrawFonts(void);
#endif

19
include/stdarg.h Normal file
View file

@ -0,0 +1,19 @@
#ifndef STDARG_H
#define STDARG_H
typedef struct {
char gpr;
char fpr;
char reserved[2];
char* input_arg_area;
char* reg_save_area;
} __va_list[1];
typedef __va_list va_list;
void* __va_arg(va_list v_list, unsigned char type);
#define va_start(ap, fmt) ((void) fmt, __builtin_va_info(&ap))
#define va_arg(ap, t) (*((t*) __va_arg(ap, _var_arg_typeof(t))))
#define va_end(ap) (void) 0
#endif

12
include/stdio.h Normal file
View file

@ -0,0 +1,12 @@
#ifndef _STDIO_H_
#define _STDIO_H_
#include "stdarg.h"
int puts(const char* s);
int printf(const char*, ...);
int sprintf(char* s, const char* format, ...);
int vprintf(const char* format, va_list arg);
int vsprintf(char* s, const char* format, va_list arg);
#endif

View file

@ -4,11 +4,13 @@
#include "types.h"
#include "common_structs.h"
#include "dolphin/os.h"
#include "dolphin/gx/GXStruct.h"
extern u16 HuPadBtnDown[4];
extern u8 HuPadDStk[4];
extern OSHeapHandle currentHeapHandle;
extern GXRenderModeObj *RenderMode;
extern BOOL saftyFrameF;
extern u16 strlinecnt;