-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.h
More file actions
38 lines (32 loc) · 665 Bytes
/
ui.h
File metadata and controls
38 lines (32 loc) · 665 Bytes
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
#include <SDL/SDL.h>
#include <SDL/SDL_gfxPrimitives.h>
#include "draw.h"
#include "life.h"
#include "stack.h"
#ifndef _ui_h
#define _ui_h
typedef struct {
int delay;
int paused;
int mouse_paused;
int run;
int debug;
int lm_down;
int draw_mode;
float gps; // Generations per second
Life *game;
Draw *draw;
Stack *zoom_stack;
int zoom_scale;
} UI;
typedef struct {
int x;
int y;
} Point;
UI *UI_MakeUI(Life *game, Draw *draw);
int UI_DrawAllowed(Life *game, Draw *draw);
void UI_DestroyUI(UI *ui);
int UI_HandleEvents(UI *ui);
void UI_UpdateStatus(UI *ui);
void UI_DrawPixel(UI *ui, int x, int y, int state);
#endif