aboutsummaryrefslogtreecommitdiffstats
path: root/src/yabs_core.h
blob: ce30e0c7b1c5bdea8ba2598b8d6621a889bb4599 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef YABS_CORE_H
#define YABS_CORE_H

/*********************************/
/*   YABS             (  //      */
/*   yabs_CORE         ( )/      */
/*   by salade         )(/       */
/*  ________________  ( /)       */
/* ()__)____________)))))   :^}  */
/*********************************/

#include "raylib.h"

#define YABS_SCREENWIDTH 1600
#define YABS_SCREENHEIGHT 900
#define YABS_TITLE "YABS"

#define YABS_DOUBLEPI 6.28318530717958647692f

#define YABS_PLAYER_MOVEMENT_SENSITIVITY 3
#define YABS_CAMERA_MOUSE_MOVE_SENSITIVITY 0.0005f

namespace yabs {

typedef struct Scene3D {
    Camera camera;
    Vector3 movement;
    Vector3 rotation;
    Vector2 lastMousePos;
} Scene3D;

typedef enum gameState {
    TITLE = 0,
    PICK,
    DEATH,
    GAMEPLAY,
    NEXT,
    ENDING
} gameState;

// core functions
namespace core {

// draw takes a reference to the game_state, which is checked on each frame
//  for next level or death
int reset_camera(Scene3D& scene_3d);

int draw(gameState const& game_state, Model& model);

int tick(Scene3D& scene_3d);

}  // namespace core

}  // namespace yabs

#endif /* YABS_CORE_H */