biblekaruta

Bible Karuta Game written in C with SDL2 as graphics back-end
Log | Files | Refs | README | LICENSE

biblekaruta.h (1245B)


      1 /*
      2   Bible Karuta Game - game header file
      3   "biblekaruta.h"
      4   M. Yamanaka
      5   email: myamanaka@live.com
      6   website: csmyamanaka.com
      7   license: MIT (See included "LICENSE" file for details)
      8 */
      9 
     10 #pragma once
     11 
     12 #include "crosshair.h"
     13 #include "verses.h"
     14 
     15 #include <stdio.h>
     16 #include <stdlib.h>
     17 #include <SDL2/SDL.h>
     18 
     19 /*
     20   Bible Karuta game object struct
     21   Serves as a overall manager of the karuta game
     22   Member variables in order:
     23     ms    ... main state: menu, play, view controls, etc
     24     ps    ... play states: play, pause, disabled
     25     w     ... game window width
     26     h     ... game window height
     27     t     ... game title
     28     e     ... SDL Event object
     29     win   ... SDL main game window
     30     main  ... main SDL drawing surface
     31     C     ... crosshair object;
     32     cards ... cards array
     33 */
     34 typedef struct BibleKG{
     35   int ms, ps, w, h;
     36   const char* t;
     37   SDL_Event e;
     38   SDL_Window* win;
     39   SDL_Renderer* main;
     40   Xhair C;
     41   int cards[500];
     42 } BibleKG;
     43 
     44 /*
     45   The "constructor" for the Bible Karuta Game
     46 */
     47 int initBibleKG(BibleKG**);
     48 
     49 /*
     50   The "destructor" for the Bible Karuta Game
     51 */
     52 int closeBibleKG(BibleKG*);
     53 
     54 /*
     55   The "draw" function for the Bible Karuta Game
     56 */
     57 int drawBibleKG(BibleKG);
     58 
     59 /*
     60   Bible Karuta game loop
     61 */
     62 int execBibleKG(BibleKG*);

Generated using stagit (https://codemadness.org/stagit.html)