Changeset 683 for soft/giet_vm/applications/raycast/main.c
- Timestamp:
- Aug 3, 2015, 7:07:02 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/raycast/main.c
r676 r683 4 4 #include <malloc.h> 5 5 6 static volatile unsigned int init_sync = 0; 7 6 8 // Exported functions 9 10 __attribute__((constructor)) void render() 11 { 12 // Wait for main initialization 13 while (!init_sync); 14 15 Game *game = gameInstance(); 16 17 // Render slices as soon as it's available 18 while (1) { 19 dispRenderSlice(game); 20 } 21 } 7 22 8 23 __attribute__((constructor)) void main() 9 24 { 10 giet_tty_alloc(0);11 giet_tty_printf("[RAYCAST] entering main()\n");25 unsigned int w, h, p; 26 unsigned int i, j; 12 27 13 heap_init(0, 0); 14 dispInit(); 28 giet_tty_alloc(0); 29 giet_tty_printf("[RAYCAST] entering main()\n"); 30 31 // Initialize heap for each cluster 32 giet_procs_number(&w, &h, &p); 33 for (i = 0; i < w; i++) 34 for (j = 0; j < h; j++) 35 heap_init(i, j); 36 37 // Initialize game 38 dispInit(); 39 40 init_sync = 1; 15 41 16 42 while (1) {
Note: See TracChangeset
for help on using the changeset viewer.