biblekaruta.c (1118B)
1 /* 2 Bible Karuta Game - game source file 3 "biblekaruta.c" 4 M. Yamanaka 5 email: myamanaka@live.com 6 website: csmyamanaka.com 7 license: MIT (See included "LICENSE" file for details) 8 */ 9 10 #include "biblekaruta.h" 11 12 int initBibleKG(BibleKG** G){ 13 /* 14 Bible Karuta constructor 15 Arguments: 16 G ... reference to a reference to aBible karuta game (not a typo) 17 */ 18 19 *G = malloc(sizeof(BibleKG)); 20 (*G)->ms = 0; 21 (*G)->ps = 0; 22 (*G)->w = 800; 23 (*G)->h = 600; 24 (*G)->t = "Bible Karuta"; 25 /*(*G)->C.pos[0] = 0; 26 (*G)->C.pos[1] = 0; 27 (*G)->C.gs = 0; 28 (*G)->C.as = 0; 29 (*G)->C.fn = "sprite.png";*/ 30 for(int i = 0; i < 5; i++) (*G)->C[i] = 0; 31 return 0; 32 } 33 34 int closeBibleKG(BibleKG* G){ 35 /* 36 Bible Karuta destructor 37 Arguments: 38 G ... reference to Bible karuta game 39 */ 40 return 0; 41 } 42 43 int drawBibleKG(BibleKG G){ 44 /* 45 Bible Karuta draw function 46 Arguments: 47 G ... Bible Karuta game object 48 */ 49 drawCrosshair(G.C); 50 return 0; 51 } 52 53 int execBibleKG(BibleKG* G){ 54 /* 55 The main game loop for Bible Karuta 56 */ 57 G->ms = 1; 58 while(G->ms){ 59 drawBibleKG(*G); 60 } 61 return 0; 62 }