-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui_interface.c
49 lines (43 loc) · 966 Bytes
/
ui_interface.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "ui_interface.h"
#include <stdio.h>
#ifdef REAL_N64
#include <PR/ultratypes.h>
#include <PR/gbi.h>
#endif
void ui_init() {
#ifdef REAL_N64
printf("[UI] Initializing RDP (REAL_N64).\n");
#else
printf("[UI] ui_init (mock environment).\n");
#endif
}
void ui_draw_text(int x, int y, const char* text) {
#ifdef REAL_N64
// Real drawing with RDP
#else
printf("[UI] draw_text(%d,%d): %s\n", x, y, text);
#endif
}
void ui_show_transferpak_state(bool connected, int attempts) {
#ifdef REAL_N64
// Possibly display an icon on real hardware
#else
if(!connected){
printf("[UI] TransferPak disconnected (attempts=%d)\n", attempts);
} else {
printf("[UI] TransferPak connected.\n");
}
#endif
}
void ui_update_frame() {
#ifdef REAL_N64
// Might do an osViSwapBuffer call or so
#endif
}
void ui_close() {
#ifdef REAL_N64
printf("[UI] Closing RDP real.\n");
#else
printf("[UI] ui_close (mock).\n");
#endif
}