mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-10 06:31:40 +00:00
SDL2 Initializes
This commit is contained in:
parent
bee7aefe49
commit
c2ee802677
3 changed files with 25 additions and 12 deletions
10
MakePHAT
10
MakePHAT
|
@ -109,16 +109,14 @@ HARDWARE_VIDEO_ONLY_FLAGS = -DPSP_HARDWARE_VIDEO
|
||||||
|
|
||||||
OBJS = $(COMMON_OBJS) $(HARDWARE_VIDEO_ONLY_OBJS)
|
OBJS = $(COMMON_OBJS) $(HARDWARE_VIDEO_ONLY_OBJS)
|
||||||
|
|
||||||
|
SDL_LIBS = -lSDL2_mixer -lSDL2 -lvorbisfile -lvorbis -logg -lGL -lGLU -lglut
|
||||||
#LIBS = -lpspaudiolib -lpspaudio -lpspgum -lpspgu -lpsprtc -lpsppower -lpspwlan -lstdc++ -lm
|
|
||||||
|
|
||||||
GU_LIBS = -lpspgum_vfpu -lpspvfpu -lpspgu -lpspvram
|
GU_LIBS = -lpspgum_vfpu -lpspvfpu -lpspgu -lpspvram
|
||||||
AUDIO_LIBS = -lpspaudiolib -lpspaudio -lpspmp3 -lSDL2_mixer -lSDL2 source/psp/m33libs/libpspaudiocodec.a source/psp/m33libs/libpspkubridge.a
|
AUDIO_LIBS = -lpspaudiolib -lpspaudio -lpspmp3 source/psp/m33libs/libpspaudiocodec.a source/psp/m33libs/libpspkubridge.a
|
||||||
|
|
||||||
MISC_LIBS = -lpsprtc -lpspmath -lpsppower -lpsphprm -ljpeg -lpng source/psp/m33libs/libz.a
|
MISC_LIBS = -lpsprtc -lpsppower -lpspmath -lpsphprm -ljpeg -lpng source/psp/m33libs/libz.a
|
||||||
NET_LIBS = -lpspwlan -lpspnet_adhoc -lpspnet_adhocctl
|
NET_LIBS = -lpspwlan -lpspnet_adhoc -lpspnet_adhocctl
|
||||||
STD_LIBS = -lstdc++ -lm -lc
|
STD_LIBS = -lstdc++ -lm -lc
|
||||||
LIBS = $(GPROF_LIBS) $(GU_LIBS) $(AUDIO_LIBS) $(MISC_LIBS) $(STD_LIBS) $(NET_LIBS)
|
LIBS = $(GPROF_LIBS) $(SDL_LIBS) $(GU_LIBS) $(AUDIO_LIBS) $(MISC_LIBS) $(STD_LIBS) $(NET_LIBS)
|
||||||
|
|
||||||
CFLAGS = -ffast-math -O3 -G0 -Wall $(GPROF_FLAGS) -Did386="0" -DPSP $(MODE) $(HARDWARE_VIDEO_ONLY_FLAGS) -DSWIZZLE32 -DPSP_MP3_HWDECODE -DFULLBRIGHT -DHL_RENDER -Wno-strict-aliasing -DPSP_VFPU
|
CFLAGS = -ffast-math -O3 -G0 -Wall $(GPROF_FLAGS) -Did386="0" -DPSP $(MODE) $(HARDWARE_VIDEO_ONLY_FLAGS) -DSWIZZLE32 -DPSP_MP3_HWDECODE -DFULLBRIGHT -DHL_RENDER -Wno-strict-aliasing -DPSP_VFPU
|
||||||
CXXFLAGS = -fno-rtti -Wcast-qual -Wno-write-strings -Wno-sign-compare -Wno-strict-aliasing
|
CXXFLAGS = -fno-rtti -Wcast-qual -Wno-write-strings -Wno-sign-compare -Wno-strict-aliasing
|
||||||
|
|
8
MakeSLIM
8
MakeSLIM
|
@ -110,16 +110,14 @@ HARDWARE_VIDEO_ONLY_FLAGS = -DPSP_HARDWARE_VIDEO
|
||||||
|
|
||||||
OBJS = $(COMMON_OBJS) $(HARDWARE_VIDEO_ONLY_OBJS)
|
OBJS = $(COMMON_OBJS) $(HARDWARE_VIDEO_ONLY_OBJS)
|
||||||
|
|
||||||
|
SDL_LIBS = -lSDL2_mixer -lSDL2 -lvorbisfile -lvorbis -logg -lGL -lGLU -lglut
|
||||||
#LIBS = -lpspaudiolib -lpspaudio -lpspgum -lpspgu -lpsprtc -lpsppower -lpspwlan -lstdc++ -lm
|
|
||||||
|
|
||||||
GU_LIBS = -lpspgum_vfpu -lpspvfpu -lpspgu -lpspvram
|
GU_LIBS = -lpspgum_vfpu -lpspvfpu -lpspgu -lpspvram
|
||||||
AUDIO_LIBS = -lpspaudiolib -lpspaudio -lpspmp3 -lSDL2_mixer -lSDL2 source/psp/m33libs/libpspaudiocodec.a source/psp/m33libs/libpspkubridge.a
|
AUDIO_LIBS = -lpspaudiolib -lpspaudio -lpspmp3 source/psp/m33libs/libpspaudiocodec.a source/psp/m33libs/libpspkubridge.a
|
||||||
|
|
||||||
MISC_LIBS = -lpsprtc -lpsppower -lpspmath -lpsphprm -ljpeg -lpng source/psp/m33libs/libz.a
|
MISC_LIBS = -lpsprtc -lpsppower -lpspmath -lpsphprm -ljpeg -lpng source/psp/m33libs/libz.a
|
||||||
NET_LIBS = -lpspwlan -lpspnet_adhoc -lpspnet_adhocctl
|
NET_LIBS = -lpspwlan -lpspnet_adhoc -lpspnet_adhocctl
|
||||||
STD_LIBS = -lstdc++ -lm -lc
|
STD_LIBS = -lstdc++ -lm -lc
|
||||||
LIBS = $(GPROF_LIBS) $(GU_LIBS) $(AUDIO_LIBS) $(MISC_LIBS) $(STD_LIBS) $(NET_LIBS)
|
LIBS = $(GPROF_LIBS) $(SDL_LIBS) $(GU_LIBS) $(AUDIO_LIBS) $(MISC_LIBS) $(STD_LIBS) $(NET_LIBS)
|
||||||
|
|
||||||
CFLAGS = -ffast-math -O3 -G0 -Wall $(GPROF_FLAGS) -Did386="0" -DPSP $(MODE) $(HARDWARE_VIDEO_ONLY_FLAGS) -DSWIZZLE32 -DSLIM -DPSP_MP3_HWDECODE -DFULLBRIGHT -DHL_RENDER -Wno-strict-aliasing -DPSP_VFPU
|
CFLAGS = -ffast-math -O3 -G0 -Wall $(GPROF_FLAGS) -Did386="0" -DPSP $(MODE) $(HARDWARE_VIDEO_ONLY_FLAGS) -DSWIZZLE32 -DSLIM -DPSP_MP3_HWDECODE -DFULLBRIGHT -DHL_RENDER -Wno-strict-aliasing -DPSP_VFPU
|
||||||
CXXFLAGS = -fno-rtti -Wcast-qual -Wno-write-strings -Wno-sign-compare -Wno-strict-aliasing
|
CXXFLAGS = -fno-rtti -Wcast-qual -Wno-write-strings -Wno-sign-compare -Wno-strict-aliasing
|
||||||
|
|
|
@ -36,6 +36,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include <pspge.h>
|
#include <pspge.h>
|
||||||
#include <pspsysevent.h>
|
#include <pspsysevent.h>
|
||||||
|
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
#include <SDL2/SDL_mixer.h>
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include "../quakedef.h"
|
#include "../quakedef.h"
|
||||||
|
@ -528,9 +531,23 @@ int user_main(SceSize argc, void* argp)
|
||||||
// operations.
|
// operations.
|
||||||
disableFloatingPointExceptions();
|
disableFloatingPointExceptions();
|
||||||
|
|
||||||
// Initialise the Common module.
|
// Initialize the Common module.
|
||||||
InitExtModules ();
|
InitExtModules ();
|
||||||
|
|
||||||
|
// Initialize SDL
|
||||||
|
if (SDL_Init(SDL_INIT_AUDIO) < 0)
|
||||||
|
{
|
||||||
|
Sys_Error("SDL2: Could not initialize!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize SDL2_mixer
|
||||||
|
if (Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096) == -1)
|
||||||
|
{
|
||||||
|
Sys_Error("SDL2_mixer: Could not initialize!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the current working dir.
|
// Get the current working dir.
|
||||||
char currentDirectory[1024];
|
char currentDirectory[1024];
|
||||||
char gameDirectory[1024];
|
char gameDirectory[1024];
|
||||||
|
|
Loading…
Reference in a new issue