diff options
author | salaaad2 <47527723+salaaad2@users.noreply.github.com> | 2022-08-20 23:47:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-20 23:47:23 +0200 |
commit | d9ede782a1975ebf0f60e7edd710376781b2183a (patch) | |
tree | 8acaae1139b449f885a4d212b56297fbd1c4a016 /src/yabs_core.h | |
parent | small refactor along with cube slaying (diff) | |
parent | something probably happenned I dunno (diff) | |
download | yabs-d9ede782a1975ebf0f60e7edd710376781b2183a.tar.gz yabs-d9ede782a1975ebf0f60e7edd710376781b2183a.tar.bz2 yabs-d9ede782a1975ebf0f60e7edd710376781b2183a.tar.xz yabs-d9ede782a1975ebf0f60e7edd710376781b2183a.tar.zst yabs-d9ede782a1975ebf0f60e7edd710376781b2183a.zip |
Merge pull request #1 from salaaad2/letsgo
Letsgo
Diffstat (limited to 'src/yabs_core.h')
-rw-r--r-- | src/yabs_core.h | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/src/yabs_core.h b/src/yabs_core.h index d8f111d..dd712eb 100644 --- a/src/yabs_core.h +++ b/src/yabs_core.h @@ -1,6 +1,3 @@ -#ifndef YABS_CORE_H -#define YABS_CORE_H - /*********************************/ /* YABS ( // */ /* yabs_CORE ( )/ */ @@ -9,16 +6,21 @@ /* ()__)____________))))) :^} */ /*********************************/ +#ifndef YABS_CORE_H +#define YABS_CORE_H + #include "raylib.h" #include "raymath.h" #include <vector> +#include "yabs_structs.h" + #ifdef __FreeBSD__ -# define YABS_SCREENWIDTH 1280 +# define YABS_SCREENWIDTH 1080 # define YABS_SCREENHEIGHT 720 #else -# define YABS_SCREENWIDTH 1600 -# define YABS_SCREENHEIGHT 900 +# define YABS_SCREENWIDTH 1080 +# define YABS_SCREENHEIGHT 720 #endif #define YABS_TITLE "YABS" @@ -43,6 +45,7 @@ CLITERAL(Color) { 153, 0, 0, 255 } // cool Purple namespace yabs { +namespace core { typedef struct Scene3D { Camera camera; @@ -61,35 +64,13 @@ typedef enum gameState { } gameState; // core functions and structs -namespace core { - -typedef struct Player { - int hp; - Vector3 pos; -}Player; - -typedef struct Enemy { - Vector3 enemyStartPos; - Vector3 enemyBoxPos; - Vector3 enemyBoxSize; - BoundingBox enemyBounds; - bool active; -} Enemy; - -typedef struct World { - Model & ground; - std::vector<Enemy*> enemies; - Player * player; -} World; int reset_camera(Scene3D& scene_3d); -int draw(World& world); -int tick(World& world, Scene3D& scene_3d); +int render(RenderObjs & robjs); +int tick(TickObjs & tobjs, Scene3D & scene_3d); void init_game(); -void cleanupAndExit(World & world); } // namespace core - } // namespace yabs #endif /* YABS_CORE_H */ |