mirror of
https://github.com/ioquake/jedi-academy.git
synced 2024-11-24 21:21:33 +00:00
Merge pull request #4 from jonathangray/mp_port
adapt multiplayer code to gcc/unix
This commit is contained in:
commit
788897fb1f
127 changed files with 1835 additions and 1220 deletions
17
README.txt
17
README.txt
|
@ -1,18 +1,27 @@
|
|||
Jedi Academy with various changes to make it build/run on
|
||||
more platforms including amd64/x86_64.
|
||||
|
||||
Currently only the single player code is built.
|
||||
Currently only the single player code runs on amd64.
|
||||
|
||||
The game needs to be patched to 1.01 to work, the data in the
|
||||
steam version is already patched.
|
||||
|
||||
How to build:
|
||||
How to build single player:
|
||||
|
||||
mkdir build-sp && cd build-sp
|
||||
cmake ../code/
|
||||
make
|
||||
|
||||
copy jasp and jagame*.so to your game data directory
|
||||
copy jasp and jagame*.so to the directory containing base or demo
|
||||
|
||||
How to build multiplayer:
|
||||
|
||||
mkdir build-mp && cd build-mp
|
||||
cmake ../codemp/
|
||||
make
|
||||
|
||||
copy jamp and jampded to the directory containing base
|
||||
copy *.so to your base directory
|
||||
|
||||
Known issues:
|
||||
|
||||
|
@ -21,3 +30,5 @@ When running windowed the mouse does not work in the menus.
|
|||
Save games do not yet work on amd64.
|
||||
|
||||
The demo has various issues and does not work properly.
|
||||
|
||||
multiplayer has to be run with "+set sv_pure 0" for now
|
||||
|
|
605
codemp/CMakeLists.txt
Normal file
605
codemp/CMakeLists.txt
Normal file
|
@ -0,0 +1,605 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
project(jamp)
|
||||
|
||||
set(cpu ${CMAKE_SYSTEM_PROCESSOR})
|
||||
if (cpu MATCHES "i.86")
|
||||
set(cpu "x86")
|
||||
elseif(cpu STREQUAL "x86_64")
|
||||
set(cpu "amd64")
|
||||
endif()
|
||||
|
||||
# until amd64 works...
|
||||
if (cpu MATCHES "amd64")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
||||
set(cpu, "x86")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unknown-pragmas -Wno-write-strings -Wno-missing-braces")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas -Wno-write-strings -Wno-missing-braces")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas -fpermissive")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-parentheses-equality")
|
||||
endif()
|
||||
|
||||
# avoid -rdynamic or loaded libraries will stomp over cvars
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
|
||||
add_definitions( -D_M_IX86=1 ) # tested to mean little endian...
|
||||
add_definitions( -D_IMMERSION_DISABLE )
|
||||
add_definitions( -DNDEBUG )
|
||||
add_definitions( -DFINAL_BUILD )
|
||||
add_definitions( -D_JK2 )
|
||||
add_definitions( -D_JK2MP )
|
||||
|
||||
include_directories(/usr/X11R6/include/)
|
||||
link_directories(/usr/X11R6/lib)
|
||||
|
||||
include_directories(/usr/local/include/)
|
||||
link_directories(/usr/local/lib)
|
||||
|
||||
set(src_main_rmg
|
||||
RMG/RM_Area.cpp
|
||||
RMG/RM_Instance.cpp
|
||||
RMG/RM_InstanceFile.cpp
|
||||
RMG/RM_Instance_BSP.cpp
|
||||
RMG/RM_Instance_Group.cpp
|
||||
RMG/RM_Instance_Random.cpp
|
||||
RMG/RM_Instance_Void.cpp
|
||||
RMG/RM_Manager.cpp
|
||||
RMG/RM_Mission.cpp
|
||||
RMG/RM_Objective.cpp
|
||||
RMG/RM_Path.cpp
|
||||
RMG/RM_Terrain.cpp
|
||||
)
|
||||
|
||||
set(src_main_client
|
||||
client/FXExport.cpp
|
||||
client/FxPrimitives.cpp
|
||||
client/FxScheduler.cpp
|
||||
client/FxSystem.cpp
|
||||
client/FxTemplate.cpp
|
||||
client/FxUtil.cpp
|
||||
client/cl_cgame.cpp
|
||||
client/cl_cin.cpp
|
||||
client/cl_console.cpp
|
||||
client/cl_input.cpp
|
||||
client/cl_keys.cpp
|
||||
client/cl_main.cpp
|
||||
client/cl_net_chan.cpp
|
||||
client/cl_parse.cpp
|
||||
client/cl_scrn.cpp
|
||||
client/cl_ui.cpp
|
||||
client/snd_ambient.cpp
|
||||
client/snd_dma.cpp
|
||||
client/snd_mem.cpp
|
||||
client/snd_mix.cpp
|
||||
client/snd_mp3.cpp
|
||||
client/snd_music.cpp
|
||||
)
|
||||
|
||||
set(src_main_ghoul2
|
||||
ghoul2/G2_API.cpp
|
||||
ghoul2/G2_bolts.cpp
|
||||
ghoul2/G2_bones.cpp
|
||||
ghoul2/G2_misc.cpp
|
||||
ghoul2/G2_surfaces.cpp
|
||||
)
|
||||
|
||||
set(src_main_icarus
|
||||
icarus/BlockStream.cpp
|
||||
icarus/GameInterface.cpp
|
||||
icarus/Instance.cpp
|
||||
icarus/Interface.cpp
|
||||
icarus/Memory.cpp
|
||||
icarus/Q3_Interface.cpp
|
||||
icarus/Q3_Registers.cpp
|
||||
icarus/Sequence.cpp
|
||||
icarus/Sequencer.cpp
|
||||
icarus/TaskManager.cpp
|
||||
)
|
||||
|
||||
set(src_main_jpeg
|
||||
jpeg-6/jcapimin.cpp
|
||||
jpeg-6/jccoefct.cpp
|
||||
jpeg-6/jccolor.cpp
|
||||
jpeg-6/jcdctmgr.cpp
|
||||
jpeg-6/jchuff.cpp
|
||||
jpeg-6/jcinit.cpp
|
||||
jpeg-6/jcmainct.cpp
|
||||
jpeg-6/jcmarker.cpp
|
||||
jpeg-6/jcmaster.cpp
|
||||
jpeg-6/jcomapi.cpp
|
||||
jpeg-6/jcparam.cpp
|
||||
jpeg-6/jcphuff.cpp
|
||||
jpeg-6/jcprepct.cpp
|
||||
jpeg-6/jcsample.cpp
|
||||
jpeg-6/jctrans.cpp
|
||||
jpeg-6/jdapimin.cpp
|
||||
jpeg-6/jdapistd.cpp
|
||||
jpeg-6/jdatadst.cpp
|
||||
jpeg-6/jdatasrc.cpp
|
||||
jpeg-6/jdcoefct.cpp
|
||||
jpeg-6/jdcolor.cpp
|
||||
jpeg-6/jddctmgr.cpp
|
||||
jpeg-6/jdhuff.cpp
|
||||
jpeg-6/jdinput.cpp
|
||||
jpeg-6/jdmainct.cpp
|
||||
jpeg-6/jdmarker.cpp
|
||||
jpeg-6/jdmaster.cpp
|
||||
jpeg-6/jdpostct.cpp
|
||||
jpeg-6/jdsample.cpp
|
||||
jpeg-6/jdtrans.cpp
|
||||
jpeg-6/jerror.cpp
|
||||
jpeg-6/jfdctflt.cpp
|
||||
jpeg-6/jidctflt.cpp
|
||||
jpeg-6/jmemmgr.cpp
|
||||
jpeg-6/jmemnobs.cpp
|
||||
jpeg-6/jutils.cpp
|
||||
)
|
||||
|
||||
set(src_main_mp3code
|
||||
mp3code/cdct.c
|
||||
mp3code/csbt.c
|
||||
mp3code/csbtb.c
|
||||
mp3code/csbtL3.c
|
||||
mp3code/cup.c
|
||||
mp3code/cupini.c
|
||||
mp3code/cupL1.c
|
||||
mp3code/cupl3.c
|
||||
mp3code/cwin.c
|
||||
mp3code/cwinb.c
|
||||
mp3code/cwinm.c
|
||||
mp3code/hwin.c
|
||||
mp3code/l3dq.c
|
||||
mp3code/l3init.c
|
||||
mp3code/mdct.c
|
||||
mp3code/mhead.c
|
||||
mp3code/msis.c
|
||||
mp3code/towave.c
|
||||
mp3code/uph.c
|
||||
mp3code/upsf.c
|
||||
mp3code/wavep.c
|
||||
)
|
||||
|
||||
set(src_main_png
|
||||
png/png.cpp
|
||||
)
|
||||
|
||||
set(src_qcommon_common
|
||||
qcommon/CNetProfile.cpp
|
||||
qcommon/GenericParser2.cpp
|
||||
qcommon/RoffSystem.cpp
|
||||
qcommon/cm_draw.cpp
|
||||
qcommon/cm_load.cpp
|
||||
qcommon/cm_patch.cpp
|
||||
qcommon/cm_polylib.cpp
|
||||
qcommon/cm_randomterrain.cpp
|
||||
qcommon/cm_shader.cpp
|
||||
qcommon/cm_terrain.cpp
|
||||
qcommon/cm_test.cpp
|
||||
qcommon/cm_trace.cpp
|
||||
qcommon/cmd_common.cpp
|
||||
qcommon/cmd_pc.cpp
|
||||
qcommon/common.cpp
|
||||
qcommon/cvar.cpp
|
||||
qcommon/exe_headers.cpp
|
||||
qcommon/files_common.cpp
|
||||
qcommon/files_pc.cpp
|
||||
qcommon/hstring.cpp
|
||||
qcommon/huffman.cpp
|
||||
qcommon/md4.cpp
|
||||
qcommon/msg.cpp
|
||||
qcommon/net_chan.cpp
|
||||
qcommon/q_math.cpp
|
||||
qcommon/q_shared.cpp
|
||||
qcommon/stringed_ingame.cpp
|
||||
qcommon/stringed_interface.cpp
|
||||
qcommon/unzip.cpp
|
||||
qcommon/vm.cpp
|
||||
qcommon/vm_interpreted.cpp
|
||||
qcommon/vm_x86.cpp
|
||||
qcommon/z_memman_pc.cpp
|
||||
)
|
||||
|
||||
set(src_main_qcommon
|
||||
${src_qcommon_common}
|
||||
qcommon/cm_terrainmap.cpp
|
||||
)
|
||||
|
||||
set(src_renderer_common
|
||||
renderer/matcomp.c
|
||||
renderer/tr_backend.cpp
|
||||
renderer/tr_ghoul2.cpp
|
||||
renderer/tr_image.cpp
|
||||
renderer/tr_init.cpp
|
||||
renderer/tr_main.cpp
|
||||
renderer/tr_mesh.cpp
|
||||
renderer/tr_model.cpp
|
||||
renderer/tr_shader.cpp
|
||||
)
|
||||
|
||||
set(src_main_renderer
|
||||
${src_renderer_common}
|
||||
renderer/tr_WorldEffects.cpp
|
||||
renderer/tr_animation.cpp
|
||||
renderer/tr_arioche.cpp
|
||||
renderer/tr_bsp.cpp
|
||||
renderer/tr_cmds.cpp
|
||||
renderer/tr_curve.cpp
|
||||
renderer/tr_font.cpp
|
||||
renderer/tr_light.cpp
|
||||
renderer/tr_marks.cpp
|
||||
renderer/tr_noise.cpp
|
||||
renderer/tr_quicksprite.cpp
|
||||
renderer/tr_scene.cpp
|
||||
renderer/tr_shade.cpp
|
||||
renderer/tr_shade_calc.cpp
|
||||
renderer/tr_shadows.cpp
|
||||
renderer/tr_sky.cpp
|
||||
renderer/tr_surface.cpp
|
||||
renderer/tr_surfacesprites.cpp
|
||||
renderer/tr_terrain.cpp
|
||||
renderer/tr_world.cpp
|
||||
)
|
||||
|
||||
set(src_main_server
|
||||
server/NPCNav/gameCallbacks.cpp
|
||||
server/NPCNav/navigator.cpp
|
||||
server/sv_bot.cpp
|
||||
server/sv_ccmds.cpp
|
||||
server/sv_client.cpp
|
||||
server/sv_game.cpp
|
||||
server/sv_init.cpp
|
||||
server/sv_main.cpp
|
||||
server/sv_net_chan.cpp
|
||||
server/sv_snapshot.cpp
|
||||
server/sv_world.cpp
|
||||
)
|
||||
|
||||
set(src_main_win32
|
||||
win32/win_gamma.cpp
|
||||
win32/win_glimp.cpp
|
||||
win32/win_input.cpp
|
||||
win32/win_main.cpp
|
||||
win32/win_net.cpp
|
||||
win32/win_qgl.cpp
|
||||
win32/win_shared.cpp
|
||||
win32/win_snd.cpp
|
||||
win32/win_syscon.cpp
|
||||
win32/win_wndproc.cpp
|
||||
)
|
||||
|
||||
set(src_main_zlib
|
||||
zlib32/deflate.cpp
|
||||
zlib32/inflate.cpp
|
||||
zlib32/zipcommon.cpp
|
||||
)
|
||||
|
||||
ENABLE_LANGUAGE(ASM_NASM)
|
||||
|
||||
set(src_unix_common
|
||||
unix/linux_common.c
|
||||
unix/unix_main.cpp
|
||||
unix/unix_net.cpp
|
||||
unix/unix_shared.cpp
|
||||
unix/ftol.nasm
|
||||
unix/snapvector.nasm
|
||||
)
|
||||
|
||||
set(src_main_unix
|
||||
${src_unix_common}
|
||||
unix/linux_glimp.cpp
|
||||
unix/linux_qgl.cpp
|
||||
null/null_snddma.cpp
|
||||
)
|
||||
|
||||
set(src_botlib
|
||||
botlib/be_aas_bspq3.cpp
|
||||
botlib/be_aas_cluster.cpp
|
||||
botlib/be_aas_debug.cpp
|
||||
botlib/be_aas_entity.cpp
|
||||
botlib/be_aas_file.cpp
|
||||
botlib/be_aas_main.cpp
|
||||
botlib/be_aas_move.cpp
|
||||
botlib/be_aas_optimize.cpp
|
||||
botlib/be_aas_reach.cpp
|
||||
botlib/be_aas_route.cpp
|
||||
botlib/be_aas_routealt.cpp
|
||||
botlib/be_aas_sample.cpp
|
||||
botlib/be_ai_char.cpp
|
||||
botlib/be_ai_chat.cpp
|
||||
botlib/be_ai_gen.cpp
|
||||
botlib/be_ai_goal.cpp
|
||||
botlib/be_ai_move.cpp
|
||||
botlib/be_ai_weap.cpp
|
||||
botlib/be_ai_weight.cpp
|
||||
botlib/be_ea.cpp
|
||||
botlib/be_interface.cpp
|
||||
botlib/l_crc.cpp
|
||||
botlib/l_libvar.cpp
|
||||
botlib/l_log.cpp
|
||||
botlib/l_memory.cpp
|
||||
botlib/l_precomp.cpp
|
||||
botlib/l_script.cpp
|
||||
botlib/l_struct.cpp
|
||||
)
|
||||
|
||||
set(src_jk2mp
|
||||
${src_main_rmg}
|
||||
${src_main_client}
|
||||
${src_main_ghoul2}
|
||||
${src_main_icarus}
|
||||
${src_main_jpeg}
|
||||
${src_main_mp3code}
|
||||
${src_main_png}
|
||||
${src_main_qcommon}
|
||||
${src_main_renderer}
|
||||
${src_main_server}
|
||||
${src_main_zlib}
|
||||
${src_botlib}
|
||||
${src_main_unix}
|
||||
)
|
||||
|
||||
add_executable(jamp
|
||||
${src_jk2mp}
|
||||
)
|
||||
|
||||
set_target_properties(jamp PROPERTIES COMPILE_DEFINITIONS "_JK2EXE;_FF_DISABLE;BOTLIB")
|
||||
|
||||
target_link_libraries(jamp
|
||||
m pthread
|
||||
X11 Xxf86vm Xxf86dga
|
||||
openal
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
target_link_libraries(jamp dl)
|
||||
endif()
|
||||
|
||||
set(src_ded_null
|
||||
null/null_client.cpp
|
||||
null/null_glimp.cpp
|
||||
null/null_input.cpp
|
||||
null/null_renderer.cpp
|
||||
null/null_snddma.cpp
|
||||
)
|
||||
|
||||
set(src_jk2mp_ded
|
||||
${src_main_rmg}
|
||||
${src_main_ghoul2}
|
||||
${src_main_icarus}
|
||||
${src_qcommon_common}
|
||||
${src_renderer_common}
|
||||
${src_main_server}
|
||||
${src_main_zlib}
|
||||
${src_botlib}
|
||||
${src_unix_common}
|
||||
${src_ded_null}
|
||||
)
|
||||
|
||||
add_executable(jampded
|
||||
${src_jk2mp_ded}
|
||||
)
|
||||
|
||||
set_target_properties(jampded PROPERTIES COMPILE_DEFINITIONS "_JK2EXE;_FF_DISABLE;BOTLIB;DEDICATED")
|
||||
|
||||
target_link_libraries(jampded
|
||||
m pthread
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
target_link_libraries(jampded dl)
|
||||
endif()
|
||||
|
||||
set(src_ui_game
|
||||
game/bg_lib.c
|
||||
game/bg_misc.c
|
||||
game/bg_saga.c
|
||||
game/bg_vehicleLoad.c
|
||||
game/bg_weapons.c
|
||||
game/q_math.c
|
||||
game/q_shared.c
|
||||
)
|
||||
|
||||
set(src_ui_ui
|
||||
ui/ui_atoms.c
|
||||
ui/ui_force.c
|
||||
ui/ui_gameinfo.c
|
||||
ui/ui_main.c
|
||||
ui/ui_saber.c
|
||||
ui/ui_shared.c
|
||||
ui/ui_syscalls.c
|
||||
)
|
||||
|
||||
add_library(ui${cpu} SHARED
|
||||
${src_ui_game}
|
||||
${src_ui_ui}
|
||||
)
|
||||
|
||||
set_target_properties(ui${cpu} PROPERTIES PREFIX "")
|
||||
set_target_properties(ui${cpu} PROPERTIES COMPILE_DEFINITIONS "_USRDL;UI_EXPORTS;MISSIONPACK")
|
||||
|
||||
set(src_cgame_cgame
|
||||
cgame/cg_consolecmds.c
|
||||
cgame/cg_draw.c
|
||||
cgame/cg_drawtools.c
|
||||
cgame/cg_effects.c
|
||||
cgame/cg_ents.c
|
||||
cgame/cg_event.c
|
||||
cgame/cg_info.c
|
||||
cgame/cg_light.c
|
||||
cgame/cg_localents.c
|
||||
cgame/cg_main.c
|
||||
cgame/cg_marks.c
|
||||
cgame/cg_newDraw.c
|
||||
cgame/cg_players.c
|
||||
cgame/cg_playerstate.c
|
||||
cgame/cg_predict.c
|
||||
cgame/cg_saga.c
|
||||
cgame/cg_scoreboard.c
|
||||
cgame/cg_servercmds.c
|
||||
cgame/cg_snapshot.c
|
||||
cgame/cg_strap.c
|
||||
cgame/cg_syscalls.c
|
||||
cgame/cg_turret.c
|
||||
cgame/cg_view.c
|
||||
cgame/cg_weaponinit.c
|
||||
cgame/cg_weapons.c
|
||||
cgame/fx_blaster.c
|
||||
cgame/fx_bowcaster.c
|
||||
cgame/fx_bryarpistol.c
|
||||
cgame/fx_demp2.c
|
||||
cgame/fx_disruptor.c
|
||||
cgame/fx_flechette.c
|
||||
cgame/fx_force.c
|
||||
cgame/fx_heavyrepeater.c
|
||||
cgame/fx_rocketlauncher.c
|
||||
)
|
||||
|
||||
set(src_cgame_game
|
||||
game/AnimalNPC.c
|
||||
game/bg_g2_utils.c
|
||||
game/bg_lib.c
|
||||
game/bg_misc.c
|
||||
game/bg_panimate.c
|
||||
game/bg_pmove.c
|
||||
game/bg_saber.c
|
||||
game/bg_saberLoad.c
|
||||
game/bg_saga.c
|
||||
game/bg_slidemove.c
|
||||
game/bg_vehicleLoad.c
|
||||
game/bg_weapons.c
|
||||
game/FighterNPC.c
|
||||
game/q_math.c
|
||||
game/q_shared.c
|
||||
game/SpeederNPC.c
|
||||
game/WalkerNPC.c
|
||||
)
|
||||
|
||||
set(src_cgame_ui
|
||||
ui/ui_shared.c
|
||||
)
|
||||
|
||||
add_library(cgame${cpu} SHARED
|
||||
${src_cgame_cgame}
|
||||
${src_cgame_game}
|
||||
${src_cgame_ui}
|
||||
)
|
||||
|
||||
set_target_properties(cgame${cpu} PROPERTIES PREFIX "")
|
||||
set_target_properties(cgame${cpu} PROPERTIES COMPILE_DEFINITIONS "CGAME;MISSIONPACK")
|
||||
|
||||
set(src_game_game
|
||||
game/AnimalNPC.c
|
||||
game/FighterNPC.c
|
||||
game/NPC.c
|
||||
game/NPC_AI_Atst.c
|
||||
game/NPC_AI_Default.c
|
||||
game/NPC_AI_Droid.c
|
||||
game/NPC_AI_GalakMech.c
|
||||
game/NPC_AI_Grenadier.c
|
||||
game/NPC_AI_Howler.c
|
||||
game/NPC_AI_ImperialProbe.c
|
||||
game/NPC_AI_Interrogator.c
|
||||
game/NPC_AI_Jedi.c
|
||||
game/NPC_AI_Mark1.c
|
||||
game/NPC_AI_Mark2.c
|
||||
game/NPC_AI_MineMonster.c
|
||||
game/NPC_AI_Rancor.c
|
||||
game/NPC_AI_Remote.c
|
||||
game/NPC_AI_Seeker.c
|
||||
game/NPC_AI_Sentry.c
|
||||
game/NPC_AI_Sniper.c
|
||||
game/NPC_AI_Stormtrooper.c
|
||||
game/NPC_AI_Utils.c
|
||||
game/NPC_AI_Wampa.c
|
||||
game/NPC_behavior.c
|
||||
game/NPC_combat.c
|
||||
game/NPC_goal.c
|
||||
game/NPC_misc.c
|
||||
game/NPC_move.c
|
||||
game/NPC_reactions.c
|
||||
game/NPC_senses.c
|
||||
game/NPC_sounds.c
|
||||
game/NPC_spawn.c
|
||||
game/NPC_stats.c
|
||||
game/NPC_utils.c
|
||||
game/SpeederNPC.c
|
||||
game/WalkerNPC.c
|
||||
game/ai_main.c
|
||||
game/ai_util.c
|
||||
game/ai_wpnav.c
|
||||
game/bg_g2_utils.c
|
||||
game/bg_lib.c
|
||||
game/bg_misc.c
|
||||
game/bg_panimate.c
|
||||
game/bg_pmove.c
|
||||
game/bg_saber.c
|
||||
game/bg_saberLoad.c
|
||||
game/bg_saga.c
|
||||
game/bg_slidemove.c
|
||||
game/bg_vehicleLoad.c
|
||||
game/bg_weapons.c
|
||||
game/g_ICARUScb.c
|
||||
game/g_active.c
|
||||
game/g_arenas.c
|
||||
game/g_bot.c
|
||||
game/g_client.c
|
||||
game/g_cmds.c
|
||||
game/g_combat.c
|
||||
game/g_exphysics.c
|
||||
game/g_items.c
|
||||
game/g_log.c
|
||||
game/g_main.c
|
||||
game/g_mem.c
|
||||
game/g_misc.c
|
||||
game/g_missile.c
|
||||
game/g_mover.c
|
||||
game/g_nav.c
|
||||
game/g_navnew.c
|
||||
game/g_object.c
|
||||
game/g_saga.c
|
||||
game/g_session.c
|
||||
game/g_spawn.c
|
||||
game/g_strap.c
|
||||
game/g_svcmds.c
|
||||
game/g_syscalls.c
|
||||
game/g_target.c
|
||||
game/g_team.c
|
||||
game/g_timer.c
|
||||
game/g_trigger.c
|
||||
game/g_turret.c
|
||||
game/g_turret_G2.c
|
||||
game/g_utils.c
|
||||
game/g_vehicleTurret.c
|
||||
game/g_vehicles.c
|
||||
game/g_weapon.c
|
||||
game/q_math.c
|
||||
game/q_shared.c
|
||||
game/tri_coll_test.c
|
||||
game/w_force.c
|
||||
game/w_saber.c
|
||||
)
|
||||
|
||||
add_library(jampgame${cpu} SHARED
|
||||
${src_game_game}
|
||||
)
|
||||
|
||||
set_target_properties(jampgame${cpu} PROPERTIES PREFIX "")
|
||||
set_target_properties(jampgame${cpu} PROPERTIES COMPILE_DEFINITIONS "QAGAME;MISSIONPACK")
|
|
@ -149,30 +149,30 @@ CRMInstance* CRMInstanceFile::CreateInstance ( const char* name )
|
|||
for ( group = mInstances; group; group = group->GetNext ( ) )
|
||||
{
|
||||
// Skip it if the name doesnt match
|
||||
if ( stricmp ( name, group->FindPairValue ( "name", "" ) ) )
|
||||
if ( Q_stricmp ( name, group->FindPairValue ( "name", "" ) ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Handle the various forms of instance types
|
||||
if ( !stricmp ( group->GetName ( ), "bsp" ) )
|
||||
if ( !Q_stricmp ( group->GetName ( ), "bsp" ) )
|
||||
{
|
||||
instance = new CRMBSPInstance ( group, *this );
|
||||
}
|
||||
else if ( !stricmp ( group->GetName ( ), "npc" ) )
|
||||
else if ( !Q_stricmp ( group->GetName ( ), "npc" ) )
|
||||
{
|
||||
// instance = new CRMNPCInstance ( group, *this );
|
||||
continue;
|
||||
}
|
||||
else if ( !stricmp ( group->GetName ( ), "group" ) )
|
||||
else if ( !Q_stricmp ( group->GetName ( ), "group" ) )
|
||||
{
|
||||
instance = new CRMGroupInstance ( group, *this );
|
||||
}
|
||||
else if ( !stricmp ( group->GetName ( ), "random" ) )
|
||||
else if ( !Q_stricmp ( group->GetName ( ), "random" ) )
|
||||
{
|
||||
instance = new CRMRandomInstance ( group, *this );
|
||||
}
|
||||
else if ( !stricmp ( group->GetName ( ), "void" ) )
|
||||
else if ( !Q_stricmp ( group->GetName ( ), "void" ) )
|
||||
{
|
||||
instance = new CRMVoidInstance ( group, *this );
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ CRMGroupInstance::CRMGroupInstance ( CGPGroup *instGroup, CRMInstanceFile& instF
|
|||
float maxrange;
|
||||
|
||||
// Make sure only instances are specified as sub groups
|
||||
assert ( 0 == stricmp ( instGroup->GetName ( ), "instance" ) );
|
||||
assert ( 0 == Q_stricmp ( instGroup->GetName ( ), "instance" ) );
|
||||
|
||||
// Grab the name
|
||||
name = instGroup->FindPairValue ( "name", "" );
|
||||
|
|
|
@ -39,7 +39,7 @@ CRMRandomInstance::CRMRandomInstance ( CGPGroup *instGroup, CRMInstanceFile& ins
|
|||
group = group->GetNext ( ) )
|
||||
{
|
||||
// If this isnt an instance group then skip it
|
||||
if ( stricmp ( group->GetName ( ), "instance" ) )
|
||||
if ( Q_stricmp ( group->GetName ( ), "instance" ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ bool CRMManager::LoadMission ( qboolean IsServer )
|
|||
if(Com_ParseTextFile(va("ext_data/rmg/%s.teams", temp), parser))
|
||||
{
|
||||
root = parser.GetBaseParseGroup()->GetSubGroups();
|
||||
if (0 == stricmp(root->GetName(), "teams"))
|
||||
if (0 == Q_stricmp(root->GetName(), "teams"))
|
||||
{
|
||||
/*
|
||||
SV_SetConfigstring( CS_GAMETYPE_REDTEAM, root->FindPairValue ( "red", "marine" ));
|
||||
|
@ -280,7 +280,7 @@ void CRMManager::UpdateStatisticCvars ( void )
|
|||
// show difficulty
|
||||
char difficulty[MAX_QPATH];
|
||||
gi.Cvar_VariableStringBuffer("g_skill", difficulty, MAX_QPATH);
|
||||
strupr(difficulty);
|
||||
Q_strupr(difficulty);
|
||||
gi.Cvar_Set ( "ar_diff", va("&GENERIC_%s&",difficulty) );
|
||||
|
||||
// compute rank
|
||||
|
|
|
@ -132,7 +132,7 @@ CRMObjective* CRMMission::FindObjective ( const char* name )
|
|||
for (it = mObjectives.begin(); it != mObjectives.end(); it++)
|
||||
{
|
||||
// Does it match?
|
||||
if (!stricmp ((*it)->GetName(), name ))
|
||||
if (!Q_stricmp ((*it)->GetName(), name ))
|
||||
{
|
||||
return (*it);
|
||||
}
|
||||
|
@ -741,8 +741,8 @@ bool CRMMission::ParseInstancesOnPath ( CGPGroup* group )
|
|||
for ( defenseGroup = group->GetSubGroups();
|
||||
defenseGroup;
|
||||
defenseGroup=defenseGroup->GetNext() )
|
||||
if (stricmp ( defenseGroup->GetName ( ), "defenses" )==0 ||
|
||||
stricmp ( defenseGroup->GetName(), "instanceonpath")==0)
|
||||
if (Q_stricmp ( defenseGroup->GetName ( ), "defenses" )==0 ||
|
||||
Q_stricmp ( defenseGroup->GetName(), "instanceonpath")==0)
|
||||
{
|
||||
const char* defName = defenseGroup->FindPairValue ( "instance", "" );
|
||||
if ( *defName )
|
||||
|
@ -1200,7 +1200,7 @@ CGPGroup* CRMMission::ParseRandom ( CGPGroup* randomGroup )
|
|||
group;
|
||||
group = group->GetNext ( ) )
|
||||
{
|
||||
if ( stricmp ( group->GetName ( ), "random_choice" ) )
|
||||
if ( Q_stricmp ( group->GetName ( ), "random_choice" ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -1377,7 +1377,7 @@ bool CRMMission::Load ( const char* mission, const char* instances, const char*
|
|||
// Grab the root parser groop and make sure its mission, otherwise this
|
||||
// isnt a valid mission file
|
||||
root = parser.GetBaseParseGroup()->GetSubGroups();
|
||||
if(stricmp(root->GetName(), "mission"))
|
||||
if(Q_stricmp(root->GetName(), "mission"))
|
||||
{
|
||||
Com_Printf("ERROR: '%s' is not a valid mission file\n", mission );
|
||||
parser.Clean();
|
||||
|
|
|
@ -87,7 +87,7 @@ CRMObjective::CRMObjective ( CGPGroup* group )
|
|||
}
|
||||
|
||||
// If the objective names dont match then ignore this trigger
|
||||
if ( stricmp ( trigger->GetObjectiveName ( ), GetTrigger() ) )
|
||||
if ( Q_stricmp ( trigger->GetObjectiveName ( ), GetTrigger() ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ void CRMPathManager::CreateLocation ( const char* name, const int min_depth, int
|
|||
}
|
||||
|
||||
for (i = mLocations.size()-1; i>=0; --i)
|
||||
if ( !stricmp ( name, mLocations[i]->GetName ( ) ) )
|
||||
if ( !Q_stricmp ( name, mLocations[i]->GetName ( ) ) )
|
||||
{
|
||||
mLocations[i]->SetMinDepth(min_depth);
|
||||
mLocations[i]->SetMaxDepth(max_depth);
|
||||
|
@ -451,7 +451,7 @@ CRMNode* CRMPathManager::FindNodeByName ( const char* name )
|
|||
|
||||
for ( j = mNodes.size() - 1; j >=0; j-- )
|
||||
{
|
||||
if ( !stricmp ( name, mNodes[j]->GetName ( ) ) )
|
||||
if ( !Q_stricmp ( name, mNodes[j]->GetName ( ) ) )
|
||||
return mNodes[j];
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#include "../qcommon/cm_randomterrain.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
class CRMPathManager;
|
||||
|
||||
// directions you can proceed from cells
|
||||
|
|
|
@ -85,7 +85,7 @@ void CRMLandScape::LoadMiscentDef(const char *td)
|
|||
items = classes->GetSubGroups();
|
||||
while(items)
|
||||
{
|
||||
if(!stricmp(items->GetName(), "miscent"))
|
||||
if(!Q_stricmp(items->GetName(), "miscent"))
|
||||
{
|
||||
int height, maxheight;
|
||||
|
||||
|
@ -96,7 +96,7 @@ void CRMLandScape::LoadMiscentDef(const char *td)
|
|||
model = items->GetSubGroups();
|
||||
while(model)
|
||||
{
|
||||
if(!stricmp(model->GetName(), "model"))
|
||||
if(!Q_stricmp(model->GetName(), "model"))
|
||||
{
|
||||
CRandomModel hd;
|
||||
|
||||
|
@ -109,19 +109,19 @@ void CRMLandScape::LoadMiscentDef(const char *td)
|
|||
pair = model->GetPairs();
|
||||
while(pair)
|
||||
{
|
||||
if(!stricmp(pair->GetName(), "name"))
|
||||
if(!Q_stricmp(pair->GetName(), "name"))
|
||||
{
|
||||
hd.SetModel(pair->GetTopValue());
|
||||
}
|
||||
else if(!stricmp(pair->GetName(), "frequency"))
|
||||
else if(!Q_stricmp(pair->GetName(), "frequency"))
|
||||
{
|
||||
hd.SetFrequency((float)atof(pair->GetTopValue()));
|
||||
}
|
||||
else if(!stricmp(pair->GetName(), "minscale"))
|
||||
else if(!Q_stricmp(pair->GetName(), "minscale"))
|
||||
{
|
||||
hd.SetMinScale((float)atof(pair->GetTopValue()));
|
||||
}
|
||||
else if(!stricmp(pair->GetName(), "maxscale"))
|
||||
else if(!Q_stricmp(pair->GetName(), "maxscale"))
|
||||
{
|
||||
hd.SetMaxScale((float)atof(pair->GetTopValue()));
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ void CRMLandScape::Sprinkle(CCMPatch *patch, CCGHeightDetails *hd, int level)
|
|||
// Get a number -5.3f to 5.3f
|
||||
density = (mDensityMap[px + (common->GetBlockWidth() * py)] - 128) / 24.0f;
|
||||
// ..and multiply that into the count
|
||||
count = Round(common->GetPatchScalarSize() * hd->GetAverageFrequency() * powf(2.0f, density) * 0.001);
|
||||
count = Round(common->GetPatchScalarSize() * hd->GetAverageFrequency() * Q_powf(2.0f, density) * 0.001);
|
||||
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
|
|
|
@ -41,9 +41,9 @@ class bits_vs : public bits_base<SZ>
|
|||
////////////////////////////////////////////////////////////////////////////////////
|
||||
void clear_trailing_bits()
|
||||
{
|
||||
for (int i=SIZE; i<ARRAY_SIZE*BITS_INT_SIZE; i++)
|
||||
for (int i=SIZE; i<this->ARRAY_SIZE*this->BITS_INT_SIZE; i++)
|
||||
{
|
||||
mV[i>>BITS_SHIFT] &= ~(1<<(i&BITS_AND));
|
||||
this->mV[i>>this->BITS_SHIFT] &= ~(1<<(i&this->BITS_AND));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////
|
||||
bits_vs(const bits_vs &B)
|
||||
{
|
||||
mem::cpy(mV, B.mV,BYTE_SIZE);
|
||||
mem::cpy(this->mV, B.mV,this->BYTE_SIZE);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////
|
||||
bits_vs(const char* Str)
|
||||
{
|
||||
clear();
|
||||
this->clear();
|
||||
|
||||
for (int b=0; b<SIZE; b++)
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
}
|
||||
if (Str[b]=='1')
|
||||
{
|
||||
set_bit(b); // Found A True Bit
|
||||
this->set_bit(b); // Found A True Bit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,9 +96,9 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
bool empty() const
|
||||
{
|
||||
for (int i=0; i<ARRAY_SIZE; i++)
|
||||
for (int i=0; i<this->ARRAY_SIZE; i++)
|
||||
{
|
||||
if (mV[i])
|
||||
if (this->mV[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -119,9 +119,9 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
void invert()
|
||||
{
|
||||
for (int i=0; i<ARRAY_SIZE; i++)
|
||||
for (int i=0; i<this->ARRAY_SIZE; i++)
|
||||
{
|
||||
mV[i] = ~mV[i];
|
||||
this->mV[i] = ~this->mV[i];
|
||||
}
|
||||
clear_trailing_bits();
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ public:
|
|||
// of bits this object can hold.
|
||||
//--------------------------------------------
|
||||
assert(i>=0 && i < SIZE);
|
||||
return ( (mV[i>>BITS_SHIFT] & (1<<(i&BITS_AND)))!=0 );
|
||||
return ( (this->mV[i>>this->BITS_SHIFT] & (1<<(i&this->BITS_AND)))!=0 );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -160,7 +160,7 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
bool operator==(const bits_vs &B) const
|
||||
{
|
||||
return (mem::eql(mV, B.mV,BYTE_SIZE));
|
||||
return (mem::eql(this->mV, B.mV,this->BYTE_SIZE));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -176,9 +176,9 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
void operator|=(const bits_vs &B)
|
||||
{
|
||||
for (int i=0; i<ARRAY_SIZE; i++)
|
||||
for (int i=0; i<this->ARRAY_SIZE; i++)
|
||||
{
|
||||
mV[i] |= B.mV[i];
|
||||
this->mV[i] |= B.mV[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,9 +187,9 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
void operator&=(const bits_vs &B)
|
||||
{
|
||||
for (int i=0; i<ARRAY_SIZE; i++)
|
||||
for (int i=0; i<this->ARRAY_SIZE; i++)
|
||||
{
|
||||
mV[i] &= B.mV[i];
|
||||
this->mV[i] &= B.mV[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,9 +198,9 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
void operator^=(const bits_vs &B)
|
||||
{
|
||||
for (int i=0; i<ARRAY_SIZE; i++)
|
||||
for (int i=0; i<this->ARRAY_SIZE; i++)
|
||||
{
|
||||
mV[i] ^= B.mV[i];
|
||||
this->mV[i] ^= B.mV[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
void operator=(const bits_vs &B)
|
||||
{
|
||||
mem::cpy(mV, B.mV,BYTE_SIZE);
|
||||
mem::cpy(this->mV, B.mV,this->BYTE_SIZE);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -225,19 +225,19 @@ namespace str
|
|||
}
|
||||
inline int icmp(const char *s1,const char *s2)
|
||||
{
|
||||
return stricmp(s1,s2);
|
||||
return Q_stricmp(s1,s2);
|
||||
}
|
||||
inline int cmpi(const char *s1,const char *s2)
|
||||
{
|
||||
return stricmp(s1,s2);
|
||||
return Q_stricmp(s1,s2);
|
||||
}
|
||||
inline bool ieql(const char *s1,const char *s2)
|
||||
{
|
||||
return !stricmp(s1,s2);
|
||||
return !Q_stricmp(s1,s2);
|
||||
}
|
||||
inline bool eqli(const char *s1,const char *s2)
|
||||
{
|
||||
return !stricmp(s1,s2);
|
||||
return !Q_stricmp(s1,s2);
|
||||
}
|
||||
|
||||
inline char *tok(char *s,const char *gap)
|
||||
|
@ -1030,7 +1030,7 @@ public:
|
|||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// Data
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef typename T TStorageTraits;
|
||||
typedef T TStorageTraits;
|
||||
typedef typename T::TArray TTArray;
|
||||
typedef typename T::TValue TTValue;
|
||||
typedef typename T::TConstructed TTConstructed;
|
||||
|
|
|
@ -38,7 +38,7 @@ template<class T>
|
|||
class vector_base : public ratl_base
|
||||
{
|
||||
public:
|
||||
typedef typename T TStorageTraits;
|
||||
typedef T TStorageTraits;
|
||||
typedef typename T::TValue TTValue;
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// Capacity Enum
|
||||
|
@ -69,7 +69,7 @@ public:
|
|||
{
|
||||
mArray[i] = B.mArray[i];
|
||||
}
|
||||
mSize = val.mSize;
|
||||
mSize = B.mSize;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -592,7 +592,6 @@ public:
|
|||
float& pitch() {return v[0];}
|
||||
float& yaw() {return v[1];}
|
||||
float& roll() {return v[2];}
|
||||
float& radius() {return v[3];}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// Equality / Inequality Operators
|
||||
|
|
|
@ -706,7 +706,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
|
|||
token_t **firsttoken, token_t **lasttoken)
|
||||
{
|
||||
token_t *token;
|
||||
unsigned long t; // time_t t; //to prevent LCC warning
|
||||
time_t t;
|
||||
char *curtime;
|
||||
|
||||
token = PC_CopyToken(deftoken);
|
||||
|
@ -737,7 +737,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
|
|||
case BUILTIN_DATE:
|
||||
{
|
||||
t = time(NULL);
|
||||
curtime = ctime((const long *)&t);
|
||||
curtime = ctime(&t);
|
||||
strcpy(token->string, "\"");
|
||||
strncat(token->string, curtime+4, 7);
|
||||
strncat(token->string+7, curtime+20, 4);
|
||||
|
@ -752,7 +752,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
|
|||
case BUILTIN_TIME:
|
||||
{
|
||||
t = time(NULL);
|
||||
curtime = ctime((const long *)&t);
|
||||
curtime = ctime(&t);
|
||||
strcpy(token->string, "\"");
|
||||
strncat(token->string, curtime+11, 8);
|
||||
strcat(token->string, "\"");
|
||||
|
@ -947,7 +947,7 @@ void PC_ConvertPath(char *path)
|
|||
if ((*ptr == '\\' || *ptr == '/') &&
|
||||
(*(ptr+1) == '\\' || *(ptr+1) == '/'))
|
||||
{
|
||||
strcpy(ptr, ptr+1);
|
||||
memmove(ptr, ptr+1, strlen(ptr));
|
||||
} //end if
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1103,7 +1103,7 @@ void StripDoubleQuotes(char *string)
|
|||
{
|
||||
if (*string == '\"')
|
||||
{
|
||||
strcpy(string, string+1);
|
||||
memmove(string, string+1, strlen(string));
|
||||
} //end if
|
||||
if (string[strlen(string)-1] == '\"')
|
||||
{
|
||||
|
@ -1120,7 +1120,7 @@ void StripSingleQuotes(char *string)
|
|||
{
|
||||
if (*string == '\'')
|
||||
{
|
||||
strcpy(string, string+1);
|
||||
memmove(string, string+1, strlen(string));
|
||||
} //end if
|
||||
if (string[strlen(string)-1] == '\'')
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "cg_local.h"
|
||||
#include "../ui/ui_shared.h"
|
||||
#include "bg_saga.h"
|
||||
#include "../game/bg_saga.h"
|
||||
extern menuDef_t *menuScoreboard;
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "cg_local.h"
|
||||
|
||||
#include "bg_saga.h"
|
||||
#include "../game/bg_saga.h"
|
||||
|
||||
#include "../ui/ui_shared.h"
|
||||
#include "../ui/ui_public.h"
|
||||
|
@ -6588,35 +6588,35 @@ static void CG_DrawVote(void) {
|
|||
else if (strncmp(cgs.voteString, "g_gametype", 10)==0)
|
||||
{
|
||||
trap_SP_GetStringTextString("MENUS_GAME_TYPE", sCmd, sizeof(sCmd) );
|
||||
if ( stricmp("Free For All", cgs.voteString+11)==0 )
|
||||
if ( Q_stricmp("Free For All", cgs.voteString+11)==0 )
|
||||
{
|
||||
sParm = CG_GetStringEdString("MENUS", "FREE_FOR_ALL");
|
||||
}
|
||||
else if ( stricmp("Duel", cgs.voteString+11)==0 )
|
||||
else if ( Q_stricmp("Duel", cgs.voteString+11)==0 )
|
||||
{
|
||||
sParm = CG_GetStringEdString("MENUS", "DUEL");
|
||||
}
|
||||
else if ( stricmp("Holocron FFA", cgs.voteString+11)==0 )
|
||||
else if ( Q_stricmp("Holocron FFA", cgs.voteString+11)==0 )
|
||||
{
|
||||
sParm = CG_GetStringEdString("MENUS", "HOLOCRON_FFA");
|
||||
}
|
||||
else if ( stricmp("Power Duel", cgs.voteString+11)==0 )
|
||||
else if ( Q_stricmp("Power Duel", cgs.voteString+11)==0 )
|
||||
{
|
||||
sParm = CG_GetStringEdString("MENUS", "POWERDUEL");
|
||||
}
|
||||
else if ( stricmp("Team FFA", cgs.voteString+11)==0 )
|
||||
else if ( Q_stricmp("Team FFA", cgs.voteString+11)==0 )
|
||||
{
|
||||
sParm = CG_GetStringEdString("MENUS", "TEAM_FFA");
|
||||
}
|
||||
else if ( stricmp("Siege", cgs.voteString+11)==0 )
|
||||
else if ( Q_stricmp("Siege", cgs.voteString+11)==0 )
|
||||
{
|
||||
sParm = CG_GetStringEdString("MENUS", "SIEGE");
|
||||
}
|
||||
else if ( stricmp("Capture the Flag", cgs.voteString+11)==0 )
|
||||
else if ( Q_stricmp("Capture the Flag", cgs.voteString+11)==0 )
|
||||
{
|
||||
sParm = CG_GetStringEdString("MENUS", "CAPTURE_THE_FLAG");
|
||||
}
|
||||
else if ( stricmp("Capture the Ysalamiri", cgs.voteString+11)==0 )
|
||||
else if ( Q_stricmp("Capture the Ysalamiri", cgs.voteString+11)==0 )
|
||||
{
|
||||
sParm = CG_GetStringEdString("MENUS", "CAPTURE_THE_YSALIMARI");
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Ghoul2 Insert Start
|
||||
*/
|
||||
#include "../game/q_shared.h"
|
||||
#include "../ghoul2/g2.h"
|
||||
#include "../ghoul2/G2.h"
|
||||
/*
|
||||
Ghoul2 Insert end
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
//
|
||||
// cg_players.c -- handle the media and animation for player entities
|
||||
#include "cg_local.h"
|
||||
#include "../ghoul2/g2.h"
|
||||
#include "bg_saga.h"
|
||||
#include "../ghoul2/G2.h"
|
||||
#include "../game/bg_saga.h"
|
||||
|
||||
#define max(x,y) ((x)>(y)?(x):(y))
|
||||
|
||||
extern vmCvar_t cg_thirdPersonAlpha;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
#include "cg_local.h"
|
||||
#include "bg_saga.h"
|
||||
#include "../game/bg_saga.h"
|
||||
|
||||
int cgSiegeRoundState = 0;
|
||||
int cgSiegeRoundTime = 0;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#if !defined(CL_LIGHT_H_INC)
|
||||
#include "cg_lights.h"
|
||||
#endif
|
||||
#include "../ghoul2/g2.h"
|
||||
#include "../ghoul2/G2.h"
|
||||
#include "../ui/ui_public.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "cg_local.h"
|
||||
#include "../game/q_shared.h"
|
||||
#include "../ghoul2/g2.h"
|
||||
#include "../ghoul2/G2.h"
|
||||
|
||||
//rww - The turret is heavily dependant on bone angles. We can't happily set that on the server, so it is done client-only.
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// for a 3D rendering
|
||||
#include "cg_local.h"
|
||||
|
||||
#include "bg_saga.h"
|
||||
#include "../game/bg_saga.h"
|
||||
|
||||
#if !defined(CL_LIGHT_H_INC)
|
||||
#include "cg_lights.h"
|
||||
|
@ -441,7 +441,7 @@ static void CG_UpdateThirdPersonTargetDamp(void)
|
|||
|
||||
// Note that since there are a finite number of "practical" delta millisecond values possible,
|
||||
// the ratio should be initialized into a chart ultimately.
|
||||
ratio = powf(dampfactor, dtime);
|
||||
ratio = Q_powf(dampfactor, dtime);
|
||||
|
||||
// This value is how much distance is "left" from the ideal.
|
||||
VectorMA(cameraIdealTarget, -ratio, targetdiff, cameraCurTarget);
|
||||
|
@ -528,7 +528,7 @@ static void CG_UpdateThirdPersonCameraDamp(void)
|
|||
|
||||
// Note that since there are a finite number of "practical" delta millisecond values possible,
|
||||
// the ratio should be initialized into a chart ultimately.
|
||||
ratio = powf(dampfactor, dtime);
|
||||
ratio = Q_powf(dampfactor, dtime);
|
||||
|
||||
// This value is how much distance is "left" from the ideal.
|
||||
VectorMA(cameraIdealLoc, -ratio, locdiff, cameraCurLoc);
|
||||
|
|
|
@ -327,7 +327,11 @@ typedef struct {
|
|||
|
||||
#if !defined _WIN32
|
||||
|
||||
#ifdef __linux__
|
||||
#define OPENGL_DRIVER_NAME "libGL.so.1"
|
||||
#else
|
||||
#define OPENGL_DRIVER_NAME "libGL.so"
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "../qcommon/exe_headers.h"
|
||||
|
||||
#include "client.h"
|
||||
#include "FXScheduler.h"
|
||||
#include "FxScheduler.h"
|
||||
|
||||
//#define __FXCHECKER
|
||||
|
||||
|
|
|
@ -424,6 +424,7 @@ inline int VectorToInt(vec3_t vec)
|
|||
{
|
||||
int tmp, retval;
|
||||
|
||||
#ifdef _MSVC_VER
|
||||
_asm
|
||||
{
|
||||
push edx
|
||||
|
@ -447,6 +448,21 @@ inline int VectorToInt(vec3_t vec)
|
|||
mov [retval], eax
|
||||
pop edx
|
||||
}
|
||||
#else
|
||||
asm("flds %1;\n\t"
|
||||
"flds %2;\n\t"
|
||||
"flds %3;\n\t"
|
||||
"fistp %4;\n\t"
|
||||
"movb %4, %%al;\n\t"
|
||||
"shl $16, %0;\n\t"
|
||||
"fistp %4;\n\t"
|
||||
"movb %4, %%ah;\n\t"
|
||||
"fistp %4;\n\t"
|
||||
"movb %4, %%al;\n\t"
|
||||
: "=a"(retval)
|
||||
: "m"(vec[0]), "m"(vec[1]), "m"(vec[2]), "m"(tmp), "a"(0xff00)
|
||||
);
|
||||
#endif
|
||||
return(retval);
|
||||
}
|
||||
|
||||
|
|
|
@ -307,12 +307,12 @@ public:
|
|||
mGhoul2 = iGhoul2; mEntNum = entNum; mModelNum = modelNum; mBoltNum = boltNum;
|
||||
}
|
||||
|
||||
inline CParticle::CParticle(void)
|
||||
inline CParticle(void)
|
||||
{
|
||||
mRefEnt.reType = RT_SPRITE; mEntNum = -1; mModelNum = -1; mBoltNum = -1;
|
||||
}
|
||||
|
||||
virtual CParticle::~CParticle(void)
|
||||
virtual ~CParticle(void)
|
||||
{
|
||||
mGhoul2.kill(); //remove my model ref without actually deleting
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ int CFxScheduler::RegisterEffect( const char *file, bool bHasCorrectPath /*= fal
|
|||
char sfile[MAX_QPATH];
|
||||
|
||||
COM_StripExtension( file, sfile );
|
||||
strlwr(sfile);
|
||||
Q_strlwr(sfile);
|
||||
|
||||
Com_DPrintf("Registering effect : %s\n", sfile);
|
||||
|
||||
|
@ -386,7 +386,7 @@ int CFxScheduler::ParseEffect( const char *file, CGPGroup *base )
|
|||
if ((pair = base->GetPairs())!=0)
|
||||
{
|
||||
grpName = pair->GetName();
|
||||
if ( !stricmp( grpName, "repeatDelay" ))
|
||||
if ( !Q_stricmp( grpName, "repeatDelay" ))
|
||||
{
|
||||
effect->mRepeatDelay = atoi(pair->GetTopValue());
|
||||
}
|
||||
|
@ -403,55 +403,55 @@ int CFxScheduler::ParseEffect( const char *file, CGPGroup *base )
|
|||
grpName = primitiveGroup->GetName();
|
||||
|
||||
// Huge stricmp lists suxor
|
||||
if ( !stricmp( grpName, "particle" ))
|
||||
if ( !Q_stricmp( grpName, "particle" ))
|
||||
{
|
||||
type = Particle;
|
||||
}
|
||||
else if ( !stricmp( grpName, "line" ))
|
||||
else if ( !Q_stricmp( grpName, "line" ))
|
||||
{
|
||||
type = Line;
|
||||
}
|
||||
else if ( !stricmp( grpName, "tail" ))
|
||||
else if ( !Q_stricmp( grpName, "tail" ))
|
||||
{
|
||||
type = Tail;
|
||||
}
|
||||
else if ( !stricmp( grpName, "sound" ))
|
||||
else if ( !Q_stricmp( grpName, "sound" ))
|
||||
{
|
||||
type = Sound;
|
||||
}
|
||||
else if ( !stricmp( grpName, "cylinder" ))
|
||||
else if ( !Q_stricmp( grpName, "cylinder" ))
|
||||
{
|
||||
type = Cylinder;
|
||||
}
|
||||
else if ( !stricmp( grpName, "electricity" ))
|
||||
else if ( !Q_stricmp( grpName, "electricity" ))
|
||||
{
|
||||
type = Electricity;
|
||||
}
|
||||
else if ( !stricmp( grpName, "emitter" ))
|
||||
else if ( !Q_stricmp( grpName, "emitter" ))
|
||||
{
|
||||
type = Emitter;
|
||||
}
|
||||
else if ( !stricmp( grpName, "decal" ))
|
||||
else if ( !Q_stricmp( grpName, "decal" ))
|
||||
{
|
||||
type = Decal;
|
||||
}
|
||||
else if ( !stricmp( grpName, "orientedparticle" ))
|
||||
else if ( !Q_stricmp( grpName, "orientedparticle" ))
|
||||
{
|
||||
type = OrientedParticle;
|
||||
}
|
||||
else if ( !stricmp( grpName, "fxrunner" ))
|
||||
else if ( !Q_stricmp( grpName, "fxrunner" ))
|
||||
{
|
||||
type = FxRunner;
|
||||
}
|
||||
else if ( !stricmp( grpName, "light" ))
|
||||
else if ( !Q_stricmp( grpName, "light" ))
|
||||
{
|
||||
type = Light;
|
||||
}
|
||||
else if ( !stricmp( grpName, "cameraShake" ))
|
||||
else if ( !Q_stricmp( grpName, "cameraShake" ))
|
||||
{
|
||||
type = CameraShake;
|
||||
}
|
||||
else if ( !stricmp( grpName, "flash" ))
|
||||
else if ( !Q_stricmp( grpName, "flash" ))
|
||||
{
|
||||
type = ScreenFlash;
|
||||
}
|
||||
|
@ -645,7 +645,7 @@ CPrimitiveTemplate *CFxScheduler::GetPrimitiveCopy( SEffectTemplate *effectCopy,
|
|||
|
||||
for ( int i = 0; i < effectCopy->mPrimitiveCount; i++ )
|
||||
{
|
||||
if ( !stricmp( effectCopy->mPrimitives[i]->mName, componentName ))
|
||||
if ( !Q_stricmp( effectCopy->mPrimitives[i]->mName, componentName ))
|
||||
{
|
||||
// we found a match, so return it
|
||||
return effectCopy->mPrimitives[i];
|
||||
|
@ -904,7 +904,7 @@ void CFxScheduler::PlayEffect( int id, vec3_t origin, vec3_t axis[3], const int
|
|||
|
||||
if ( prim->mSpawnFlags & FX_EVEN_DISTRIBUTION )
|
||||
{
|
||||
factor = abs(prim->mSpawnDelay.GetMax() - prim->mSpawnDelay.GetMin()) / (float)count;
|
||||
factor = abs((long)(prim->mSpawnDelay.GetMax() - prim->mSpawnDelay.GetMin())) / (float)count;
|
||||
}
|
||||
|
||||
// Schedule the random number of bits
|
||||
|
|
|
@ -354,7 +354,7 @@ struct SEffectTemplate
|
|||
|
||||
bool operator == (const char * name) const
|
||||
{
|
||||
return !stricmp( mEffectName, name );
|
||||
return !Q_stricmp( mEffectName, name );
|
||||
}
|
||||
void operator=(const SEffectTemplate &that);
|
||||
};
|
||||
|
|
|
@ -215,7 +215,7 @@ public:
|
|||
}
|
||||
|
||||
void CameraShake( vec3_t origin, float intensity, int radius, int time );
|
||||
qboolean SFxHelper::GetOriginAxisFromBolt(CGhoul2Info_v *pGhoul2, int mEntNum, int modelNum, int boltNum, vec3_t /*out*/origin, vec3_t /*out*/axis[3]);
|
||||
qboolean GetOriginAxisFromBolt(CGhoul2Info_v *pGhoul2, int mEntNum, int modelNum, int boltNum, vec3_t /*out*/origin, vec3_t /*out*/axis[3]);
|
||||
};
|
||||
|
||||
extern SFxHelper theFxHelper;
|
||||
|
|
|
@ -276,23 +276,23 @@ bool CPrimitiveTemplate::ParseGroupFlags( const char *val, int *flags )
|
|||
return true;
|
||||
}
|
||||
|
||||
if ( !stricmp( flag[i], "linear" ))
|
||||
if ( !Q_stricmp( flag[i], "linear" ))
|
||||
{
|
||||
*flags |= FX_LINEAR;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "nonlinear" ))
|
||||
else if ( !Q_stricmp( flag[i], "nonlinear" ))
|
||||
{
|
||||
*flags |= FX_NONLINEAR;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "wave" ))
|
||||
else if ( !Q_stricmp( flag[i], "wave" ))
|
||||
{
|
||||
*flags |= FX_WAVE;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "random" ))
|
||||
else if ( !Q_stricmp( flag[i], "random" ))
|
||||
{
|
||||
*flags |= FX_RAND;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "clamp" ))
|
||||
else if ( !Q_stricmp( flag[i], "clamp" ))
|
||||
{
|
||||
*flags |= FX_CLAMP;
|
||||
}
|
||||
|
@ -719,73 +719,73 @@ bool CPrimitiveTemplate::ParseFlags( const char *val )
|
|||
return true;
|
||||
}
|
||||
|
||||
if ( !stricmp( flag[i], "useModel" ))
|
||||
if ( !Q_stricmp( flag[i], "useModel" ))
|
||||
{
|
||||
mFlags |= FX_ATTACHED_MODEL;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "useBBox" ))
|
||||
else if ( !Q_stricmp( flag[i], "useBBox" ))
|
||||
{
|
||||
mFlags |= FX_USE_BBOX;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "usePhysics" ))
|
||||
else if ( !Q_stricmp( flag[i], "usePhysics" ))
|
||||
{
|
||||
mFlags |= FX_APPLY_PHYSICS;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "expensivePhysics" ))
|
||||
else if ( !Q_stricmp( flag[i], "expensivePhysics" ))
|
||||
{
|
||||
mFlags |= FX_EXPENSIVE_PHYSICS;
|
||||
}
|
||||
//rww - begin g2 stuff
|
||||
else if ( !stricmp( flag[i], "ghoul2Collision" ))
|
||||
else if ( !Q_stricmp( flag[i], "ghoul2Collision" ))
|
||||
{
|
||||
mFlags |= (FX_GHOUL2_TRACE|FX_APPLY_PHYSICS|FX_EXPENSIVE_PHYSICS);
|
||||
}
|
||||
else if ( !stricmp( flag[i], "ghoul2Decals" ))
|
||||
else if ( !Q_stricmp( flag[i], "ghoul2Decals" ))
|
||||
{
|
||||
mFlags |= FX_GHOUL2_DECALS;
|
||||
}
|
||||
//rww - end
|
||||
else if ( !stricmp( flag[i], "impactKills" ))
|
||||
else if ( !Q_stricmp( flag[i], "impactKills" ))
|
||||
{
|
||||
mFlags |= FX_KILL_ON_IMPACT;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "impactFx" ))
|
||||
else if ( !Q_stricmp( flag[i], "impactFx" ))
|
||||
{
|
||||
mFlags |= FX_IMPACT_RUNS_FX;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "deathFx" ))
|
||||
else if ( !Q_stricmp( flag[i], "deathFx" ))
|
||||
{
|
||||
mFlags |= FX_DEATH_RUNS_FX;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "useAlpha" ))
|
||||
else if ( !Q_stricmp( flag[i], "useAlpha" ))
|
||||
{
|
||||
mFlags |= FX_USE_ALPHA;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "emitFx" ))
|
||||
else if ( !Q_stricmp( flag[i], "emitFx" ))
|
||||
{
|
||||
mFlags |= FX_EMIT_FX;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "depthHack" ))
|
||||
else if ( !Q_stricmp( flag[i], "depthHack" ))
|
||||
{
|
||||
mFlags |= FX_DEPTH_HACK;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "relative" ))
|
||||
else if ( !Q_stricmp( flag[i], "relative" ))
|
||||
{
|
||||
mFlags |= FX_RELATIVE;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "setShaderTime" ))
|
||||
else if ( !Q_stricmp( flag[i], "setShaderTime" ))
|
||||
{
|
||||
mFlags |= FX_SET_SHADER_TIME;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "paperPhysics" ))
|
||||
else if ( !Q_stricmp( flag[i], "paperPhysics" ))
|
||||
{
|
||||
mFlags |= FX_PAPER_PHYSICS; //warning! shared flag. You use this with a cylinder and you can expect evilness to ensue
|
||||
}
|
||||
else if ( !stricmp( flag[i], "localizedFlash" ))
|
||||
else if ( !Q_stricmp( flag[i], "localizedFlash" ))
|
||||
{
|
||||
mFlags |= FX_LOCALIZED_FLASH; //warning! shared flag. You use this with a cylinder and you can expect evilness to ensue
|
||||
}
|
||||
else if ( !stricmp( flag[i], "playerView" ))
|
||||
else if ( !Q_stricmp( flag[i], "playerView" ))
|
||||
{
|
||||
mFlags |= FX_PLAYER_VIEW; //warning! shared flag. You use this with a cylinder and you can expect evilness to ensue
|
||||
}
|
||||
|
@ -824,59 +824,59 @@ bool CPrimitiveTemplate::ParseSpawnFlags( const char *val )
|
|||
return true;
|
||||
}
|
||||
|
||||
if ( !stricmp( flag[i], "org2fromTrace" ))
|
||||
if ( !Q_stricmp( flag[i], "org2fromTrace" ))
|
||||
{
|
||||
mSpawnFlags |= FX_ORG2_FROM_TRACE;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "traceImpactFx" ))
|
||||
else if ( !Q_stricmp( flag[i], "traceImpactFx" ))
|
||||
{
|
||||
mSpawnFlags |= FX_TRACE_IMPACT_FX;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "org2isOffset" ))
|
||||
else if ( !Q_stricmp( flag[i], "org2isOffset" ))
|
||||
{
|
||||
mSpawnFlags |= FX_ORG2_IS_OFFSET;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "cheapOrgCalc" ))
|
||||
else if ( !Q_stricmp( flag[i], "cheapOrgCalc" ))
|
||||
{
|
||||
mSpawnFlags |= FX_CHEAP_ORG_CALC;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "cheapOrg2Calc" ))
|
||||
else if ( !Q_stricmp( flag[i], "cheapOrg2Calc" ))
|
||||
{
|
||||
mSpawnFlags |= FX_CHEAP_ORG2_CALC;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "absoluteVel" ))
|
||||
else if ( !Q_stricmp( flag[i], "absoluteVel" ))
|
||||
{
|
||||
mSpawnFlags |= FX_VEL_IS_ABSOLUTE;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "absoluteAccel" ))
|
||||
else if ( !Q_stricmp( flag[i], "absoluteAccel" ))
|
||||
{
|
||||
mSpawnFlags |= FX_ACCEL_IS_ABSOLUTE;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "orgOnSphere" )) // sphere/ellipsoid
|
||||
else if ( !Q_stricmp( flag[i], "orgOnSphere" )) // sphere/ellipsoid
|
||||
{
|
||||
mSpawnFlags |= FX_ORG_ON_SPHERE;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "orgOnCylinder" )) // cylinder/disk
|
||||
else if ( !Q_stricmp( flag[i], "orgOnCylinder" )) // cylinder/disk
|
||||
{
|
||||
mSpawnFlags |= FX_ORG_ON_CYLINDER;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "axisFromSphere" ))
|
||||
else if ( !Q_stricmp( flag[i], "axisFromSphere" ))
|
||||
{
|
||||
mSpawnFlags |= FX_AXIS_FROM_SPHERE;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "randrotaroundfwd" ))
|
||||
else if ( !Q_stricmp( flag[i], "randrotaroundfwd" ))
|
||||
{
|
||||
mSpawnFlags |= FX_RAND_ROT_AROUND_FWD;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "evenDistribution" ))
|
||||
else if ( !Q_stricmp( flag[i], "evenDistribution" ))
|
||||
{
|
||||
mSpawnFlags |= FX_EVEN_DISTRIBUTION;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "rgbComponentInterpolation" ))
|
||||
else if ( !Q_stricmp( flag[i], "rgbComponentInterpolation" ))
|
||||
{
|
||||
mSpawnFlags |= FX_RGB_COMPONENT_INTERP;
|
||||
}
|
||||
else if ( !stricmp( flag[i], "affectedByWind" ))
|
||||
else if ( !Q_stricmp( flag[i], "affectedByWind" ))
|
||||
{
|
||||
mSpawnFlags |= FX_AFFECTED_BY_WIND;
|
||||
}
|
||||
|
@ -893,7 +893,7 @@ bool CPrimitiveTemplate::ParseSpawnFlags( const char *val )
|
|||
|
||||
bool CPrimitiveTemplate::ParseMaterialImpact(const char *val)
|
||||
{
|
||||
if (!stricmp(val, "shellsound"))
|
||||
if (!Q_stricmp(val, "shellsound"))
|
||||
{
|
||||
mMatImpactFX = MATIMPACTFX_SHELLSOUND;
|
||||
}
|
||||
|
@ -1942,19 +1942,19 @@ bool CPrimitiveTemplate::ParseRGB( CGPGroup *grp )
|
|||
val = pairs->GetTopValue();
|
||||
|
||||
// Huge stricmp lists suxor
|
||||
if ( !stricmp( key, "start" ))
|
||||
if ( !Q_stricmp( key, "start" ))
|
||||
{
|
||||
ParseRGBStart( val );
|
||||
}
|
||||
else if ( !stricmp( key, "end" ))
|
||||
else if ( !Q_stricmp( key, "end" ))
|
||||
{
|
||||
ParseRGBEnd( val );
|
||||
}
|
||||
else if ( !stricmp( key, "parm" ) || !stricmp( key, "parms" ))
|
||||
else if ( !Q_stricmp( key, "parm" ) || !Q_stricmp( key, "parms" ))
|
||||
{
|
||||
ParseRGBParm( val );
|
||||
}
|
||||
else if ( !stricmp( key, "flags" ) || !stricmp( key, "flag" ))
|
||||
else if ( !Q_stricmp( key, "flags" ) || !Q_stricmp( key, "flag" ))
|
||||
{
|
||||
ParseRGBFlags( val );
|
||||
}
|
||||
|
@ -1996,19 +1996,19 @@ bool CPrimitiveTemplate::ParseAlpha( CGPGroup *grp )
|
|||
val = pairs->GetTopValue();
|
||||
|
||||
// Huge stricmp lists suxor
|
||||
if ( !stricmp( key, "start" ))
|
||||
if ( !Q_stricmp( key, "start" ))
|
||||
{
|
||||
ParseAlphaStart( val );
|
||||
}
|
||||
else if ( !stricmp( key, "end" ))
|
||||
else if ( !Q_stricmp( key, "end" ))
|
||||
{
|
||||
ParseAlphaEnd( val );
|
||||
}
|
||||
else if ( !stricmp( key, "parm" ) || !stricmp( key, "parms" ))
|
||||
else if ( !Q_stricmp( key, "parm" ) || !Q_stricmp( key, "parms" ))
|
||||
{
|
||||
ParseAlphaParm( val );
|
||||
}
|
||||
else if ( !stricmp( key, "flags" ) || !stricmp( key, "flag" ))
|
||||
else if ( !Q_stricmp( key, "flags" ) || !Q_stricmp( key, "flag" ))
|
||||
{
|
||||
ParseAlphaFlags( val );
|
||||
}
|
||||
|
@ -2050,19 +2050,19 @@ bool CPrimitiveTemplate::ParseSize( CGPGroup *grp )
|
|||
val = pairs->GetTopValue();
|
||||
|
||||
// Huge stricmp lists suxor
|
||||
if ( !stricmp( key, "start" ))
|
||||
if ( !Q_stricmp( key, "start" ))
|
||||
{
|
||||
ParseSizeStart( val );
|
||||
}
|
||||
else if ( !stricmp( key, "end" ))
|
||||
else if ( !Q_stricmp( key, "end" ))
|
||||
{
|
||||
ParseSizeEnd( val );
|
||||
}
|
||||
else if ( !stricmp( key, "parm" ) || !stricmp( key, "parms" ))
|
||||
else if ( !Q_stricmp( key, "parm" ) || !Q_stricmp( key, "parms" ))
|
||||
{
|
||||
ParseSizeParm( val );
|
||||
}
|
||||
else if ( !stricmp( key, "flags" ) || !stricmp( key, "flag" ))
|
||||
else if ( !Q_stricmp( key, "flags" ) || !Q_stricmp( key, "flag" ))
|
||||
{
|
||||
ParseSizeFlags( val );
|
||||
}
|
||||
|
@ -2104,19 +2104,19 @@ bool CPrimitiveTemplate::ParseSize2( CGPGroup *grp )
|
|||
val = pairs->GetTopValue();
|
||||
|
||||
// Huge stricmp lists suxor
|
||||
if ( !stricmp( key, "start" ))
|
||||
if ( !Q_stricmp( key, "start" ))
|
||||
{
|
||||
ParseSize2Start( val );
|
||||
}
|
||||
else if ( !stricmp( key, "end" ))
|
||||
else if ( !Q_stricmp( key, "end" ))
|
||||
{
|
||||
ParseSize2End( val );
|
||||
}
|
||||
else if ( !stricmp( key, "parm" ) || !stricmp( key, "parms" ))
|
||||
else if ( !Q_stricmp( key, "parm" ) || !Q_stricmp( key, "parms" ))
|
||||
{
|
||||
ParseSize2Parm( val );
|
||||
}
|
||||
else if ( !stricmp( key, "flags" ) || !stricmp( key, "flag" ))
|
||||
else if ( !Q_stricmp( key, "flags" ) || !Q_stricmp( key, "flag" ))
|
||||
{
|
||||
ParseSize2Flags( val );
|
||||
}
|
||||
|
@ -2158,19 +2158,19 @@ bool CPrimitiveTemplate::ParseLength( CGPGroup *grp )
|
|||
val = pairs->GetTopValue();
|
||||
|
||||
// Huge stricmp lists suxor
|
||||
if ( !stricmp( key, "start" ))
|
||||
if ( !Q_stricmp( key, "start" ))
|
||||
{
|
||||
ParseLengthStart( val );
|
||||
}
|
||||
else if ( !stricmp( key, "end" ))
|
||||
else if ( !Q_stricmp( key, "end" ))
|
||||
{
|
||||
ParseLengthEnd( val );
|
||||
}
|
||||
else if ( !stricmp( key, "parm" ) || !stricmp( key, "parms" ))
|
||||
else if ( !Q_stricmp( key, "parm" ) || !Q_stricmp( key, "parms" ))
|
||||
{
|
||||
ParseLengthParm( val );
|
||||
}
|
||||
else if ( !stricmp( key, "flags" ) || !stricmp( key, "flag" ))
|
||||
else if ( !Q_stricmp( key, "flags" ) || !Q_stricmp( key, "flag" ))
|
||||
{
|
||||
ParseLengthFlags( val );
|
||||
}
|
||||
|
@ -2206,128 +2206,128 @@ bool CPrimitiveTemplate::ParsePrimitive( CGPGroup *grp )
|
|||
val = pairs->GetTopValue();
|
||||
|
||||
// Huge stricmp lists suxor
|
||||
if ( !stricmp( key, "count" ))
|
||||
if ( !Q_stricmp( key, "count" ))
|
||||
{
|
||||
ParseCount( val );
|
||||
}
|
||||
else if ( !stricmp( key, "shaders" ) || !stricmp( key, "shader" ))
|
||||
else if ( !Q_stricmp( key, "shaders" ) || !Q_stricmp( key, "shader" ))
|
||||
{
|
||||
ParseShaders( pairs );
|
||||
}
|
||||
else if ( !stricmp( key, "models" ) || !stricmp( key, "model" ))
|
||||
else if ( !Q_stricmp( key, "models" ) || !Q_stricmp( key, "model" ))
|
||||
{
|
||||
ParseModels( pairs );
|
||||
}
|
||||
else if ( !stricmp( key, "sounds" ) || !stricmp( key, "sound" ))
|
||||
else if ( !Q_stricmp( key, "sounds" ) || !Q_stricmp( key, "sound" ))
|
||||
{
|
||||
ParseSounds( pairs );
|
||||
}
|
||||
else if ( !stricmp( key, "impactfx" ))
|
||||
else if ( !Q_stricmp( key, "impactfx" ))
|
||||
{
|
||||
ParseImpactFxStrings( pairs );
|
||||
}
|
||||
else if ( !stricmp( key, "deathfx" ))
|
||||
else if ( !Q_stricmp( key, "deathfx" ))
|
||||
{
|
||||
ParseDeathFxStrings( pairs );
|
||||
}
|
||||
else if ( !stricmp( key, "emitfx" ))
|
||||
else if ( !Q_stricmp( key, "emitfx" ))
|
||||
{
|
||||
ParseEmitterFxStrings( pairs );
|
||||
}
|
||||
else if ( !stricmp( key, "playfx" ))
|
||||
else if ( !Q_stricmp( key, "playfx" ))
|
||||
{
|
||||
ParsePlayFxStrings( pairs );
|
||||
}
|
||||
else if ( !stricmp( key, "life" ))
|
||||
else if ( !Q_stricmp( key, "life" ))
|
||||
{
|
||||
ParseLife( val );
|
||||
}
|
||||
else if ( !stricmp( key, "delay" ))
|
||||
else if ( !Q_stricmp( key, "delay" ))
|
||||
{
|
||||
ParseDelay( val );
|
||||
}
|
||||
else if ( !stricmp( key, "cullrange" ))
|
||||
else if ( !Q_stricmp( key, "cullrange" ))
|
||||
{
|
||||
// mCullRange = atoi( val );
|
||||
// mCullRange *= mCullRange; // square it now so we don't have to square every time we compare
|
||||
}
|
||||
else if ( !stricmp( key, "bounce" ) || !stricmp( key, "intensity" )) // me==bad for reusing this...but it shouldn't hurt anything)
|
||||
else if ( !Q_stricmp( key, "bounce" ) || !Q_stricmp( key, "intensity" )) // me==bad for reusing this...but it shouldn't hurt anything)
|
||||
{
|
||||
ParseElasticity( val );
|
||||
}
|
||||
else if ( !stricmp( key, "min" ))
|
||||
else if ( !Q_stricmp( key, "min" ))
|
||||
{
|
||||
ParseMin( val );
|
||||
}
|
||||
else if ( !stricmp( key, "max" ))
|
||||
else if ( !Q_stricmp( key, "max" ))
|
||||
{
|
||||
ParseMax( val );
|
||||
}
|
||||
else if ( !stricmp( key, "angle" ) || !stricmp( key, "angles" ))
|
||||
else if ( !Q_stricmp( key, "angle" ) || !Q_stricmp( key, "angles" ))
|
||||
{
|
||||
ParseAngle( val );
|
||||
}
|
||||
else if ( !stricmp( key, "angleDelta" ))
|
||||
else if ( !Q_stricmp( key, "angleDelta" ))
|
||||
{
|
||||
ParseAngleDelta( val );
|
||||
}
|
||||
else if ( !stricmp( key, "velocity" ) || !stricmp( key, "vel" ))
|
||||
else if ( !Q_stricmp( key, "velocity" ) || !Q_stricmp( key, "vel" ))
|
||||
{
|
||||
ParseVelocity( val );
|
||||
}
|
||||
else if ( !stricmp( key, "acceleration" ) || !stricmp( key, "accel" ))
|
||||
else if ( !Q_stricmp( key, "acceleration" ) || !Q_stricmp( key, "accel" ))
|
||||
{
|
||||
ParseAcceleration( val );
|
||||
}
|
||||
else if ( !stricmp( key, "gravity" ))
|
||||
else if ( !Q_stricmp( key, "gravity" ))
|
||||
{
|
||||
ParseGravity( val );
|
||||
}
|
||||
else if ( !stricmp( key, "density" ))
|
||||
else if ( !Q_stricmp( key, "density" ))
|
||||
{
|
||||
ParseDensity( val );
|
||||
}
|
||||
else if ( !stricmp( key, "variance" ))
|
||||
else if ( !Q_stricmp( key, "variance" ))
|
||||
{
|
||||
ParseVariance( val );
|
||||
}
|
||||
else if ( !stricmp( key, "origin" ))
|
||||
else if ( !Q_stricmp( key, "origin" ))
|
||||
{
|
||||
ParseOrigin1( val );
|
||||
}
|
||||
else if ( !stricmp( key, "origin2" ))
|
||||
else if ( !Q_stricmp( key, "origin2" ))
|
||||
{
|
||||
ParseOrigin2( val );
|
||||
}
|
||||
else if ( !stricmp( key, "radius" )) // part of ellipse/cylinder calcs.
|
||||
else if ( !Q_stricmp( key, "radius" )) // part of ellipse/cylinder calcs.
|
||||
{
|
||||
ParseRadius( val );
|
||||
}
|
||||
else if ( !stricmp( key, "height" )) // part of ellipse/cylinder calcs.
|
||||
else if ( !Q_stricmp( key, "height" )) // part of ellipse/cylinder calcs.
|
||||
{
|
||||
ParseHeight( val );
|
||||
}
|
||||
else if ( !stricmp( key, "wind" ))
|
||||
else if ( !Q_stricmp( key, "wind" ))
|
||||
{
|
||||
ParseWindModifier( val );
|
||||
}
|
||||
else if ( !stricmp( key, "rotation" ))
|
||||
else if ( !Q_stricmp( key, "rotation" ))
|
||||
{
|
||||
ParseRotation( val );
|
||||
}
|
||||
else if ( !stricmp( key, "rotationDelta" ))
|
||||
else if ( !Q_stricmp( key, "rotationDelta" ))
|
||||
{
|
||||
ParseRotationDelta( val );
|
||||
}
|
||||
else if ( !stricmp( key, "flags" ) || !stricmp( key, "flag" ))
|
||||
else if ( !Q_stricmp( key, "flags" ) || !Q_stricmp( key, "flag" ))
|
||||
{ // these need to get passed on to the primitive
|
||||
ParseFlags( val );
|
||||
}
|
||||
else if ( !stricmp( key, "spawnFlags" ) || !stricmp( key, "spawnFlag" ))
|
||||
else if ( !Q_stricmp( key, "spawnFlags" ) || !Q_stricmp( key, "spawnFlag" ))
|
||||
{ // these are used to spawn things in cool ways, but don't ever get passed on to prims.
|
||||
ParseSpawnFlags( val );
|
||||
}
|
||||
else if ( !stricmp( key, "name" ))
|
||||
else if ( !Q_stricmp( key, "name" ))
|
||||
{
|
||||
if ( val )
|
||||
{
|
||||
|
@ -2335,7 +2335,7 @@ bool CPrimitiveTemplate::ParsePrimitive( CGPGroup *grp )
|
|||
strcpy( mName, val );
|
||||
}
|
||||
}
|
||||
else if (!stricmp(key, "materialImpact"))
|
||||
else if (!Q_stricmp(key, "materialImpact"))
|
||||
{
|
||||
ParseMaterialImpact(val);
|
||||
}
|
||||
|
@ -2354,23 +2354,23 @@ bool CPrimitiveTemplate::ParsePrimitive( CGPGroup *grp )
|
|||
{
|
||||
key = subGrp->GetName();
|
||||
|
||||
if ( !stricmp( key, "rgb" ))
|
||||
if ( !Q_stricmp( key, "rgb" ))
|
||||
{
|
||||
ParseRGB( subGrp );
|
||||
}
|
||||
else if ( !stricmp( key, "alpha" ))
|
||||
else if ( !Q_stricmp( key, "alpha" ))
|
||||
{
|
||||
ParseAlpha( subGrp );
|
||||
}
|
||||
else if ( !stricmp( key, "size" ) || !stricmp( key, "width" ))
|
||||
else if ( !Q_stricmp( key, "size" ) || !Q_stricmp( key, "width" ))
|
||||
{
|
||||
ParseSize( subGrp );
|
||||
}
|
||||
else if ( !stricmp( key, "size2" ) || !stricmp( key, "width2" ))
|
||||
else if ( !Q_stricmp( key, "size2" ) || !Q_stricmp( key, "width2" ))
|
||||
{
|
||||
ParseSize2( subGrp );
|
||||
}
|
||||
else if ( !stricmp( key, "length" ) || !stricmp( key, "height" ))
|
||||
else if ( !Q_stricmp( key, "length" ) || !Q_stricmp( key, "height" ))
|
||||
{
|
||||
ParseLength( subGrp );
|
||||
}
|
||||
|
|
|
@ -14,17 +14,17 @@
|
|||
#include "FXExport.h"
|
||||
#endif
|
||||
|
||||
#include "FXutil.h"
|
||||
#include "FxUtil.h"
|
||||
|
||||
#if !defined(CROFFSYSTEM_H_INC)
|
||||
#include "../qcommon/ROFFSystem.h"
|
||||
#include "../qcommon/RoffSystem.h"
|
||||
#endif
|
||||
|
||||
#ifdef _DONETPROFILE_
|
||||
#include "../qcommon/INetProfile.h"
|
||||
#endif
|
||||
|
||||
#include "../renderer/tr_worldeffects.h"
|
||||
#include "../renderer/tr_WorldEffects.h"
|
||||
|
||||
#ifdef VV_LIGHTING
|
||||
#include "../renderer/tr_lightmanager.h"
|
||||
|
|
|
@ -1194,7 +1194,7 @@ e_status CIN_RunCinematic (int handle)
|
|||
}
|
||||
|
||||
thisTime = Sys_Milliseconds()*com_timescale->value;
|
||||
if (cinTable[currentHandle].shader && (abs(thisTime - cinTable[currentHandle].lastTime))>100) {
|
||||
if (cinTable[currentHandle].shader && (abs((long)(thisTime - cinTable[currentHandle].lastTime)))>100) {
|
||||
cinTable[currentHandle].startTime += thisTime - cinTable[currentHandle].lastTime;
|
||||
}
|
||||
cinTable[currentHandle].tfps = ((((Sys_Milliseconds()*com_timescale->value) - cinTable[currentHandle].startTime)*cinTable[currentHandle].roqFPS)/1000);
|
||||
|
|
|
@ -1471,10 +1471,10 @@ usercmd_t CL_CreateCmd( void ) {
|
|||
// draw debug graphs of turning for mouse testing
|
||||
if ( cl_debugMove->integer ) {
|
||||
if ( cl_debugMove->integer == 1 ) {
|
||||
SCR_DebugGraph( abs(cl.viewangles[YAW] - oldAngles[YAW]), 0 );
|
||||
SCR_DebugGraph( abs((long)(cl.viewangles[YAW] - oldAngles[YAW])), 0 );
|
||||
}
|
||||
if ( cl_debugMove->integer == 2 ) {
|
||||
SCR_DebugGraph( abs(cl.viewangles[PITCH] - oldAngles[PITCH]), 0 );
|
||||
SCR_DebugGraph( abs((long)(cl.viewangles[PITCH] - oldAngles[PITCH])), 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1039,7 +1039,7 @@ int Key_StringToKeynum( char *str ) {
|
|||
// scan for a text match
|
||||
for ( i = 0 ; i < MAX_KEYS ; i++ )
|
||||
{
|
||||
if ( keynames[i].name && !stricmp( str, keynames[i].name ) )
|
||||
if ( keynames[i].name && !Q_stricmp( str, keynames[i].name ) )
|
||||
{
|
||||
return keynames[i].keynum;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#endif
|
||||
|
||||
#if !defined (MINIHEAP_H_INC)
|
||||
#include "../qcommon/miniheap.h"
|
||||
#include "../qcommon/MiniHeap.h"
|
||||
#endif
|
||||
|
||||
#ifdef _DONETPROFILE_
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "client.h"
|
||||
#include "../qcommon/stringed_ingame.h"
|
||||
#include "../ghoul2/g2_local.h"
|
||||
#include "../ghoul2/G2_local.h"
|
||||
#ifdef _DONETPROFILE_
|
||||
#include "../qcommon/INetProfile.h"
|
||||
#endif
|
||||
|
|
|
@ -202,7 +202,7 @@ static int AS_GetSetNameIDForString( const char *name )
|
|||
|
||||
for ( int i = 0; i < NUM_AS_SETS; i++ )
|
||||
{
|
||||
if ( stricmp( name, setNames[i] ) == 0 )
|
||||
if ( Q_stricmp( name, setNames[i] ) == 0 )
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ static int AS_GetKeywordIDForString( const char *name )
|
|||
|
||||
for ( int i = 0; i < NUM_AS_KEYWORDS; i++ )
|
||||
{
|
||||
if ( stricmp( name, keywordNames[i] ) == 0 )
|
||||
if ( Q_stricmp( name, keywordNames[i] ) == 0 )
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -679,7 +679,7 @@ static void AS_ParseHeader( void )
|
|||
case SET_KEYWORD_TYPE:
|
||||
sscanf( parseBuffer+parsePos, "%s %s", &tempBuffer, &typeBuffer );
|
||||
|
||||
if ( !stricmp( (const char *) typeBuffer, "ambientSet" ) )
|
||||
if ( !Q_stricmp( (const char *) typeBuffer, "ambientSet" ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -771,7 +771,7 @@ AS_AddPrecacheEntry
|
|||
|
||||
void AS_AddPrecacheEntry( const char *name )
|
||||
{
|
||||
if (!stricmp(name,"#clear"))
|
||||
if (!Q_stricmp(name,"#clear"))
|
||||
{
|
||||
pMap->clear();
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "snd_mp3.h"
|
||||
#include "snd_music.h"
|
||||
#include "client.h"
|
||||
#include "../qcommon/platform.h"
|
||||
|
||||
qboolean s_shutUp = qfalse;
|
||||
|
||||
|
@ -210,7 +211,7 @@ int s_entityWavVol_back[MAX_GENTITIES];
|
|||
#define DEFAULT_REF_DISTANCE 300.0f // Default reference distance
|
||||
#define DEFAULT_VOICE_REF_DISTANCE 1500.0f // Default voice reference distance
|
||||
|
||||
int s_UseOpenAL = false; // Determines if using Open AL or the default software mixer
|
||||
int s_UseOpenAL = true; // Determines if using Open AL or the default software mixer
|
||||
|
||||
ALfloat listener_pos[3]; // Listener Position
|
||||
ALfloat listener_ori[6]; // Listener Orientation
|
||||
|
@ -226,6 +227,7 @@ void S_SetLipSyncs();
|
|||
|
||||
// EAX Related
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
typedef struct
|
||||
{
|
||||
ALuint ulNumApertures;
|
||||
|
@ -307,6 +309,8 @@ const GUID EAX_PrimaryFXSlotID = { 0xf317866d, 0x924c, 0x450c, { 0x86, 0x1b, 0xe
|
|||
|
||||
const GUID EAX_REVERB_EFFECT = { 0xcf95c8f, 0xa3cc, 0x4849, { 0xb0, 0xb6, 0x83, 0x2e, 0xcc, 0x18, 0x22, 0xdf} };
|
||||
|
||||
#endif // HAVE_EAX
|
||||
|
||||
/**************************************************************************************************\
|
||||
*
|
||||
* End of Open AL Specific
|
||||
|
@ -369,10 +373,12 @@ void S_SoundInfo_f(void) {
|
|||
|
||||
if (s_UseOpenAL)
|
||||
{
|
||||
#ifdef HAVE_EAX
|
||||
Com_Printf("EAX 4.0 %s supported\n",s_bEAX?"is":"not");
|
||||
Com_Printf("Eal file %s loaded\n",s_bEALFileLoaded?"is":"not");
|
||||
Com_Printf("s_EnvironmentID = %d\n",s_EnvironmentID);
|
||||
Com_Printf("s_bInWater = %s\n",s_bInWater?"true":"false");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -453,7 +459,7 @@ void S_Init( void ) {
|
|||
|
||||
s_CPUType = Cvar_Get("sys_cpuid","",0);
|
||||
|
||||
#if !(defined __linux__ && defined __i386__)
|
||||
#ifdef _MSC_VER
|
||||
#if !id386
|
||||
#else
|
||||
extern unsigned int uiMMXAvailable;
|
||||
|
@ -477,13 +483,9 @@ void S_Init( void ) {
|
|||
Cmd_AddCommand("mp3_calcvols", S_MP3_CalcVols_f);
|
||||
Cmd_AddCommand("s_dynamic", S_SetDynamicMusic_f);
|
||||
|
||||
cv = Cvar_Get("s_UseOpenAL" , "0",CVAR_ARCHIVE|CVAR_LATCH);
|
||||
s_UseOpenAL = !!(cv->integer);
|
||||
|
||||
|
||||
if (s_UseOpenAL)
|
||||
{
|
||||
ALCDevice = alcOpenDevice((ALubyte*)"DirectSound3D");
|
||||
ALCDevice = alcOpenDevice(NULL);
|
||||
if (!ALCDevice)
|
||||
return;
|
||||
|
||||
|
@ -512,7 +514,9 @@ void S_Init( void ) {
|
|||
alListenerfv(AL_VELOCITY,listenerVel);
|
||||
alListenerfv(AL_ORIENTATION,listenerOri);
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
InitEAXManager();
|
||||
#endif
|
||||
|
||||
memset(s_channels, 0, sizeof(s_channels));
|
||||
|
||||
|
@ -536,6 +540,7 @@ void S_Init( void ) {
|
|||
// Sources / Channels are not sending to any Slots (other than the Listener / Primary FX Slot)
|
||||
s_channels[i].lSlotID = -1;
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
if (s_bEAX)
|
||||
{
|
||||
// Remove the RoomAuto flag from each Source (to remove Reverb Engine Statistical
|
||||
|
@ -548,6 +553,7 @@ void S_Init( void ) {
|
|||
s_eaxSet(&EAXPROPERTYID_EAX40_Source, EAXSOURCE_FLAGS,
|
||||
s_channels[i].alSource, &ulFlags, sizeof(ulFlags));
|
||||
}
|
||||
#endif
|
||||
|
||||
s_numChannels++;
|
||||
}
|
||||
|
@ -595,7 +601,9 @@ void S_Init( void ) {
|
|||
// for this level
|
||||
|
||||
mapname = Cvar_VariableString( "mapname" );
|
||||
#ifdef HAVE_EAX
|
||||
EALFileInit(mapname);
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -695,7 +703,9 @@ void S_Shutdown( void )
|
|||
// Close device
|
||||
alcCloseDevice(ALCDevice);
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
ReleaseEAXManager();
|
||||
#endif
|
||||
|
||||
s_numChannels = 0;
|
||||
|
||||
|
@ -850,7 +860,7 @@ sfx_t *S_FindName( const char *name ) {
|
|||
sfx = &s_knownSfx[i];
|
||||
memset (sfx, 0, sizeof(*sfx));
|
||||
Q_strncpyz(sfx->sSoundName, sSoundNameNoExt, sizeof(sfx->sSoundName));
|
||||
strlwr(sfx->sSoundName);//force it down low
|
||||
Q_strlwr(sfx->sSoundName);//force it down low
|
||||
|
||||
sfx->next = sfxHash[hash];
|
||||
sfxHash[hash] = sfx;
|
||||
|
@ -904,6 +914,7 @@ void S_BeginRegistration( void )
|
|||
|
||||
s_soundMuted = qfalse; // we can play again
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
// Find name of level so we can load in the appropriate EAL file
|
||||
if (s_UseOpenAL)
|
||||
{
|
||||
|
@ -915,6 +926,7 @@ void S_BeginRegistration( void )
|
|||
s_FXSlotInfo[i].lEnvID = -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (s_numSfx == 0) {
|
||||
SND_setup();
|
||||
|
@ -933,6 +945,7 @@ void S_BeginRegistration( void )
|
|||
}
|
||||
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
void EALFileInit(char *level)
|
||||
{
|
||||
long lRoom;
|
||||
|
@ -963,7 +976,7 @@ void EALFileInit(char *level)
|
|||
|
||||
if (s_bEALFileLoaded)
|
||||
{
|
||||
s_lLastEnvUpdate = timeGetTime();
|
||||
s_lLastEnvUpdate = Com_Milliseconds();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -979,6 +992,7 @@ void EALFileInit(char *level)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif // HAVE_EAX
|
||||
|
||||
|
||||
|
||||
|
@ -2309,7 +2323,9 @@ void S_UpdateEntityPosition( int entityNum, const vec3_t origin )
|
|||
pos[2] = -origin[1];
|
||||
alSourcefv(s_channels[i].alSource, AL_POSITION, pos);
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
UpdateEAXBuffer(ch);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* pos[0] = origin[0];
|
||||
|
@ -2317,10 +2333,12 @@ void S_UpdateEntityPosition( int entityNum, const vec3_t origin )
|
|||
pos[2] = -origin[1];
|
||||
alSourcefv(s_channels[i].alSource, AL_POSITION, pos);
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
if ((s_bEALFileLoaded) && !( ch->entchannel == CHAN_VOICE || ch->entchannel == CHAN_VOICE_ATTEN || ch->entchannel == CHAN_VOICE_GLOBAL ) )
|
||||
{
|
||||
UpdateEAXBuffer(ch);
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
@ -2463,8 +2481,10 @@ Change the volumes of all the playing sounds for changes in their positions
|
|||
*/
|
||||
void S_Respatialize( int entityNum, const vec3_t head, vec3_t axis[3], int inwater )
|
||||
{
|
||||
#ifdef HAVE_EAX
|
||||
EAXOCCLUSIONPROPERTIES eaxOCProp;
|
||||
EAXACTIVEFXSLOTS eaxActiveSlots;
|
||||
#endif
|
||||
unsigned int ulEnvironment;
|
||||
int i;
|
||||
channel_t *ch;
|
||||
|
@ -2488,7 +2508,7 @@ void S_Respatialize( int entityNum, const vec3_t head, vec3_t axis[3], int inwat
|
|||
listener_ori[4] = axis[2][2];
|
||||
listener_ori[5] = -axis[2][1];
|
||||
alListenerfv(AL_ORIENTATION, listener_ori);
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
// Update EAX effects here
|
||||
if (s_bEALFileLoaded)
|
||||
{
|
||||
|
@ -2560,6 +2580,7 @@ void S_Respatialize( int entityNum, const vec3_t head, vec3_t axis[3], int inwat
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif // HAVE_EAX
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2897,8 +2918,10 @@ void S_Update_(void) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
if (s_bEALFileLoaded)
|
||||
UpdateEAXBuffer(ch);
|
||||
#endif
|
||||
|
||||
int nBytesDecoded = 0;
|
||||
int nTotalBytesDecoded = 0;
|
||||
|
@ -2981,7 +3004,7 @@ void S_Update_(void) {
|
|||
if (ch->thesfx->lipSyncData)
|
||||
{
|
||||
// Record start time for Lip-syncing
|
||||
s_channels[source].iStartTime = timeGetTime();
|
||||
s_channels[source].iStartTime = Com_Milliseconds();
|
||||
|
||||
// Prepare lipsync value(s)
|
||||
s_entityWavVol[ ch->entnum ] = ch->thesfx->lipSyncData[0];
|
||||
|
@ -3015,7 +3038,7 @@ void S_Update_(void) {
|
|||
if (ch->thesfx->lipSyncData)
|
||||
{
|
||||
// Record start time for Lip-syncing
|
||||
s_channels[source].iStartTime = timeGetTime();
|
||||
s_channels[source].iStartTime = Com_Milliseconds();
|
||||
|
||||
// Prepare lipsync value(s)
|
||||
s_entityWavVol[ ch->entnum ] = ch->thesfx->lipSyncData[0];
|
||||
|
@ -3338,8 +3361,10 @@ void UpdateLoopingSounds()
|
|||
ch->master_vol = loop->volume;
|
||||
alSourcef(s_channels[i].alSource, AL_GAIN, ((float)(ch->master_vol) * s_volume->value) / 255.f);
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
if (s_bEALFileLoaded)
|
||||
UpdateEAXBuffer(ch);
|
||||
#endif
|
||||
|
||||
ch->bProcessed = true;
|
||||
loop->bProcessed = true;
|
||||
|
@ -3412,8 +3437,10 @@ void UpdateLoopingSounds()
|
|||
alSourcef(s_channels[source].alSource, AL_GAIN, ((float)(ch->master_vol) * s_volume->value) / 255.0f);
|
||||
alSourcei(s_channels[source].alSource, AL_SOURCE_RELATIVE, ch->fixed_origin ? AL_TRUE : AL_FALSE);
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
if (s_bEALFileLoaded)
|
||||
UpdateEAXBuffer(ch);
|
||||
#endif
|
||||
|
||||
alGetError();
|
||||
alSourcePlay(s_channels[source].alSource);
|
||||
|
@ -3464,7 +3491,9 @@ void AL_UpdateRawSamples()
|
|||
size = (s_rawend - s_paintedtime)<<2;
|
||||
if (size > (MAX_RAW_SAMPLES<<2))
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
OutputDebugString("UpdateRawSamples :- Raw Sample buffer has overflowed !!!\n");
|
||||
#endif
|
||||
size = MAX_RAW_SAMPLES<<2;
|
||||
s_paintedtime = s_rawend - MAX_RAW_SAMPLES;
|
||||
}
|
||||
|
@ -3587,7 +3616,7 @@ void S_SetLipSyncs()
|
|||
char szString[256];
|
||||
#endif
|
||||
|
||||
currentTime = timeGetTime();
|
||||
currentTime = Com_Milliseconds();
|
||||
|
||||
memset(s_entityWavVol, 0, sizeof(s_entityWavVol));
|
||||
|
||||
|
@ -3789,28 +3818,28 @@ void S_SoundList_f( void ) {
|
|||
|
||||
if ( Cmd_Argc() == 2 )
|
||||
{
|
||||
if (!stricmp(Cmd_Argv(1), "shouldbeMP3"))
|
||||
if (!Q_stricmp(Cmd_Argv(1), "shouldbeMP3"))
|
||||
{
|
||||
bShouldBeMP3 = qtrue;
|
||||
}
|
||||
else
|
||||
if (!stricmp(Cmd_Argv(1), "wavonly"))
|
||||
if (!Q_stricmp(Cmd_Argv(1), "wavonly"))
|
||||
{
|
||||
bWavOnly = qtrue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!stricmp(Cmd_Argv(1), "1"))
|
||||
if (!Q_stricmp(Cmd_Argv(1), "1"))
|
||||
{
|
||||
iVariantCap = 1;
|
||||
}
|
||||
else
|
||||
if (!stricmp(Cmd_Argv(1), "2"))
|
||||
if (!Q_stricmp(Cmd_Argv(1), "2"))
|
||||
{
|
||||
iVariantCap = 2;
|
||||
}
|
||||
else
|
||||
if (!stricmp(Cmd_Argv(1), "3"))
|
||||
if (!Q_stricmp(Cmd_Argv(1), "3"))
|
||||
{
|
||||
iVariantCap = 3;
|
||||
}
|
||||
|
@ -3861,7 +3890,7 @@ void S_SoundList_f( void ) {
|
|||
sfx_t *sfx2;
|
||||
for (sfx2 = s_knownSfx, i2=0 ; i2<s_numSfx ; i2++, sfx2++)
|
||||
{
|
||||
if (!stricmp(sFindName,sfx2->sSoundName))
|
||||
if (!Q_stricmp(sFindName,sfx2->sSoundName))
|
||||
{
|
||||
bDumpThisOne = qfalse; // found a %1-variant of this, so use variant capping and ignore this sfx_t
|
||||
break;
|
||||
|
@ -4549,7 +4578,8 @@ void S_StartBackgroundTrack( const char *intro, const char *loop, int bCalledByC
|
|||
{
|
||||
extern const char *Music_GetLevelSetName(void);
|
||||
Q_strncpyz(sInfoOnly_CurrentDynamicMusicSet, Music_GetLevelSetName(), sizeof(sInfoOnly_CurrentDynamicMusicSet));
|
||||
for (int i = eBGRNDTRACK_DATABEGIN; i != eBGRNDTRACK_DATAEND; i++)
|
||||
int i;
|
||||
for (i = eBGRNDTRACK_DATABEGIN; i != eBGRNDTRACK_DATAEND; i++)
|
||||
{
|
||||
sboolean bOk = qfalse;
|
||||
LPCSTR psMusicName = Music_GetFileNameForState( (MusicState_e) i);
|
||||
|
@ -4994,7 +5024,7 @@ static void S_UpdateBackgroundTrack( void )
|
|||
// standard / non-dynamic one-track music...
|
||||
//
|
||||
LPCSTR psCommand = S_Music_GetRequestedState(); // special check just for "silence" case...
|
||||
sboolean bShouldBeSilent = (psCommand && !stricmp(psCommand,"silence"));
|
||||
sboolean bShouldBeSilent = (psCommand && !Q_stricmp(psCommand,"silence"));
|
||||
float fDesiredVolume = bShouldBeSilent ? 0.0f : s_musicVolume->value;
|
||||
//
|
||||
// internal to this code is a volume-smoother...
|
||||
|
@ -5184,7 +5214,8 @@ int SND_FreeOldestSound(sfx_t *pButNotThisOne /* = NULL */)
|
|||
{
|
||||
// new bit, we can't throw away any sfx_t struct in use by a channel, else the paint code will crash...
|
||||
//
|
||||
for (int iChannel=0; iChannel<MAX_CHANNELS; iChannel++)
|
||||
int iChannel;
|
||||
for (iChannel=0; iChannel<MAX_CHANNELS; iChannel++)
|
||||
{
|
||||
channel_t *ch = & s_channels[iChannel];
|
||||
|
||||
|
@ -5278,6 +5309,7 @@ qboolean SND_RegisterAudio_LevelLoadEnd(qboolean bDeleteEverythingNotUsedThisLev
|
|||
}
|
||||
|
||||
|
||||
#ifdef HAVE_EAX
|
||||
/****************************************************************************************************\
|
||||
*
|
||||
* EAX Related
|
||||
|
@ -5751,7 +5783,7 @@ void UpdateEAXListener()
|
|||
if ((!s_lpEAXManager) || (!s_bEAX))
|
||||
return;
|
||||
|
||||
lCurTime = timeGetTime();
|
||||
lCurTime = Com_Milliseconds();
|
||||
|
||||
if ((s_lLastEnvUpdate + ENV_UPDATE_RATE) < lCurTime)
|
||||
{
|
||||
|
@ -6323,3 +6355,4 @@ float CalcDistance(EMPOINT A, EMPOINT B)
|
|||
{
|
||||
return (float)sqrt(sqr(A.fX - B.fX)+sqr(A.fY - B.fY) + sqr(A.fZ - B.fZ));
|
||||
}
|
||||
#endif // HAVE_EAX
|
||||
|
|
|
@ -9,10 +9,16 @@
|
|||
#include "../mp3code/mp3struct.h"
|
||||
|
||||
// Open AL Specific
|
||||
#ifdef _WIN32
|
||||
#include "openal/al.h"
|
||||
#include "openal/alc.h"
|
||||
#define HAVE_EAX
|
||||
#include "eax/eax.h"
|
||||
#include "eax/eaxman.h"
|
||||
#else
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#endif
|
||||
|
||||
// Added for Open AL to know when to mute all sounds (e.g when app. loses focus)
|
||||
void S_AL_MuteAllSounds(sboolean bMute);
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include "snd_mp3.h"
|
||||
#include "snd_ambient.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
// Open AL
|
||||
void S_PreProcessLipSync(sfx_t *sfx);
|
||||
extern int s_UseOpenAL;
|
||||
|
@ -616,15 +618,15 @@ static sboolean S_LoadSound_FileLoadAndNameAdjuster(char *psFilename, byte **pDa
|
|||
// account for foreign voices...
|
||||
//
|
||||
extern cvar_t* s_language;
|
||||
if (s_language && stricmp("DEUTSCH",s_language->string)==0)
|
||||
if (s_language && Q_stricmp("DEUTSCH",s_language->string)==0)
|
||||
{
|
||||
strncpy(psVoice,"chr_d",5); // same number of letters as "chars"
|
||||
}
|
||||
else if (s_language && stricmp("FRANCAIS",s_language->string)==0)
|
||||
else if (s_language && Q_stricmp("FRANCAIS",s_language->string)==0)
|
||||
{
|
||||
strncpy(psVoice,"chr_f",5); // same number of letters as "chars"
|
||||
}
|
||||
else if (s_language && stricmp("ESPANOL",s_language->string)==0)
|
||||
else if (s_language && Q_stricmp("ESPANOL",s_language->string)==0)
|
||||
{
|
||||
strncpy(psVoice,"chr_e",5); // same number of letters as "chars"
|
||||
}
|
||||
|
@ -700,7 +702,7 @@ static sboolean S_LoadSound_DirIsAllowedToKeepMP3s(const char *psFilename)
|
|||
int i;
|
||||
for (i=0; i< (sizeof(psAllowedDirs) / sizeof(psAllowedDirs[0])); i++)
|
||||
{
|
||||
if (strnicmp(psFilename, psAllowedDirs[i], strlen(psAllowedDirs[i]))==0)
|
||||
if (Q_strnicmp(psFilename, psAllowedDirs[i], strlen(psAllowedDirs[i]))==0)
|
||||
return qtrue; // found a dir that's allowed to keep MP3s
|
||||
}
|
||||
|
||||
|
@ -742,7 +744,7 @@ static sboolean S_LoadSound_Actual( sfx_t *sfx )
|
|||
// make up a local filename to try wav/mp3 substitutes...
|
||||
//
|
||||
Q_strncpyz(sLoadName, sfx->sSoundName, sizeof(sLoadName));
|
||||
strlwr( sLoadName );
|
||||
Q_strlwr( sLoadName );
|
||||
//
|
||||
// Ensure name has an extension (which it must have, but you never know), and get ptr to it...
|
||||
//
|
||||
|
@ -763,7 +765,7 @@ static sboolean S_LoadSound_Actual( sfx_t *sfx )
|
|||
SND_TouchSFX(sfx);
|
||||
|
||||
//=========
|
||||
if (strnicmp(psExt,".mp3",4)==0)
|
||||
if (Q_strnicmp(psExt,".mp3",4)==0)
|
||||
{
|
||||
// load MP3 file instead...
|
||||
//
|
||||
|
|
|
@ -14,8 +14,7 @@ short *snd_out;
|
|||
|
||||
|
||||
|
||||
#if !(defined __linux__ && defined __i386__)
|
||||
#if !id386
|
||||
#if !(defined(_MSC_VER) && defined(__i386__))
|
||||
|
||||
|
||||
void S_WriteLinearBlastStereo16 (void)
|
||||
|
@ -131,7 +130,6 @@ LExit:
|
|||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void S_TransferStereo16 (unsigned long *pbuf, int endtime)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "../game/q_shared.h"
|
||||
#include "../qcommon/sstring.h"
|
||||
#include "../qcommon/platform.h"
|
||||
|
||||
#pragma warning ( disable : 4663 ) //spcialize class
|
||||
#pragma warning( push, 3 )
|
||||
|
@ -22,6 +23,8 @@
|
|||
//#include "snd_mp3.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
//
|
||||
#include "snd_music.h"
|
||||
#include "snd_ambient.h"
|
||||
|
@ -71,7 +74,7 @@ struct MusicExitTime_t // need to declare this way for operator < below
|
|||
|
||||
// I'm defining this '<' operator so STL's sort algorithm will work
|
||||
//
|
||||
bool operator < (const MusicExitTime_t& _X) const {return (fTime < _X.fTime);}
|
||||
bool operator < (const MusicExitTime_t& _x) const {return (fTime < _x.fTime);}
|
||||
};
|
||||
|
||||
// it's possible for all 3 of these to be empty if it's boss or death music
|
||||
|
@ -656,7 +659,7 @@ static sboolean Music_ParseLeveldata(const char *psLevelName)
|
|||
|
||||
// kludge up an enum, only interested in boss or not at the moment, so...
|
||||
//
|
||||
MusicState_e eMusicState = !stricmp(psMusicStateType,"boss") ? eBGRNDTRACK_BOSS : !stricmp(psMusicStateType,"death") ? eBGRNDTRACK_DEATH : eBGRNDTRACK_EXPLORE;
|
||||
MusicState_e eMusicState = !Q_stricmp(psMusicStateType,"boss") ? eBGRNDTRACK_BOSS : !Q_stricmp(psMusicStateType,"death") ? eBGRNDTRACK_DEATH : eBGRNDTRACK_EXPLORE;
|
||||
|
||||
if (!MusicFile.MusicExitTimes.empty())
|
||||
{
|
||||
|
@ -796,7 +799,7 @@ sboolean Music_DynamicDataAvailable(const char *psDynamicMusicLabel)
|
|||
{
|
||||
char sLevelName[MAX_QPATH];
|
||||
Q_strncpyz(sLevelName,COM_SkipPath( const_cast<char*>( (psDynamicMusicLabel&&psDynamicMusicLabel[0])?psDynamicMusicLabel:gsLevelNameFromServer.c_str() ) ),sizeof(sLevelName));
|
||||
strlwr(sLevelName);
|
||||
Q_strlwr(sLevelName);
|
||||
|
||||
if (strlen(sLevelName)) // avoid error messages when there's no music waiting to be played and we try and restart it...
|
||||
{
|
||||
|
|
|
@ -1900,27 +1900,27 @@ void ParseAnimationEvtBlock(const char *aeb_filename, animevent_t *animEvents, a
|
|||
{
|
||||
break;
|
||||
}
|
||||
if ( stricmp( token, "CHAN_VOICE_ATTEN" ) == 0 )
|
||||
if ( Q_stricmp( token, "CHAN_VOICE_ATTEN" ) == 0 )
|
||||
{
|
||||
animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_VOICE_ATTEN;
|
||||
}
|
||||
else if ( stricmp( token, "CHAN_VOICE_GLOBAL" ) == 0 )
|
||||
else if ( Q_stricmp( token, "CHAN_VOICE_GLOBAL" ) == 0 )
|
||||
{
|
||||
animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_VOICE_GLOBAL;
|
||||
}
|
||||
else if ( stricmp( token, "CHAN_ANNOUNCER" ) == 0 )
|
||||
else if ( Q_stricmp( token, "CHAN_ANNOUNCER" ) == 0 )
|
||||
{
|
||||
animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_ANNOUNCER;
|
||||
}
|
||||
else if ( stricmp( token, "CHAN_BODY" ) == 0 )
|
||||
else if ( Q_stricmp( token, "CHAN_BODY" ) == 0 )
|
||||
{
|
||||
animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_BODY;
|
||||
}
|
||||
else if ( stricmp( token, "CHAN_WEAPON" ) == 0 )
|
||||
else if ( Q_stricmp( token, "CHAN_WEAPON" ) == 0 )
|
||||
{
|
||||
animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_WEAPON;
|
||||
}
|
||||
else if ( stricmp( token, "CHAN_VOICE" ) == 0 )
|
||||
else if ( Q_stricmp( token, "CHAN_VOICE" ) == 0 )
|
||||
{
|
||||
animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_VOICE;
|
||||
}
|
||||
|
|
|
@ -709,7 +709,6 @@ void BG_VehicleTurnRateForSpeed( Vehicle_t *pVeh, float speed, float *mPitchOver
|
|||
|
||||
// Following couple things don't belong in the DLL namespace!
|
||||
#ifdef QAGAME
|
||||
typedef struct gentity_s gentity_t;
|
||||
gentity_t *G_PlayEffectID(const int fxID, vec3_t org, vec3_t ang);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -420,7 +420,7 @@ extern int bgForcePowerCost[NUM_FORCE_POWERS][NUM_FORCE_POWER_LEVELS];
|
|||
|
||||
#define MAXTOUCH 32
|
||||
|
||||
typedef struct bgEntity_s
|
||||
struct bgEntity_s
|
||||
{
|
||||
entityState_t s;
|
||||
playerState_t *playerState;
|
||||
|
@ -430,7 +430,7 @@ typedef struct bgEntity_s
|
|||
vec3_t modelScale; //needed for g2 collision
|
||||
|
||||
//Data type(s) must directly correspond to the head of the gentity and centity structures
|
||||
} bgEntity_t;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
// state (in / out)
|
||||
|
|
|
@ -474,7 +474,7 @@ typedef struct
|
|||
} vehTurretStatus_t;
|
||||
// This is the implementation of the vehicle interface and any of the other variables needed. This
|
||||
// is what actually represents a vehicle. -AReis.
|
||||
typedef struct Vehicle_s
|
||||
struct Vehicle_s
|
||||
{
|
||||
// The entity who pilots/drives this vehicle.
|
||||
// NOTE: This is redundant (since m_pParentEntity->owner _should_ be the pilot). This makes things clearer though.
|
||||
|
@ -620,7 +620,7 @@ typedef struct Vehicle_s
|
|||
//the guy who was previously the pilot
|
||||
bgEntity_t * m_pOldPilot;
|
||||
|
||||
} Vehicle_t;
|
||||
};
|
||||
|
||||
#include "../namespace_begin.h"
|
||||
extern int BG_VehicleGetIndex( const char *vehicleName );
|
||||
|
|
|
@ -27,7 +27,6 @@ extern stringID_table_t BSTable[];
|
|||
// so that we only get the C version of the includes (no full Icarus) in that
|
||||
// scenario, but I think we'll just try to leave this out instead.
|
||||
#ifndef _XBOX
|
||||
#ifndef __linux__
|
||||
enum
|
||||
{
|
||||
TK_EOF = -1,
|
||||
|
@ -43,7 +42,6 @@ enum
|
|||
TK_USERDEF,
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../icarus/interpreter.h"
|
||||
|
||||
|
|
|
@ -2904,7 +2904,7 @@ void FinishSpawningItem( gentity_t *ent ) {
|
|||
|
||||
// create a Ghoul2 model if the world model is a glm
|
||||
/* item = &bg_itemlist[ ent->s.modelindex ];
|
||||
if (!stricmp(&item->world_model[0][strlen(item->world_model[0]) - 4], ".glm"))
|
||||
if (!Q_stricmp(&item->world_model[0][strlen(item->world_model[0]) - 4], ".glm"))
|
||||
{
|
||||
trap_G2API_InitGhoul2Model(&ent->s, item->world_model[0], G_ModelIndex(item->world_model[0] ), 0, 0, 0, 0);
|
||||
ent->s.radius = 60;
|
||||
|
|
|
@ -509,9 +509,6 @@ This must be the very first function compiled into the .q3vm file
|
|||
================
|
||||
*/
|
||||
#include "../namespace_begin.h"
|
||||
#ifdef __linux__
|
||||
extern "C" {
|
||||
#endif
|
||||
int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11 ) {
|
||||
switch ( command ) {
|
||||
case GAME_INIT:
|
||||
|
@ -694,9 +691,6 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a
|
|||
|
||||
return -1;
|
||||
}
|
||||
#ifdef __linux__
|
||||
}
|
||||
#endif
|
||||
#include "../namespace_end.h"
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#define G_PUBLIC_H
|
||||
|
||||
#include "../game/bg_vehicles.h"
|
||||
|
||||
#define Q3_INFINITE 16777216
|
||||
|
||||
#define GAME_API_VERSION 8
|
||||
|
@ -672,8 +674,6 @@ typedef struct
|
|||
|
||||
#define MAX_FAILED_NODES 8
|
||||
|
||||
typedef struct Vehicle_s Vehicle_t;
|
||||
|
||||
// the server looks at a sharedEntity, which is the start of the game's gentity_t structure
|
||||
//mod authors should not touch this struct
|
||||
typedef struct {
|
||||
|
|
|
@ -8,15 +8,9 @@
|
|||
static int (QDECL *syscall)( int arg, ... ) = (int (QDECL *)( int, ...))-1;
|
||||
|
||||
#include "../namespace_begin.h"
|
||||
#ifdef __linux__
|
||||
extern "C" {
|
||||
#endif
|
||||
void dllEntry( int (QDECL *syscallptr)( int arg,... ) ) {
|
||||
syscall = syscallptr;
|
||||
}
|
||||
#ifdef __linux__
|
||||
}
|
||||
#endif
|
||||
|
||||
int PASSFLOAT( float x ) {
|
||||
float floatTemp;
|
||||
|
|
|
@ -802,9 +802,7 @@ int BoxOnPlaneSide2 (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
|||
|
||||
==================
|
||||
*/
|
||||
#if !( (defined __linux__ || __FreeBSD__) && (defined __i386__) && (!defined C_ONLY)) // rb010123
|
||||
|
||||
#if defined __LCC__ || defined C_ONLY || !id386
|
||||
#ifndef _MSC_VER
|
||||
|
||||
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
||||
{
|
||||
|
@ -1103,7 +1101,6 @@ Lerror:
|
|||
}
|
||||
#pragma warning( default: 4035 )
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1473,7 +1470,7 @@ int Q_irand(int value1, int value2)
|
|||
return irand(value1, value2);
|
||||
}
|
||||
|
||||
float powf ( float x, int y )
|
||||
float Q_powf ( float x, int y )
|
||||
{
|
||||
float r = x;
|
||||
for ( y--; y>0; y-- )
|
||||
|
|
|
@ -186,7 +186,6 @@ static ID_INLINE float BigFloat(const float *l) { FloatSwap(l); }
|
|||
#define MAC_STATIC
|
||||
#define __cdecl
|
||||
#define __declspec(x)
|
||||
#define stricmp strcasecmp
|
||||
#define ID_INLINE inline
|
||||
|
||||
#ifdef __ppc__
|
||||
|
@ -262,9 +261,6 @@ static inline float LittleFloat (const float l) { return FloatSwap(&l); }
|
|||
// just waste space and make big arrays static...
|
||||
#ifdef __linux__
|
||||
|
||||
// bk001205 - from Makefile
|
||||
#define stricmp strcasecmp
|
||||
|
||||
#define MAC_STATIC // bk: FIXME
|
||||
#define ID_INLINE inline
|
||||
|
||||
|
@ -304,11 +300,56 @@ inline static float LittleFloat (const float *l) { return FloatSwap(l); }
|
|||
|
||||
#endif
|
||||
|
||||
//======================= OPENBSD DEFINES =================================
|
||||
|
||||
// the mac compiler can't handle >32k of locals, so we
|
||||
// just waste space and make big arrays static...
|
||||
#ifdef __OpenBSD__
|
||||
|
||||
#define MAC_STATIC // bk: FIXME
|
||||
#define ID_INLINE inline
|
||||
|
||||
#ifdef __i386__
|
||||
#define CPUSTRING "openbsd-i386"
|
||||
#elif defined(__amd64__) || defined(__x86_64__)
|
||||
#define CPUSTRING "openbsd-amd64"
|
||||
#elif defined __axp__
|
||||
#define CPUSTRING "openbsd-alpha"
|
||||
#else
|
||||
#define CPUSTRING "openbsd-other"
|
||||
#endif
|
||||
|
||||
#define PATH_SEP '/'
|
||||
|
||||
// bk001205 - try
|
||||
#ifdef Q3_STATIC
|
||||
#define GAME_HARD_LINKED
|
||||
#define CGAME_HARD_LINKED
|
||||
#define UI_HARD_LINKED
|
||||
#define BOTLIB_HARD_LINKED
|
||||
#endif
|
||||
|
||||
#if !idppc
|
||||
inline static short BigShort( short l) { return ShortSwap(l); }
|
||||
#define LittleShort
|
||||
inline static int BigLong(int l) { return LongSwap(l); }
|
||||
#define LittleLong
|
||||
inline static float BigFloat(const float *l) { return FloatSwap(l); }
|
||||
#define LittleFloat
|
||||
#else
|
||||
#define BigShort
|
||||
inline static short LittleShort(short l) { return ShortSwap(l); }
|
||||
#define BigLong
|
||||
inline static int LittleLong (int l) { return LongSwap(l); }
|
||||
#define BigFloat
|
||||
inline static float LittleFloat (const float *l) { return FloatSwap(l); }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//======================= FreeBSD DEFINES =====================
|
||||
#ifdef __FreeBSD__ // rb010123
|
||||
|
||||
#define stricmp strcasecmp
|
||||
|
||||
#define MAC_STATIC
|
||||
#define ID_INLINE inline
|
||||
|
||||
|
@ -1239,7 +1280,7 @@ float Q_rsqrt( float f ); // reciprocal square root
|
|||
signed char ClampChar( int i );
|
||||
signed short ClampShort( int i );
|
||||
|
||||
float powf ( float x, int y );
|
||||
float Q_powf ( float x, int y );
|
||||
|
||||
// this isn't a real cheap function to call!
|
||||
int DirToByte( vec3_t dir );
|
||||
|
@ -1400,7 +1441,7 @@ typedef struct {
|
|||
#define VectorSet5(v,x,y,z,a,b) ((v)[0]=(x), (v)[1]=(y), (v)[2]=(z), (v)[3]=(a), (v)[4]=(b)) //rwwRMG - added
|
||||
#define Vector4Copy(a,b) ((b)[0]=(a)[0],(b)[1]=(a)[1],(b)[2]=(a)[2],(b)[3]=(a)[3])
|
||||
|
||||
#ifdef __linux__
|
||||
#ifdef __GNUC__
|
||||
#define SnapVector(v) {v[0]=((int)(v[0]));v[1]=((int)(v[1]));v[2]=((int)(v[2]));}
|
||||
#else
|
||||
#ifndef __LCC__
|
||||
|
@ -1710,6 +1751,15 @@ char *Q_strlwr( char *s1 );
|
|||
char *Q_strupr( char *s1 );
|
||||
char *Q_strrchr( const char* string, int c );
|
||||
|
||||
// NON-portable (but faster) versions
|
||||
#ifdef _WIN32
|
||||
static inline int Q_strnicmp (const char *s1, const char *s2, int n) { return strnicmp(s1, s2, n); }
|
||||
static inline int Q_strcmpi (const char *s1, const char *s2) { return strcmpi(s1, s2); }
|
||||
#else
|
||||
static inline int Q_strnicmp (const char *s1, const char *s2, int n) { return strncasecmp(s1, s2, n); }
|
||||
static inline int Q_strcmpi (const char *s1, const char *s2) { return strcasecmp(s1, s2); }
|
||||
#endif
|
||||
|
||||
// buffer size safe library replacements
|
||||
void Q_strncpyz( char *dest, const char *src, int destsize );
|
||||
void Q_strcat( char *dest, int size, const char *src );
|
||||
|
|
|
@ -179,7 +179,7 @@ int G2_Add_Bolt(CGhoul2Info *ghlInfo, boltInfo_v &bltlist, surfaceInfo_v &slist,
|
|||
{
|
||||
skel = (mdxaSkel_t *)((byte *)mod_a->mdxa + sizeof(mdxaHeader_t) + offsets->offsets[x]);
|
||||
// if name is the same, we found it
|
||||
if (!stricmp(skel->name, boneName))
|
||||
if (!Q_stricmp(skel->name, boneName))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ int G2_Find_Bone(const model_t *mod, boneInfo_v &blist, const char *boneName)
|
|||
skel = (mdxaSkel_t *)((byte *)mod->mdxa + sizeof(mdxaHeader_t) + offsets->offsets[blist[i].boneNumber]);
|
||||
|
||||
// if name is the same, we found it
|
||||
if (!stricmp(skel->name, boneName))
|
||||
if (!Q_stricmp(skel->name, boneName))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ int G2_Add_Bone (const model_t *mod, boneInfo_v &blist, const char *boneName)
|
|||
{
|
||||
skel = (mdxaSkel_t *)((byte *)mod->mdxa + sizeof(mdxaHeader_t) + offsets->offsets[x]);
|
||||
// if name is the same, we found it
|
||||
if (!stricmp(skel->name, boneName))
|
||||
if (!Q_stricmp(skel->name, boneName))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ int G2_Add_Bone (const model_t *mod, boneInfo_v &blist, const char *boneName)
|
|||
{
|
||||
skel = (mdxaSkel_t *)((byte *)mod->mdxa + sizeof(mdxaHeader_t) + offsets->offsets[blist[i].boneNumber]);
|
||||
// if name is the same, we found it
|
||||
if (!stricmp(skel->name, boneName))
|
||||
if (!Q_stricmp(skel->name, boneName))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
@ -1303,7 +1303,7 @@ int G2_Find_Bone_Rag(CGhoul2Info *ghlInfo, boneInfo_v &blist, const char *boneNa
|
|||
//skel = (mdxaSkel_t *)((byte *)aHeader + sizeof(mdxaHeader_t) + offsets->offsets[blist[i].boneNumber]);
|
||||
|
||||
// if name is the same, we found it
|
||||
if (!stricmp(skel->name, boneName))
|
||||
if (!Q_stricmp(skel->name, boneName))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
@ -1653,11 +1653,11 @@ void G2_SetRagDoll(CGhoul2Info_v &ghoul2V,CRagDollParams *parms)
|
|||
#ifndef DEDICATED
|
||||
switch (parms->RagPhase)
|
||||
{
|
||||
case CRagDollParams::ERagPhase::RP_START_DEATH_ANIM:
|
||||
case CRagDollParams::RP_START_DEATH_ANIM:
|
||||
ghoul2.mFlags|=GHOUL2_RAG_PENDING;
|
||||
return; /// not doing anything with this yet
|
||||
break;
|
||||
case CRagDollParams::ERagPhase::RP_END_DEATH_ANIM:
|
||||
case CRagDollParams::RP_END_DEATH_ANIM:
|
||||
ghoul2.mFlags|=GHOUL2_RAG_PENDING|GHOUL2_RAG_DONE;
|
||||
if (broadsword_waitforshot &&
|
||||
broadsword_waitforshot->integer)
|
||||
|
@ -1676,7 +1676,7 @@ void G2_SetRagDoll(CGhoul2Info_v &ghoul2V,CRagDollParams *parms)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case CRagDollParams::ERagPhase::RP_DEATH_COLLISION:
|
||||
case CRagDollParams::RP_DEATH_COLLISION:
|
||||
if (parms->collisionType)
|
||||
{
|
||||
ghoul2.mFlags|=GHOUL2_RAG_COLLISION_SLIDE;
|
||||
|
@ -1695,7 +1695,7 @@ void G2_SetRagDoll(CGhoul2Info_v &ghoul2V,CRagDollParams *parms)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case CRagDollParams::ERagPhase::RP_CORPSE_SHOT:
|
||||
case CRagDollParams::RP_CORPSE_SHOT:
|
||||
if (broadsword_kickorigin &&
|
||||
broadsword_kickorigin->integer)
|
||||
{
|
||||
|
@ -1730,14 +1730,14 @@ void G2_SetRagDoll(CGhoul2Info_v &ghoul2V,CRagDollParams *parms)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case CRagDollParams::ERagPhase::RP_GET_PELVIS_OFFSET:
|
||||
if (parms->RagPhase==CRagDollParams::ERagPhase::RP_GET_PELVIS_OFFSET)
|
||||
case CRagDollParams::RP_GET_PELVIS_OFFSET:
|
||||
if (parms->RagPhase==CRagDollParams::RP_GET_PELVIS_OFFSET)
|
||||
{
|
||||
VectorClear(parms->pelvisAnglesOffset);
|
||||
VectorClear(parms->pelvisPositionOffset);
|
||||
}
|
||||
// intentional lack of a break
|
||||
case CRagDollParams::ERagPhase::RP_SET_PELVIS_OFFSET:
|
||||
case CRagDollParams::RP_SET_PELVIS_OFFSET:
|
||||
if (index>=0&&index<blist.size())
|
||||
{
|
||||
boneInfo_t &bone=blist[index];
|
||||
|
@ -1745,7 +1745,7 @@ void G2_SetRagDoll(CGhoul2Info_v &ghoul2V,CRagDollParams *parms)
|
|||
{
|
||||
if (bone.flags & BONE_ANGLES_RAGDOLL)
|
||||
{
|
||||
if (parms->RagPhase==CRagDollParams::ERagPhase::RP_GET_PELVIS_OFFSET)
|
||||
if (parms->RagPhase==CRagDollParams::RP_GET_PELVIS_OFFSET)
|
||||
{
|
||||
VectorCopy(bone.anglesOffset,parms->pelvisAnglesOffset);
|
||||
VectorCopy(bone.positionOffset,parms->pelvisPositionOffset);
|
||||
|
@ -1760,7 +1760,7 @@ void G2_SetRagDoll(CGhoul2Info_v &ghoul2V,CRagDollParams *parms)
|
|||
}
|
||||
return;
|
||||
break;
|
||||
case CRagDollParams::ERagPhase::RP_DISABLE_EFFECTORS:
|
||||
case CRagDollParams::RP_DISABLE_EFFECTORS:
|
||||
// not doing anything with this yet
|
||||
return;
|
||||
break;
|
||||
|
|
|
@ -1825,7 +1825,7 @@ int G2_FindConfigStringSpace(char *name, int start, int max)
|
|||
{
|
||||
break;
|
||||
}
|
||||
if ( !stricmp( s, name ) )
|
||||
if ( !Q_stricmp( s, name ) )
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ int G2_IsSurfaceLegal(void *mod, const char *surfaceName, int *flags)
|
|||
|
||||
for ( int i = 0 ; i < mod_m->mdxm->numSurfaces ; i++)
|
||||
{
|
||||
if (!stricmp(surfaceName, surf->name))
|
||||
if (!Q_stricmp(surfaceName, surf->name))
|
||||
{
|
||||
*flags = surf->flags;
|
||||
return i;
|
||||
|
@ -125,7 +125,7 @@ mdxmSurface_t *G2_FindSurface(CGhoul2Info *ghlInfo, surfaceInfo_v &slist, const
|
|||
surfInfo = (mdxmSurfHierarchy_t *)((byte *)surfIndexes + surfIndexes->offsets[surf->thisSurfaceIndex]);
|
||||
|
||||
// are these the droids we're looking for?
|
||||
if (!stricmp (surfInfo->name, surfaceName))
|
||||
if (!Q_stricmp (surfInfo->name, surfaceName))
|
||||
{
|
||||
// yup
|
||||
if (surfIndex)
|
||||
|
@ -251,7 +251,7 @@ int G2_IsSurfaceOff (CGhoul2Info *ghlInfo, surfaceInfo_v &slist, const char *sur
|
|||
|
||||
for ( int i = 0 ; i < mod->mdxm->numSurfaces ; i++)
|
||||
{
|
||||
if (!stricmp(surfaceName, surface->name))
|
||||
if (!Q_stricmp(surfaceName, surface->name))
|
||||
{
|
||||
return surface->flags;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ ICARUS_Instance *ICARUS_Instance::Create( interface_export_t *ie )
|
|||
{
|
||||
ICARUS_Instance *instance = new ICARUS_Instance;
|
||||
instance->m_interface = ie;
|
||||
#ifndef __linux__
|
||||
#ifdef _DEBUG
|
||||
OutputDebugString( "ICARUS Instance successfully created\n" );
|
||||
#endif
|
||||
return instance;
|
||||
|
|
|
@ -480,7 +480,7 @@ int CInterpreter::FindSymbol( const char *name, keywordArray_t *table)
|
|||
|
||||
for (ids = table; (strcmp(ids->m_keyword, "")); ids++)
|
||||
{
|
||||
if (!stricmp(name, ids->m_keyword))
|
||||
if (!Q_stricmp(name, ids->m_keyword))
|
||||
return ids->m_tokenvalue;
|
||||
}
|
||||
|
||||
|
|
|
@ -492,7 +492,7 @@ static int Q3_Evaluate( int p1Type, const char *p1, int p2Type, const char *p2,
|
|||
|
||||
case TK_STRING:
|
||||
case TK_IDENTIFIER:
|
||||
return (int) !stricmp( c1, c2 ); //NOTENOTE: The script uses proper string comparison logic (ex. ( a == a ) == true )
|
||||
return (int) !Q_stricmp( c1, c2 ); //NOTENOTE: The script uses proper string comparison logic (ex. ( a == a ) == true )
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -592,7 +592,7 @@ static int Q3_Evaluate( int p1Type, const char *p1, int p2Type, const char *p2,
|
|||
|
||||
case TK_STRING:
|
||||
case TK_IDENTIFIER:
|
||||
return (int) stricmp( c1, c2 );
|
||||
return (int) Q_stricmp( c1, c2 );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -2278,7 +2278,7 @@ int CSequencer::DestroySequence( CSequence *sequence )
|
|||
{
|
||||
if((*tsi).second == sequence)
|
||||
{
|
||||
tsi = m_taskSequences.erase(tsi);
|
||||
m_taskSequences.erase(tsi++);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2071,7 +2071,7 @@ CToken* CTokenizer::TokenFromName(LPCTSTR name)
|
|||
{
|
||||
while (m_keywords[i].m_tokenvalue != TK_EOF)
|
||||
{
|
||||
if (stricmp(m_keywords[i].m_keyword, name) == 0)
|
||||
if (Q_stricmp(m_keywords[i].m_keyword, name) == 0)
|
||||
{
|
||||
return CUserToken::Create(m_keywords[i].m_tokenvalue, name);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#ifndef __ICARUS__
|
||||
#define __ICARUS__
|
||||
|
||||
extern void *ICARUS_Malloc(int iSize);
|
||||
extern void ICARUS_Free(void *pMem);
|
||||
|
||||
#include "../game/g_public.h"
|
||||
|
||||
#pragma warning( disable : 4786 ) // identifier was truncated
|
||||
|
@ -25,8 +28,4 @@
|
|||
|
||||
#pragma warning( pop ) //restore
|
||||
|
||||
|
||||
extern void *ICARUS_Malloc(int iSize);
|
||||
extern void ICARUS_Free(void *pMem);
|
||||
|
||||
#endif //__ICARUS__
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#define __TASK_MANAGER__
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "sequencer.h"
|
||||
class CSequencer;
|
||||
|
|
|
@ -70,6 +70,11 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <stdint.h>
|
||||
typedef int32_t INT32;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We need memory copying and zeroing functions, plus strncpy().
|
||||
* ANSI and System V implementations declare these in <string.h>.
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
|
||||
#include "small_header.h" // for SAMPLE and IN_OUT
|
||||
|
||||
#ifndef byte
|
||||
typedef unsigned char byte;
|
||||
#endif
|
||||
|
||||
typedef void (*SBT_FUNCTION) (float *sample, short *pcm, int n);
|
||||
typedef void (*XFORM_FUNCTION) (void *pcm, int igr);
|
||||
typedef IN_OUT(*DECODE_FUNCTION) (unsigned char *bs, unsigned char *pcm);
|
||||
|
|
|
@ -151,13 +151,6 @@ decode (standard decoder) reduction_code:
|
|||
#include "mp3struct.h"
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
#ifndef byte
|
||||
typedef unsigned char byte;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
typedef struct id3v1_1 {
|
||||
char id[3];
|
||||
char title[30]; // <file basename>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "../game/q_shared.h"
|
||||
#include "../renderer/tr_local.h"
|
||||
#ifdef __linux__
|
||||
#ifndef _WIN32
|
||||
typedef unsigned int GLenum;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
#include "../client/client.h"
|
||||
|
||||
qboolean gbInsideLoadSound = qfalse; // important to default to this!!!
|
||||
|
||||
qboolean SNDDMA_Init(void)
|
||||
{
|
||||
return qfalse;
|
||||
|
@ -28,6 +26,9 @@ void SNDDMA_Submit(void)
|
|||
{
|
||||
}
|
||||
|
||||
#ifdef DEDICATED
|
||||
qboolean gbInsideLoadSound = qfalse; // important to default to this!!!
|
||||
|
||||
sfxHandle_t S_RegisterSound( const char *name ) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -47,3 +48,4 @@ int SND_FreeOldestSound(void)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -667,7 +667,7 @@ CGPGroup *CGPGroup::FindSubGroup(const char *name)
|
|||
group = mSubGroups;
|
||||
while(group)
|
||||
{
|
||||
if(!stricmp(name, group->GetName()))
|
||||
if(!Q_stricmp(name, group->GetName()))
|
||||
{
|
||||
return(group);
|
||||
}
|
||||
|
|
|
@ -414,15 +414,7 @@ qboolean CROFFSystem::Unload( int id )
|
|||
{ // requested item found in the list, free mem, then remove from list
|
||||
delete ((CROFF *)(*itr).second);
|
||||
|
||||
#ifndef __linux__
|
||||
itr = mROFFList.erase( itr );
|
||||
#else
|
||||
// darn stl differences
|
||||
TROFFList::iterator titr;
|
||||
titr = itr;
|
||||
itr++;
|
||||
mROFFList.erase(titr);
|
||||
#endif
|
||||
mROFFList.erase( itr++ );
|
||||
|
||||
#ifdef _DEBUG
|
||||
Com_Printf( S_COLOR_GREEN"roff unloaded\n" );
|
||||
|
|
|
@ -550,7 +550,7 @@ void CDraw32::DrawLineAANC(long x0, long y0, long x1, long y1, CPixel32 color)
|
|||
// Y-major line; calculate 16-bit fixed-point fractional part of a
|
||||
// pixel that X advances each time Y advances 1 pixel, truncating the
|
||||
// result so that we won't overrun the endpoint along the X axis
|
||||
unsigned short ErrorAdj = unsigned short
|
||||
unsigned short ErrorAdj = (unsigned short)
|
||||
(((unsigned long) DeltaX << 16) / (unsigned long) DeltaY);
|
||||
|
||||
// Draw all pixels other than the first and last
|
||||
|
@ -582,7 +582,7 @@ void CDraw32::DrawLineAANC(long x0, long y0, long x1, long y1, CPixel32 color)
|
|||
// It's an X-major line; calculate 16-bit fixed-point fractional part of a
|
||||
// pixel that Y advances each time X advances 1 pixel, truncating the
|
||||
// result to avoid overrunning the endpoint along the X axis
|
||||
unsigned short ErrorAdj = unsigned short
|
||||
unsigned short ErrorAdj = (unsigned short)
|
||||
(((unsigned long) DeltaY << 16) / (unsigned long) DeltaX);
|
||||
// Draw all pixels other than the first and last
|
||||
while (--DeltaX)
|
||||
|
|
|
@ -36,6 +36,13 @@
|
|||
#define CEILING(a) \
|
||||
((a)==(int)(a) ? (a) : (a)>0 ? 1+(int)(a) : -(1+(int)(-a)))
|
||||
|
||||
#ifndef WIN32
|
||||
typedef struct {
|
||||
int x;
|
||||
int y;
|
||||
} POINT;
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1089,7 +1089,7 @@ int CM_LoadSubBSP(const char *name, qboolean clientload)
|
|||
count = cmg.numSubModels;
|
||||
for(i = 0; i < NumSubBSP; i++)
|
||||
{
|
||||
if (!stricmp(name, SubBSP[i].name))
|
||||
if (!Q_stricmp(name, SubBSP[i].name))
|
||||
{
|
||||
return count;
|
||||
}
|
||||
|
|
|
@ -1027,7 +1027,7 @@ int CM_LoadSubBSP(const char *name, qboolean clientload)
|
|||
count = cmg.numSubModels;
|
||||
for(i = 0; i < NumSubBSP; i++)
|
||||
{
|
||||
if (!stricmp(name, SubBSP[i].name))
|
||||
if (!Q_stricmp(name, SubBSP[i].name))
|
||||
{
|
||||
return count;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ void CCMLandScape::LoadTerrainDef(const char *td)
|
|||
items = classes->GetSubGroups();
|
||||
while(items)
|
||||
{
|
||||
if(!stricmp(items->GetName(), "altitudetexture"))
|
||||
if(!Q_stricmp(items->GetName(), "altitudetexture"))
|
||||
{
|
||||
int height;
|
||||
const char *shaderName;
|
||||
|
@ -84,7 +84,7 @@ void CCMLandScape::LoadTerrainDef(const char *td)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if(!stricmp(items->GetName(), "water"))
|
||||
else if(!Q_stricmp(items->GetName(), "water"))
|
||||
{
|
||||
const char *shaderName;
|
||||
CCMShader *shader;
|
||||
|
|
|
@ -231,10 +231,8 @@ void QDECL Com_OPrintf( const char *fmt, ...)
|
|||
va_start (argptr,fmt);
|
||||
vsprintf (msg,fmt,argptr);
|
||||
va_end (argptr);
|
||||
#ifndef __linux__
|
||||
#ifdef _DEBUG
|
||||
OutputDebugString(msg);
|
||||
#else
|
||||
printf(msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1809,8 +1807,7 @@ void Com_Shutdown (void)
|
|||
*/
|
||||
}
|
||||
|
||||
#if !( defined __linux__ || defined __FreeBSD__ ) // r010123 - include FreeBSD
|
||||
#if ((!id386) && (!defined __i386__)) // rcg010212 - for PPC
|
||||
#if !(defined(_MSVC_VER) && defined(id386))
|
||||
|
||||
void Com_Memcpy (void* dest, const void* src, const size_t count)
|
||||
{
|
||||
|
@ -2121,7 +2118,6 @@ skipClamp:
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // bk001208 - memset/memcpy assembly, Q_acos needed (RC4)
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -1038,7 +1038,7 @@ static bool Sys_FileOutOfDate( LPCSTR psFinalFileName /* dest */, LPCSTR psDataF
|
|||
|
||||
static bool FS_FileCacheable(const char* const filename)
|
||||
{
|
||||
return( strchr(filename, '/') && strnicmp(filename, "ext_data/", 9) );
|
||||
return( strchr(filename, '/') && Q_strnicmp(filename, "ext_data/", 9) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -787,7 +787,7 @@ static int FS_AddFileToList( char *name, char *list[MAX_FOUND_FILES], int nfiles
|
|||
return nfiles;
|
||||
}
|
||||
for ( i = 0 ; i < nfiles ; i++ ) {
|
||||
if ( !stricmp( name, list[i] ) ) {
|
||||
if ( !Q_stricmp( name, list[i] ) ) {
|
||||
return nfiles; // allready in list
|
||||
}
|
||||
}
|
||||
|
@ -898,7 +898,7 @@ static int FS_AddFileToListBuf( char *name, char *listbuf, int bufsize, int nfil
|
|||
|
||||
p = listbuf;
|
||||
while ( *p ) {
|
||||
if ( !stricmp( name, p ) ) {
|
||||
if ( !Q_stricmp( name, p ) ) {
|
||||
return nfiles; // already in list
|
||||
}
|
||||
p += strlen( p ) + 1;
|
||||
|
|
|
@ -563,7 +563,7 @@ fileHandle_t FS_FOpenFileAppend( const char *filename ) {
|
|||
return f;
|
||||
}
|
||||
|
||||
#ifndef __linux__
|
||||
#ifdef _WIN32
|
||||
|
||||
bool Sys_GetFileTime(LPCSTR psFileName, FILETIME &ft)
|
||||
{
|
||||
|
@ -629,7 +629,7 @@ bool Sys_FileOutOfDate( LPCSTR psFinalFileName /* dest */, LPCSTR psDataFileName
|
|||
return false;
|
||||
}
|
||||
|
||||
#endif // !__linux__
|
||||
#endif // _WIN32
|
||||
|
||||
bool FS_FileCacheable(const char* const filename)
|
||||
{
|
||||
|
@ -894,7 +894,7 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF
|
|||
&& Q_stricmp( filename + l - 4, ".dat" ) ) { // for journal files
|
||||
fs_fakeChkSum = random();
|
||||
}
|
||||
#ifndef __linux__
|
||||
#ifdef _WIN32
|
||||
// if running with fs_copyfiles 2, and search path == local, then we need to fail to open
|
||||
// if the time/date stamp != the network version (so it'll loop round again and use the network path,
|
||||
// which comes later in the search order)
|
||||
|
@ -917,7 +917,7 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF
|
|||
dir->path, dir->gamedir );
|
||||
}
|
||||
|
||||
#ifndef __linux__
|
||||
#ifdef _WIN32
|
||||
// if we are getting it from the cdpath, optionally copy it
|
||||
// to the basepath
|
||||
if ( fs_copyfiles->integer && !Q_stricmp( dir->path, fs_cdpath->string ) ) {
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
|
||||
#if defined(_WINDOWS)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined (__linux__)
|
||||
#else
|
||||
typedef const char *LPCTSTR;
|
||||
typedef const char *LPCSTR;
|
||||
typedef unsigned long DWORD;
|
||||
|
|
|
@ -977,7 +977,7 @@ void Sys_Log( const char *file, const void *buffer, int size, bool flush );
|
|||
// any game related timing information should come from event timestamps
|
||||
int Sys_Milliseconds (bool baseTime = false);
|
||||
|
||||
#if __linux__
|
||||
#ifndef _MSVC_VER
|
||||
extern "C" void Sys_SnapVector( float *v );
|
||||
|
||||
#else
|
||||
|
|
|
@ -242,7 +242,7 @@ void CStringEdPackage::SetupNewFileParse( LPCSTR psFileName, SE_BOOL bLoadDebug
|
|||
|
||||
m_strCurrentFileRef_ParseOnly = sString; // eg "OBJECTIVES"
|
||||
m_strLoadingLanguage_ParseOnly = ExtractLanguageFromPath( psFileName );
|
||||
m_bLoadingEnglish_ParseOnly = (!stricmp( m_strLoadingLanguage_ParseOnly.c_str(), "english" )) ? SE_TRUE : SE_FALSE;
|
||||
m_bLoadingEnglish_ParseOnly = (!Q_stricmp( m_strLoadingLanguage_ParseOnly.c_str(), "english" )) ? SE_TRUE : SE_FALSE;
|
||||
m_bLoadDebug = bLoadDebug;
|
||||
}
|
||||
|
||||
|
@ -493,13 +493,13 @@ static char *CopeWithDumbStringData( LPCSTR psSentence, LPCSTR psThisLanguage )
|
|||
// Ok, bollocks to it, this will have to do. Any other languages that come later and have bugs in their text can
|
||||
// get fixed by them typing it in properly in the first place...
|
||||
//
|
||||
if (!stricmp(psThisLanguage,"ENGLISH") ||
|
||||
!stricmp(psThisLanguage,"FRENCH") ||
|
||||
!stricmp(psThisLanguage,"GERMAN") ||
|
||||
!stricmp(psThisLanguage,"ITALIAN") ||
|
||||
!stricmp(psThisLanguage,"SPANISH") ||
|
||||
!stricmp(psThisLanguage,"POLISH") ||
|
||||
!stricmp(psThisLanguage,"RUSSIAN")
|
||||
if (!Q_stricmp(psThisLanguage,"ENGLISH") ||
|
||||
!Q_stricmp(psThisLanguage,"FRENCH") ||
|
||||
!Q_stricmp(psThisLanguage,"GERMAN") ||
|
||||
!Q_stricmp(psThisLanguage,"ITALIAN") ||
|
||||
!Q_stricmp(psThisLanguage,"SPANISH") ||
|
||||
!Q_stricmp(psThisLanguage,"POLISH") ||
|
||||
!Q_stricmp(psThisLanguage,"RUSSIAN")
|
||||
)
|
||||
{
|
||||
char *p;
|
||||
|
@ -690,7 +690,7 @@ LPCSTR CStringEdPackage::ParseLine( LPCSTR psLine )
|
|||
{
|
||||
// if loading a foreign language...
|
||||
//
|
||||
SE_BOOL bSentenceIsEnglish = (!stricmp(sThisLanguage,"english")) ? SE_TRUE: SE_FALSE; // see whether this is the english master or not
|
||||
SE_BOOL bSentenceIsEnglish = (!Q_stricmp(sThisLanguage,"english")) ? SE_TRUE: SE_FALSE; // see whether this is the english master or not
|
||||
|
||||
// this check can be omitted, I'm just being extra careful here...
|
||||
//
|
||||
|
@ -698,7 +698,7 @@ LPCSTR CStringEdPackage::ParseLine( LPCSTR psLine )
|
|||
{
|
||||
// basically this is just checking that an .STE file override is the same language as the .STR...
|
||||
//
|
||||
if (stricmp( m_strLoadingLanguage_ParseOnly.c_str(), sThisLanguage ))
|
||||
if (Q_stricmp( m_strLoadingLanguage_ParseOnly.c_str(), sThisLanguage ))
|
||||
{
|
||||
psErrorMessage = va("Language \"%s\" found when expecting \"%s\"!\n", sThisLanguage, m_strLoadingLanguage_ParseOnly.c_str());
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ void CStringEdPackage::SetString( LPCSTR psLocalReference, LPCSTR psNewString, S
|
|||
{
|
||||
// then this is foreign text (so check for "#same" resolving)...
|
||||
//
|
||||
if (!stricmp(psNewString, sSE_EXPORT_SAME))
|
||||
if (!Q_stricmp(psNewString, sSE_EXPORT_SAME))
|
||||
{
|
||||
Entry.m_strString = m_strCurrentEntryEnglish_ParseOnly; // foreign "#same" is now english
|
||||
if (m_bLoadDebug)
|
||||
|
@ -896,7 +896,7 @@ static LPCSTR SE_GetFoundFile( string &strResult )
|
|||
strResult.erase();
|
||||
}
|
||||
|
||||
// strlwr(sTemp); // just for consistancy and set<> -> set<> erasure checking etc
|
||||
// Q_strlwr(sTemp); // just for consistancy and set<> -> set<> erasure checking etc
|
||||
|
||||
return sTemp;
|
||||
}
|
||||
|
@ -1100,7 +1100,7 @@ int SE_GetNumLanguages(void)
|
|||
|
||||
// if english is available, it should always be first... ( I suppose )
|
||||
//
|
||||
if (!stricmp(psLanguage,"english"))
|
||||
if (!Q_stricmp(psLanguage,"english"))
|
||||
{
|
||||
gvLanguagesAvailable.insert( gvLanguagesAvailable.begin(), psLanguage );
|
||||
}
|
||||
|
@ -1228,7 +1228,7 @@ LPCSTR SE_LoadLanguage( LPCSTR psLanguage, SE_BOOL bLoadDebug /* = SE_TRUE */ )
|
|||
{
|
||||
LPCSTR psThisLang = TheStringPackage.ExtractLanguageFromPath( p );
|
||||
|
||||
if ( !stricmp( psLanguage, psThisLang ) )
|
||||
if ( !Q_stricmp( psLanguage, psThisLang ) )
|
||||
{
|
||||
psErrorMessage = SE_Load( p, bLoadDebug );
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
class timing_c
|
||||
{
|
||||
private:
|
||||
__int64 start;
|
||||
__int64 end;
|
||||
int64_t start;
|
||||
int64_t end;
|
||||
|
||||
int reset;
|
||||
public:
|
||||
|
@ -12,7 +12,8 @@ public:
|
|||
}
|
||||
void Start()
|
||||
{
|
||||
const __int64 *s = &start;
|
||||
#ifdef _MSVC_VER
|
||||
const int64_t *s = &start;
|
||||
__asm
|
||||
{
|
||||
push eax
|
||||
|
@ -28,12 +29,15 @@ public:
|
|||
pop ebx
|
||||
pop eax
|
||||
}
|
||||
#else
|
||||
asm("rdtsc" : "=A"(start));
|
||||
#endif
|
||||
}
|
||||
int End()
|
||||
{
|
||||
const __int64 *e = &end;
|
||||
__int64 time;
|
||||
#ifndef __linux__
|
||||
int64_t time;
|
||||
#ifdef _MSVC_VER
|
||||
const int64_t *e = &end;
|
||||
__asm
|
||||
{
|
||||
push eax
|
||||
|
@ -49,6 +53,8 @@ public:
|
|||
pop ebx
|
||||
pop eax
|
||||
}
|
||||
#else
|
||||
asm("rdtsc" : "=A"(time));
|
||||
#endif
|
||||
time = end - start;
|
||||
if (time < 0)
|
||||
|
|
|
@ -67,7 +67,7 @@ static int asmCallPtr = (int)doAsmCall;
|
|||
#endif // !_WIN32
|
||||
|
||||
|
||||
static int callMask = 0; // bk001213 - init
|
||||
int callMask = 0; // bk001213 - init
|
||||
|
||||
static int instruction, pass, lastConst;
|
||||
static int oc0, oc1, pop0, pop1;
|
||||
|
|
|
@ -87,7 +87,7 @@ typedef struct
|
|||
// (note that I've defined it using '>' internally, so it sorts with higher weights being "less", for distance weight-culling
|
||||
//
|
||||
#ifdef __cplusplus
|
||||
bool operator < (const mdxmWeight_t& _X) const {return (boneWeight>_X.boneWeight);}
|
||||
bool operator < (const mdxmWeight_t& _x) const {return (boneWeight>_x.boneWeight);}
|
||||
#endif
|
||||
}
|
||||
#ifndef __cplusplus
|
||||
|
@ -107,7 +107,7 @@ typedef struct
|
|||
// I'm defining this '<' operator so this struct can be used as an STL <map> key...
|
||||
//
|
||||
#ifdef __cplusplus
|
||||
bool operator < (const mdxaCompBone_t& _X) const {return (memcmp(Comp,_X.Comp,sizeof(Comp))<0);}
|
||||
bool operator < (const mdxaCompBone_t& _x) const {return (memcmp(Comp,_x.Comp,sizeof(Comp))<0);}
|
||||
#endif
|
||||
}
|
||||
#ifndef __cplusplus
|
||||
|
@ -126,7 +126,7 @@ typedef struct
|
|||
// I'm defining this '<' operator so this struct can be used as an STL <map> key...
|
||||
//
|
||||
#ifdef __cplusplus
|
||||
bool operator < (const mdxaCompQuatBone_t& _X) const {return (memcmp(Comp,_X.Comp,sizeof(Comp))<0);}
|
||||
bool operator < (const mdxaCompQuatBone_t& _x) const {return (memcmp(Comp,_x.Comp,sizeof(Comp))<0);}
|
||||
#endif
|
||||
}
|
||||
#ifndef __cplusplus
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "macosx_glimp.h"
|
||||
|
||||
#elif defined( __linux__ )
|
||||
#else
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
|
@ -33,18 +33,6 @@
|
|||
#include <GL/fxmesa.h>
|
||||
#endif
|
||||
|
||||
#elif defined( __FreeBSD__ ) // rb010123
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#if defined(__FX__)
|
||||
#include <GL/fxmesa.h>
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#include <gl.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
|
@ -182,7 +170,7 @@ extern PFNGLGETCOMBINEROUTPUTPARAMETERIVNV qglGetCombinerOutputParameterivNV;
|
|||
extern PFNGLGETFINALCOMBINERINPUTPARAMETERFVNV qglGetFinalCombinerInputParameterfvNV;
|
||||
extern PFNGLGETFINALCOMBINERINPUTPARAMETERIVNV qglGetFinalCombinerInputParameterivNV;
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Pixel Format extension definitions. - AReis
|
||||
/***********************************************************************************************************/
|
||||
|
@ -251,6 +239,7 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
|
|||
extern PFNWGLBINDTEXIMAGEARBPROC qwglBindTexImageARB;
|
||||
extern PFNWGLRELEASETEXIMAGEARBPROC qwglReleaseTexImageARB;
|
||||
extern PFNWGLSETPBUFFERATTRIBARBPROC qwglSetPbufferAttribARB;
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -350,12 +339,7 @@ extern void ( APIENTRY * qglTexSubImage3DEXT) (GLenum, GLint, GLint, GLint, GLin
|
|||
|
||||
//===========================================================================
|
||||
|
||||
// non-windows systems will just redefine qgl* to gl*
|
||||
#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __linux__ ) && !defined( __FreeBSD__ ) // rb010123
|
||||
|
||||
#include "qgl_linked.h"
|
||||
|
||||
#elif defined(MACOS_X)
|
||||
#if defined(MACOS_X)
|
||||
// This includes #ifdefs for optional logging and GL error checking after every GL call as well as #defines to prevent incorrect usage of the non-'qgl' versions of the GL API.
|
||||
#include "macosx_qgl.h"
|
||||
|
||||
|
@ -727,9 +711,7 @@ extern BOOL ( WINAPI * qwglSwapLayerBuffers)(HDC, UINT);
|
|||
|
||||
extern BOOL ( WINAPI * qwglSwapIntervalEXT)( int interval );
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
#if ( (defined __linux__ ) || (defined __FreeBSD__ ) ) // rb010123
|
||||
#elif !defined(MACOS_X)
|
||||
|
||||
//FX Mesa Functions
|
||||
// bk001129 - from cvs1.17 (mkv)
|
||||
|
|
|
@ -1608,7 +1608,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
|
||||
//Die - clean up the whole weather system -rww
|
||||
if (strcmpi(token, "die") == 0)
|
||||
if (Q_strcmpi(token, "die") == 0)
|
||||
{
|
||||
R_ShutdownWorldEffects();
|
||||
return;
|
||||
|
@ -1616,7 +1616,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Clear - Removes All Particle Clouds And Wind Zones
|
||||
//----------------------------------------------------
|
||||
else if (strcmpi(token, "clear") == 0)
|
||||
else if (Q_strcmpi(token, "clear") == 0)
|
||||
{
|
||||
for (int p=0; p<mParticleClouds.size(); p++)
|
||||
{
|
||||
|
@ -1628,14 +1628,14 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Freeze / UnFreeze - Stops All Particle Motion Updates
|
||||
//--------------------------------------------------------
|
||||
else if (strcmpi(token, "freeze") == 0)
|
||||
else if (Q_strcmpi(token, "freeze") == 0)
|
||||
{
|
||||
mFrozen = !mFrozen;
|
||||
}
|
||||
|
||||
// Add a zone
|
||||
//---------------
|
||||
else if (strcmpi(token, "zone") == 0)
|
||||
else if (Q_strcmpi(token, "zone") == 0)
|
||||
{
|
||||
vec3_t mins;
|
||||
vec3_t maxs;
|
||||
|
@ -1647,7 +1647,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Basic Wind
|
||||
//------------
|
||||
else if (strcmpi(token, "wind") == 0)
|
||||
else if (Q_strcmpi(token, "wind") == 0)
|
||||
{
|
||||
if (mWindZones.full())
|
||||
{
|
||||
|
@ -1659,7 +1659,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Constant Wind
|
||||
//---------------
|
||||
else if (strcmpi(token, "constantwind") == 0)
|
||||
else if (Q_strcmpi(token, "constantwind") == 0)
|
||||
{
|
||||
if (mWindZones.full())
|
||||
{
|
||||
|
@ -1677,7 +1677,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Gusting Wind
|
||||
//--------------
|
||||
else if (strcmpi(token, "gustingwind") == 0)
|
||||
else if (Q_strcmpi(token, "gustingwind") == 0)
|
||||
{
|
||||
if (mWindZones.full())
|
||||
{
|
||||
|
@ -1704,7 +1704,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create A Rain Storm
|
||||
//---------------------
|
||||
else if (strcmpi(token, "lightrain") == 0)
|
||||
else if (Q_strcmpi(token, "lightrain") == 0)
|
||||
{
|
||||
if (mParticleClouds.full())
|
||||
{
|
||||
|
@ -1725,7 +1725,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create A Rain Storm
|
||||
//---------------------
|
||||
else if (strcmpi(token, "rain") == 0)
|
||||
else if (Q_strcmpi(token, "rain") == 0)
|
||||
{
|
||||
if (mParticleClouds.full())
|
||||
{
|
||||
|
@ -1746,7 +1746,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create A Rain Storm
|
||||
//---------------------
|
||||
else if (strcmpi(token, "acidrain") == 0)
|
||||
else if (Q_strcmpi(token, "acidrain") == 0)
|
||||
{
|
||||
if (mParticleClouds.full())
|
||||
{
|
||||
|
@ -1774,7 +1774,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create A Rain Storm
|
||||
//---------------------
|
||||
else if (strcmpi(token, "heavyrain") == 0)
|
||||
else if (Q_strcmpi(token, "heavyrain") == 0)
|
||||
{
|
||||
if (mParticleClouds.full())
|
||||
{
|
||||
|
@ -1795,7 +1795,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create A Snow Storm
|
||||
//---------------------
|
||||
else if (strcmpi(token, "snow") == 0)
|
||||
else if (Q_strcmpi(token, "snow") == 0)
|
||||
{
|
||||
if (mParticleClouds.full())
|
||||
{
|
||||
|
@ -1818,7 +1818,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create A Some stuff
|
||||
//---------------------
|
||||
else if (strcmpi(token, "spacedust") == 0)
|
||||
else if (Q_strcmpi(token, "spacedust") == 0)
|
||||
{
|
||||
int count;
|
||||
if (mParticleClouds.full())
|
||||
|
@ -1849,7 +1849,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create A Sand Storm
|
||||
//---------------------
|
||||
else if (strcmpi(token, "sand") == 0)
|
||||
else if (Q_strcmpi(token, "sand") == 0)
|
||||
{
|
||||
if (mParticleClouds.full())
|
||||
{
|
||||
|
@ -1876,7 +1876,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create Blowing Clouds Of Fog
|
||||
//------------------------------
|
||||
else if (strcmpi(token, "fog") == 0)
|
||||
else if (Q_strcmpi(token, "fog") == 0)
|
||||
{
|
||||
if (mParticleClouds.full())
|
||||
{
|
||||
|
@ -1900,7 +1900,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create Heavy Rain Particle Cloud
|
||||
//-----------------------------------
|
||||
else if (strcmpi(token, "heavyrainfog") == 0)
|
||||
else if (Q_strcmpi(token, "heavyrainfog") == 0)
|
||||
{
|
||||
if (mParticleClouds.full())
|
||||
{
|
||||
|
@ -1927,7 +1927,7 @@ void R_WorldEffectCommand(const char *command)
|
|||
|
||||
// Create Blowing Clouds Of Fog
|
||||
//------------------------------
|
||||
else if (strcmpi(token, "light_fog") == 0)
|
||||
else if (Q_strcmpi(token, "light_fog") == 0)
|
||||
{
|
||||
if (mParticleClouds.full())
|
||||
{
|
||||
|
@ -1952,11 +1952,11 @@ void R_WorldEffectCommand(const char *command)
|
|||
nCloud.mRotationChangeNext = 0;
|
||||
}
|
||||
|
||||
else if (strcmpi(token, "outsideshake") == 0)
|
||||
else if (Q_strcmpi(token, "outsideshake") == 0)
|
||||
{
|
||||
mOutside.mOutsideShake = !mOutside.mOutsideShake;
|
||||
}
|
||||
else if (strcmpi(token, "outsidepain") == 0)
|
||||
else if (Q_strcmpi(token, "outsidepain") == 0)
|
||||
{
|
||||
mOutside.mOutsidePain = !mOutside.mOutsidePain;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "../qcommon/exe_headers.h"
|
||||
|
||||
#include "tr_local.h"
|
||||
#include "tr_worldeffects.h"
|
||||
#include "tr_WorldEffects.h"
|
||||
|
||||
// Patches up the loaded map to handle the parameters passed from the UI
|
||||
|
||||
|
|
|
@ -1771,7 +1771,6 @@ static void R_LoadFogs( lump_t *l, lump_t *brushesLump, lump_t *sidesLump, world
|
|||
out->parms.color[0] = 1.0f;
|
||||
out->parms.color[1] = 0.0f;
|
||||
out->parms.color[2] = 0.0f;
|
||||
out->parms.color[3] = 0.0f;
|
||||
out->parms.depthForOpaque = 250.0f;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -590,7 +590,8 @@ static int Thai_ValidTISCode( const byte *psString, int &iThaiBytes )
|
|||
|
||||
// thai codes can be up to 3 bytes long, so see how high we can get...
|
||||
//
|
||||
for (int i=0; i<3; i++)
|
||||
int i;
|
||||
for (i=0; i<3; i++)
|
||||
{
|
||||
CodeToTry.sChars[i] = psString[i];
|
||||
|
||||
|
@ -1669,9 +1670,11 @@ void R_ReloadFonts_f(void)
|
|||
//
|
||||
vector <sstring_t> vstrFonts;
|
||||
|
||||
for (int iFontToFind = 1; iFontToFind < g_iCurrentFontIndex; iFontToFind++)
|
||||
int iFontToFind;
|
||||
for (iFontToFind = 1; iFontToFind < g_iCurrentFontIndex; iFontToFind++)
|
||||
{
|
||||
for (FontIndexMap_t::iterator it = g_mapFontIndexes.begin(); it != g_mapFontIndexes.end(); ++it)
|
||||
FontIndexMap_t::iterator it;
|
||||
for (it = g_mapFontIndexes.begin(); it != g_mapFontIndexes.end(); ++it)
|
||||
{
|
||||
if (iFontToFind == (*it).second)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "../client/client.h" //FIXME!! EVIL - just include the definitions needed
|
||||
|
||||
#ifdef _XBOX
|
||||
#include "../qcommon/miniheap.h"
|
||||
#include "../qcommon/MiniHeap.h"
|
||||
#endif
|
||||
|
||||
#if !defined(TR_LOCAL_H)
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include "glext.h"
|
||||
#endif
|
||||
|
||||
#include "../qcommon/platform.h"
|
||||
|
||||
#pragma warning (push, 3) //go back down to 3 for the stl include
|
||||
#include <map>
|
||||
#pragma warning (pop)
|
||||
|
@ -588,7 +590,7 @@ static void Upload32( unsigned *data,
|
|||
qboolean isLightmap,
|
||||
qboolean allowTC,
|
||||
int *pformat,
|
||||
USHORT *pUploadWidth, USHORT *pUploadHeight, bool bRectangle = false )
|
||||
unsigned short *pUploadWidth, unsigned short *pUploadHeight, bool bRectangle = false )
|
||||
{
|
||||
GLuint uiTarget = GL_TEXTURE_2D;
|
||||
if ( bRectangle )
|
||||
|
@ -794,7 +796,7 @@ static void Upload32_3D( unsigned *data,
|
|||
qboolean isLightmap,
|
||||
qboolean allowTC,
|
||||
int *pformat,
|
||||
USHORT *pUploadWidth, USHORT *pUploadHeight )
|
||||
unsigned short *pUploadWidth, unsigned short *pUploadHeight )
|
||||
{
|
||||
int samples;
|
||||
int i, c;
|
||||
|
@ -1015,15 +1017,8 @@ void R_Images_DeleteLightMaps(void)
|
|||
if (pImage->imgName[0] == '*' && strstr(pImage->imgName,"lightmap")) // loose check, but should be ok
|
||||
{
|
||||
R_Images_DeleteImageContents(pImage);
|
||||
#ifndef __linux__
|
||||
itImage = AllocatedImages.erase(itImage);
|
||||
AllocatedImages.erase(itImage++);
|
||||
bEraseOccured = qtrue;
|
||||
#else
|
||||
// MS & Dinkimware got the map::erase return wrong (it's null)
|
||||
AllocatedImages_t::iterator itTemp = itImage;
|
||||
itImage++;
|
||||
AllocatedImages.erase(itTemp);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1119,14 +1114,8 @@ qboolean RE_RegisterImages_LevelLoadEnd(void)
|
|||
Com_DPrintf (S_COLOR_RED "Dumping image \"%s\"\n",pImage->imgName);
|
||||
|
||||
R_Images_DeleteImageContents(pImage);
|
||||
#ifndef __linux__
|
||||
itImage = AllocatedImages.erase(itImage);
|
||||
AllocatedImages.erase(itImage++);
|
||||
bEraseOccured = qtrue;
|
||||
#else
|
||||
AllocatedImages_t::iterator itTemp = itImage;
|
||||
itImage++;
|
||||
AllocatedImages.erase(itTemp);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2953,9 +2942,6 @@ SKINS
|
|||
============================================================================
|
||||
*/
|
||||
|
||||
static char *CommaParse( char **data_p );
|
||||
//can't be dec'd here since we need it for non-dedicated builds now as well.
|
||||
|
||||
/*
|
||||
===============
|
||||
RE_RegisterSkin
|
||||
|
@ -2966,9 +2952,10 @@ RE_RegisterSkin
|
|||
#endif // !DEDICATED
|
||||
bool gServerSkinHack = false;
|
||||
|
||||
static char *CommaParse( char **data_p );
|
||||
//can't be dec'd here since we need it for non-dedicated builds now as well.
|
||||
|
||||
shader_t *R_FindServerShader( const char *name, const int *lightmapIndex, const byte *styles, qboolean mipRawImage );
|
||||
char *CommaParse( char **data_p );
|
||||
/*
|
||||
===============
|
||||
RE_SplitSkins
|
||||
|
|
|
@ -251,6 +251,7 @@ PFNGLGETCOMBINEROUTPUTPARAMETERIVNV qglGetCombinerOutputParameterivNV = NULL;
|
|||
PFNGLGETFINALCOMBINERINPUTPARAMETERFVNV qglGetFinalCombinerInputParameterfvNV = NULL;
|
||||
PFNGLGETFINALCOMBINERINPUTPARAMETERIVNV qglGetFinalCombinerInputParameterivNV = NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
// Declare Pixel Format function pointers.
|
||||
PFNWGLGETPIXELFORMATATTRIBIVARBPROC qwglGetPixelFormatAttribivARB = NULL;
|
||||
PFNWGLGETPIXELFORMATATTRIBFVARBPROC qwglGetPixelFormatAttribfvARB = NULL;
|
||||
|
@ -267,6 +268,7 @@ PFNWGLQUERYPBUFFERARBPROC qwglQueryPbufferARB = NULL;
|
|||
PFNWGLBINDTEXIMAGEARBPROC qwglBindTexImageARB = NULL;
|
||||
PFNWGLRELEASETEXIMAGEARBPROC qwglReleaseTexImageARB = NULL;
|
||||
PFNWGLSETPBUFFERATTRIBARBPROC qwglSetPbufferAttribARB = NULL;
|
||||
#endif // _WIN32
|
||||
|
||||
// Declare Vertex and Fragment Program function pointers.
|
||||
PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB = NULL;
|
||||
|
@ -327,7 +329,7 @@ void R_Splash()
|
|||
#ifndef _XBOX
|
||||
image_t *pImage;
|
||||
/* const char* s = Cvar_VariableString("se_language");
|
||||
if (stricmp(s,"english"))
|
||||
if (Q_stricmp(s,"english"))
|
||||
{
|
||||
pImage = R_FindImageFile( "menu/splash_eur", qfalse, qfalse, qfalse, GL_CLAMP);
|
||||
}
|
||||
|
@ -864,6 +866,27 @@ void GL_SetDefaultState( void )
|
|||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
R_PrintLongString
|
||||
|
||||
Workaround for VID_Printf's 4096 characters buffer limit.
|
||||
================
|
||||
*/
|
||||
void R_PrintLongString(const char *string) {
|
||||
char buffer[4096];
|
||||
const char *p;
|
||||
int size = strlen(string);
|
||||
|
||||
p = string;
|
||||
while(size > 0)
|
||||
{
|
||||
Q_strncpyz(buffer, p, sizeof (buffer) );
|
||||
Com_Printf( "%s", buffer );
|
||||
p += 4095;
|
||||
size -= 4095;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
|
@ -896,7 +919,9 @@ void GfxInfo_f( void )
|
|||
Com_Printf ("\nGL_VENDOR: %s\n", glConfig.vendor_string );
|
||||
Com_Printf ("GL_RENDERER: %s\n", glConfig.renderer_string );
|
||||
Com_Printf ("GL_VERSION: %s\n", glConfig.version_string );
|
||||
Com_Printf ("GL_EXTENSIONS: %s\n", glConfig.extensions_string );
|
||||
Com_Printf ("GL_EXTENSIONS: " );
|
||||
R_PrintLongString( glConfig.extensions_string );
|
||||
Com_Printf ("\n");
|
||||
Com_Printf ("GL_MAX_TEXTURE_SIZE: %d\n", glConfig.maxTextureSize );
|
||||
Com_Printf ("GL_MAX_ACTIVE_TEXTURES_ARB: %d\n", glConfig.maxActiveTextures );
|
||||
Com_Printf ("\nPIXELFORMAT: color(%d-bits) Z(%d-bit) stencil(%d-bits)\n", glConfig.colorBits, glConfig.depthBits, glConfig.stencilBits );
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue