NEW一个FINDBOOM
This commit is contained in:
29
include/game.h
Normal file
29
include/game.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef RUNNING_H
|
||||
#define RUNNING_H
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
typedef struct Window {
|
||||
int width, height;
|
||||
SDL_Window *window;
|
||||
SDL_Renderer *renderer;
|
||||
} Window;
|
||||
|
||||
typedef struct Game {
|
||||
const char* title;
|
||||
Window window;
|
||||
} Game;
|
||||
|
||||
typedef struct Color {
|
||||
int r,g,b,a;
|
||||
} Color;
|
||||
|
||||
#define RED (Color){150,40,40,255}
|
||||
#define GREEN (Color){40,150,40,255}
|
||||
#define BLUE (Color){40,40,150,255}
|
||||
|
||||
void initGame(const char* name, int width, int height);
|
||||
void gameLoop();
|
||||
void windowClose();
|
||||
|
||||
#endif //RUNNING_H
|
||||
Reference in New Issue
Block a user