mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 23:21:41 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts: # src/CMakeLists.txt
This commit is contained in:
commit
7ce670951b
72 changed files with 626 additions and 488 deletions
34
precompiled_headers.cmake
Normal file
34
precompiled_headers.cmake
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#
|
||||||
|
# Christoph Heindl 2010
|
||||||
|
# Precompiled Headers Demo
|
||||||
|
# http://cheind.wordpress.com
|
||||||
|
#
|
||||||
|
|
||||||
|
# Instructs the MSVC toolset to use the precompiled header PRECOMPILED_HEADER
|
||||||
|
# for each source file given in the collection named by SOURCE_VARIABLE_NAME.
|
||||||
|
function(enable_precompiled_headers PRECOMPILED_HEADER SOURCE_VARIABLE_NAME)
|
||||||
|
if(MSVC)
|
||||||
|
set(files ${${SOURCE_VARIABLE_NAME}})
|
||||||
|
|
||||||
|
# Generate precompiled header translation unit
|
||||||
|
get_filename_component(pch_basename ${PRECOMPILED_HEADER} NAME_WE)
|
||||||
|
set(pch_abs ${CMAKE_CURRENT_SOURCE_DIR}/${PRECOMPILED_HEADER})
|
||||||
|
set(pch_unity ${CMAKE_CURRENT_BINARY_DIR}/${pch_basename}.cpp)
|
||||||
|
FILE(WRITE ${pch_unity} "// Precompiled header unity generated by CMake\n")
|
||||||
|
FILE(APPEND ${pch_unity} "#include <${pch_abs}>\n")
|
||||||
|
set_source_files_properties(${pch_unity} PROPERTIES COMPILE_FLAGS "/Yc\"${pch_abs}\"")
|
||||||
|
|
||||||
|
# Update properties of source files to use the precompiled header.
|
||||||
|
# Additionally, force the inclusion of the precompiled header at beginning of each source file.
|
||||||
|
foreach(source_file ${files} )
|
||||||
|
set_source_files_properties(
|
||||||
|
${source_file}
|
||||||
|
PROPERTIES COMPILE_FLAGS
|
||||||
|
"/Yu\"${pch_abs}\" /FI\"${pch_abs}\""
|
||||||
|
)
|
||||||
|
endforeach(source_file)
|
||||||
|
|
||||||
|
# Finally, update the source file collection to contain the precompiled header translation unit
|
||||||
|
set(${SOURCE_VARIABLE_NAME} ${${SOURCE_VARIABLE_NAME}} ${pch_unity} PARENT_SCOPE)
|
||||||
|
endif(MSVC)
|
||||||
|
endfunction(enable_precompiled_headers)
|
|
@ -1,5 +1,7 @@
|
||||||
cmake_minimum_required( VERSION 2.8.7 )
|
cmake_minimum_required( VERSION 2.8.7 )
|
||||||
|
|
||||||
|
include(../precompiled_headers.cmake)
|
||||||
|
|
||||||
if( COMMAND cmake_policy )
|
if( COMMAND cmake_policy )
|
||||||
cmake_policy( SET CMP0003 NEW )
|
cmake_policy( SET CMP0003 NEW )
|
||||||
endif()
|
endif()
|
||||||
|
@ -939,8 +941,7 @@ set( NOT_COMPILED_SOURCE_FILES
|
||||||
asm_x86_64/tmap3.s
|
asm_x86_64/tmap3.s
|
||||||
)
|
)
|
||||||
|
|
||||||
# Enable fast math for some sources
|
set( FASTMATH_PCH_SOURCES
|
||||||
set( FASTMATH_SOURCES
|
|
||||||
r_swrenderer.cpp
|
r_swrenderer.cpp
|
||||||
r_3dfloors.cpp
|
r_3dfloors.cpp
|
||||||
r_bsp.cpp
|
r_bsp.cpp
|
||||||
|
@ -976,12 +977,35 @@ set( FASTMATH_SOURCES
|
||||||
oplsynth/fmopl.cpp
|
oplsynth/fmopl.cpp
|
||||||
oplsynth/mlopl.cpp
|
oplsynth/mlopl.cpp
|
||||||
oplsynth/mlopl_io.cpp
|
oplsynth/mlopl_io.cpp
|
||||||
oplsynth/music_opldumper_mididevice.cpp
|
|
||||||
oplsynth/music_opl_mididevice.cpp
|
|
||||||
oplsynth/opl_mus_player.cpp
|
|
||||||
oplsynth/dosbox/opl.cpp
|
oplsynth/dosbox/opl.cpp
|
||||||
oplsynth/OPL3.cpp
|
oplsynth/OPL3.cpp
|
||||||
oplsynth/nukedopl3.cpp
|
oplsynth/nukedopl3.cpp
|
||||||
|
timidity/common.cpp
|
||||||
|
timidity/instrum.cpp
|
||||||
|
timidity/instrum_dls.cpp
|
||||||
|
timidity/instrum_font.cpp
|
||||||
|
timidity/instrum_sf2.cpp
|
||||||
|
timidity/mix.cpp
|
||||||
|
timidity/playmidi.cpp
|
||||||
|
timidity/resample.cpp
|
||||||
|
timidity/timidity.cpp
|
||||||
|
wildmidi/file_io.cpp
|
||||||
|
wildmidi/gus_pat.cpp
|
||||||
|
wildmidi/reverb.cpp
|
||||||
|
wildmidi/wm_error.cpp
|
||||||
|
r_data/colormaps.cpp
|
||||||
|
r_data/r_translate.cpp
|
||||||
|
)
|
||||||
|
# This is disabled for now because I cannot find a way to give the .pch file a different name.
|
||||||
|
# Visual C++ 2015 seems hell-bent of only allowing one .pch file with the same name as the executable.
|
||||||
|
#enable_precompiled_headers( g_pch2.h FASTMATH_PCH_SOURCES )
|
||||||
|
|
||||||
|
# Enable fast math for some sources
|
||||||
|
set( FASTMATH_SOURCES
|
||||||
|
${FASTMATH_PCH_SOURCES}
|
||||||
|
oplsynth/music_opldumper_mididevice.cpp
|
||||||
|
oplsynth/music_opl_mididevice.cpp
|
||||||
|
oplsynth/opl_mus_player.cpp
|
||||||
sound/fmodsound.cpp
|
sound/fmodsound.cpp
|
||||||
sound/i_music.cpp
|
sound/i_music.cpp
|
||||||
sound/i_sound.cpp
|
sound/i_sound.cpp
|
||||||
|
@ -1006,22 +1030,7 @@ set( FASTMATH_SOURCES
|
||||||
sound/oalsound.cpp
|
sound/oalsound.cpp
|
||||||
sound/sndfile_decoder.cpp
|
sound/sndfile_decoder.cpp
|
||||||
sound/music_pseudo_mididevice.cpp
|
sound/music_pseudo_mididevice.cpp
|
||||||
timidity/common.cpp
|
|
||||||
timidity/instrum.cpp
|
|
||||||
timidity/instrum_dls.cpp
|
|
||||||
timidity/instrum_font.cpp
|
|
||||||
timidity/instrum_sf2.cpp
|
|
||||||
timidity/mix.cpp
|
|
||||||
timidity/playmidi.cpp
|
|
||||||
timidity/resample.cpp
|
|
||||||
timidity/timidity.cpp
|
|
||||||
wildmidi/file_io.cpp
|
|
||||||
wildmidi/gus_pat.cpp
|
|
||||||
wildmidi/reverb.cpp
|
|
||||||
wildmidi/wildmidi_lib.cpp
|
wildmidi/wildmidi_lib.cpp
|
||||||
wildmidi/wm_error.cpp
|
|
||||||
r_data/colormaps.cpp
|
|
||||||
r_data/r_translate.cpp
|
|
||||||
gl/data/gl_data.cpp
|
gl/data/gl_data.cpp
|
||||||
gl/data/gl_portaldata.cpp
|
gl/data/gl_portaldata.cpp
|
||||||
gl/data/gl_setup.cpp
|
gl/data/gl_setup.cpp
|
||||||
|
@ -1085,15 +1094,8 @@ set( FASTMATH_SOURCES
|
||||||
gl/models/gl_models.cpp
|
gl/models/gl_models.cpp
|
||||||
gl/models/gl_voxels.cpp
|
gl/models/gl_voxels.cpp
|
||||||
)
|
)
|
||||||
add_executable( zdoom WIN32 MACOSX_BUNDLE
|
|
||||||
${HEADER_FILES}
|
set (PCH_SOURCES
|
||||||
${NOT_COMPILED_SOURCE_FILES}
|
|
||||||
__autostart.cpp
|
|
||||||
${ASM_SOURCES}
|
|
||||||
${SYSTEM_SOURCES}
|
|
||||||
${X86_SOURCES}
|
|
||||||
${FASTMATH_SOURCES}
|
|
||||||
x86.cpp
|
|
||||||
actorptrselect.cpp
|
actorptrselect.cpp
|
||||||
am_map.cpp
|
am_map.cpp
|
||||||
b_bot.cpp
|
b_bot.cpp
|
||||||
|
@ -1154,7 +1156,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
m_misc.cpp
|
m_misc.cpp
|
||||||
m_png.cpp
|
m_png.cpp
|
||||||
m_random.cpp
|
m_random.cpp
|
||||||
m_specialpaths.cpp
|
|
||||||
memarena.cpp
|
memarena.cpp
|
||||||
md5.cpp
|
md5.cpp
|
||||||
name.cpp
|
name.cpp
|
||||||
|
@ -1217,7 +1218,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
statistics.cpp
|
statistics.cpp
|
||||||
stats.cpp
|
stats.cpp
|
||||||
stringtable.cpp
|
stringtable.cpp
|
||||||
strnatcmp.c
|
|
||||||
tables.cpp
|
tables.cpp
|
||||||
teaminfo.cpp
|
teaminfo.cpp
|
||||||
tempfiles.cpp
|
tempfiles.cpp
|
||||||
|
@ -1232,7 +1232,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
w_wad.cpp
|
w_wad.cpp
|
||||||
wi_stuff.cpp
|
wi_stuff.cpp
|
||||||
zstrformat.cpp
|
zstrformat.cpp
|
||||||
zstring.cpp
|
|
||||||
g_doom/a_doommisc.cpp
|
g_doom/a_doommisc.cpp
|
||||||
g_heretic/a_hereticmisc.cpp
|
g_heretic/a_hereticmisc.cpp
|
||||||
g_hexen/a_hexenmisc.cpp
|
g_hexen/a_hexenmisc.cpp
|
||||||
|
@ -1276,22 +1275,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
g_shared/sbar_mugshot.cpp
|
g_shared/sbar_mugshot.cpp
|
||||||
g_shared/shared_hud.cpp
|
g_shared/shared_hud.cpp
|
||||||
g_shared/shared_sbar.cpp
|
g_shared/shared_sbar.cpp
|
||||||
math/asin.c
|
|
||||||
math/atan.c
|
|
||||||
math/const.c
|
|
||||||
math/cosh.c
|
|
||||||
math/exp.c
|
|
||||||
math/isnan.c
|
|
||||||
math/log.c
|
|
||||||
math/log10.c
|
|
||||||
math/mtherr.c
|
|
||||||
math/polevl.c
|
|
||||||
math/sin.c
|
|
||||||
math/sinh.c
|
|
||||||
math/sqrt.c
|
|
||||||
math/tan.c
|
|
||||||
math/tanh.c
|
|
||||||
math/fastsin.cpp
|
|
||||||
resourcefiles/ancientzip.cpp
|
resourcefiles/ancientzip.cpp
|
||||||
resourcefiles/file_7z.cpp
|
resourcefiles/file_7z.cpp
|
||||||
resourcefiles/file_grp.cpp
|
resourcefiles/file_grp.cpp
|
||||||
|
@ -1302,7 +1285,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
resourcefiles/file_pak.cpp
|
resourcefiles/file_pak.cpp
|
||||||
resourcefiles/file_directory.cpp
|
resourcefiles/file_directory.cpp
|
||||||
resourcefiles/resourcefile.cpp
|
resourcefiles/resourcefile.cpp
|
||||||
sfmt/SFMT.cpp
|
|
||||||
textures/animations.cpp
|
textures/animations.cpp
|
||||||
textures/anim_switches.cpp
|
textures/anim_switches.cpp
|
||||||
textures/automaptexture.cpp
|
textures/automaptexture.cpp
|
||||||
|
@ -1347,6 +1329,7 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
r_data/voxels.cpp
|
r_data/voxels.cpp
|
||||||
r_data/renderstyle.cpp
|
r_data/renderstyle.cpp
|
||||||
r_data/r_interpolate.cpp
|
r_data/r_interpolate.cpp
|
||||||
|
sfmt/SFMT.cpp
|
||||||
zscript/ast.cpp
|
zscript/ast.cpp
|
||||||
zscript/vmbuilder.cpp
|
zscript/vmbuilder.cpp
|
||||||
zscript/vmdisasm.cpp
|
zscript/vmdisasm.cpp
|
||||||
|
@ -1355,6 +1338,38 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
zscript/zcc_compile.cpp
|
zscript/zcc_compile.cpp
|
||||||
zscript/zcc_expr.cpp
|
zscript/zcc_expr.cpp
|
||||||
zscript/zcc_parser.cpp
|
zscript/zcc_parser.cpp
|
||||||
|
)
|
||||||
|
enable_precompiled_headers( g_pch.h PCH_SOURCES )
|
||||||
|
|
||||||
|
add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
|
${HEADER_FILES}
|
||||||
|
${NOT_COMPILED_SOURCE_FILES}
|
||||||
|
__autostart.cpp
|
||||||
|
${ASM_SOURCES}
|
||||||
|
${SYSTEM_SOURCES}
|
||||||
|
${X86_SOURCES}
|
||||||
|
${FASTMATH_SOURCES}
|
||||||
|
${PCH_SOURCES}
|
||||||
|
x86.cpp
|
||||||
|
m_specialpaths.cpp
|
||||||
|
strnatcmp.c
|
||||||
|
zstring.cpp
|
||||||
|
math/asin.c
|
||||||
|
math/atan.c
|
||||||
|
math/const.c
|
||||||
|
math/cosh.c
|
||||||
|
math/exp.c
|
||||||
|
math/isnan.c
|
||||||
|
math/log.c
|
||||||
|
math/log10.c
|
||||||
|
math/mtherr.c
|
||||||
|
math/polevl.c
|
||||||
|
math/sin.c
|
||||||
|
math/sinh.c
|
||||||
|
math/sqrt.c
|
||||||
|
math/tan.c
|
||||||
|
math/tanh.c
|
||||||
|
math/fastsin.cpp
|
||||||
zzautozend.cpp
|
zzautozend.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -581,7 +581,7 @@ int VPrintf (int printlevel, const char *format, va_list parms)
|
||||||
return PrintString (printlevel, outline.GetChars());
|
return PrintString (printlevel, outline.GetChars());
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS Printf (int printlevel, const char *format, ...)
|
int Printf (int printlevel, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
int count;
|
int count;
|
||||||
|
@ -593,7 +593,7 @@ int STACK_ARGS Printf (int printlevel, const char *format, ...)
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS Printf (const char *format, ...)
|
int Printf (const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
int count;
|
int count;
|
||||||
|
@ -605,7 +605,7 @@ int STACK_ARGS Printf (const char *format, ...)
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS DPrintf (const char *format, ...)
|
int DPrintf (const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
int count;
|
int count;
|
||||||
|
|
|
@ -1259,7 +1259,7 @@ void FMaskCVar::DoSet (UCVarValue value, ECVarType type)
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
static int STACK_ARGS sortcvars (const void *a, const void *b)
|
static int sortcvars (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return strcmp (((*(FBaseCVar **)a))->GetName(), ((*(FBaseCVar **)b))->GetName());
|
return strcmp (((*(FBaseCVar **)a))->GetName(), ((*(FBaseCVar **)b))->GetName());
|
||||||
}
|
}
|
||||||
|
|
|
@ -663,14 +663,14 @@ void D_DoServerInfoChange (BYTE **stream, bool singlebit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS userinfosortfunc(const void *a, const void *b)
|
static int userinfosortfunc(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
TMap<FName, FBaseCVar *>::ConstPair *pair1 = *(TMap<FName, FBaseCVar *>::ConstPair **)a;
|
TMap<FName, FBaseCVar *>::ConstPair *pair1 = *(TMap<FName, FBaseCVar *>::ConstPair **)a;
|
||||||
TMap<FName, FBaseCVar *>::ConstPair *pair2 = *(TMap<FName, FBaseCVar *>::ConstPair **)b;
|
TMap<FName, FBaseCVar *>::ConstPair *pair2 = *(TMap<FName, FBaseCVar *>::ConstPair **)b;
|
||||||
return stricmp(pair1->Key.GetChars(), pair2->Key.GetChars());
|
return stricmp(pair1->Key.GetChars(), pair2->Key.GetChars());
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS namesortfunc(const void *a, const void *b)
|
static int namesortfunc(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
FName *name1 = (FName *)a;
|
FName *name1 = (FName *)a;
|
||||||
FName *name2 = (FName *)b;
|
FName *name2 = (FName *)b;
|
||||||
|
|
|
@ -2827,7 +2827,7 @@ bool PClass::ReadValue(FArchive &ar, void *addr) const
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static int STACK_ARGS cregcmp (const void *a, const void *b) NO_SANITIZE
|
static int cregcmp (const void *a, const void *b) NO_SANITIZE
|
||||||
{
|
{
|
||||||
const PClass *class1 = *(const PClass **)a;
|
const PClass *class1 = *(const PClass **)a;
|
||||||
const PClass *class2 = *(const PClass **)b;
|
const PClass *class2 = *(const PClass **)b;
|
||||||
|
|
|
@ -100,12 +100,6 @@ typedef TMap<int, PClassActor *> FClassMap;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) || defined(__WATCOMC__)
|
|
||||||
#define STACK_ARGS __cdecl
|
|
||||||
#else
|
|
||||||
#define STACK_ARGS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#define NOVTABLE __declspec(novtable)
|
#define NOVTABLE __declspec(novtable)
|
||||||
#else
|
#else
|
||||||
|
@ -149,11 +143,11 @@ enum
|
||||||
|
|
||||||
|
|
||||||
// [RH] This gets used all over; define it here:
|
// [RH] This gets used all over; define it here:
|
||||||
int STACK_ARGS Printf (int printlevel, const char *, ...) GCCPRINTF(2,3);
|
int Printf (int printlevel, const char *, ...) GCCPRINTF(2,3);
|
||||||
int STACK_ARGS Printf (const char *, ...) GCCPRINTF(1,2);
|
int Printf (const char *, ...) GCCPRINTF(1,2);
|
||||||
|
|
||||||
// [RH] Same here:
|
// [RH] Same here:
|
||||||
int STACK_ARGS DPrintf (const char *, ...) GCCPRINTF(1,2);
|
int DPrintf (const char *, ...) GCCPRINTF(1,2);
|
||||||
|
|
||||||
extern "C" int mysnprintf(char *buffer, size_t count, const char *format, ...) GCCPRINTF(3,4);
|
extern "C" int mysnprintf(char *buffer, size_t count, const char *format, ...) GCCPRINTF(3,4);
|
||||||
extern "C" int myvsnprintf(char *buffer, size_t count, const char *format, va_list argptr) GCCFORMAT(3);
|
extern "C" int myvsnprintf(char *buffer, size_t count, const char *format, va_list argptr) GCCFORMAT(3);
|
||||||
|
|
|
@ -100,7 +100,7 @@ static IdMap DoomEdFromMapinfo;
|
||||||
|
|
||||||
FDoomEdMap DoomEdMap;
|
FDoomEdMap DoomEdMap;
|
||||||
|
|
||||||
static int STACK_ARGS sortnums (const void *a, const void *b)
|
static int sortnums (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return (*(const FDoomEdMap::Pair**)a)->Key - (*(const FDoomEdMap::Pair**)b)->Key;
|
return (*(const FDoomEdMap::Pair**)a)->Key - (*(const FDoomEdMap::Pair**)b)->Key;
|
||||||
}
|
}
|
||||||
|
|
20
src/g_pch.h
Normal file
20
src/g_pch.h
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <float.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <zlib.h>
|
||||||
|
#include <new>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <cassert>
|
||||||
|
#include <direct.h>
|
||||||
|
#include <io.h>
|
||||||
|
#include <limits>
|
22
src/g_pch2.h
Normal file
22
src/g_pch2.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
// This is separate because the files being compiled with it use different compiler settings which may affect how the header is compiled
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <float.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <zlib.h>
|
||||||
|
#include <new>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <cassert>
|
||||||
|
#include <direct.h>
|
||||||
|
#include <io.h>
|
||||||
|
#include <limits>
|
||||||
|
#include <fcntl.h>
|
|
@ -34,7 +34,7 @@ FWeaponSlots *PlayingKeyConf;
|
||||||
TArray<PClassWeapon *> Weapons_ntoh;
|
TArray<PClassWeapon *> Weapons_ntoh;
|
||||||
TMap<PClassWeapon *, int> Weapons_hton;
|
TMap<PClassWeapon *, int> Weapons_hton;
|
||||||
|
|
||||||
static int STACK_ARGS ntoh_cmp(const void *a, const void *b);
|
static int ntoh_cmp(const void *a, const void *b);
|
||||||
|
|
||||||
IMPLEMENT_CLASS(PClassWeapon)
|
IMPLEMENT_CLASS(PClassWeapon)
|
||||||
|
|
||||||
|
@ -1725,7 +1725,7 @@ void P_SetupWeapons_ntohton()
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
static int STACK_ARGS ntoh_cmp(const void *a, const void *b)
|
static int ntoh_cmp(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
PClassWeapon *c1 = *(PClassWeapon **)a;
|
PClassWeapon *c1 = *(PClassWeapon **)a;
|
||||||
PClassWeapon *c2 = *(PClassWeapon **)b;
|
PClassWeapon *c2 = *(PClassWeapon **)b;
|
||||||
|
|
|
@ -379,7 +379,7 @@ static void DrawArmor(ABasicArmor * barmor, AHexenArmor * harmor, int x, int y)
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
static TArray<PClassActor *> KeyTypes, UnassignedKeyTypes;
|
static TArray<PClassActor *> KeyTypes, UnassignedKeyTypes;
|
||||||
|
|
||||||
static int STACK_ARGS ktcmp(const void * a, const void * b)
|
static int ktcmp(const void * a, const void * b)
|
||||||
{
|
{
|
||||||
AKey *key1 = (AKey*)GetDefaultByType ( *(PClassActor **)a );
|
AKey *key1 = (AKey*)GetDefaultByType ( *(PClassActor **)a );
|
||||||
AKey *key2 = (AKey*)GetDefaultByType ( *(PClassActor **)b );
|
AKey *key2 = (AKey*)GetDefaultByType ( *(PClassActor **)b );
|
||||||
|
|
|
@ -39,13 +39,6 @@
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <windows.h>
|
|
||||||
extern HWND Window;
|
|
||||||
#define USE_WINDOWS_DWORD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "gameconfigfile.h"
|
#include "gameconfigfile.h"
|
||||||
#include "c_cvars.h"
|
#include "c_cvars.h"
|
||||||
|
|
|
@ -84,7 +84,7 @@ CVAR (Int, sb_deathmatch_otherplayercolor, CR_GREY, CVAR_ARCHIVE)
|
||||||
CVAR (Bool, sb_teamdeathmatch_enable, true, CVAR_ARCHIVE)
|
CVAR (Bool, sb_teamdeathmatch_enable, true, CVAR_ARCHIVE)
|
||||||
CVAR (Int, sb_teamdeathmatch_headingcolor, CR_RED, CVAR_ARCHIVE)
|
CVAR (Int, sb_teamdeathmatch_headingcolor, CR_RED, CVAR_ARCHIVE)
|
||||||
|
|
||||||
int STACK_ARGS comparepoints (const void *arg1, const void *arg2)
|
int comparepoints (const void *arg1, const void *arg2)
|
||||||
{
|
{
|
||||||
// Compare first be frags/kills, then by name.
|
// Compare first be frags/kills, then by name.
|
||||||
player_t *p1 = *(player_t **)arg1;
|
player_t *p1 = *(player_t **)arg1;
|
||||||
|
@ -99,7 +99,7 @@ int STACK_ARGS comparepoints (const void *arg1, const void *arg2)
|
||||||
return diff;
|
return diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS compareteams (const void *arg1, const void *arg2)
|
int compareteams (const void *arg1, const void *arg2)
|
||||||
{
|
{
|
||||||
// Compare first by teams, then by frags, then by name.
|
// Compare first by teams, then by frags, then by name.
|
||||||
player_t *p1 = *(player_t **)arg1;
|
player_t *p1 = *(player_t **)arg1;
|
||||||
|
|
|
@ -56,7 +56,7 @@ extern bool SB_ForceActive;
|
||||||
|
|
||||||
// Sorting routines
|
// Sorting routines
|
||||||
|
|
||||||
int STACK_ARGS comparepoints(const void *arg1, const void *arg2);
|
int comparepoints(const void *arg1, const void *arg2);
|
||||||
int STACK_ARGS compareteams(const void *arg1, const void *arg2);
|
int compareteams(const void *arg1, const void *arg2);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -253,7 +253,7 @@ void FNodeBuilder::CreateSubsectorsForReal ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS FNodeBuilder::SortSegs (const void *a, const void *b)
|
int FNodeBuilder::SortSegs (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
const FPrivSeg *x = ((const USegPtr *)a)->SegPtr;
|
const FPrivSeg *x = ((const USegPtr *)a)->SegPtr;
|
||||||
const FPrivSeg *y = ((const USegPtr *)b)->SegPtr;
|
const FPrivSeg *y = ((const USegPtr *)b)->SegPtr;
|
||||||
|
|
|
@ -299,7 +299,7 @@ private:
|
||||||
void PushConnectingGLSeg (int subsector, TArray<glseg_t> &segs, vertex_t *v1, vertex_t *v2);
|
void PushConnectingGLSeg (int subsector, TArray<glseg_t> &segs, vertex_t *v1, vertex_t *v2);
|
||||||
int OutputDegenerateSubsector (TArray<glseg_t> &segs, int subsector, bool bForward, double lastdot, FPrivSeg *&prev, vertex_t *outVerts);
|
int OutputDegenerateSubsector (TArray<glseg_t> &segs, int subsector, bool bForward, double lastdot, FPrivSeg *&prev, vertex_t *outVerts);
|
||||||
|
|
||||||
static int STACK_ARGS SortSegs (const void *a, const void *b);
|
static int SortSegs (const void *a, const void *b);
|
||||||
|
|
||||||
double InterceptVector (const node_t &splitter, const FPrivSeg &seg);
|
double InterceptVector (const node_t &splitter, const FPrivSeg &seg);
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include "doomtype.h"
|
#include "doomtype.h"
|
||||||
#include "nodebuild.h"
|
#include "nodebuild.h"
|
||||||
|
|
||||||
static inline void STACK_ARGS Warn (const char *format, ...)
|
static inline void Warn (const char *format, ...)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,13 +41,14 @@
|
||||||
#include "m_swap.h"
|
#include "m_swap.h"
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
|
#include "i_system.h"
|
||||||
#include "opl.h"
|
#include "opl.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(_DEBUG) && defined(_WIN32) && defined(_MSC_VER)
|
#if defined(_DEBUG) && defined(_WIN32) && defined(_MSC_VER)
|
||||||
#define DEBUGOUT(m,c,s,t) \
|
#define DEBUGOUT(m,c,s,t) \
|
||||||
{ char foo[128]; mysnprintf(foo, countof(foo), m, c, s, t); OutputDebugString(foo); }
|
{ char foo[128]; mysnprintf(foo, countof(foo), m, c, s, t); I_DebugPrint(foo); }
|
||||||
#else
|
#else
|
||||||
#define DEBUGOUT(m,c,s,t)
|
#define DEBUGOUT(m,c,s,t)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2507,7 +2507,7 @@ void FBehavior::LoadScriptsDirectory ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS FBehavior::SortScripts (const void *a, const void *b)
|
int FBehavior::SortScripts (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
ScriptPtr *ptr1 = (ScriptPtr *)a;
|
ScriptPtr *ptr1 = (ScriptPtr *)a;
|
||||||
ScriptPtr *ptr2 = (ScriptPtr *)b;
|
ScriptPtr *ptr2 = (ScriptPtr *)b;
|
||||||
|
@ -9997,7 +9997,7 @@ void ClearProfiles(TArray<ProfileCollector> &profiles)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS sort_by_total_instr(const void *a_, const void *b_)
|
static int sort_by_total_instr(const void *a_, const void *b_)
|
||||||
{
|
{
|
||||||
const ProfileCollector *a = (const ProfileCollector *)a_;
|
const ProfileCollector *a = (const ProfileCollector *)a_;
|
||||||
const ProfileCollector *b = (const ProfileCollector *)b_;
|
const ProfileCollector *b = (const ProfileCollector *)b_;
|
||||||
|
@ -10007,7 +10007,7 @@ static int STACK_ARGS sort_by_total_instr(const void *a_, const void *b_)
|
||||||
return (int)(b->ProfileData->TotalInstr - a->ProfileData->TotalInstr);
|
return (int)(b->ProfileData->TotalInstr - a->ProfileData->TotalInstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS sort_by_min(const void *a_, const void *b_)
|
static int sort_by_min(const void *a_, const void *b_)
|
||||||
{
|
{
|
||||||
const ProfileCollector *a = (const ProfileCollector *)a_;
|
const ProfileCollector *a = (const ProfileCollector *)a_;
|
||||||
const ProfileCollector *b = (const ProfileCollector *)b_;
|
const ProfileCollector *b = (const ProfileCollector *)b_;
|
||||||
|
@ -10015,7 +10015,7 @@ static int STACK_ARGS sort_by_min(const void *a_, const void *b_)
|
||||||
return b->ProfileData->MinInstrPerRun - a->ProfileData->MinInstrPerRun;
|
return b->ProfileData->MinInstrPerRun - a->ProfileData->MinInstrPerRun;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS sort_by_max(const void *a_, const void *b_)
|
static int sort_by_max(const void *a_, const void *b_)
|
||||||
{
|
{
|
||||||
const ProfileCollector *a = (const ProfileCollector *)a_;
|
const ProfileCollector *a = (const ProfileCollector *)a_;
|
||||||
const ProfileCollector *b = (const ProfileCollector *)b_;
|
const ProfileCollector *b = (const ProfileCollector *)b_;
|
||||||
|
@ -10023,7 +10023,7 @@ static int STACK_ARGS sort_by_max(const void *a_, const void *b_)
|
||||||
return b->ProfileData->MaxInstrPerRun - a->ProfileData->MaxInstrPerRun;
|
return b->ProfileData->MaxInstrPerRun - a->ProfileData->MaxInstrPerRun;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS sort_by_avg(const void *a_, const void *b_)
|
static int sort_by_avg(const void *a_, const void *b_)
|
||||||
{
|
{
|
||||||
const ProfileCollector *a = (const ProfileCollector *)a_;
|
const ProfileCollector *a = (const ProfileCollector *)a_;
|
||||||
const ProfileCollector *b = (const ProfileCollector *)b_;
|
const ProfileCollector *b = (const ProfileCollector *)b_;
|
||||||
|
@ -10033,7 +10033,7 @@ static int STACK_ARGS sort_by_avg(const void *a_, const void *b_)
|
||||||
return b_avg - a_avg;
|
return b_avg - a_avg;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS sort_by_runs(const void *a_, const void *b_)
|
static int sort_by_runs(const void *a_, const void *b_)
|
||||||
{
|
{
|
||||||
const ProfileCollector *a = (const ProfileCollector *)a_;
|
const ProfileCollector *a = (const ProfileCollector *)a_;
|
||||||
const ProfileCollector *b = (const ProfileCollector *)b_;
|
const ProfileCollector *b = (const ProfileCollector *)b_;
|
||||||
|
@ -10042,7 +10042,7 @@ static int STACK_ARGS sort_by_runs(const void *a_, const void *b_)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ShowProfileData(TArray<ProfileCollector> &profiles, long ilimit,
|
static void ShowProfileData(TArray<ProfileCollector> &profiles, long ilimit,
|
||||||
int (STACK_ARGS *sorter)(const void *, const void *), bool functions)
|
int (*sorter)(const void *, const void *), bool functions)
|
||||||
{
|
{
|
||||||
static const char *const typelabels[2] = { "script", "function" };
|
static const char *const typelabels[2] = { "script", "function" };
|
||||||
|
|
||||||
|
@ -10113,7 +10113,7 @@ static void ShowProfileData(TArray<ProfileCollector> &profiles, long ilimit,
|
||||||
|
|
||||||
CCMD(acsprofile)
|
CCMD(acsprofile)
|
||||||
{
|
{
|
||||||
static int (STACK_ARGS *sort_funcs[])(const void*, const void *) =
|
static int (*sort_funcs[])(const void*, const void *) =
|
||||||
{
|
{
|
||||||
sort_by_total_instr,
|
sort_by_total_instr,
|
||||||
sort_by_min,
|
sort_by_min,
|
||||||
|
@ -10126,7 +10126,7 @@ CCMD(acsprofile)
|
||||||
|
|
||||||
TArray<ProfileCollector> ScriptProfiles, FuncProfiles;
|
TArray<ProfileCollector> ScriptProfiles, FuncProfiles;
|
||||||
long limit = 10;
|
long limit = 10;
|
||||||
int (STACK_ARGS *sorter)(const void *, const void *) = sort_by_total_instr;
|
int (*sorter)(const void *, const void *) = sort_by_total_instr;
|
||||||
|
|
||||||
assert(countof(sort_names) == countof(sort_match_len));
|
assert(countof(sort_names) == countof(sort_match_len));
|
||||||
|
|
||||||
|
|
|
@ -361,7 +361,7 @@ private:
|
||||||
|
|
||||||
void LoadScriptsDirectory ();
|
void LoadScriptsDirectory ();
|
||||||
|
|
||||||
static int STACK_ARGS SortScripts (const void *a, const void *b);
|
static int SortScripts (const void *a, const void *b);
|
||||||
void UnencryptStrings ();
|
void UnencryptStrings ();
|
||||||
void UnescapeStringTable(BYTE *chunkstart, BYTE *datastart, bool haspadding);
|
void UnescapeStringTable(BYTE *chunkstart, BYTE *datastart, bool haspadding);
|
||||||
int FindStringInChunk (DWORD *chunk, const char *varname) const;
|
int FindStringInChunk (DWORD *chunk, const char *varname) const;
|
||||||
|
|
|
@ -621,7 +621,7 @@ void P_DrawSplash2 (int count, const DVector3 &pos, DAngle angle, int updown, in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void P_DrawRailTrail(AActor *source, const DVector3 &start, const DVector3 &end, int color1, int color2, double maxdiff_d, int flags, PClassActor *spawnclass, DAngle angle, int duration, double sparsity, double drift, int SpiralOffset)
|
void P_DrawRailTrail(AActor *source, const DVector3 &start, TArray<SPortalHit> &portalhits, const DVector3 &end, int color1, int color2, double maxdiff_d, int flags, PClassActor *spawnclass, DAngle angle, int duration, double sparsity, double drift, int SpiralOffset)
|
||||||
{
|
{
|
||||||
double length, lengthsquared;
|
double length, lengthsquared;
|
||||||
int steps, i;
|
int steps, i;
|
||||||
|
|
|
@ -90,7 +90,14 @@ void P_RunEffects (void);
|
||||||
|
|
||||||
void P_RunEffect (AActor *actor, int effects);
|
void P_RunEffect (AActor *actor, int effects);
|
||||||
|
|
||||||
void P_DrawRailTrail(AActor *source, const DVector3 &start, const DVector3 &end, int color1, int color2, double maxdiff = 0, int flags = 0, PClassActor *spawnclass = NULL, DAngle angle = 0., int duration = 35, double sparsity = 1.0, double drift = 1.0, int SpiralOffset = 270);
|
struct SPortalHit
|
||||||
|
{
|
||||||
|
DVector3 HitPos;
|
||||||
|
DVector3 ContPos;
|
||||||
|
DVector3 OutDir;
|
||||||
|
};
|
||||||
|
|
||||||
|
void P_DrawRailTrail(AActor *source, const DVector3 &start, TArray<SPortalHit> &portalhits, const DVector3 &end, int color1, int color2, double maxdiff = 0, int flags = 0, PClassActor *spawnclass = NULL, DAngle angle = 0., int duration = 35, double sparsity = 1.0, double drift = 1.0, int SpiralOffset = 270);
|
||||||
void P_DrawSplash (int count, const DVector3 &pos, DAngle angle, int kind);
|
void P_DrawSplash (int count, const DVector3 &pos, DAngle angle, int kind);
|
||||||
void P_DrawSplash2 (int count, const DVector3 &pos, DAngle angle, int updown, int kind);
|
void P_DrawSplash2 (int count, const DVector3 &pos, DAngle angle, int updown, int kind);
|
||||||
void P_DisconnectEffect (AActor *actor);
|
void P_DisconnectEffect (AActor *actor);
|
||||||
|
|
185
src/p_lights.cpp
185
src/p_lights.cpp
|
@ -42,6 +42,131 @@ static FRandom pr_lightflash ("LightFlash");
|
||||||
static FRandom pr_strobeflash ("StrobeFlash");
|
static FRandom pr_strobeflash ("StrobeFlash");
|
||||||
static FRandom pr_fireflicker ("FireFlicker");
|
static FRandom pr_fireflicker ("FireFlicker");
|
||||||
|
|
||||||
|
|
||||||
|
class DFireFlicker : public DLighting
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(DFireFlicker, DLighting)
|
||||||
|
public:
|
||||||
|
DFireFlicker(sector_t *sector);
|
||||||
|
DFireFlicker(sector_t *sector, int upper, int lower);
|
||||||
|
void Serialize(FArchive &arc);
|
||||||
|
void Tick();
|
||||||
|
protected:
|
||||||
|
int m_Count;
|
||||||
|
int m_MaxLight;
|
||||||
|
int m_MinLight;
|
||||||
|
private:
|
||||||
|
DFireFlicker();
|
||||||
|
};
|
||||||
|
|
||||||
|
class DFlicker : public DLighting
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(DFlicker, DLighting)
|
||||||
|
public:
|
||||||
|
DFlicker(sector_t *sector, int upper, int lower);
|
||||||
|
void Serialize(FArchive &arc);
|
||||||
|
void Tick();
|
||||||
|
protected:
|
||||||
|
int m_Count;
|
||||||
|
int m_MaxLight;
|
||||||
|
int m_MinLight;
|
||||||
|
private:
|
||||||
|
DFlicker();
|
||||||
|
};
|
||||||
|
|
||||||
|
class DLightFlash : public DLighting
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(DLightFlash, DLighting)
|
||||||
|
public:
|
||||||
|
DLightFlash(sector_t *sector);
|
||||||
|
DLightFlash(sector_t *sector, int min, int max);
|
||||||
|
void Serialize(FArchive &arc);
|
||||||
|
void Tick();
|
||||||
|
protected:
|
||||||
|
int m_Count;
|
||||||
|
int m_MaxLight;
|
||||||
|
int m_MinLight;
|
||||||
|
int m_MaxTime;
|
||||||
|
int m_MinTime;
|
||||||
|
private:
|
||||||
|
DLightFlash();
|
||||||
|
};
|
||||||
|
|
||||||
|
class DStrobe : public DLighting
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(DStrobe, DLighting)
|
||||||
|
public:
|
||||||
|
DStrobe(sector_t *sector, int utics, int ltics, bool inSync);
|
||||||
|
DStrobe(sector_t *sector, int upper, int lower, int utics, int ltics);
|
||||||
|
void Serialize(FArchive &arc);
|
||||||
|
void Tick();
|
||||||
|
protected:
|
||||||
|
int m_Count;
|
||||||
|
int m_MinLight;
|
||||||
|
int m_MaxLight;
|
||||||
|
int m_DarkTime;
|
||||||
|
int m_BrightTime;
|
||||||
|
private:
|
||||||
|
DStrobe();
|
||||||
|
};
|
||||||
|
|
||||||
|
class DGlow : public DLighting
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(DGlow, DLighting)
|
||||||
|
public:
|
||||||
|
DGlow(sector_t *sector);
|
||||||
|
void Serialize(FArchive &arc);
|
||||||
|
void Tick();
|
||||||
|
protected:
|
||||||
|
int m_MinLight;
|
||||||
|
int m_MaxLight;
|
||||||
|
int m_Direction;
|
||||||
|
private:
|
||||||
|
DGlow();
|
||||||
|
};
|
||||||
|
|
||||||
|
// [RH] Glow from Light_Glow and Light_Fade specials
|
||||||
|
class DGlow2 : public DLighting
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(DGlow2, DLighting)
|
||||||
|
public:
|
||||||
|
DGlow2(sector_t *sector, int start, int end, int tics, bool oneshot);
|
||||||
|
void Serialize(FArchive &arc);
|
||||||
|
void Tick();
|
||||||
|
protected:
|
||||||
|
int m_Start;
|
||||||
|
int m_End;
|
||||||
|
int m_MaxTics;
|
||||||
|
int m_Tics;
|
||||||
|
bool m_OneShot;
|
||||||
|
private:
|
||||||
|
DGlow2();
|
||||||
|
};
|
||||||
|
|
||||||
|
// [RH] Phased light thinker
|
||||||
|
class DPhased : public DLighting
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(DPhased, DLighting)
|
||||||
|
public:
|
||||||
|
DPhased(sector_t *sector);
|
||||||
|
DPhased(sector_t *sector, int baselevel, int phase);
|
||||||
|
void Serialize(FArchive &arc);
|
||||||
|
void Tick();
|
||||||
|
protected:
|
||||||
|
BYTE m_BaseLevel;
|
||||||
|
BYTE m_Phase;
|
||||||
|
private:
|
||||||
|
DPhased();
|
||||||
|
DPhased(sector_t *sector, int baselevel);
|
||||||
|
int PhaseHelper(sector_t *sector, int index, int light, sector_t *prev);
|
||||||
|
};
|
||||||
|
|
||||||
|
#define GLOWSPEED 8
|
||||||
|
#define STROBEBRIGHT 5
|
||||||
|
#define FASTDARK 15
|
||||||
|
#define SLOWDARK TICRATE
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -845,3 +970,63 @@ void EV_StopLightEffect (int tag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void P_SpawnLights(sector_t *sector)
|
||||||
|
{
|
||||||
|
switch (sector->special)
|
||||||
|
{
|
||||||
|
case Light_Phased:
|
||||||
|
new DPhased(sector, 48, 63 - (sector->lightlevel & 63));
|
||||||
|
break;
|
||||||
|
|
||||||
|
// [RH] Hexen-like phased lighting
|
||||||
|
case LightSequenceStart:
|
||||||
|
new DPhased(sector);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dLight_Flicker:
|
||||||
|
new DLightFlash(sector);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dLight_StrobeFast:
|
||||||
|
new DStrobe(sector, STROBEBRIGHT, FASTDARK, false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dLight_StrobeSlow:
|
||||||
|
new DStrobe(sector, STROBEBRIGHT, SLOWDARK, false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dLight_Strobe_Hurt:
|
||||||
|
new DStrobe(sector, STROBEBRIGHT, FASTDARK, false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dLight_Glow:
|
||||||
|
new DGlow(sector);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dLight_StrobeSlowSync:
|
||||||
|
new DStrobe(sector, STROBEBRIGHT, SLOWDARK, true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dLight_StrobeFastSync:
|
||||||
|
new DStrobe(sector, STROBEBRIGHT, FASTDARK, true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dLight_FireFlicker:
|
||||||
|
new DFireFlicker(sector);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case dScroll_EastLavaDamage:
|
||||||
|
new DStrobe(sector, STROBEBRIGHT, FASTDARK, false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case sLight_Strobe_Hurt:
|
||||||
|
new DStrobe(sector, STROBEBRIGHT, FASTDARK, false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -3555,7 +3555,7 @@ static FLineSpecial LineSpecialNames[] = {
|
||||||
#include "actionspecials.h"
|
#include "actionspecials.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
static int STACK_ARGS lscmp (const void * a, const void * b)
|
static int lscmp (const void * a, const void * b)
|
||||||
{
|
{
|
||||||
return stricmp( ((FLineSpecial*)a)->name, ((FLineSpecial*)b)->name);
|
return stricmp( ((FLineSpecial*)a)->name, ((FLineSpecial*)b)->name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,12 @@ enum WARPF
|
||||||
WARPF_COPYPITCH = 0x8000,
|
WARPF_COPYPITCH = 0x8000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum PCM
|
||||||
|
{
|
||||||
|
PCM_DROPOFF = 1,
|
||||||
|
PCM_NOACTORS = 1 << 1,
|
||||||
|
PCM_NOLINES = 1 << 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
AActor *P_BlockmapSearch (AActor *mo, int distance, AActor *(*check)(AActor*, int, void *), void *params = NULL);
|
AActor *P_BlockmapSearch (AActor *mo, int distance, AActor *(*check)(AActor*, int, void *), void *params = NULL);
|
||||||
|
@ -221,7 +226,7 @@ void P_FakeZMovement (AActor *mo);
|
||||||
bool P_TryMove(AActor* thing, const DVector2 &pos, int dropoff, const secplane_t * onfloor, FCheckPosition &tm, bool missileCheck = false);
|
bool P_TryMove(AActor* thing, const DVector2 &pos, int dropoff, const secplane_t * onfloor, FCheckPosition &tm, bool missileCheck = false);
|
||||||
bool P_TryMove(AActor* thing, const DVector2 &pos, int dropoff, const secplane_t * onfloor = NULL);
|
bool P_TryMove(AActor* thing, const DVector2 &pos, int dropoff, const secplane_t * onfloor = NULL);
|
||||||
|
|
||||||
bool P_CheckMove(AActor *thing, const DVector2 &pos, bool dropoff = false);
|
bool P_CheckMove(AActor *thing, const DVector2 &pos, int flags = 0);
|
||||||
void P_ApplyTorque(AActor *mo);
|
void P_ApplyTorque(AActor *mo);
|
||||||
|
|
||||||
bool P_TeleportMove(AActor* thing, const DVector3 &pos, bool telefrag, bool modifyactor = true); // [RH] Added z and telefrag parameters
|
bool P_TeleportMove(AActor* thing, const DVector3 &pos, bool telefrag, bool modifyactor = true); // [RH] Added z and telefrag parameters
|
||||||
|
|
|
@ -2410,14 +2410,26 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
bool P_CheckMove(AActor *thing, const DVector2 &pos, bool dropoff)
|
bool P_CheckMove(AActor *thing, const DVector2 &pos, int flags)
|
||||||
{
|
{
|
||||||
FCheckPosition tm;
|
FCheckPosition tm;
|
||||||
double newz = thing->Z();
|
double newz = thing->Z();
|
||||||
|
|
||||||
if (!P_CheckPosition(thing, pos, tm))
|
if (!P_CheckPosition(thing, pos, tm))
|
||||||
{
|
{
|
||||||
return false;
|
// Ignore PCM_DROPOFF. Not necessary here: a little later it is.
|
||||||
|
if (!flags || (!(flags & PCM_NOACTORS) && !(flags & PCM_NOLINES)))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(flags & PCM_NOACTORS) && thing->BlockingMobj)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(flags & PCM_NOLINES) && thing->BlockingLine)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thing->flags3 & MF3_FLOORHUGGER)
|
if (thing->flags3 & MF3_FLOORHUGGER)
|
||||||
|
@ -2469,7 +2481,7 @@ bool P_CheckMove(AActor *thing, const DVector2 &pos, bool dropoff)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (dropoff)
|
else if (flags & PCM_DROPOFF)
|
||||||
{
|
{
|
||||||
const DVector3 oldpos = thing->Pos();
|
const DVector3 oldpos = thing->Pos();
|
||||||
thing->SetOrigin(pos.X, pos.Y, newz, true);
|
thing->SetOrigin(pos.X, pos.Y, newz, true);
|
||||||
|
@ -4474,12 +4486,6 @@ struct SRailHit
|
||||||
DVector3 HitPos;
|
DVector3 HitPos;
|
||||||
DAngle HitAngle;
|
DAngle HitAngle;
|
||||||
};
|
};
|
||||||
struct SPortalHit
|
|
||||||
{
|
|
||||||
DVector3 HitPos;
|
|
||||||
DVector3 ContPos;
|
|
||||||
DVector3 OutDir;
|
|
||||||
};
|
|
||||||
struct RailData
|
struct RailData
|
||||||
{
|
{
|
||||||
AActor *Caller;
|
AActor *Caller;
|
||||||
|
@ -4588,11 +4594,19 @@ void P_RailAttack(FRailParams *p)
|
||||||
AActor *puffDefaults = GetDefaultByType(puffclass->GetReplacement()); //Contains all the flags such as FOILINVUL, etc.
|
AActor *puffDefaults = GetDefaultByType(puffclass->GetReplacement()); //Contains all the flags such as FOILINVUL, etc.
|
||||||
|
|
||||||
// disabled because not complete yet.
|
// disabled because not complete yet.
|
||||||
flags = (puffDefaults->flags6 & MF6_NOTRIGGER) ? 0/*TRACE_ReportPortals*/ : TRACE_PCross | TRACE_Impact /*| TRACE_ReportPortals*/;
|
flags = (puffDefaults->flags6 & MF6_NOTRIGGER) ? TRACE_ReportPortals : TRACE_PCross | TRACE_Impact | TRACE_ReportPortals;
|
||||||
rail_data.StopAtInvul = (puffDefaults->flags3 & MF3_FOILINVUL) ? false : true;
|
rail_data.StopAtInvul = (puffDefaults->flags3 & MF3_FOILINVUL) ? false : true;
|
||||||
rail_data.ThruSpecies = (puffDefaults->flags6 & MF6_MTHRUSPECIES) ? true : false;
|
rail_data.ThruSpecies = (puffDefaults->flags6 & MF6_MTHRUSPECIES) ? true : false;
|
||||||
|
|
||||||
|
// to make things easier, push the start position and directional vector onto the PortalHits array as its first element
|
||||||
|
SPortalHit phit = { start, start, vec };
|
||||||
|
rail_data.PortalHits.Push(phit);
|
||||||
Trace(start, source->Sector, vec, p->distance, MF_SHOOTABLE, ML_BLOCKEVERYTHING, source, trace, flags, ProcessRailHit, &rail_data);
|
Trace(start, source->Sector, vec, p->distance, MF_SHOOTABLE, ML_BLOCKEVERYTHING, source, trace, flags, ProcessRailHit, &rail_data);
|
||||||
|
|
||||||
|
// and push the hit position, too, so that the array contains the entire trace with all transition points.
|
||||||
|
phit = { trace.HitPos, trace.HitPos, trace.HitVector };
|
||||||
|
rail_data.PortalHits.Push(phit);
|
||||||
|
|
||||||
// Hurt anything the trace hit
|
// Hurt anything the trace hit
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
FName damagetype = (puffDefaults == NULL || puffDefaults->DamageType == NAME_None) ? FName(NAME_Railgun) : puffDefaults->DamageType;
|
FName damagetype = (puffDefaults == NULL || puffDefaults->DamageType == NAME_None) ? FName(NAME_Railgun) : puffDefaults->DamageType;
|
||||||
|
@ -4695,7 +4709,7 @@ void P_RailAttack(FRailParams *p)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the slug's trail.
|
// Draw the slug's trail.
|
||||||
P_DrawRailTrail(source, start, trace.HitPos, p->color1, p->color2, p->maxdiff, p->flags, p->spawnclass, angle, p->duration, p->sparsity, p->drift, p->SpiralOffset);
|
P_DrawRailTrail(source, start, rail_data.PortalHits, trace.HitPos, p->color1, p->color2, p->maxdiff, p->flags, p->spawnclass, angle, p->duration, p->sparsity, p->drift, p->SpiralOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -1056,6 +1056,7 @@ static void P_SetupSectorDamage(sector_t *sector, int damage, int interval, int
|
||||||
// Sets up everything derived from 'sector->special' for one sector
|
// Sets up everything derived from 'sector->special' for one sector
|
||||||
// ('fromload' is necessary to allow conversion upon savegame load.)
|
// ('fromload' is necessary to allow conversion upon savegame load.)
|
||||||
//
|
//
|
||||||
|
void P_SpawnLights(sector_t *sector);
|
||||||
|
|
||||||
void P_InitSectorSpecial(sector_t *sector, int special)
|
void P_InitSectorSpecial(sector_t *sector, int special)
|
||||||
{
|
{
|
||||||
|
@ -1089,31 +1090,10 @@ void P_InitSectorSpecial(sector_t *sector, int special)
|
||||||
|
|
||||||
// [RH] Normal DOOM special or BOOM specialized?
|
// [RH] Normal DOOM special or BOOM specialized?
|
||||||
bool keepspecial = false;
|
bool keepspecial = false;
|
||||||
|
P_SpawnLights(sector);
|
||||||
switch (sector->special)
|
switch (sector->special)
|
||||||
{
|
{
|
||||||
case Light_Phased:
|
|
||||||
new DPhased (sector, 48, 63 - (sector->lightlevel & 63));
|
|
||||||
break;
|
|
||||||
|
|
||||||
// [RH] Hexen-like phased lighting
|
|
||||||
case LightSequenceStart:
|
|
||||||
new DPhased (sector);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case dLight_Flicker:
|
|
||||||
new DLightFlash (sector);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case dLight_StrobeFast:
|
|
||||||
new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case dLight_StrobeSlow:
|
|
||||||
new DStrobe (sector, STROBEBRIGHT, SLOWDARK, false);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case dLight_Strobe_Hurt:
|
case dLight_Strobe_Hurt:
|
||||||
new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
|
|
||||||
P_SetupSectorDamage(sector, 20, 32, 5, NAME_Slime, 0);
|
P_SetupSectorDamage(sector, 20, 32, 5, NAME_Slime, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1125,10 +1105,6 @@ void P_InitSectorSpecial(sector_t *sector, int special)
|
||||||
P_SetupSectorDamage(sector, 5, 32, 0, NAME_Slime, 0);
|
P_SetupSectorDamage(sector, 5, 32, 0, NAME_Slime, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case dLight_Glow:
|
|
||||||
new DGlow (sector);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case dSector_DoorCloseIn30:
|
case dSector_DoorCloseIn30:
|
||||||
new DDoor(sector, DDoor::doorWaitClose, 2, 0, 0, 30 * TICRATE);
|
new DDoor(sector, DDoor::doorWaitClose, 2, 0, 0, 30 * TICRATE);
|
||||||
break;
|
break;
|
||||||
|
@ -1137,14 +1113,6 @@ void P_InitSectorSpecial(sector_t *sector, int special)
|
||||||
P_SetupSectorDamage(sector, 20, 32, 256, NAME_None, SECF_ENDGODMODE|SECF_ENDLEVEL);
|
P_SetupSectorDamage(sector, 20, 32, 256, NAME_None, SECF_ENDGODMODE|SECF_ENDLEVEL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case dLight_StrobeSlowSync:
|
|
||||||
new DStrobe (sector, STROBEBRIGHT, SLOWDARK, true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case dLight_StrobeFastSync:
|
|
||||||
new DStrobe (sector, STROBEBRIGHT, FASTDARK, true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case dSector_DoorRaiseIn5Mins:
|
case dSector_DoorRaiseIn5Mins:
|
||||||
new DDoor (sector, DDoor::doorWaitRaise, 2, TICRATE*30/7, 0, 5*60*TICRATE);
|
new DDoor (sector, DDoor::doorWaitRaise, 2, TICRATE*30/7, 0, 5*60*TICRATE);
|
||||||
break;
|
break;
|
||||||
|
@ -1159,10 +1127,6 @@ void P_InitSectorSpecial(sector_t *sector, int special)
|
||||||
P_SetupSectorDamage(sector, 20, 32, 5, NAME_Slime, 0);
|
P_SetupSectorDamage(sector, 20, 32, 5, NAME_Slime, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case dLight_FireFlicker:
|
|
||||||
new DFireFlicker (sector);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case dDamage_LavaWimpy:
|
case dDamage_LavaWimpy:
|
||||||
P_SetupSectorDamage(sector, 5, 32, 256, NAME_Fire, SECF_DMGTERRAINFX);
|
P_SetupSectorDamage(sector, 5, 32, 256, NAME_Fire, SECF_DMGTERRAINFX);
|
||||||
break;
|
break;
|
||||||
|
@ -1173,7 +1137,6 @@ void P_InitSectorSpecial(sector_t *sector, int special)
|
||||||
|
|
||||||
case dScroll_EastLavaDamage:
|
case dScroll_EastLavaDamage:
|
||||||
P_SetupSectorDamage(sector, 5, 32, 256, NAME_Fire, SECF_DMGTERRAINFX);
|
P_SetupSectorDamage(sector, 5, 32, 256, NAME_Fire, SECF_DMGTERRAINFX);
|
||||||
new DStrobe(sector, STROBEBRIGHT, FASTDARK, false);
|
|
||||||
P_CreateScroller(EScroll::sc_floor, -4., 0, -1, int(sector - sectors), 0);
|
P_CreateScroller(EScroll::sc_floor, -4., 0, -1, int(sector - sectors), 0);
|
||||||
keepspecial = true;
|
keepspecial = true;
|
||||||
break;
|
break;
|
||||||
|
@ -1184,7 +1147,6 @@ void P_InitSectorSpecial(sector_t *sector, int special)
|
||||||
|
|
||||||
case sLight_Strobe_Hurt:
|
case sLight_Strobe_Hurt:
|
||||||
P_SetupSectorDamage(sector, 5, 32, 0, NAME_Slime, 0);
|
P_SetupSectorDamage(sector, 5, 32, 0, NAME_Slime, 0);
|
||||||
new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case sDamage_Hellslime:
|
case sDamage_Hellslime:
|
||||||
|
|
170
src/p_spec.h
170
src/p_spec.h
|
@ -71,9 +71,6 @@ typedef enum
|
||||||
// (This is so scrolling floors and objects on them can move at same speed.)
|
// (This is so scrolling floors and objects on them can move at same speed.)
|
||||||
const double CARRYFACTOR = 3 / 32.;
|
const double CARRYFACTOR = 3 / 32.;
|
||||||
|
|
||||||
// Define values for map objects
|
|
||||||
#define MO_TELEPORTMAN 14
|
|
||||||
|
|
||||||
// Flags for P_SectorDamage
|
// Flags for P_SectorDamage
|
||||||
#define DAMAGE_PLAYERS 1
|
#define DAMAGE_PLAYERS 1
|
||||||
#define DAMAGE_NONPLAYERS 2
|
#define DAMAGE_NONPLAYERS 2
|
||||||
|
@ -87,7 +84,6 @@ const double CARRYFACTOR = 3 / 32.;
|
||||||
bool CheckIfExitIsGood (AActor *self, level_info_t *info);
|
bool CheckIfExitIsGood (AActor *self, level_info_t *info);
|
||||||
|
|
||||||
// at map load
|
// at map load
|
||||||
void P_InitSectorSpecial(sector_t *sector, int special);
|
|
||||||
void P_SpawnSpecials (void);
|
void P_SpawnSpecials (void);
|
||||||
|
|
||||||
// every tic
|
// every tic
|
||||||
|
@ -105,39 +101,6 @@ void P_SetSectorFriction (int tag, int amount, bool alterFlag);
|
||||||
double FrictionToMoveFactor(double friction);
|
double FrictionToMoveFactor(double friction);
|
||||||
void P_GiveSecret(AActor *actor, bool printmessage, bool playsound, int sectornum);
|
void P_GiveSecret(AActor *actor, bool printmessage, bool playsound, int sectornum);
|
||||||
|
|
||||||
//
|
|
||||||
// getSide()
|
|
||||||
// Will return a side_t*
|
|
||||||
// given the number of the current sector,
|
|
||||||
// the line number, and the side (0/1) that you want.
|
|
||||||
//
|
|
||||||
inline side_t *getSide (int currentSector, int line, int side)
|
|
||||||
{
|
|
||||||
return (sectors[currentSector].lines[line])->sidedef[side];
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// getSector()
|
|
||||||
// Will return a sector_t*
|
|
||||||
// given the number of the current sector,
|
|
||||||
// the line number and the side (0/1) that you want.
|
|
||||||
//
|
|
||||||
inline sector_t *getSector (int currentSector, int line, int side)
|
|
||||||
{
|
|
||||||
return (sectors[currentSector].lines[line])->sidedef[side]->sector;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// twoSided()
|
|
||||||
// Given the sector number and the line number,
|
|
||||||
// it will tell you whether the line is two-sided or not.
|
|
||||||
//
|
|
||||||
inline int twoSided (int sector, int line)
|
|
||||||
{
|
|
||||||
return (sectors[sector].lines[line])->flags & ML_TWOSIDED;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// getNextSector()
|
// getNextSector()
|
||||||
// Return sector_t * of sector next to current.
|
// Return sector_t * of sector next to current.
|
||||||
|
@ -156,142 +119,15 @@ inline sector_t *getNextSector (line_t *line, const sector_t *sec)
|
||||||
|
|
||||||
#include "p_tags.h"
|
#include "p_tags.h"
|
||||||
|
|
||||||
//
|
|
||||||
// P_LIGHTS
|
|
||||||
//
|
|
||||||
|
|
||||||
class DLighting : public DSectorEffect
|
class DLighting : public DSectorEffect
|
||||||
{
|
{
|
||||||
DECLARE_CLASS (DLighting, DSectorEffect)
|
DECLARE_CLASS(DLighting, DSectorEffect)
|
||||||
public:
|
public:
|
||||||
DLighting (sector_t *sector);
|
DLighting(sector_t *sector);
|
||||||
protected:
|
protected:
|
||||||
DLighting ();
|
DLighting();
|
||||||
};
|
};
|
||||||
|
|
||||||
class DFireFlicker : public DLighting
|
|
||||||
{
|
|
||||||
DECLARE_CLASS (DFireFlicker, DLighting)
|
|
||||||
public:
|
|
||||||
DFireFlicker (sector_t *sector);
|
|
||||||
DFireFlicker (sector_t *sector, int upper, int lower);
|
|
||||||
void Serialize (FArchive &arc);
|
|
||||||
void Tick ();
|
|
||||||
protected:
|
|
||||||
int m_Count;
|
|
||||||
int m_MaxLight;
|
|
||||||
int m_MinLight;
|
|
||||||
private:
|
|
||||||
DFireFlicker ();
|
|
||||||
};
|
|
||||||
|
|
||||||
class DFlicker : public DLighting
|
|
||||||
{
|
|
||||||
DECLARE_CLASS (DFlicker, DLighting)
|
|
||||||
public:
|
|
||||||
DFlicker (sector_t *sector, int upper, int lower);
|
|
||||||
void Serialize (FArchive &arc);
|
|
||||||
void Tick ();
|
|
||||||
protected:
|
|
||||||
int m_Count;
|
|
||||||
int m_MaxLight;
|
|
||||||
int m_MinLight;
|
|
||||||
private:
|
|
||||||
DFlicker ();
|
|
||||||
};
|
|
||||||
|
|
||||||
class DLightFlash : public DLighting
|
|
||||||
{
|
|
||||||
DECLARE_CLASS (DLightFlash, DLighting)
|
|
||||||
public:
|
|
||||||
DLightFlash (sector_t *sector);
|
|
||||||
DLightFlash (sector_t *sector, int min, int max);
|
|
||||||
void Serialize (FArchive &arc);
|
|
||||||
void Tick ();
|
|
||||||
protected:
|
|
||||||
int m_Count;
|
|
||||||
int m_MaxLight;
|
|
||||||
int m_MinLight;
|
|
||||||
int m_MaxTime;
|
|
||||||
int m_MinTime;
|
|
||||||
private:
|
|
||||||
DLightFlash ();
|
|
||||||
};
|
|
||||||
|
|
||||||
class DStrobe : public DLighting
|
|
||||||
{
|
|
||||||
DECLARE_CLASS (DStrobe, DLighting)
|
|
||||||
public:
|
|
||||||
DStrobe (sector_t *sector, int utics, int ltics, bool inSync);
|
|
||||||
DStrobe (sector_t *sector, int upper, int lower, int utics, int ltics);
|
|
||||||
void Serialize (FArchive &arc);
|
|
||||||
void Tick ();
|
|
||||||
protected:
|
|
||||||
int m_Count;
|
|
||||||
int m_MinLight;
|
|
||||||
int m_MaxLight;
|
|
||||||
int m_DarkTime;
|
|
||||||
int m_BrightTime;
|
|
||||||
private:
|
|
||||||
DStrobe ();
|
|
||||||
};
|
|
||||||
|
|
||||||
class DGlow : public DLighting
|
|
||||||
{
|
|
||||||
DECLARE_CLASS (DGlow, DLighting)
|
|
||||||
public:
|
|
||||||
DGlow (sector_t *sector);
|
|
||||||
void Serialize (FArchive &arc);
|
|
||||||
void Tick ();
|
|
||||||
protected:
|
|
||||||
int m_MinLight;
|
|
||||||
int m_MaxLight;
|
|
||||||
int m_Direction;
|
|
||||||
private:
|
|
||||||
DGlow ();
|
|
||||||
};
|
|
||||||
|
|
||||||
// [RH] Glow from Light_Glow and Light_Fade specials
|
|
||||||
class DGlow2 : public DLighting
|
|
||||||
{
|
|
||||||
DECLARE_CLASS (DGlow2, DLighting)
|
|
||||||
public:
|
|
||||||
DGlow2 (sector_t *sector, int start, int end, int tics, bool oneshot);
|
|
||||||
void Serialize (FArchive &arc);
|
|
||||||
void Tick ();
|
|
||||||
protected:
|
|
||||||
int m_Start;
|
|
||||||
int m_End;
|
|
||||||
int m_MaxTics;
|
|
||||||
int m_Tics;
|
|
||||||
bool m_OneShot;
|
|
||||||
private:
|
|
||||||
DGlow2 ();
|
|
||||||
};
|
|
||||||
|
|
||||||
// [RH] Phased light thinker
|
|
||||||
class DPhased : public DLighting
|
|
||||||
{
|
|
||||||
DECLARE_CLASS (DPhased, DLighting)
|
|
||||||
public:
|
|
||||||
DPhased (sector_t *sector);
|
|
||||||
DPhased (sector_t *sector, int baselevel, int phase);
|
|
||||||
void Serialize (FArchive &arc);
|
|
||||||
void Tick ();
|
|
||||||
protected:
|
|
||||||
BYTE m_BaseLevel;
|
|
||||||
BYTE m_Phase;
|
|
||||||
private:
|
|
||||||
DPhased ();
|
|
||||||
DPhased (sector_t *sector, int baselevel);
|
|
||||||
int PhaseHelper (sector_t *sector, int index, int light, sector_t *prev);
|
|
||||||
};
|
|
||||||
|
|
||||||
#define GLOWSPEED 8
|
|
||||||
#define STROBEBRIGHT 5
|
|
||||||
#define FASTDARK 15
|
|
||||||
#define SLOWDARK TICRATE
|
|
||||||
|
|
||||||
void EV_StartLightFlickering (int tag, int upper, int lower);
|
void EV_StartLightFlickering (int tag, int upper, int lower);
|
||||||
void EV_StartLightStrobing (int tag, int upper, int lower, int utics, int ltics);
|
void EV_StartLightStrobing (int tag, int upper, int lower, int utics, int ltics);
|
||||||
void EV_StartLightStrobing (int tag, int utics, int ltics);
|
void EV_StartLightStrobing (int tag, int utics, int ltics);
|
||||||
|
|
|
@ -451,7 +451,7 @@ FState *FStateDefinitions::FindState(const char * name)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static int STACK_ARGS labelcmp(const void *a, const void *b)
|
static int labelcmp(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
FStateLabel *A = (FStateLabel *)a;
|
FStateLabel *A = (FStateLabel *)a;
|
||||||
FStateLabel *B = (FStateLabel *)b;
|
FStateLabel *B = (FStateLabel *)b;
|
||||||
|
|
|
@ -532,7 +532,7 @@ typedef TMap<int, MapinfoSpawnItem> SpawnMap;
|
||||||
static SpawnMap SpawnablesFromMapinfo;
|
static SpawnMap SpawnablesFromMapinfo;
|
||||||
static SpawnMap ConversationIDsFromMapinfo;
|
static SpawnMap ConversationIDsFromMapinfo;
|
||||||
|
|
||||||
static int STACK_ARGS SpawnableSort(const void *a, const void *b)
|
static int SpawnableSort(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return (*((FClassMap::Pair **)a))->Key - (*((FClassMap::Pair **)b))->Key;
|
return (*((FClassMap::Pair **)a))->Key - (*((FClassMap::Pair **)b))->Key;
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,7 +231,7 @@ int FTraceInfo::EnterLinePortal(line_t *li, double frac)
|
||||||
|
|
||||||
frac += 1 / MaxDist;
|
frac += 1 / MaxDist;
|
||||||
double enterdist = MaxDist / frac;
|
double enterdist = MaxDist / frac;
|
||||||
DVector2 enter = newtrace.Start + enterdist * Vec;
|
DVector3 enter = newtrace.Start + enterdist * Vec;
|
||||||
|
|
||||||
newtrace.ActorMask = ActorMask;
|
newtrace.ActorMask = ActorMask;
|
||||||
newtrace.WallMask = WallMask;
|
newtrace.WallMask = WallMask;
|
||||||
|
@ -253,6 +253,18 @@ int FTraceInfo::EnterLinePortal(line_t *li, double frac)
|
||||||
newtrace.lastfloorportalheight = newtrace.lastceilingportalheight = newtrace.limitz;
|
newtrace.lastfloorportalheight = newtrace.lastceilingportalheight = newtrace.limitz;
|
||||||
newtrace.sectorsel = 0;
|
newtrace.sectorsel = 0;
|
||||||
Results->unlinked = true;
|
Results->unlinked = true;
|
||||||
|
|
||||||
|
if ((TraceFlags & TRACE_ReportPortals) && TraceCallback != NULL)
|
||||||
|
{
|
||||||
|
Results->HitType = TRACE_CrossingPortal;
|
||||||
|
Results->HitPos = enter;
|
||||||
|
P_TranslatePortalXY(li, enter.X, enter.Y);
|
||||||
|
P_TranslatePortalZ(li, enter.Z);
|
||||||
|
Results->SrcFromTarget = enter;
|
||||||
|
Results->HitVector = newtrace.Vec;
|
||||||
|
TraceCallback(*Results, TraceCallbackData);
|
||||||
|
}
|
||||||
|
|
||||||
return newtrace.TraceTraverse(ActorMask ? PT_ADDLINES | PT_ADDTHINGS | PT_COMPATIBLE : PT_ADDLINES);
|
return newtrace.TraceTraverse(ActorMask ? PT_ADDLINES | PT_ADDTHINGS | PT_COMPATIBLE : PT_ADDLINES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -455,8 +467,11 @@ bool FTraceInfo::LineCheck(intercept_t *in)
|
||||||
lastfloorportalheight = fc;
|
lastfloorportalheight = fc;
|
||||||
if (TraceCallback != NULL)
|
if (TraceCallback != NULL)
|
||||||
{
|
{
|
||||||
// Todo: calculate the intersection point.
|
|
||||||
Results->HitType = TRACE_CrossingPortal;
|
Results->HitType = TRACE_CrossingPortal;
|
||||||
|
double hitz = CurSector->SkyBoxes[sector_t::floor]->specialf1;
|
||||||
|
Results->HitPos = Start + Vec * (hitz - Start.Z) / Vec.Z;
|
||||||
|
Results->SrcFromTarget = Results->HitPos + CurSector->SkyBoxes[sector_t::floor]->Scale;
|
||||||
|
Results->HitVector = Vec;
|
||||||
TraceCallback(*Results, TraceCallbackData);
|
TraceCallback(*Results, TraceCallbackData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -483,8 +498,11 @@ bool FTraceInfo::LineCheck(intercept_t *in)
|
||||||
lastceilingportalheight = fc;
|
lastceilingportalheight = fc;
|
||||||
if (TraceCallback != NULL)
|
if (TraceCallback != NULL)
|
||||||
{
|
{
|
||||||
// Todo: calculate the intersection point.
|
|
||||||
Results->HitType = TRACE_CrossingPortal;
|
Results->HitType = TRACE_CrossingPortal;
|
||||||
|
double hitz = CurSector->SkyBoxes[sector_t::ceiling]->specialf1;
|
||||||
|
Results->HitPos = Start + Vec * (hitz - Start.Z) / Vec.Z;
|
||||||
|
Results->SrcFromTarget = Results->HitPos + CurSector->SkyBoxes[sector_t::ceiling]->Scale;
|
||||||
|
Results->HitVector = Vec;
|
||||||
TraceCallback(*Results, TraceCallbackData);
|
TraceCallback(*Results, TraceCallbackData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,7 @@ void P_ClearUDMFKeys()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS udmfcmp(const void *a, const void *b)
|
static int udmfcmp(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
FUDMFKey *A = (FUDMFKey*)a;
|
FUDMFKey *A = (FUDMFKey*)a;
|
||||||
FUDMFKey *B = (FUDMFKey*)b;
|
FUDMFKey *B = (FUDMFKey*)b;
|
||||||
|
|
|
@ -540,7 +540,7 @@ void PClassPlayerPawn::DeriveData(PClass *newclass)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS intcmp(const void *a, const void *b)
|
static int intcmp(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return *(const int *)a - *(const int *)b;
|
return *(const int *)a - *(const int *)b;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1469,7 +1469,7 @@ static void IterFindPolySides (FPolyObj *po, side_t *side)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static int STACK_ARGS posicmp(const void *a, const void *b)
|
static int posicmp(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return (*(const side_t **)a)->linedef->args[1] - (*(const side_t **)b)->linedef->args[1];
|
return (*(const side_t **)a)->linedef->args[1] - (*(const side_t **)b)->linedef->args[1];
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ void I_Quit()
|
||||||
extern FILE* Logfile;
|
extern FILE* Logfile;
|
||||||
bool gameisdead;
|
bool gameisdead;
|
||||||
|
|
||||||
void STACK_ARGS I_FatalError(const char* const error, ...)
|
void I_FatalError(const char* const error, ...)
|
||||||
{
|
{
|
||||||
static bool alreadyThrown = false;
|
static bool alreadyThrown = false;
|
||||||
gameisdead = true;
|
gameisdead = true;
|
||||||
|
@ -165,7 +165,7 @@ void STACK_ARGS I_FatalError(const char* const error, ...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void STACK_ARGS I_Error(const char* const error, ...)
|
void I_Error(const char* const error, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
char errortext[MAX_ERRORTEXT];
|
char errortext[MAX_ERRORTEXT];
|
||||||
|
@ -183,6 +183,12 @@ void I_SetIWADInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void I_DebugPrint(const char *cp)
|
||||||
|
{
|
||||||
|
NSLog(@"%s", cp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void I_PrintStr(const char* const message)
|
void I_PrintStr(const char* const message)
|
||||||
{
|
{
|
||||||
FConsoleWindow::GetInstance().AddText(message);
|
FConsoleWindow::GetInstance().AddText(message);
|
||||||
|
|
|
@ -363,6 +363,15 @@ void FConsoleWindow::SetTitleText()
|
||||||
textViewFrame.size.width,
|
textViewFrame.size.width,
|
||||||
TITLE_TEXT_HEIGHT);
|
TITLE_TEXT_HEIGHT);
|
||||||
|
|
||||||
|
// Temporary solution for the same foreground and background colors
|
||||||
|
// It's used in graphical startup screen, with Hexen style in particular
|
||||||
|
// Native OS X backend doesn't implement this yet
|
||||||
|
|
||||||
|
if (DoomStartupInfo.FgColor == DoomStartupInfo.BkColor)
|
||||||
|
{
|
||||||
|
DoomStartupInfo.FgColor = ~DoomStartupInfo.FgColor;
|
||||||
|
}
|
||||||
|
|
||||||
NSTextField* titleText = [[NSTextField alloc] initWithFrame:titleTextRect];
|
NSTextField* titleText = [[NSTextField alloc] initWithFrame:titleTextRect];
|
||||||
[titleText setStringValue:[NSString stringWithUTF8String:DoomStartupInfo.Name]];
|
[titleText setStringValue:[NSString stringWithUTF8String:DoomStartupInfo.Name]];
|
||||||
[titleText setAlignment:NSCenterTextAlignment];
|
[titleText setAlignment:NSCenterTextAlignment];
|
||||||
|
|
|
@ -104,13 +104,15 @@ void I_Quit (void);
|
||||||
|
|
||||||
void I_Tactile (int on, int off, int total);
|
void I_Tactile (int on, int off, int total);
|
||||||
|
|
||||||
void STACK_ARGS I_Error (const char *error, ...) GCCPRINTF(1,2);
|
void I_Error (const char *error, ...) GCCPRINTF(1,2);
|
||||||
void STACK_ARGS I_FatalError (const char *error, ...) GCCPRINTF(1,2);
|
void I_FatalError (const char *error, ...) GCCPRINTF(1,2);
|
||||||
|
|
||||||
void addterm (void (*func)(void), const char *name);
|
void addterm (void (*func)(void), const char *name);
|
||||||
#define atterm(t) addterm (t, #t)
|
#define atterm(t) addterm (t, #t)
|
||||||
void popterm ();
|
void popterm ();
|
||||||
|
|
||||||
|
void I_DebugPrint (const char *cp);
|
||||||
|
|
||||||
// Print a console string
|
// Print a console string
|
||||||
void I_PrintStr (const char *str);
|
void I_PrintStr (const char *str);
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ void popterm ()
|
||||||
NumTerms--;
|
NumTerms--;
|
||||||
}
|
}
|
||||||
|
|
||||||
void STACK_ARGS call_terms ()
|
void call_terms ()
|
||||||
{
|
{
|
||||||
while (NumTerms > 0)
|
while (NumTerms > 0)
|
||||||
{
|
{
|
||||||
|
@ -138,7 +138,7 @@ void STACK_ARGS call_terms ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void STACK_ARGS NewFailure ()
|
static void NewFailure ()
|
||||||
{
|
{
|
||||||
I_FatalError ("Failed to allocate memory from system heap");
|
I_FatalError ("Failed to allocate memory from system heap");
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ bool gameisdead;
|
||||||
void Mac_I_FatalError(const char* errortext);
|
void Mac_I_FatalError(const char* errortext);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void STACK_ARGS I_FatalError (const char *error, ...)
|
void I_FatalError (const char *error, ...)
|
||||||
{
|
{
|
||||||
static bool alreadyThrown = false;
|
static bool alreadyThrown = false;
|
||||||
gameisdead = true;
|
gameisdead = true;
|
||||||
|
@ -216,7 +216,7 @@ void STACK_ARGS I_FatalError (const char *error, ...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void STACK_ARGS I_Error (const char *error, ...)
|
void I_Error (const char *error, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
char errortext[MAX_ERRORTEXT];
|
char errortext[MAX_ERRORTEXT];
|
||||||
|
@ -232,6 +232,10 @@ void I_SetIWADInfo ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void I_DebugPrint(const char *cp)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void I_PrintStr (const char *cp)
|
void I_PrintStr (const char *cp)
|
||||||
{
|
{
|
||||||
// Strip out any color escape sequences before writing to the log file
|
// Strip out any color escape sequences before writing to the log file
|
||||||
|
|
|
@ -499,7 +499,7 @@ static const char *skinsoundnames[NUMSKINSOUNDS][2] =
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
static int STACK_ARGS skinsorter (const void *a, const void *b)
|
static int skinsorter (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return stricmp (((FPlayerSkin *)a)->name, ((FPlayerSkin *)b)->name);
|
return stricmp (((FPlayerSkin *)a)->name, ((FPlayerSkin *)b)->name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ void (*R_DrawSpanTranslucent)(void);
|
||||||
void (*R_DrawSpanMaskedTranslucent)(void);
|
void (*R_DrawSpanMaskedTranslucent)(void);
|
||||||
void (*R_DrawSpanAddClamp)(void);
|
void (*R_DrawSpanAddClamp)(void);
|
||||||
void (*R_DrawSpanMaskedAddClamp)(void);
|
void (*R_DrawSpanMaskedAddClamp)(void);
|
||||||
void (STACK_ARGS *rt_map4cols)(int,int,int);
|
void (*rt_map4cols)(int,int,int);
|
||||||
|
|
||||||
//
|
//
|
||||||
// R_DrawColumn
|
// R_DrawColumn
|
||||||
|
@ -984,7 +984,7 @@ int dscount;
|
||||||
|
|
||||||
#ifdef X86_ASM
|
#ifdef X86_ASM
|
||||||
extern "C" void R_SetSpanSource_ASM (const BYTE *flat);
|
extern "C" void R_SetSpanSource_ASM (const BYTE *flat);
|
||||||
extern "C" void STACK_ARGS R_SetSpanSize_ASM (int xbits, int ybits);
|
extern "C" void R_SetSpanSize_ASM (int xbits, int ybits);
|
||||||
extern "C" void R_SetSpanColormap_ASM (BYTE *colormap);
|
extern "C" void R_SetSpanColormap_ASM (BYTE *colormap);
|
||||||
extern "C" BYTE *ds_curcolormap, *ds_cursource, *ds_curtiltedsource;
|
extern "C" BYTE *ds_curcolormap, *ds_cursource, *ds_curtiltedsource;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1493,7 +1493,7 @@ extern "C" void R_SetupDrawSlabC(const BYTE *colormap)
|
||||||
slabcolormap = colormap;
|
slabcolormap = colormap;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void STACK_ARGS R_DrawSlabC(int dx, fixed_t v, int dy, fixed_t vi, const BYTE *vptr, BYTE *p)
|
extern "C" void R_DrawSlabC(int dx, fixed_t v, int dy, fixed_t vi, const BYTE *vptr, BYTE *p)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
const BYTE *colormap = slabcolormap;
|
const BYTE *colormap = slabcolormap;
|
||||||
|
@ -1574,53 +1574,53 @@ extern "C" void STACK_ARGS R_DrawSlabC(int dx, fixed_t v, int dy, fixed_t vi, co
|
||||||
// wallscan stuff, in C
|
// wallscan stuff, in C
|
||||||
|
|
||||||
#ifndef X86_ASM
|
#ifndef X86_ASM
|
||||||
static DWORD STACK_ARGS vlinec1 ();
|
static DWORD vlinec1 ();
|
||||||
static int vlinebits;
|
static int vlinebits;
|
||||||
|
|
||||||
DWORD (STACK_ARGS *dovline1)() = vlinec1;
|
DWORD (*dovline1)() = vlinec1;
|
||||||
DWORD (STACK_ARGS *doprevline1)() = vlinec1;
|
DWORD (*doprevline1)() = vlinec1;
|
||||||
|
|
||||||
#ifdef X64_ASM
|
#ifdef X64_ASM
|
||||||
extern "C" void vlinetallasm4();
|
extern "C" void vlinetallasm4();
|
||||||
#define dovline4 vlinetallasm4
|
#define dovline4 vlinetallasm4
|
||||||
extern "C" void setupvlinetallasm (int);
|
extern "C" void setupvlinetallasm (int);
|
||||||
#else
|
#else
|
||||||
static void STACK_ARGS vlinec4 ();
|
static void vlinec4 ();
|
||||||
void (STACK_ARGS *dovline4)() = vlinec4;
|
void (*dovline4)() = vlinec4;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static DWORD STACK_ARGS mvlinec1();
|
static DWORD mvlinec1();
|
||||||
static void STACK_ARGS mvlinec4();
|
static void mvlinec4();
|
||||||
static int mvlinebits;
|
static int mvlinebits;
|
||||||
|
|
||||||
DWORD (STACK_ARGS *domvline1)() = mvlinec1;
|
DWORD (*domvline1)() = mvlinec1;
|
||||||
void (STACK_ARGS *domvline4)() = mvlinec4;
|
void (*domvline4)() = mvlinec4;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
DWORD STACK_ARGS vlineasm1 ();
|
DWORD vlineasm1 ();
|
||||||
DWORD STACK_ARGS prevlineasm1 ();
|
DWORD prevlineasm1 ();
|
||||||
DWORD STACK_ARGS vlinetallasm1 ();
|
DWORD vlinetallasm1 ();
|
||||||
DWORD STACK_ARGS prevlinetallasm1 ();
|
DWORD prevlinetallasm1 ();
|
||||||
void STACK_ARGS vlineasm4 ();
|
void vlineasm4 ();
|
||||||
void STACK_ARGS vlinetallasmathlon4 ();
|
void vlinetallasmathlon4 ();
|
||||||
void STACK_ARGS vlinetallasm4 ();
|
void vlinetallasm4 ();
|
||||||
void STACK_ARGS setupvlineasm (int);
|
void setupvlineasm (int);
|
||||||
void STACK_ARGS setupvlinetallasm (int);
|
void setupvlinetallasm (int);
|
||||||
|
|
||||||
DWORD STACK_ARGS mvlineasm1();
|
DWORD mvlineasm1();
|
||||||
void STACK_ARGS mvlineasm4();
|
void mvlineasm4();
|
||||||
void STACK_ARGS setupmvlineasm (int);
|
void setupmvlineasm (int);
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD (STACK_ARGS *dovline1)() = vlinetallasm1;
|
DWORD (*dovline1)() = vlinetallasm1;
|
||||||
DWORD (STACK_ARGS *doprevline1)() = prevlinetallasm1;
|
DWORD (*doprevline1)() = prevlinetallasm1;
|
||||||
void (STACK_ARGS *dovline4)() = vlinetallasm4;
|
void (*dovline4)() = vlinetallasm4;
|
||||||
|
|
||||||
DWORD (STACK_ARGS *domvline1)() = mvlineasm1;
|
DWORD (*domvline1)() = mvlineasm1;
|
||||||
void (STACK_ARGS *domvline4)() = mvlineasm4;
|
void (*domvline4)() = mvlineasm4;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void setupvline (int fracbits)
|
void setupvline (int fracbits)
|
||||||
|
@ -1660,7 +1660,7 @@ void setupvline (int fracbits)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(X86_ASM)
|
#if !defined(X86_ASM)
|
||||||
DWORD STACK_ARGS vlinec1 ()
|
DWORD vlinec1 ()
|
||||||
{
|
{
|
||||||
DWORD fracstep = dc_iscale;
|
DWORD fracstep = dc_iscale;
|
||||||
DWORD frac = dc_texturefrac;
|
DWORD frac = dc_texturefrac;
|
||||||
|
@ -1681,7 +1681,7 @@ DWORD STACK_ARGS vlinec1 ()
|
||||||
return frac;
|
return frac;
|
||||||
}
|
}
|
||||||
|
|
||||||
void STACK_ARGS vlinec4 ()
|
void vlinec4 ()
|
||||||
{
|
{
|
||||||
BYTE *dest = dc_dest;
|
BYTE *dest = dc_dest;
|
||||||
int count = dc_count;
|
int count = dc_count;
|
||||||
|
@ -1711,7 +1711,7 @@ void setupmvline (int fracbits)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(X86_ASM)
|
#if !defined(X86_ASM)
|
||||||
DWORD STACK_ARGS mvlinec1 ()
|
DWORD mvlinec1 ()
|
||||||
{
|
{
|
||||||
DWORD fracstep = dc_iscale;
|
DWORD fracstep = dc_iscale;
|
||||||
DWORD frac = dc_texturefrac;
|
DWORD frac = dc_texturefrac;
|
||||||
|
@ -1736,7 +1736,7 @@ DWORD STACK_ARGS mvlinec1 ()
|
||||||
return frac;
|
return frac;
|
||||||
}
|
}
|
||||||
|
|
||||||
void STACK_ARGS mvlinec4 ()
|
void mvlinec4 ()
|
||||||
{
|
{
|
||||||
BYTE *dest = dc_dest;
|
BYTE *dest = dc_dest;
|
||||||
int count = dc_count;
|
int count = dc_count;
|
||||||
|
|
50
src/r_draw.h
50
src/r_draw.h
|
@ -65,18 +65,18 @@ extern "C" unsigned int horizspans[4];
|
||||||
// Hook in assembler or system specific BLT here.
|
// Hook in assembler or system specific BLT here.
|
||||||
extern void (*R_DrawColumn)(void);
|
extern void (*R_DrawColumn)(void);
|
||||||
|
|
||||||
extern DWORD (STACK_ARGS *dovline1) ();
|
extern DWORD (*dovline1) ();
|
||||||
extern DWORD (STACK_ARGS *doprevline1) ();
|
extern DWORD (*doprevline1) ();
|
||||||
#ifdef X64_ASM
|
#ifdef X64_ASM
|
||||||
#define dovline4 vlinetallasm4
|
#define dovline4 vlinetallasm4
|
||||||
extern "C" void vlinetallasm4();
|
extern "C" void vlinetallasm4();
|
||||||
#else
|
#else
|
||||||
extern void (STACK_ARGS *dovline4) ();
|
extern void (*dovline4) ();
|
||||||
#endif
|
#endif
|
||||||
extern void setupvline (int);
|
extern void setupvline (int);
|
||||||
|
|
||||||
extern DWORD (STACK_ARGS *domvline1) ();
|
extern DWORD (*domvline1) ();
|
||||||
extern void (STACK_ARGS *domvline4) ();
|
extern void (*domvline4) ();
|
||||||
extern void setupmvline (int);
|
extern void setupmvline (int);
|
||||||
|
|
||||||
extern void setuptmvline (int);
|
extern void setuptmvline (int);
|
||||||
|
@ -123,11 +123,11 @@ void R_InitColumnDrawers ();
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
void rt_copy1col_c (int hx, int sx, int yl, int yh);
|
void rt_copy1col_c (int hx, int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_copy4cols_c (int sx, int yl, int yh);
|
void rt_copy4cols_c (int sx, int yl, int yh);
|
||||||
|
|
||||||
void rt_shaded1col (int hx, int sx, int yl, int yh);
|
void rt_shaded1col (int hx, int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_shaded4cols_c (int sx, int yl, int yh);
|
void rt_shaded4cols_c (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_shaded4cols_asm (int sx, int yl, int yh);
|
void rt_shaded4cols_asm (int sx, int yl, int yh);
|
||||||
|
|
||||||
void rt_map1col_c (int hx, int sx, int yl, int yh);
|
void rt_map1col_c (int hx, int sx, int yl, int yh);
|
||||||
void rt_add1col (int hx, int sx, int yl, int yh);
|
void rt_add1col (int hx, int sx, int yl, int yh);
|
||||||
|
@ -141,29 +141,29 @@ void rt_tlateaddclamp1col (int hx, int sx, int yl, int yh);
|
||||||
void rt_tlatesubclamp1col (int hx, int sx, int yl, int yh);
|
void rt_tlatesubclamp1col (int hx, int sx, int yl, int yh);
|
||||||
void rt_tlaterevsubclamp1col (int hx, int sx, int yl, int yh);
|
void rt_tlaterevsubclamp1col (int hx, int sx, int yl, int yh);
|
||||||
|
|
||||||
void STACK_ARGS rt_map4cols_c (int sx, int yl, int yh);
|
void rt_map4cols_c (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_add4cols_c (int sx, int yl, int yh);
|
void rt_add4cols_c (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_addclamp4cols_c (int sx, int yl, int yh);
|
void rt_addclamp4cols_c (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_subclamp4cols (int sx, int yl, int yh);
|
void rt_subclamp4cols (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_revsubclamp4cols (int sx, int yl, int yh);
|
void rt_revsubclamp4cols (int sx, int yl, int yh);
|
||||||
|
|
||||||
void STACK_ARGS rt_tlate4cols (int sx, int yl, int yh);
|
void rt_tlate4cols (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_tlateadd4cols (int sx, int yl, int yh);
|
void rt_tlateadd4cols (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_tlateaddclamp4cols (int sx, int yl, int yh);
|
void rt_tlateaddclamp4cols (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_tlatesubclamp4cols (int sx, int yl, int yh);
|
void rt_tlatesubclamp4cols (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_tlaterevsubclamp4cols (int sx, int yl, int yh);
|
void rt_tlaterevsubclamp4cols (int sx, int yl, int yh);
|
||||||
|
|
||||||
void rt_copy1col_asm (int hx, int sx, int yl, int yh);
|
void rt_copy1col_asm (int hx, int sx, int yl, int yh);
|
||||||
void rt_map1col_asm (int hx, int sx, int yl, int yh);
|
void rt_map1col_asm (int hx, int sx, int yl, int yh);
|
||||||
|
|
||||||
void STACK_ARGS rt_copy4cols_asm (int sx, int yl, int yh);
|
void rt_copy4cols_asm (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_map4cols_asm1 (int sx, int yl, int yh);
|
void rt_map4cols_asm1 (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_map4cols_asm2 (int sx, int yl, int yh);
|
void rt_map4cols_asm2 (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_add4cols_asm (int sx, int yl, int yh);
|
void rt_add4cols_asm (int sx, int yl, int yh);
|
||||||
void STACK_ARGS rt_addclamp4cols_asm (int sx, int yl, int yh);
|
void rt_addclamp4cols_asm (int sx, int yl, int yh);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void (STACK_ARGS *rt_map4cols)(int sx, int yl, int yh);
|
extern void (*rt_map4cols)(int sx, int yl, int yh);
|
||||||
|
|
||||||
#ifdef X86_ASM
|
#ifdef X86_ASM
|
||||||
#define rt_copy1col rt_copy1col_asm
|
#define rt_copy1col rt_copy1col_asm
|
||||||
|
@ -231,7 +231,7 @@ void R_FillSpan (void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C" void R_SetupDrawSlab(const BYTE *colormap);
|
extern "C" void R_SetupDrawSlab(const BYTE *colormap);
|
||||||
extern "C" void STACK_ARGS R_DrawSlab(int dx, fixed_t v, int dy, fixed_t vi, const BYTE *vptr, BYTE *p);
|
extern "C" void R_DrawSlab(int dx, fixed_t v, int dy, fixed_t vi, const BYTE *vptr, BYTE *p);
|
||||||
|
|
||||||
extern "C" int ds_y;
|
extern "C" int ds_y;
|
||||||
extern "C" int ds_x1;
|
extern "C" int ds_x1;
|
||||||
|
|
|
@ -112,7 +112,7 @@ void rt_copy1col_c (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copies all four spans to the screen starting at sx.
|
// Copies all four spans to the screen starting at sx.
|
||||||
void STACK_ARGS rt_copy4cols_c (int sx, int yl, int yh)
|
void rt_copy4cols_c (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
int *source;
|
int *source;
|
||||||
int *dest;
|
int *dest;
|
||||||
|
@ -180,7 +180,7 @@ void rt_map1col_c (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maps all four spans to the screen starting at sx.
|
// Maps all four spans to the screen starting at sx.
|
||||||
void STACK_ARGS rt_map4cols_c (int sx, int yl, int yh)
|
void rt_map4cols_c (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
BYTE *colormap;
|
BYTE *colormap;
|
||||||
BYTE *source;
|
BYTE *source;
|
||||||
|
@ -320,7 +320,7 @@ void rt_tlate1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translates all four spans to the screen starting at sx.
|
// Translates all four spans to the screen starting at sx.
|
||||||
void STACK_ARGS rt_tlate4cols (int sx, int yl, int yh)
|
void rt_tlate4cols (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
rt_Translate4cols(dc_translation, yl, yh);
|
rt_Translate4cols(dc_translation, yl, yh);
|
||||||
rt_map4cols(sx, yl, yh);
|
rt_map4cols(sx, yl, yh);
|
||||||
|
@ -361,7 +361,7 @@ void rt_add1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds all four spans to the screen starting at sx without clamping.
|
// Adds all four spans to the screen starting at sx without clamping.
|
||||||
void STACK_ARGS rt_add4cols_c (int sx, int yl, int yh)
|
void rt_add4cols_c (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
BYTE *colormap;
|
BYTE *colormap;
|
||||||
BYTE *source;
|
BYTE *source;
|
||||||
|
@ -424,7 +424,7 @@ void rt_tlateadd1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translates and adds all four spans to the screen starting at sx without clamping.
|
// Translates and adds all four spans to the screen starting at sx without clamping.
|
||||||
void STACK_ARGS rt_tlateadd4cols (int sx, int yl, int yh)
|
void rt_tlateadd4cols (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
rt_Translate4cols(dc_translation, yl, yh);
|
rt_Translate4cols(dc_translation, yl, yh);
|
||||||
rt_add4cols(sx, yl, yh);
|
rt_add4cols(sx, yl, yh);
|
||||||
|
@ -462,7 +462,7 @@ void rt_shaded1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shades all four spans to the screen starting at sx.
|
// Shades all four spans to the screen starting at sx.
|
||||||
void STACK_ARGS rt_shaded4cols_c (int sx, int yl, int yh)
|
void rt_shaded4cols_c (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
DWORD *fgstart;
|
DWORD *fgstart;
|
||||||
BYTE *colormap;
|
BYTE *colormap;
|
||||||
|
@ -543,7 +543,7 @@ void rt_addclamp1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds all four spans to the screen starting at sx with clamping.
|
// Adds all four spans to the screen starting at sx with clamping.
|
||||||
void STACK_ARGS rt_addclamp4cols_c (int sx, int yl, int yh)
|
void rt_addclamp4cols_c (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
BYTE *colormap;
|
BYTE *colormap;
|
||||||
BYTE *source;
|
BYTE *source;
|
||||||
|
@ -614,7 +614,7 @@ void rt_tlateaddclamp1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translates and adds all four spans to the screen starting at sx with clamping.
|
// Translates and adds all four spans to the screen starting at sx with clamping.
|
||||||
void STACK_ARGS rt_tlateaddclamp4cols (int sx, int yl, int yh)
|
void rt_tlateaddclamp4cols (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
rt_Translate4cols(dc_translation, yl, yh);
|
rt_Translate4cols(dc_translation, yl, yh);
|
||||||
rt_addclamp4cols(sx, yl, yh);
|
rt_addclamp4cols(sx, yl, yh);
|
||||||
|
@ -656,7 +656,7 @@ void rt_subclamp1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subtracts all four spans to the screen starting at sx with clamping.
|
// Subtracts all four spans to the screen starting at sx with clamping.
|
||||||
void STACK_ARGS rt_subclamp4cols (int sx, int yl, int yh)
|
void rt_subclamp4cols (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
BYTE *colormap;
|
BYTE *colormap;
|
||||||
BYTE *source;
|
BYTE *source;
|
||||||
|
@ -723,7 +723,7 @@ void rt_tlatesubclamp1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translates and subtracts all four spans to the screen starting at sx with clamping.
|
// Translates and subtracts all four spans to the screen starting at sx with clamping.
|
||||||
void STACK_ARGS rt_tlatesubclamp4cols (int sx, int yl, int yh)
|
void rt_tlatesubclamp4cols (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
rt_Translate4cols(dc_translation, yl, yh);
|
rt_Translate4cols(dc_translation, yl, yh);
|
||||||
rt_subclamp4cols(sx, yl, yh);
|
rt_subclamp4cols(sx, yl, yh);
|
||||||
|
@ -765,7 +765,7 @@ void rt_revsubclamp1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subtracts all four spans from the screen starting at sx with clamping.
|
// Subtracts all four spans from the screen starting at sx with clamping.
|
||||||
void STACK_ARGS rt_revsubclamp4cols (int sx, int yl, int yh)
|
void rt_revsubclamp4cols (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
BYTE *colormap;
|
BYTE *colormap;
|
||||||
BYTE *source;
|
BYTE *source;
|
||||||
|
@ -832,7 +832,7 @@ void rt_tlaterevsubclamp1col (int hx, int sx, int yl, int yh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translates and subtracts all four spans from the screen starting at sx with clamping.
|
// Translates and subtracts all four spans from the screen starting at sx with clamping.
|
||||||
void STACK_ARGS rt_tlaterevsubclamp4cols (int sx, int yl, int yh)
|
void rt_tlaterevsubclamp4cols (int sx, int yl, int yh)
|
||||||
{
|
{
|
||||||
rt_Translate4cols(dc_translation, yl, yh);
|
rt_Translate4cols(dc_translation, yl, yh);
|
||||||
rt_revsubclamp4cols(sx, yl, yh);
|
rt_revsubclamp4cols(sx, yl, yh);
|
||||||
|
|
|
@ -158,7 +158,7 @@ void (*spanfunc) (void);
|
||||||
void (*hcolfunc_pre) (void);
|
void (*hcolfunc_pre) (void);
|
||||||
void (*hcolfunc_post1) (int hx, int sx, int yl, int yh);
|
void (*hcolfunc_post1) (int hx, int sx, int yl, int yh);
|
||||||
void (*hcolfunc_post2) (int hx, int sx, int yl, int yh);
|
void (*hcolfunc_post2) (int hx, int sx, int yl, int yh);
|
||||||
void (STACK_ARGS *hcolfunc_post4) (int sx, int yl, int yh);
|
void (*hcolfunc_post4) (int sx, int yl, int yh);
|
||||||
|
|
||||||
cycle_t WallCycles, PlaneCycles, MaskedCycles, WallScanCycles;
|
cycle_t WallCycles, PlaneCycles, MaskedCycles, WallScanCycles;
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ extern void (*spanfunc) (void);
|
||||||
extern void (*hcolfunc_pre) (void);
|
extern void (*hcolfunc_pre) (void);
|
||||||
extern void (*hcolfunc_post1) (int hx, int sx, int yl, int yh);
|
extern void (*hcolfunc_post1) (int hx, int sx, int yl, int yh);
|
||||||
extern void (*hcolfunc_post2) (int hx, int sx, int yl, int yh);
|
extern void (*hcolfunc_post2) (int hx, int sx, int yl, int yh);
|
||||||
extern void (STACK_ARGS *hcolfunc_post4) (int sx, int yl, int yh);
|
extern void (*hcolfunc_post4) (int sx, int yl, int yh);
|
||||||
|
|
||||||
|
|
||||||
void R_InitTextureMapping ();
|
void R_InitTextureMapping ();
|
||||||
|
|
|
@ -148,7 +148,7 @@ static DWORD basexfrac, baseyfrac;
|
||||||
|
|
||||||
#ifdef X86_ASM
|
#ifdef X86_ASM
|
||||||
extern "C" void R_SetSpanSource_ASM (const BYTE *flat);
|
extern "C" void R_SetSpanSource_ASM (const BYTE *flat);
|
||||||
extern "C" void STACK_ARGS R_SetSpanSize_ASM (int xbits, int ybits);
|
extern "C" void R_SetSpanSize_ASM (int xbits, int ybits);
|
||||||
extern "C" void R_SetSpanColormap_ASM (BYTE *colormap);
|
extern "C" void R_SetSpanColormap_ASM (BYTE *colormap);
|
||||||
extern "C" void R_SetTiltedSpanSource_ASM (const BYTE *flat);
|
extern "C" void R_SetTiltedSpanSource_ASM (const BYTE *flat);
|
||||||
extern "C" BYTE *ds_curcolormap, *ds_cursource, *ds_curtiltedsource;
|
extern "C" BYTE *ds_curcolormap, *ds_cursource, *ds_curtiltedsource;
|
||||||
|
@ -253,7 +253,7 @@ void R_MapPlane (int y, int x1)
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void STACK_ARGS R_CalcTiltedLighting (fixed_t lval, fixed_t lend, int width)
|
void R_CalcTiltedLighting (fixed_t lval, fixed_t lend, int width)
|
||||||
{
|
{
|
||||||
fixed_t lstep;
|
fixed_t lstep;
|
||||||
BYTE *lightfiller;
|
BYTE *lightfiller;
|
||||||
|
|
|
@ -1709,13 +1709,13 @@ static drawseg_t **drawsegsorter;
|
||||||
static int drawsegsortersize = 0;
|
static int drawsegsortersize = 0;
|
||||||
|
|
||||||
// Sort vissprites by leftmost column, left to right
|
// Sort vissprites by leftmost column, left to right
|
||||||
static int STACK_ARGS sv_comparex (const void *arg1, const void *arg2)
|
static int sv_comparex (const void *arg1, const void *arg2)
|
||||||
{
|
{
|
||||||
return (*(vissprite_t **)arg2)->x1 - (*(vissprite_t **)arg1)->x1;
|
return (*(vissprite_t **)arg2)->x1 - (*(vissprite_t **)arg1)->x1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort drawsegs by rightmost column, left to right
|
// Sort drawsegs by rightmost column, left to right
|
||||||
static int STACK_ARGS sd_comparex (const void *arg1, const void *arg2)
|
static int sd_comparex (const void *arg1, const void *arg2)
|
||||||
{
|
{
|
||||||
return (*(drawseg_t **)arg2)->x2 - (*(drawseg_t **)arg1)->x2;
|
return (*(drawseg_t **)arg2)->x2 - (*(drawseg_t **)arg1)->x2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ void R_DrawMaskedColumn (const BYTE *column, const FTexture::Span *spans);
|
||||||
void R_WallSpriteColumn (void (*drawfunc)(const BYTE *column, const FTexture::Span *spans));
|
void R_WallSpriteColumn (void (*drawfunc)(const BYTE *column, const FTexture::Span *spans));
|
||||||
|
|
||||||
void R_CacheSprite (spritedef_t *sprite);
|
void R_CacheSprite (spritedef_t *sprite);
|
||||||
void R_SortVisSprites (int (STACK_ARGS *compare)(const void *, const void *), size_t first);
|
void R_SortVisSprites (int (*compare)(const void *, const void *), size_t first);
|
||||||
void R_AddSprites (sector_t *sec, int lightlevel, int fakeside);
|
void R_AddSprites (sector_t *sec, int lightlevel, int fakeside);
|
||||||
void R_AddPSprites ();
|
void R_AddPSprites ();
|
||||||
void R_DrawSprites ();
|
void R_DrawSprites ();
|
||||||
|
|
|
@ -135,7 +135,7 @@ unsigned int FZipExploder::InitTable(TArray<HuffNode> &decoder, int numspots)
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS FZipExploder::buildercmp(const void *a, const void *b)
|
int FZipExploder::buildercmp(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
const TableBuilder *v1 = (const TableBuilder *)a;
|
const TableBuilder *v1 = (const TableBuilder *)a;
|
||||||
const TableBuilder *v2 = (const TableBuilder *)b;
|
const TableBuilder *v2 = (const TableBuilder *)b;
|
||||||
|
|
|
@ -31,7 +31,7 @@ class FZipExploder
|
||||||
unsigned char ReadBuf[256];
|
unsigned char ReadBuf[256];
|
||||||
unsigned int bs, be;
|
unsigned int bs, be;
|
||||||
|
|
||||||
static int STACK_ARGS buildercmp(const void *a, const void *b);
|
static int buildercmp(const void *a, const void *b);
|
||||||
void InsertCode(TArray<HuffNode> &decoder, unsigned int pos, int bits, unsigned short code, int len, unsigned char value);
|
void InsertCode(TArray<HuffNode> &decoder, unsigned int pos, int bits, unsigned short code, int len, unsigned char value);
|
||||||
unsigned int InitTable(TArray<HuffNode> &decoder, int numspots);
|
unsigned int InitTable(TArray<HuffNode> &decoder, int numspots);
|
||||||
int BuildDecoder(TArray<HuffNode> &decoder, TableBuilder *values, int numvals);
|
int BuildDecoder(TArray<HuffNode> &decoder, TableBuilder *values, int numvals);
|
||||||
|
|
|
@ -316,7 +316,7 @@ FResourceFile::~FResourceFile()
|
||||||
delete Reader;
|
delete Reader;
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS lumpcmp(const void * a, const void * b)
|
int lumpcmp(const void * a, const void * b)
|
||||||
{
|
{
|
||||||
FResourceLump * rec1 = (FResourceLump *)a;
|
FResourceLump * rec1 = (FResourceLump *)a;
|
||||||
FResourceLump * rec2 = (FResourceLump *)b;
|
FResourceLump * rec2 = (FResourceLump *)b;
|
||||||
|
|
|
@ -199,7 +199,7 @@ extern bool IsFloat (const char *str);
|
||||||
|
|
||||||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||||
|
|
||||||
static int STACK_ARGS SortPlayerClasses (const void *a, const void *b);
|
static int SortPlayerClasses (const void *a, const void *b);
|
||||||
static int S_DupPlayerSound (const char *pclass, int gender, int refid, int aliasref);
|
static int S_DupPlayerSound (const char *pclass, int gender, int refid, int aliasref);
|
||||||
static void S_SavePlayerSound (const char *pclass, int gender, int refid, int lumpnum, bool alias);
|
static void S_SavePlayerSound (const char *pclass, int gender, int refid, int lumpnum, bool alias);
|
||||||
static void S_RestorePlayerSounds();
|
static void S_RestorePlayerSounds();
|
||||||
|
@ -1627,7 +1627,7 @@ void S_ShrinkPlayerSoundLists ()
|
||||||
DefPlayerClass = S_FindPlayerClass (DefPlayerClassName);
|
DefPlayerClass = S_FindPlayerClass (DefPlayerClassName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS SortPlayerClasses (const void *a, const void *b)
|
static int SortPlayerClasses (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return stricmp (((const FPlayerClassLookup *)a)->Name,
|
return stricmp (((const FPlayerClassLookup *)a)->Name,
|
||||||
((const FPlayerClassLookup *)b)->Name);
|
((const FPlayerClassLookup *)b)->Name);
|
||||||
|
|
|
@ -940,7 +940,7 @@ int FScanner::GetMessageLine()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void STACK_ARGS FScanner::ScriptError (const char *message, ...)
|
void FScanner::ScriptError (const char *message, ...)
|
||||||
{
|
{
|
||||||
FString composed;
|
FString composed;
|
||||||
|
|
||||||
|
@ -966,7 +966,7 @@ void STACK_ARGS FScanner::ScriptError (const char *message, ...)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void STACK_ARGS FScanner::ScriptMessage (const char *message, ...)
|
void FScanner::ScriptMessage (const char *message, ...)
|
||||||
{
|
{
|
||||||
FString composed;
|
FString composed;
|
||||||
|
|
||||||
|
@ -1038,7 +1038,7 @@ FScriptPosition &FScriptPosition::operator=(const FScriptPosition &other)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void STACK_ARGS FScriptPosition::Message (int severity, const char *message, ...) const
|
void FScriptPosition::Message (int severity, const char *message, ...) const
|
||||||
{
|
{
|
||||||
FString composed;
|
FString composed;
|
||||||
|
|
||||||
|
|
|
@ -386,34 +386,34 @@ protected:
|
||||||
|
|
||||||
#ifdef DYN_FLUIDSYNTH
|
#ifdef DYN_FLUIDSYNTH
|
||||||
enum { FLUID_FAILED = -1, FLUID_OK = 0 };
|
enum { FLUID_FAILED = -1, FLUID_OK = 0 };
|
||||||
fluid_settings_t *(STACK_ARGS *new_fluid_settings)();
|
fluid_settings_t *(*new_fluid_settings)();
|
||||||
fluid_synth_t *(STACK_ARGS *new_fluid_synth)(fluid_settings_t *);
|
fluid_synth_t *(*new_fluid_synth)(fluid_settings_t *);
|
||||||
int (STACK_ARGS *delete_fluid_synth)(fluid_synth_t *);
|
int (*delete_fluid_synth)(fluid_synth_t *);
|
||||||
void (STACK_ARGS *delete_fluid_settings)(fluid_settings_t *);
|
void (*delete_fluid_settings)(fluid_settings_t *);
|
||||||
int (STACK_ARGS *fluid_settings_setnum)(fluid_settings_t *, const char *, double);
|
int (*fluid_settings_setnum)(fluid_settings_t *, const char *, double);
|
||||||
int (STACK_ARGS *fluid_settings_setstr)(fluid_settings_t *, const char *, const char *);
|
int (*fluid_settings_setstr)(fluid_settings_t *, const char *, const char *);
|
||||||
int (STACK_ARGS *fluid_settings_setint)(fluid_settings_t *, const char *, int);
|
int (*fluid_settings_setint)(fluid_settings_t *, const char *, int);
|
||||||
int (STACK_ARGS *fluid_settings_getstr)(fluid_settings_t *, const char *, char **);
|
int (*fluid_settings_getstr)(fluid_settings_t *, const char *, char **);
|
||||||
int (STACK_ARGS *fluid_settings_getint)(fluid_settings_t *, const char *, int *);
|
int (*fluid_settings_getint)(fluid_settings_t *, const char *, int *);
|
||||||
void (STACK_ARGS *fluid_synth_set_reverb_on)(fluid_synth_t *, int);
|
void (*fluid_synth_set_reverb_on)(fluid_synth_t *, int);
|
||||||
void (STACK_ARGS *fluid_synth_set_chorus_on)(fluid_synth_t *, int);
|
void (*fluid_synth_set_chorus_on)(fluid_synth_t *, int);
|
||||||
int (STACK_ARGS *fluid_synth_set_interp_method)(fluid_synth_t *, int, int);
|
int (*fluid_synth_set_interp_method)(fluid_synth_t *, int, int);
|
||||||
int (STACK_ARGS *fluid_synth_set_polyphony)(fluid_synth_t *, int);
|
int (*fluid_synth_set_polyphony)(fluid_synth_t *, int);
|
||||||
int (STACK_ARGS *fluid_synth_get_polyphony)(fluid_synth_t *);
|
int (*fluid_synth_get_polyphony)(fluid_synth_t *);
|
||||||
int (STACK_ARGS *fluid_synth_get_active_voice_count)(fluid_synth_t *);
|
int (*fluid_synth_get_active_voice_count)(fluid_synth_t *);
|
||||||
double (STACK_ARGS *fluid_synth_get_cpu_load)(fluid_synth_t *);
|
double (*fluid_synth_get_cpu_load)(fluid_synth_t *);
|
||||||
int (STACK_ARGS *fluid_synth_system_reset)(fluid_synth_t *);
|
int (*fluid_synth_system_reset)(fluid_synth_t *);
|
||||||
int (STACK_ARGS *fluid_synth_noteon)(fluid_synth_t *, int, int, int);
|
int (*fluid_synth_noteon)(fluid_synth_t *, int, int, int);
|
||||||
int (STACK_ARGS *fluid_synth_noteoff)(fluid_synth_t *, int, int);
|
int (*fluid_synth_noteoff)(fluid_synth_t *, int, int);
|
||||||
int (STACK_ARGS *fluid_synth_cc)(fluid_synth_t *, int, int, int);
|
int (*fluid_synth_cc)(fluid_synth_t *, int, int, int);
|
||||||
int (STACK_ARGS *fluid_synth_program_change)(fluid_synth_t *, int, int);
|
int (*fluid_synth_program_change)(fluid_synth_t *, int, int);
|
||||||
int (STACK_ARGS *fluid_synth_channel_pressure)(fluid_synth_t *, int, int);
|
int (*fluid_synth_channel_pressure)(fluid_synth_t *, int, int);
|
||||||
int (STACK_ARGS *fluid_synth_pitch_bend)(fluid_synth_t *, int, int);
|
int (*fluid_synth_pitch_bend)(fluid_synth_t *, int, int);
|
||||||
int (STACK_ARGS *fluid_synth_write_float)(fluid_synth_t *, int, void *, int, int, void *, int, int);
|
int (*fluid_synth_write_float)(fluid_synth_t *, int, void *, int, int, void *, int, int);
|
||||||
int (STACK_ARGS *fluid_synth_sfload)(fluid_synth_t *, const char *, int);
|
int (*fluid_synth_sfload)(fluid_synth_t *, const char *, int);
|
||||||
void (STACK_ARGS *fluid_synth_set_reverb)(fluid_synth_t *, double, double, double, double);
|
void (*fluid_synth_set_reverb)(fluid_synth_t *, double, double, double, double);
|
||||||
void (STACK_ARGS *fluid_synth_set_chorus)(fluid_synth_t *, int, double, double, double, int);
|
void (*fluid_synth_set_chorus)(fluid_synth_t *, int, double, double, double, int);
|
||||||
int (STACK_ARGS *fluid_synth_sysex)(fluid_synth_t *, const char *, int, char *, int *, int *, int);
|
int (*fluid_synth_sysex)(fluid_synth_t *, const char *, int, char *, int *, int *, int);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HMODULE FluidSynthDLL;
|
HMODULE FluidSynthDLL;
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "m_swap.h"
|
#include "m_swap.h"
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
|
#include "i_system.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -337,7 +338,7 @@ int SoftSynthMIDIDevice::PlayTick()
|
||||||
char buffer[128];
|
char buffer[128];
|
||||||
mysnprintf(buffer, countof(buffer), "C%02d: %11s %3d %3d\n", (status & 15) + 1, commands[(status >> 4) & 7], parm1, parm2);
|
mysnprintf(buffer, countof(buffer), "C%02d: %11s %3d %3d\n", (status & 15) + 1, commands[(status >> 4) & 7], parm1, parm2);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
OutputDebugString(buffer);
|
I_DebugPrint(buffer);
|
||||||
#else
|
#else
|
||||||
fputs(buffer, stderr);
|
fputs(buffer, stderr);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -209,7 +209,7 @@ void ReadStatistics()
|
||||||
//
|
//
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
|
|
||||||
int STACK_ARGS compare_episode_names(const void *a, const void *b)
|
int compare_episode_names(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
FStatistics *A = (FStatistics*)a;
|
FStatistics *A = (FStatistics*)a;
|
||||||
FStatistics *B = (FStatistics*)b;
|
FStatistics *B = (FStatistics*)b;
|
||||||
|
@ -217,7 +217,7 @@ int STACK_ARGS compare_episode_names(const void *a, const void *b)
|
||||||
return strnatcasecmp(A->epi_header, B->epi_header);
|
return strnatcasecmp(A->epi_header, B->epi_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS compare_level_names(const void *a, const void *b)
|
int compare_level_names(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
FLevelStatistics *A = (FLevelStatistics*)a;
|
FLevelStatistics *A = (FLevelStatistics*)a;
|
||||||
FLevelStatistics *B = (FLevelStatistics*)b;
|
FLevelStatistics *B = (FLevelStatistics*)b;
|
||||||
|
@ -225,7 +225,7 @@ int STACK_ARGS compare_level_names(const void *a, const void *b)
|
||||||
return strnatcasecmp(A->name, B->name);
|
return strnatcasecmp(A->name, B->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
int STACK_ARGS compare_dates(const void *a, const void *b)
|
int compare_dates(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
FLevelStatistics *A = (FLevelStatistics*)a;
|
FLevelStatistics *A = (FLevelStatistics*)a;
|
||||||
FLevelStatistics *B = (FLevelStatistics*)b;
|
FLevelStatistics *B = (FLevelStatistics*)b;
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#include "farchive.h"
|
#include "farchive.h"
|
||||||
|
|
||||||
|
|
||||||
static int STACK_ARGS SortSwitchDefs (const void *a, const void *b)
|
static int SortSwitchDefs (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return (*(FSwitchDef **)a)->PreTexture - (*(FSwitchDef **)b)->PreTexture;
|
return (*(FSwitchDef **)a)->PreTexture - (*(FSwitchDef **)b)->PreTexture;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6706,8 +6706,16 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock)
|
||||||
bool checker = false;
|
bool checker = false;
|
||||||
if (flags & CBF_DROPOFF)
|
if (flags & CBF_DROPOFF)
|
||||||
{
|
{
|
||||||
|
// Unfortunately, whenever P_CheckMove returned false, that means it could
|
||||||
|
// ignore a variety of flags mainly because of P_CheckPosition. This
|
||||||
|
// results in picking up false positives due to actors or lines being in the way
|
||||||
|
// when they clearly should not be.
|
||||||
|
|
||||||
|
int fpass = PCM_DROPOFF;
|
||||||
|
if (flags & CBF_NOACTORS) fpass |= PCM_NOACTORS;
|
||||||
|
if (flags & CBF_NOLINES) fpass |= PCM_NOLINES;
|
||||||
mobj->SetZ(pos.Z);
|
mobj->SetZ(pos.Z);
|
||||||
checker = P_CheckMove(mobj, pos, true);
|
checker = P_CheckMove(mobj, pos, fpass);
|
||||||
mobj->SetZ(oldpos.Z);
|
mobj->SetZ(oldpos.Z);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -6743,7 +6751,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock)
|
||||||
//[MC] I don't know why I let myself be persuaded not to include a flag.
|
//[MC] I don't know why I let myself be persuaded not to include a flag.
|
||||||
//If an actor is loaded with pointers, they don't really have any options to spare.
|
//If an actor is loaded with pointers, they don't really have any options to spare.
|
||||||
//Also, fail if a dropoff or a step is too great to pass over when checking for dropoffs.
|
//Also, fail if a dropoff or a step is too great to pass over when checking for dropoffs.
|
||||||
|
|
||||||
if ((!(flags & CBF_NOACTORS) && (mobj->BlockingMobj)) || (!(flags & CBF_NOLINES) && mobj->BlockingLine != NULL) ||
|
if ((!(flags & CBF_NOACTORS) && (mobj->BlockingMobj)) || (!(flags & CBF_NOLINES) && mobj->BlockingLine != NULL) ||
|
||||||
((flags & CBF_DROPOFF) && !checker))
|
((flags & CBF_DROPOFF) && !checker))
|
||||||
{
|
{
|
||||||
|
|
|
@ -557,17 +557,17 @@ PFunction *FindGlobalActionFunction(const char *name)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static int STACK_ARGS flagcmp (const void * a, const void * b)
|
static int flagcmp (const void * a, const void * b)
|
||||||
{
|
{
|
||||||
return stricmp( ((FFlagDef*)a)->name, ((FFlagDef*)b)->name);
|
return stricmp( ((FFlagDef*)a)->name, ((FFlagDef*)b)->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS propcmp(const void * a, const void * b)
|
static int propcmp(const void * a, const void * b)
|
||||||
{
|
{
|
||||||
return stricmp( (*(FPropertyInfo**)a)->name, (*(FPropertyInfo**)b)->name);
|
return stricmp( (*(FPropertyInfo**)a)->name, (*(FPropertyInfo**)b)->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS funccmp(const void * a, const void * b)
|
static int funccmp(const void * a, const void * b)
|
||||||
{
|
{
|
||||||
return stricmp( ((AFuncDesc*)a)->Name, ((AFuncDesc*)b)->Name);
|
return stricmp( ((AFuncDesc*)a)->Name, ((AFuncDesc*)b)->Name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -782,11 +782,6 @@ void Renderer::MarkInstrument(int banknum, int percussion, int instr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void cmsg(int type, int verbosity_level, const char *fmt, ...)
|
void cmsg(int type, int verbosity_level, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -801,7 +796,7 @@ void cmsg(int type, int verbosity_level, const char *fmt, ...)
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vsprintf(buf, fmt, args);
|
vsprintf(buf, fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
OutputDebugString(buf);
|
I_DebugPrint(buf);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ static int PalFromRGB(uint32 rgb)
|
||||||
return LastPal;
|
return LastPal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void STACK_ARGS DCanvas::DrawTexture (FTexture *img, double x, double y, int tags_first, ...)
|
void DCanvas::DrawTexture (FTexture *img, double x, double y, int tags_first, ...)
|
||||||
{
|
{
|
||||||
va_list tags;
|
va_list tags;
|
||||||
va_start(tags, tags_first);
|
va_start(tags, tags_first);
|
||||||
|
|
|
@ -134,7 +134,7 @@ protected:
|
||||||
void LoadBMF (int lump, const BYTE *data);
|
void LoadBMF (int lump, const BYTE *data);
|
||||||
void CreateFontFromPic (FTextureID picnum);
|
void CreateFontFromPic (FTextureID picnum);
|
||||||
|
|
||||||
static int STACK_ARGS BMFCompare(const void *a, const void *b);
|
static int BMFCompare(const void *a, const void *b);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -231,7 +231,7 @@ struct TempColorInfo
|
||||||
|
|
||||||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||||
|
|
||||||
static int STACK_ARGS TranslationMapCompare (const void *a, const void *b);
|
static int TranslationMapCompare (const void *a, const void *b);
|
||||||
|
|
||||||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||||
|
|
||||||
|
@ -594,7 +594,7 @@ void RecordTextureColors (FTexture *pic, BYTE *usedcolors)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static int STACK_ARGS compare (const void *arg1, const void *arg2)
|
static int compare (const void *arg1, const void *arg2)
|
||||||
{
|
{
|
||||||
if (RPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 299 +
|
if (RPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 299 +
|
||||||
GPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 587 +
|
GPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 587 +
|
||||||
|
@ -1360,7 +1360,7 @@ void FSingleLumpFont::LoadBMF(int lump, const BYTE *data)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
int STACK_ARGS FSingleLumpFont::BMFCompare(const void *a, const void *b)
|
int FSingleLumpFont::BMFCompare(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
const PalEntry *pa = (const PalEntry *)a;
|
const PalEntry *pa = (const PalEntry *)a;
|
||||||
const PalEntry *pb = (const PalEntry *)b;
|
const PalEntry *pb = (const PalEntry *)b;
|
||||||
|
@ -2474,7 +2474,7 @@ void V_InitFontColors ()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static int STACK_ARGS TranslationMapCompare (const void *a, const void *b)
|
static int TranslationMapCompare (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return int(((const TranslationMap *)a)->Name) - int(((const TranslationMap *)b)->Name);
|
return int(((const TranslationMap *)a)->Name) - int(((const TranslationMap *)b)->Name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,8 @@ FColorMatcher ColorMatcher;
|
||||||
/* Current color blending values */
|
/* Current color blending values */
|
||||||
int BlendR, BlendG, BlendB, BlendA;
|
int BlendR, BlendG, BlendB, BlendA;
|
||||||
|
|
||||||
static int STACK_ARGS sortforremap (const void *a, const void *b);
|
static int sortforremap (const void *a, const void *b);
|
||||||
static int STACK_ARGS sortforremap2 (const void *a, const void *b);
|
static int sortforremap2 (const void *a, const void *b);
|
||||||
|
|
||||||
/**************************/
|
/**************************/
|
||||||
/* Gamma correction stuff */
|
/* Gamma correction stuff */
|
||||||
|
@ -222,7 +222,7 @@ void FPalette::MakeGoodRemap ()
|
||||||
// 256 entries are different. :-)
|
// 256 entries are different. :-)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS sortforremap (const void *a, const void *b)
|
static int sortforremap (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return (*(const DWORD *)a & 0xFFFFFF) - (*(const DWORD *)b & 0xFFFFFF);
|
return (*(const DWORD *)a & 0xFFFFFF) - (*(const DWORD *)b & 0xFFFFFF);
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,7 @@ void FPalette::MakeRemap (const DWORD *colors, BYTE *remap, const BYTE *useful,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int STACK_ARGS sortforremap2 (const void *a, const void *b)
|
static int sortforremap2 (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
const RemappingWork *ap = (const RemappingWork *)a;
|
const RemappingWork *ap = (const RemappingWork *)a;
|
||||||
const RemappingWork *bp = (const RemappingWork *)b;
|
const RemappingWork *bp = (const RemappingWork *)b;
|
||||||
|
@ -384,7 +384,7 @@ void InitPalette ()
|
||||||
R_InitColormaps ();
|
R_InitColormaps ();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void STACK_ARGS DoBlending_MMX (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
|
extern "C" void DoBlending_MMX (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
|
||||||
extern void DoBlending_SSE2 (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
|
extern void DoBlending_SSE2 (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
|
||||||
|
|
||||||
void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a)
|
void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a)
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
//
|
//
|
||||||
// Write a single character using the given font
|
// Write a single character using the given font
|
||||||
//
|
//
|
||||||
void STACK_ARGS DCanvas::DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, int tag_first, ...)
|
void DCanvas::DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, int tag_first, ...)
|
||||||
{
|
{
|
||||||
if (font == NULL)
|
if (font == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -84,7 +84,7 @@ void STACK_ARGS DCanvas::DrawChar (FFont *font, int normalcolor, int x, int y, B
|
||||||
//
|
//
|
||||||
// Write a string using the given font
|
// Write a string using the given font
|
||||||
//
|
//
|
||||||
void STACK_ARGS DCanvas::DrawText(FFont *font, int normalcolor, int x, int y, const char *string, int tag_first, ...)
|
void DCanvas::DrawText(FFont *font, int normalcolor, int x, int y, const char *string, int tag_first, ...)
|
||||||
{
|
{
|
||||||
int w;
|
int w;
|
||||||
const BYTE *ch;
|
const BYTE *ch;
|
||||||
|
|
|
@ -246,7 +246,7 @@ public:
|
||||||
|
|
||||||
// 2D Texture drawing
|
// 2D Texture drawing
|
||||||
bool SetTextureParms(DrawParms *parms, FTexture *img, double x, double y) const;
|
bool SetTextureParms(DrawParms *parms, FTexture *img, double x, double y) const;
|
||||||
void STACK_ARGS DrawTexture (FTexture *img, double x, double y, int tags, ...);
|
void DrawTexture (FTexture *img, double x, double y, int tags, ...);
|
||||||
void FillBorder (FTexture *img); // Fills the border around a 4:3 part of the screen on non-4:3 displays
|
void FillBorder (FTexture *img); // Fills the border around a 4:3 part of the screen on non-4:3 displays
|
||||||
void VirtualToRealCoords(double &x, double &y, double &w, double &h, double vwidth, double vheight, bool vbottom=false, bool handleaspect=true) const;
|
void VirtualToRealCoords(double &x, double &y, double &w, double &h, double vwidth, double vheight, bool vbottom=false, bool handleaspect=true) const;
|
||||||
|
|
||||||
|
@ -258,8 +258,8 @@ public:
|
||||||
#undef DrawText // See WinUser.h for the definition of DrawText as a macro
|
#undef DrawText // See WinUser.h for the definition of DrawText as a macro
|
||||||
#endif
|
#endif
|
||||||
// 2D Text drawing
|
// 2D Text drawing
|
||||||
void STACK_ARGS DrawText (FFont *font, int normalcolor, int x, int y, const char *string, int tag_first, ...);
|
void DrawText (FFont *font, int normalcolor, int x, int y, const char *string, int tag_first, ...);
|
||||||
void STACK_ARGS DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, int tag_first, ...);
|
void DrawChar (FFont *font, int normalcolor, int x, int y, BYTE character, int tag_first, ...);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BYTE *Buffer;
|
BYTE *Buffer;
|
||||||
|
|
|
@ -227,7 +227,7 @@ protected:
|
||||||
FDInputJoystick *EnumDevices();
|
FDInputJoystick *EnumDevices();
|
||||||
|
|
||||||
static BOOL CALLBACK EnumCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
|
static BOOL CALLBACK EnumCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
|
||||||
static int STACK_ARGS NameSort(const void *a, const void *b);
|
static int NameSort(const void *a, const void *b);
|
||||||
static bool IsXInputDevice(const GUID *guid);
|
static bool IsXInputDevice(const GUID *guid);
|
||||||
static bool IsXInputDeviceFast(const GUID *guid);
|
static bool IsXInputDeviceFast(const GUID *guid);
|
||||||
static bool IsXInputDeviceSlow(const GUID *guid);
|
static bool IsXInputDeviceSlow(const GUID *guid);
|
||||||
|
|
|
@ -199,7 +199,7 @@ void popterm ()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static void STACK_ARGS call_terms (void)
|
static void call_terms (void)
|
||||||
{
|
{
|
||||||
while (NumTerms > 0)
|
while (NumTerms > 0)
|
||||||
{
|
{
|
||||||
|
@ -208,7 +208,7 @@ static void STACK_ARGS call_terms (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
static int STACK_ARGS NewFailure (size_t size)
|
static int NewFailure (size_t size)
|
||||||
{
|
{
|
||||||
I_FatalError ("Failed to allocate %d bytes from process heap", size);
|
I_FatalError ("Failed to allocate %d bytes from process heap", size);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -158,7 +158,7 @@ protected:
|
||||||
|
|
||||||
void DoRegister();
|
void DoRegister();
|
||||||
FRawPS2Controller *EnumDevices();
|
FRawPS2Controller *EnumDevices();
|
||||||
static int STACK_ARGS DeviceSort(const void *a, const void *b);
|
static int DeviceSort(const void *a, const void *b);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Each entry is an offset to the corresponding data field in the
|
// Each entry is an offset to the corresponding data field in the
|
||||||
|
|
|
@ -784,7 +784,7 @@ void I_Quit()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void STACK_ARGS I_FatalError(const char *error, ...)
|
void I_FatalError(const char *error, ...)
|
||||||
{
|
{
|
||||||
static BOOL alreadyThrown = false;
|
static BOOL alreadyThrown = false;
|
||||||
gameisdead = true;
|
gameisdead = true;
|
||||||
|
@ -824,7 +824,7 @@ void STACK_ARGS I_FatalError(const char *error, ...)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void STACK_ARGS I_Error(const char *error, ...)
|
void I_Error(const char *error, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
char errortext[MAX_ERRORTEXT];
|
char errortext[MAX_ERRORTEXT];
|
||||||
|
@ -1051,6 +1051,11 @@ static void DoPrintStr(const char *cp, HWND edit, HANDLE StdOut)
|
||||||
|
|
||||||
static TArray<FString> bufferedConsoleStuff;
|
static TArray<FString> bufferedConsoleStuff;
|
||||||
|
|
||||||
|
void I_DebugPrint(const char *cp)
|
||||||
|
{
|
||||||
|
OutputDebugStringA(cp);
|
||||||
|
}
|
||||||
|
|
||||||
void I_PrintStr(const char *cp)
|
void I_PrintStr(const char *cp)
|
||||||
{
|
{
|
||||||
if (con_debugoutput)
|
if (con_debugoutput)
|
||||||
|
|
|
@ -132,8 +132,8 @@ void I_Quit (void);
|
||||||
|
|
||||||
void I_Tactile (int on, int off, int total);
|
void I_Tactile (int on, int off, int total);
|
||||||
|
|
||||||
void STACK_ARGS I_Error (const char *error, ...) GCCPRINTF(1,2);
|
void I_Error (const char *error, ...) GCCPRINTF(1,2);
|
||||||
void STACK_ARGS I_FatalError (const char *error, ...) GCCPRINTF(1,2);
|
void I_FatalError (const char *error, ...) GCCPRINTF(1,2);
|
||||||
|
|
||||||
void atterm (void (*func)(void));
|
void atterm (void (*func)(void));
|
||||||
void popterm ();
|
void popterm ();
|
||||||
|
@ -145,6 +145,8 @@ bool I_SetCursor(FTexture *cursor);
|
||||||
// Repaint the pre-game console
|
// Repaint the pre-game console
|
||||||
void I_PaintConsole (void);
|
void I_PaintConsole (void);
|
||||||
|
|
||||||
|
void I_DebugPrint (const char *cp);
|
||||||
|
|
||||||
// Print a console string
|
// Print a console string
|
||||||
void I_PrintStr (const char *cp);
|
void I_PrintStr (const char *cp);
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ void DoBlending_MMX2(const PalEntry *from, PalEntry *to, int count, int r, int g
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef X86_ASM
|
#ifdef X86_ASM
|
||||||
extern "C" void STACK_ARGS DoBlending_MMX(const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
|
extern "C" void DoBlending_MMX(const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DoBlending_SSE2(const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a)
|
void DoBlending_SSE2(const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a)
|
||||||
|
|
Loading…
Reference in a new issue