aboutsummaryrefslogtreecommitdiff
path: root/source/all.h
blob: 0c9bcec78144c3b1e27abd5478680d6c479e1f8a (plain) (blame)
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
37
38
#ifndef EVERYTHING_ALWAYS_H_
#define EVERYTHING_ALWAYS_H_

#include <stdio.h>
#include <stdint.h>
#include <math.h>

#include <raylib.h>
#include <raygui.h>
#include <rlgl.h>

#include "chad.h"

typedef struct {
  Font font __attribute__((aligned));
  u16 horizontal, vertical __attribute__((aligned));
  u16 ups, fps __attribute__((aligned));
} game_t;

/* game.c */

void GameInitialize(game_t * game, char * window_name);
void GameDeinitialize(game_t * game);
void GameFrame(game_t * game, size_t frame, f32 x, f32 y);
Vector2 GameFrameVector(game_t * game, size_t frame);
void GameLoop(game_t * game);
i16 GameUpdate(game_t * game, timespec_t now);
void GameRender(game_t * game, f64 interpolation);
void GameReport(game_t * game, f32 fps, f32 ups, u32 total_fps, u32 total_ups) ;

/* raylib.c */

Font DefaultFont(char * choice);
void GuiLoadStyleDarkSimple(void);

/* ... */

#endif /* EVERYTHING_ALWAYS_H_ */