dd_proc.c
1.49 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
/*---------------------------------------------------------------------*
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"
u16 _trig;
static s32 _curscrn = SCREEN_ONETRI;
void dd_proc(void);
void scr_onetri(void);
void
dd_proc(void)
{
static s32 _first=1;
if(_first)
{
si_create();
video_create();
rst_create();
dd_create();
osViBlack(0);
_first--;
}
video_flush();
_trig = sb_jpad(si_getTrigger(0));
switch( _curscrn )
{
case SCREEN_MENU:
scr_menu();
break;
case SCREEN_ONETRI:
scr_onetri();
break;
default:
break;
}
scr_error();
video_finishDLMode();
}
extern s32 do_texture;
void
scr_onetri(void)
{
if( main_getScreen() == SCREEN_ONETRI )/* */
{
switch(_trig)
{
case L_TRIG:
case R_TRIG:
do_texture ^= 1;
break;
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;
}