diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-06-09 22:58:20 +0200 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-06-09 22:59:32 +0200 |
commit | 947af225e80e48c46ef83f0b7cdb1e1274ba96dd (patch) | |
tree | ebc235563cfb223d0fa7100eb5c8b4d760fdf281 /src/yabs_core.h | |
parent | structure, namespaces, cool stuff overall (diff) | |
download | yabs-947af225e80e48c46ef83f0b7cdb1e1274ba96dd.tar.gz yabs-947af225e80e48c46ef83f0b7cdb1e1274ba96dd.tar.bz2 yabs-947af225e80e48c46ef83f0b7cdb1e1274ba96dd.tar.xz yabs-947af225e80e48c46ef83f0b7cdb1e1274ba96dd.tar.zst yabs-947af225e80e48c46ef83f0b7cdb1e1274ba96dd.zip |
make everything better
Diffstat (limited to 'src/yabs_core.h')
-rw-r--r-- | src/yabs_core.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/yabs_core.h b/src/yabs_core.h new file mode 100644 index 0000000..15a6d4c --- /dev/null +++ b/src/yabs_core.h @@ -0,0 +1,54 @@ +#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 const& scene_3d); + +int draw(gameState const& game_state); + +} // namespace core + +} // namespace yabs + +#endif /* YABS_CORE_H */ |