32 lines
792 B
C
32 lines
792 B
C
#ifndef __starfield_h__
|
|
#define __starfield_h__
|
|
|
|
#include <stdbool.h>
|
|
|
|
// Structs
|
|
typedef struct starStruct {
|
|
double x, y, z, Rotation, RotationValue;
|
|
SDL_Rect TargetRect, SourceRect;
|
|
bool OutOfBounds;
|
|
} Star;
|
|
|
|
typedef struct starfieldStruct {
|
|
Star * Stars;
|
|
int StarCount;
|
|
} Starfield;
|
|
// End Structs
|
|
|
|
// Prototypes
|
|
void STARFIELD_Initialize(SDL_Renderer * renderer, int width, int height);
|
|
void STARFIELD_Deinitialize();
|
|
Starfield STARFIELD_GetDefault(int count);
|
|
void STARFIELD_Draw(Starfield * strf, SDL_Renderer * renderer);
|
|
void STARFIELD_Update(Starfield * strf);
|
|
void STARFIELD_DestroyObject(Starfield * strf);
|
|
Star STAR_GetDefault();
|
|
void STAR_Update(Star * star);
|
|
void STAR_Draw(Star * star, SDL_Renderer * renderer);
|
|
// End Prototypes
|
|
|
|
#endif // __starfield_h__
|