-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlump.h
45 lines (32 loc) · 1.02 KB
/
lump.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include "SDL2/SDL.h"
#include "list.h"
#include "physObj.h"
typedef struct
{
SPhysObject* physBody;
bool isSpinned; /* âðàùàåòñÿ? */
float angle;
float timeToRemove; /* time before destroy */
float _timeToRemove; /* delay */
SDL_Texture* texture;
} SLump;
/* all lumps here */
SList* lumps;
/* constructor|destructor */
SLump* LumpCreate (float x, float y,
int w, int h,
float timeToRemove,
bool isSpinned,
SDL_Texture* texture);
void LumpCreateSeveral (float x, float y,
int w, int h,
float timeToRemove,
bool isSpinned,
SDL_Texture* texture,
const uint32 count);
void LumpDestroy (SLump** lump);
void LumpClearAll ();
void LumpGetSdlRect (SLump* lump, SDL_Rect* rect);
SDL_Texture* LumpGetTexture (SLump* lump);
void LumpsUpdateAndRender ();