-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreactor.c.back
executable file
·156 lines (134 loc) · 2.47 KB
/
reactor.c.back
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#include <vectrex.h>
#include "shapes.h"
#define MAX_BRIGHTNESS (0x7f)
/* nothing wrong with global */
char coatroom = 'n';
int main(void)
{
char dir = 'G';
int x=0, i;
signed char spike_x = 0;
signed char spike_y = 0;
setup();
for(;;)
{
wait_recal();
sound_update();
sound_output();
intensity(MAX_BRIGHTNESS);
// draw_core();
set_scale(195);
zero_beam();
draw_vector_list_pattern(Pit);
set_scale(60);
for (i = 0; i < 5 ; i++)
{
move_to(-30,-30);
draw_vector_list(Switches);
}
// end drawcore
zero_beam();
// move_to(19,-76);
if (x >= 195)
dir = 'S';
if (x <= 0)
dir = 'G';
if ( dir == 'G' )
x++;
else
x--;
set_scale(x);
draw_vector_list_pattern(Core);
// #define DRAW_SCALE 190
// set_scale(DRAW_SCALE);
// draw_pit();
// draw_switch(coatroom);
draw_spud();
// draw_deadspike();
// #define MOVE_SCALE 20
set_scale(200);
zero_beam();
move_to(spike_x, spike_y);
#define DRAW_SCALE 20
set_scale(DRAW_SCALE);
draw_vector_list_pattern(Spike);
/* joystick shit here to end */
if (joystick1_x < 0)
spike_x-=3;
else if (joystick1_x > 0)
spike_x+=3;
if (joystick1_y < 0)
spike_y-=3;
else if (joystick1_y > 0)
spike_y+=3;
joy_digital();
}
return 0; /* should never reach this */
}
void sound_update(void)
{
;
}
void sound_output(void)
{
;
}
void draw_switch(char x)
{
#define SWITCH_SCALE 20
set_scale(SWITCH_SCALE);
move_to(-50,-50);
draw_vector_list(Switches);
move_to(-100,-75);
draw_vector_list(Switches);
return;
}
void draw_pit(void)
{
#define DRAW_SCALE 190
set_scale(DRAW_SCALE);
draw_vector_list_pattern(Pit);
return;
}
void draw_core(void)
{
static int x=0;
x++;
if (x > 180)
x=0;
#define DRAW_SCALE 40
set_scale(x);
move_to(40,-100);
draw_vector_list(Core);
return;
}
void draw_spud(void)
{
#define DRAW_SCALE 30
set_scale(DRAW_SCALE);
zero_beam();
move_to(150,-100);
draw_vector_list_pattern(Spud);
return;
}
void draw_deadspike(void)
{
#define MOVE_SCALE 20
move_to(200,100);
#define DRAW_SCALE 40
set_scale(DRAW_SCALE);
draw_vector_list_pattern(Dead_Spike);
return;
}
void setup(void)
{
enable_joystick_1x();
enable_joystick_1y();
disable_joystick_2x();
disable_joystick_2y();
joy_digital();
read_buttons();
wait_recal();
read_buttons();
wait_recal();
}