You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
removed unnecessary stack.c; refactoring stuff
This commit is contained in:
7
config.h
7
config.h
@@ -4,15 +4,18 @@
|
||||
// include your font header here
|
||||
#include "fonts/impact.h"
|
||||
|
||||
// get your symbols defined here
|
||||
// get your font symbols defined here
|
||||
#define s2d_font impact_obj
|
||||
#define s2d_tex impact_tex
|
||||
|
||||
// Debug: bypass custom matrix setup
|
||||
#define s2d_mat impact_mtx
|
||||
|
||||
// homebrew users: use this to rename your gdl head
|
||||
// Homebrew users: use this to rename your gdl head
|
||||
#define gdl_head gDisplayListHead
|
||||
extern Gfx *gdl_head;
|
||||
|
||||
// Other games: change this to the appropriate alloc function
|
||||
#define alloc alloc_display_list
|
||||
|
||||
#endif
|
||||
22
s2d_parse.c
22
s2d_parse.c
@@ -26,6 +26,8 @@ int s2d_atoi(char *s, char **s2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern u32 gGlobalTimer;
|
||||
|
||||
void s2d_print(int x, int y, const char *str, uObjMtx *buf) {
|
||||
char *p = str;
|
||||
int tx = 0, ty = 0;
|
||||
@@ -36,33 +38,33 @@ void s2d_print(int x, int y, const char *str, uObjMtx *buf) {
|
||||
int s, rd;
|
||||
switch (r) {
|
||||
case CH_SCALE:
|
||||
CH_GET_NEXT(p);
|
||||
CH_SKIP(p);
|
||||
s = s2d_atoi(p, &p);
|
||||
myScale = s;
|
||||
break;
|
||||
case CH_ROT:
|
||||
CH_GET_NEXT(p);
|
||||
CH_SKIP(p);
|
||||
rd = s2d_atoi(p, &p);
|
||||
saved_degrees = rd;
|
||||
myDegrees = rd;
|
||||
break;
|
||||
case CH_TRANSLATE:
|
||||
CH_GET_NEXT(p);
|
||||
CH_SKIP(p);
|
||||
x = s2d_atoi(p, &p);
|
||||
CH_GET_NEXT(p);
|
||||
CH_GET_NEXT(p);
|
||||
CH_SKIP(p);
|
||||
CH_SKIP(p);
|
||||
y = s2d_atoi(p, &p);
|
||||
break;
|
||||
case CH_COLOR:
|
||||
CH_GET_NEXT(p);
|
||||
CH_SKIP(p);
|
||||
s2d_red = s2d_atoi(p, &p);
|
||||
CH_GET_NEXT(p); CH_GET_NEXT(p);
|
||||
CH_SKIP(p); CH_SKIP(p);
|
||||
|
||||
s2d_green = s2d_atoi(p, &p);
|
||||
CH_GET_NEXT(p); CH_GET_NEXT(p);
|
||||
CH_SKIP(p); CH_SKIP(p);
|
||||
|
||||
s2d_blue = s2d_atoi(p, &p);
|
||||
CH_GET_NEXT(p); CH_GET_NEXT(p);
|
||||
CH_SKIP(p); CH_SKIP(p);
|
||||
|
||||
s2d_alpha = s2d_atoi(p, &p);
|
||||
break;
|
||||
@@ -75,7 +77,7 @@ void s2d_print(int x, int y, const char *str, uObjMtx *buf) {
|
||||
draw_s2d_glyph(r, (x += ((8 * myScale))) + tx, y + ty, (buf++));
|
||||
}
|
||||
// myDegrees += saved_degrees;
|
||||
} while (*(++p) != '\0');
|
||||
} while (*p != '\0');
|
||||
myScale = 1;
|
||||
myDegrees = 0;
|
||||
saved_degrees = 0;
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
#define CH_TRANSLATE '\x82'
|
||||
#define CH_COLOR '\x83'
|
||||
|
||||
// ASCII standard escape codes
|
||||
#define CH_NEWLINE '\n'
|
||||
|
||||
#define CH_GET_NEXT(x) (*(++x))
|
||||
#define CH_SKIP(x) ((++x))
|
||||
|
||||
extern void s2d_print(int x, int y, const char *str, uObjMtx *buf);
|
||||
|
||||
Reference in New Issue
Block a user