mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Create and fill out printf.h, and link other files to it as needed.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
/* RAM_POS: 0x80070B30 */
|
||||
|
||||
#include "memory.h"
|
||||
#include "printf.h"
|
||||
|
||||
/************ .rodata ************/
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "font.h"
|
||||
#include "game_text.h"
|
||||
#include "object_models.h"
|
||||
#include "printf.h"
|
||||
|
||||
/**
|
||||
* @file Contains all the code used for every menu in the game.
|
||||
|
||||
+1
-27
@@ -1,37 +1,11 @@
|
||||
/* The comment below is needed for this file to be picked up by generate_ld */
|
||||
/* RAM_POS: 0x800B3140 */
|
||||
|
||||
#include "printf.h"
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "f3ddkr.h"
|
||||
|
||||
#define RENDER_PRINTF_CMD_ARG_BYTE(val) *D_801285D8 = val; D_801285D8++;
|
||||
#define RENDER_PRINTF_CMD_ARG_SHORT(val) RENDER_PRINTF_CMD_ARG_BYTE(val) RENDER_PRINTF_CMD_ARG_BYTE(val >> 8)
|
||||
|
||||
#define RENDER_PRINTF_CMD_END RENDER_PRINTF_CMD_ARG_BYTE(0)
|
||||
|
||||
#define RENDER_PRINTF_CMD_SET_COLOR(red, green, blue, alpha) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(0x81) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(red) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(green) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(blue) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(alpha) \
|
||||
RENDER_PRINTF_CMD_END
|
||||
|
||||
#define RENDER_PRINTF_CMD_SET_POSITION(x, y) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(0x82) \
|
||||
RENDER_PRINTF_CMD_ARG_SHORT(x) \
|
||||
RENDER_PRINTF_CMD_ARG_SHORT(y) \
|
||||
RENDER_PRINTF_CMD_END
|
||||
|
||||
#define RENDER_PRINTF_CMD_SET_BACKGROUND_COLOR(red, green, blue, alpha) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(0x85) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(red) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(green) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(blue) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(alpha) \
|
||||
RENDER_PRINTF_CMD_END
|
||||
|
||||
/************ .data ************/
|
||||
|
||||
s32 D_800E2EF0 = 0;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef _PRINTF_H_
|
||||
#define _PRINTF_H_
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
||||
#define RENDER_PRINTF_CMD_ARG_BYTE(val) *D_801285D8 = val; D_801285D8++;
|
||||
#define RENDER_PRINTF_CMD_ARG_SHORT(val) RENDER_PRINTF_CMD_ARG_BYTE(val) RENDER_PRINTF_CMD_ARG_BYTE(val >> 8)
|
||||
|
||||
#define RENDER_PRINTF_CMD_END RENDER_PRINTF_CMD_ARG_BYTE(0)
|
||||
|
||||
#define RENDER_PRINTF_CMD_SET_COLOR(red, green, blue, alpha) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(0x81) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(red) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(green) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(blue) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(alpha) \
|
||||
RENDER_PRINTF_CMD_END
|
||||
|
||||
#define RENDER_PRINTF_CMD_SET_POSITION(x, y) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(0x82) \
|
||||
RENDER_PRINTF_CMD_ARG_SHORT(x) \
|
||||
RENDER_PRINTF_CMD_ARG_SHORT(y) \
|
||||
RENDER_PRINTF_CMD_END
|
||||
|
||||
#define RENDER_PRINTF_CMD_SET_BACKGROUND_COLOR(red, green, blue, alpha) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(0x85) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(red) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(green) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(blue) \
|
||||
RENDER_PRINTF_CMD_ARG_BYTE(alpha) \
|
||||
RENDER_PRINTF_CMD_END
|
||||
|
||||
|
||||
void func_800B4A08(s32 arg0);
|
||||
void func_800B5E88(void);
|
||||
void set_render_printf_color(u8 red, u8 green, u8 blue, u8 alpha);
|
||||
void set_render_printf_background_color(u8 red, u8 green, u8 blue, u8 alpha);
|
||||
|
||||
void set_render_printf_position(u16 xpos, u16 ypos); // Non Matching
|
||||
|
||||
#endif
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "libultra_internal.h"
|
||||
#include "menu.h"
|
||||
#include "controller_pak.h"
|
||||
#include "printf.h"
|
||||
|
||||
/************ .rodata ************/
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "video.h"
|
||||
#include "lib/src/mips1/sc/sched.h"
|
||||
#include "gzip.h"
|
||||
#include "printf.h"
|
||||
|
||||
/************ .rodata ************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user