move SDL sources to their own folder

master
an 2019-12-03 13:09:40 -05:00
parent e7847be538
commit ee5d47e1c5
7 changed files with 45 additions and 5 deletions

View File

@ -27,7 +27,6 @@ set(srcs
source/bgmusic.c
source/bgmusic.h
source/bspfile.h
source/cd_sdl.c
source/cdaudio.h
source/cfgfile.c
source/cfgfile.h
@ -63,7 +62,6 @@ set(srcs
source/gl_sky.c
source/gl_texmgr.c
source/gl_texmgr.h
source/gl_vidsdl.c
source/gl_warp.c
source/gl_warp_sin.h
source/glquake.h
@ -71,12 +69,10 @@ set(srcs
source/host_cmd.c
source/image.c
source/image.h
source/in_sdl.c
source/input.h
source/keys.c
source/keys.h
source/lodepng.h
source/main_sdl.c
source/mathlib.c
source/mathlib.h
source/menu.c
@ -129,7 +125,6 @@ set(srcs
source/snd_mpg123.c
source/snd_opus.c
source/snd_opus.h
source/snd_sdl.c
source/snd_umx.c
source/snd_umx.h
source/snd_vorbis.c
@ -178,6 +173,15 @@ set(srcs_windows
source/windows/sys_sdl_win.c
source/windows/wsaerror.h)
set(srcs_sdl
source/sdl/cd_sdl.c
source/sdl/gl_vidsdl.c
source/sdl/in_sdl.c
source/sdl/main_sdl.c
source/sdl/snd_sdl.c)
list(APPEND srcs ${srcs_sdl})
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(APPEND srcs ${srcs_windows})
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")

36
source/sdl/endian_sdl.h Normal file
View File

@ -0,0 +1,36 @@
/*
Copyright (C) 2019 Alison G. Watson
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef spingle__endian_sdl_h
#define spingle__endian_sdl_h
#include <SDL_endian.h>
#define HOST_BIGENDIAN (SDL_BYTEORDER == SDL_BIG_ENDIAN)
#define BigShort SDL_SwapBE16
#define BigLong SDL_SwapBE32
#define BigFloat SDL_SwapFloatBE
#define LittleShort SDL_SwapLE16
#define LittleLong SDL_SwapLE32
#define LittleFloat SDL_SwapFloatLE
#endif