dd_proc.c
1.64 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo.
$RCSfile: dd_proc.c,v $
$Revision: 1.1.1.1 $
$Date: 2002/05/02 03:27:21 $
*---------------------------------------------------------------------*/
#include "hmenu.h"
#include "herr.h"
OSMesgQueue myQ;
OSMesg myQBuf[1];
u16 _trig;
static s32 _curscrn = SCREEN_TOPGUN;
void dd_proc(void);
void scr_topgun(void);
void
dd_proc(void)
{
static s32 _first=1;
if(_first)
{
osCreateMesgQueue(&myQ, myQBuf, 1);
si_create();
video_create();
rst_create();
dd_create();
osViBlack(0);
_first--;
}
video_flush();
_trig = sb_jpad(si_getTrigger(0));
if(_trig)
{
switch(_trig)
{
case A_BUTTON:
break;
}
}
switch( _curscrn )
{
case SCREEN_MENU:
scr_menu();
break;
case SCREEN_RTC:
scr_rtc();
break;
case SCREEN_SUMMON:
scr_summon();
break;
case SCREEN_TOPGUN:
scr_topgun();
break;
default:
break;
}
scr_error();
video_finishDLMode();
}
void
scr_topgun(void)
{
if( main_getScreen() == SCREEN_TOPGUN )/* */
{
switch(_trig)
{
case A_BUTTON:
main_setScreen(SCREEN_MENU);
return;
default:
break;
}
}
}
void
main_setScreen(s32 i)
{
_trig = 0;
_curscrn = i;
}
s32
main_getScreen()
{
return _curscrn;
}
extern Gfx * glistp;
Gfx *
video_getDL()
{
return glistp;
}
s32
video_setDL( Gfx * pgfx )
{
glistp = pgfx;
return -1;
}