test/snake/snake.c

changeset 141
cd82643bb6d9
parent 140
d190fe5315bd
equal deleted inserted replaced
140:d190fe5315bd 141:cd82643bb6d9
205 asc_clear_error(); 205 asc_clear_error();
206 asc_context_quit(); 206 asc_context_quit();
207 } 207 }
208 208
209 // debug-key for clearing the shader registry 209 // debug-key for clearing the shader registry
210 if (asc_key_pressed(S)) { 210 if (asc_key_pressed(ASC_KEY(S))) {
211 // TODO: implement edge-triggered key press handling
212 asc_shader_clear_registry(); 211 asc_shader_clear_registry();
213 asc_dprintf("Shader cache cleared."); 212 asc_dprintf("Shader cache cleared.");
214 } 213 }
215 214
216 // quit application on ESC key press 215 // quit application on ESC key press
217 if (asc_key_pressed(ESCAPE)) { 216 if (asc_key_pressed(ASC_KEY(ESCAPE))) {
218 asc_context_quit(); 217 asc_context_quit();
219 } 218 }
220 } while (asc_loop_next()); 219 } while (asc_loop_next());
221 220
222 // cleanup 221 // cleanup

mercurial