refactor: appTypes.c to app.h
This commit is contained in:
@@ -153,10 +153,28 @@ typedef enum
|
||||
ENEMIES_TEX_COUNT
|
||||
} enemiesTextureID;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
START,
|
||||
SHIP_COUNT
|
||||
} shipID;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id;
|
||||
char* assetPath;
|
||||
int frameSize;
|
||||
int speed0;
|
||||
int speed1;
|
||||
int speed2;
|
||||
int rotationSpeed;
|
||||
}Ship;
|
||||
|
||||
#define MAX_ENEMIES 100
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Config config;
|
||||
int count;
|
||||
Sprite sprite[MAX_ENEMIES];
|
||||
Animation animation[MAX_ENEMIES];
|
||||
@@ -1,6 +1,4 @@
|
||||
#include <engine.h>
|
||||
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
void ConfigApp(App* app){
|
||||
InitConfig(&app->config, "config/config.ini");
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
#include "engine.h"
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
const ShaderAsset shaderAssets[SHADER_COUNT] = {
|
||||
{"shaders/postfx.fs"}
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "engine.h"
|
||||
#include "app.h"
|
||||
|
||||
|
||||
const TextureAsset birdsTextureAssets[BIRDS_TEX_COUNT] = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "appTypes.h"
|
||||
#include "engine.h"
|
||||
#include "app.h"
|
||||
|
||||
|
||||
|
||||
const TextureAsset enemiesTextureAssets[ENEMIES_TEX_COUNT] = {
|
||||
{"assets/ship_start.png", 16.0f, 16.0f, 90.0f}
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
#include "engine.h"
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
Floor CreateFloor(void)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
const TextureAsset islandsTextureAssets[ISLANDS_TEX_COUNT] = {
|
||||
{"assets/island.png", 16.0f, 16.0f, 0.0f}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
const TextureAsset playerTextureAssets[PLAYER_TEX_COUNT] = {
|
||||
{"assets/ship_start.png", 16.0f, 16.0f, 0.0f}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
void InitLogo(LogoState *l) {
|
||||
SetTargetFPS(60);
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
void InitMenu(MenuState *m)
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
|
||||
const TextureAsset menuTextureAssets[MENU_TEX_COUNT] = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
void InitBackground(float scrollSpeed, Background *bg, Texture2D *texture, const TextureAsset *backgroundAsset){
|
||||
bg->scrolling = 0.0f;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
void InitMenuSettings(MenuSettings *s)
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
void OnEscapeChangeView(App *app, View view)
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "appTypes.h"
|
||||
#include "app.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user