Cleaned up SDL2 folder after merge
This commit is contained in:
parent
e5f4c0d906
commit
8a50aa7ace
Binary file not shown.
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="pong" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="bin/Debug/pong" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="bin/Release/pong" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
<Add directory="D:/CodeBlocks/SDL2-2.0.1/i686-w64-mingw32/include" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="mingw32" />
|
||||
<Add library="SDL2_net" />
|
||||
<Add library="SDL2_ttf" />
|
||||
<Add library="SDL2_mixer" />
|
||||
<Add library="SDL2_image" />
|
||||
<Add library="SDL2main" />
|
||||
<Add library="SDL2.dll" />
|
||||
<Add library="SDL2" />
|
||||
<Add library="user32" />
|
||||
<Add library="gdi32" />
|
||||
<Add library="winmm" />
|
||||
<Add library="dxguid" />
|
||||
<Add directory="D:/CodeBlocks/SDL2-2.0.1/i686-w64-mingw32/lib" />
|
||||
</Linker>
|
||||
<Unit filename="pong.cpp" />
|
||||
<Unit filename="sdl2.inc" />
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<envvars />
|
||||
<debugger />
|
||||
<lib_finder disable_auto="1" />
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
@ -1,5 +1,6 @@
|
||||
#include "../../jade.h"
|
||||
#include "../sdl2.inc"
|
||||
#include <SDL.h>
|
||||
|
||||
|
||||
MAIN
|
||||
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_layout_file>
|
||||
<ActiveTarget name="Release" />
|
||||
<File name="sdl2.inc" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="pong.cpp" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="47" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
@ -1,33 +0,0 @@
|
||||
#ifdef _WIN32
|
||||
#include "SDL2\SDL.h"
|
||||
#include "SDL2\SDL_image.h"
|
||||
#include "SDL2\SDL_mixer.h"
|
||||
#include "SDL2\SDL_ttf.h"
|
||||
#else
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
#include <SDL_mixer.h>
|
||||
#include <SDL_ttf.h>
|
||||
#endif
|
||||
|
||||
typedef SDL_Window* PWINDOW;
|
||||
typedef SDL_Surface* PSURFACE;
|
||||
typedef SDL_Renderer* PRENDERER;
|
||||
typedef SDL_Event EVENT;
|
||||
typedef SDL_Rect RECT;
|
||||
|
||||
#define SetRenderDrawColor SDL_SetRenderDrawColor
|
||||
#define RenderClear SDL_RenderClear
|
||||
#define RenderDrawRect SDL_RenderDrawRect
|
||||
#define RenderFillRect SDL_RenderFillRect
|
||||
#define RenderDrawLine SDL_RenderDrawLine
|
||||
#define RenderPresent SDL_RenderPresent
|
||||
#define Delay SDL_Delay
|
||||
#define Quit SDL_Quit
|
||||
#define CreateWindow SDL_CreateWindow
|
||||
#define CreateRenderer SDL_CreateRenderer
|
||||
#define PollEvent SDL_PollEvent
|
||||
#define KEYDOWN SDL_KEYDOWN
|
||||
#define KEYUP SDL_KEYUP
|
||||
#define Init SDL_Init
|
||||
#define Rect SDL_Rect
|
@ -1,57 +0,0 @@
|
||||
#include "../jade.h"
|
||||
#include "sdl2.inc"
|
||||
|
||||
// SCREEN DIMENSIONS
|
||||
CONSTANT INT SCREEN_WIDTH = 640;
|
||||
CONSTANT INT SCREEN_HEIGHT = 480;
|
||||
|
||||
MAIN
|
||||
DIM AS PWINDOW window = NULL;
|
||||
DIM AS PSURFACE screenSurface = NULL;
|
||||
DIM AS BOOL quit = false;
|
||||
DIM AS SDL_Event e;
|
||||
|
||||
IF ( SDL_Init( SDL_INIT_VIDEO ) < 0 ) THEN
|
||||
PRINT( SDL_GetError() );
|
||||
ELSE
|
||||
//Create Window
|
||||
window = SDL_CreateWindow( "SDL Simple Window",
|
||||
SDL_WINDOWPOS_UNDEFINED,
|
||||
SDL_WINDOWPOS_UNDEFINED,
|
||||
SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT,
|
||||
SDL_WINDOW_SHOWN);
|
||||
|
||||
IF ( window == NULL ) THEN
|
||||
PRINT( SDL_GetError() );
|
||||
ELSE
|
||||
// Get Window Surface
|
||||
screenSurface = SDL_GetWindowSurface( window );
|
||||
|
||||
|
||||
WHILE (NOT quit) BEGIN
|
||||
WHILE ( SDL_PollEvent( ADDR e) != 0 ) BEGIN
|
||||
SELECT (e.type) BEGIN
|
||||
CASE SDL_QUIT:
|
||||
quit = true;
|
||||
ENDCASE
|
||||
ENDSELECT
|
||||
WEND
|
||||
// Fill the surface with White
|
||||
SDL_FillRect( screenSurface, NULL, SDL_MapRGB( screenSurface->format, 255, 255, 255 ) );
|
||||
// Update the Surface
|
||||
SDL_UpdateWindowSurface( window );
|
||||
|
||||
WEND
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
//Destroy Window
|
||||
SDL_DestroyWindow( window );
|
||||
|
||||
// Shutdown SDL
|
||||
SDL_Quit();
|
||||
|
||||
RETURN 0;
|
||||
|
||||
END
|
@ -1,7 +1,7 @@
|
||||
#include "SDL2/SDL.h"
|
||||
#include "SDL2/SDL_image.h"
|
||||
#include "SDL2/SDL_mixer.h"
|
||||
#include "SDL2/SDL_ttf.h"
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
#include <SDL_mixer.h>
|
||||
#include <SDL_ttf.h>
|
||||
|
||||
typedef SDL_Window* PWINDOW;
|
||||
typedef SDL_Surface* PSURFACE;
|
||||
|
Loading…
Reference in New Issue
Block a user