-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpong.sqs
More file actions
211 lines (177 loc) · 4.22 KB
/
Copy pathpong.sqs
File metadata and controls
211 lines (177 loc) · 4.22 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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
woomy __DEBUG 0
woomy res_x 30
woomy res_y 10
woomy field_x res_x
woomy field_x - 1
woomy field_y res_y
woomy field_y - 1
woomy player_x 2
woomy player_y 5
woomy player_score 0
woomy ball_x 15
woomy ball_y 5
woomy ball_dir_x -1
woomy ball_dir_y 1
ouch! clear_screen
veemo clear_screen_code from: [2J
booyah? 27
booyah!! clear_screen_code
ouch?
# This assumes variables CURSER_X and CURSER_Y are set
ouch! set_cursor_position
booyah? 27
booyah? '[
booyah! CURSER_Y
booyah? ';
booyah! CURSER_X
booyah? 'H
ouch?
ouch! reset_effects
veemo reset_effects_str
veemo 27 -> reset_effects_str [1]
veemo '[ -> reset_effects_str [2]
veemo '0 -> reset_effects_str [3]
veemo 'm -> reset_effects_str [4]
booyah!! reset_effects_str
veemo '4 -> reset_effects_str [3]
veemo '0 -> reset_effects_str [4]
veemo 'm -> reset_effects_str [5]
booyah!! reset_effects_str
ouch?
ouch! draw_ball
woomy CURSER_X ball_x
woomy CURSER_Y ball_y
ouch@ set_cursor_position
booyah? 'o
ouch?
ouch! draw_outline
veemo outline
veemo 27 -> outline [1]
veemo '[ -> outline [2]
veemo '4 -> outline [3]
veemo '7 -> outline [4]
veemo 'm -> outline [5]
veemo 32 -> outline [6]
woomy CURSER_X 1
woomy CURSER_Y 1
oomy CURSER_X <= res_x
ouch@ set_cursor_position
booyah!! outline
woomy CURSER_X + 1
ngyes
woomy CURSER_X 1
woomy CURSER_Y 1
oomy CURSER_Y <= res_y
ouch@ set_cursor_position
booyah!! outline
woomy CURSER_Y + 1
ngyes
woomy CURSER_X 1
woomy CURSER_Y res_y
oomy CURSER_X <= res_x
ouch@ set_cursor_position
booyah!! outline
woomy CURSER_X + 1
ngyes
woomy CURSER_X res_x
woomy CURSER_Y 1
oomy CURSER_Y <= res_y
ouch@ set_cursor_position
booyah!! outline
woomy CURSER_Y + 1
ngyes
ouch@ reset_effects
ouch?
ouch! draw_player
veemo player_cell_color
veemo 27 -> player_cell_color [1]
veemo '[ -> player_cell_color [2]
veemo '1 -> player_cell_color [3]
veemo '0 -> player_cell_color [4]
veemo '7 -> player_cell_color [5]
veemo 'm -> player_cell_color [6]
veemo 32 -> player_cell_color [7]
woomy CURSER_X player_x
woomy CURSER_Y player_y
ouch@ set_cursor_position
booyah!! player_cell_color
woomy CURSER_Y + 1
ouch@ set_cursor_position
booyah!! player_cell_color
ouch@ reset_effects
ouch?
ouch! draw_score
woomy CURSER_X 1
woomy CURSER_Y res_y
woomy CURSER_Y + 1
ouch@ set_cursor_position
veemo label from: Player Score:
booyah!! label
booyah? 32
booyah! player_score
ouch?
ouch! simulate_ball
woomy ball_x + ball_dir_x
woomy ball_y + ball_dir_y
thisway! ball_y = 1
woomy ball_dir_y * -1
woomy ball_y + ball_dir_y
woomy ball_y + ball_dir_y
ngyes
thisway! ball_y = res_y
woomy ball_dir_y * -1
woomy ball_y + ball_dir_y
woomy ball_y + ball_dir_y
ngyes
thisway! ball_x = 2
thisway! ball_y >= player_y
woomy expr player_y
woomy expr + 1
thisway! ball_y <= expr
woomy ball_dir_x * -1
woomy ball_x + ball_dir_x
woomy ball_x + ball_dir_x
woomy player_score + 1
ngyes
ngyes
ngyes
thisway! ball_x = 1
woomy ball_dir_x -1
woomy ball_x 15
woomy ball_y 5
woomy player_score 0
ngyes
thisway! ball_x = field_x
woomy ball_dir_x * -1
woomy ball_x + ball_dir_x
woomy ball_x + ball_dir_x
ngyes
ouch?
ouch! get_player_input
ouch@ reset_effects
splat? input
thisway! input = 's
woomy player_y + 1
thisway! player_y = 9
woomy player_y - 1
ngyes
ngyes
thisway! input = 'w
woomy player_y - 1
thisway! player_y = 1
woomy player_y + 1
ngyes
ngyes
ouch?
oomy 1 = 1
ouch@ clear_screen
ouch@ draw_outline
ouch@ draw_player
ouch@ draw_ball
ouch@ draw_score
woomy CURSER_X 1
woomy CURSER_Y 1
ouch@ set_cursor_position
ouch@ get_player_input
ouch@ simulate_ball
ngyes