mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-04 15:31:05 +00:00
Merge branch 'bp_random2' of http://git.magicalgirl.moe/STJr/SRB2 into bp_random2
This commit is contained in:
commit
caf081b6f5
13 changed files with 43 additions and 33 deletions
13
.travis.yml
13
.travis.yml
|
@ -2,14 +2,17 @@ language: c
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
|
||||||
env:
|
os:
|
||||||
- CFLAGS=-Wno-absolute-value -Werror
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
apt: true
|
||||||
|
ccache: true
|
||||||
directories:
|
directories:
|
||||||
- $HOME/srb2_cache
|
- $HOME/srb2_cache
|
||||||
|
|
||||||
|
@ -30,4 +33,10 @@ before_script:
|
||||||
- cd build
|
- cd build
|
||||||
- cmake ..
|
- cmake ..
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2_mixer game-music-emu p7zip ; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.4.dmg; hdiutil attach SDL2-2.0.4.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi
|
||||||
|
|
||||||
script: make
|
script: make
|
||||||
|
|
|
@ -6,16 +6,16 @@ find_path(GME_INCLUDE_DIR
|
||||||
NAMES gme.h
|
NAMES gme.h
|
||||||
PATHS
|
PATHS
|
||||||
${GME_PKGCONF_INCLUDE_DIRS}
|
${GME_PKGCONF_INCLUDE_DIRS}
|
||||||
/usr/include/gme
|
"/usr/include/gme"
|
||||||
/usr/local/include/gme
|
"/usr/local/include/gme"
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(GME_LIBRARY
|
find_library(GME_LIBRARY
|
||||||
NAMES gme
|
NAMES gme
|
||||||
PATHS
|
PATHS
|
||||||
${GME_PKGCONF_LIBRARY_DIRS}
|
${GME_PKGCONF_LIBRARY_DIRS}
|
||||||
/usr/lib
|
"/usr/lib"
|
||||||
/usr/local/lib
|
"/usr/local/lib"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(GME_PROCESS_INCLUDES GME_INCLUDE_DIR)
|
set(GME_PROCESS_INCLUDES GME_INCLUDE_DIR)
|
||||||
|
|
18
comptime.bat
18
comptime.bat
|
@ -1,4 +1,4 @@
|
||||||
@ECHO OFF
|
@echo off
|
||||||
set BRA=Unknown
|
set BRA=Unknown
|
||||||
set REV=illegal
|
set REV=illegal
|
||||||
|
|
||||||
|
@ -13,20 +13,20 @@ goto filwri
|
||||||
:gitrev
|
:gitrev
|
||||||
set GIT=%2
|
set GIT=%2
|
||||||
if "%GIT%"=="" set GIT=git
|
if "%GIT%"=="" set GIT=git
|
||||||
FOR /F "usebackq" %%s IN (`%GIT% rev-parse --abbrev-ref HEAD`) DO @SET BRA=%%s
|
for /f "usebackq" %%s in (`%GIT% rev-parse --abbrev-ref HEAD`) do @set BRA=%%s
|
||||||
FOR /F "usebackq" %%s IN (`%GIT% rev-parse HEAD`) DO @SET REV=%%s
|
for /f "usebackq" %%s in (`%GIT% rev-parse HEAD`) do @set REV=%%s
|
||||||
set REV=%REV:~0,8%
|
set REV=%REV:~0,8%
|
||||||
goto filwri
|
goto filwri
|
||||||
|
|
||||||
:svnrev
|
:svnrev
|
||||||
set BRA=Subversion
|
set BRA=Subversion
|
||||||
FOR /F "usebackq" %%s IN (`svnversion .`) DO @SET REV=%%s
|
for /f "usebackq" %%s in (`svnversion .`) do @set REV=%%s
|
||||||
set REV=r%REV%
|
set REV=r%REV%
|
||||||
goto filwri
|
goto filwri
|
||||||
|
|
||||||
:filwri
|
:filwri
|
||||||
ECHO // Do not edit! This file was autogenerated > %1\comptime.h
|
echo // Do not edit! This file was autogenerated > %1\comptime.h
|
||||||
ECHO // by the %0 batch file >> %1\comptime.h
|
echo // by the %0 batch file >> %1\comptime.h
|
||||||
ECHO // >> %1\comptime.h
|
echo // >> %1\comptime.h
|
||||||
ECHO const char* compbranch = "%BRA%"; >> %1\comptime.h
|
echo const char* compbranch = "%BRA%"; >> %1\comptime.h
|
||||||
ECHO const char* comprevision = "%REV%"; >> %1\comptime.h
|
echo const char* comprevision = "%REV%"; >> %1\comptime.h
|
||||||
|
|
|
@ -316,6 +316,7 @@ if(${SRB2_CONFIG_HAVE_GME})
|
||||||
find_package(GME)
|
find_package(GME)
|
||||||
if(${GME_FOUND})
|
if(${GME_FOUND})
|
||||||
set(SRB2_HAVE_GME ON)
|
set(SRB2_HAVE_GME ON)
|
||||||
|
add_definitions(-DHAVE_LIBGME)
|
||||||
else()
|
else()
|
||||||
message(WARNING "You have specified that GME is available but it was not found.")
|
message(WARNING "You have specified that GME is available but it was not found.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -262,9 +262,7 @@ else
|
||||||
OBJS+=$(OBJDIR)/hw3sound.o
|
OBJS+=$(OBJDIR)/hw3sound.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef NOVERSION
|
|
||||||
OPTS += -DCOMPVERSION
|
OPTS += -DCOMPVERSION
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef NONX86
|
ifndef NONX86
|
||||||
ifndef GCC29
|
ifndef GCC29
|
||||||
|
@ -551,15 +549,11 @@ cleandep:
|
||||||
$(REMOVE) comptime.h
|
$(REMOVE) comptime.h
|
||||||
|
|
||||||
pre-build:
|
pre-build:
|
||||||
ifdef NOVERSION
|
|
||||||
-@touch comptime.c
|
|
||||||
else
|
|
||||||
ifdef WINDOWSHELL
|
ifdef WINDOWSHELL
|
||||||
-..\comptime.bat .
|
-..\comptime.bat .
|
||||||
else
|
else
|
||||||
-@../comptime.sh .
|
-@../comptime.sh .
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(REMOVE) *~ *.flc
|
$(REMOVE) *~ *.flc
|
||||||
|
|
|
@ -513,7 +513,6 @@ static void D_Display(void)
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
||||||
tic_t rendergametic;
|
tic_t rendergametic;
|
||||||
boolean supdate;
|
|
||||||
|
|
||||||
void D_SRB2Loop(void)
|
void D_SRB2Loop(void)
|
||||||
{
|
{
|
||||||
|
@ -604,7 +603,6 @@ void D_SRB2Loop(void)
|
||||||
|
|
||||||
// Update display, next frame, with current state.
|
// Update display, next frame, with current state.
|
||||||
D_Display();
|
D_Display();
|
||||||
supdate = false;
|
|
||||||
|
|
||||||
if (moviemode)
|
if (moviemode)
|
||||||
M_SaveFrame();
|
M_SaveFrame();
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
#include "w_wad.h" // for MAX_WADFILES
|
#include "w_wad.h" // for MAX_WADFILES
|
||||||
|
|
||||||
extern boolean supdate;
|
|
||||||
extern boolean advancedemo;
|
extern boolean advancedemo;
|
||||||
|
|
||||||
// make sure not to write back the config until it's been correctly loaded
|
// make sure not to write back the config until it's been correctly loaded
|
||||||
|
|
|
@ -94,7 +94,6 @@ typedef long ssize_t;
|
||||||
#ifdef __APPLE_CC__
|
#ifdef __APPLE_CC__
|
||||||
#define DIRECTFULLSCREEN
|
#define DIRECTFULLSCREEN
|
||||||
#define DEBUG_LOG
|
#define DEBUG_LOG
|
||||||
#define HWRENDER
|
|
||||||
#define NOIPX
|
#define NOIPX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#else
|
#else
|
||||||
#ifndef HAVE_MEMCPY
|
#ifndef HAVE_MEMCPY
|
||||||
#if !((defined (_WIN32) || defined (_WIN32_WCE)) && !defined (__CYGWIN__))
|
#if !((defined (_WIN32) || defined (_WIN32_WCE)) && !defined (__CYGWIN__)) && !defined (__APPLE__)
|
||||||
#define memcpy(d, s, n) bcopy ((s), (d), (n))
|
#define memcpy(d, s, n) bcopy ((s), (d), (n))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -7218,7 +7218,7 @@ void A_ChangeAngleAbsolute(mobj_t *actor)
|
||||||
//const angle_t amin = FixedAngle(locvar1*FRACUNIT);
|
//const angle_t amin = FixedAngle(locvar1*FRACUNIT);
|
||||||
//const angle_t amax = FixedAngle(locvar2*FRACUNIT);
|
//const angle_t amax = FixedAngle(locvar2*FRACUNIT);
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_CallAction("A_ChangeAngelAbsolute", actor))
|
if (LUA_CallAction("A_ChangeAngleAbsolute", actor))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -117,11 +117,13 @@ if(${SDL2_FOUND})
|
||||||
add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ${SRB2_SDL2_TOTAL_SOURCES})
|
add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ${SRB2_SDL2_TOTAL_SOURCES})
|
||||||
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME ${SRB2_SDL2_EXE_NAME})
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME ${SRB2_SDL2_EXE_NAME})
|
||||||
|
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
add_framework(CoreFoundation SRB2SDL2)
|
find_library(CORE_LIB CoreFoundation)
|
||||||
add_framework(SDL2 SRB2SDL2)
|
|
||||||
add_framework(SDL2_mixer SRB2SDL2)
|
|
||||||
target_link_libraries(SRB2SDL2 PRIVATE
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
|
${CORE_LIB}
|
||||||
|
SDL2
|
||||||
|
SDL2_mixer
|
||||||
|
${GME_LIBRARIES}
|
||||||
${PNG_LIBRARIES}
|
${PNG_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
|
@ -131,6 +133,7 @@ if(${SDL2_FOUND})
|
||||||
target_link_libraries(SRB2SDL2 PRIVATE
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
${SDL2_LIBRARIES}
|
${SDL2_LIBRARIES}
|
||||||
${SDL2_MIXER_LIBRARIES}
|
${SDL2_MIXER_LIBRARIES}
|
||||||
|
${GME_LIBRARIES}
|
||||||
${PNG_LIBRARIES}
|
${PNG_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
|
@ -198,6 +201,7 @@ if(${SDL2_FOUND})
|
||||||
target_include_directories(SRB2SDL2 PRIVATE
|
target_include_directories(SRB2SDL2 PRIVATE
|
||||||
${SDL2_INCLUDE_DIRS}
|
${SDL2_INCLUDE_DIRS}
|
||||||
${SDL2_MIXER_INCLUDE_DIRS}
|
${SDL2_MIXER_INCLUDE_DIRS}
|
||||||
|
${GME_INCLUDE_DIRS}
|
||||||
${PNG_INCLUDE_DIRS}
|
${PNG_INCLUDE_DIRS}
|
||||||
${ZLIB_INCLUDE_DIRS}
|
${ZLIB_INCLUDE_DIRS}
|
||||||
${OPENGL_INCLUDE_DIRS}
|
${OPENGL_INCLUDE_DIRS}
|
||||||
|
@ -224,7 +228,7 @@ if(${SDL2_FOUND})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#### Installation ####
|
#### Installation ####
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
install(TARGETS SRB2SDL2
|
install(TARGETS SRB2SDL2
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
)
|
)
|
||||||
|
@ -265,7 +269,7 @@ if(${SDL2_FOUND})
|
||||||
|
|
||||||
|
|
||||||
# Mac bundle fixup
|
# Mac bundle fixup
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
install(CODE "
|
install(CODE "
|
||||||
include(BundleUtilities)
|
include(BundleUtilities)
|
||||||
fixup_bundle(\"${CMAKE_INSTALL_PREFIX}/Sonic Robo Blast 2.app\"
|
fixup_bundle(\"${CMAKE_INSTALL_PREFIX}/Sonic Robo Blast 2.app\"
|
||||||
|
|
|
@ -1270,6 +1270,7 @@
|
||||||
HAVE_BLUA,
|
HAVE_BLUA,
|
||||||
LUA_USE_POSIX,
|
LUA_USE_POSIX,
|
||||||
COMPVERSION,
|
COMPVERSION,
|
||||||
|
HWRENDER,
|
||||||
);
|
);
|
||||||
GCC_THREADSAFE_STATICS = NO;
|
GCC_THREADSAFE_STATICS = NO;
|
||||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||||
|
@ -1392,6 +1393,7 @@
|
||||||
HAVE_BLUA,
|
HAVE_BLUA,
|
||||||
LUA_USE_POSIX,
|
LUA_USE_POSIX,
|
||||||
COMPVERSION,
|
COMPVERSION,
|
||||||
|
HWRENDER,
|
||||||
);
|
);
|
||||||
GCC_THREADSAFE_STATICS = NO;
|
GCC_THREADSAFE_STATICS = NO;
|
||||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
|
|
||||||
|
#if !defined (__APPLE__)
|
||||||
|
|
||||||
// Like the OpenBSD version, but it doesn't check for src not being a valid
|
// Like the OpenBSD version, but it doesn't check for src not being a valid
|
||||||
// C string.
|
// C string.
|
||||||
size_t strlcat(char *dst, const char *src, size_t siz)
|
size_t strlcat(char *dst, const char *src, size_t siz)
|
||||||
|
@ -46,3 +48,5 @@ size_t strlcpy(char *dst, const char *src, size_t siz)
|
||||||
dst[0] = '\0';
|
dst[0] = '\0';
|
||||||
return strlcat(dst, src, siz);
|
return strlcat(dst, src, siz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue