NEW一个FINDBOOM
This commit is contained in:
15
include/data.h
Normal file
15
include/data.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef DATA_H
|
||||
#define DATA_H
|
||||
|
||||
typedef struct Data {
|
||||
int x,y,boom;
|
||||
int **arr;
|
||||
int **arrcopy;
|
||||
} Data;
|
||||
|
||||
void initData(Data *data, int x, int y ,int boom);
|
||||
void getData(Data *data, int x, int y);
|
||||
|
||||
void showData(Data *data);
|
||||
|
||||
#endif //DATA_H
|
||||
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
|
||||
11
include/img.h
Normal file
11
include/img.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef IMG_H
|
||||
#define IMG_H
|
||||
#include "SDL_render.h"
|
||||
|
||||
typedef struct Img {
|
||||
SDL_Texture *texture[10];
|
||||
} Img;
|
||||
|
||||
void initImg(Img * img, const char * arr[],int len, SDL_Renderer * renderer);
|
||||
|
||||
#endif //IMG_H
|
||||
Reference in New Issue
Block a user