merged from herbglitch/master
This commit is contained in:
commit
2f221987af
21 changed files with 339 additions and 10 deletions
|
|
@ -20,8 +20,8 @@
|
|||
#include "arc/input/sdl/mouse.h"
|
||||
#include "arc/input/sdl/keyboard.h"
|
||||
#include <SDL.h>
|
||||
#include <SDL_video.h>
|
||||
#include <SDL2/SDL_ttf.h>
|
||||
#include <SDL2/SDL_mixer.h>
|
||||
#elif ARC_OPENGL
|
||||
#include "arc/graphics/opengl/window.h"
|
||||
#include "arc/graphics/opengl/renderer.h"
|
||||
|
|
@ -48,6 +48,8 @@ void ARC_EngineData_Create(ARC_EngineData **data, ARC_Handler_CleanDataFn cleanf
|
|||
//TEMP
|
||||
#ifdef ARC_SDL
|
||||
TTF_Init();
|
||||
Mix_Init(0);
|
||||
Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 1024);
|
||||
#endif
|
||||
|
||||
#ifdef ARC_SDL
|
||||
|
|
@ -90,6 +92,8 @@ void ARC_EngineData_Create(ARC_EngineData **data, ARC_Handler_CleanDataFn cleanf
|
|||
void ARC_EngineData_Destroy(ARC_EngineData *data){
|
||||
#ifdef ARC_SDL
|
||||
free(data->mouse->event);
|
||||
TTF_Quit();
|
||||
Mix_Quit();
|
||||
#endif // ARC_SDL
|
||||
|
||||
ARC_Mouse_Destroy(data->mouse);
|
||||
|
|
@ -105,7 +109,6 @@ void ARC_Engine_Run(ARC_EngineData *data){
|
|||
}
|
||||
|
||||
#ifdef ARC_SDL
|
||||
SDL_SetRenderDrawBlendMode((SDL_Renderer *)data->renderer, SDL_BLENDMODE_BLEND);
|
||||
|
||||
SDL_Event *event = data->mouse->event;
|
||||
double lastTime = 0, currentTime;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue