Skip to content

Commit

Permalink
fixed a warning in preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsydoge committed Oct 12, 2019
1 parent 037f3b8 commit 3665466
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion src/Functions.h
Expand Up @@ -235,7 +235,7 @@ const char* GetExtension(const char* string_)
}
return ex + 1;
}
#ifdef _WIN32 || _WIN64
#if defined(_WIN32) || defined(_WIN64)
#define QS2D_CROSSPLATFORM_STRCICMP(A, B) _stricmp(A, B)
#else
#include <strings.h>
Expand Down
2 changes: 1 addition & 1 deletion src/Preprocessor.h
Expand Up @@ -6,7 +6,7 @@ Preproc
*/
//////////////////////////////////

#define QS2D_VERSION "012"
#define QS2D_VERSION "013"

#ifdef QS2D_DEF_STATIC
#define QS2D_DEF static
Expand Down
90 changes: 45 additions & 45 deletions src/Prototypes.h
@@ -1,49 +1,49 @@
#pragma once

//////////////////////////////////
/*
Prototypes
*/
//////////////////////////////////

/* init */
QS2D_DEF void QS2D_Init(const char* name, const int width, const int height); // Init internals
QS2D_DEF void QS2D_Close(); // Release internals
QS2D_DEF void QS2D_Log(const char* format, ...); // Wrap printf

/* rendering */
QS2D_DEF void QS2D_Screen_Render(); // Render present, useful for ManualRender()
QS2D_DEF void QS2D_Screen_Clear(); // Clear back screen buffer, you need to Render() if ManualRender() is enabled
QS2D_DEF void QS2D_Screen_AutoRender(); // Auto render every Input_Handle()
QS2D_DEF void QS2D_Screen_ManualRender(); // Manually rendering, you'll need to use Render()
#pragma once

//////////////////////////////////
/*
Prototypes
*/
//////////////////////////////////

/* init */
QS2D_DEF void QS2D_Init(const char* name, const int width, const int height); // Init internals
QS2D_DEF void QS2D_Close(); // Release internals
QS2D_DEF void QS2D_Log(const char* format, ...); // Wrap printf

/* rendering */
QS2D_DEF void QS2D_Screen_Render(); // Render present, useful for ManualRender()
QS2D_DEF void QS2D_Screen_Clear(); // Clear back screen buffer, you need to Render() if ManualRender() is enabled
QS2D_DEF void QS2D_Screen_AutoRender(); // Auto render every Input_Handle()
QS2D_DEF void QS2D_Screen_ManualRender(); // Manually rendering, you'll need to use Render()
QS2D_DEF void QS2D_Screen_AutoClear(); // Auto Clear back buffer
QS2D_DEF void QS2D_Screen_ManualClear(); // Manually clear back buffer with _Clear()

/* event */
QS2D_DEF int QS2D_Input_Handle();
QS2D_DEF void QS2D_Quit(); // Stop the Input_Handle() and exit you're main loop
QS2D_DEF void QS2D_Screen_ManualClear(); // Manually clear back buffer with _Clear()

/* event */
QS2D_DEF int QS2D_Input_Handle();
QS2D_DEF void QS2D_Quit(); // Stop the Input_Handle() and exit you're main loop
QS2D_DEF bool QS2D_Key_IsPressing(int button); // Return true while you press the key
QS2D_DEF bool QS2D_Key_OnPress(const int button); // Return true only one time when the key is down
QS2D_DEF bool QS2D_Key_OnRelease(const int button); // Return true only one time when the key is up

/* color */
QS2D_DEF QS2D_Color QS2D_Color_New(const Uint8 r, const Uint8 g, const Uint8 b);

/* drawing */
QS2D_DEF void QS2D_Draw_ColorSet(QS2D_Color c);
QS2D_DEF void QS2D_Draw_Pixel(const float x, const float y);
QS2D_DEF void QS2D_Draw_Rect(const float x, const float y, const float w, const float h);
QS2D_DEF void QS2D_Draw_FilledRect(const float x, const float y, const float w, const float h);
QS2D_DEF void QS2D_Draw_Line(const float x1, const float y1, const float x2, const float y2);
QS2D_DEF void QS2D_Draw_Image(QS2D_Image* image, const float x, const float y, const float scale_w, const float scale_h, const float degree_rotation);

/* screen */
QS2D_DEF void QS2D_Screen_SetBGColor(QS2D_Color c);
QS2D_DEF QS2D_Color QS2D_Screen_GetBGColor();
QS2D_DEF void QS2D_Screen_Resize(int w, int h);
QS2D_DEF int QS2D_Screen_GetWidth();
QS2D_DEF int QS2D_Screen_GetHeight();
QS2D_DEF void QS2D_Screen_Save(const char* path_name);

/* image */
QS2D_DEF bool QS2D_Key_OnRelease(const int button); // Return true only one time when the key is up

/* color */
QS2D_DEF QS2D_Color QS2D_Color_New(const Uint8 r, const Uint8 g, const Uint8 b);

/* drawing */
QS2D_DEF void QS2D_Draw_ColorSet(QS2D_Color c);
QS2D_DEF void QS2D_Draw_Pixel(const float x, const float y);
QS2D_DEF void QS2D_Draw_Rect(const float x, const float y, const float w, const float h);
QS2D_DEF void QS2D_Draw_FilledRect(const float x, const float y, const float w, const float h);
QS2D_DEF void QS2D_Draw_Line(const float x1, const float y1, const float x2, const float y2);
QS2D_DEF void QS2D_Draw_Image(QS2D_Image* image, const float x, const float y, const float scale_w, const float scale_h, const float degree_rotation);

/* screen */
QS2D_DEF void QS2D_Screen_SetBGColor(QS2D_Color c);
QS2D_DEF QS2D_Color QS2D_Screen_GetBGColor();
QS2D_DEF void QS2D_Screen_Resize(int w, int h);
QS2D_DEF int QS2D_Screen_GetWidth();
QS2D_DEF int QS2D_Screen_GetHeight();
QS2D_DEF void QS2D_Screen_Save(const char* path_name);

/* image */
QS2D_DEF QS2D_Image QS2D_Image_Load(const char* path);

0 comments on commit 3665466

Please sign in to comment.