Overhaul to console structure, a bit
This commit is contained in:
Generated
+48
-73
@@ -6,6 +6,7 @@
|
|||||||
<component name="BackendCodeEditorMiscSettings">
|
<component name="BackendCodeEditorMiscSettings">
|
||||||
<option name="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=SwitchToGoToActionSuggester/@EntryIndexedValue" value="true" type="bool" />
|
<option name="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=SwitchToGoToActionSuggester/@EntryIndexedValue" value="true" type="bool" />
|
||||||
<option name="/Default/Housekeeping/LiveTemplatesHousekeeping/HotspotSessionHintIsShown/@EntryValue" value="true" type="bool" />
|
<option name="/Default/Housekeeping/LiveTemplatesHousekeeping/HotspotSessionHintIsShown/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/Housekeeping/OptionsDialog/SelectedPageId/@EntryValue" value="CppGeneralOptions" type="string" />
|
||||||
</component>
|
</component>
|
||||||
<component name="CMakePresetLoader">{
|
<component name="CMakePresetLoader">{
|
||||||
"useNewFormat": true
|
"useNewFormat": true
|
||||||
@@ -27,85 +28,57 @@
|
|||||||
</configurations>
|
</configurations>
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="f5455ea3-1ba8-4b1e-84ce-0eab50a09cdc" name="Changes" comment="More conversion">
|
<list default="true" id="f5455ea3-1ba8-4b1e-84ce-0eab50a09cdc" name="Changes" comment="Even more conversion, lots of superfluous macro removal">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Misc/fix_externaltex.patch" beforeDir="false" afterPath="$PROJECT_DIR$/Misc/fix_externaltex.patch" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/bgmusic.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/bgmusic.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/bgmusic.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/bgmusic.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/bgmusic.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/bgmusic.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/cd_null.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cd_null.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/cd_null.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cd_null.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/cd_sdl.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cd_sdl.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/cd_sdl.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cd_sdl.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/cdaudio.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cdaudio.hpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/cl_demo.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cl_demo.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/cfgfile.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cfgfile.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/cl_input.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cl_input.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/cl_input.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cl_input.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/cl_main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cl_main.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/cl_main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cl_main.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/cl_parse.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cl_parse.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/cl_parse.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cl_parse.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/client.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/client.hpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/cl_tent.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cl_tent.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/cmd.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cmd.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/cmd.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cmd.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/cmd.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/cmd.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/common.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/common.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/common.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/common.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/common.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/common.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/console.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/console.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/console.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/console.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/console.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/console.hpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/console.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/console.hpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/convar.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/convar.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/convar.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/convar.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/convar.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/convar.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/default_cfg.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/default_cfg.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_draw.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_draw.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_draw.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_draw.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_fog.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_fog.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_fog.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_fog.cpp" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Quake/gl_mesh.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_mesh.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_model.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_model.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_model.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_model.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_model.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_model.hpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_refrag.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_refrag.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_rmain.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_rmain.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_rmain.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_rmain.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_rmisc.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_rmisc.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_rmisc.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_rmisc.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_screen.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_screen.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_screen.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_screen.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_sky.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_sky.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_sky.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_sky.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_texmgr.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_texmgr.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_texmgr.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_texmgr.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_vidsdl.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_vidsdl.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/gl_vidsdl.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_vidsdl.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/gl_warp.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/gl_warp.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/glquake.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/glquake.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/host.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/host.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/host.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/host.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/host_cmd.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/host_cmd.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/host_cmd.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/host_cmd.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/image.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/image.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/image.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/image.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/image.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/image.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/in_sdl.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/in_sdl.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/in_sdl.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/in_sdl.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/input.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/input.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/keys.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/keys.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/keys.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/keys.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/keys.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/keys.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/main_sdl.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/main_sdl.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/menu.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/menu.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/menu.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/menu.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/menu.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/menu.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_bsd.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_bsd.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_defs.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_defs.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_dgrm.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_dgrm.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/net_dgrm.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_dgrm.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_dgrm.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_dgrm.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_loop.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_loop.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/net_loop.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_loop.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_loop.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_loop.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_main.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/net_main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_main.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_udp.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_udp.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/net_udp.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_udp.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_udp.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_udp.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_wins.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_wins.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/net_wins.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_wins.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_wins.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_wins.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_wipx.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_wipx.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/net_wipx.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_wipx.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/net_wipx.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/net_wipx.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/pr_cmds.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/pr_cmds.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/pr_cmds.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/pr_cmds.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/pr_edict.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/pr_edict.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/pr_edict.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/pr_edict.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/pr_exec.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/pr_exec.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/pr_exec.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/pr_exec.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/progs.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/progs.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/protocol.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/protocol.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/q_sound.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/q_sound.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/q_stdinc.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/q_stdinc.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/quakedef.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/quakedef.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/r_alias.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/r_alias.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/r_alias.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/r_alias.cpp" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Quake/r_brush.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/r_brush.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/r_part.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/r_part.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/r_part.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/r_part.cpp" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Quake/r_sprite.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/r_sprite.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/r_world.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/r_world.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/r_world.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/r_world.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/render.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/render.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/sbar.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/sbar.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/screen.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/screen.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/server.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/server.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/snd_codec.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_codec.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/snd_codec.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_codec.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/snd_codec.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_codec.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/snd_codeci.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_codeci.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/snd_dma.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_dma.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/snd_dma.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_dma.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/snd_flac.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_flac.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/snd_flac.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_flac.cpp" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Quake/snd_mem.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_mem.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/snd_mikmod.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_mikmod.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/snd_mikmod.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_mikmod.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/snd_mix.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_mix.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/snd_mix.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_mix.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/snd_modplug.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_modplug.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/snd_modplug.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/snd_modplug.cpp" afterDir="false" />
|
||||||
@@ -122,14 +95,10 @@
|
|||||||
<change beforePath="$PROJECT_DIR$/Quake/sv_move.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/sv_move.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/sv_move.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/sv_move.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/sv_phys.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/sv_phys.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/sv_phys.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/sv_phys.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/sv_user.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/sv_user.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/sv_user.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/sv_user.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/sys_sdl_unix.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/sys_sdl_unix.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/sys_sdl_win.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/sys_sdl_win.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/vid.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/vid.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/view.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/view.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/view.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/view.cpp" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Quake/wad.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/wad.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/world.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/world.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/world.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/world.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/world.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/world.hpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/zone.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/zone.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Quake/zone.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/zone.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Quake/zone.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/Quake/zone.hpp" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -138,6 +107,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ClangdSettings">
|
<component name="ClangdSettings">
|
||||||
<option name="formatViaClangd" value="false" />
|
<option name="formatViaClangd" value="false" />
|
||||||
|
<option name="clangWarnings" value="-Wno-invalid-static-assert-message,-Wno-unused-variable,-Wno-infinite-recursion,-Wno-array-bounds,-Wno-return-stack-address,-Werror=implicit-function-declaration,-Wshadow,-Wno-shadow-field-in-constructor-modified,-Wno-shadow-ivar,-Wuninitialized,-Wunused-label,-Wunused-lambda-capture" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
|
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
|
||||||
<component name="Git.Settings">
|
<component name="Git.Settings">
|
||||||
@@ -145,6 +115,10 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="HighlightingSettingsPerFile">
|
<component name="HighlightingSettingsPerFile">
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="mock:///home/iikorni/Downloads/quakespasm-0.96.3/Quake/console.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="mock:///home/iikorni/Downloads/quakespasm-0.96.3/Quake/host.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="mock:///home/iikorni/Downloads/quakespasm-0.96.3/Quake/keys.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="mock:///home/iikorni/Downloads/quakespasm-0.96.3/Quake/menu.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
</component>
|
</component>
|
||||||
<component name="MacroExpansionManager">
|
<component name="MacroExpansionManager">
|
||||||
<option name="directoryName" value="5yRIaLtN" />
|
<option name="directoryName" value="5yRIaLtN" />
|
||||||
@@ -164,32 +138,33 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"CMake Application.quakespasm.executor": "Run",
|
"CMake Application.quakespasm.executor": "Run",
|
||||||
"CidrDebugProfileConversion": "true",
|
"CidrDebugProfileConversion": "true",
|
||||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||||
"RunOnceActivity.RadMigrateCodeStyle": "true",
|
"RunOnceActivity.RadMigrateCodeStyle": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
"RunOnceActivity.readMode.enableVisualFormatting": "true",
|
"RunOnceActivity.readMode.enableVisualFormatting": "true",
|
||||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"cf.first.check.clang-format": "false",
|
"cf.first.check.clang-format": "false",
|
||||||
"cidr.known.project.marker": "true",
|
"cidr.known.project.marker": "true",
|
||||||
"codeWithMe.voiceChat.enabledByDefault": "false",
|
"codeWithMe.voiceChat.enabledByDefault": "false",
|
||||||
"git-widget-placeholder": "master",
|
"git-widget-placeholder": "master",
|
||||||
"last_opened_file_path": "/home/iikorni/Downloads/quakespasm-0.96.3/cmake-build-debug/id1",
|
"last_opened_file_path": "/home/iikorni/Downloads/quakespasm-0.96.3/cmake-build-debug/id1",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.jshint": "true",
|
"node.js.detected.package.jshint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.jshint": "",
|
"node.js.selected.package.jshint": "",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm"
|
"nodejs_package_manager_path": "npm",
|
||||||
|
"settings.editor.selected.configurable": "language.cpp.clang-tidy"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="CopyFile.RECENT_KEYS">
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
<recent name="$PROJECT_DIR$/cmake-build-debug/id1" />
|
<recent name="$PROJECT_DIR$/cmake-build-debug/id1" />
|
||||||
@@ -199,11 +174,6 @@
|
|||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager">
|
<component name="RunManager">
|
||||||
<configuration default="true" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true">
|
|
||||||
<method v="2">
|
|
||||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
<configuration name="quakespasm" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="quakespasm" TARGET_NAME="quakespasm" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="quakespasm" RUN_TARGET_NAME="quakespasm">
|
<configuration name="quakespasm" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="quakespasm" TARGET_NAME="quakespasm" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="quakespasm" RUN_TARGET_NAME="quakespasm">
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||||
@@ -255,6 +225,11 @@
|
|||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="Begin converting QS engine to CPP" />
|
<MESSAGE value="Begin converting QS engine to CPP" />
|
||||||
<MESSAGE value="More conversion" />
|
<MESSAGE value="More conversion" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="More conversion" />
|
<MESSAGE value="Even more conversion, lots of superfluous macro removal" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="Even more conversion, lots of superfluous macro removal" />
|
||||||
|
</component>
|
||||||
|
<component name="XSLT-Support.FileAssociations.UIState">
|
||||||
|
<expand />
|
||||||
|
<select />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -21,7 +21,7 @@ index 239d361..80948f1 100644
|
|||||||
+ if (strstr(tx->name,"sky4")) {
|
+ if (strstr(tx->name,"sky4")) {
|
||||||
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==13039)
|
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==13039)
|
||||||
+ q_strlcpy(tx->name, "sky1", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "sky1", sizeof(tx->name));
|
||||||
+ Con_Printf(" using %s\n", tx->name);
|
+ console::info(" using %s\n", tx->name);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
if (loadmodel->bspversion == BSPVERSION_QUAKE64)
|
if (loadmodel->bspversion == BSPVERSION_QUAKE64)
|
||||||
@@ -38,40 +38,40 @@ index 239d361..80948f1 100644
|
|||||||
+ q_strlcpy(tx->name, "plat_top1_cable", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "plat_top1_cable", sizeof(tx->name));
|
||||||
+ else
|
+ else
|
||||||
+ q_strlcpy(tx->name, "plat_top1_bolt", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "plat_top1_bolt", sizeof(tx->name));
|
||||||
+ Con_Printf(" using %s\n", tx->name);
|
+ console::info(" using %s\n", tx->name);
|
||||||
+ }
|
+ }
|
||||||
+ if (strstr(tx->name,"metal5_2")) {
|
+ if (strstr(tx->name,"metal5_2")) {
|
||||||
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==49173)
|
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==49173)
|
||||||
+ q_strlcpy(tx->name, "metal5_2_x", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "metal5_2_x", sizeof(tx->name));
|
||||||
+ else
|
+ else
|
||||||
+ q_strlcpy(tx->name, "metal5_2_arc", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "metal5_2_arc", sizeof(tx->name));
|
||||||
+ Con_Printf(" using %s\n", tx->name);
|
+ console::info(" using %s\n", tx->name);
|
||||||
+ }
|
+ }
|
||||||
+ if (strstr(tx->name,"metal5_4")) {
|
+ if (strstr(tx->name,"metal5_4")) {
|
||||||
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==20977)
|
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==20977)
|
||||||
+ q_strlcpy(tx->name, "metal5_4_double", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "metal5_4_double", sizeof(tx->name));
|
||||||
+ else
|
+ else
|
||||||
+ q_strlcpy(tx->name, "metal5_4_arc", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "metal5_4_arc", sizeof(tx->name));
|
||||||
+ Con_Printf(" using %s\n", tx->name);
|
+ console::info(" using %s\n", tx->name);
|
||||||
+ }
|
+ }
|
||||||
+ if (strstr(tx->name,"metal5_8")) {
|
+ if (strstr(tx->name,"metal5_8")) {
|
||||||
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==48444)
|
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==48444)
|
||||||
+ q_strlcpy(tx->name, "metal5_8_rune", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "metal5_8_rune", sizeof(tx->name));
|
||||||
+ else
|
+ else
|
||||||
+ q_strlcpy(tx->name, "metal5_8_back", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "metal5_8_back", sizeof(tx->name));
|
||||||
+ Con_Printf(" using %s\n", tx->name);
|
+ console::info(" using %s\n", tx->name);
|
||||||
+ }
|
+ }
|
||||||
+ if (strstr(tx->name,"metal5_8")) {
|
+ if (strstr(tx->name,"metal5_8")) {
|
||||||
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==48444)
|
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==48444)
|
||||||
+ q_strlcpy(tx->name, "metal5_8_rune", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "metal5_8_rune", sizeof(tx->name));
|
||||||
+ else
|
+ else
|
||||||
+ q_strlcpy(tx->name, "metal5_8_back", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "metal5_8_back", sizeof(tx->name));
|
||||||
+ Con_Printf(" using %s\n", tx->name);
|
+ console::info(" using %s\n", tx->name);
|
||||||
+ }
|
+ }
|
||||||
+ if (strstr(tx->name,"window03")) {
|
+ if (strstr(tx->name,"window03")) {
|
||||||
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==63697) // e4m2 variant
|
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==63697) // e4m2 variant
|
||||||
+ q_strlcpy(tx->name, "window03_e4m2", sizeof(tx->name));
|
+ q_strlcpy(tx->name, "window03_e4m2", sizeof(tx->name));
|
||||||
+ Con_Printf(" using %s\n", tx->name);
|
+ console::info(" using %s\n", tx->name);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
+13
-13
@@ -109,7 +109,7 @@ namespace music {
|
|||||||
if (command::argc() == 2) {
|
if (command::argc() == 2) {
|
||||||
play(*command::argv(1));
|
play(*command::argv(1));
|
||||||
} else {
|
} else {
|
||||||
Con_Printf("music <musicfile>\n");
|
console::info("music <musicfile>\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,9 +136,9 @@ namespace music {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bgmloop)
|
if (bgmloop)
|
||||||
Con_Printf("Music will be looped\n");
|
console::info("Music will be looped\n");
|
||||||
else
|
else
|
||||||
Con_Printf("Music will not be looped\n");
|
console::info("Music will not be looped\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void _stop() {
|
void _stop() {
|
||||||
@@ -147,7 +147,7 @@ namespace music {
|
|||||||
|
|
||||||
void _jump() {
|
void _jump() {
|
||||||
if (command::argc() != 2) {
|
if (command::argc() != 2) {
|
||||||
Con_Printf("music_jump <ordernum>\n");
|
console::info("music_jump <ordernum>\n");
|
||||||
} else if (bgmstream) {
|
} else if (bgmstream) {
|
||||||
S_CodecJumpToOrder(bgmstream, static_cast<int>(std::strtol(command::argv(1)->c_str(), nullptr, 10)));
|
S_CodecJumpToOrder(bgmstream, static_cast<int>(std::strtol(command::argv(1)->c_str(), nullptr, 10)));
|
||||||
}
|
}
|
||||||
@@ -180,7 +180,7 @@ namespace music {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("Couldn't handle music file %s\n", filename.c_str());
|
console::info("Couldn't handle music file %s\n", filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_stream() {
|
void update_stream() {
|
||||||
@@ -239,14 +239,14 @@ namespace music {
|
|||||||
{
|
{
|
||||||
if (bgmloop) {
|
if (bgmloop) {
|
||||||
if (did_rewind) {
|
if (did_rewind) {
|
||||||
Con_Printf("Stream keeps returning EOF.\n");
|
console::info("Stream keeps returning EOF.\n");
|
||||||
stop();
|
stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = S_CodecRewindStream(bgmstream);
|
res = S_CodecRewindStream(bgmstream);
|
||||||
if (res != 0) {
|
if (res != 0) {
|
||||||
Con_Printf("Stream seek error (%i), stopping.\n", res);
|
console::info("Stream seek error (%i), stopping.\n", res);
|
||||||
stop();
|
stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,7 @@ namespace music {
|
|||||||
}
|
}
|
||||||
} else /* res < 0: some read error */
|
} else /* res < 0: some read error */
|
||||||
{
|
{
|
||||||
Con_Printf("Stream read error (%i), stopping.\n", res);
|
console::info("Stream read error (%i), stopping.\n", res);
|
||||||
stop();
|
stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -312,7 +312,7 @@ namespace music {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (filename.empty()) {
|
if (filename.empty()) {
|
||||||
Con_DPrintf("null music file name\n");
|
console::debug("null music file name\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ namespace music {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chosen == nullptr) {
|
if (chosen == nullptr) {
|
||||||
Con_Printf("Unhandled extension for %s\n", filename.c_str());
|
console::info("Unhandled extension for %s\n", filename.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
q_snprintf(tmp, sizeof(tmp), "%s/%s", chosen->dir, filename.c_str());
|
q_snprintf(tmp, sizeof(tmp), "%s/%s", chosen->dir, filename.c_str());
|
||||||
@@ -350,7 +350,7 @@ namespace music {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("Couldn't handle music file %s\n", filename.c_str());
|
console::info("Couldn't handle music file %s\n", filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void stop() {
|
void stop() {
|
||||||
@@ -433,13 +433,13 @@ namespace music {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ext == nullptr)
|
if (ext == nullptr)
|
||||||
Con_Printf("Couldn't find a cdrip for track %d\n", static_cast<int>(track));
|
console::info("Couldn't find a cdrip for track %d\n", static_cast<int>(track));
|
||||||
else {
|
else {
|
||||||
q_snprintf(tmp, sizeof(tmp), "%s/track%02d.%s",
|
q_snprintf(tmp, sizeof(tmp), "%s/track%02d.%s",
|
||||||
MUSIC_DIRNAME, static_cast<int>(track), ext);
|
MUSIC_DIRNAME, static_cast<int>(track), ext);
|
||||||
bgmstream = S_CodecOpenStreamType(tmp, type, bgmloop);
|
bgmstream = S_CodecOpenStreamType(tmp, type, bgmloop);
|
||||||
if (!bgmstream)
|
if (!bgmstream)
|
||||||
Con_Printf("Couldn't handle music file %s\n", tmp);
|
console::info("Couldn't handle music file %s\n", tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ void CDAudio_Update(void)
|
|||||||
|
|
||||||
int CDAudio_Init(void)
|
int CDAudio_Init(void)
|
||||||
{
|
{
|
||||||
Con_Printf("CDAudio disabled at compile time\n");
|
console::info("CDAudio disabled at compile time\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+27
-27
@@ -66,7 +66,7 @@ static void CDAudio_Eject(void)
|
|||||||
SDL_CDStop(cd_handle); /* see CDAudio_Stop() */
|
SDL_CDStop(cd_handle); /* see CDAudio_Stop() */
|
||||||
#endif
|
#endif
|
||||||
if (SDL_CDEject(cd_handle) < 0)
|
if (SDL_CDEject(cd_handle) < 0)
|
||||||
Con_Printf ("Unable to eject CD-ROM: %s\n", SDL_GetError ());
|
console::info ("Unable to eject CD-ROM: %s\n", SDL_GetError ());
|
||||||
}
|
}
|
||||||
|
|
||||||
static int CDAudio_GetAudioDiskInfo(void)
|
static int CDAudio_GetAudioDiskInfo(void)
|
||||||
@@ -102,13 +102,13 @@ int CDAudio_Play(byte track, bool looping)
|
|||||||
|
|
||||||
if (track < 1 || track > cd_handle->numtracks)
|
if (track < 1 || track > cd_handle->numtracks)
|
||||||
{
|
{
|
||||||
Con_Printf ("CDAudio_Play: Bad track number %d.\n", track);
|
console::info ("CDAudio_Play: Bad track number %d.\n", track);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cd_handle->track[track-1].type == SDL_DATA_TRACK)
|
if (cd_handle->track[track-1].type == SDL_DATA_TRACK)
|
||||||
{
|
{
|
||||||
Con_Printf ("CDAudio_Play: track %d is not audio\n", track);
|
console::info ("CDAudio_Play: track %d is not audio\n", track);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ int CDAudio_Play(byte track, bool looping)
|
|||||||
|
|
||||||
if (SDL_CDPlay(cd_handle, cd_handle->track[track-1].offset, cd_handle->track[track-1].length) < 0)
|
if (SDL_CDPlay(cd_handle, cd_handle->track[track-1].offset, cd_handle->track[track-1].length) < 0)
|
||||||
{
|
{
|
||||||
Con_Printf ("CDAudio_Play: Unable to play track %d: %s\n", track, SDL_GetError ());
|
console::info ("CDAudio_Play: Unable to play track %d: %s\n", track, SDL_GetError ());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,10 +161,10 @@ void CDAudio_Stop(void)
|
|||||||
* Samsung DVD r/w drive running under 2.6.35.6 kernel.
|
* Samsung DVD r/w drive running under 2.6.35.6 kernel.
|
||||||
* Therefore, avoid dead stops if playback may be resumed shortly. */
|
* Therefore, avoid dead stops if playback may be resumed shortly. */
|
||||||
if (SDL_CDPause(cd_handle) < 0)
|
if (SDL_CDPause(cd_handle) < 0)
|
||||||
Con_Printf ("CDAudio_Stop: Unable to stop CD-ROM (%s)\n", SDL_GetError());
|
console::info ("CDAudio_Stop: Unable to stop CD-ROM (%s)\n", SDL_GetError());
|
||||||
#else
|
#else
|
||||||
if (SDL_CDStop(cd_handle) < 0)
|
if (SDL_CDStop(cd_handle) < 0)
|
||||||
Con_Printf ("CDAudio_Stop: Unable to stop CD-ROM (%s)\n", SDL_GetError());
|
console::info ("CDAudio_Stop: Unable to stop CD-ROM (%s)\n", SDL_GetError());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wasPlaying = false;
|
wasPlaying = false;
|
||||||
@@ -182,7 +182,7 @@ void CDAudio_Pause(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (SDL_CDPause(cd_handle) < 0)
|
if (SDL_CDPause(cd_handle) < 0)
|
||||||
Con_Printf ("Unable to pause CD-ROM: %s\n", SDL_GetError());
|
console::info ("Unable to pause CD-ROM: %s\n", SDL_GetError());
|
||||||
|
|
||||||
wasPlaying = playing;
|
wasPlaying = playing;
|
||||||
playing = false;
|
playing = false;
|
||||||
@@ -201,7 +201,7 @@ void CDAudio_Resume(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (SDL_CDResume(cd_handle) < 0)
|
if (SDL_CDResume(cd_handle) < 0)
|
||||||
Con_Printf ("Unable to resume CD-ROM: %s\n", SDL_GetError());
|
console::info ("Unable to resume CD-ROM: %s\n", SDL_GetError());
|
||||||
playing = true;
|
playing = true;
|
||||||
endOfTrack += realtime - pausetime;
|
endOfTrack += realtime - pausetime;
|
||||||
pausetime = -1.0;
|
pausetime = -1.0;
|
||||||
@@ -223,10 +223,10 @@ static void CD_f (void)
|
|||||||
|
|
||||||
if (command::argc() < 2)
|
if (command::argc() < 2)
|
||||||
{
|
{
|
||||||
Con_Printf("commands:");
|
console::info("commands:");
|
||||||
Con_Printf("on, off, reset, remap, \n");
|
console::info("on, off, reset, remap, \n");
|
||||||
Con_Printf("play, stop, loop, pause, resume\n");
|
console::info("play, stop, loop, pause, resume\n");
|
||||||
Con_Printf("eject, info, next, prev\n");
|
console::info("eject, info, next, prev\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ static void CD_f (void)
|
|||||||
{
|
{
|
||||||
for (n = 1; n < 100; n++)
|
for (n = 1; n < 100; n++)
|
||||||
if (remap[n] != n)
|
if (remap[n] != n)
|
||||||
Con_Printf(" %u -> %u\n", n, remap[n]);
|
console::info(" %u -> %u\n", n, remap[n]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (n = 1; n <= ret; n++)
|
for (n = 1; n <= ret; n++)
|
||||||
@@ -277,7 +277,7 @@ static void CD_f (void)
|
|||||||
CDAudio_GetAudioDiskInfo();
|
CDAudio_GetAudioDiskInfo();
|
||||||
if (!cdValid)
|
if (!cdValid)
|
||||||
{
|
{
|
||||||
Con_Printf("No CD in player.\n");
|
console::info("No CD in player.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -329,12 +329,12 @@ static void CD_f (void)
|
|||||||
int current_min, current_sec, current_frame;
|
int current_min, current_sec, current_frame;
|
||||||
int length_min, length_sec, length_frame;
|
int length_min, length_sec, length_frame;
|
||||||
|
|
||||||
Con_Printf ("%u tracks\n", cd_handle->numtracks);
|
console::info ("%u tracks\n", cd_handle->numtracks);
|
||||||
|
|
||||||
if (playing)
|
if (playing)
|
||||||
Con_Printf("Currently %s track %u\n", playLooping ? "looping" : "playing", playTrack);
|
console::info("Currently %s track %u\n", playLooping ? "looping" : "playing", playTrack);
|
||||||
else if (wasPlaying)
|
else if (wasPlaying)
|
||||||
Con_Printf("Paused %s track %u\n", playLooping ? "looping" : "playing", playTrack);
|
console::info("Paused %s track %u\n", playLooping ? "looping" : "playing", playTrack);
|
||||||
|
|
||||||
if (playing || wasPlaying)
|
if (playing || wasPlaying)
|
||||||
{
|
{
|
||||||
@@ -342,11 +342,11 @@ static void CD_f (void)
|
|||||||
FRAMES_TO_MSF(cd_handle->cur_frame, ¤t_min, ¤t_sec, ¤t_frame);
|
FRAMES_TO_MSF(cd_handle->cur_frame, ¤t_min, ¤t_sec, ¤t_frame);
|
||||||
FRAMES_TO_MSF(cd_handle->track[playTrack-1].length, &length_min, &length_sec, &length_frame);
|
FRAMES_TO_MSF(cd_handle->track[playTrack-1].length, &length_min, &length_sec, &length_frame);
|
||||||
|
|
||||||
Con_Printf ("Current position: %d:%02d.%02d (of %d:%02d.%02d)\n",
|
console::info ("Current position: %d:%02d.%02d (of %d:%02d.%02d)\n",
|
||||||
current_min, current_sec, current_frame * 60 / CD_FPS,
|
current_min, current_sec, current_frame * 60 / CD_FPS,
|
||||||
length_min, length_sec, length_frame * 60 / CD_FPS);
|
length_min, length_sec, length_frame * 60 / CD_FPS);
|
||||||
}
|
}
|
||||||
Con_Printf("Volume is %f\n", bgmvolume.value);
|
console::info("Volume is %f\n", bgmvolume.value);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -367,7 +367,7 @@ static void CD_f (void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf ("cd: unknown command \"%s\"\n", command);
|
console::info ("cd: unknown command \"%s\"\n", command);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool CD_GetVolume (void *unused)
|
static bool CD_GetVolume (void *unused)
|
||||||
@@ -504,12 +504,12 @@ int CDAudio_Init(void)
|
|||||||
|
|
||||||
if (SDL_InitSubSystem(SDL_INIT_CDROM) < 0)
|
if (SDL_InitSubSystem(SDL_INIT_CDROM) < 0)
|
||||||
{
|
{
|
||||||
Con_Printf("Couldn't init SDL cdrom: %s\n", SDL_GetError());
|
console::info("Couldn't init SDL cdrom: %s\n", SDL_GetError());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int sdl_num_drives = SDL_CDNumDrives();
|
const int sdl_num_drives = SDL_CDNumDrives();
|
||||||
Con_Printf ("SDL detected %d CD-ROM drive%c\n", sdl_num_drives,
|
console::info ("SDL detected %d CD-ROM drive%c\n", sdl_num_drives,
|
||||||
sdl_num_drives == 1 ? ' ' : 's');
|
sdl_num_drives == 1 ? ' ' : 's');
|
||||||
|
|
||||||
if (sdl_num_drives < 1)
|
if (sdl_num_drives < 1)
|
||||||
@@ -520,7 +520,7 @@ int CDAudio_Init(void)
|
|||||||
const char *userdev = get_cddev_arg(com_argv[dev.value()+1]);
|
const char *userdev = get_cddev_arg(com_argv[dev.value()+1]);
|
||||||
if (!userdev)
|
if (!userdev)
|
||||||
{
|
{
|
||||||
Con_Printf("Invalid argument to -cddev\n");
|
console::info("Invalid argument to -cddev\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (auto i = 0; i < sdl_num_drives; i++)
|
for (auto i = 0; i < sdl_num_drives; i++)
|
||||||
@@ -533,7 +533,7 @@ int CDAudio_Init(void)
|
|||||||
}
|
}
|
||||||
if (cd_dev == -1)
|
if (cd_dev == -1)
|
||||||
{
|
{
|
||||||
Con_Printf("SDL couldn't find cdrom device %s\n", userdev);
|
console::info("SDL couldn't find cdrom device %s\n", userdev);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -544,7 +544,7 @@ int CDAudio_Init(void)
|
|||||||
cd_handle = SDL_CDOpen(cd_dev);
|
cd_handle = SDL_CDOpen(cd_dev);
|
||||||
if (!cd_handle)
|
if (!cd_handle)
|
||||||
{
|
{
|
||||||
Con_Printf ("CDAudio_Init: Unable to open CD-ROM drive %s (%s)\n",
|
console::info ("CDAudio_Init: Unable to open CD-ROM drive %s (%s)\n",
|
||||||
SDL_CDName(cd_dev), SDL_GetError());
|
SDL_CDName(cd_dev), SDL_GetError());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -554,11 +554,11 @@ int CDAudio_Init(void)
|
|||||||
enabled = true;
|
enabled = true;
|
||||||
old_cdvolume = bgmvolume.value;
|
old_cdvolume = bgmvolume.value;
|
||||||
|
|
||||||
Con_Printf("CDAudio initialized (SDL, using %s)\n", SDL_CDName(cd_dev));
|
console::info("CDAudio initialized (SDL, using %s)\n", SDL_CDName(cd_dev));
|
||||||
|
|
||||||
if (CDAudio_GetAudioDiskInfo())
|
if (CDAudio_GetAudioDiskInfo())
|
||||||
{
|
{
|
||||||
Con_Printf("CDAudio_Init: No CD in drive\n");
|
console::info("CDAudio_Init: No CD in drive\n");
|
||||||
cdValid = false;
|
cdValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-17
@@ -174,7 +174,7 @@ int CL_GetMessage (void)
|
|||||||
|
|
||||||
// discard nop keepalive message
|
// discard nop keepalive message
|
||||||
if (net_message.cursize == 1 && net_message.data[0] == svc_nop)
|
if (net_message.cursize == 1 && net_message.data[0] == svc_nop)
|
||||||
Con_Printf ("<-- server to client keepalive\n");
|
console::info ("<-- server to client keepalive\n");
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -208,7 +208,7 @@ void CL_Stop_f (void)
|
|||||||
|
|
||||||
if (!cls.demorecording)
|
if (!cls.demorecording)
|
||||||
{
|
{
|
||||||
Con_Printf ("Not recording a demo.\n");
|
console::info ("Not recording a demo.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ void CL_Stop_f (void)
|
|||||||
fclose (cls.demofile);
|
fclose (cls.demofile);
|
||||||
cls.demofile = NULL;
|
cls.demofile = NULL;
|
||||||
cls.demorecording = false;
|
cls.demorecording = false;
|
||||||
Con_Printf ("Completed demo\n");
|
console::info ("Completed demo\n");
|
||||||
|
|
||||||
// ericw -- update demo tab-completion list
|
// ericw -- update demo tab-completion list
|
||||||
DemoList_Rebuild ();
|
DemoList_Rebuild ();
|
||||||
@@ -245,7 +245,7 @@ void CL_Record_f (void)
|
|||||||
|
|
||||||
if (cls.demoplayback)
|
if (cls.demoplayback)
|
||||||
{
|
{
|
||||||
Con_Printf ("Can't record during demo playback\n");
|
console::info ("Can't record during demo playback\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,25 +255,25 @@ void CL_Record_f (void)
|
|||||||
c = command::argc();
|
c = command::argc();
|
||||||
if (c != 2 && c != 3 && c != 4)
|
if (c != 2 && c != 3 && c != 4)
|
||||||
{
|
{
|
||||||
Con_Printf ("record <demoname> [<map> [cd track]]\n");
|
console::info ("record <demoname> [<map> [cd track]]\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(command::argv(1).value_or("").c_str(), ".."))
|
if (strstr(command::argv(1).value_or("").c_str(), ".."))
|
||||||
{
|
{
|
||||||
Con_Printf ("Relative pathnames are not allowed.\n");
|
console::info ("Relative pathnames are not allowed.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c == 2 && cls.state == ca_connected)
|
if (c == 2 && cls.state == ca_connected)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
Con_Printf("Can not record - already connected to server\nClient demo recording must be started before connecting\n");
|
console::info("Can not record - already connected to server\nClient demo recording must be started before connecting\n");
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
if (cls.signon < 2)
|
if (cls.signon < 2)
|
||||||
{
|
{
|
||||||
Con_Printf("Can't record - try again when connected\n");
|
console::info("Can't record - try again when connected\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -282,7 +282,7 @@ void CL_Record_f (void)
|
|||||||
if (c == 4)
|
if (c == 4)
|
||||||
{
|
{
|
||||||
track = atoi(command::argv(3)->c_str());
|
track = atoi(command::argv(3)->c_str());
|
||||||
Con_Printf ("Forcing CD track to %i\n", cls.forcetrack);
|
console::info ("Forcing CD track to %i\n", cls.forcetrack);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -302,11 +302,11 @@ void CL_Record_f (void)
|
|||||||
// open the demo file
|
// open the demo file
|
||||||
COM_AddExtension (name, ".dem", sizeof(name));
|
COM_AddExtension (name, ".dem", sizeof(name));
|
||||||
|
|
||||||
Con_Printf ("recording to %s.\n", name);
|
console::info ("recording to %s.\n", name);
|
||||||
cls.demofile = fopen (name, "wb");
|
cls.demofile = fopen (name, "wb");
|
||||||
if (!cls.demofile)
|
if (!cls.demofile)
|
||||||
{
|
{
|
||||||
Con_Printf ("ERROR: couldn't create %s\n", name);
|
console::info ("ERROR: couldn't create %s\n", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ void CL_PlayDemo_f (void)
|
|||||||
|
|
||||||
if (command::argc() != 2)
|
if (command::argc() != 2)
|
||||||
{
|
{
|
||||||
Con_Printf ("playdemo <demoname> : plays a demo\n");
|
console::info ("playdemo <demoname> : plays a demo\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,12 +420,12 @@ void CL_PlayDemo_f (void)
|
|||||||
std::strncpy(name, command::argv(1).value_or("").c_str(), sizeof(name));
|
std::strncpy(name, command::argv(1).value_or("").c_str(), sizeof(name));
|
||||||
COM_AddExtension (name, ".dem", sizeof(name));
|
COM_AddExtension (name, ".dem", sizeof(name));
|
||||||
|
|
||||||
Con_Printf ("Playing demo from %s.\n", name);
|
console::info ("Playing demo from %s.\n", name);
|
||||||
|
|
||||||
COM_FOpenFile (name, &cls.demofile, NULL);
|
COM_FOpenFile (name, &cls.demofile, NULL);
|
||||||
if (!cls.demofile)
|
if (!cls.demofile)
|
||||||
{
|
{
|
||||||
Con_Printf ("ERROR: couldn't open %s\n", name);
|
console::info ("ERROR: couldn't open %s\n", name);
|
||||||
cls.demonum = -1; // stop demo loop
|
cls.demonum = -1; // stop demo loop
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -439,7 +439,7 @@ void CL_PlayDemo_f (void)
|
|||||||
fclose (cls.demofile);
|
fclose (cls.demofile);
|
||||||
cls.demofile = NULL;
|
cls.demofile = NULL;
|
||||||
cls.demonum = -1; // stop demo loop
|
cls.demonum = -1; // stop demo loop
|
||||||
Con_Printf ("ERROR: demo \"%s\" is invalid\n", name);
|
console::info ("ERROR: demo \"%s\" is invalid\n", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,7 +469,7 @@ static void CL_FinishTimeDemo (void)
|
|||||||
time = realtime - cls.td_starttime;
|
time = realtime - cls.td_starttime;
|
||||||
if (!time)
|
if (!time)
|
||||||
time = 1;
|
time = 1;
|
||||||
Con_Printf ("%i frames %5.1f seconds %5.1f fps\n", frames, time, frames/time);
|
console::info ("%i frames %5.1f seconds %5.1f fps\n", frames, time, frames/time);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -486,7 +486,7 @@ void CL_TimeDemo_f (void)
|
|||||||
|
|
||||||
if (command::argc() != 2)
|
if (command::argc() != 2)
|
||||||
{
|
{
|
||||||
Con_Printf ("timedemo <demoname> : gets demo speeds\n");
|
console::info ("timedemo <demoname> : gets demo speeds\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -79,7 +79,7 @@ void KeyDown(kbutton_t *b) {
|
|||||||
else if (!b->down[1])
|
else if (!b->down[1])
|
||||||
b->down[1] = k;
|
b->down[1] = k;
|
||||||
else {
|
else {
|
||||||
Con_Printf("Three keys down for a button!\n");
|
console::info("Three keys down for a button!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -388,7 +388,7 @@ void CL_SendMove(const usercmd_t *cmd) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (NET_SendUnreliableMessage(cls.netcon, &buf) == -1) {
|
if (NET_SendUnreliableMessage(cls.netcon, &buf) == -1) {
|
||||||
Con_Printf("CL_SendMove: lost server connection\n");
|
console::info("CL_SendMove: lost server connection\n");
|
||||||
CL_Disconnect();
|
CL_Disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-17
@@ -116,7 +116,7 @@ void CL_Disconnect(void) {
|
|||||||
if (cls.demorecording)
|
if (cls.demorecording)
|
||||||
CL_Stop_f();
|
CL_Stop_f();
|
||||||
|
|
||||||
Con_DPrintf("Sending clc_disconnect\n");
|
console::debug("Sending clc_disconnect\n");
|
||||||
SZ_Clear(&cls.message);
|
SZ_Clear(&cls.message);
|
||||||
MSG_WriteByte(&cls.message, clc_disconnect);
|
MSG_WriteByte(&cls.message, clc_disconnect);
|
||||||
NET_SendUnreliableMessage(cls.netcon, &cls.message);
|
NET_SendUnreliableMessage(cls.netcon, &cls.message);
|
||||||
@@ -160,7 +160,7 @@ void CL_EstablishConnection(const char *host) {
|
|||||||
cls.netcon = NET_Connect(host);
|
cls.netcon = NET_Connect(host);
|
||||||
if (!cls.netcon)
|
if (!cls.netcon)
|
||||||
Host_Error("CL_Connect: connect failed");
|
Host_Error("CL_Connect: connect failed");
|
||||||
Con_DPrintf("CL_EstablishConnection: connected to %s\n", host);
|
console::debug("CL_EstablishConnection: connected to %s\n", host);
|
||||||
|
|
||||||
cls.demonum = -1; // not in the demo loop now
|
cls.demonum = -1; // not in the demo loop now
|
||||||
cls.state = ca_connected;
|
cls.state = ca_connected;
|
||||||
@@ -178,7 +178,7 @@ An svc_signonnum has been received, perform a client side setup
|
|||||||
void CL_SignonReply(void) {
|
void CL_SignonReply(void) {
|
||||||
char str[8192];
|
char str[8192];
|
||||||
|
|
||||||
Con_DPrintf("CL_SignonReply: %i\n", cls.signon);
|
console::debug("CL_SignonReply: %i\n", cls.signon);
|
||||||
|
|
||||||
switch (cls.signon) {
|
switch (cls.signon) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -227,7 +227,7 @@ void CL_NextDemo(void) {
|
|||||||
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) {
|
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) {
|
||||||
cls.demonum = 0;
|
cls.demonum = 0;
|
||||||
if (!cls.demos[cls.demonum][0]) {
|
if (!cls.demos[cls.demonum][0]) {
|
||||||
Con_Printf("No demos listed with startdemos\n");
|
console::info("No demos listed with startdemos\n");
|
||||||
cls.demonum = -1;
|
cls.demonum = -1;
|
||||||
CL_Disconnect();
|
CL_Disconnect();
|
||||||
return;
|
return;
|
||||||
@@ -254,12 +254,12 @@ void CL_PrintEntities_f(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0, ent = cl_entities; i < cl.num_entities; i++, ent++) {
|
for (i = 0, ent = cl_entities; i < cl.num_entities; i++, ent++) {
|
||||||
Con_Printf("%3i:", i);
|
console::info("%3i:", i);
|
||||||
if (!ent->model) {
|
if (!ent->model) {
|
||||||
Con_Printf("EMPTY\n");
|
console::info("EMPTY\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Con_Printf("%s:%2i (%5.1f,%5.1f,%5.1f) [%5.1f %5.1f %5.1f]\n"
|
console::info("%s:%2i (%5.1f,%5.1f,%5.1f) [%5.1f %5.1f %5.1f]\n"
|
||||||
, ent->model->name, ent->frame, ent->origin[0], ent->origin[1], ent->origin[2], ent->angles[0],
|
, ent->model->name, ent->frame, ent->origin[0], ent->origin[1], ent->origin[2], ent->angles[0],
|
||||||
ent->angles[1], ent->angles[2]);
|
ent->angles[1], ent->angles[2]);
|
||||||
}
|
}
|
||||||
@@ -597,7 +597,7 @@ int CL_ReadFromServer(void) {
|
|||||||
} while (ret && cls.state == ca_connected);
|
} while (ret && cls.state == ca_connected);
|
||||||
|
|
||||||
if (cl_shownet.value)
|
if (cl_shownet.value)
|
||||||
Con_Printf("\n");
|
console::info("\n");
|
||||||
|
|
||||||
CL_RelinkEntities();
|
CL_RelinkEntities();
|
||||||
CL_UpdateTEnts();
|
CL_UpdateTEnts();
|
||||||
@@ -606,13 +606,13 @@ int CL_ReadFromServer(void) {
|
|||||||
|
|
||||||
//visedicts
|
//visedicts
|
||||||
if (cl_numvisedicts > 256 && dev_peakstats.visedicts <= 256)
|
if (cl_numvisedicts > 256 && dev_peakstats.visedicts <= 256)
|
||||||
Con_DWarning("%i visedicts exceeds standard limit of 256 (max = %d).\n", cl_numvisedicts, MAX_VISEDICTS);
|
console::dev_warn("%i visedicts exceeds standard limit of 256 (max = %d).\n", cl_numvisedicts, MAX_VISEDICTS);
|
||||||
dev_stats.visedicts = cl_numvisedicts;
|
dev_stats.visedicts = cl_numvisedicts;
|
||||||
dev_peakstats.visedicts = std::max(cl_numvisedicts, dev_peakstats.visedicts);
|
dev_peakstats.visedicts = std::max(cl_numvisedicts, dev_peakstats.visedicts);
|
||||||
|
|
||||||
//temp entities
|
//temp entities
|
||||||
if (num_temp_entities > 64 && dev_peakstats.tempents <= 64)
|
if (num_temp_entities > 64 && dev_peakstats.tempents <= 64)
|
||||||
Con_DWarning("%i tempentities exceeds standard limit of 64 (max = %d).\n", num_temp_entities,
|
console::dev_warn("%i tempentities exceeds standard limit of 64 (max = %d).\n", num_temp_entities,
|
||||||
MAX_TEMP_ENTITIES);
|
MAX_TEMP_ENTITIES);
|
||||||
dev_stats.tempents = num_temp_entities;
|
dev_stats.tempents = num_temp_entities;
|
||||||
dev_peakstats.tempents = std::max(num_temp_entities, dev_peakstats.tempents);
|
dev_peakstats.tempents = std::max(num_temp_entities, dev_peakstats.tempents);
|
||||||
@@ -622,7 +622,7 @@ int CL_ReadFromServer(void) {
|
|||||||
if (b->model && b->endtime >= cl.time)
|
if (b->model && b->endtime >= cl.time)
|
||||||
num_beams++;
|
num_beams++;
|
||||||
if (num_beams > 24 && dev_peakstats.beams <= 24)
|
if (num_beams > 24 && dev_peakstats.beams <= 24)
|
||||||
Con_DWarning("%i beams exceeded standard limit of 24 (max = %d).\n", num_beams, MAX_BEAMS);
|
console::dev_warn("%i beams exceeded standard limit of 24 (max = %d).\n", num_beams, MAX_BEAMS);
|
||||||
dev_stats.beams = num_beams;
|
dev_stats.beams = num_beams;
|
||||||
dev_peakstats.beams = std::max(num_beams, dev_peakstats.beams);
|
dev_peakstats.beams = std::max(num_beams, dev_peakstats.beams);
|
||||||
|
|
||||||
@@ -631,7 +631,7 @@ int CL_ReadFromServer(void) {
|
|||||||
if (l->die >= cl.time && l->radius)
|
if (l->die >= cl.time && l->radius)
|
||||||
num_dlights++;
|
num_dlights++;
|
||||||
if (num_dlights > 32 && dev_peakstats.dlights <= 32)
|
if (num_dlights > 32 && dev_peakstats.dlights <= 32)
|
||||||
Con_DWarning("%i dlights exceeded standard limit of 32 (max = %d).\n", num_dlights, MAX_DLIGHTS);
|
console::dev_warn("%i dlights exceeded standard limit of 32 (max = %d).\n", num_dlights, MAX_DLIGHTS);
|
||||||
dev_stats.dlights = num_dlights;
|
dev_stats.dlights = num_dlights;
|
||||||
dev_peakstats.dlights = std::max(num_dlights, dev_peakstats.dlights);
|
dev_peakstats.dlights = std::max(num_dlights, dev_peakstats.dlights);
|
||||||
|
|
||||||
@@ -675,7 +675,7 @@ void CL_SendCmd(void) {
|
|||||||
return; // no message at all
|
return; // no message at all
|
||||||
|
|
||||||
if (!NET_CanSendMessage(cls.netcon)) {
|
if (!NET_CanSendMessage(cls.netcon)) {
|
||||||
Con_DPrintf("CL_SendCmd: can't send\n");
|
console::debug("CL_SendCmd: can't send\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -702,9 +702,9 @@ void CL_Tracepos_f(void) {
|
|||||||
TraceLine(r_refdef.vieworg, v, w);
|
TraceLine(r_refdef.vieworg, v, w);
|
||||||
|
|
||||||
if (VectorLength(w) == 0)
|
if (VectorLength(w) == 0)
|
||||||
Con_Printf("Tracepos: trace didn't hit anything\n");
|
console::info("Tracepos: trace didn't hit anything\n");
|
||||||
else
|
else
|
||||||
Con_Printf("Tracepos: (%i %i %i)\n", (int) w[0], (int) w[1], (int) w[2]);
|
console::info("Tracepos: (%i %i %i)\n", (int) w[0], (int) w[1], (int) w[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -719,7 +719,7 @@ void CL_Viewpos_f(void) {
|
|||||||
return;
|
return;
|
||||||
#if 0
|
#if 0
|
||||||
//camera position
|
//camera position
|
||||||
Con_Printf("Viewpos: (%i %i %i) %i %i %i\n",
|
console::info("Viewpos: (%i %i %i) %i %i %i\n",
|
||||||
(int) r_refdef.vieworg[0],
|
(int) r_refdef.vieworg[0],
|
||||||
(int) r_refdef.vieworg[1],
|
(int) r_refdef.vieworg[1],
|
||||||
(int) r_refdef.vieworg[2],
|
(int) r_refdef.vieworg[2],
|
||||||
@@ -728,7 +728,7 @@ void CL_Viewpos_f(void) {
|
|||||||
(int) r_refdef.viewangles[ROLL]);
|
(int) r_refdef.viewangles[ROLL]);
|
||||||
#else
|
#else
|
||||||
//player position
|
//player position
|
||||||
Con_Printf("Viewpos: (%i %i %i) %i %i %i\n",
|
console::info("Viewpos: (%i %i %i) %i %i %i\n",
|
||||||
(int) cl_entities[cl.viewentity].origin[0],
|
(int) cl_entities[cl.viewentity].origin[0],
|
||||||
(int) cl_entities[cl.viewentity].origin[1],
|
(int) cl_entities[cl.viewentity].origin[1],
|
||||||
(int) cl_entities[cl.viewentity].origin[2],
|
(int) cl_entities[cl.viewentity].origin[2],
|
||||||
|
|||||||
+26
-26
@@ -260,7 +260,7 @@ void CL_KeepaliveMessage(void) {
|
|||||||
lastmsg = time;
|
lastmsg = time;
|
||||||
|
|
||||||
// write out a nop
|
// write out a nop
|
||||||
Con_Printf("--> client to server keepalive\n");
|
console::info("--> client to server keepalive\n");
|
||||||
|
|
||||||
MSG_WriteByte(&cls.message, clc_nop);
|
MSG_WriteByte(&cls.message, clc_nop);
|
||||||
NET_SendMessage(cls.netcon, &cls.message);
|
NET_SendMessage(cls.netcon, &cls.message);
|
||||||
@@ -279,7 +279,7 @@ void CL_ParseServerInfo(void) {
|
|||||||
char model_precache[MAX_MODELS][MAX_QPATH];
|
char model_precache[MAX_MODELS][MAX_QPATH];
|
||||||
char sound_precache[MAX_SOUNDS][MAX_QPATH];
|
char sound_precache[MAX_SOUNDS][MAX_QPATH];
|
||||||
|
|
||||||
Con_DPrintf("Serverinfo packet received.\n");
|
console::debug("Serverinfo packet received.\n");
|
||||||
|
|
||||||
// ericw -- bring up loading plaque for map changes within a demo.
|
// ericw -- bring up loading plaque for map changes within a demo.
|
||||||
// it will be hidden in CL_SignonReply.
|
// it will be hidden in CL_SignonReply.
|
||||||
@@ -295,7 +295,7 @@ void CL_ParseServerInfo(void) {
|
|||||||
i = MSG_ReadLong();
|
i = MSG_ReadLong();
|
||||||
//johnfitz -- support multiple protocols
|
//johnfitz -- support multiple protocols
|
||||||
if (i != PROTOCOL_NETQUAKE && i != PROTOCOL_FITZQUAKE && i != PROTOCOL_RMQ) {
|
if (i != PROTOCOL_NETQUAKE && i != PROTOCOL_FITZQUAKE && i != PROTOCOL_RMQ) {
|
||||||
Con_Printf("\n"); //because there's no newline after serverinfo print
|
console::info("\n"); //because there's no newline after serverinfo print
|
||||||
Host_Error("Server returned version %i, not %i or %i or %i", i, PROTOCOL_NETQUAKE, PROTOCOL_FITZQUAKE,
|
Host_Error("Server returned version %i, not %i or %i or %i", i, PROTOCOL_NETQUAKE, PROTOCOL_FITZQUAKE,
|
||||||
PROTOCOL_RMQ);
|
PROTOCOL_RMQ);
|
||||||
}
|
}
|
||||||
@@ -310,7 +310,7 @@ void CL_ParseServerInfo(void) {
|
|||||||
cl.protocolflags = (unsigned int) MSG_ReadLong();
|
cl.protocolflags = (unsigned int) MSG_ReadLong();
|
||||||
|
|
||||||
if (0 != (cl.protocolflags & (~supportedflags))) {
|
if (0 != (cl.protocolflags & (~supportedflags))) {
|
||||||
Con_Warning("PROTOCOL_RMQ protocolflags %i contains unsupported flags\n", cl.protocolflags);
|
console::warn("PROTOCOL_RMQ protocolflags %i contains unsupported flags\n", cl.protocolflags);
|
||||||
}
|
}
|
||||||
} else cl.protocolflags = 0;
|
} else cl.protocolflags = 0;
|
||||||
|
|
||||||
@@ -329,11 +329,11 @@ void CL_ParseServerInfo(void) {
|
|||||||
std::strncpy(cl.levelname, str, sizeof(cl.levelname));
|
std::strncpy(cl.levelname, str, sizeof(cl.levelname));
|
||||||
|
|
||||||
// seperate the printfs so the server message can have a color
|
// seperate the printfs so the server message can have a color
|
||||||
Con_Printf("\n%s\n", Con_Quakebar(40)); //johnfitz
|
console::info("\n%s\n", Con_Quakebar(40)); //johnfitz
|
||||||
Con_Printf("%c%s\n", 2, str);
|
console::info("%c%s\n", 2, str);
|
||||||
|
|
||||||
//johnfitz -- tell user which protocol this is
|
//johnfitz -- tell user which protocol this is
|
||||||
Con_Printf("Using protocol %i\n", i);
|
console::info("Using protocol %i\n", i);
|
||||||
|
|
||||||
// first we go through and touch all of the precache data that still
|
// first we go through and touch all of the precache data that still
|
||||||
// happens to be in the cache, so precaching something else doesn't
|
// happens to be in the cache, so precaching something else doesn't
|
||||||
@@ -354,7 +354,7 @@ void CL_ParseServerInfo(void) {
|
|||||||
|
|
||||||
//johnfitz -- check for excessive models
|
//johnfitz -- check for excessive models
|
||||||
if (nummodels >= 256)
|
if (nummodels >= 256)
|
||||||
Con_DWarning("%i models exceeds standard limit of 256 (max = %d).\n", nummodels, MAX_MODELS);
|
console::dev_warn("%i models exceeds standard limit of 256 (max = %d).\n", nummodels, MAX_MODELS);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
// precache sounds
|
// precache sounds
|
||||||
@@ -372,7 +372,7 @@ void CL_ParseServerInfo(void) {
|
|||||||
|
|
||||||
//johnfitz -- check for excessive sounds
|
//johnfitz -- check for excessive sounds
|
||||||
if (numsounds >= 256)
|
if (numsounds >= 256)
|
||||||
Con_DWarning("%i sounds exceeds standard limit of 256 (max = %d).\n", numsounds, MAX_SOUNDS);
|
console::dev_warn("%i sounds exceeds standard limit of 256 (max = %d).\n", numsounds, MAX_SOUNDS);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -578,7 +578,7 @@ void CL_ParseUpdate(int bits) {
|
|||||||
float a, b;
|
float a, b;
|
||||||
|
|
||||||
if (warn_about_nehahra_protocol) {
|
if (warn_about_nehahra_protocol) {
|
||||||
Con_Warning("nonstandard update bit, assuming Nehahra protocol\n");
|
console::warn("nonstandard update bit, assuming Nehahra protocol\n");
|
||||||
warn_about_nehahra_protocol = false;
|
warn_about_nehahra_protocol = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -908,33 +908,33 @@ static void CL_DumpPacket(void) {
|
|||||||
int i, pos;
|
int i, pos;
|
||||||
unsigned char *packet = net_message.data;
|
unsigned char *packet = net_message.data;
|
||||||
|
|
||||||
Con_Printf("CL_DumpPacket, BEGIN:\n");
|
console::info("CL_DumpPacket, BEGIN:\n");
|
||||||
pos = 0;
|
pos = 0;
|
||||||
while (pos < net_message.cursize) {
|
while (pos < net_message.cursize) {
|
||||||
Con_Printf("%5i ", pos);
|
console::info("%5i ", pos);
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
if (pos >= net_message.cursize)
|
if (pos >= net_message.cursize)
|
||||||
Con_Printf(" X ");
|
console::info(" X ");
|
||||||
else Con_Printf("%2x ", packet[pos]);
|
else console::info("%2x ", packet[pos]);
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
pos -= 16;
|
pos -= 16;
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
if (pos >= net_message.cursize)
|
if (pos >= net_message.cursize)
|
||||||
Con_Printf("X");
|
console::info("X");
|
||||||
else if (packet[pos] == 0)
|
else if (packet[pos] == 0)
|
||||||
Con_Printf(".");
|
console::info(".");
|
||||||
else Con_Printf("%c", packet[pos]);
|
else console::info("%c", packet[pos]);
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
Con_Printf("\n");
|
console::info("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("CL_DumpPacket, --- END ---\n");
|
console::info("CL_DumpPacket, --- END ---\n");
|
||||||
}
|
}
|
||||||
#endif /* CL_DumpPacket */
|
#endif /* CL_DumpPacket */
|
||||||
|
|
||||||
#define SHOWNET(x) if(cl_shownet.value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);
|
#define SHOWNET(x) if(cl_shownet.value==2)console::info ("%3i:%s\n", msg_readcount-1, x);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=====================
|
=====================
|
||||||
@@ -951,9 +951,9 @@ void CL_ParseServerMessage(void) {
|
|||||||
// if recording demos, copy the message out
|
// if recording demos, copy the message out
|
||||||
//
|
//
|
||||||
if (cl_shownet.value == 1)
|
if (cl_shownet.value == 1)
|
||||||
Con_Printf("%i ", net_message.cursize);
|
console::info("%i ", net_message.cursize);
|
||||||
else if (cl_shownet.value == 2)
|
else if (cl_shownet.value == 2)
|
||||||
Con_Printf("------------------\n");
|
console::info("------------------\n");
|
||||||
|
|
||||||
// cl.onground = false; // unless the server says otherwise
|
// cl.onground = false; // unless the server says otherwise
|
||||||
|
|
||||||
@@ -995,7 +995,7 @@ void CL_ParseServerMessage(void) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case svc_nop:
|
case svc_nop:
|
||||||
// Con_Printf ("svc_nop\n");
|
// console::info ("svc_nop\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case svc_time:
|
case svc_time:
|
||||||
@@ -1022,7 +1022,7 @@ void CL_ParseServerMessage(void) {
|
|||||||
Host_EndGame("Server disconnected\n");
|
Host_EndGame("Server disconnected\n");
|
||||||
|
|
||||||
case svc_print:
|
case svc_print:
|
||||||
Con_Printf("%s", MSG_ReadString());
|
console::info("%s", MSG_ReadString());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case svc_centerprint:
|
case svc_centerprint:
|
||||||
@@ -1146,7 +1146,7 @@ void CL_ParseServerMessage(void) {
|
|||||||
//johnfitz -- if signonnum==2, signon packet has been fully parsed, so check for excessive static ents and efrags
|
//johnfitz -- if signonnum==2, signon packet has been fully parsed, so check for excessive static ents and efrags
|
||||||
if (i == 2) {
|
if (i == 2) {
|
||||||
if (cl.num_statics > 128)
|
if (cl.num_statics > 128)
|
||||||
Con_DWarning("%i static entities exceeds standard limit of 128 (max = %d).\n", cl.num_statics,
|
console::dev_warn("%i static entities exceeds standard limit of 128 (max = %d).\n", cl.num_statics,
|
||||||
MAX_STATIC_ENTITIES);
|
MAX_STATIC_ENTITIES);
|
||||||
R_CheckEfrags();
|
R_CheckEfrags();
|
||||||
}
|
}
|
||||||
@@ -1248,7 +1248,7 @@ void CL_ParseServerMessage(void) {
|
|||||||
//used by the 2021 rerelease
|
//used by the 2021 rerelease
|
||||||
case svc_achievement:
|
case svc_achievement:
|
||||||
str = MSG_ReadString();
|
str = MSG_ReadString();
|
||||||
Con_DPrintf("Ignoring svc_achievement (%s)\n", str);
|
console::debug("Ignoring svc_achievement (%s)\n", str);
|
||||||
break;
|
break;
|
||||||
case svc_localsound:
|
case svc_localsound:
|
||||||
CL_ParseLocalSound();
|
CL_ParseLocalSound();
|
||||||
|
|||||||
+1
-1
@@ -102,7 +102,7 @@ void CL_ParseBeam (qmodel_t *m)
|
|||||||
//johnfitz -- less spammy overflow message
|
//johnfitz -- less spammy overflow message
|
||||||
if (!dev_overflows.beams || dev_overflows.beams + CONSOLE_RESPAM_TIME < realtime )
|
if (!dev_overflows.beams || dev_overflows.beams + CONSOLE_RESPAM_TIME < realtime )
|
||||||
{
|
{
|
||||||
Con_Printf ("Beam list overflow!\n");
|
console::info ("Beam list overflow!\n");
|
||||||
dev_overflows.beams = realtime;
|
dev_overflows.beams = realtime;
|
||||||
}
|
}
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|||||||
+26
-26
@@ -79,29 +79,29 @@ namespace command {
|
|||||||
if (partial.has_value() && !name.starts_with(partial.value())) {
|
if (partial.has_value() && !name.starts_with(partial.value())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Con_SafePrintf(" %s\n", name.c_str());
|
console::safe_print(" %s\n", name.c_str());
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_SafePrintf("%i commands", count);
|
console::safe_print("%i commands", count);
|
||||||
if (partial) {
|
if (partial) {
|
||||||
Con_SafePrintf(" beginning with \"%s\"", partial->c_str());
|
console::safe_print(" beginning with \"%s\"", partial->c_str());
|
||||||
}
|
}
|
||||||
Con_SafePrintf("\n");
|
console::safe_print("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void _unalias() {
|
void _unalias() {
|
||||||
switch (argc()) {
|
switch (argc()) {
|
||||||
default:
|
default:
|
||||||
case 1:
|
case 1:
|
||||||
Con_Printf("unalias <name> : delete alias\n");
|
console::info("unalias <name> : delete alias\n");
|
||||||
break;
|
break;
|
||||||
case 2: {
|
case 2: {
|
||||||
const auto name = argv(1).value();
|
const auto name = argv(1).value();
|
||||||
if (ALIASES.contains(name)) {
|
if (ALIASES.contains(name)) {
|
||||||
ALIASES.erase(name);
|
ALIASES.erase(name);
|
||||||
} else {
|
} else {
|
||||||
Con_Printf("No alias named %s\n", name.c_str());
|
console::info("No alias named %s\n", name.c_str());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -114,13 +114,13 @@ namespace command {
|
|||||||
//list all aliases
|
//list all aliases
|
||||||
auto count = 0;
|
auto count = 0;
|
||||||
for (auto &[name, alias]: ALIASES) {
|
for (auto &[name, alias]: ALIASES) {
|
||||||
Con_SafePrintf(" %s: %s", name.c_str(), alias.value.c_str());
|
console::safe_print(" %s: %s", name.c_str(), alias.value.c_str());
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
if (count != 0)
|
if (count != 0)
|
||||||
Con_SafePrintf("%i alias command(s)\n", count);
|
console::safe_print("%i alias command(s)\n", count);
|
||||||
else
|
else
|
||||||
Con_SafePrintf("no alias commands found\n");
|
console::safe_print("no alias commands found\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
@@ -128,14 +128,14 @@ namespace command {
|
|||||||
const auto lookup = argv(1).value();
|
const auto lookup = argv(1).value();
|
||||||
for (auto &[name, alias]: ALIASES)
|
for (auto &[name, alias]: ALIASES)
|
||||||
if (name.starts_with(lookup))
|
if (name.starts_with(lookup))
|
||||||
Con_Printf(" %s: %s", name.c_str(), alias.value.c_str());
|
console::info(" %s: %s", name.c_str(), alias.value.c_str());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
//set alias string
|
//set alias string
|
||||||
const auto new_name = argv(1).value();
|
const auto new_name = argv(1).value();
|
||||||
if (new_name.length() >= MAX_ALIAS_LENGTH) {
|
if (new_name.length() >= MAX_ALIAS_LENGTH) {
|
||||||
Con_Printf("Alias name is too long\n");
|
console::info("Alias name is too long\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ namespace command {
|
|||||||
|
|
||||||
void _exec() {
|
void _exec() {
|
||||||
if (argc() != 2) {
|
if (argc() != 2) {
|
||||||
Con_Printf("exec <filename> : execute a script file\n");
|
console::info("exec <filename> : execute a script file\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,10 +225,10 @@ namespace command {
|
|||||||
f = default_cfg; /* see above.. */
|
f = default_cfg; /* see above.. */
|
||||||
}
|
}
|
||||||
if (f == nullptr) {
|
if (f == nullptr) {
|
||||||
Con_Printf("couldn't exec %s\n", argv(1)->c_str());
|
console::info("couldn't exec %s\n", argv(1)->c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Con_Printf("execing %s\n", argv(1)->c_str());
|
console::info("execing %s\n", argv(1)->c_str());
|
||||||
|
|
||||||
buffer::insert_text(f);
|
buffer::insert_text(f);
|
||||||
if (f != default_cfg) {
|
if (f != default_cfg) {
|
||||||
@@ -238,8 +238,8 @@ namespace command {
|
|||||||
|
|
||||||
void _echo() {
|
void _echo() {
|
||||||
for (auto i = 1; i < argc(); i++)
|
for (auto i = 1; i < argc(); i++)
|
||||||
Con_Printf("%s ", argv(i)->c_str());
|
console::info("%s ", argv(i)->c_str());
|
||||||
Con_Printf("\n");
|
console::info("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
char *tint_substring(const char *in, const char *substr, char *out, const size_t outsize) {
|
char *tint_substring(const char *in, const char *substr, char *out, const size_t outsize) {
|
||||||
@@ -266,14 +266,14 @@ namespace command {
|
|||||||
int hits = 0;
|
int hits = 0;
|
||||||
const auto substr = argv(1);
|
const auto substr = argv(1);
|
||||||
if (!substr.has_value()) {
|
if (!substr.has_value()) {
|
||||||
Con_SafePrintf("%s <substring> : search through commands and cvars for the given substring\n",
|
console::safe_print("%s <substring> : search through commands and cvars for the given substring\n",
|
||||||
argv(0).value().c_str());
|
argv(0).value().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (const auto &name: REFS | std::views::keys) {
|
for (const auto &name: REFS | std::views::keys) {
|
||||||
if (q_strcasestr(name.c_str(), substr.value().c_str())) {
|
if (q_strcasestr(name.c_str(), substr.value().c_str())) {
|
||||||
hits++;
|
hits++;
|
||||||
Con_SafePrintf(
|
console::safe_print(
|
||||||
"%s\n", tint_substring(name.c_str(), substr.value().c_str(), tmpbuf, sizeof(tmpbuf)));
|
"%s\n", tint_substring(name.c_str(), substr.value().c_str(), tmpbuf, sizeof(tmpbuf)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -281,13 +281,13 @@ namespace command {
|
|||||||
for (const auto &var: convar::get_variables()) {
|
for (const auto &var: convar::get_variables()) {
|
||||||
if (q_strcasestr(var->name.c_str(), substr.value().c_str())) {
|
if (q_strcasestr(var->name.c_str(), substr.value().c_str())) {
|
||||||
hits++;
|
hits++;
|
||||||
Con_SafePrintf("%s (current value: \"%s\")\n",
|
console::safe_print("%s (current value: \"%s\")\n",
|
||||||
tint_substring(var->name.c_str(), substr.value().c_str(), tmpbuf, sizeof(tmpbuf)),
|
tint_substring(var->name.c_str(), substr.value().c_str(), tmpbuf, sizeof(tmpbuf)),
|
||||||
var->string);
|
var->string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hits)
|
if (!hits)
|
||||||
Con_SafePrintf("no cvars nor commands contain that substring\n");
|
console::safe_print("no cvars nor commands contain that substring\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,14 +325,14 @@ namespace command {
|
|||||||
|
|
||||||
// fail if the command is a variable name
|
// fail if the command is a variable name
|
||||||
if (convar::variable_string(name).has_value()) {
|
if (convar::variable_string(name).has_value()) {
|
||||||
Con_Printf("Cmd_AddCommand: %s already defined as a var\n", name.c_str());
|
console::info("Cmd_AddCommand: %s already defined as a var\n", name.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fail if the command already exists
|
// fail if the command already exists
|
||||||
for (auto &[other_name, func]: std::ranges::views::values(REFS)) {
|
for (auto &[other_name, func]: std::ranges::views::values(REFS)) {
|
||||||
if (name == other_name) {
|
if (name == other_name) {
|
||||||
Con_Printf("Cmd_AddCommand: %s already defined\n", name.c_str());
|
console::info("Cmd_AddCommand: %s already defined\n", name.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -433,12 +433,12 @@ namespace command {
|
|||||||
|
|
||||||
// check cvars
|
// check cvars
|
||||||
if (!Cvar_Command())
|
if (!Cvar_Command())
|
||||||
Con_Printf("Unknown command \"%s\"\n", argv(0).value().c_str());
|
console::info("Unknown command \"%s\"\n", argv(0).value().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void forward_to_server() {
|
void forward_to_server() {
|
||||||
if (cls.state != ca_connected) {
|
if (cls.state != ca_connected) {
|
||||||
Con_Printf("Can't \"%s\", not connected\n", argv(0).value_or("").c_str());
|
console::info("Can't \"%s\", not connected\n", argv(0).value_or("").c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,7 +491,7 @@ namespace command::buffer {
|
|||||||
|
|
||||||
void add_text(const std::string &text) {
|
void add_text(const std::string &text) {
|
||||||
if (_buffer.length() + text.length() >= MAX_BUFFER_SIZE) {
|
if (_buffer.length() + text.length() >= MAX_BUFFER_SIZE) {
|
||||||
Con_Printf("command::buffer::add_text(): overflow\n");
|
console::info("command::buffer::add_text(): overflow\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,7 +500,7 @@ namespace command::buffer {
|
|||||||
|
|
||||||
void insert_text(const std::string &text) {
|
void insert_text(const std::string &text) {
|
||||||
if (_buffer.length() + text.length() >= MAX_BUFFER_SIZE) {
|
if (_buffer.length() + text.length() >= MAX_BUFFER_SIZE) {
|
||||||
Con_Printf("command::buffer::insert_text(): overflow\n");
|
console::info("command::buffer::insert_text(): overflow\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+28
-28
@@ -689,7 +689,7 @@ void *SZ_GetSpace(sizebuf_t *buf, int length) {
|
|||||||
Sys_Error("SZ_GetSpace: %i is > full buffer size", length);
|
Sys_Error("SZ_GetSpace: %i is > full buffer size", length);
|
||||||
|
|
||||||
buf->overflowed = true;
|
buf->overflowed = true;
|
||||||
Con_Printf("SZ_GetSpace: overflow\n");
|
console::info("SZ_GetSpace: overflow\n");
|
||||||
SZ_Clear(buf);
|
SZ_Clear(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1069,7 +1069,7 @@ static void COM_CheckRegistered(void) {
|
|||||||
|
|
||||||
if (h == -1) {
|
if (h == -1) {
|
||||||
convar::set_rom("registered", "0");
|
convar::set_rom("registered", "0");
|
||||||
Con_Printf("Playing shareware version.\n");
|
console::info("Playing shareware version.\n");
|
||||||
if (com_modified)
|
if (com_modified)
|
||||||
Sys_Error("You must have the registered version to use modified games.\n\n"
|
Sys_Error("You must have the registered version to use modified games.\n\n"
|
||||||
"Basedir is: %s\n\n"
|
"Basedir is: %s\n\n"
|
||||||
@@ -1098,7 +1098,7 @@ static void COM_CheckRegistered(void) {
|
|||||||
|
|
||||||
convar::set_rom("cmdline", &com_cmdline[i]);
|
convar::set_rom("cmdline", &com_cmdline[i]);
|
||||||
convar::set_rom("registered", "1");
|
convar::set_rom("registered", "1");
|
||||||
Con_Printf("Playing registered version.\n");
|
console::info("Playing registered version.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1129,7 +1129,7 @@ void COM_InitArgv(int argc, char **argv) {
|
|||||||
if (n > 0 && com_cmdline[n - 1] == ' ')
|
if (n > 0 && com_cmdline[n - 1] == ' ')
|
||||||
com_cmdline[n - 1] = 0; //johnfitz -- kill the trailing space
|
com_cmdline[n - 1] = 0; //johnfitz -- kill the trailing space
|
||||||
|
|
||||||
Con_Printf("Command line: %s\n", com_cmdline);
|
console::info("Command line: %s\n", com_cmdline);
|
||||||
|
|
||||||
for (com_argc = 0; (com_argc < MAX_NUM_ARGVS) && (com_argc < argc); com_argc++) {
|
for (com_argc = 0; (com_argc < MAX_NUM_ARGVS) && (com_argc < argc); com_argc++) {
|
||||||
largv[com_argc] = argv[com_argc];
|
largv[com_argc] = argv[com_argc];
|
||||||
@@ -1226,12 +1226,12 @@ COM_Path_f
|
|||||||
static void COM_Path_f(void) {
|
static void COM_Path_f(void) {
|
||||||
searchpath_t *s;
|
searchpath_t *s;
|
||||||
|
|
||||||
Con_Printf("Current search path:\n");
|
console::info("Current search path:\n");
|
||||||
for (s = com_searchpaths; s; s = s->next) {
|
for (s = com_searchpaths; s; s = s->next) {
|
||||||
if (s->pack) {
|
if (s->pack) {
|
||||||
Con_Printf("%s (%i files)\n", s->pack->filename, s->pack->numfiles);
|
console::info("%s (%i files)\n", s->pack->filename, s->pack->numfiles);
|
||||||
} else
|
} else
|
||||||
Con_Printf("%s\n", s->filename);
|
console::info("%s\n", s->filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1380,8 +1380,8 @@ static int COM_FindFile(const char *filename, int *handle, FILE **file,
|
|||||||
&& strcmp(COM_FileGetExtension(filename), "lit") != 0
|
&& strcmp(COM_FileGetExtension(filename), "lit") != 0
|
||||||
&& strcmp(COM_FileGetExtension(filename), "vis") != 0
|
&& strcmp(COM_FileGetExtension(filename), "vis") != 0
|
||||||
&& strcmp(COM_FileGetExtension(filename), "ent") != 0)
|
&& strcmp(COM_FileGetExtension(filename), "ent") != 0)
|
||||||
Con_DPrintf("FindFile: can't find %s\n", filename);
|
console::debug("FindFile: can't find %s\n", filename);
|
||||||
else Con_DPrintf2("FindFile: can't find %s\n", filename);
|
else console::trace("FindFile: can't find %s\n", filename);
|
||||||
|
|
||||||
if (handle)
|
if (handle)
|
||||||
*handle = -1;
|
*handle = -1;
|
||||||
@@ -1760,22 +1760,22 @@ static void COM_Game_f(void) {
|
|||||||
|
|
||||||
if (!registered.value) //disable shareware quake
|
if (!registered.value) //disable shareware quake
|
||||||
{
|
{
|
||||||
Con_Printf("You must have the registered version to use modified games\n");
|
console::info("You must have the registered version to use modified games\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!*p || !strcmp(p, ".") || strstr(p, "..") || strstr(p, "/") || strstr(p, "\\") || strstr(p, ":")) {
|
if (!*p || !strcmp(p, ".") || strstr(p, "..") || strstr(p, "/") || strstr(p, "\\") || strstr(p, ":")) {
|
||||||
Con_Printf("gamedir should be a single directory name, not a path\n");
|
console::info("gamedir should be a single directory name, not a path\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*p2) {
|
if (*p2) {
|
||||||
if (strcmp(p2, "-hipnotic") && strcmp(p2, "-rogue") && strcmp(p2, "-quoth")) {
|
if (strcmp(p2, "-hipnotic") && strcmp(p2, "-rogue") && strcmp(p2, "-quoth")) {
|
||||||
Con_Printf("invalid mission pack argument to \"game\"\n");
|
console::info("invalid mission pack argument to \"game\"\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!q_strcasecmp(p, GAMENAME)) {
|
if (!q_strcasecmp(p, GAMENAME)) {
|
||||||
Con_Printf("no mission pack arguments to %s game\n", GAMENAME);
|
console::info("no mission pack arguments to %s game\n", GAMENAME);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1783,7 +1783,7 @@ static void COM_Game_f(void) {
|
|||||||
if (Sys_FileType(va("%s/%s", com_basedir, p)) != FS_ENT_DIRECTORY) {
|
if (Sys_FileType(va("%s/%s", com_basedir, p)) != FS_ENT_DIRECTORY) {
|
||||||
if (host_parms->userdir == host_parms->basedir || (
|
if (host_parms->userdir == host_parms->basedir || (
|
||||||
Sys_FileType(va("%s/%s", host_parms->userdir, p)) != FS_ENT_DIRECTORY)) {
|
Sys_FileType(va("%s/%s", host_parms->userdir, p)) != FS_ENT_DIRECTORY)) {
|
||||||
Con_Printf("No such game directory \"%s\"\n", p);
|
console::info("No such game directory \"%s\"\n", p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1797,13 +1797,13 @@ static void COM_Game_f(void) {
|
|||||||
// as '-missionpack', otherwise would be a mess
|
// as '-missionpack', otherwise would be a mess
|
||||||
if (!q_strcasecmp(p, &p2[1]))
|
if (!q_strcasecmp(p, &p2[1]))
|
||||||
goto _same;
|
goto _same;
|
||||||
Con_Printf("reloading game \"%s\" with \"%s\" support\n", p, &p2[1]);
|
console::info("reloading game \"%s\" with \"%s\" support\n", p, &p2[1]);
|
||||||
} else if (!*p2 && com_searchpaths->path_id > 2)
|
} else if (!*p2 && com_searchpaths->path_id > 2)
|
||||||
Con_Printf("reloading game \"%s\" without mission pack support\n", p);
|
console::info("reloading game \"%s\" without mission pack support\n", p);
|
||||||
else goto _same;
|
else goto _same;
|
||||||
} else {
|
} else {
|
||||||
_same:
|
_same:
|
||||||
Con_Printf("\"game\" is already \"%s\"\n", COM_SkipPath(com_gamedir));
|
console::info("\"game\" is already \"%s\"\n", COM_SkipPath(com_gamedir));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1874,13 +1874,13 @@ static void COM_Game_f(void) {
|
|||||||
Host_Resetdemos();
|
Host_Resetdemos();
|
||||||
DemoList_Rebuild();
|
DemoList_Rebuild();
|
||||||
|
|
||||||
Con_Printf("\"game\" changed to \"%s\"\n", COM_SkipPath(com_gamedir));
|
console::info("\"game\" changed to \"%s\"\n", COM_SkipPath(com_gamedir));
|
||||||
|
|
||||||
VID_Lock();
|
VID_Lock();
|
||||||
command::buffer::add_text("exec quake.rc\n");
|
command::buffer::add_text("exec quake.rc\n");
|
||||||
command::buffer::add_text("vid_unlock\n");
|
command::buffer::add_text("vid_unlock\n");
|
||||||
} else //Diplay the current gamedir
|
} else //Diplay the current gamedir
|
||||||
Con_Printf("\"game\" is \"%s\"\n", COM_SkipPath(com_gamedir));
|
console::info("\"game\" is \"%s\"\n", COM_SkipPath(com_gamedir));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2208,7 +2208,7 @@ void LOC_LoadFile(const char *file) {
|
|||||||
if (!file || !*file)
|
if (!file || !*file)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Con_Printf("\nLanguage initialization\n");
|
console::info("\nLanguage initialization\n");
|
||||||
|
|
||||||
memset(&archive, 0, sizeof(archive));
|
memset(&archive, 0, sizeof(archive));
|
||||||
q_snprintf(path, sizeof(path), "%s/%s", com_basedir, file);
|
q_snprintf(path, sizeof(path), "%s/%s", com_basedir, file);
|
||||||
@@ -2249,7 +2249,7 @@ void LOC_LoadFile(const char *file) {
|
|||||||
mz_zip_reader_end(&archive);
|
mz_zip_reader_end(&archive);
|
||||||
if (rw)
|
if (rw)
|
||||||
SDL_RWclose(rw);
|
SDL_RWclose(rw);
|
||||||
Con_Printf("Couldn't load '%s'\nfrom '%s'\n", file, com_basedir);
|
console::info("Couldn't load '%s'\nfrom '%s'\n", file, com_basedir);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SDL_RWread(rw, localization.text, 1, sz);
|
SDL_RWread(rw, localization.text, 1, sz);
|
||||||
@@ -2284,7 +2284,7 @@ void LOC_LoadFile(const char *file) {
|
|||||||
|
|
||||||
if (line[0] == '/') {
|
if (line[0] == '/') {
|
||||||
if (line[1] != '/')
|
if (line[1] != '/')
|
||||||
Con_DPrintf("LOC_LoadFile: malformed comment on line %d\n", lineno);
|
console::debug("LOC_LoadFile: malformed comment on line %d\n", lineno);
|
||||||
} else if (equals) {
|
} else if (equals) {
|
||||||
char *key_end = equals;
|
char *key_end = equals;
|
||||||
bool leading_quote;
|
bool leading_quote;
|
||||||
@@ -2333,7 +2333,7 @@ void LOC_LoadFile(const char *file) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Con_Printf("LOC_LoadFile: unrecognized escape sequence \\%c on line %d\n", c, lineno);
|
console::info("LOC_LoadFile: unrecognized escape sequence \\%c on line %d\n", c, lineno);
|
||||||
*value_dst++ = c;
|
*value_dst++ = c;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2379,7 +2379,7 @@ void LOC_LoadFile(const char *file) {
|
|||||||
|
|
||||||
localization.numindices = localization.numentries * 2; // 50% load factor
|
localization.numindices = localization.numentries * 2; // 50% load factor
|
||||||
if (localization.numindices == 0) {
|
if (localization.numindices == 0) {
|
||||||
Con_Printf("No localized strings in file '%s'\n", file);
|
console::info("No localized strings in file '%s'\n", file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2406,7 +2406,7 @@ void LOC_LoadFile(const char *file) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("Loaded %d strings from '%s'\n", localization.numentries, file);
|
console::info("Loaded %d strings from '%s'\n", localization.numentries, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2538,7 +2538,7 @@ size_t LOC_Format(const char *format, const char * (*getarg_fn)(int idx, void *u
|
|||||||
int numargs = 0;
|
int numargs = 0;
|
||||||
|
|
||||||
if (!len) {
|
if (!len) {
|
||||||
Con_DPrintf("LOC_Format: no output space\n");
|
console::debug("LOC_Format: no output space\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
--len; // reserve space for the terminator
|
--len; // reserve space for the terminator
|
||||||
@@ -2559,7 +2559,7 @@ size_t LOC_Format(const char *format, const char * (*getarg_fn)(int idx, void *u
|
|||||||
insert_len = std::strlen(insert);
|
insert_len = std::strlen(insert);
|
||||||
|
|
||||||
if (insert_len > space_left) {
|
if (insert_len > space_left) {
|
||||||
Con_DPrintf("LOC_Format: overflow at argument #%d\n", numargs);
|
console::debug("LOC_Format: overflow at argument #%d\n", numargs);
|
||||||
insert_len = space_left;
|
insert_len = space_left;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2568,7 +2568,7 @@ size_t LOC_Format(const char *format, const char * (*getarg_fn)(int idx, void *u
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (*format)
|
if (*format)
|
||||||
Con_DPrintf("LOC_Format: overflow\n");
|
console::debug("LOC_Format: overflow\n");
|
||||||
|
|
||||||
out[written] = 0;
|
out[written] = 0;
|
||||||
|
|
||||||
|
|||||||
+410
-477
File diff suppressed because it is too large
Load Diff
+47
-32
@@ -23,47 +23,62 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||||||
#ifndef __CONSOLE_H
|
#ifndef __CONSOLE_H
|
||||||
#define __CONSOLE_H
|
#define __CONSOLE_H
|
||||||
|
|
||||||
//
|
|
||||||
// console
|
|
||||||
//
|
|
||||||
extern int con_totallines;
|
|
||||||
extern int con_backscroll;
|
|
||||||
extern bool con_forcedup; // because no entities to refresh
|
|
||||||
extern bool con_initialized;
|
|
||||||
extern byte *con_chars;
|
|
||||||
|
|
||||||
extern char con_lastcenterstring[]; //johnfitz
|
extern char con_lastcenterstring[]; //johnfitz
|
||||||
|
|
||||||
void Con_DrawCharacter (int cx, int line, int num);
|
void Con_DrawCharacter(int cx, int line, int num);
|
||||||
|
|
||||||
void Con_CheckResize (void);
|
namespace console {
|
||||||
void Con_Init (void);
|
extern int total_lines;
|
||||||
void Con_DrawConsole (int lines, bool drawinput);
|
extern int back_scroll;
|
||||||
void Con_Printf (const char *fmt, ...) FUNC_PRINTF(1,2);
|
extern bool forced_up;
|
||||||
void Con_DWarning (const char *fmt, ...) FUNC_PRINTF(1,2); //ericw
|
extern bool initialized;
|
||||||
void Con_Warning (const char *fmt, ...) FUNC_PRINTF(1,2); //johnfitz
|
|
||||||
void Con_DPrintf (const char *fmt, ...) FUNC_PRINTF(1,2);
|
|
||||||
void Con_DPrintf2 (const char *fmt, ...) FUNC_PRINTF(1,2); //johnfitz
|
|
||||||
void Con_SafePrintf (const char *fmt, ...) FUNC_PRINTF(1,2);
|
|
||||||
void Con_DrawNotify (void);
|
|
||||||
void Con_ClearNotify (void);
|
|
||||||
void Con_ToggleConsole_f (void);
|
|
||||||
|
|
||||||
void Con_NotifyBox (const char *text); // during startup for sound / cd warnings
|
void init();
|
||||||
|
|
||||||
void Con_Show (void);
|
void line_feed();
|
||||||
void Con_Hide (void);
|
|
||||||
|
|
||||||
const char *Con_Quakebar (int len);
|
void info(const char *fmt, ...);
|
||||||
void Con_TabComplete (void);
|
|
||||||
void Con_LogCenterPrint (const char *str);
|
void warn(const char *fmt, ...);
|
||||||
|
|
||||||
|
void dev_warn(const char *fmt, ...);
|
||||||
|
|
||||||
|
void debug(const char *fmt, ...);
|
||||||
|
|
||||||
|
void trace(const char *fmt, ...);
|
||||||
|
|
||||||
|
void safe_print(const char *fmt, ...);
|
||||||
|
|
||||||
|
void toggle_console();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Con_CheckResize(void);
|
||||||
|
|
||||||
|
void Con_DrawConsole(int lines, bool drawinput);
|
||||||
|
|
||||||
|
void Con_DrawNotify(void);
|
||||||
|
|
||||||
|
void Con_ClearNotify(void);
|
||||||
|
|
||||||
|
void Con_NotifyBox(const char *text); // during startup for sound / cd warnings
|
||||||
|
|
||||||
|
void Con_Show(void);
|
||||||
|
|
||||||
|
void Con_Hide(void);
|
||||||
|
|
||||||
|
const char *Con_Quakebar(int len);
|
||||||
|
|
||||||
|
void Con_TabComplete(void);
|
||||||
|
|
||||||
|
void Con_LogCenterPrint(const char *str);
|
||||||
|
|
||||||
//
|
//
|
||||||
// debuglog
|
// debuglog
|
||||||
//
|
//
|
||||||
void LOG_Init (quakeparms_t *parms);
|
void LOG_Init(quakeparms_t *parms);
|
||||||
void LOG_Close (void);
|
|
||||||
void Con_DebugLog (const char *msg);
|
void LOG_Close(void);
|
||||||
|
|
||||||
|
void Con_DebugLog(const char *msg);
|
||||||
|
|
||||||
#endif /* __CONSOLE_H */
|
#endif /* __CONSOLE_H */
|
||||||
|
|
||||||
|
|||||||
+13
-13
@@ -61,7 +61,7 @@ void Cvar_List_f() {
|
|||||||
if (partial && std::strncmp(partial, name.c_str(), len) != 0) {
|
if (partial && std::strncmp(partial, name.c_str(), len) != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Con_SafePrintf("%s%s %s \"%s\"\n",
|
console::safe_print("%s%s %s \"%s\"\n",
|
||||||
var->flags.archive ? "*" : " ",
|
var->flags.archive ? "*" : " ",
|
||||||
var->flags.notify ? "s" : " ",
|
var->flags.notify ? "s" : " ",
|
||||||
name.c_str(),
|
name.c_str(),
|
||||||
@@ -69,11 +69,11 @@ void Cvar_List_f() {
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_SafePrintf("%i cvars", count);
|
console::safe_print("%i cvars", count);
|
||||||
if (partial) {
|
if (partial) {
|
||||||
Con_SafePrintf(" beginning with \"%s\"", partial);
|
console::safe_print(" beginning with \"%s\"", partial);
|
||||||
}
|
}
|
||||||
Con_SafePrintf("\n");
|
console::safe_print("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -85,7 +85,7 @@ void Cvar_Inc_f(void) {
|
|||||||
switch (command::argc()) {
|
switch (command::argc()) {
|
||||||
default:
|
default:
|
||||||
case 1:
|
case 1:
|
||||||
Con_Printf("inc <cvar> [amount] : increment cvar\n");
|
console::info("inc <cvar> [amount] : increment cvar\n");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
convar::set_value(*command::argv(1), convar::variable_value(*command::argv(1)).value_or(0.0) + 1);
|
convar::set_value(*command::argv(1), convar::variable_value(*command::argv(1)).value_or(0.0) + 1);
|
||||||
@@ -105,7 +105,7 @@ void Cvar_Toggle_f() {
|
|||||||
switch (command::argc()) {
|
switch (command::argc()) {
|
||||||
default:
|
default:
|
||||||
case 1:
|
case 1:
|
||||||
Con_Printf("toggle <cvar> : toggle cvar\n");
|
console::info("toggle <cvar> : toggle cvar\n");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (convar::variable_value(*command::argv(1)).value_or(0.0) != 0.0)
|
if (convar::variable_value(*command::argv(1)).value_or(0.0) != 0.0)
|
||||||
@@ -125,7 +125,7 @@ void Cvar_Cycle_f() {
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (command::argc() < 3) {
|
if (command::argc() < 3) {
|
||||||
Con_Printf("cycle <cvar> <value list>: cycle cvar through a list of values\n");
|
console::info("cycle <cvar> <value list>: cycle cvar through a list of values\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ void Cvar_Reset_f() {
|
|||||||
switch (command::argc()) {
|
switch (command::argc()) {
|
||||||
default:
|
default:
|
||||||
case 1:
|
case 1:
|
||||||
Con_Printf("reset <cvar> : reset cvar to default\n");
|
console::info("reset <cvar> : reset cvar to default\n");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
convar::reset(*command::argv(1));
|
convar::reset(*command::argv(1));
|
||||||
@@ -320,7 +320,7 @@ std::optional<std::string_view> convar::complete_variable(const std::string_view
|
|||||||
*/
|
*/
|
||||||
void convar::reset(const std::string &name) {
|
void convar::reset(const std::string &name) {
|
||||||
if (const auto var = find_var(name); !var.has_value())
|
if (const auto var = find_var(name); !var.has_value())
|
||||||
Con_Printf("variable \"%s\" not found\n", name.c_str());
|
console::info("variable \"%s\" not found\n", name.c_str());
|
||||||
else
|
else
|
||||||
var.value()->set(var.value()->default_string);
|
var.value()->set(var.value()->default_string);
|
||||||
}
|
}
|
||||||
@@ -390,7 +390,7 @@ void convar::set(const std::string &name, const std::string &value) {
|
|||||||
const auto var = find_var(name);
|
const auto var = find_var(name);
|
||||||
if (!var.has_value()) {
|
if (!var.has_value()) {
|
||||||
// there is an error in C code if this happens
|
// there is an error in C code if this happens
|
||||||
Con_Printf("Cvar_Set: variable %s not found\n", name.c_str());
|
console::info("Cvar_Set: variable %s not found\n", name.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -460,13 +460,13 @@ void convar::inscribe() {
|
|||||||
|
|
||||||
// first check to see if it has already been defined
|
// first check to see if it has already been defined
|
||||||
if (find_var(this->name)) {
|
if (find_var(this->name)) {
|
||||||
Con_Printf("Can't register variable %s, already defined\n", this->name.c_str());
|
console::info("Can't register variable %s, already defined\n", this->name.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for overlap with a command
|
// check for overlap with a command
|
||||||
if (command::exists(this->name)) {
|
if (command::exists(this->name)) {
|
||||||
Con_Printf("Cvar_RegisterVariable: %s is a command\n", this->name.c_str());
|
console::info("Cvar_RegisterVariable: %s is a command\n", this->name.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -515,7 +515,7 @@ bool Cvar_Command() {
|
|||||||
|
|
||||||
// perform a variable print or set
|
// perform a variable print or set
|
||||||
if (command::argc() == 1) {
|
if (command::argc() == 1) {
|
||||||
Con_Printf("\"%s\" is \"%s\"\n", var.value()->name.c_str(), var.value()->string);
|
console::info("\"%s\" is \"%s\"\n", var.value()->name.c_str(), var.value()->string);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -559,7 +559,7 @@ void Draw_ConsoleBackground (void)
|
|||||||
pic->width = vid.conwidth;
|
pic->width = vid.conwidth;
|
||||||
pic->height = vid.conheight;
|
pic->height = vid.conheight;
|
||||||
|
|
||||||
alpha = (con_forcedup) ? 1.0f : scr_conalpha.value;
|
alpha = (console::forced_up) ? 1.0f : scr_conalpha.value;
|
||||||
|
|
||||||
GL_SetCanvas (CANVAS_CONSOLE); //in case this is called from weird places
|
GL_SetCanvas (CANVAS_CONSOLE); //in case this is called from weird places
|
||||||
|
|
||||||
|
|||||||
+9
-9
@@ -115,15 +115,15 @@ void Fog_FogCommand_f(void) {
|
|||||||
switch (command::argc()) {
|
switch (command::argc()) {
|
||||||
default:
|
default:
|
||||||
case 1:
|
case 1:
|
||||||
Con_Printf("usage:\n");
|
console::info("usage:\n");
|
||||||
Con_Printf(" fog <density>\n");
|
console::info(" fog <density>\n");
|
||||||
Con_Printf(" fog <red> <green> <blue>\n");
|
console::info(" fog <red> <green> <blue>\n");
|
||||||
Con_Printf(" fog <density> <red> <green> <blue>\n");
|
console::info(" fog <density> <red> <green> <blue>\n");
|
||||||
Con_Printf("current values:\n");
|
console::info("current values:\n");
|
||||||
Con_Printf(" \"density\" is \"%f\"\n", fog_density);
|
console::info(" \"density\" is \"%f\"\n", fog_density);
|
||||||
Con_Printf(" \"red\" is \"%f\"\n", fog_red);
|
console::info(" \"red\" is \"%f\"\n", fog_red);
|
||||||
Con_Printf(" \"green\" is \"%f\"\n", fog_green);
|
console::info(" \"green\" is \"%f\"\n", fog_green);
|
||||||
Con_Printf(" \"blue\" is \"%f\"\n", fog_blue);
|
console::info(" \"blue\" is \"%f\"\n", fog_blue);
|
||||||
return;
|
return;
|
||||||
case 2:
|
case 2:
|
||||||
d = std::atof(command::argv(1)->c_str());
|
d = std::atof(command::argv(1)->c_str());
|
||||||
|
|||||||
+2
-2
@@ -276,7 +276,7 @@ static void BuildTris (void)
|
|||||||
|
|
||||||
commands[numcommands++] = 0; // end of list marker
|
commands[numcommands++] = 0; // end of list marker
|
||||||
|
|
||||||
Con_DPrintf2 ("%3i tri %3i vert %3i cmd\n", pheader->numtris, numorder, numcommands);
|
console::trace ("%3i tri %3i vert %3i cmd\n", pheader->numtris, numorder, numcommands);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GL_MakeAliasModelDisplayLists_VBO (qmodel_t *, aliashdr_t *);
|
static void GL_MakeAliasModelDisplayLists_VBO (qmodel_t *, aliashdr_t *);
|
||||||
@@ -303,7 +303,7 @@ void GL_MakeAliasModelDisplayLists (qmodel_t *m, aliashdr_t *hdr)
|
|||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
//johnfitz -- generate meshes
|
//johnfitz -- generate meshes
|
||||||
Con_DPrintf2 ("meshing %s...\n",m->name);
|
console::trace ("meshing %s...\n",m->name);
|
||||||
BuildTris ();
|
BuildTris ();
|
||||||
|
|
||||||
// save the data out
|
// save the data out
|
||||||
|
|||||||
+40
-40
@@ -178,7 +178,7 @@ static byte *Mod_DecompressVis (byte *in, qmodel_t *model)
|
|||||||
{
|
{
|
||||||
if(!model->viswarn) {
|
if(!model->viswarn) {
|
||||||
model->viswarn = true;
|
model->viswarn = true;
|
||||||
Con_Warning("Mod_DecompressVis: output overrun on model \"%s\"\n", model->name);
|
console::warn("Mod_DecompressVis: output overrun on model \"%s\"\n", model->name);
|
||||||
}
|
}
|
||||||
return mod_decompressed;
|
return mod_decompressed;
|
||||||
}
|
}
|
||||||
@@ -471,7 +471,7 @@ static void Mod_LoadTextures (lump_t *l)
|
|||||||
//johnfitz -- don't return early if no textures; still need to create dummy texture
|
//johnfitz -- don't return early if no textures; still need to create dummy texture
|
||||||
if (!l->filelen)
|
if (!l->filelen)
|
||||||
{
|
{
|
||||||
Con_Printf ("Mod_LoadTextures: no textures in bsp file\n");
|
console::info ("Mod_LoadTextures: no textures in bsp file\n");
|
||||||
nummiptex = 0;
|
nummiptex = 0;
|
||||||
m = NULL; // avoid bogus compiler warning
|
m = NULL; // avoid bogus compiler warning
|
||||||
}
|
}
|
||||||
@@ -499,14 +499,14 @@ static void Mod_LoadTextures (lump_t *l)
|
|||||||
|
|
||||||
if (mt->width == 0 || mt->height == 0)
|
if (mt->width == 0 || mt->height == 0)
|
||||||
{
|
{
|
||||||
Con_Warning ("Zero sized texture %s in %s!\n", mt->name, loadmodel->name);
|
console::warn ("Zero sized texture %s in %s!\n", mt->name, loadmodel->name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (mt->width & 15) || (mt->height & 15) )
|
if ( (mt->width & 15) || (mt->height & 15) )
|
||||||
{
|
{
|
||||||
if (loadmodel->bspversion != BSPVERSION_QUAKE64)
|
if (loadmodel->bspversion != BSPVERSION_QUAKE64)
|
||||||
Con_Warning ("Texture %s (%d x %d) is not 16 aligned\n", mt->name, mt->width, mt->height);
|
console::warn ("Texture %s (%d x %d) is not 16 aligned\n", mt->name, mt->width, mt->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
pixels = mt->width*mt->height; // only copy the first mip, the rest are auto-generated
|
pixels = mt->width*mt->height; // only copy the first mip, the rest are auto-generated
|
||||||
@@ -524,7 +524,7 @@ static void Mod_LoadTextures (lump_t *l)
|
|||||||
// the end of the .bsp file buffer
|
// the end of the .bsp file buffer
|
||||||
if (((byte*)(mt+1) + pixels) > (mod_base + l->fileofs + l->filelen))
|
if (((byte*)(mt+1) + pixels) > (mod_base + l->fileofs + l->filelen))
|
||||||
{
|
{
|
||||||
Con_DPrintf("Texture %s extends past end of lump\n", mt->name);
|
console::debug("Texture %s extends past end of lump\n", mt->name);
|
||||||
pixels = std::max(0L, (long)((mod_base + l->fileofs + l->filelen) - (byte*)(mt+1)));
|
pixels = std::max(0L, (long)((mod_base + l->fileofs + l->filelen) - (byte*)(mt+1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -787,7 +787,7 @@ static void Mod_LoadLighting (lump_t *l)
|
|||||||
if (path_id < loadmodel->path_id)
|
if (path_id < loadmodel->path_id)
|
||||||
{
|
{
|
||||||
Hunk_FreeToLowMark(mark);
|
Hunk_FreeToLowMark(mark);
|
||||||
Con_DPrintf("ignored %s from a gamedir with lower priority\n", litfilename);
|
console::debug("ignored %s from a gamedir with lower priority\n", litfilename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (data[0] == 'Q' && data[1] == 'L' && data[2] == 'I' && data[3] == 'T')
|
if (data[0] == 'Q' && data[1] == 'L' && data[2] == 'I' && data[3] == 'T')
|
||||||
@@ -797,23 +797,23 @@ static void Mod_LoadLighting (lump_t *l)
|
|||||||
{
|
{
|
||||||
if (8+l->filelen*3 == com_filesize)
|
if (8+l->filelen*3 == com_filesize)
|
||||||
{
|
{
|
||||||
Con_DPrintf2("%s loaded\n", litfilename);
|
console::trace("%s loaded\n", litfilename);
|
||||||
loadmodel->lightdata = data + 8;
|
loadmodel->lightdata = data + 8;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Hunk_FreeToLowMark(mark);
|
Hunk_FreeToLowMark(mark);
|
||||||
Con_Printf("Outdated .lit file (%s should be %u bytes, not %u)\n", litfilename, 8+l->filelen*3, com_filesize);
|
console::info("Outdated .lit file (%s should be %u bytes, not %u)\n", litfilename, 8+l->filelen*3, com_filesize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Hunk_FreeToLowMark(mark);
|
Hunk_FreeToLowMark(mark);
|
||||||
Con_Printf("Unknown .lit file version (%d)\n", i);
|
console::info("Unknown .lit file version (%d)\n", i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Hunk_FreeToLowMark(mark);
|
Hunk_FreeToLowMark(mark);
|
||||||
Con_Printf("Corrupt .lit file (old version?), ignoring\n");
|
console::info("Corrupt .lit file (old version?), ignoring\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// LordHavoc: no .lit found, expand the white lighting data to color
|
// LordHavoc: no .lit found, expand the white lighting data to color
|
||||||
@@ -900,13 +900,13 @@ static void Mod_LoadEntities (lump_t *l)
|
|||||||
COM_StripExtension(basemapname, basemapname, sizeof(basemapname));
|
COM_StripExtension(basemapname, basemapname, sizeof(basemapname));
|
||||||
|
|
||||||
q_snprintf(entfilename, sizeof(entfilename), "%s@%04x.ent", basemapname, crc);
|
q_snprintf(entfilename, sizeof(entfilename), "%s@%04x.ent", basemapname, crc);
|
||||||
Con_DPrintf2("trying to load %s\n", entfilename);
|
console::trace("trying to load %s\n", entfilename);
|
||||||
ents = (char *) COM_LoadHunkFile (entfilename, &path_id);
|
ents = (char *) COM_LoadHunkFile (entfilename, &path_id);
|
||||||
|
|
||||||
if (!ents)
|
if (!ents)
|
||||||
{
|
{
|
||||||
q_snprintf(entfilename, sizeof(entfilename), "%s.ent", basemapname);
|
q_snprintf(entfilename, sizeof(entfilename), "%s.ent", basemapname);
|
||||||
Con_DPrintf2("trying to load %s\n", entfilename);
|
console::trace("trying to load %s\n", entfilename);
|
||||||
ents = (char *) COM_LoadHunkFile (entfilename, &path_id);
|
ents = (char *) COM_LoadHunkFile (entfilename, &path_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -917,12 +917,12 @@ static void Mod_LoadEntities (lump_t *l)
|
|||||||
if (path_id < loadmodel->path_id)
|
if (path_id < loadmodel->path_id)
|
||||||
{
|
{
|
||||||
Hunk_FreeToLowMark(mark);
|
Hunk_FreeToLowMark(mark);
|
||||||
Con_DPrintf("ignored %s from a gamedir with lower priority\n", entfilename);
|
console::debug("ignored %s from a gamedir with lower priority\n", entfilename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
loadmodel->entities = ents;
|
loadmodel->entities = ents;
|
||||||
Con_DPrintf("Loaded external entity file %s\n", entfilename);
|
console::debug("Loaded external entity file %s\n", entfilename);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1067,7 +1067,7 @@ static void Mod_LoadTexinfo (lump_t *l)
|
|||||||
|
|
||||||
//johnfitz: report missing textures
|
//johnfitz: report missing textures
|
||||||
if (missing && loadmodel->numtextures > 1)
|
if (missing && loadmodel->numtextures > 1)
|
||||||
Con_Printf ("Mod_LoadTexinfo: %d texture(s) missing from BSP file\n", missing);
|
console::info ("Mod_LoadTexinfo: %d texture(s) missing from BSP file\n", missing);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1248,7 +1248,7 @@ static void Mod_LoadFaces (lump_t *l, bool bsp2)
|
|||||||
|
|
||||||
//johnfitz -- warn mappers about exceeding old limits
|
//johnfitz -- warn mappers about exceeding old limits
|
||||||
if (count > 32767 && !bsp2)
|
if (count > 32767 && !bsp2)
|
||||||
Con_DWarning ("%i faces exceeds standard limit of 32767.\n", count);
|
console::dev_warn ("%i faces exceeds standard limit of 32767.\n", count);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
loadmodel->surfaces = out;
|
loadmodel->surfaces = out;
|
||||||
@@ -1283,7 +1283,7 @@ static void Mod_LoadFaces (lump_t *l, bool bsp2)
|
|||||||
|
|
||||||
out->flags = 0;
|
out->flags = 0;
|
||||||
if (out->numedges < 3)
|
if (out->numedges < 3)
|
||||||
Con_Warning("surfnum %d: bad numedges %d\n", surfnum, out->numedges);
|
console::warn("surfnum %d: bad numedges %d\n", surfnum, out->numedges);
|
||||||
|
|
||||||
if (side)
|
if (side)
|
||||||
out->flags |= SURF_PLANEBACK;
|
out->flags |= SURF_PLANEBACK;
|
||||||
@@ -1318,7 +1318,7 @@ static void Mod_LoadFaces (lump_t *l, bool bsp2)
|
|||||||
out->flags |= SURF_DRAWTILED;
|
out->flags |= SURF_DRAWTILED;
|
||||||
else if (out->samples && !loadmodel->haslitwater)
|
else if (out->samples && !loadmodel->haslitwater)
|
||||||
{
|
{
|
||||||
Con_DPrintf ("Map has lit water\n");
|
console::debug ("Map has lit water\n");
|
||||||
loadmodel->haslitwater = true;
|
loadmodel->haslitwater = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1393,7 +1393,7 @@ static void Mod_LoadNodes_S (lump_t *l)
|
|||||||
|
|
||||||
//johnfitz -- warn mappers about exceeding old limits
|
//johnfitz -- warn mappers about exceeding old limits
|
||||||
if (count > 32767)
|
if (count > 32767)
|
||||||
Con_DWarning ("%i nodes exceeds standard limit of 32767.\n", count);
|
console::dev_warn ("%i nodes exceeds standard limit of 32767.\n", count);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
loadmodel->nodes = out;
|
loadmodel->nodes = out;
|
||||||
@@ -1426,7 +1426,7 @@ static void Mod_LoadNodes_S (lump_t *l)
|
|||||||
out->children[j] = (mnode_t *)(loadmodel->leafs + p);
|
out->children[j] = (mnode_t *)(loadmodel->leafs + p);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Con_Printf("Mod_LoadNodes: invalid leaf index %i (file has only %i leafs)\n", p, loadmodel->numleafs);
|
console::info("Mod_LoadNodes: invalid leaf index %i (file has only %i leafs)\n", p, loadmodel->numleafs);
|
||||||
out->children[j] = (mnode_t *)(loadmodel->leafs); //map it to the solid leaf
|
out->children[j] = (mnode_t *)(loadmodel->leafs); //map it to the solid leaf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1478,7 +1478,7 @@ static void Mod_LoadNodes_L1 (lump_t *l)
|
|||||||
out->children[j] = (mnode_t *)(loadmodel->leafs + p);
|
out->children[j] = (mnode_t *)(loadmodel->leafs + p);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Con_Printf("Mod_LoadNodes: invalid leaf index %i (file has only %i leafs)\n", p, loadmodel->numleafs);
|
console::info("Mod_LoadNodes: invalid leaf index %i (file has only %i leafs)\n", p, loadmodel->numleafs);
|
||||||
out->children[j] = (mnode_t *)(loadmodel->leafs); //map it to the solid leaf
|
out->children[j] = (mnode_t *)(loadmodel->leafs); //map it to the solid leaf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1530,7 +1530,7 @@ static void Mod_LoadNodes_L2 (lump_t *l)
|
|||||||
out->children[j] = (mnode_t *)(loadmodel->leafs + p);
|
out->children[j] = (mnode_t *)(loadmodel->leafs + p);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Con_Printf("Mod_LoadNodes: invalid leaf index %i (file has only %i leafs)\n", p, loadmodel->numleafs);
|
console::info("Mod_LoadNodes: invalid leaf index %i (file has only %i leafs)\n", p, loadmodel->numleafs);
|
||||||
out->children[j] = (mnode_t *)(loadmodel->leafs); //map it to the solid leaf
|
out->children[j] = (mnode_t *)(loadmodel->leafs); //map it to the solid leaf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1736,7 +1736,7 @@ static void Mod_LoadClipnodes (lump_t *l, bool bsp2)
|
|||||||
|
|
||||||
//johnfitz -- warn about exceeding old limits
|
//johnfitz -- warn about exceeding old limits
|
||||||
if (count > 32767 && !bsp2)
|
if (count > 32767 && !bsp2)
|
||||||
Con_DWarning ("%i clipnodes exceeds standard limit of 32767.\n", count);
|
console::dev_warn ("%i clipnodes exceeds standard limit of 32767.\n", count);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
loadmodel->clipnodes = out;
|
loadmodel->clipnodes = out;
|
||||||
@@ -1890,7 +1890,7 @@ static void Mod_LoadMarksurfaces (lump_t *l, int bsp2)
|
|||||||
|
|
||||||
//johnfitz -- warn mappers about exceeding old limits
|
//johnfitz -- warn mappers about exceeding old limits
|
||||||
if (count > 32767)
|
if (count > 32767)
|
||||||
Con_DWarning ("%i marksurfaces exceeds standard limit of 32767.\n", count);
|
console::dev_warn ("%i marksurfaces exceeds standard limit of 32767.\n", count);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
for (i=0 ; i<count ; i++)
|
for (i=0 ; i<count ; i++)
|
||||||
@@ -2022,7 +2022,7 @@ static void Mod_LoadSubmodels (lump_t *l)
|
|||||||
out = loadmodel->submodels;
|
out = loadmodel->submodels;
|
||||||
|
|
||||||
if (out->visleafs > 8192)
|
if (out->visleafs > 8192)
|
||||||
Con_DWarning ("%i visleafs exceeds standard limit of 8192.\n", out->visleafs);
|
console::dev_warn ("%i visleafs exceeds standard limit of 8192.\n", out->visleafs);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2102,23 +2102,23 @@ static FILE *Mod_FindVisibilityExternal(void)
|
|||||||
q_snprintf(visfilename, sizeof(visfilename), "maps/%s.vis", loadname);
|
q_snprintf(visfilename, sizeof(visfilename), "maps/%s.vis", loadname);
|
||||||
if (COM_FOpenFile(visfilename, &f, &path_id) < 0)
|
if (COM_FOpenFile(visfilename, &f, &path_id) < 0)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s not found, trying ", visfilename);
|
console::debug("%s not found, trying ", visfilename);
|
||||||
q_snprintf(visfilename, sizeof(visfilename), "%s.vis", COM_SkipPath(com_gamedir));
|
q_snprintf(visfilename, sizeof(visfilename), "%s.vis", COM_SkipPath(com_gamedir));
|
||||||
Con_DPrintf("%s\n", visfilename);
|
console::debug("%s\n", visfilename);
|
||||||
if (COM_FOpenFile(visfilename, &f, &path_id) < 0)
|
if (COM_FOpenFile(visfilename, &f, &path_id) < 0)
|
||||||
{
|
{
|
||||||
Con_DPrintf("external vis not found\n");
|
console::debug("external vis not found\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (path_id < loadmodel->path_id)
|
if (path_id < loadmodel->path_id)
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
Con_DPrintf("ignored %s from a gamedir with lower priority\n", visfilename);
|
console::debug("ignored %s from a gamedir with lower priority\n", visfilename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_DPrintf("Found external VIS %s\n", visfilename);
|
console::debug("Found external VIS %s\n", visfilename);
|
||||||
|
|
||||||
shortname = COM_SkipPath(loadmodel->name);
|
shortname = COM_SkipPath(loadmodel->name);
|
||||||
pos = 0;
|
pos = 0;
|
||||||
@@ -2136,7 +2136,7 @@ static FILE *Mod_FindVisibilityExternal(void)
|
|||||||
}
|
}
|
||||||
if (r != VISPATCH_HEADER_LEN) {
|
if (r != VISPATCH_HEADER_LEN) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
Con_DPrintf("%s not found in %s\n", shortname, visfilename);
|
console::debug("%s not found in %s\n", shortname, visfilename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2152,7 +2152,7 @@ static byte *Mod_LoadVisibilityExternal(FILE* f)
|
|||||||
if (!fread(&filelen, 4, 1, f)) return NULL;
|
if (!fread(&filelen, 4, 1, f)) return NULL;
|
||||||
filelen = LittleLong(filelen);
|
filelen = LittleLong(filelen);
|
||||||
if (filelen <= 0) return NULL;
|
if (filelen <= 0) return NULL;
|
||||||
Con_DPrintf("...%d bytes visibility data\n", filelen);
|
console::debug("...%d bytes visibility data\n", filelen);
|
||||||
visdata = (byte *) Hunk_AllocName(filelen, "EXT_VIS");
|
visdata = (byte *) Hunk_AllocName(filelen, "EXT_VIS");
|
||||||
if (!fread(visdata, filelen, 1, f))
|
if (!fread(visdata, filelen, 1, f))
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -2168,7 +2168,7 @@ static void Mod_LoadLeafsExternal(FILE* f)
|
|||||||
if (!fread(&filelen, 4, 1, f)) return;
|
if (!fread(&filelen, 4, 1, f)) return;
|
||||||
filelen = LittleLong(filelen);
|
filelen = LittleLong(filelen);
|
||||||
if (filelen <= 0) return;
|
if (filelen <= 0) return;
|
||||||
Con_DPrintf("...%d bytes leaf data\n", filelen);
|
console::debug("...%d bytes leaf data\n", filelen);
|
||||||
in = Hunk_AllocName(filelen, "EXT_LEAF");
|
in = Hunk_AllocName(filelen, "EXT_LEAF");
|
||||||
if (!fread(in, filelen, 1, f))
|
if (!fread(in, filelen, 1, f))
|
||||||
return;
|
return;
|
||||||
@@ -2234,13 +2234,13 @@ static void Mod_LoadBrushModel (qmodel_t *mod, void *buffer)
|
|||||||
if (mod->bspversion == BSPVERSION && external_vis.value && sv.modelname[0] && !q_strcasecmp(loadname, sv.name))
|
if (mod->bspversion == BSPVERSION && external_vis.value && sv.modelname[0] && !q_strcasecmp(loadname, sv.name))
|
||||||
{
|
{
|
||||||
FILE* fvis;
|
FILE* fvis;
|
||||||
Con_DPrintf("trying to open external vis file\n");
|
console::debug("trying to open external vis file\n");
|
||||||
fvis = Mod_FindVisibilityExternal();
|
fvis = Mod_FindVisibilityExternal();
|
||||||
if (fvis) {
|
if (fvis) {
|
||||||
int mark = Hunk_LowMark();
|
int mark = Hunk_LowMark();
|
||||||
loadmodel->leafs = NULL;
|
loadmodel->leafs = NULL;
|
||||||
loadmodel->numleafs = 0;
|
loadmodel->numleafs = 0;
|
||||||
Con_DPrintf("found valid external .vis file for map\n");
|
console::debug("found valid external .vis file for map\n");
|
||||||
loadmodel->visdata = Mod_LoadVisibilityExternal(fvis);
|
loadmodel->visdata = Mod_LoadVisibilityExternal(fvis);
|
||||||
if (loadmodel->visdata) {
|
if (loadmodel->visdata) {
|
||||||
Mod_LoadLeafsExternal(fvis);
|
Mod_LoadLeafsExternal(fvis);
|
||||||
@@ -2250,7 +2250,7 @@ static void Mod_LoadBrushModel (qmodel_t *mod, void *buffer)
|
|||||||
goto visdone;
|
goto visdone;
|
||||||
}
|
}
|
||||||
Hunk_FreeToLowMark(mark);
|
Hunk_FreeToLowMark(mark);
|
||||||
Con_DPrintf("External VIS data failed, using standard vis.\n");
|
console::debug("External VIS data failed, using standard vis.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2781,7 +2781,7 @@ static void Mod_LoadAliasModel (qmodel_t *mod, void *buffer)
|
|||||||
pheader->skinheight = LittleLong (pinmodel->skinheight);
|
pheader->skinheight = LittleLong (pinmodel->skinheight);
|
||||||
|
|
||||||
if (pheader->skinheight > MAX_LBM_HEIGHT)
|
if (pheader->skinheight > MAX_LBM_HEIGHT)
|
||||||
Con_DWarning ("model %s has a skin taller than %d", mod->name,
|
console::dev_warn ("model %s has a skin taller than %d", mod->name,
|
||||||
MAX_LBM_HEIGHT);
|
MAX_LBM_HEIGHT);
|
||||||
|
|
||||||
pheader->numverts = LittleLong (pinmodel->numverts);
|
pheader->numverts = LittleLong (pinmodel->numverts);
|
||||||
@@ -3084,11 +3084,11 @@ static void Mod_Print (void)
|
|||||||
int i;
|
int i;
|
||||||
qmodel_t *mod;
|
qmodel_t *mod;
|
||||||
|
|
||||||
Con_SafePrintf ("Cached models:\n"); //johnfitz -- safeprint instead of print
|
console::safe_print ("Cached models:\n"); //johnfitz -- safeprint instead of print
|
||||||
for (i=0, mod=mod_known ; i < mod_numknown ; i++, mod++)
|
for (i=0, mod=mod_known ; i < mod_numknown ; i++, mod++)
|
||||||
{
|
{
|
||||||
Con_SafePrintf ("%8p : %s\n", mod->cache.data, mod->name); //johnfitz -- safeprint instead of print
|
console::safe_print ("%8p : %s\n", mod->cache.data, mod->name); //johnfitz -- safeprint instead of print
|
||||||
}
|
}
|
||||||
Con_Printf ("%i models\n",mod_numknown); //johnfitz -- print the total too
|
console::info ("%i models\n",mod_numknown); //johnfitz -- print the total too
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -152,7 +152,7 @@ void R_CheckEfrags (void)
|
|||||||
return; //don't spam when still parsing signon packet full of static ents
|
return; //don't spam when still parsing signon packet full of static ents
|
||||||
|
|
||||||
if (cl.num_efrags > 640 && dev_peakstats.efrags <= 640)
|
if (cl.num_efrags > 640 && dev_peakstats.efrags <= 640)
|
||||||
Con_DWarning ("%i efrags exceeds standard limit of 640.\n", cl.num_efrags);
|
console::dev_warn ("%i efrags exceeds standard limit of 640.\n", cl.num_efrags);
|
||||||
|
|
||||||
dev_stats.efrags = cl.num_efrags;
|
dev_stats.efrags = cl.num_efrags;
|
||||||
dev_peakstats.efrags = std::max(cl.num_efrags, dev_peakstats.efrags);
|
dev_peakstats.efrags = std::max(cl.num_efrags, dev_peakstats.efrags);
|
||||||
|
|||||||
+3
-3
@@ -1044,7 +1044,7 @@ void R_RenderView(void) {
|
|||||||
//johnfitz -- modified r_speeds output
|
//johnfitz -- modified r_speeds output
|
||||||
time2 = Sys_DoubleTime();
|
time2 = Sys_DoubleTime();
|
||||||
if (r_pos.value)
|
if (r_pos.value)
|
||||||
Con_Printf("x %i y %i z %i (pitch %i yaw %i roll %i)\n",
|
console::info("x %i y %i z %i (pitch %i yaw %i roll %i)\n",
|
||||||
(int) cl_entities[cl.viewentity].origin[0],
|
(int) cl_entities[cl.viewentity].origin[0],
|
||||||
(int) cl_entities[cl.viewentity].origin[1],
|
(int) cl_entities[cl.viewentity].origin[1],
|
||||||
(int) cl_entities[cl.viewentity].origin[2],
|
(int) cl_entities[cl.viewentity].origin[2],
|
||||||
@@ -1052,7 +1052,7 @@ void R_RenderView(void) {
|
|||||||
(int) cl.viewangles[YAW],
|
(int) cl.viewangles[YAW],
|
||||||
(int) cl.viewangles[ROLL]);
|
(int) cl.viewangles[ROLL]);
|
||||||
else if (r_speeds.value == 2)
|
else if (r_speeds.value == 2)
|
||||||
Con_Printf("%3i ms %4i/%4i wpoly %4i/%4i epoly %3i lmap %4i/%4i sky %1.1f mtex\n",
|
console::info("%3i ms %4i/%4i wpoly %4i/%4i epoly %3i lmap %4i/%4i sky %1.1f mtex\n",
|
||||||
(int) ((time2 - time1) * 1000),
|
(int) ((time2 - time1) * 1000),
|
||||||
rs_brushpolys,
|
rs_brushpolys,
|
||||||
rs_brushpasses,
|
rs_brushpasses,
|
||||||
@@ -1063,7 +1063,7 @@ void R_RenderView(void) {
|
|||||||
rs_skypasses,
|
rs_skypasses,
|
||||||
TexMgr_FrameUsage());
|
TexMgr_FrameUsage());
|
||||||
else if (r_speeds.value)
|
else if (r_speeds.value)
|
||||||
Con_Printf("%3i ms %4i wpoly %4i epoly %3i lmap\n",
|
console::info("%3i ms %4i wpoly %4i epoly %3i lmap\n",
|
||||||
(int) ((time2 - time1) * 1000),
|
(int) ((time2 - time1) * 1000),
|
||||||
rs_brushpolys,
|
rs_brushpolys,
|
||||||
rs_aliaspolys,
|
rs_aliaspolys,
|
||||||
|
|||||||
+6
-6
@@ -273,7 +273,7 @@ void R_TranslateNewPlayerSkin(int playernum) {
|
|||||||
|
|
||||||
//TODO: move these tests to the place where skinnum gets received from the server
|
//TODO: move these tests to the place where skinnum gets received from the server
|
||||||
if (skinnum < 0 || skinnum >= paliashdr->numskins) {
|
if (skinnum < 0 || skinnum >= paliashdr->numskins) {
|
||||||
Con_DPrintf("(%d): Invalid player skin #%d\n", playernum, skinnum);
|
console::debug("(%d): Invalid player skin #%d\n", playernum, skinnum);
|
||||||
skinnum = 0;
|
skinnum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ void R_TimeRefresh_f(void) {
|
|||||||
float start, stop, time;
|
float start, stop, time;
|
||||||
|
|
||||||
if (cls.state != ca_connected) {
|
if (cls.state != ca_connected) {
|
||||||
Con_Printf("Not connected to a server\n");
|
console::info("Not connected to a server\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@ void R_TimeRefresh_f(void) {
|
|||||||
glFinish();
|
glFinish();
|
||||||
stop = Sys_DoubleTime();
|
stop = Sys_DoubleTime();
|
||||||
time = stop - start;
|
time = stop - start;
|
||||||
Con_Printf("%f seconds (%f fps)\n", time, 128 / time);
|
console::info("%f seconds (%f fps)\n", time, 128 / time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void D_FlushCaches(void) {
|
void D_FlushCaches(void) {
|
||||||
@@ -448,7 +448,7 @@ static bool GL_CheckShader(GLuint shader) {
|
|||||||
memset(infolog, 0, sizeof(infolog));
|
memset(infolog, 0, sizeof(infolog));
|
||||||
GL_GetShaderInfoLogFunc(shader, sizeof(infolog), NULL, infolog);
|
GL_GetShaderInfoLogFunc(shader, sizeof(infolog), NULL, infolog);
|
||||||
|
|
||||||
Con_Warning("GLSL program failed to compile: %s", infolog);
|
console::warn("GLSL program failed to compile: %s", infolog);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -465,7 +465,7 @@ static bool GL_CheckProgram(GLuint program) {
|
|||||||
memset(infolog, 0, sizeof(infolog));
|
memset(infolog, 0, sizeof(infolog));
|
||||||
GL_GetProgramInfoLogFunc(program, sizeof(infolog), NULL, infolog);
|
GL_GetProgramInfoLogFunc(program, sizeof(infolog), NULL, infolog);
|
||||||
|
|
||||||
Con_Warning("GLSL program failed to link: %s", infolog);
|
console::warn("GLSL program failed to link: %s", infolog);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -485,7 +485,7 @@ GLint GL_GetUniformLocation(GLuint *programPtr, const char *name) {
|
|||||||
|
|
||||||
location = GL_GetUniformLocationFunc(*programPtr, name);
|
location = GL_GetUniformLocationFunc(*programPtr, name);
|
||||||
if (location == -1) {
|
if (location == -1) {
|
||||||
Con_Warning("GL_GetUniformLocationFunc %s failed\n", name);
|
console::warn("GL_GetUniformLocationFunc %s failed\n", name);
|
||||||
*programPtr = 0;
|
*programPtr = 0;
|
||||||
}
|
}
|
||||||
return location;
|
return location;
|
||||||
|
|||||||
+14
-14
@@ -58,7 +58,7 @@ draw
|
|||||||
CenterPrint ()
|
CenterPrint ()
|
||||||
SlowPrint ()
|
SlowPrint ()
|
||||||
Screen_Update ();
|
Screen_Update ();
|
||||||
Con_Printf ();
|
console::info ();
|
||||||
|
|
||||||
net
|
net
|
||||||
turn off messages option
|
turn off messages option
|
||||||
@@ -653,9 +653,9 @@ void SCR_SetUpToDrawConsole(void) {
|
|||||||
return; // never a console with loading plaque
|
return; // never a console with loading plaque
|
||||||
|
|
||||||
// decide on the height of the console
|
// decide on the height of the console
|
||||||
con_forcedup = !cl.worldmodel || cls.signon != SIGNONS;
|
console::forced_up = !cl.worldmodel || cls.signon != SIGNONS;
|
||||||
|
|
||||||
if (con_forcedup) {
|
if (console::forced_up) {
|
||||||
scr_conlines = glheight; //full screen //johnfitz -- glheight instead of vid.height
|
scr_conlines = glheight; //full screen //johnfitz -- glheight instead of vid.height
|
||||||
scr_con_current = scr_conlines;
|
scr_con_current = scr_conlines;
|
||||||
} else if (key_dest == key_console)
|
} else if (key_dest == key_console)
|
||||||
@@ -681,7 +681,7 @@ void SCR_SetUpToDrawConsole(void) {
|
|||||||
if (clearconsole++ < vid.numpages)
|
if (clearconsole++ < vid.numpages)
|
||||||
Sbar_Changed();
|
Sbar_Changed();
|
||||||
|
|
||||||
if (!con_forcedup && scr_con_current)
|
if (!console::forced_up && scr_con_current)
|
||||||
scr_tileclear_updates = 0; //johnfitz
|
scr_tileclear_updates = 0; //johnfitz
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -710,9 +710,9 @@ SCREEN SHOTS
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static void SCR_ScreenShot_Usage(void) {
|
static void SCR_ScreenShot_Usage(void) {
|
||||||
Con_Printf("usage: screenshot <format> <quality>\n");
|
console::info("usage: screenshot <format> <quality>\n");
|
||||||
Con_Printf(" format must be \"png\" or \"tga\" or \"jpg\"\n");
|
console::info(" format must be \"png\" or \"tga\" or \"jpg\"\n");
|
||||||
Con_Printf(" quality must be 1-100\n");
|
console::info(" quality must be 1-100\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -761,13 +761,13 @@ void SCR_ScreenShot_f(void) {
|
|||||||
break; // file doesn't exist
|
break; // file doesn't exist
|
||||||
}
|
}
|
||||||
if (i == 10000) {
|
if (i == 10000) {
|
||||||
Con_Printf("SCR_ScreenShot_f: Couldn't find an unused filename\n");
|
console::info("SCR_ScreenShot_f: Couldn't find an unused filename\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//get data
|
//get data
|
||||||
if (!(buffer = (byte *) malloc(glwidth * glheight * 3))) {
|
if (!(buffer = (byte *) malloc(glwidth * glheight * 3))) {
|
||||||
Con_Printf("SCR_ScreenShot_f: Couldn't allocate memory\n");
|
console::info("SCR_ScreenShot_f: Couldn't allocate memory\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -785,9 +785,9 @@ void SCR_ScreenShot_f(void) {
|
|||||||
ok = false;
|
ok = false;
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
Con_Printf("Wrote %s\n", imagename);
|
console::info("Wrote %s\n", imagename);
|
||||||
else
|
else
|
||||||
Con_Printf("SCR_ScreenShot_f: Couldn't create %s\n", imagename);
|
console::info("SCR_ScreenShot_f: Couldn't create %s\n", imagename);
|
||||||
|
|
||||||
free(buffer);
|
free(buffer);
|
||||||
}
|
}
|
||||||
@@ -988,12 +988,12 @@ void SCR_UpdateScreen(void) {
|
|||||||
if (scr_disabled_for_loading) {
|
if (scr_disabled_for_loading) {
|
||||||
if (realtime - scr_disabled_time > 60) {
|
if (realtime - scr_disabled_time > 60) {
|
||||||
scr_disabled_for_loading = false;
|
scr_disabled_for_loading = false;
|
||||||
Con_Printf("load failed.\n");
|
console::info("load failed.\n");
|
||||||
} else
|
} else
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!scr_initialized || !con_initialized)
|
if (!scr_initialized || !console::initialized)
|
||||||
return; // not initialized yet
|
return; // not initialized yet
|
||||||
|
|
||||||
|
|
||||||
@@ -1019,7 +1019,7 @@ void SCR_UpdateScreen(void) {
|
|||||||
|
|
||||||
if (scr_drawdialog) //new game confirm
|
if (scr_drawdialog) //new game confirm
|
||||||
{
|
{
|
||||||
if (con_forcedup)
|
if (console::forced_up)
|
||||||
Draw_ConsoleBackground();
|
Draw_ConsoleBackground();
|
||||||
else
|
else
|
||||||
Sbar_Draw();
|
Sbar_Draw();
|
||||||
|
|||||||
+5
-5
@@ -102,7 +102,7 @@ void Sky_LoadTexture (qmodel_t *mod, texture_t *mt)
|
|||||||
|
|
||||||
if (mt->width != 256 || mt->height != 128)
|
if (mt->width != 256 || mt->height != 128)
|
||||||
{
|
{
|
||||||
Con_Warning ("Sky texture %s is %d x %d, expected 256 x 128\n", mt->name, mt->width, mt->height);
|
console::warn ("Sky texture %s is %d x %d, expected 256 x 128\n", mt->name, mt->width, mt->height);
|
||||||
if (mt->width < 2 || mt->height < 1)
|
if (mt->width < 2 || mt->height < 1)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@ void Sky_LoadTextureQ64 (qmodel_t *mod, texture_t *mt)
|
|||||||
|
|
||||||
if (mt->width != 32 || mt->height != 64)
|
if (mt->width != 32 || mt->height != 64)
|
||||||
{
|
{
|
||||||
Con_DWarning ("Q64 sky texture %s is %d x %d, expected 32 x 64\n", mt->name, mt->width, mt->height);
|
console::dev_warn ("Q64 sky texture %s is %d x %d, expected 32 x 64\n", mt->name, mt->width, mt->height);
|
||||||
if (mt->width < 1 || mt->height < 2)
|
if (mt->width < 1 || mt->height < 2)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -254,7 +254,7 @@ void Sky_LoadSkyBox (const char *name)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Con_Printf ("Couldn't load %s\n", filename);
|
console::info ("Couldn't load %s\n", filename);
|
||||||
skybox_textures[i] = notexture;
|
skybox_textures[i] = notexture;
|
||||||
}
|
}
|
||||||
Hunk_FreeToLowMark (mark);
|
Hunk_FreeToLowMark (mark);
|
||||||
@@ -367,13 +367,13 @@ void Sky_SkyCommand_f (void)
|
|||||||
switch (command::argc())
|
switch (command::argc())
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
Con_Printf("\"sky\" is \"%s\"\n", skybox_name);
|
console::info("\"sky\" is \"%s\"\n", skybox_name);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Sky_LoadSkyBox(command::argv(1)->c_str());
|
Sky_LoadSkyBox(command::argv(1)->c_str());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("usage: sky <skyname>\n");
|
console::info("usage: sky <skyname>\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-10
@@ -81,8 +81,8 @@ TexMgr_DescribeTextureModes_f -- report available texturemodes
|
|||||||
static void TexMgr_DescribeTextureModes_f(void) {
|
static void TexMgr_DescribeTextureModes_f(void) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < NUM_GLMODES; i++)
|
for (i = 0; i < NUM_GLMODES; i++)
|
||||||
Con_SafePrintf(" %2i: %s\n", i + 1, glmodes[i].name);
|
console::safe_print(" %2i: %s\n", i + 1, glmodes[i].name);
|
||||||
Con_Printf("%i modes\n", i);
|
console::info("%i modes\n", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -144,7 +144,7 @@ static void TexMgr_TextureMode_f(convar *var) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("\"%s\" is not a valid texturemode\n", gl_texturemode.string);
|
console::info("\"%s\" is not a valid texturemode\n", gl_texturemode.string);
|
||||||
gl_texturemode.set(glmodes[glmode_idx].name);
|
gl_texturemode.set(glmodes[glmode_idx].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ static void TexMgr_Imagelist_f(void) {
|
|||||||
gltexture_t *glt;
|
gltexture_t *glt;
|
||||||
|
|
||||||
for (glt = active_gltextures; glt; glt = glt->next) {
|
for (glt = active_gltextures; glt; glt = glt->next) {
|
||||||
Con_SafePrintf(" %4i x%4i %s\n", glt->width, glt->height, glt->name);
|
console::safe_print(" %4i x%4i %s\n", glt->width, glt->height, glt->name);
|
||||||
if (glt->flags & TEXPREF_MIPMAP)
|
if (glt->flags & TEXPREF_MIPMAP)
|
||||||
texels += glt->width * glt->height * 4.0f / 3.0f;
|
texels += glt->width * glt->height * 4.0f / 3.0f;
|
||||||
else
|
else
|
||||||
@@ -191,7 +191,7 @@ static void TexMgr_Imagelist_f(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mb = texels * (convar::variable_value("vid_bpp").value_or(0.0) / 8.0f) / 0x100000;
|
mb = texels * (convar::variable_value("vid_bpp").value_or(0.0) / 8.0f) / 0x100000;
|
||||||
Con_Printf("%i textures %i pixels %1.1f megabytes\n", numgltextures, (int) texels, mb);
|
console::info("%i textures %i pixels %1.1f megabytes\n", numgltextures, (int) texels, mb);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -232,7 +232,7 @@ static void TexMgr_Imagedump_f(void) {
|
|||||||
free(buffer);
|
free(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("dumped %i textures to %s\n", numgltextures, dirname);
|
console::info("dumped %i textures to %s\n", numgltextures, dirname);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -322,7 +322,7 @@ void TexMgr_FreeTexture(gltexture_t *kill) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (kill == NULL) {
|
if (kill == NULL) {
|
||||||
Con_Printf("TexMgr_FreeTexture: NULL texture\n");
|
console::info("TexMgr_FreeTexture: NULL texture\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,7 +348,7 @@ void TexMgr_FreeTexture(gltexture_t *kill) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("TexMgr_FreeTexture: not found\n");
|
console::info("TexMgr_FreeTexture: not found\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1263,7 +1263,7 @@ void TexMgr_ReloadImage(gltexture_t *glt, int shirt, int pants) {
|
|||||||
}
|
}
|
||||||
if (!data) {
|
if (!data) {
|
||||||
invalid:
|
invalid:
|
||||||
Con_Printf("TexMgr_ReloadImage: invalid source for %s\n", glt->name);
|
console::info("TexMgr_ReloadImage: invalid source for %s\n", glt->name);
|
||||||
Hunk_FreeToLowMark(mark);
|
Hunk_FreeToLowMark(mark);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1280,7 +1280,7 @@ void TexMgr_ReloadImage(gltexture_t *glt, int shirt, int pants) {
|
|||||||
glt->shirt = shirt;
|
glt->shirt = shirt;
|
||||||
glt->pants = pants;
|
glt->pants = pants;
|
||||||
} else
|
} else
|
||||||
Con_Printf("TexMgr_ReloadImage: can't colormap a non SRC_INDEXED texture: %s\n", glt->name);
|
console::info("TexMgr_ReloadImage: can't colormap a non SRC_INDEXED texture: %s\n", glt->name);
|
||||||
}
|
}
|
||||||
if (glt->shirt > -1 && glt->pants > -1) {
|
if (glt->shirt > -1 && glt->pants > -1) {
|
||||||
//create new translation table
|
//create new translation table
|
||||||
|
|||||||
+78
-78
@@ -207,18 +207,18 @@ static void VID_Gamma_SetGamma(void) {
|
|||||||
#if defined(USE_SDL2)
|
#if defined(USE_SDL2)
|
||||||
# if USE_GAMMA_RAMPS
|
# if USE_GAMMA_RAMPS
|
||||||
if (SDL_SetWindowGammaRamp(draw_context, vid_gamma_red, vid_gamma_green, vid_gamma_blue) != 0)
|
if (SDL_SetWindowGammaRamp(draw_context, vid_gamma_red, vid_gamma_green, vid_gamma_blue) != 0)
|
||||||
Con_Printf("VID_Gamma_SetGamma: failed on SDL_SetWindowGammaRamp\n");
|
console::info("VID_Gamma_SetGamma: failed on SDL_SetWindowGammaRamp\n");
|
||||||
# else
|
# else
|
||||||
if (SDL_SetWindowBrightness(draw_context, value) != 0)
|
if (SDL_SetWindowBrightness(draw_context, value) != 0)
|
||||||
Con_Printf("VID_Gamma_SetGamma: failed on SDL_SetWindowBrightness\n");
|
console::info("VID_Gamma_SetGamma: failed on SDL_SetWindowBrightness\n");
|
||||||
# endif
|
# endif
|
||||||
#else /* USE_SDL2 */
|
#else /* USE_SDL2 */
|
||||||
# if USE_GAMMA_RAMPS
|
# if USE_GAMMA_RAMPS
|
||||||
if (SDL_SetGammaRamp(vid_gamma_red, vid_gamma_green, vid_gamma_blue) == -1)
|
if (SDL_SetGammaRamp(vid_gamma_red, vid_gamma_green, vid_gamma_blue) == -1)
|
||||||
Con_Printf("VID_Gamma_SetGamma: failed on SDL_SetGammaRamp\n");
|
console::info("VID_Gamma_SetGamma: failed on SDL_SetGammaRamp\n");
|
||||||
# else
|
# else
|
||||||
if (SDL_SetGamma(value, value, value) == -1)
|
if (SDL_SetGamma(value, value, value) == -1)
|
||||||
Con_Printf("VID_Gamma_SetGamma: failed on SDL_SetGamma\n");
|
console::info("VID_Gamma_SetGamma: failed on SDL_SetGamma\n");
|
||||||
# endif
|
# endif
|
||||||
#endif /* USE_SDL2 */
|
#endif /* USE_SDL2 */
|
||||||
}
|
}
|
||||||
@@ -237,18 +237,18 @@ static void VID_Gamma_Restore(void) {
|
|||||||
#if defined(USE_SDL2)
|
#if defined(USE_SDL2)
|
||||||
# if USE_GAMMA_RAMPS
|
# if USE_GAMMA_RAMPS
|
||||||
if (SDL_SetWindowGammaRamp(draw_context, vid_sysgamma_red, vid_sysgamma_green, vid_sysgamma_blue) != 0)
|
if (SDL_SetWindowGammaRamp(draw_context, vid_sysgamma_red, vid_sysgamma_green, vid_sysgamma_blue) != 0)
|
||||||
Con_Printf("VID_Gamma_Restore: failed on SDL_SetWindowGammaRamp\n");
|
console::info("VID_Gamma_Restore: failed on SDL_SetWindowGammaRamp\n");
|
||||||
# else
|
# else
|
||||||
if (SDL_SetWindowBrightness(draw_context, 1) != 0)
|
if (SDL_SetWindowBrightness(draw_context, 1) != 0)
|
||||||
Con_Printf("VID_Gamma_Restore: failed on SDL_SetWindowBrightness\n");
|
console::info("VID_Gamma_Restore: failed on SDL_SetWindowBrightness\n");
|
||||||
# endif
|
# endif
|
||||||
#else /* USE_SDL2 */
|
#else /* USE_SDL2 */
|
||||||
# if USE_GAMMA_RAMPS
|
# if USE_GAMMA_RAMPS
|
||||||
if (SDL_SetGammaRamp(vid_sysgamma_red, vid_sysgamma_green, vid_sysgamma_blue) == -1)
|
if (SDL_SetGammaRamp(vid_sysgamma_red, vid_sysgamma_green, vid_sysgamma_blue) == -1)
|
||||||
Con_Printf("VID_Gamma_Restore: failed on SDL_SetGammaRamp\n");
|
console::info("VID_Gamma_Restore: failed on SDL_SetGammaRamp\n");
|
||||||
# else
|
# else
|
||||||
if (SDL_SetGamma(1, 1, 1) == -1)
|
if (SDL_SetGamma(1, 1, 1) == -1)
|
||||||
Con_Printf("VID_Gamma_Restore: failed on SDL_SetGamma\n");
|
console::info("VID_Gamma_Restore: failed on SDL_SetGamma\n");
|
||||||
# endif
|
# endif
|
||||||
#endif /* USE_SDL2 */
|
#endif /* USE_SDL2 */
|
||||||
}
|
}
|
||||||
@@ -319,7 +319,7 @@ static void VID_Gamma_Init(void) {
|
|||||||
#endif /* USE_SDL2 */
|
#endif /* USE_SDL2 */
|
||||||
|
|
||||||
if (!gammaworks)
|
if (!gammaworks)
|
||||||
Con_SafePrintf("gamma adjustment not available\n");
|
console::safe_print("gamma adjustment not available\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -565,7 +565,7 @@ static bool VID_SetMode(int width, int height, int refreshrate, int bpp, bool fu
|
|||||||
int previous_display;
|
int previous_display;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// so Con_Printfs don't mess us up by forcing vid and snd updates
|
// so console::infos don't mess us up by forcing vid and snd updates
|
||||||
temp = scr_disabled_for_loading;
|
temp = scr_disabled_for_loading;
|
||||||
scr_disabled_for_loading = true;
|
scr_disabled_for_loading = true;
|
||||||
|
|
||||||
@@ -728,7 +728,7 @@ static bool VID_SetMode(int width, int height, int refreshrate, int bpp, bool fu
|
|||||||
// fix the leftover Alt from any Alt-Tab or the like that switched us away
|
// fix the leftover Alt from any Alt-Tab or the like that switched us away
|
||||||
ClearAllStates();
|
ClearAllStates();
|
||||||
|
|
||||||
Con_SafePrintf("Video mode %dx%dx%d %dHz (%d-bit z-buffer, %dx FSAA) initialized\n",
|
console::safe_print("Video mode %dx%dx%d %dHz (%d-bit z-buffer, %dx FSAA) initialized\n",
|
||||||
VID_GetCurrentWidth(),
|
VID_GetCurrentWidth(),
|
||||||
VID_GetCurrentHeight(),
|
VID_GetCurrentHeight(),
|
||||||
VID_GetCurrentBPP(),
|
VID_GetCurrentBPP(),
|
||||||
@@ -775,7 +775,7 @@ static void VID_Restart(void) {
|
|||||||
// validate new mode
|
// validate new mode
|
||||||
//
|
//
|
||||||
if (!VID_ValidMode(width, height, refreshrate, bpp, fullscreen)) {
|
if (!VID_ValidMode(width, height, refreshrate, bpp, fullscreen)) {
|
||||||
Con_Printf("%dx%dx%d %dHz %s is not a valid mode\n",
|
console::info("%dx%dx%d %dHz %s is not a valid mode\n",
|
||||||
width, height, bpp, refreshrate, fullscreen ? "fullscreen" : "windowed");
|
width, height, bpp, refreshrate, fullscreen ? "fullscreen" : "windowed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -933,10 +933,10 @@ GL_Info_f -- johnfitz
|
|||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
static void GL_Info_f(void) {
|
static void GL_Info_f(void) {
|
||||||
Con_SafePrintf("GL_VENDOR: %s\n", gl_vendor);
|
console::safe_print("GL_VENDOR: %s\n", gl_vendor);
|
||||||
Con_SafePrintf("GL_RENDERER: %s\n", gl_renderer);
|
console::safe_print("GL_RENDERER: %s\n", gl_renderer);
|
||||||
Con_SafePrintf("GL_VERSION: %s\n", gl_version);
|
console::safe_print("GL_VERSION: %s\n", gl_version);
|
||||||
Con_Printf("GL_EXTENSIONS: %s\n", gl_extensions_nice);
|
console::info("GL_EXTENSIONS: %s\n", gl_extensions_nice);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -973,9 +973,9 @@ static void GL_CheckExtensions(void) {
|
|||||||
// ARB_vertex_buffer_object
|
// ARB_vertex_buffer_object
|
||||||
//
|
//
|
||||||
if (common::check_param("-novbo").has_value())
|
if (common::check_param("-novbo").has_value())
|
||||||
Con_Warning("Vertex buffer objects disabled at command line\n");
|
console::warn("Vertex buffer objects disabled at command line\n");
|
||||||
else if (gl_version_major < 1 || (gl_version_major == 1 && gl_version_minor < 5))
|
else if (gl_version_major < 1 || (gl_version_major == 1 && gl_version_minor < 5))
|
||||||
Con_Warning("OpenGL version < 1.5, skipping ARB_vertex_buffer_object check\n");
|
console::warn("OpenGL version < 1.5, skipping ARB_vertex_buffer_object check\n");
|
||||||
else {
|
else {
|
||||||
GL_BindBufferFunc = (PFNGLBINDBUFFERARBPROC) SDL_GL_GetProcAddress("glBindBufferARB");
|
GL_BindBufferFunc = (PFNGLBINDBUFFERARBPROC) SDL_GL_GetProcAddress("glBindBufferARB");
|
||||||
GL_BufferDataFunc = (PFNGLBUFFERDATAARBPROC) SDL_GL_GetProcAddress("glBufferDataARB");
|
GL_BufferDataFunc = (PFNGLBUFFERDATAARBPROC) SDL_GL_GetProcAddress("glBufferDataARB");
|
||||||
@@ -984,70 +984,70 @@ static void GL_CheckExtensions(void) {
|
|||||||
GL_GenBuffersFunc = (PFNGLGENBUFFERSARBPROC) SDL_GL_GetProcAddress("glGenBuffersARB");
|
GL_GenBuffersFunc = (PFNGLGENBUFFERSARBPROC) SDL_GL_GetProcAddress("glGenBuffersARB");
|
||||||
if (GL_BindBufferFunc && GL_BufferDataFunc && GL_BufferSubDataFunc && GL_DeleteBuffersFunc &&
|
if (GL_BindBufferFunc && GL_BufferDataFunc && GL_BufferSubDataFunc && GL_DeleteBuffersFunc &&
|
||||||
GL_GenBuffersFunc) {
|
GL_GenBuffersFunc) {
|
||||||
Con_Printf("FOUND: ARB_vertex_buffer_object\n");
|
console::info("FOUND: ARB_vertex_buffer_object\n");
|
||||||
gl_vbo_able = true;
|
gl_vbo_able = true;
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("ARB_vertex_buffer_object not available\n");
|
console::warn("ARB_vertex_buffer_object not available\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// multitexture
|
// multitexture
|
||||||
//
|
//
|
||||||
if (common::check_param("-nomtex").has_value())
|
if (common::check_param("-nomtex").has_value())
|
||||||
Con_Warning("Mutitexture disabled at command line\n");
|
console::warn("Mutitexture disabled at command line\n");
|
||||||
else if (GL_ParseExtensionList(gl_extensions, "GL_ARB_multitexture")) {
|
else if (GL_ParseExtensionList(gl_extensions, "GL_ARB_multitexture")) {
|
||||||
GL_MTexCoord2fFunc = (PFNGLMULTITEXCOORD2FARBPROC) SDL_GL_GetProcAddress("glMultiTexCoord2fARB");
|
GL_MTexCoord2fFunc = (PFNGLMULTITEXCOORD2FARBPROC) SDL_GL_GetProcAddress("glMultiTexCoord2fARB");
|
||||||
GL_SelectTextureFunc = (PFNGLACTIVETEXTUREARBPROC) SDL_GL_GetProcAddress("glActiveTextureARB");
|
GL_SelectTextureFunc = (PFNGLACTIVETEXTUREARBPROC) SDL_GL_GetProcAddress("glActiveTextureARB");
|
||||||
GL_ClientActiveTextureFunc = (PFNGLCLIENTACTIVETEXTUREARBPROC)
|
GL_ClientActiveTextureFunc = (PFNGLCLIENTACTIVETEXTUREARBPROC)
|
||||||
SDL_GL_GetProcAddress("glClientActiveTextureARB");
|
SDL_GL_GetProcAddress("glClientActiveTextureARB");
|
||||||
if (GL_MTexCoord2fFunc && GL_SelectTextureFunc && GL_ClientActiveTextureFunc) {
|
if (GL_MTexCoord2fFunc && GL_SelectTextureFunc && GL_ClientActiveTextureFunc) {
|
||||||
Con_Printf("FOUND: ARB_multitexture\n");
|
console::info("FOUND: ARB_multitexture\n");
|
||||||
gl_mtexable = true;
|
gl_mtexable = true;
|
||||||
|
|
||||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &gl_max_texture_units);
|
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &gl_max_texture_units);
|
||||||
Con_Printf("GL_MAX_TEXTURE_UNITS: %d\n", (int) gl_max_texture_units);
|
console::info("GL_MAX_TEXTURE_UNITS: %d\n", (int) gl_max_texture_units);
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("Couldn't link to multitexture functions\n");
|
console::warn("Couldn't link to multitexture functions\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("multitexture not supported (extension not found)\n");
|
console::warn("multitexture not supported (extension not found)\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// texture_env_combine
|
// texture_env_combine
|
||||||
//
|
//
|
||||||
if (common::check_param("-nocombine").has_value())
|
if (common::check_param("-nocombine").has_value())
|
||||||
Con_Warning("texture_env_combine disabled at command line\n");
|
console::warn("texture_env_combine disabled at command line\n");
|
||||||
else if (GL_ParseExtensionList(gl_extensions, "GL_ARB_texture_env_combine")) {
|
else if (GL_ParseExtensionList(gl_extensions, "GL_ARB_texture_env_combine")) {
|
||||||
Con_Printf("FOUND: ARB_texture_env_combine\n");
|
console::info("FOUND: ARB_texture_env_combine\n");
|
||||||
gl_texture_env_combine = true;
|
gl_texture_env_combine = true;
|
||||||
} else if (GL_ParseExtensionList(gl_extensions, "GL_EXT_texture_env_combine")) {
|
} else if (GL_ParseExtensionList(gl_extensions, "GL_EXT_texture_env_combine")) {
|
||||||
Con_Printf("FOUND: EXT_texture_env_combine\n");
|
console::info("FOUND: EXT_texture_env_combine\n");
|
||||||
gl_texture_env_combine = true;
|
gl_texture_env_combine = true;
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("texture_env_combine not supported\n");
|
console::warn("texture_env_combine not supported\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// texture_env_add
|
// texture_env_add
|
||||||
//
|
//
|
||||||
if (common::check_param("-noadd").has_value())
|
if (common::check_param("-noadd").has_value())
|
||||||
Con_Warning("texture_env_add disabled at command line\n");
|
console::warn("texture_env_add disabled at command line\n");
|
||||||
else if (GL_ParseExtensionList(gl_extensions, "GL_ARB_texture_env_add")) {
|
else if (GL_ParseExtensionList(gl_extensions, "GL_ARB_texture_env_add")) {
|
||||||
Con_Printf("FOUND: ARB_texture_env_add\n");
|
console::info("FOUND: ARB_texture_env_add\n");
|
||||||
gl_texture_env_add = true;
|
gl_texture_env_add = true;
|
||||||
} else if (GL_ParseExtensionList(gl_extensions, "GL_EXT_texture_env_add")) {
|
} else if (GL_ParseExtensionList(gl_extensions, "GL_EXT_texture_env_add")) {
|
||||||
Con_Printf("FOUND: EXT_texture_env_add\n");
|
console::info("FOUND: EXT_texture_env_add\n");
|
||||||
gl_texture_env_add = true;
|
gl_texture_env_add = true;
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("texture_env_add not supported\n");
|
console::warn("texture_env_add not supported\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// swap control
|
// swap control
|
||||||
//
|
//
|
||||||
if (!gl_swap_control) {
|
if (!gl_swap_control) {
|
||||||
#if defined(USE_SDL2)
|
#if defined(USE_SDL2)
|
||||||
Con_Warning("vertical sync not supported (SDL_GL_SetSwapInterval failed)\n");
|
console::warn("vertical sync not supported (SDL_GL_SetSwapInterval failed)\n");
|
||||||
#else
|
#else
|
||||||
Con_Warning("vertical sync not supported (SDL_GL_SetAttribute failed)\n");
|
console::warn("vertical sync not supported (SDL_GL_SetAttribute failed)\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#if defined(USE_SDL2)
|
#if defined(USE_SDL2)
|
||||||
@@ -1058,18 +1058,18 @@ static void GL_CheckExtensions(void) {
|
|||||||
{
|
{
|
||||||
gl_swap_control = false;
|
gl_swap_control = false;
|
||||||
#if defined(USE_SDL2)
|
#if defined(USE_SDL2)
|
||||||
Con_Warning("vertical sync not supported (SDL_GL_GetSwapInterval failed)\n");
|
console::warn("vertical sync not supported (SDL_GL_GetSwapInterval failed)\n");
|
||||||
#else
|
#else
|
||||||
Con_Warning("vertical sync not supported (SDL_GL_GetAttribute failed)\n");
|
console::warn("vertical sync not supported (SDL_GL_GetAttribute failed)\n");
|
||||||
#endif
|
#endif
|
||||||
} else if ((vid_vsync.value && swap_control != 1) || (!vid_vsync.value && swap_control != 0)) {
|
} else if ((vid_vsync.value && swap_control != 1) || (!vid_vsync.value && swap_control != 0)) {
|
||||||
gl_swap_control = false;
|
gl_swap_control = false;
|
||||||
Con_Warning("vertical sync not supported (swap_control doesn't match vid_vsync)\n");
|
console::warn("vertical sync not supported (swap_control doesn't match vid_vsync)\n");
|
||||||
} else {
|
} else {
|
||||||
#if defined(USE_SDL2)
|
#if defined(USE_SDL2)
|
||||||
Con_Printf("FOUND: SDL_GL_SetSwapInterval\n");
|
console::info("FOUND: SDL_GL_SetSwapInterval\n");
|
||||||
#else
|
#else
|
||||||
Con_Printf("FOUND: SDL_GL_SWAP_CONTROL\n");
|
console::info("FOUND: SDL_GL_SWAP_CONTROL\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1090,10 +1090,10 @@ static void GL_CheckExtensions(void) {
|
|||||||
glDeleteTextures(1, &tex);
|
glDeleteTextures(1, &tex);
|
||||||
|
|
||||||
if (test1 == 1 && test2 == 2) {
|
if (test1 == 1 && test2 == 2) {
|
||||||
Con_Printf("FOUND: EXT_texture_filter_anisotropic\n");
|
console::info("FOUND: EXT_texture_filter_anisotropic\n");
|
||||||
gl_anisotropy_able = true;
|
gl_anisotropy_able = true;
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("anisotropic filtering locked by driver. Current driver setting is %f\n", test1);
|
console::warn("anisotropic filtering locked by driver. Current driver setting is %f\n", test1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//get max value either way, so the menu and stuff know it
|
//get max value either way, so the menu and stuff know it
|
||||||
@@ -1101,28 +1101,28 @@ static void GL_CheckExtensions(void) {
|
|||||||
if (gl_max_anisotropy < 2) {
|
if (gl_max_anisotropy < 2) {
|
||||||
gl_anisotropy_able = false;
|
gl_anisotropy_able = false;
|
||||||
gl_max_anisotropy = 1;
|
gl_max_anisotropy = 1;
|
||||||
Con_Warning("anisotropic filtering broken: disabled\n");
|
console::warn("anisotropic filtering broken: disabled\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gl_max_anisotropy = 1;
|
gl_max_anisotropy = 1;
|
||||||
Con_Warning("texture_filter_anisotropic not supported\n");
|
console::warn("texture_filter_anisotropic not supported\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// texture_non_power_of_two
|
// texture_non_power_of_two
|
||||||
//
|
//
|
||||||
if (common::check_param("-notexturenpot").has_value())
|
if (common::check_param("-notexturenpot").has_value())
|
||||||
Con_Warning("texture_non_power_of_two disabled at command line\n");
|
console::warn("texture_non_power_of_two disabled at command line\n");
|
||||||
else if (GL_ParseExtensionList(gl_extensions, "GL_ARB_texture_non_power_of_two")) {
|
else if (GL_ParseExtensionList(gl_extensions, "GL_ARB_texture_non_power_of_two")) {
|
||||||
Con_Printf("FOUND: ARB_texture_non_power_of_two\n");
|
console::info("FOUND: ARB_texture_non_power_of_two\n");
|
||||||
gl_texture_NPOT = true;
|
gl_texture_NPOT = true;
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("texture_non_power_of_two not supported\n");
|
console::warn("texture_non_power_of_two not supported\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// GLSL
|
// GLSL
|
||||||
//
|
//
|
||||||
if (common::check_param("-noglsl").has_value())
|
if (common::check_param("-noglsl").has_value())
|
||||||
Con_Warning("GLSL disabled at command line\n");
|
console::warn("GLSL disabled at command line\n");
|
||||||
else if (gl_version_major >= 2) {
|
else if (gl_version_major >= 2) {
|
||||||
GL_CreateShaderFunc = (QS_PFNGLCREATESHADERPROC) SDL_GL_GetProcAddress("glCreateShader");
|
GL_CreateShaderFunc = (QS_PFNGLCREATESHADERPROC) SDL_GL_GetProcAddress("glCreateShader");
|
||||||
GL_DeleteShaderFunc = (QS_PFNGLDELETESHADERPROC) SDL_GL_GetProcAddress("glDeleteShader");
|
GL_DeleteShaderFunc = (QS_PFNGLDELETESHADERPROC) SDL_GL_GetProcAddress("glDeleteShader");
|
||||||
@@ -1173,70 +1173,70 @@ static void GL_CheckExtensions(void) {
|
|||||||
GL_Uniform1fFunc &&
|
GL_Uniform1fFunc &&
|
||||||
GL_Uniform3fFunc &&
|
GL_Uniform3fFunc &&
|
||||||
GL_Uniform4fFunc) {
|
GL_Uniform4fFunc) {
|
||||||
Con_Printf("FOUND: GLSL\n");
|
console::info("FOUND: GLSL\n");
|
||||||
gl_glsl_able = true;
|
gl_glsl_able = true;
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("GLSL not available\n");
|
console::warn("GLSL not available\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("OpenGL version < 2, GLSL not available\n");
|
console::warn("OpenGL version < 2, GLSL not available\n");
|
||||||
}
|
}
|
||||||
// GLSL gamma
|
// GLSL gamma
|
||||||
//
|
//
|
||||||
if (common::check_param("-noglslgamma").has_value())
|
if (common::check_param("-noglslgamma").has_value())
|
||||||
Con_Warning("GLSL gamma disabled at command line\n");
|
console::warn("GLSL gamma disabled at command line\n");
|
||||||
else if (gl_glsl_able) {
|
else if (gl_glsl_able) {
|
||||||
gl_glsl_gamma_able = true;
|
gl_glsl_gamma_able = true;
|
||||||
Con_Printf("Enabled: GLSL gamma\n");
|
console::info("Enabled: GLSL gamma\n");
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("GLSL gamma not available, using hardware gamma\n");
|
console::warn("GLSL gamma not available, using hardware gamma\n");
|
||||||
}
|
}
|
||||||
// GLSL alias model rendering
|
// GLSL alias model rendering
|
||||||
//
|
//
|
||||||
if (common::check_param("-noglslalias").has_value())
|
if (common::check_param("-noglslalias").has_value())
|
||||||
Con_Warning("GLSL alias model rendering disabled at command line\n");
|
console::warn("GLSL alias model rendering disabled at command line\n");
|
||||||
else if (gl_glsl_able && gl_vbo_able && gl_max_texture_units >= 3) {
|
else if (gl_glsl_able && gl_vbo_able && gl_max_texture_units >= 3) {
|
||||||
gl_glsl_alias_able = true;
|
gl_glsl_alias_able = true;
|
||||||
Con_Printf("Enabled: GLSL alias model rendering\n");
|
console::info("Enabled: GLSL alias model rendering\n");
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("GLSL alias model rendering not available, using Fitz renderer\n");
|
console::warn("GLSL alias model rendering not available, using Fitz renderer\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// packed_pixels
|
// packed_pixels
|
||||||
//
|
//
|
||||||
if (common::check_param("-nopackedpixels").has_value())
|
if (common::check_param("-nopackedpixels").has_value())
|
||||||
Con_Warning("EXT_packed_pixels disabled at command line\n");
|
console::warn("EXT_packed_pixels disabled at command line\n");
|
||||||
else if (gl_glsl_alias_able) {
|
else if (gl_glsl_alias_able) {
|
||||||
gl_packed_pixels = true;
|
gl_packed_pixels = true;
|
||||||
Con_Printf("Enabled: EXT_packed_pixels\n");
|
console::info("Enabled: EXT_packed_pixels\n");
|
||||||
}
|
}
|
||||||
#if 0 /* Disabling for non-GLSL path, needs more surgery. */
|
#if 0 /* Disabling for non-GLSL path, needs more surgery. */
|
||||||
else if (GL_ParseExtensionList(gl_extensions, "GL_APPLE_packed_pixels")) {
|
else if (GL_ParseExtensionList(gl_extensions, "GL_APPLE_packed_pixels")) {
|
||||||
Con_Printf("FOUND: APPLE_packed_pixels\n");
|
console::info("FOUND: APPLE_packed_pixels\n");
|
||||||
gl_packed_pixels = true;
|
gl_packed_pixels = true;
|
||||||
} else if (GL_ParseExtensionList(gl_extensions, "GL_EXT_packed_pixels")) {
|
} else if (GL_ParseExtensionList(gl_extensions, "GL_EXT_packed_pixels")) {
|
||||||
Con_Printf("FOUND: EXT_packed_pixels\n");
|
console::info("FOUND: EXT_packed_pixels\n");
|
||||||
gl_packed_pixels = true;
|
gl_packed_pixels = true;
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("packed_pixels not supported\n");
|
console::warn("packed_pixels not supported\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// glGenerateMipmap for warp textures
|
// glGenerateMipmap for warp textures
|
||||||
if (common::check_param("-nowarpmipmaps").has_value())
|
if (common::check_param("-nowarpmipmaps").has_value())
|
||||||
Con_Warning("glGenerateMipmap disabled at command line\n");
|
console::warn("glGenerateMipmap disabled at command line\n");
|
||||||
else {
|
else {
|
||||||
if (gl_version_major >= 3 || GL_ParseExtensionList(gl_extensions, "GL_ARB_framebuffer_object")) {
|
if (gl_version_major >= 3 || GL_ParseExtensionList(gl_extensions, "GL_ARB_framebuffer_object")) {
|
||||||
GL_GenerateMipmap = (QS_PFNGENERATEMIPMAP) SDL_GL_GetProcAddress("glGenerateMipmap");
|
GL_GenerateMipmap = (QS_PFNGENERATEMIPMAP) SDL_GL_GetProcAddress("glGenerateMipmap");
|
||||||
if (GL_GenerateMipmap != NULL)
|
if (GL_GenerateMipmap != NULL)
|
||||||
Con_Printf("FOUND: glGenerateMipmap\n");
|
console::info("FOUND: glGenerateMipmap\n");
|
||||||
} else if (GL_ParseExtensionList(gl_extensions, "GL_EXT_framebuffer_object")) {
|
} else if (GL_ParseExtensionList(gl_extensions, "GL_EXT_framebuffer_object")) {
|
||||||
GL_GenerateMipmap = (QS_PFNGENERATEMIPMAP) SDL_GL_GetProcAddress("glGenerateMipmapEXT");
|
GL_GenerateMipmap = (QS_PFNGENERATEMIPMAP) SDL_GL_GetProcAddress("glGenerateMipmapEXT");
|
||||||
if (GL_GenerateMipmap != NULL)
|
if (GL_GenerateMipmap != NULL)
|
||||||
Con_Printf("FOUND: glGenerateMipmapEXT\n");
|
console::info("FOUND: glGenerateMipmapEXT\n");
|
||||||
}
|
}
|
||||||
if (GL_GenerateMipmap == NULL)
|
if (GL_GenerateMipmap == NULL)
|
||||||
Con_Warning("glGenerateMipmap not available, liquids won't have mipmaps\n");
|
console::warn("glGenerateMipmap not available, liquids won't have mipmaps\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1278,9 +1278,9 @@ static void GL_Init(void) {
|
|||||||
gl_version = (const char *) glGetString(GL_VERSION);
|
gl_version = (const char *) glGetString(GL_VERSION);
|
||||||
gl_extensions = (const char *) glGetString(GL_EXTENSIONS);
|
gl_extensions = (const char *) glGetString(GL_EXTENSIONS);
|
||||||
|
|
||||||
Con_SafePrintf("GL_VENDOR: %s\n", gl_vendor);
|
console::safe_print("GL_VENDOR: %s\n", gl_vendor);
|
||||||
Con_SafePrintf("GL_RENDERER: %s\n", gl_renderer);
|
console::safe_print("GL_RENDERER: %s\n", gl_renderer);
|
||||||
Con_SafePrintf("GL_VERSION: %s\n", gl_version);
|
console::safe_print("GL_VERSION: %s\n", gl_version);
|
||||||
|
|
||||||
if (gl_version == NULL || sscanf(gl_version, "%d.%d", &gl_version_major, &gl_version_minor) < 2) {
|
if (gl_version == NULL || sscanf(gl_version, "%d.%d", &gl_version_major, &gl_version_minor) < 2) {
|
||||||
gl_version_major = 0;
|
gl_version_major = 0;
|
||||||
@@ -1298,13 +1298,13 @@ static void GL_Init(void) {
|
|||||||
// https://developer.apple.com/library/mac/technotes/tn2085/
|
// https://developer.apple.com/library/mac/technotes/tn2085/
|
||||||
if (host_parms->numcpus > 1 &&
|
if (host_parms->numcpus > 1 &&
|
||||||
kCGLNoError != CGLEnable(CGLGetCurrentContext(), kCGLCEMPEngine)) {
|
kCGLNoError != CGLEnable(CGLGetCurrentContext(), kCGLCEMPEngine)) {
|
||||||
Con_Warning("Couldn't enable multi-threaded OpenGL");
|
console::warn("Couldn't enable multi-threaded OpenGL");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//johnfitz -- intel video workarounds from Baker
|
//johnfitz -- intel video workarounds from Baker
|
||||||
if (!strcmp(gl_vendor, "Intel")) {
|
if (!strcmp(gl_vendor, "Intel")) {
|
||||||
Con_Printf("Intel Display Adapter detected, enabling gl_clear\n");
|
console::info("Intel Display Adapter detected, enabling gl_clear\n");
|
||||||
command::buffer::add_text("gl_clear 1");
|
command::buffer::add_text("gl_clear 1");
|
||||||
}
|
}
|
||||||
//johnfitz
|
//johnfitz
|
||||||
@@ -1387,7 +1387,7 @@ VID_DescribeCurrentMode_f
|
|||||||
*/
|
*/
|
||||||
static void VID_DescribeCurrentMode_f(void) {
|
static void VID_DescribeCurrentMode_f(void) {
|
||||||
if (draw_context)
|
if (draw_context)
|
||||||
Con_Printf("%dx%dx%d %dHz %s\n",
|
console::info("%dx%dx%d %dHz %s\n",
|
||||||
VID_GetCurrentWidth(),
|
VID_GetCurrentWidth(),
|
||||||
VID_GetCurrentHeight(),
|
VID_GetCurrentHeight(),
|
||||||
VID_GetCurrentBPP(),
|
VID_GetCurrentBPP(),
|
||||||
@@ -1409,8 +1409,8 @@ static void VID_DescribeModes_f(void) {
|
|||||||
for (i = 0; i < nummodes; i++) {
|
for (i = 0; i < nummodes; i++) {
|
||||||
if (lastwidth != modelist[i].width || lastheight != modelist[i].height || lastbpp != modelist[i].bpp) {
|
if (lastwidth != modelist[i].width || lastheight != modelist[i].height || lastbpp != modelist[i].bpp) {
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
Con_SafePrintf("\n");
|
console::safe_print("\n");
|
||||||
Con_SafePrintf(" %4i x %4i x %i : %i", modelist[i].width, modelist[i].height, modelist[i].bpp,
|
console::safe_print(" %4i x %4i x %i : %i", modelist[i].width, modelist[i].height, modelist[i].bpp,
|
||||||
modelist[i].refreshrate);
|
modelist[i].refreshrate);
|
||||||
lastwidth = modelist[i].width;
|
lastwidth = modelist[i].width;
|
||||||
lastheight = modelist[i].height;
|
lastheight = modelist[i].height;
|
||||||
@@ -1418,7 +1418,7 @@ static void VID_DescribeModes_f(void) {
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Con_Printf("\n%i modes\n", count);
|
console::info("\n%i modes\n", count);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1429,7 +1429,7 @@ VID_FSAA_f -- ericw -- warn that vid_fsaa requires engine restart
|
|||||||
static void VID_FSAA_f(convar *var) {
|
static void VID_FSAA_f(convar *var) {
|
||||||
// don't print the warning if vid_fsaa is set during startup
|
// don't print the warning if vid_fsaa is set during startup
|
||||||
if (vid_initialized)
|
if (vid_initialized)
|
||||||
Con_Printf("%s %d requires engine restart to take effect\n", var->name.c_str(), (int) var->value);
|
console::info("%s %d requires engine restart to take effect\n", var->name.c_str(), (int) var->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
@@ -1509,7 +1509,7 @@ static void VID_InitModelist(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nummodes == originalnummodes)
|
if (nummodes == originalnummodes)
|
||||||
Con_SafePrintf("No fullscreen DIB modes found\n");
|
console::safe_print("No fullscreen DIB modes found\n");
|
||||||
#endif /* !defined(USE_SDL2) */
|
#endif /* !defined(USE_SDL2) */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1753,7 +1753,7 @@ void VID_Toggle(void) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vid_toggle_works = false;
|
vid_toggle_works = false;
|
||||||
Con_DPrintf("SDL_WM_ToggleFullScreen failed, attempting VID_Restart\n");
|
console::debug("SDL_WM_ToggleFullScreen failed, attempting VID_Restart\n");
|
||||||
vrestart:
|
vrestart:
|
||||||
vid_fullscreen.set(VID_GetFullscreen() ? "0" : "1");
|
vid_fullscreen.set(VID_GetFullscreen() ? "0" : "1");
|
||||||
command::buffer::add_text("vid_restart\n");
|
command::buffer::add_text("vid_restart\n");
|
||||||
|
|||||||
+19
-19
@@ -99,7 +99,7 @@ Max_Edicts_f -- johnfitz
|
|||||||
static void Max_Edicts_f(convar *var) {
|
static void Max_Edicts_f(convar *var) {
|
||||||
//TODO: clamp it here?
|
//TODO: clamp it here?
|
||||||
if (cls.state == ca_connected || sv.active)
|
if (cls.state == ca_connected || sv.active)
|
||||||
Con_Printf("Changes to max_edicts will not take effect until the next time a map is loaded.\n");
|
console::info("Changes to max_edicts will not take effect until the next time a map is loaded.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -109,7 +109,7 @@ Max_Fps_f -- ericw
|
|||||||
*/
|
*/
|
||||||
static void Max_Fps_f(convar *var) {
|
static void Max_Fps_f(convar *var) {
|
||||||
if (var->value > 72)
|
if (var->value > 72)
|
||||||
Con_Warning("host_maxfps above 72 breaks physics.\n");
|
console::warn("host_maxfps above 72 breaks physics.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -124,7 +124,7 @@ void Host_EndGame(const char *message, ...) {
|
|||||||
va_start(argptr, message);
|
va_start(argptr, message);
|
||||||
q_vsnprintf(string, sizeof(string), message, argptr);
|
q_vsnprintf(string, sizeof(string), message, argptr);
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
Con_DPrintf("Host_EndGame: %s\n", string);
|
console::debug("Host_EndGame: %s\n", string);
|
||||||
|
|
||||||
if (sv.active)
|
if (sv.active)
|
||||||
Host_ShutdownServer(false);
|
Host_ShutdownServer(false);
|
||||||
@@ -161,7 +161,7 @@ void Host_Error(const char *error, ...) {
|
|||||||
va_start(argptr, error);
|
va_start(argptr, error);
|
||||||
q_vsnprintf(string, sizeof(string), error, argptr);
|
q_vsnprintf(string, sizeof(string), error, argptr);
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
Con_Printf("Host_Error: %s\n", string);
|
console::info("Host_Error: %s\n", string);
|
||||||
|
|
||||||
if (sv.active)
|
if (sv.active)
|
||||||
Host_ShutdownServer(false);
|
Host_ShutdownServer(false);
|
||||||
@@ -222,9 +222,9 @@ void Host_FindMaxClients(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Host_Version_f(void) {
|
void Host_Version_f(void) {
|
||||||
Con_Printf("Quake Version %1.2f\n", VERSION);
|
console::info("Quake Version %1.2f\n", VERSION);
|
||||||
Con_Printf("QuakeSpasm Version " QUAKESPASM_VER_STRING "\n");
|
console::info("QuakeSpasm Version " QUAKESPASM_VER_STRING "\n");
|
||||||
Con_Printf("Exe: " __TIME__ " " __DATE__ "\n");
|
console::info("Exe: " __TIME__ " " __DATE__ "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* cvar callback functions : */
|
/* cvar callback functions : */
|
||||||
@@ -298,7 +298,7 @@ void Host_WriteConfiguration(void) {
|
|||||||
if (host_initialized && !isDedicated && !host_parms->errstate) {
|
if (host_initialized && !isDedicated && !host_parms->errstate) {
|
||||||
f = fopen(va("%s/config.cfg", com_gamedir), "w");
|
f = fopen(va("%s/config.cfg", com_gamedir), "w");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
Con_Printf("Couldn't write config.cfg.\n");
|
console::info("Couldn't write config.cfg.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,7 +487,7 @@ void Host_ShutdownServer(bool crash) {
|
|||||||
MSG_WriteByte(&buf, svc_disconnect);
|
MSG_WriteByte(&buf, svc_disconnect);
|
||||||
count = NET_SendToAll(&buf, 5.0);
|
count = NET_SendToAll(&buf, 5.0);
|
||||||
if (count)
|
if (count)
|
||||||
Con_Printf("Host_ShutdownServer: NET_SendToAll failed for %u clients\n", count);
|
console::info("Host_ShutdownServer: NET_SendToAll failed for %u clients\n", count);
|
||||||
|
|
||||||
for (i = 0, host_client = svs.clients; i < svs.maxclients; i++, host_client++)
|
for (i = 0, host_client = svs.clients; i < svs.maxclients; i++, host_client++)
|
||||||
if (host_client->active)
|
if (host_client->active)
|
||||||
@@ -510,7 +510,7 @@ not reinitialize anything.
|
|||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void Host_ClearMemory(void) {
|
void Host_ClearMemory(void) {
|
||||||
Con_DPrintf("Clearing memory\n");
|
console::debug("Clearing memory\n");
|
||||||
D_FlushCaches();
|
D_FlushCaches();
|
||||||
Mod_ClearAll();
|
Mod_ClearAll();
|
||||||
Sky_ClearAll();
|
Sky_ClearAll();
|
||||||
@@ -617,7 +617,7 @@ void Host_ServerFrame(void) {
|
|||||||
active++;
|
active++;
|
||||||
}
|
}
|
||||||
if (active > 600 && dev_peakstats.edicts <= 600)
|
if (active > 600 && dev_peakstats.edicts <= 600)
|
||||||
Con_DWarning("%i edicts exceeds standard limit of 600 (max = %d).\n", active, sv.max_edicts);
|
console::dev_warn("%i edicts exceeds standard limit of 600 (max = %d).\n", active, sv.max_edicts);
|
||||||
dev_stats.edicts = active;
|
dev_stats.edicts = active;
|
||||||
dev_peakstats.edicts = std::max(active, dev_peakstats.edicts);
|
dev_peakstats.edicts = std::max(active, dev_peakstats.edicts);
|
||||||
}
|
}
|
||||||
@@ -720,7 +720,7 @@ void _Host_Frame(float time) {
|
|||||||
time3 = Sys_DoubleTime();
|
time3 = Sys_DoubleTime();
|
||||||
pass2 = (time2 - time1) * 1000;
|
pass2 = (time2 - time1) * 1000;
|
||||||
pass3 = (time3 - time2) * 1000;
|
pass3 = (time3 - time2) * 1000;
|
||||||
Con_Printf("%3i tot %3i server %3i gfx %3i snd\n",
|
console::info("%3i tot %3i server %3i gfx %3i snd\n",
|
||||||
pass1 + pass2 + pass3, pass1, pass2, pass3);
|
pass1 + pass2 + pass3, pass1, pass2, pass3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -757,7 +757,7 @@ void Host_Frame(float time) {
|
|||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("serverprofile: %2i clients %2i msec\n", c, m);
|
console::info("serverprofile: %2i clients %2i msec\n", c, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -790,15 +790,15 @@ void Host_Init(void) {
|
|||||||
W_LoadWadFile(); //johnfitz -- filename is now hard-coded for honesty
|
W_LoadWadFile(); //johnfitz -- filename is now hard-coded for honesty
|
||||||
if (cls.state != ca_dedicated) {
|
if (cls.state != ca_dedicated) {
|
||||||
Key_Init();
|
Key_Init();
|
||||||
Con_Init();
|
console::init();
|
||||||
}
|
}
|
||||||
PR_Init();
|
PR_Init();
|
||||||
Mod_Init();
|
Mod_Init();
|
||||||
NET_Init();
|
NET_Init();
|
||||||
SV_Init();
|
SV_Init();
|
||||||
|
|
||||||
Con_Printf("Exe: " __TIME__ " " __DATE__ "\n");
|
console::info("Exe: " __TIME__ " " __DATE__ "\n");
|
||||||
Con_Printf("%4.1f megabyte heap\n", host_parms->memsize / (1024 * 1024.0));
|
console::info("%4.1f megabyte heap\n", host_parms->memsize / (1024 * 1024.0));
|
||||||
|
|
||||||
if (cls.state != ca_dedicated) {
|
if (cls.state != ca_dedicated) {
|
||||||
host_colormap = (byte *) COM_LoadHunkFile("gfx/colormap.lmp", NULL);
|
host_colormap = (byte *) COM_LoadHunkFile("gfx/colormap.lmp", NULL);
|
||||||
@@ -830,7 +830,7 @@ void Host_Init(void) {
|
|||||||
host_hunklevel = Hunk_LowMark();
|
host_hunklevel = Hunk_LowMark();
|
||||||
|
|
||||||
host_initialized = true;
|
host_initialized = true;
|
||||||
Con_Printf("\n========= Quake Initialized =========\n\n");
|
console::info("\n========= Quake Initialized =========\n\n");
|
||||||
|
|
||||||
if (cls.state != ca_dedicated) {
|
if (cls.state != ca_dedicated) {
|
||||||
command::buffer::insert_text("exec quake.rc\n");
|
command::buffer::insert_text("exec quake.rc\n");
|
||||||
@@ -866,7 +866,7 @@ void Host_Shutdown(void) {
|
|||||||
}
|
}
|
||||||
isdown = true;
|
isdown = true;
|
||||||
|
|
||||||
// keep Con_Printf from trying to update the screen
|
// keep console::info from trying to update the screen
|
||||||
scr_disabled_for_loading = true;
|
scr_disabled_for_loading = true;
|
||||||
|
|
||||||
Host_WriteConfiguration();
|
Host_WriteConfiguration();
|
||||||
@@ -874,7 +874,7 @@ void Host_Shutdown(void) {
|
|||||||
NET_Shutdown();
|
NET_Shutdown();
|
||||||
|
|
||||||
if (cls.state != ca_dedicated) {
|
if (cls.state != ca_dedicated) {
|
||||||
if (con_initialized)
|
if (console::initialized)
|
||||||
History_Shutdown();
|
History_Shutdown();
|
||||||
music::shutdown();
|
music::shutdown();
|
||||||
CDAudio_Shutdown();
|
CDAudio_Shutdown();
|
||||||
|
|||||||
+50
-50
@@ -187,12 +187,12 @@ static void Host_Maps_f(void) {
|
|||||||
filelist_item_t *level;
|
filelist_item_t *level;
|
||||||
|
|
||||||
for (level = extralevels, i = 0; level; level = level->next, i++)
|
for (level = extralevels, i = 0; level; level = level->next, i++)
|
||||||
Con_SafePrintf(" %s\n", level->name);
|
console::safe_print(" %s\n", level->name);
|
||||||
|
|
||||||
if (i)
|
if (i)
|
||||||
Con_SafePrintf("%i map(s)\n", i);
|
console::safe_print("%i map(s)\n", i);
|
||||||
else
|
else
|
||||||
Con_SafePrintf("no maps found\n");
|
console::safe_print("no maps found\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
@@ -347,12 +347,12 @@ static void Host_Mods_f(void) {
|
|||||||
filelist_item_t *mod;
|
filelist_item_t *mod;
|
||||||
|
|
||||||
for (mod = modlist, i = 0; mod; mod = mod->next, i++)
|
for (mod = modlist, i = 0; mod; mod = mod->next, i++)
|
||||||
Con_SafePrintf(" %s\n", mod->name);
|
console::safe_print(" %s\n", mod->name);
|
||||||
|
|
||||||
if (i)
|
if (i)
|
||||||
Con_SafePrintf("%i mod(s)\n", i);
|
console::safe_print("%i mod(s)\n", i);
|
||||||
else
|
else
|
||||||
Con_SafePrintf("no mods found\n");
|
console::safe_print("no mods found\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
@@ -364,16 +364,16 @@ Host_Mapname_f -- johnfitz
|
|||||||
*/
|
*/
|
||||||
static void Host_Mapname_f(void) {
|
static void Host_Mapname_f(void) {
|
||||||
if (sv.active) {
|
if (sv.active) {
|
||||||
Con_Printf("\"mapname\" is \"%s\"\n", sv.name);
|
console::info("\"mapname\" is \"%s\"\n", sv.name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cls.state == ca_connected) {
|
if (cls.state == ca_connected) {
|
||||||
Con_Printf("\"mapname\" is \"%s\"\n", cl.mapname);
|
console::info("\"mapname\" is \"%s\"\n", cl.mapname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("no map loaded\n");
|
console::info("no map loaded\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -395,7 +395,7 @@ static void Host_Status_f(void) {
|
|||||||
command::forward_to_server();
|
command::forward_to_server();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print_fn = Con_Printf;
|
print_fn = console::info;
|
||||||
} else
|
} else
|
||||||
print_fn = SV_ClientPrintf;
|
print_fn = SV_ClientPrintf;
|
||||||
|
|
||||||
@@ -460,7 +460,7 @@ static void Host_God_f(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("god [value] : toggle god mode. values: 0 = off, 1 = on\n");
|
console::info("god [value] : toggle god mode. values: 0 = off, 1 = on\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//johnfitz
|
//johnfitz
|
||||||
@@ -515,7 +515,7 @@ static void Host_Notarget_f(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("notarget [value] : toggle notarget mode. values: 0 = off, 1 = on\n");
|
console::info("notarget [value] : toggle notarget mode. values: 0 = off, 1 = on\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//johnfitz
|
//johnfitz
|
||||||
@@ -562,7 +562,7 @@ static void Host_Noclip_f(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("noclip [value] : toggle noclip mode. values: 0 = off, 1 = on\n");
|
console::info("noclip [value] : toggle noclip mode. values: 0 = off, 1 = on\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//johnfitz
|
//johnfitz
|
||||||
@@ -660,7 +660,7 @@ static void Host_Fly_f(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("fly [value] : toggle fly mode. values: 0 = off, 1 = on\n");
|
console::info("fly [value] : toggle fly mode. values: 0 = off, 1 = on\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//johnfitz
|
//johnfitz
|
||||||
@@ -719,13 +719,13 @@ static void Host_Map_f(void) {
|
|||||||
{
|
{
|
||||||
if (cls.state == ca_dedicated) {
|
if (cls.state == ca_dedicated) {
|
||||||
if (sv.active)
|
if (sv.active)
|
||||||
Con_Printf("Current map: %s\n", sv.name);
|
console::info("Current map: %s\n", sv.name);
|
||||||
else
|
else
|
||||||
Con_Printf("Server not active\n");
|
console::info("Server not active\n");
|
||||||
} else if (cls.state == ca_connected) {
|
} else if (cls.state == ca_connected) {
|
||||||
Con_Printf("Current map: %s ( %s )\n", cl.levelname, cl.mapname);
|
console::info("Current map: %s ( %s )\n", cl.levelname, cl.mapname);
|
||||||
} else {
|
} else {
|
||||||
Con_Printf("map <levelname>: start a new server\n");
|
console::info("map <levelname>: start a new server\n");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -783,7 +783,7 @@ static void Host_Randmap_f(void) {
|
|||||||
numlevels++;
|
numlevels++;
|
||||||
|
|
||||||
if (numlevels == 0) {
|
if (numlevels == 0) {
|
||||||
Con_Printf("no maps\n");
|
console::info("no maps\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -791,7 +791,7 @@ static void Host_Randmap_f(void) {
|
|||||||
|
|
||||||
for (level = extralevels, i = 0; level; level = level->next, i++) {
|
for (level = extralevels, i = 0; level; level = level->next, i++) {
|
||||||
if (i == randlevel) {
|
if (i == randlevel) {
|
||||||
Con_Printf("Starting map %s...\n", level->name);
|
console::info("Starting map %s...\n", level->name);
|
||||||
command::buffer::add_text(va("map %s\n", level->name));
|
command::buffer::add_text(va("map %s\n", level->name));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -809,11 +809,11 @@ static void Host_Changelevel_f(void) {
|
|||||||
char level[MAX_QPATH];
|
char level[MAX_QPATH];
|
||||||
|
|
||||||
if (command::argc() != 2) {
|
if (command::argc() != 2) {
|
||||||
Con_Printf("changelevel <levelname> : continue game on a new level\n");
|
console::info("changelevel <levelname> : continue game on a new level\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!sv.active || cls.demoplayback) {
|
if (!sv.active || cls.demoplayback) {
|
||||||
Con_Printf("Only the server may changelevel\n");
|
console::info("Only the server may changelevel\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -954,33 +954,33 @@ static void Host_Savegame_f(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!sv.active) {
|
if (!sv.active) {
|
||||||
Con_Printf("Not playing a local game.\n");
|
console::info("Not playing a local game.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cl.intermission) {
|
if (cl.intermission) {
|
||||||
Con_Printf("Can't save in intermission.\n");
|
console::info("Can't save in intermission.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (svs.maxclients != 1) {
|
if (svs.maxclients != 1) {
|
||||||
Con_Printf("Can't save multiplayer games.\n");
|
console::info("Can't save multiplayer games.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command::argc() != 2) {
|
if (command::argc() != 2) {
|
||||||
Con_Printf("save <savename> : save a game\n");
|
console::info("save <savename> : save a game\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(command::argv(1)->c_str(), "..")) {
|
if (strstr(command::argv(1)->c_str(), "..")) {
|
||||||
Con_Printf("Relative pathnames are not allowed.\n");
|
console::info("Relative pathnames are not allowed.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < svs.maxclients; i++) {
|
for (i = 0; i < svs.maxclients; i++) {
|
||||||
if (svs.clients[i].active && (svs.clients[i].edict->v.health <= 0)) {
|
if (svs.clients[i].active && (svs.clients[i].edict->v.health <= 0)) {
|
||||||
Con_Printf("Can't savegame with a dead player\n");
|
console::info("Can't savegame with a dead player\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -988,10 +988,10 @@ static void Host_Savegame_f(void) {
|
|||||||
q_snprintf(name, sizeof(name), "%s/%s", com_gamedir, command::argv(1)->c_str());
|
q_snprintf(name, sizeof(name), "%s/%s", com_gamedir, command::argv(1)->c_str());
|
||||||
COM_AddExtension(name, ".sav", sizeof(name));
|
COM_AddExtension(name, ".sav", sizeof(name));
|
||||||
|
|
||||||
Con_Printf("Saving game to %s...\n", name);
|
console::info("Saving game to %s...\n", name);
|
||||||
f = fopen(name, "w");
|
f = fopen(name, "w");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
Con_Printf("ERROR: couldn't open.\n");
|
console::info("ERROR: couldn't open.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1018,7 +1018,7 @@ static void Host_Savegame_f(void) {
|
|||||||
fflush(f);
|
fflush(f);
|
||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
Con_Printf("done.\n");
|
console::info("done.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1041,12 +1041,12 @@ static void Host_Loadgame_f(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (command::argc() != 2) {
|
if (command::argc() != 2) {
|
||||||
Con_Printf("load <savename> : load a game\n");
|
console::info("load <savename> : load a game\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(command::argv(1)->c_str(), "..")) {
|
if (strstr(command::argv(1)->c_str(), "..")) {
|
||||||
Con_Printf("Relative pathnames are not allowed.\n");
|
console::info("Relative pathnames are not allowed.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1059,7 +1059,7 @@ static void Host_Loadgame_f(void) {
|
|||||||
// been used. The menu calls it before stuffing loadgame command
|
// been used. The menu calls it before stuffing loadgame command
|
||||||
// SCR_BeginLoadingPlaque ();
|
// SCR_BeginLoadingPlaque ();
|
||||||
|
|
||||||
Con_Printf("Loading game from %s...\n", name);
|
console::info("Loading game from %s...\n", name);
|
||||||
|
|
||||||
// avoid leaking if the previous Host_Loadgame_f failed with a Host_Error
|
// avoid leaking if the previous Host_Loadgame_f failed with a Host_Error
|
||||||
if (start != NULL)
|
if (start != NULL)
|
||||||
@@ -1067,7 +1067,7 @@ static void Host_Loadgame_f(void) {
|
|||||||
|
|
||||||
start = (char *) COM_LoadMallocFile_TextMode_OSPath(name, NULL);
|
start = (char *) COM_LoadMallocFile_TextMode_OSPath(name, NULL);
|
||||||
if (start == NULL) {
|
if (start == NULL) {
|
||||||
Con_Printf("ERROR: couldn't open.\n");
|
console::info("ERROR: couldn't open.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1099,7 +1099,7 @@ static void Host_Loadgame_f(void) {
|
|||||||
free(start);
|
free(start);
|
||||||
start = NULL;
|
start = NULL;
|
||||||
SCR_EndLoadingPlaque();
|
SCR_EndLoadingPlaque();
|
||||||
Con_Printf("Couldn't load map\n");
|
console::info("Couldn't load map\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sv.paused = true; // pause until all clients connect
|
sv.paused = true; // pause until all clients connect
|
||||||
@@ -1177,7 +1177,7 @@ static void Host_Name_f(void) {
|
|||||||
char newName[32];
|
char newName[32];
|
||||||
|
|
||||||
if (command::argc() == 1) {
|
if (command::argc() == 1) {
|
||||||
Con_Printf("\"name\" is \"%s\"\n", cl_name.string);
|
console::info("\"name\" is \"%s\"\n", cl_name.string);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (command::argc() == 2)
|
if (command::argc() == 2)
|
||||||
@@ -1197,7 +1197,7 @@ static void Host_Name_f(void) {
|
|||||||
|
|
||||||
if (host_client->name[0] && strcmp(host_client->name, "unconnected")) {
|
if (host_client->name[0] && strcmp(host_client->name, "unconnected")) {
|
||||||
if (std::strcmp(host_client->name, newName) != 0)
|
if (std::strcmp(host_client->name, newName) != 0)
|
||||||
Con_Printf("%s renamed to %s\n", host_client->name, newName);
|
console::info("%s renamed to %s\n", host_client->name, newName);
|
||||||
}
|
}
|
||||||
std::strcpy(host_client->name, newName);
|
std::strcpy(host_client->name, newName);
|
||||||
host_client->edict->v.netname = PR_SetEngineString(host_client->name);
|
host_client->edict->v.netname = PR_SetEngineString(host_client->name);
|
||||||
@@ -1351,8 +1351,8 @@ static void Host_Color_f(void) {
|
|||||||
int playercolor;
|
int playercolor;
|
||||||
|
|
||||||
if (command::argc() == 1) {
|
if (command::argc() == 1) {
|
||||||
Con_Printf("\"color\" is \"%i %i\"\n", ((int) cl_color.value) >> 4, ((int) cl_color.value) & 0x0f);
|
console::info("\"color\" is \"%i %i\"\n", ((int) cl_color.value) >> 4, ((int) cl_color.value) & 0x0f);
|
||||||
Con_Printf("color <0-13> [0-13]\n");
|
console::info("color <0-13> [0-13]\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1452,12 +1452,12 @@ Host_PreSpawn_f
|
|||||||
*/
|
*/
|
||||||
static void Host_PreSpawn_f(void) {
|
static void Host_PreSpawn_f(void) {
|
||||||
if (command::last_source == command::source::command) {
|
if (command::last_source == command::source::command) {
|
||||||
Con_Printf("prespawn is not valid from the console\n");
|
console::info("prespawn is not valid from the console\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (host_client->spawned) {
|
if (host_client->spawned) {
|
||||||
Con_Printf("prespawn not valid -- already spawned\n");
|
console::info("prespawn not valid -- already spawned\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1476,12 +1476,12 @@ static void Host_Spawn_f(void) {
|
|||||||
edict_t *ent;
|
edict_t *ent;
|
||||||
|
|
||||||
if (command::last_source == command::source::command) {
|
if (command::last_source == command::source::command) {
|
||||||
Con_Printf("spawn is not valid from the console\n");
|
console::info("spawn is not valid from the console\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (host_client->spawned) {
|
if (host_client->spawned) {
|
||||||
Con_Printf("Spawn not valid -- already spawned\n");
|
console::info("Spawn not valid -- already spawned\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1584,7 +1584,7 @@ Host_Begin_f
|
|||||||
*/
|
*/
|
||||||
static void Host_Begin_f(void) {
|
static void Host_Begin_f(void) {
|
||||||
if (command::last_source == command::source::command) {
|
if (command::last_source == command::source::command) {
|
||||||
Con_Printf("begin is not valid from the console\n");
|
console::info("begin is not valid from the console\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1886,7 +1886,7 @@ static edict_t *FindViewthing(void) {
|
|||||||
if (!strcmp(PR_GetString(e->v.classname), "viewthing"))
|
if (!strcmp(PR_GetString(e->v.classname), "viewthing"))
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
Con_Printf("No viewthing on map\n");
|
console::info("No viewthing on map\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1905,7 +1905,7 @@ static void Host_Viewmodel_f(void) {
|
|||||||
|
|
||||||
m = Mod_ForName(command::argv(1).value_or("").c_str(), false);
|
m = Mod_ForName(command::argv(1).value_or("").c_str(), false);
|
||||||
if (!m) {
|
if (!m) {
|
||||||
Con_Printf("Can't load %s\n", command::argv(1).value_or("").c_str());
|
console::info("Can't load %s\n", command::argv(1).value_or("").c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1944,7 +1944,7 @@ static void PrintFrameName(qmodel_t *m, int frame) {
|
|||||||
return;
|
return;
|
||||||
pframedesc = &hdr->frames[frame];
|
pframedesc = &hdr->frames[frame];
|
||||||
|
|
||||||
Con_Printf("frame %i: %s\n", frame, pframedesc->name);
|
console::info("frame %i: %s\n", frame, pframedesc->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2011,10 +2011,10 @@ static void Host_Startdemos_f(void) {
|
|||||||
|
|
||||||
c = command::argc() - 1;
|
c = command::argc() - 1;
|
||||||
if (c > MAX_DEMOS) {
|
if (c > MAX_DEMOS) {
|
||||||
Con_Printf("Max %i demos in demoloop\n", MAX_DEMOS);
|
console::info("Max %i demos in demoloop\n", MAX_DEMOS);
|
||||||
c = MAX_DEMOS;
|
c = MAX_DEMOS;
|
||||||
}
|
}
|
||||||
Con_Printf("%i demo(s) in loop\n", c);
|
console::info("%i demo(s) in loop\n", c);
|
||||||
|
|
||||||
for (i = 1; i < c + 1; i++)
|
for (i = 1; i < c + 1; i++)
|
||||||
q_strlcpy(cls.demos[i - 1], command::argv(i)->c_str(), sizeof(cls.demos[0]));
|
q_strlcpy(cls.demos[i - 1], command::argv(i)->c_str(), sizeof(cls.demos[0]));
|
||||||
|
|||||||
+1
-1
@@ -586,7 +586,7 @@ bool Image_WritePNG(const char *name, byte *data, int width, int height, int bpp
|
|||||||
error = lodepng_encode(&png, &pngsize, flipped, width, height, &state);
|
error = lodepng_encode(&png, &pngsize, flipped, width, height, &state);
|
||||||
if (error == 0) lodepng_save_file(png, pngsize, pathname);
|
if (error == 0) lodepng_save_file(png, pngsize, pathname);
|
||||||
#ifdef LODEPNG_COMPILE_ERROR_TEXT
|
#ifdef LODEPNG_COMPILE_ERROR_TEXT
|
||||||
else Con_Printf("WritePNG: %s\n", lodepng_error_text(error));
|
else console::info("WritePNG: %s\n", lodepng_error_text(error));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lodepng_state_cleanup(&state);
|
lodepng_state_cleanup(&state);
|
||||||
|
|||||||
+28
-28
@@ -160,16 +160,16 @@ static void IN_DisableOSXMouseAccel(void) {
|
|||||||
kIOReturnSuccess) {
|
kIOReturnSuccess) {
|
||||||
if (IOHIDSetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), -1.0) != kIOReturnSuccess) {
|
if (IOHIDSetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), -1.0) != kIOReturnSuccess) {
|
||||||
convar::set("in_disablemacosxmouseaccel", "0");
|
convar::set("in_disablemacosxmouseaccel", "0");
|
||||||
Con_Printf("WARNING: Could not disable mouse acceleration (failed at IOHIDSetAccelerationWithKey).\n");
|
console::info("WARNING: Could not disable mouse acceleration (failed at IOHIDSetAccelerationWithKey).\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
convar::set("in_disablemacosxmouseaccel", "0");
|
convar::set("in_disablemacosxmouseaccel", "0");
|
||||||
Con_Printf("WARNING: Could not disable mouse acceleration (failed at IOHIDGetAccelerationWithKey).\n");
|
console::info("WARNING: Could not disable mouse acceleration (failed at IOHIDGetAccelerationWithKey).\n");
|
||||||
}
|
}
|
||||||
IOServiceClose(mouseDev);
|
IOServiceClose(mouseDev);
|
||||||
} else {
|
} else {
|
||||||
convar::set("in_disablemacosxmouseaccel", "0");
|
convar::set("in_disablemacosxmouseaccel", "0");
|
||||||
Con_Printf("WARNING: Could not disable mouse acceleration (failed at IO_GetIOHandle).\n");
|
console::info("WARNING: Could not disable mouse acceleration (failed at IO_GetIOHandle).\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,10 +178,10 @@ static void IN_ReenableOSXMouseAccel(void) {
|
|||||||
if (mouseDev != 0) {
|
if (mouseDev != 0) {
|
||||||
if (IOHIDSetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), originalMouseSpeed) !=
|
if (IOHIDSetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), originalMouseSpeed) !=
|
||||||
kIOReturnSuccess)
|
kIOReturnSuccess)
|
||||||
Con_Printf("WARNING: Could not re-enable mouse acceleration (failed at IOHIDSetAccelerationWithKey).\n");
|
console::info("WARNING: Could not re-enable mouse acceleration (failed at IOHIDSetAccelerationWithKey).\n");
|
||||||
IOServiceClose(mouseDev);
|
IOServiceClose(mouseDev);
|
||||||
} else {
|
} else {
|
||||||
Con_Printf("WARNING: Could not re-enable mouse acceleration (failed at IO_GetIOHandle).\n");
|
console::info("WARNING: Could not re-enable mouse acceleration (failed at IO_GetIOHandle).\n");
|
||||||
}
|
}
|
||||||
originalMouseSpeed = -1;
|
originalMouseSpeed = -1;
|
||||||
}
|
}
|
||||||
@@ -209,19 +209,19 @@ void IN_Activate(void) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (SDL_SetRelativeMouseMode(SDL_TRUE) != 0) {
|
if (SDL_SetRelativeMouseMode(SDL_TRUE) != 0) {
|
||||||
Con_Printf("WARNING: SDL_SetRelativeMouseMode(SDL_TRUE) failed.\n");
|
console::info("WARNING: SDL_SetRelativeMouseMode(SDL_TRUE) failed.\n");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) != SDL_GRAB_ON) {
|
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) != SDL_GRAB_ON) {
|
||||||
SDL_WM_GrabInput(SDL_GRAB_ON);
|
SDL_WM_GrabInput(SDL_GRAB_ON);
|
||||||
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) != SDL_GRAB_ON)
|
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) != SDL_GRAB_ON)
|
||||||
Con_Printf("WARNING: SDL_WM_GrabInput(SDL_GRAB_ON) failed.\n");
|
console::info("WARNING: SDL_WM_GrabInput(SDL_GRAB_ON) failed.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SDL_ShowCursor(SDL_QUERY) != SDL_DISABLE) {
|
if (SDL_ShowCursor(SDL_QUERY) != SDL_DISABLE) {
|
||||||
SDL_ShowCursor(SDL_DISABLE);
|
SDL_ShowCursor(SDL_DISABLE);
|
||||||
if (SDL_ShowCursor(SDL_QUERY) != SDL_DISABLE)
|
if (SDL_ShowCursor(SDL_QUERY) != SDL_DISABLE)
|
||||||
Con_Printf("WARNING: SDL_ShowCursor(SDL_DISABLE) failed.\n");
|
console::info("WARNING: SDL_ShowCursor(SDL_DISABLE) failed.\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -247,13 +247,13 @@ void IN_Deactivate(bool free_cursor) {
|
|||||||
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) != SDL_GRAB_OFF) {
|
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) != SDL_GRAB_OFF) {
|
||||||
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||||
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) != SDL_GRAB_OFF)
|
if (SDL_WM_GrabInput(SDL_GRAB_QUERY) != SDL_GRAB_OFF)
|
||||||
Con_Printf("WARNING: SDL_WM_GrabInput(SDL_GRAB_OFF) failed.\n");
|
console::info("WARNING: SDL_WM_GrabInput(SDL_GRAB_OFF) failed.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SDL_ShowCursor(SDL_QUERY) != SDL_ENABLE) {
|
if (SDL_ShowCursor(SDL_QUERY) != SDL_ENABLE) {
|
||||||
SDL_ShowCursor(SDL_ENABLE);
|
SDL_ShowCursor(SDL_ENABLE);
|
||||||
if (SDL_ShowCursor(SDL_QUERY) != SDL_ENABLE)
|
if (SDL_ShowCursor(SDL_QUERY) != SDL_ENABLE)
|
||||||
Con_Printf("WARNING: SDL_ShowCursor(SDL_ENABLE) failed.\n");
|
console::info("WARNING: SDL_ShowCursor(SDL_ENABLE) failed.\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -273,7 +273,7 @@ void IN_StartupJoystick(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == -1) {
|
if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == -1) {
|
||||||
Con_Warning("could not initialize SDL Game Controller\n");
|
console::warn("could not initialize SDL Game Controller\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,14 +281,14 @@ void IN_StartupJoystick(void) {
|
|||||||
q_snprintf(controllerdb, sizeof(controllerdb), "%s/gamecontrollerdb.txt", com_basedir);
|
q_snprintf(controllerdb, sizeof(controllerdb), "%s/gamecontrollerdb.txt", com_basedir);
|
||||||
nummappings = SDL_GameControllerAddMappingsFromFile(controllerdb);
|
nummappings = SDL_GameControllerAddMappingsFromFile(controllerdb);
|
||||||
if (nummappings > 0)
|
if (nummappings > 0)
|
||||||
Con_Printf("%d mappings loaded from gamecontrollerdb.txt\n", nummappings);
|
console::info("%d mappings loaded from gamecontrollerdb.txt\n", nummappings);
|
||||||
|
|
||||||
// Also try host_parms->userdir
|
// Also try host_parms->userdir
|
||||||
if (host_parms->userdir != host_parms->basedir) {
|
if (host_parms->userdir != host_parms->basedir) {
|
||||||
q_snprintf(controllerdb, sizeof(controllerdb), "%s/gamecontrollerdb.txt", host_parms->userdir);
|
q_snprintf(controllerdb, sizeof(controllerdb), "%s/gamecontrollerdb.txt", host_parms->userdir);
|
||||||
nummappings = SDL_GameControllerAddMappingsFromFile(controllerdb);
|
nummappings = SDL_GameControllerAddMappingsFromFile(controllerdb);
|
||||||
if (nummappings > 0)
|
if (nummappings > 0)
|
||||||
Con_Printf("%d mappings loaded from gamecontrollerdb.txt\n", nummappings);
|
console::info("%d mappings loaded from gamecontrollerdb.txt\n", nummappings);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < SDL_NumJoysticks(); i++) {
|
for (i = 0; i < SDL_NumJoysticks(); i++) {
|
||||||
@@ -297,16 +297,16 @@ void IN_StartupJoystick(void) {
|
|||||||
const char *controllername = SDL_GameControllerNameForIndex(i);
|
const char *controllername = SDL_GameControllerNameForIndex(i);
|
||||||
gamecontroller = SDL_GameControllerOpen(i);
|
gamecontroller = SDL_GameControllerOpen(i);
|
||||||
if (gamecontroller) {
|
if (gamecontroller) {
|
||||||
Con_Printf("detected controller: %s\n", controllername != NULL ? controllername : "NULL");
|
console::info("detected controller: %s\n", controllername != NULL ? controllername : "NULL");
|
||||||
|
|
||||||
joy_active_instaceid = SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(gamecontroller));
|
joy_active_instaceid = SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(gamecontroller));
|
||||||
joy_active_controller = gamecontroller;
|
joy_active_controller = gamecontroller;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("failed to open controller: %s\n", controllername != NULL ? controllername : "NULL");
|
console::warn("failed to open controller: %s\n", controllername != NULL ? controllername : "NULL");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Con_Warning("joystick missing controller mappings: %s\n", joyname != NULL ? joyname : "NULL");
|
console::warn("joystick missing controller mappings: %s\n", joyname != NULL ? joyname : "NULL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -324,7 +324,7 @@ void IN_Init(void) {
|
|||||||
#if !defined(USE_SDL2)
|
#if !defined(USE_SDL2)
|
||||||
SDL_EnableUNICODE(textmode);
|
SDL_EnableUNICODE(textmode);
|
||||||
if (SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL) == -1)
|
if (SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL) == -1)
|
||||||
Con_Printf("Warning: SDL_EnableKeyRepeat() failed.\n");
|
console::info("Warning: SDL_EnableKeyRepeat() failed.\n");
|
||||||
#else
|
#else
|
||||||
if (textmode)
|
if (textmode)
|
||||||
SDL_StartTextInput();
|
SDL_StartTextInput();
|
||||||
@@ -706,16 +706,16 @@ void IN_UpdateInputMode(void) {
|
|||||||
#if !defined(USE_SDL2)
|
#if !defined(USE_SDL2)
|
||||||
SDL_EnableUNICODE(textmode);
|
SDL_EnableUNICODE(textmode);
|
||||||
if (in_debugkeys.value)
|
if (in_debugkeys.value)
|
||||||
Con_Printf("SDL_EnableUNICODE %d time: %g\n", textmode, Sys_DoubleTime());
|
console::info("SDL_EnableUNICODE %d time: %g\n", textmode, Sys_DoubleTime());
|
||||||
#else
|
#else
|
||||||
if (textmode) {
|
if (textmode) {
|
||||||
SDL_StartTextInput();
|
SDL_StartTextInput();
|
||||||
if (in_debugkeys.value)
|
if (in_debugkeys.value)
|
||||||
Con_Printf("SDL_StartTextInput time: %g\n", Sys_DoubleTime());
|
console::info("SDL_StartTextInput time: %g\n", Sys_DoubleTime());
|
||||||
} else {
|
} else {
|
||||||
SDL_StopTextInput();
|
SDL_StopTextInput();
|
||||||
if (in_debugkeys.value)
|
if (in_debugkeys.value)
|
||||||
Con_Printf("SDL_StopTextInput time: %g\n", Sys_DoubleTime());
|
console::info("SDL_StopTextInput time: %g\n", Sys_DoubleTime());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -918,20 +918,20 @@ static inline int IN_SDL2_ScancodeToQuakeKey(SDL_Scancode scancode) {
|
|||||||
|
|
||||||
#if defined(USE_SDL2)
|
#if defined(USE_SDL2)
|
||||||
static void IN_DebugTextEvent(SDL_Event *event) {
|
static void IN_DebugTextEvent(SDL_Event *event) {
|
||||||
Con_Printf("SDL_TEXTINPUT '%s' time: %g\n", event->text.text, Sys_DoubleTime());
|
console::info("SDL_TEXTINPUT '%s' time: %g\n", event->text.text, Sys_DoubleTime());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void IN_DebugKeyEvent(SDL_Event *event) {
|
static void IN_DebugKeyEvent(SDL_Event *event) {
|
||||||
const char *eventtype = (event->key.state == SDL_PRESSED) ? "SDL_KEYDOWN" : "SDL_KEYUP";
|
const char *eventtype = (event->key.state == SDL_PRESSED) ? "SDL_KEYDOWN" : "SDL_KEYUP";
|
||||||
#if defined(USE_SDL2)
|
#if defined(USE_SDL2)
|
||||||
Con_Printf("%s scancode: '%s' keycode: '%s' time: %g\n",
|
console::info("%s scancode: '%s' keycode: '%s' time: %g\n",
|
||||||
eventtype,
|
eventtype,
|
||||||
SDL_GetScancodeName(event->key.keysym.scancode),
|
SDL_GetScancodeName(event->key.keysym.scancode),
|
||||||
SDL_GetKeyName(event->key.keysym.sym),
|
SDL_GetKeyName(event->key.keysym.sym),
|
||||||
Sys_DoubleTime());
|
Sys_DoubleTime());
|
||||||
#else
|
#else
|
||||||
Con_Printf("%s sym: '%s' unicode: %04x time: %g\n",
|
console::info("%s sym: '%s' unicode: %04x time: %g\n",
|
||||||
eventtype,
|
eventtype,
|
||||||
SDL_GetKeyName(event->key.keysym.sym),
|
SDL_GetKeyName(event->key.keysym.sym),
|
||||||
(int) event->key.keysym.unicode,
|
(int) event->key.keysym.unicode,
|
||||||
@@ -1013,7 +1013,7 @@ void IN_SendKeyEvents(void) {
|
|||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
if (event.button.button < 1 ||
|
if (event.button.button < 1 ||
|
||||||
event.button.button > std::size(buttonremap)) {
|
event.button.button > std::size(buttonremap)) {
|
||||||
Con_Printf("Ignored event for mouse button %d\n",
|
console::info("Ignored event for mouse button %d\n",
|
||||||
event.button.button);
|
event.button.button);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1041,14 +1041,14 @@ void IN_SendKeyEvents(void) {
|
|||||||
if (joy_active_instaceid == -1) {
|
if (joy_active_instaceid == -1) {
|
||||||
joy_active_controller = SDL_GameControllerOpen(event.cdevice.which);
|
joy_active_controller = SDL_GameControllerOpen(event.cdevice.which);
|
||||||
if (joy_active_controller == NULL)
|
if (joy_active_controller == NULL)
|
||||||
Con_DPrintf("Couldn't open game controller\n");
|
console::debug("Couldn't open game controller\n");
|
||||||
else {
|
else {
|
||||||
SDL_Joystick *joy;
|
SDL_Joystick *joy;
|
||||||
joy = SDL_GameControllerGetJoystick(joy_active_controller);
|
joy = SDL_GameControllerGetJoystick(joy_active_controller);
|
||||||
joy_active_instaceid = SDL_JoystickInstanceID(joy);
|
joy_active_instaceid = SDL_JoystickInstanceID(joy);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
Con_DPrintf("Ignoring SDL_CONTROLLERDEVICEADDED\n");
|
console::debug("Ignoring SDL_CONTROLLERDEVICEADDED\n");
|
||||||
break;
|
break;
|
||||||
case SDL_CONTROLLERDEVICEREMOVED:
|
case SDL_CONTROLLERDEVICEREMOVED:
|
||||||
if (joy_active_instaceid != -1 && event.cdevice.which == joy_active_instaceid) {
|
if (joy_active_instaceid != -1 && event.cdevice.which == joy_active_instaceid) {
|
||||||
@@ -1056,10 +1056,10 @@ void IN_SendKeyEvents(void) {
|
|||||||
joy_active_controller = NULL;
|
joy_active_controller = NULL;
|
||||||
joy_active_instaceid = -1;
|
joy_active_instaceid = -1;
|
||||||
} else
|
} else
|
||||||
Con_DPrintf("Ignoring SDL_CONTROLLERDEVICEREMOVED\n");
|
console::debug("Ignoring SDL_CONTROLLERDEVICEREMOVED\n");
|
||||||
break;
|
break;
|
||||||
case SDL_CONTROLLERDEVICEREMAPPED:
|
case SDL_CONTROLLERDEVICEREMAPPED:
|
||||||
Con_DPrintf("Ignoring SDL_CONTROLLERDEVICEREMAPPED\n");
|
console::debug("Ignoring SDL_CONTROLLERDEVICEREMAPPED\n");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+801
-903
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -257,7 +257,7 @@ void M_ToggleMenu_f(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (key_dest == key_console) {
|
if (key_dest == key_console) {
|
||||||
Con_ToggleConsole_f();
|
console::toggle_console();
|
||||||
} else {
|
} else {
|
||||||
M_Menu_Main_f();
|
M_Menu_Main_f();
|
||||||
}
|
}
|
||||||
@@ -1260,7 +1260,7 @@ void M_Options_Key(int k) {
|
|||||||
break;
|
break;
|
||||||
case OPT_CONSOLE:
|
case OPT_CONSOLE:
|
||||||
m_state = m_none;
|
m_state = m_none;
|
||||||
Con_ToggleConsole_f();
|
console::toggle_console();
|
||||||
break;
|
break;
|
||||||
case OPT_DEFAULTS:
|
case OPT_DEFAULTS:
|
||||||
if (SCR_ModalMessage("This will reset all controls\n"
|
if (SCR_ModalMessage("This will reset all controls\n"
|
||||||
|
|||||||
+42
-42
@@ -83,7 +83,7 @@ static void NET_Ban_f(void) {
|
|||||||
command::forward_to_server();
|
command::forward_to_server();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print_fn = Con_Printf;
|
print_fn = console::info;
|
||||||
} else {
|
} else {
|
||||||
if (pr_global_struct->deathmatch)
|
if (pr_global_struct->deathmatch)
|
||||||
return;
|
return;
|
||||||
@@ -283,14 +283,14 @@ int Datagram_GetMessage(qsocket_t *sock) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (length == (unsigned int) -1) {
|
if (length == (unsigned int) -1) {
|
||||||
Con_Printf("Read error\n");
|
console::info("Read error\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sfunc.AddrCompare(&readaddr, &sock->addr) != 0) {
|
if (sfunc.AddrCompare(&readaddr, &sock->addr) != 0) {
|
||||||
Con_Printf("Forged packet received\n");
|
console::info("Forged packet received\n");
|
||||||
Con_Printf("Expected: %s\n", StrAddr(&sock->addr));
|
console::info("Expected: %s\n", StrAddr(&sock->addr));
|
||||||
Con_Printf("Received: %s\n", StrAddr(&readaddr));
|
console::info("Received: %s\n", StrAddr(&readaddr));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,14 +311,14 @@ int Datagram_GetMessage(qsocket_t *sock) {
|
|||||||
|
|
||||||
if (flags & NETFLAG_UNRELIABLE) {
|
if (flags & NETFLAG_UNRELIABLE) {
|
||||||
if (sequence < sock->unreliableReceiveSequence) {
|
if (sequence < sock->unreliableReceiveSequence) {
|
||||||
Con_DPrintf("Got a stale datagram\n");
|
console::debug("Got a stale datagram\n");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (sequence != sock->unreliableReceiveSequence) {
|
if (sequence != sock->unreliableReceiveSequence) {
|
||||||
count = sequence - sock->unreliableReceiveSequence;
|
count = sequence - sock->unreliableReceiveSequence;
|
||||||
droppedDatagrams += count;
|
droppedDatagrams += count;
|
||||||
Con_DPrintf("Dropped %u datagram(s)\n", count);
|
console::debug("Dropped %u datagram(s)\n", count);
|
||||||
}
|
}
|
||||||
sock->unreliableReceiveSequence = sequence + 1;
|
sock->unreliableReceiveSequence = sequence + 1;
|
||||||
|
|
||||||
@@ -333,15 +333,15 @@ int Datagram_GetMessage(qsocket_t *sock) {
|
|||||||
|
|
||||||
if (flags & NETFLAG_ACK) {
|
if (flags & NETFLAG_ACK) {
|
||||||
if (sequence != (sock->sendSequence - 1)) {
|
if (sequence != (sock->sendSequence - 1)) {
|
||||||
Con_DPrintf("Stale ACK received\n");
|
console::debug("Stale ACK received\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (sequence == sock->ackSequence) {
|
if (sequence == sock->ackSequence) {
|
||||||
sock->ackSequence++;
|
sock->ackSequence++;
|
||||||
if (sock->ackSequence != sock->sendSequence)
|
if (sock->ackSequence != sock->sendSequence)
|
||||||
Con_DPrintf("ack sequencing error\n");
|
console::debug("ack sequencing error\n");
|
||||||
} else {
|
} else {
|
||||||
Con_DPrintf("Duplicate ACK received\n");
|
console::debug("Duplicate ACK received\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sock->sendMessageLength -= MAX_DATAGRAM;
|
sock->sendMessageLength -= MAX_DATAGRAM;
|
||||||
@@ -392,26 +392,26 @@ int Datagram_GetMessage(qsocket_t *sock) {
|
|||||||
|
|
||||||
|
|
||||||
static void PrintStats(qsocket_t *s) {
|
static void PrintStats(qsocket_t *s) {
|
||||||
Con_Printf("canSend = %4u \n", s->canSend);
|
console::info("canSend = %4u \n", s->canSend);
|
||||||
Con_Printf("sendSeq = %4u ", s->sendSequence);
|
console::info("sendSeq = %4u ", s->sendSequence);
|
||||||
Con_Printf("recvSeq = %4u \n", s->receiveSequence);
|
console::info("recvSeq = %4u \n", s->receiveSequence);
|
||||||
Con_Printf("\n");
|
console::info("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void NET_Stats_f(void) {
|
static void NET_Stats_f(void) {
|
||||||
qsocket_t *s;
|
qsocket_t *s;
|
||||||
|
|
||||||
if (command::argc() == 1) {
|
if (command::argc() == 1) {
|
||||||
Con_Printf("unreliable messages sent = %i\n", unreliableMessagesSent);
|
console::info("unreliable messages sent = %i\n", unreliableMessagesSent);
|
||||||
Con_Printf("unreliable messages recv = %i\n", unreliableMessagesReceived);
|
console::info("unreliable messages recv = %i\n", unreliableMessagesReceived);
|
||||||
Con_Printf("reliable messages sent = %i\n", messagesSent);
|
console::info("reliable messages sent = %i\n", messagesSent);
|
||||||
Con_Printf("reliable messages received = %i\n", messagesReceived);
|
console::info("reliable messages received = %i\n", messagesReceived);
|
||||||
Con_Printf("packetsSent = %i\n", packetsSent);
|
console::info("packetsSent = %i\n", packetsSent);
|
||||||
Con_Printf("packetsReSent = %i\n", packetsReSent);
|
console::info("packetsReSent = %i\n", packetsReSent);
|
||||||
Con_Printf("packetsReceived = %i\n", packetsReceived);
|
console::info("packetsReceived = %i\n", packetsReceived);
|
||||||
Con_Printf("receivedDuplicateCount = %i\n", receivedDuplicateCount);
|
console::info("receivedDuplicateCount = %i\n", receivedDuplicateCount);
|
||||||
Con_Printf("shortPacketCount = %i\n", shortPacketCount);
|
console::info("shortPacketCount = %i\n", shortPacketCount);
|
||||||
Con_Printf("droppedDatagrams = %i\n", droppedDatagrams);
|
console::info("droppedDatagrams = %i\n", droppedDatagrams);
|
||||||
} else if (std::strcmp(command::argv(1)->c_str(), "*") == 0) {
|
} else if (std::strcmp(command::argv(1)->c_str(), "*") == 0) {
|
||||||
for (s = net_activeSockets; s; s = s->next)
|
for (s = net_activeSockets; s; s = s->next)
|
||||||
PrintStats(s);
|
PrintStats(s);
|
||||||
@@ -454,7 +454,7 @@ static const char *Strip_Port(const char *host) {
|
|||||||
port = std::atoi(p);
|
port = std::atoi(p);
|
||||||
if (port > 0 && port < 65536 && port != net_hostport) {
|
if (port > 0 && port < 65536 && port != net_hostport) {
|
||||||
net_hostport = port;
|
net_hostport = port;
|
||||||
Con_Printf("Port set to %d\n", net_hostport);
|
console::info("Port set to %d\n", net_hostport);
|
||||||
}
|
}
|
||||||
return noport;
|
return noport;
|
||||||
}
|
}
|
||||||
@@ -508,7 +508,7 @@ static void Test_Poll(void *unused) {
|
|||||||
connectTime = MSG_ReadLong();
|
connectTime = MSG_ReadLong();
|
||||||
std::strcpy(address, MSG_ReadString());
|
std::strcpy(address, MSG_ReadString());
|
||||||
|
|
||||||
Con_Printf("%s\n frags:%3i colors:%d %d time:%d\n %s\n", name, frags, colors >> 4, colors & 0x0f,
|
console::info("%s\n frags:%3i colors:%d %d time:%d\n %s\n", name, frags, colors >> 4, colors & 0x0f,
|
||||||
connectTime / 60, address);
|
connectTime / 60, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -558,7 +558,7 @@ static void Test_f(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (net_landriverlevel == net_numlandrivers) {
|
if (net_landriverlevel == net_numlandrivers) {
|
||||||
Con_Printf("Could not resolve %s\n", host);
|
console::info("Could not resolve %s\n", host);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -627,7 +627,7 @@ static void Test2_Poll(void *unused) {
|
|||||||
goto Done;
|
goto Done;
|
||||||
std::strcpy(value, MSG_ReadString());
|
std::strcpy(value, MSG_ReadString());
|
||||||
|
|
||||||
Con_Printf("%-16.16s %-16.16s\n", name, value);
|
console::info("%-16.16s %-16.16s\n", name, value);
|
||||||
|
|
||||||
SZ_Clear(&net_message);
|
SZ_Clear(&net_message);
|
||||||
// save space for the header, filled in later
|
// save space for the header, filled in later
|
||||||
@@ -643,7 +643,7 @@ Reschedule:
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
Con_Printf("Unexpected response to Rule Info request\n");
|
console::info("Unexpected response to Rule Info request\n");
|
||||||
Done:
|
Done:
|
||||||
dfunc.Close_Socket(test2Socket);
|
dfunc.Close_Socket(test2Socket);
|
||||||
test2InProgress = false;
|
test2InProgress = false;
|
||||||
@@ -685,7 +685,7 @@ static void Test2_f(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (net_landriverlevel == net_numlandrivers) {
|
if (net_landriverlevel == net_numlandrivers) {
|
||||||
Con_Printf("Could not resolve %s\n", host);
|
console::info("Could not resolve %s\n", host);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1135,7 +1135,7 @@ static qsocket_t *_Datagram_Connect(const char *host) {
|
|||||||
|
|
||||||
// see if we can resolve the host name
|
// see if we can resolve the host name
|
||||||
if (dfunc.GetAddrFromName(host, &sendaddr) == -1) {
|
if (dfunc.GetAddrFromName(host, &sendaddr) == -1) {
|
||||||
Con_Printf("Could not resolve %s\n", host);
|
console::info("Could not resolve %s\n", host);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1154,7 +1154,7 @@ static qsocket_t *_Datagram_Connect(const char *host) {
|
|||||||
goto ErrorReturn;
|
goto ErrorReturn;
|
||||||
|
|
||||||
// send the connection request
|
// send the connection request
|
||||||
Con_Printf("trying...\n");
|
console::info("trying...\n");
|
||||||
SCR_UpdateScreen();
|
SCR_UpdateScreen();
|
||||||
start_time = net_time;
|
start_time = net_time;
|
||||||
|
|
||||||
@@ -1174,9 +1174,9 @@ static qsocket_t *_Datagram_Connect(const char *host) {
|
|||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
// is it from the right place?
|
// is it from the right place?
|
||||||
if (sfunc.AddrCompare(&readaddr, &sendaddr) != 0) {
|
if (sfunc.AddrCompare(&readaddr, &sendaddr) != 0) {
|
||||||
Con_Printf("wrong reply address\n");
|
console::info("wrong reply address\n");
|
||||||
Con_Printf("Expected: %s | %s\n", dfunc.AddrToString(&sendaddr), StrAddr(&sendaddr));
|
console::info("Expected: %s | %s\n", dfunc.AddrToString(&sendaddr), StrAddr(&sendaddr));
|
||||||
Con_Printf("Received: %s | %s\n", dfunc.AddrToString(&readaddr), StrAddr(&readaddr));
|
console::info("Received: %s | %s\n", dfunc.AddrToString(&readaddr), StrAddr(&readaddr));
|
||||||
SCR_UpdateScreen();
|
SCR_UpdateScreen();
|
||||||
ret = 0;
|
ret = 0;
|
||||||
continue;
|
continue;
|
||||||
@@ -1210,21 +1210,21 @@ static qsocket_t *_Datagram_Connect(const char *host) {
|
|||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Con_Printf("still trying...\n");
|
console::info("still trying...\n");
|
||||||
SCR_UpdateScreen();
|
SCR_UpdateScreen();
|
||||||
start_time = SetNetTime();
|
start_time = SetNetTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
reason = "No Response";
|
reason = "No Response";
|
||||||
Con_Printf("%s\n", reason);
|
console::info("%s\n", reason);
|
||||||
std::strcpy(m_return_reason, reason);
|
std::strcpy(m_return_reason, reason);
|
||||||
goto ErrorReturn;
|
goto ErrorReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
reason = "Network Error";
|
reason = "Network Error";
|
||||||
Con_Printf("%s\n", reason);
|
console::info("%s\n", reason);
|
||||||
std::strcpy(m_return_reason, reason);
|
std::strcpy(m_return_reason, reason);
|
||||||
goto ErrorReturn;
|
goto ErrorReturn;
|
||||||
}
|
}
|
||||||
@@ -1232,7 +1232,7 @@ static qsocket_t *_Datagram_Connect(const char *host) {
|
|||||||
ret = MSG_ReadByte();
|
ret = MSG_ReadByte();
|
||||||
if (ret == CCREP_REJECT) {
|
if (ret == CCREP_REJECT) {
|
||||||
reason = MSG_ReadString();
|
reason = MSG_ReadString();
|
||||||
Con_Printf("%s\n", reason);
|
console::info("%s\n", reason);
|
||||||
q_strlcpy(m_return_reason, reason, sizeof(m_return_reason));
|
q_strlcpy(m_return_reason, reason, sizeof(m_return_reason));
|
||||||
goto ErrorReturn;
|
goto ErrorReturn;
|
||||||
}
|
}
|
||||||
@@ -1242,20 +1242,20 @@ static qsocket_t *_Datagram_Connect(const char *host) {
|
|||||||
dfunc.SetSocketPort(&sock->addr, MSG_ReadLong());
|
dfunc.SetSocketPort(&sock->addr, MSG_ReadLong());
|
||||||
} else {
|
} else {
|
||||||
reason = "Bad Response";
|
reason = "Bad Response";
|
||||||
Con_Printf("%s\n", reason);
|
console::info("%s\n", reason);
|
||||||
std::strcpy(m_return_reason, reason);
|
std::strcpy(m_return_reason, reason);
|
||||||
goto ErrorReturn;
|
goto ErrorReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
dfunc.GetNameFromAddr(&sendaddr, sock->address);
|
dfunc.GetNameFromAddr(&sendaddr, sock->address);
|
||||||
|
|
||||||
Con_Printf("Connection accepted\n");
|
console::info("Connection accepted\n");
|
||||||
sock->lastMessageTime = SetNetTime();
|
sock->lastMessageTime = SetNetTime();
|
||||||
|
|
||||||
// switch the connection to the specified address
|
// switch the connection to the specified address
|
||||||
if (dfunc.Connect(newsock, &sock->addr) == -1) {
|
if (dfunc.Connect(newsock, &sock->addr) == -1) {
|
||||||
reason = "Connect to Game failed";
|
reason = "Connect to Game failed";
|
||||||
Con_Printf("%s\n", reason);
|
console::info("%s\n", reason);
|
||||||
std::strcpy(m_return_reason, reason);
|
std::strcpy(m_return_reason, reason);
|
||||||
goto ErrorReturn;
|
goto ErrorReturn;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -79,7 +79,7 @@ qsocket_t *Loop_Connect (const char *host)
|
|||||||
{
|
{
|
||||||
if ((loop_client = NET_NewQSocket ()) == NULL)
|
if ((loop_client = NET_NewQSocket ()) == NULL)
|
||||||
{
|
{
|
||||||
Con_Printf("Loop_Connect: no qsocket available\n");
|
console::info("Loop_Connect: no qsocket available\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
std::strcpy (loop_client->address, "localhost");
|
std::strcpy (loop_client->address, "localhost");
|
||||||
@@ -92,7 +92,7 @@ qsocket_t *Loop_Connect (const char *host)
|
|||||||
{
|
{
|
||||||
if ((loop_server = NET_NewQSocket ()) == NULL)
|
if ((loop_server = NET_NewQSocket ()) == NULL)
|
||||||
{
|
{
|
||||||
Con_Printf("Loop_Connect: no qsocket available\n");
|
console::info("Loop_Connect: no qsocket available\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
std::strcpy (loop_server->address, "LOCAL");
|
std::strcpy (loop_server->address, "LOCAL");
|
||||||
|
|||||||
+20
-20
@@ -164,7 +164,7 @@ const char *NET_QSocketGetAddressString(const qsocket_t *s) {
|
|||||||
|
|
||||||
static void NET_Listen_f(void) {
|
static void NET_Listen_f(void) {
|
||||||
if (command::argc() != 2) {
|
if (command::argc() != 2) {
|
||||||
Con_Printf("\"listen\" is \"%d\"\n", listening ? 1 : 0);
|
console::info("\"listen\" is \"%d\"\n", listening ? 1 : 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,12 +182,12 @@ static void MaxPlayers_f(void) {
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
if (command::argc() != 2) {
|
if (command::argc() != 2) {
|
||||||
Con_Printf("\"maxplayers\" is \"%d\"\n", svs.maxclients);
|
console::info("\"maxplayers\" is \"%d\"\n", svs.maxclients);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sv.active) {
|
if (sv.active) {
|
||||||
Con_Printf("maxplayers can not be changed while a server is running.\n");
|
console::info("maxplayers can not be changed while a server is running.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ static void MaxPlayers_f(void) {
|
|||||||
n = 1;
|
n = 1;
|
||||||
if (n > svs.maxclientslimit) {
|
if (n > svs.maxclientslimit) {
|
||||||
n = svs.maxclientslimit;
|
n = svs.maxclientslimit;
|
||||||
Con_Printf("\"maxplayers\" set to \"%d\"\n", n);
|
console::info("\"maxplayers\" set to \"%d\"\n", n);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((n == 1) && listening)
|
if ((n == 1) && listening)
|
||||||
@@ -217,13 +217,13 @@ static void NET_Port_f(void) {
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
if (command::argc() != 2) {
|
if (command::argc() != 2) {
|
||||||
Con_Printf("\"port\" is \"%d\"\n", net_hostport);
|
console::info("\"port\" is \"%d\"\n", net_hostport);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
n = std::atoi(command::argv(1)->c_str());
|
n = std::atoi(command::argv(1)->c_str());
|
||||||
if (n < 1 || n > 65534) {
|
if (n < 1 || n > 65534) {
|
||||||
Con_Printf("Bad value, must be between 1 and 65534\n");
|
console::info("Bad value, must be between 1 and 65534\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,8 +239,8 @@ static void NET_Port_f(void) {
|
|||||||
|
|
||||||
|
|
||||||
static void PrintSlistHeader(void) {
|
static void PrintSlistHeader(void) {
|
||||||
Con_Printf("Server Map Users\n");
|
console::info("Server Map Users\n");
|
||||||
Con_Printf("--------------- --------------- -----\n");
|
console::info("--------------- --------------- -----\n");
|
||||||
slistLastShown = 0;
|
slistLastShown = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,10 +250,10 @@ static void PrintSlist(void) {
|
|||||||
|
|
||||||
for (n = slistLastShown; n < hostCacheCount; n++) {
|
for (n = slistLastShown; n < hostCacheCount; n++) {
|
||||||
if (hostcache[n].maxusers)
|
if (hostcache[n].maxusers)
|
||||||
Con_Printf("%-15.15s %-15.15s %2u/%2u\n", hostcache[n].name, hostcache[n].map, hostcache[n].users,
|
console::info("%-15.15s %-15.15s %2u/%2u\n", hostcache[n].name, hostcache[n].map, hostcache[n].users,
|
||||||
hostcache[n].maxusers);
|
hostcache[n].maxusers);
|
||||||
else
|
else
|
||||||
Con_Printf("%-15.15s %-15.15s\n", hostcache[n].name, hostcache[n].map);
|
console::info("%-15.15s %-15.15s\n", hostcache[n].name, hostcache[n].map);
|
||||||
}
|
}
|
||||||
slistLastShown = n;
|
slistLastShown = n;
|
||||||
}
|
}
|
||||||
@@ -261,9 +261,9 @@ static void PrintSlist(void) {
|
|||||||
|
|
||||||
static void PrintSlistTrailer(void) {
|
static void PrintSlistTrailer(void) {
|
||||||
if (hostCacheCount)
|
if (hostCacheCount)
|
||||||
Con_Printf("== end list ==\n\n");
|
console::info("== end list ==\n\n");
|
||||||
else
|
else
|
||||||
Con_Printf("No Quake servers found.\n\n");
|
console::info("No Quake servers found.\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ void NET_Slist_f(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!slistSilent) {
|
if (!slistSilent) {
|
||||||
Con_Printf("Looking for Quake servers...\n");
|
console::info("Looking for Quake servers...\n");
|
||||||
PrintSlistHeader();
|
PrintSlistHeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ qsocket_t *NET_Connect(const char *host) {
|
|||||||
if (hostCacheCount != 1)
|
if (hostCacheCount != 1)
|
||||||
return NULL;
|
return NULL;
|
||||||
host = hostcache[0].cname;
|
host = hostcache[0].cname;
|
||||||
Con_Printf("Connecting to...\n%s @ %s\n\n", hostcache[0].name, host);
|
console::info("Connecting to...\n%s @ %s\n\n", hostcache[0].name, host);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostCacheCount) {
|
if (hostCacheCount) {
|
||||||
@@ -436,7 +436,7 @@ JustDoIt:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (host) {
|
if (host) {
|
||||||
Con_Printf("\n");
|
console::info("\n");
|
||||||
PrintSlistHeader();
|
PrintSlistHeader();
|
||||||
PrintSlist();
|
PrintSlist();
|
||||||
PrintSlistTrailer();
|
PrintSlistTrailer();
|
||||||
@@ -509,7 +509,7 @@ int NET_GetMessage(qsocket_t *sock) {
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (sock->disconnected) {
|
if (sock->disconnected) {
|
||||||
Con_Printf("NET_GetMessage: disconnected socket\n");
|
console::info("NET_GetMessage: disconnected socket\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ int NET_SendMessage(qsocket_t *sock, sizebuf_t *data) {
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (sock->disconnected) {
|
if (sock->disconnected) {
|
||||||
Con_Printf("NET_SendMessage: disconnected socket\n");
|
console::info("NET_SendMessage: disconnected socket\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -577,7 +577,7 @@ int NET_SendUnreliableMessage(qsocket_t *sock, sizebuf_t *data) {
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (sock->disconnected) {
|
if (sock->disconnected) {
|
||||||
Con_Printf("NET_SendMessage: disconnected socket\n");
|
console::info("NET_SendMessage: disconnected socket\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -743,10 +743,10 @@ void NET_Init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (*my_ipx_address) {
|
if (*my_ipx_address) {
|
||||||
Con_DPrintf("IPX address %s\n", my_ipx_address);
|
console::debug("IPX address %s\n", my_ipx_address);
|
||||||
}
|
}
|
||||||
if (*my_tcpip_address) {
|
if (*my_tcpip_address) {
|
||||||
Con_DPrintf("TCP/IP address %s\n", my_tcpip_address);
|
console::debug("TCP/IP address %s\n", my_tcpip_address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+12
-12
@@ -53,7 +53,7 @@ sys_socket_t UDP_Init (void)
|
|||||||
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
||||||
{
|
{
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("UDP_Init: WARNING: gethostname failed (%s)\n",
|
console::safe_print("UDP_Init: WARNING: gethostname failed (%s)\n",
|
||||||
socketerror(err));
|
socketerror(err));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -66,18 +66,18 @@ sys_socket_t UDP_Init (void)
|
|||||||
tst = strstr(buff, ".local");
|
tst = strstr(buff, ".local");
|
||||||
if (tst && tst[6] == '\0')
|
if (tst && tst[6] == '\0')
|
||||||
{
|
{
|
||||||
Con_SafePrintf("UDP_Init: skipping gethostbyname for %s\n", buff);
|
console::safe_print("UDP_Init: skipping gethostbyname for %s\n", buff);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (!(local = gethostbyname(buff)))
|
if (!(local = gethostbyname(buff)))
|
||||||
{
|
{
|
||||||
Con_SafePrintf("UDP_Init: WARNING: gethostbyname failed (%s)\n",
|
console::safe_print("UDP_Init: WARNING: gethostbyname failed (%s)\n",
|
||||||
hstrerror(h_errno));
|
hstrerror(h_errno));
|
||||||
}
|
}
|
||||||
else if (local->h_addrtype != AF_INET)
|
else if (local->h_addrtype != AF_INET)
|
||||||
{
|
{
|
||||||
Con_SafePrintf("UDP_Init: address from gethostbyname not IPv4\n");
|
console::safe_print("UDP_Init: address from gethostbyname not IPv4\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -105,7 +105,7 @@ sys_socket_t UDP_Init (void)
|
|||||||
|
|
||||||
if ((net_controlsocket = UDP_OpenSocket(0)) == INVALID_SOCKET)
|
if ((net_controlsocket = UDP_OpenSocket(0)) == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
Con_SafePrintf("UDP_Init: Unable to open control socket, UDP disabled\n");
|
console::safe_print("UDP_Init: Unable to open control socket, UDP disabled\n");
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ sys_socket_t UDP_Init (void)
|
|||||||
tst = strrchr(my_tcpip_address, ':');
|
tst = strrchr(my_tcpip_address, ':');
|
||||||
if (tst) *tst = 0;
|
if (tst) *tst = 0;
|
||||||
|
|
||||||
Con_SafePrintf("UDP Initialized\n");
|
console::safe_print("UDP Initialized\n");
|
||||||
tcpipAvailable = true;
|
tcpipAvailable = true;
|
||||||
|
|
||||||
return net_controlsocket;
|
return net_controlsocket;
|
||||||
@@ -165,7 +165,7 @@ sys_socket_t UDP_OpenSocket (int port)
|
|||||||
if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET)
|
if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("UDP_OpenSocket: %s\n", socketerror(err));
|
console::safe_print("UDP_OpenSocket: %s\n", socketerror(err));
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ sys_socket_t UDP_OpenSocket (int port)
|
|||||||
|
|
||||||
ErrorReturn:
|
ErrorReturn:
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("UDP_OpenSocket: %s\n", socketerror(err));
|
console::safe_print("UDP_OpenSocket: %s\n", socketerror(err));
|
||||||
UDP_CloseSocket (newsocket);
|
UDP_CloseSocket (newsocket);
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
@@ -295,7 +295,7 @@ int UDP_Read (sys_socket_t socketid, byte *buf, int len, struct qsockaddr *addr)
|
|||||||
int err = SOCKETERRNO;
|
int err = SOCKETERRNO;
|
||||||
if (err == NET_EWOULDBLOCK || err == NET_ECONNREFUSED)
|
if (err == NET_EWOULDBLOCK || err == NET_ECONNREFUSED)
|
||||||
return 0;
|
return 0;
|
||||||
Con_SafePrintf ("UDP_Read, recvfrom: %s\n", socketerror(err));
|
console::safe_print ("UDP_Read, recvfrom: %s\n", socketerror(err));
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -311,7 +311,7 @@ static int UDP_MakeSocketBroadcastCapable (sys_socket_t socketid)
|
|||||||
== SOCKET_ERROR)
|
== SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
int err = SOCKETERRNO;
|
int err = SOCKETERRNO;
|
||||||
Con_SafePrintf ("UDP, setsockopt: %s\n", socketerror(err));
|
console::safe_print ("UDP, setsockopt: %s\n", socketerror(err));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
net_broadcastsocket = socketid;
|
net_broadcastsocket = socketid;
|
||||||
@@ -332,7 +332,7 @@ int UDP_Broadcast (sys_socket_t socketid, byte *buf, int len)
|
|||||||
ret = UDP_MakeSocketBroadcastCapable (socketid);
|
ret = UDP_MakeSocketBroadcastCapable (socketid);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
{
|
{
|
||||||
Con_Printf("Unable to make socket broadcast capable\n");
|
console::info("Unable to make socket broadcast capable\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -353,7 +353,7 @@ int UDP_Write (sys_socket_t socketid, byte *buf, int len, struct qsockaddr *addr
|
|||||||
int err = SOCKETERRNO;
|
int err = SOCKETERRNO;
|
||||||
if (err == NET_EWOULDBLOCK)
|
if (err == NET_EWOULDBLOCK)
|
||||||
return 0;
|
return 0;
|
||||||
Con_SafePrintf ("UDP_Write, sendto: %s\n", socketerror(err));
|
console::safe_print ("UDP_Write, sendto: %s\n", socketerror(err));
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-12
@@ -83,7 +83,7 @@ static void WINS_GetLocalAddress (void)
|
|||||||
if (gethostname(buff, MAXHOSTNAMELEN) == SOCKET_ERROR)
|
if (gethostname(buff, MAXHOSTNAMELEN) == SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("WINS_GetLocalAddress: WARNING: gethostname failed (%s)\n",
|
console::safe_print("WINS_GetLocalAddress: WARNING: gethostname failed (%s)\n",
|
||||||
socketerror(err));
|
socketerror(err));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -100,7 +100,7 @@ static void WINS_GetLocalAddress (void)
|
|||||||
#endif
|
#endif
|
||||||
if (local == NULL)
|
if (local == NULL)
|
||||||
{
|
{
|
||||||
Con_SafePrintf("WINS_GetLocalAddress: gethostbyname failed (%s)\n",
|
console::safe_print("WINS_GetLocalAddress: gethostbyname failed (%s)\n",
|
||||||
__WSAE_StrError(err));
|
__WSAE_StrError(err));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@ sys_socket_t WINS_Init (void)
|
|||||||
err = WSAStartup(MAKEWORD(1,1), &winsockdata);
|
err = WSAStartup(MAKEWORD(1,1), &winsockdata);
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
{
|
{
|
||||||
Con_SafePrintf("Winsock initialization failed (%s)\n",
|
console::safe_print("Winsock initialization failed (%s)\n",
|
||||||
socketerror(err));
|
socketerror(err));
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,7 @@ sys_socket_t WINS_Init (void)
|
|||||||
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
||||||
{
|
{
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("WINS_Init: WARNING: gethostname failed (%s)\n",
|
console::safe_print("WINS_Init: WARNING: gethostname failed (%s)\n",
|
||||||
socketerror(err));
|
socketerror(err));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -166,7 +166,7 @@ sys_socket_t WINS_Init (void)
|
|||||||
|
|
||||||
if ((net_controlsocket = WINS_OpenSocket(0)) == INVALID_SOCKET)
|
if ((net_controlsocket = WINS_OpenSocket(0)) == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
Con_SafePrintf("WINS_Init: Unable to open control socket, UDP disabled\n");
|
console::safe_print("WINS_Init: Unable to open control socket, UDP disabled\n");
|
||||||
if (--winsock_initialized == 0)
|
if (--winsock_initialized == 0)
|
||||||
WSACleanup ();
|
WSACleanup ();
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
@@ -176,7 +176,7 @@ sys_socket_t WINS_Init (void)
|
|||||||
broadcastaddr.sin_addr.s_addr = INADDR_BROADCAST;
|
broadcastaddr.sin_addr.s_addr = INADDR_BROADCAST;
|
||||||
broadcastaddr.sin_port = htons((unsigned short)net_hostport);
|
broadcastaddr.sin_port = htons((unsigned short)net_hostport);
|
||||||
|
|
||||||
Con_SafePrintf("UDP Initialized\n");
|
console::safe_print("UDP Initialized\n");
|
||||||
tcpipAvailable = true;
|
tcpipAvailable = true;
|
||||||
|
|
||||||
return net_controlsocket;
|
return net_controlsocket;
|
||||||
@@ -226,7 +226,7 @@ sys_socket_t WINS_OpenSocket (int port)
|
|||||||
if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET)
|
if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("WINS_OpenSocket: %s\n", socketerror(err));
|
console::safe_print("WINS_OpenSocket: %s\n", socketerror(err));
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ sys_socket_t WINS_OpenSocket (int port)
|
|||||||
|
|
||||||
ErrorReturn:
|
ErrorReturn:
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("WINS_OpenSocket: %s\n", socketerror(err));
|
console::safe_print("WINS_OpenSocket: %s\n", socketerror(err));
|
||||||
closesocket (newsocket);
|
closesocket (newsocket);
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
@@ -359,7 +359,7 @@ int WINS_Read (sys_socket_t socketid, byte *buf, int len, struct qsockaddr *addr
|
|||||||
int err = SOCKETERRNO;
|
int err = SOCKETERRNO;
|
||||||
if (err == NET_EWOULDBLOCK || err == NET_ECONNREFUSED)
|
if (err == NET_EWOULDBLOCK || err == NET_ECONNREFUSED)
|
||||||
return 0;
|
return 0;
|
||||||
Con_SafePrintf ("WINS_Read, recvfrom: %s\n", socketerror(err));
|
console::safe_print ("WINS_Read, recvfrom: %s\n", socketerror(err));
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -375,7 +375,7 @@ static int WINS_MakeSocketBroadcastCapable (sys_socket_t socketid)
|
|||||||
== SOCKET_ERROR)
|
== SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
int err = SOCKETERRNO;
|
int err = SOCKETERRNO;
|
||||||
Con_SafePrintf ("UDP, setsockopt: %s\n", socketerror(err));
|
console::safe_print ("UDP, setsockopt: %s\n", socketerror(err));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
net_broadcastsocket = socketid;
|
net_broadcastsocket = socketid;
|
||||||
@@ -397,7 +397,7 @@ int WINS_Broadcast (sys_socket_t socketid, byte *buf, int len)
|
|||||||
ret = WINS_MakeSocketBroadcastCapable (socketid);
|
ret = WINS_MakeSocketBroadcastCapable (socketid);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
{
|
{
|
||||||
Con_Printf("Unable to make socket broadcast capable\n");
|
console::info("Unable to make socket broadcast capable\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -418,7 +418,7 @@ int WINS_Write (sys_socket_t socketid, byte *buf, int len, struct qsockaddr *add
|
|||||||
int err = SOCKETERRNO;
|
int err = SOCKETERRNO;
|
||||||
if (err == NET_EWOULDBLOCK)
|
if (err == NET_EWOULDBLOCK)
|
||||||
return 0;
|
return 0;
|
||||||
Con_SafePrintf ("WINS_Write, sendto: %s\n", socketerror(err));
|
console::safe_print ("WINS_Write, sendto: %s\n", socketerror(err));
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-10
@@ -61,7 +61,7 @@ sys_socket_t WIPX_Init (void)
|
|||||||
err = WSAStartup(MAKEWORD(1,1), &winsockdata);
|
err = WSAStartup(MAKEWORD(1,1), &winsockdata);
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
{
|
{
|
||||||
Con_SafePrintf("Winsock initialization failed (%s)\n",
|
console::safe_print("Winsock initialization failed (%s)\n",
|
||||||
socketerror(err));
|
socketerror(err));
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,7 @@ sys_socket_t WIPX_Init (void)
|
|||||||
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
||||||
{
|
{
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("WIPX_Init: WARNING: gethostname failed (%s)\n",
|
console::safe_print("WIPX_Init: WARNING: gethostname failed (%s)\n",
|
||||||
socketerror(err));
|
socketerror(err));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -85,7 +85,7 @@ sys_socket_t WIPX_Init (void)
|
|||||||
|
|
||||||
if ((net_controlsocket = WIPX_OpenSocket(0)) == INVALID_SOCKET)
|
if ((net_controlsocket = WIPX_OpenSocket(0)) == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
Con_SafePrintf("WIPX_Init: Unable to open control socket, IPX disabled\n");
|
console::safe_print("WIPX_Init: Unable to open control socket, IPX disabled\n");
|
||||||
if (--winsock_initialized == 0)
|
if (--winsock_initialized == 0)
|
||||||
WSACleanup ();
|
WSACleanup ();
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
@@ -102,7 +102,7 @@ sys_socket_t WIPX_Init (void)
|
|||||||
if (colon)
|
if (colon)
|
||||||
*colon = 0;
|
*colon = 0;
|
||||||
|
|
||||||
Con_SafePrintf("IPX Initialized\n");
|
console::safe_print("IPX Initialized\n");
|
||||||
ipxAvailable = true;
|
ipxAvailable = true;
|
||||||
|
|
||||||
return net_controlsocket;
|
return net_controlsocket;
|
||||||
@@ -155,14 +155,14 @@ sys_socket_t WIPX_OpenSocket (int port)
|
|||||||
}
|
}
|
||||||
if (handle == IPXSOCKETS)
|
if (handle == IPXSOCKETS)
|
||||||
{
|
{
|
||||||
Con_SafePrintf("WIPX_OpenSocket: Out of free IPX handles.\n");
|
console::safe_print("WIPX_OpenSocket: Out of free IPX handles.\n");
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((newsocket = socket (AF_IPX, SOCK_DGRAM, NSPROTO_IPX)) == INVALID_SOCKET)
|
if ((newsocket = socket (AF_IPX, SOCK_DGRAM, NSPROTO_IPX)) == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("WIPX_OpenSocket: %s\n", socketerror(err));
|
console::safe_print("WIPX_OpenSocket: %s\n", socketerror(err));
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ sys_socket_t WIPX_OpenSocket (int port)
|
|||||||
|
|
||||||
ErrorReturn:
|
ErrorReturn:
|
||||||
err = SOCKETERRNO;
|
err = SOCKETERRNO;
|
||||||
Con_SafePrintf("WIPX_OpenSocket: %s\n", socketerror(err));
|
console::safe_print("WIPX_OpenSocket: %s\n", socketerror(err));
|
||||||
closesocket (newsocket);
|
closesocket (newsocket);
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
@@ -253,7 +253,7 @@ int WIPX_Read (sys_socket_t handle, byte *buf, int len, struct qsockaddr *addr)
|
|||||||
int err = SOCKETERRNO;
|
int err = SOCKETERRNO;
|
||||||
if (err == NET_EWOULDBLOCK || err == NET_ECONNREFUSED)
|
if (err == NET_EWOULDBLOCK || err == NET_ECONNREFUSED)
|
||||||
return 0;
|
return 0;
|
||||||
Con_SafePrintf ("WIPX_Read, recvfrom: %s\n", socketerror(err));
|
console::safe_print ("WIPX_Read, recvfrom: %s\n", socketerror(err));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 4)
|
if (ret < 4)
|
||||||
@@ -292,7 +292,7 @@ int WIPX_Write (sys_socket_t handle, byte *buf, int len, struct qsockaddr *addr)
|
|||||||
int err = SOCKETERRNO;
|
int err = SOCKETERRNO;
|
||||||
if (err == NET_EWOULDBLOCK)
|
if (err == NET_EWOULDBLOCK)
|
||||||
return 0;
|
return 0;
|
||||||
Con_SafePrintf ("WIPX_Write, sendto: %s\n", socketerror(err));
|
console::safe_print ("WIPX_Write, sendto: %s\n", socketerror(err));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -369,7 +369,7 @@ int WIPX_GetSocketAddr (sys_socket_t handle, struct qsockaddr *addr)
|
|||||||
{
|
{
|
||||||
int err = SOCKETERRNO;
|
int err = SOCKETERRNO;
|
||||||
/* FIXME: what action should be taken?... */
|
/* FIXME: what action should be taken?... */
|
||||||
Con_SafePrintf ("WIPX, getsockname: %s\n", socketerror(err));
|
console::safe_print ("WIPX, getsockname: %s\n", socketerror(err));
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+12
-12
@@ -82,7 +82,7 @@ static char *PF_VarString (int first)
|
|||||||
s = q_strlcat(out, LOC_GetString(G_STRING(OFS_PARM0+i*3)), sizeof(out));
|
s = q_strlcat(out, LOC_GetString(G_STRING(OFS_PARM0+i*3)), sizeof(out));
|
||||||
if (s >= sizeof(out))
|
if (s >= sizeof(out))
|
||||||
{
|
{
|
||||||
Con_Warning("PF_VarString: overflow (string truncated)\n");
|
console::warn("PF_VarString: overflow (string truncated)\n");
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@ static char *PF_VarString (int first)
|
|||||||
{
|
{
|
||||||
if (!dev_overflows.varstring || dev_overflows.varstring + CONSOLE_RESPAM_TIME < realtime)
|
if (!dev_overflows.varstring || dev_overflows.varstring + CONSOLE_RESPAM_TIME < realtime)
|
||||||
{
|
{
|
||||||
Con_DWarning("PF_VarString: %i characters exceeds standard limit of 255 (max = %d).\n",
|
console::dev_warn("PF_VarString: %i characters exceeds standard limit of 255 (max = %d).\n",
|
||||||
(int) s, (int)(sizeof(out) - 1));
|
(int) s, (int)(sizeof(out) - 1));
|
||||||
dev_overflows.varstring = realtime;
|
dev_overflows.varstring = realtime;
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ static void PF_error (void)
|
|||||||
edict_t *ed;
|
edict_t *ed;
|
||||||
|
|
||||||
s = PF_VarString(0);
|
s = PF_VarString(0);
|
||||||
Con_Printf ("======SERVER ERROR in %s:\n%s\n",
|
console::info ("======SERVER ERROR in %s:\n%s\n",
|
||||||
PR_GetString(pr_xfunction->s_name), s);
|
PR_GetString(pr_xfunction->s_name), s);
|
||||||
ed = PROG_TO_EDICT(pr_global_struct->self);
|
ed = PROG_TO_EDICT(pr_global_struct->self);
|
||||||
ED_Print (ed);
|
ED_Print (ed);
|
||||||
@@ -140,7 +140,7 @@ static void PF_objerror (void)
|
|||||||
edict_t *ed;
|
edict_t *ed;
|
||||||
|
|
||||||
s = PF_VarString(0);
|
s = PF_VarString(0);
|
||||||
Con_Printf ("======OBJECT ERROR in %s:\n%s\n",
|
console::info ("======OBJECT ERROR in %s:\n%s\n",
|
||||||
PR_GetString(pr_xfunction->s_name), s);
|
PR_GetString(pr_xfunction->s_name), s);
|
||||||
ed = PROG_TO_EDICT(pr_global_struct->self);
|
ed = PROG_TO_EDICT(pr_global_struct->self);
|
||||||
ED_Print (ed);
|
ED_Print (ed);
|
||||||
@@ -368,7 +368,7 @@ static void PF_sprint (void)
|
|||||||
|
|
||||||
if (entnum < 1 || entnum > svs.maxclients)
|
if (entnum < 1 || entnum > svs.maxclients)
|
||||||
{
|
{
|
||||||
Con_Printf ("tried to sprint to a non-client\n");
|
console::info ("tried to sprint to a non-client\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@ static void PF_centerprint (void)
|
|||||||
|
|
||||||
if (entnum < 1 || entnum > svs.maxclients)
|
if (entnum < 1 || entnum > svs.maxclients)
|
||||||
{
|
{
|
||||||
Con_Printf ("tried to sprint to a non-client\n");
|
console::info ("tried to sprint to a non-client\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -595,7 +595,7 @@ static void PF_ambientsound (void)
|
|||||||
|
|
||||||
if (!*check)
|
if (!*check)
|
||||||
{
|
{
|
||||||
Con_Printf ("no precache: %s\n", samp);
|
console::info ("no precache: %s\n", samp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -676,7 +676,7 @@ break()
|
|||||||
*/
|
*/
|
||||||
static void PF_break (void)
|
static void PF_break (void)
|
||||||
{
|
{
|
||||||
Con_Printf ("break statement\n");
|
console::info ("break statement\n");
|
||||||
*(int *)-4 = 0; // dump to debugger
|
*(int *)-4 = 0; // dump to debugger
|
||||||
// PR_RunError ("break statement");
|
// PR_RunError ("break statement");
|
||||||
}
|
}
|
||||||
@@ -708,7 +708,7 @@ static void PF_traceline (void)
|
|||||||
if (developer.value) {
|
if (developer.value) {
|
||||||
if (IS_NAN(v1[0]) || IS_NAN(v1[1]) || IS_NAN(v1[2]) ||
|
if (IS_NAN(v1[0]) || IS_NAN(v1[1]) || IS_NAN(v1[2]) ||
|
||||||
IS_NAN(v2[0]) || IS_NAN(v2[1]) || IS_NAN(v2[2])) {
|
IS_NAN(v2[0]) || IS_NAN(v2[1]) || IS_NAN(v2[2])) {
|
||||||
Con_Warning ("NAN in traceline:\nv1(%f %f %f) v2(%f %f %f)\nentity %d\n",
|
console::warn ("NAN in traceline:\nv1(%f %f %f) v2(%f %f %f)\nentity %d\n",
|
||||||
v1[0], v1[1], v1[2], v2[0], v2[1], v2[2], NUM_FOR_EDICT(ent));
|
v1[0], v1[1], v1[2], v2[0], v2[1], v2[2], NUM_FOR_EDICT(ent));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1008,7 +1008,7 @@ PF_dprint
|
|||||||
*/
|
*/
|
||||||
static void PF_dprint (void)
|
static void PF_dprint (void)
|
||||||
{
|
{
|
||||||
Con_DPrintf ("%s",PF_VarString(0));
|
console::debug ("%s",PF_VarString(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PF_ftos (void)
|
static void PF_ftos (void)
|
||||||
@@ -1269,7 +1269,7 @@ static void PF_lightstyle (void)
|
|||||||
// bounds check to avoid clobbering sv struct
|
// bounds check to avoid clobbering sv struct
|
||||||
if (style < 0 || style >= MAX_LIGHTSTYLES)
|
if (style < 0 || style >= MAX_LIGHTSTYLES)
|
||||||
{
|
{
|
||||||
Con_DWarning("PF_lightstyle: invalid style %d\n", style);
|
console::dev_warn("PF_lightstyle: invalid style %d\n", style);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1733,7 +1733,7 @@ static void PF_localsound (void)
|
|||||||
entnum = G_EDICTNUM(OFS_PARM0);
|
entnum = G_EDICTNUM(OFS_PARM0);
|
||||||
sample = G_STRING(OFS_PARM1);
|
sample = G_STRING(OFS_PARM1);
|
||||||
if (entnum < 1 || entnum > svs.maxclients) {
|
if (entnum < 1 || entnum > svs.maxclients) {
|
||||||
Con_Printf ("tried to localsound to a non-client\n");
|
console::info ("tried to localsound to a non-client\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SV_LocalSound (&svs.clients[entnum-1], sample);
|
SV_LocalSound (&svs.clients[entnum-1], sample);
|
||||||
|
|||||||
+23
-23
@@ -487,11 +487,11 @@ void ED_Print (edict_t *ed)
|
|||||||
|
|
||||||
if (ed->free)
|
if (ed->free)
|
||||||
{
|
{
|
||||||
Con_Printf ("FREE\n");
|
console::info ("FREE\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_SafePrintf("\nEDICT %i:\n", NUM_FOR_EDICT(ed)); //johnfitz -- was Con_Printf
|
console::safe_print("\nEDICT %i:\n", NUM_FOR_EDICT(ed)); //johnfitz -- was console::info
|
||||||
for (i = 1; i < progs->numfielddefs; i++)
|
for (i = 1; i < progs->numfielddefs; i++)
|
||||||
{
|
{
|
||||||
d = &pr_fielddefs[i];
|
d = &pr_fielddefs[i];
|
||||||
@@ -516,11 +516,11 @@ void ED_Print (edict_t *ed)
|
|||||||
if (j == type_size[type])
|
if (j == type_size[type])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Con_SafePrintf ("%s", name); //johnfitz -- was Con_Printf
|
console::safe_print ("%s", name); //johnfitz -- was console::info
|
||||||
while (l++ < 15)
|
while (l++ < 15)
|
||||||
Con_SafePrintf (" "); //johnfitz -- was Con_Printf
|
console::safe_print (" "); //johnfitz -- was console::info
|
||||||
|
|
||||||
Con_SafePrintf ("%s\n", PR_ValueString(d->type, (eval_t *)v)); //johnfitz -- was Con_Printf
|
console::safe_print ("%s\n", PR_ValueString(d->type, (eval_t *)v)); //johnfitz -- was console::info
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -602,7 +602,7 @@ void ED_PrintEdicts (void)
|
|||||||
if (!sv.active)
|
if (!sv.active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Con_Printf ("%i entities\n", sv.num_edicts);
|
console::info ("%i entities\n", sv.num_edicts);
|
||||||
for (i = 0; i < sv.num_edicts; i++)
|
for (i = 0; i < sv.num_edicts; i++)
|
||||||
ED_PrintNum (i);
|
ED_PrintNum (i);
|
||||||
}
|
}
|
||||||
@@ -624,7 +624,7 @@ static void ED_PrintEdict_f (void)
|
|||||||
i = std::atoi (command::argv(1).value_or("").c_str());
|
i = std::atoi (command::argv(1).value_or("").c_str());
|
||||||
if (i < 0 || i >= sv.num_edicts)
|
if (i < 0 || i >= sv.num_edicts)
|
||||||
{
|
{
|
||||||
Con_Printf("Bad edict number\n");
|
console::info("Bad edict number\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ED_PrintNum (i);
|
ED_PrintNum (i);
|
||||||
@@ -660,11 +660,11 @@ static void ED_Count (void)
|
|||||||
step++;
|
step++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf ("num_edicts:%3i\n", sv.num_edicts);
|
console::info ("num_edicts:%3i\n", sv.num_edicts);
|
||||||
Con_Printf ("active :%3i\n", active);
|
console::info ("active :%3i\n", active);
|
||||||
Con_Printf ("view :%3i\n", models);
|
console::info ("view :%3i\n", models);
|
||||||
Con_Printf ("touch :%3i\n", solid);
|
console::info ("touch :%3i\n", solid);
|
||||||
Con_Printf ("step :%3i\n", step);
|
console::info ("step :%3i\n", step);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -743,7 +743,7 @@ void ED_ParseGlobals (std::istringstream &ss)
|
|||||||
key = ED_FindGlobal (keyname.c_str());
|
key = ED_FindGlobal (keyname.c_str());
|
||||||
if (!key)
|
if (!key)
|
||||||
{
|
{
|
||||||
Con_Printf ("'%s' is not a global\n", keyname.c_str());
|
console::info ("'%s' is not a global\n", keyname.c_str());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -836,7 +836,7 @@ static bool ED_ParseEpair (void *base, ddef_t *key, const char *s)
|
|||||||
// before reading 3 floats.
|
// before reading 3 floats.
|
||||||
if (i < 3)
|
if (i < 3)
|
||||||
{
|
{
|
||||||
Con_DWarning ("Avoided reading garbage for \"%s\" \"%s\"\n", PR_GetString(key->s_name), s);
|
console::dev_warn ("Avoided reading garbage for \"%s\" \"%s\"\n", PR_GetString(key->s_name), s);
|
||||||
for (; i < 3; i++)
|
for (; i < 3; i++)
|
||||||
((float *)d)[i] = 0.0f;
|
((float *)d)[i] = 0.0f;
|
||||||
}
|
}
|
||||||
@@ -852,7 +852,7 @@ static bool ED_ParseEpair (void *base, ddef_t *key, const char *s)
|
|||||||
{
|
{
|
||||||
//johnfitz -- HACK -- suppress error becuase fog/sky fields might not be mentioned in defs.qc
|
//johnfitz -- HACK -- suppress error becuase fog/sky fields might not be mentioned in defs.qc
|
||||||
if (strncmp(s, "sky", 3) && strcmp(s, "fog"))
|
if (strncmp(s, "sky", 3) && strcmp(s, "fog"))
|
||||||
Con_DPrintf ("Can't find field %s\n", s);
|
console::debug ("Can't find field %s\n", s);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*(int *)d = G_INT(def->ofs);
|
*(int *)d = G_INT(def->ofs);
|
||||||
@@ -862,7 +862,7 @@ static bool ED_ParseEpair (void *base, ddef_t *key, const char *s)
|
|||||||
func = ED_FindFunction (s);
|
func = ED_FindFunction (s);
|
||||||
if (!func)
|
if (!func)
|
||||||
{
|
{
|
||||||
Con_Printf ("Can't find function %s\n", s);
|
console::info ("Can't find function %s\n", s);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*(func_t *)d = func - pr_functions;
|
*(func_t *)d = func - pr_functions;
|
||||||
@@ -962,7 +962,7 @@ void ED_ParseEdict(std::istringstream &ss, edict_t *ent)
|
|||||||
{
|
{
|
||||||
//johnfitz -- HACK -- suppress error becuase fog/sky/alpha fields might not be mentioned in defs.qc
|
//johnfitz -- HACK -- suppress error becuase fog/sky/alpha fields might not be mentioned in defs.qc
|
||||||
if (keyname != "sky" && keyname != "fog" && keyname != "alpha")
|
if (keyname != "sky" && keyname != "fog" && keyname != "alpha")
|
||||||
Con_DPrintf ("\"%s\" is not a field\n", keyname.c_str()); //johnfitz -- was Con_Printf
|
console::debug ("\"%s\" is not a field\n", keyname.c_str()); //johnfitz -- was console::info
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1046,7 +1046,7 @@ void ED_LoadFromFile (const char *data)
|
|||||||
//
|
//
|
||||||
if (!ent->v.classname)
|
if (!ent->v.classname)
|
||||||
{
|
{
|
||||||
Con_SafePrintf ("No classname for:\n"); //johnfitz -- was Con_Printf
|
console::safe_print ("No classname for:\n"); //johnfitz -- was console::info
|
||||||
ED_Print (ent);
|
ED_Print (ent);
|
||||||
ED_Free (ent);
|
ED_Free (ent);
|
||||||
continue;
|
continue;
|
||||||
@@ -1057,7 +1057,7 @@ void ED_LoadFromFile (const char *data)
|
|||||||
|
|
||||||
if (!func)
|
if (!func)
|
||||||
{
|
{
|
||||||
Con_SafePrintf ("No spawn function for:\n"); //johnfitz -- was Con_Printf
|
console::safe_print ("No spawn function for:\n"); //johnfitz -- was console::info
|
||||||
ED_Print (ent);
|
ED_Print (ent);
|
||||||
ED_Free (ent);
|
ED_Free (ent);
|
||||||
continue;
|
continue;
|
||||||
@@ -1069,7 +1069,7 @@ void ED_LoadFromFile (const char *data)
|
|||||||
PR_ExecuteProgram (func - pr_functions);
|
PR_ExecuteProgram (func - pr_functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_DPrintf ("%i entities inhibited\n", inhibit);
|
console::debug ("%i entities inhibited\n", inhibit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1178,7 +1178,7 @@ void PR_LoadProgs (void)
|
|||||||
progs = (dprograms_t *)COM_LoadHunkFile ("progs.dat", NULL);
|
progs = (dprograms_t *)COM_LoadHunkFile ("progs.dat", NULL);
|
||||||
if (!progs)
|
if (!progs)
|
||||||
Host_Error ("PR_LoadProgs: couldn't load progs.dat");
|
Host_Error ("PR_LoadProgs: couldn't load progs.dat");
|
||||||
Con_DPrintf ("Programs occupy %iK.\n", com_filesize/1024);
|
console::debug ("Programs occupy %iK.\n", com_filesize/1024);
|
||||||
|
|
||||||
for (i = 0; i < com_filesize; i++)
|
for (i = 0; i < com_filesize; i++)
|
||||||
CRC_ProcessByte (&pr_crc, ((byte *)progs)[i]);
|
CRC_ProcessByte (&pr_crc, ((byte *)progs)[i]);
|
||||||
@@ -1322,7 +1322,7 @@ int NUM_FOR_EDICT(edict_t *e)
|
|||||||
static void PR_AllocStringSlots (void)
|
static void PR_AllocStringSlots (void)
|
||||||
{
|
{
|
||||||
pr_maxknownstrings += PR_STRING_ALLOCSLOTS;
|
pr_maxknownstrings += PR_STRING_ALLOCSLOTS;
|
||||||
Con_DPrintf2("PR_AllocStringSlots: realloc'ing for %d slots\n", pr_maxknownstrings);
|
console::trace("PR_AllocStringSlots: realloc'ing for %d slots\n", pr_maxknownstrings);
|
||||||
pr_knownstrings = (const char **) Z_Realloc ((void *)pr_knownstrings, pr_maxknownstrings * sizeof(char *));
|
pr_knownstrings = (const char **) Z_Realloc ((void *)pr_knownstrings, pr_maxknownstrings * sizeof(char *));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1365,7 +1365,7 @@ int PR_SetEngineString (const char *s)
|
|||||||
return -1 - i;
|
return -1 - i;
|
||||||
}
|
}
|
||||||
// new unknown engine string
|
// new unknown engine string
|
||||||
//Con_DPrintf ("PR_SetEngineString: new engine string %p\n", s);
|
//console::debug ("PR_SetEngineString: new engine string %p\n", s);
|
||||||
#if 0
|
#if 0
|
||||||
for (i = 0; i < pr_numknownstrings; i++)
|
for (i = 0; i < pr_numknownstrings; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
+15
-15
@@ -146,33 +146,33 @@ static void PR_PrintStatement (dstatement_t *s)
|
|||||||
|
|
||||||
if ((unsigned int)s->op < std::size(pr_opnames))
|
if ((unsigned int)s->op < std::size(pr_opnames))
|
||||||
{
|
{
|
||||||
Con_Printf("%s ", pr_opnames[s->op]);
|
console::info("%s ", pr_opnames[s->op]);
|
||||||
i = strlen(pr_opnames[s->op]);
|
i = strlen(pr_opnames[s->op]);
|
||||||
for ( ; i < 10; i++)
|
for ( ; i < 10; i++)
|
||||||
Con_Printf(" ");
|
console::info(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->op == OP_IF || s->op == OP_IFNOT)
|
if (s->op == OP_IF || s->op == OP_IFNOT)
|
||||||
Con_Printf("%sbranch %i", PR_GlobalString(s->a), s->b);
|
console::info("%sbranch %i", PR_GlobalString(s->a), s->b);
|
||||||
else if (s->op == OP_GOTO)
|
else if (s->op == OP_GOTO)
|
||||||
{
|
{
|
||||||
Con_Printf("branch %i", s->a);
|
console::info("branch %i", s->a);
|
||||||
}
|
}
|
||||||
else if ((unsigned int)(s->op-OP_STORE_F) < 6)
|
else if ((unsigned int)(s->op-OP_STORE_F) < 6)
|
||||||
{
|
{
|
||||||
Con_Printf("%s", PR_GlobalString(s->a));
|
console::info("%s", PR_GlobalString(s->a));
|
||||||
Con_Printf("%s", PR_GlobalStringNoContents(s->b));
|
console::info("%s", PR_GlobalStringNoContents(s->b));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (s->a)
|
if (s->a)
|
||||||
Con_Printf("%s", PR_GlobalString(s->a));
|
console::info("%s", PR_GlobalString(s->a));
|
||||||
if (s->b)
|
if (s->b)
|
||||||
Con_Printf("%s", PR_GlobalString(s->b));
|
console::info("%s", PR_GlobalString(s->b));
|
||||||
if (s->c)
|
if (s->c)
|
||||||
Con_Printf("%s", PR_GlobalStringNoContents(s->c));
|
console::info("%s", PR_GlobalStringNoContents(s->c));
|
||||||
}
|
}
|
||||||
Con_Printf("\n");
|
console::info("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -187,7 +187,7 @@ static void PR_StackTrace (void)
|
|||||||
|
|
||||||
if (pr_depth == 0)
|
if (pr_depth == 0)
|
||||||
{
|
{
|
||||||
Con_Printf("<NO STACK>\n");
|
console::info("<NO STACK>\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,11 +197,11 @@ static void PR_StackTrace (void)
|
|||||||
f = pr_stack[i].f;
|
f = pr_stack[i].f;
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
Con_Printf("<NO FUNCTION>\n");
|
console::info("<NO FUNCTION>\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Con_Printf("%12s : %s\n", PR_GetString(f->s_file), PR_GetString(f->s_name));
|
console::info("%12s : %s\n", PR_GetString(f->s_file), PR_GetString(f->s_name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -239,7 +239,7 @@ void PR_Profile_f (void)
|
|||||||
if (best)
|
if (best)
|
||||||
{
|
{
|
||||||
if (num < 10)
|
if (num < 10)
|
||||||
Con_Printf("%7i %s\n", best->profile, PR_GetString(best->s_name));
|
console::info("%7i %s\n", best->profile, PR_GetString(best->s_name));
|
||||||
num++;
|
num++;
|
||||||
best->profile = 0;
|
best->profile = 0;
|
||||||
}
|
}
|
||||||
@@ -266,7 +266,7 @@ void PR_RunError (const char *error, ...)
|
|||||||
PR_PrintStatement(pr_statements + pr_xstatement);
|
PR_PrintStatement(pr_statements + pr_xstatement);
|
||||||
PR_StackTrace();
|
PR_StackTrace();
|
||||||
|
|
||||||
Con_Printf("%s\n", string);
|
console::info("%s\n", string);
|
||||||
|
|
||||||
pr_depth = 0; // dump the stack so host_error can shutdown functions
|
pr_depth = 0; // dump the stack so host_error can shutdown functions
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -412,7 +412,7 @@ void R_SetupAliasFrame (aliashdr_t *paliashdr, int frame, lerpdata_t *lerpdata)
|
|||||||
|
|
||||||
if ((frame >= paliashdr->numframes) || (frame < 0))
|
if ((frame >= paliashdr->numframes) || (frame < 0))
|
||||||
{
|
{
|
||||||
Con_DPrintf ("R_AliasSetupFrame: no such frame %d for '%s'\n", frame, e->model->name);
|
console::debug ("R_AliasSetupFrame: no such frame %d for '%s'\n", frame, e->model->name);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -705,7 +705,7 @@ void R_DrawAliasModel (entity_t *e)
|
|||||||
skinnum = e->skinnum;
|
skinnum = e->skinnum;
|
||||||
if ((skinnum >= paliashdr->numskins) || (skinnum < 0))
|
if ((skinnum >= paliashdr->numskins) || (skinnum < 0))
|
||||||
{
|
{
|
||||||
Con_DPrintf ("R_DrawAliasModel: no such skin # %d for '%s'\n", skinnum, e->model->name);
|
console::debug ("R_DrawAliasModel: no such skin # %d for '%s'\n", skinnum, e->model->name);
|
||||||
// ericw -- display skin 0 for winquake compatibility
|
// ericw -- display skin 0 for winquake compatibility
|
||||||
skinnum = 0;
|
skinnum = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -604,7 +604,7 @@ void GL_BuildLightmaps (void)
|
|||||||
//given that we are using lightmap_count of LMBLOCK_WIDTH x LMBLOCK_HEIGHT
|
//given that we are using lightmap_count of LMBLOCK_WIDTH x LMBLOCK_HEIGHT
|
||||||
i = lightmap_count * ((LMBLOCK_WIDTH / 128) * (LMBLOCK_HEIGHT / 128));
|
i = lightmap_count * ((LMBLOCK_WIDTH / 128) * (LMBLOCK_HEIGHT / 128));
|
||||||
if (i > 64)
|
if (i > 64)
|
||||||
Con_DWarning("%i lightmaps exceeds standard limit of 64.\n",i);
|
console::dev_warn("%i lightmaps exceeds standard limit of 64.\n",i);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -275,11 +275,11 @@ void R_ReadPointFile_f (void)
|
|||||||
COM_FOpenFile (name, &f, NULL);
|
COM_FOpenFile (name, &f, NULL);
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
Con_Printf ("couldn't open %s\n", name);
|
console::info ("couldn't open %s\n", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf ("Reading %s...\n", name);
|
console::info ("Reading %s...\n", name);
|
||||||
c = 0;
|
c = 0;
|
||||||
org[0] = org[1] = org[2] = 0; // silence pesky compiler warnings
|
org[0] = org[1] = org[2] = 0; // silence pesky compiler warnings
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
@@ -291,7 +291,7 @@ void R_ReadPointFile_f (void)
|
|||||||
|
|
||||||
if (!free_particles)
|
if (!free_particles)
|
||||||
{
|
{
|
||||||
Con_Printf ("Not enough free particles\n");
|
console::info ("Not enough free particles\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
p = free_particles;
|
p = free_particles;
|
||||||
@@ -307,7 +307,7 @@ void R_ReadPointFile_f (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fclose (f);
|
fclose (f);
|
||||||
Con_Printf ("%i points read\n", c);
|
console::info ("%i points read\n", c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ mspriteframe_t *R_GetSpriteFrame (entity_t *currentent)
|
|||||||
|
|
||||||
if ((frame >= psprite->numframes) || (frame < 0))
|
if ((frame >= psprite->numframes) || (frame < 0))
|
||||||
{
|
{
|
||||||
Con_DPrintf ("R_DrawSprite: no such frame %d for '%s'\n", frame, currentent->model->name);
|
console::debug ("R_DrawSprite: no such frame %d for '%s'\n", frame, currentent->model->name);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -388,7 +388,7 @@ static void R_BatchSurface (msurface_t *s)
|
|||||||
|
|
||||||
if (num_surf_indices <= 0)
|
if (num_surf_indices <= 0)
|
||||||
{
|
{
|
||||||
// Con_DWarning ("bad numedges for surface\n");
|
// console::dev_warn ("bad numedges for surface\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -128,7 +128,7 @@ snd_stream_t *S_CodecOpenStreamType (const char *filename, unsigned int type, bo
|
|||||||
|
|
||||||
if (type == CODECTYPE_NONE)
|
if (type == CODECTYPE_NONE)
|
||||||
{
|
{
|
||||||
Con_Printf("Bad type for %s\n", filename);
|
console::info("Bad type for %s\n", filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ snd_stream_t *S_CodecOpenStreamType (const char *filename, unsigned int type, bo
|
|||||||
}
|
}
|
||||||
if (!codec)
|
if (!codec)
|
||||||
{
|
{
|
||||||
Con_Printf("Unknown type for %s\n", filename);
|
console::info("Unknown type for %s\n", filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
stream = S_CodecUtilOpen(filename, codec, loop);
|
stream = S_CodecUtilOpen(filename, codec, loop);
|
||||||
@@ -162,7 +162,7 @@ snd_stream_t *S_CodecOpenStreamExt (const char *filename, bool loop)
|
|||||||
ext = COM_FileGetExtension(filename);
|
ext = COM_FileGetExtension(filename);
|
||||||
if (! *ext)
|
if (! *ext)
|
||||||
{
|
{
|
||||||
Con_Printf("No extension for %s\n", filename);
|
console::info("No extension for %s\n", filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ snd_stream_t *S_CodecOpenStreamExt (const char *filename, bool loop)
|
|||||||
}
|
}
|
||||||
if (!codec)
|
if (!codec)
|
||||||
{
|
{
|
||||||
Con_Printf("Unknown extension for %s\n", filename);
|
console::info("Unknown extension for %s\n", filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
stream = S_CodecUtilOpen(filename, codec, loop);
|
stream = S_CodecUtilOpen(filename, codec, loop);
|
||||||
@@ -226,7 +226,7 @@ snd_stream_t *S_CodecOpenStreamAny (const char *filename, bool loop)
|
|||||||
}
|
}
|
||||||
if (!codec)
|
if (!codec)
|
||||||
{
|
{
|
||||||
Con_Printf("Unknown extension for %s\n", filename);
|
console::info("Unknown extension for %s\n", filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
stream = S_CodecUtilOpen(filename, codec, loop);
|
stream = S_CodecUtilOpen(filename, codec, loop);
|
||||||
@@ -292,7 +292,7 @@ snd_stream_t *S_CodecUtilOpen(const char *filename, snd_codec_t *codec, bool loo
|
|||||||
pak = file_from_pak;
|
pak = file_from_pak;
|
||||||
if (length == -1)
|
if (length == -1)
|
||||||
{
|
{
|
||||||
Con_DPrintf("Couldn't open %s\n", filename);
|
console::debug("Couldn't open %s\n", filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-23
@@ -102,17 +102,17 @@ static convar _snd_mixahead = {"_snd_mixahead", "0.1", {.archive = true}};
|
|||||||
|
|
||||||
static void S_SoundInfo_f(void) {
|
static void S_SoundInfo_f(void) {
|
||||||
if (!sound_started || !shm) {
|
if (!sound_started || !shm) {
|
||||||
Con_Printf("sound system not started\n");
|
console::info("sound system not started\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("%d bit, %s, %d Hz\n", shm->samplebits,
|
console::info("%d bit, %s, %d Hz\n", shm->samplebits,
|
||||||
(shm->channels == 2) ? "stereo" : "mono", shm->speed);
|
(shm->channels == 2) ? "stereo" : "mono", shm->speed);
|
||||||
Con_Printf("%5d samples\n", shm->samples);
|
console::info("%5d samples\n", shm->samples);
|
||||||
Con_Printf("%5d samplepos\n", shm->samplepos);
|
console::info("%5d samplepos\n", shm->samplepos);
|
||||||
Con_Printf("%5d submission_chunk\n", shm->submission_chunk);
|
console::info("%5d submission_chunk\n", shm->submission_chunk);
|
||||||
Con_Printf("%5d total_channels\n", total_channels);
|
console::info("%5d total_channels\n", total_channels);
|
||||||
Con_Printf("%p dma buffer\n", shm->buffer);
|
console::info("%p dma buffer\n", shm->buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ static void SND_Callback_sfxvolume(convar *var) {
|
|||||||
|
|
||||||
static void SND_Callback_snd_filterquality(convar *var) {
|
static void SND_Callback_snd_filterquality(convar *var) {
|
||||||
if (snd_filterquality.value < 1 || snd_filterquality.value > 5) {
|
if (snd_filterquality.value < 1 || snd_filterquality.value > 5) {
|
||||||
Con_Printf("snd_filterquality must be between 1 and 5\n");
|
console::info("snd_filterquality must be between 1 and 5\n");
|
||||||
snd_filterquality.set(SND_FILTERQUALITY_DEFAULT);
|
snd_filterquality.set(SND_FILTERQUALITY_DEFAULT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,9 +139,9 @@ void S_Startup(void) {
|
|||||||
sound_started = SNDDMA_Init(&sn);
|
sound_started = SNDDMA_Init(&sn);
|
||||||
|
|
||||||
if (!sound_started) {
|
if (!sound_started) {
|
||||||
Con_Printf("Failed initializing sound\n");
|
console::info("Failed initializing sound\n");
|
||||||
} else {
|
} else {
|
||||||
Con_Printf("Audio: %d bit, %s, %d Hz\n", shm->samplebits,
|
console::info("Audio: %d bit, %s, %d Hz\n", shm->samplebits,
|
||||||
(shm->channels == 2) ? "stereo" : "mono", shm->speed);
|
(shm->channels == 2) ? "stereo" : "mono", shm->speed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,7 @@ S_Init
|
|||||||
*/
|
*/
|
||||||
void S_Init(void) {
|
void S_Init(void) {
|
||||||
if (snd_initialized) {
|
if (snd_initialized) {
|
||||||
Con_Printf("Sound is already initialized\n");
|
console::info("Sound is already initialized\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ void S_Init(void) {
|
|||||||
if (safemode || common::check_param("-nosound").has_value())
|
if (safemode || common::check_param("-nosound").has_value())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Con_Printf("\nSound Initialization\n");
|
console::info("\nSound Initialization\n");
|
||||||
|
|
||||||
command::add("play", S_Play);
|
command::add("play", S_Play);
|
||||||
command::add("playvol", S_PlayVol);
|
command::add("playvol", S_PlayVol);
|
||||||
@@ -195,7 +195,7 @@ void S_Init(void) {
|
|||||||
|
|
||||||
if (host_parms->memsize < 0x800000) {
|
if (host_parms->memsize < 0x800000) {
|
||||||
loadas8bit.set("1");
|
loadas8bit.set("1");
|
||||||
Con_Printf("loading all sounds as 8bit\n");
|
console::info("loading all sounds as 8bit\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
sfxvolume.set_callback(SND_Callback_sfxvolume);
|
sfxvolume.set_callback(SND_Callback_sfxvolume);
|
||||||
@@ -554,7 +554,7 @@ void S_StaticSound(sfx_t *sfx, vec3_t origin, float vol, float attenuation) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (total_channels == MAX_CHANNELS) {
|
if (total_channels == MAX_CHANNELS) {
|
||||||
Con_Printf("total_channels == MAX_CHANNELS\n");
|
console::info("total_channels == MAX_CHANNELS\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,7 +566,7 @@ void S_StaticSound(sfx_t *sfx, vec3_t origin, float vol, float attenuation) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (sc->loopstart == -1) {
|
if (sc->loopstart == -1) {
|
||||||
Con_Printf("Sound %s not looped\n", sfx->name);
|
console::info("Sound %s not looped\n", sfx->name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -777,12 +777,12 @@ void S_Update(vec3_t origin, vec3_t forward, vec3_t right, vec3_t up) {
|
|||||||
ch = snd_channels;
|
ch = snd_channels;
|
||||||
for (i = 0; i < total_channels; i++, ch++) {
|
for (i = 0; i < total_channels; i++, ch++) {
|
||||||
if (ch->sfx && (ch->leftvol || ch->rightvol)) {
|
if (ch->sfx && (ch->leftvol || ch->rightvol)) {
|
||||||
// Con_Printf ("%3i %3i %s\n", ch->leftvol, ch->rightvol, ch->sfx->name);
|
// console::info ("%3i %3i %s\n", ch->leftvol, ch->rightvol, ch->sfx->name);
|
||||||
total++;
|
total++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("----(%i)----\n", total);
|
console::info("----(%i)----\n", total);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add raw data from streamed samples
|
// add raw data from streamed samples
|
||||||
@@ -841,7 +841,7 @@ static void S_Update_(void) {
|
|||||||
|
|
||||||
// check to make sure that we haven't overshot
|
// check to make sure that we haven't overshot
|
||||||
if (paintedtime < soundtime) {
|
if (paintedtime < soundtime) {
|
||||||
// Con_Printf ("S_Update_ : overflow\n");
|
// console::info ("S_Update_ : overflow\n");
|
||||||
paintedtime = soundtime;
|
paintedtime = soundtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -939,12 +939,12 @@ static void S_SoundList(void) {
|
|||||||
size = sc->length * sc->width * (sc->stereo + 1);
|
size = sc->length * sc->width * (sc->stereo + 1);
|
||||||
total += size;
|
total += size;
|
||||||
if (sc->loopstart >= 0)
|
if (sc->loopstart >= 0)
|
||||||
Con_SafePrintf("L"); //johnfitz -- was Con_Printf
|
console::safe_print("L"); //johnfitz -- was console::info
|
||||||
else
|
else
|
||||||
Con_SafePrintf(" "); //johnfitz -- was Con_Printf
|
console::safe_print(" "); //johnfitz -- was console::info
|
||||||
Con_SafePrintf("(%2db) %6i : %s\n", sc->width * 8, size, sfx->name); //johnfitz -- was Con_Printf
|
console::safe_print("(%2db) %6i : %s\n", sc->width * 8, size, sfx->name); //johnfitz -- was console::info
|
||||||
}
|
}
|
||||||
Con_Printf("%i sounds, %i bytes\n", num_sfx, total); //johnfitz -- added count
|
console::info("%i sounds, %i bytes\n", num_sfx, total); //johnfitz -- added count
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -958,7 +958,7 @@ void S_LocalSound(const char *name) {
|
|||||||
|
|
||||||
sfx = S_PrecacheSound(name);
|
sfx = S_PrecacheSound(name);
|
||||||
if (!sfx) {
|
if (!sfx) {
|
||||||
Con_Printf("S_LocalSound: can't cache %s\n", name);
|
console::info("S_LocalSound: can't cache %s\n", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
S_StartSound(cl.viewentity, -1, sfx, vec3_origin, 1, 1);
|
S_StartSound(cl.viewentity, -1, sfx, vec3_origin, 1, 1);
|
||||||
|
|||||||
+9
-9
@@ -82,7 +82,7 @@ flac_error_func (const FLAC__StreamDecoder *decoder,
|
|||||||
{
|
{
|
||||||
flacfile_t *ff = (flacfile_t *) client_data;
|
flacfile_t *ff = (flacfile_t *) client_data;
|
||||||
ff->error = -1;
|
ff->error = -1;
|
||||||
Con_Printf ("FLAC: decoder error %i\n", status);
|
console::info ("FLAC: decoder error %i\n", status);
|
||||||
}
|
}
|
||||||
|
|
||||||
static FLAC__StreamDecoderReadStatus
|
static FLAC__StreamDecoderReadStatus
|
||||||
@@ -151,7 +151,7 @@ flac_write_func (const FLAC__StreamDecoder *decoder,
|
|||||||
ff->buffer = (byte *) malloc (ff->info->blocksize * ff->info->channels * ff->info->width);
|
ff->buffer = (byte *) malloc (ff->info->blocksize * ff->info->channels * ff->info->width);
|
||||||
if (!ff->buffer) {
|
if (!ff->buffer) {
|
||||||
ff->error = -1; /* needn't set this here, but... */
|
ff->error = -1; /* needn't set this here, but... */
|
||||||
Con_Printf("Insufficient memory for fLaC audio\n");
|
console::info("Insufficient memory for fLaC audio\n");
|
||||||
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
|
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -243,7 +243,7 @@ static bool S_FLAC_CodecOpenStream (snd_stream_t *stream)
|
|||||||
ff->decoder = FLAC__stream_decoder_new ();
|
ff->decoder = FLAC__stream_decoder_new ();
|
||||||
if (ff->decoder == NULL)
|
if (ff->decoder == NULL)
|
||||||
{
|
{
|
||||||
Con_Printf("Unable to create fLaC decoder\n");
|
console::info("Unable to create fLaC decoder\n");
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,7 +277,7 @@ static bool S_FLAC_CodecOpenStream (snd_stream_t *stream)
|
|||||||
#endif
|
#endif
|
||||||
if (rc != FLAC__STREAM_DECODER_INIT_STATUS_OK) /* unlikely */
|
if (rc != FLAC__STREAM_DECODER_INIT_STATUS_OK) /* unlikely */
|
||||||
{
|
{
|
||||||
Con_Printf ("FLAC: decoder init error %i\n", rc);
|
console::info ("FLAC: decoder init error %i\n", rc);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,24 +285,24 @@ static bool S_FLAC_CodecOpenStream (snd_stream_t *stream)
|
|||||||
if (rc == false || ff->error)
|
if (rc == false || ff->error)
|
||||||
{
|
{
|
||||||
rc = FLAC__stream_decoder_get_state(ff->decoder);
|
rc = FLAC__stream_decoder_get_state(ff->decoder);
|
||||||
Con_Printf("%s not a valid flac file? (decoder state %i)\n",
|
console::info("%s not a valid flac file? (decoder state %i)\n",
|
||||||
stream->name, rc);
|
stream->name, rc);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ff->info->dataofs < 0)
|
if (ff->info->dataofs < 0)
|
||||||
{
|
{
|
||||||
Con_Printf("%s has no STREAMINFO\n", stream->name);
|
console::info("%s has no STREAMINFO\n", stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
if (ff->info->bits != 8 && ff->info->bits != 16)
|
if (ff->info->bits != 8 && ff->info->bits != 16)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is not 8 or 16 bit\n", stream->name);
|
console::info("%s is not 8 or 16 bit\n", stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
if (ff->info->channels != 1 && ff->info->channels != 2)
|
if (ff->info->channels != 1 && ff->info->channels != 2)
|
||||||
{
|
{
|
||||||
Con_Printf("Unsupported number of channels %d in %s\n",
|
console::info("Unsupported number of channels %d in %s\n",
|
||||||
ff->info->channels, stream->name);
|
ff->info->channels, stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
@@ -342,7 +342,7 @@ static int S_FLAC_CodecReadStream (snd_stream_t *stream, int len, void *buffer)
|
|||||||
} else if (res < 0) { /* error */
|
} else if (res < 0) { /* error */
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
Con_DPrintf ("FLAC: EOF\n");
|
console::debug ("FLAC: EOF\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-15
@@ -107,32 +107,32 @@ sfxcache_t *S_LoadSound (sfx_t *s)
|
|||||||
if (sc)
|
if (sc)
|
||||||
return sc;
|
return sc;
|
||||||
|
|
||||||
// Con_Printf ("S_LoadSound: %x\n", (int)stackbuf);
|
// console::info ("S_LoadSound: %x\n", (int)stackbuf);
|
||||||
|
|
||||||
// load it in
|
// load it in
|
||||||
q_strlcpy(namebuffer, "sound/", sizeof(namebuffer));
|
q_strlcpy(namebuffer, "sound/", sizeof(namebuffer));
|
||||||
q_strlcat(namebuffer, s->name, sizeof(namebuffer));
|
q_strlcat(namebuffer, s->name, sizeof(namebuffer));
|
||||||
|
|
||||||
// Con_Printf ("loading %s\n",namebuffer);
|
// console::info ("loading %s\n",namebuffer);
|
||||||
|
|
||||||
data = COM_LoadStackFile(namebuffer, stackbuf, sizeof(stackbuf), NULL);
|
data = COM_LoadStackFile(namebuffer, stackbuf, sizeof(stackbuf), NULL);
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
Con_Printf ("Couldn't load %s\n", namebuffer);
|
console::info ("Couldn't load %s\n", namebuffer);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
info = GetWavinfo (s->name, data, com_filesize);
|
info = GetWavinfo (s->name, data, com_filesize);
|
||||||
if (info.channels != 1)
|
if (info.channels != 1)
|
||||||
{
|
{
|
||||||
Con_Printf ("%s is a stereo sample\n",s->name);
|
console::info ("%s is a stereo sample\n",s->name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.width != 1 && info.width != 2)
|
if (info.width != 1 && info.width != 2)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is not 8 or 16 bit\n", s->name);
|
console::info("%s is not 8 or 16 bit\n", s->name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ sfxcache_t *S_LoadSound (sfx_t *s)
|
|||||||
|
|
||||||
if (info.samples == 0 || len == 0)
|
if (info.samples == 0 || len == 0)
|
||||||
{
|
{
|
||||||
Con_Printf("%s has zero samples\n", s->name);
|
console::info("%s has zero samples\n", s->name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ static void FindNextChunk (const char *name)
|
|||||||
if (iff_chunk_len < 0 || iff_chunk_len > iff_end - data_p)
|
if (iff_chunk_len < 0 || iff_chunk_len > iff_end - data_p)
|
||||||
{
|
{
|
||||||
data_p = NULL;
|
data_p = NULL;
|
||||||
Con_DPrintf2("bad \"%s\" chunk length (%d)\n", name, iff_chunk_len);
|
console::trace("bad \"%s\" chunk length (%d)\n", name, iff_chunk_len);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
last_chunk = data_p + ((iff_chunk_len + 1) & ~1);
|
last_chunk = data_p + ((iff_chunk_len + 1) & ~1);
|
||||||
@@ -242,7 +242,7 @@ static void DumpChunks (void)
|
|||||||
memcpy (str, data_p, 4);
|
memcpy (str, data_p, 4);
|
||||||
data_p += 4;
|
data_p += 4;
|
||||||
iff_chunk_len = GetLittleLong();
|
iff_chunk_len = GetLittleLong();
|
||||||
Con_Printf ("0x%x : %s (%d)\n", (int)(data_p - 4), str, iff_chunk_len);
|
console::info ("0x%x : %s (%d)\n", (int)(data_p - 4), str, iff_chunk_len);
|
||||||
data_p += (iff_chunk_len + 1) & ~1;
|
data_p += (iff_chunk_len + 1) & ~1;
|
||||||
} while (data_p < iff_end);
|
} while (data_p < iff_end);
|
||||||
}
|
}
|
||||||
@@ -272,7 +272,7 @@ wavinfo_t GetWavinfo (const char *name, byte *wav, int wavlength)
|
|||||||
FindChunk("RIFF");
|
FindChunk("RIFF");
|
||||||
if (!(data_p && !strncmp((char *)data_p + 8, "WAVE", 4)))
|
if (!(data_p && !strncmp((char *)data_p + 8, "WAVE", 4)))
|
||||||
{
|
{
|
||||||
Con_Printf("%s missing RIFF/WAVE chunks\n", name);
|
console::info("%s missing RIFF/WAVE chunks\n", name);
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,14 +285,14 @@ wavinfo_t GetWavinfo (const char *name, byte *wav, int wavlength)
|
|||||||
FindChunk("fmt ");
|
FindChunk("fmt ");
|
||||||
if (!data_p)
|
if (!data_p)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is missing fmt chunk\n", name);
|
console::info("%s is missing fmt chunk\n", name);
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
data_p += 8;
|
data_p += 8;
|
||||||
format = GetLittleShort();
|
format = GetLittleShort();
|
||||||
if (format != WAV_FORMAT_PCM)
|
if (format != WAV_FORMAT_PCM)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is not Microsoft PCM format\n", name);
|
console::info("%s is not Microsoft PCM format\n", name);
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -310,7 +310,7 @@ wavinfo_t GetWavinfo (const char *name, byte *wav, int wavlength)
|
|||||||
{
|
{
|
||||||
data_p += 32;
|
data_p += 32;
|
||||||
info.loopstart = GetLittleLong();
|
info.loopstart = GetLittleLong();
|
||||||
// Con_Printf("loopstart=%d\n", sfx->loopstart);
|
// console::info("loopstart=%d\n", sfx->loopstart);
|
||||||
|
|
||||||
// if the next chunk is a LIST chunk, look for a cue length marker
|
// if the next chunk is a LIST chunk, look for a cue length marker
|
||||||
FindNextChunk ("LIST");
|
FindNextChunk ("LIST");
|
||||||
@@ -321,7 +321,7 @@ wavinfo_t GetWavinfo (const char *name, byte *wav, int wavlength)
|
|||||||
data_p += 24;
|
data_p += 24;
|
||||||
i = GetLittleLong(); // samples in loop
|
i = GetLittleLong(); // samples in loop
|
||||||
info.samples = info.loopstart + i;
|
info.samples = info.loopstart + i;
|
||||||
// Con_Printf("looped length: %i\n", i);
|
// console::info("looped length: %i\n", i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -332,7 +332,7 @@ wavinfo_t GetWavinfo (const char *name, byte *wav, int wavlength)
|
|||||||
FindChunk("data");
|
FindChunk("data");
|
||||||
if (!data_p)
|
if (!data_p)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is missing data chunk\n", name);
|
console::info("%s is missing data chunk\n", name);
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ wavinfo_t GetWavinfo (const char *name, byte *wav, int wavlength)
|
|||||||
|
|
||||||
if (info.loopstart >= info.samples)
|
if (info.loopstart >= info.samples)
|
||||||
{
|
{
|
||||||
Con_Warning ("%s has loop start >= end\n", name);
|
console::warn ("%s has loop start >= end\n", name);
|
||||||
info.loopstart = -1;
|
info.loopstart = -1;
|
||||||
info.samples = samples;
|
info.samples = samples;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ static bool S_MIKMOD_CodecInitialize (void)
|
|||||||
MikMod_RegisterAllLoaders();
|
MikMod_RegisterAllLoaders();
|
||||||
if (S_MIKMOD_initlib(NULL))
|
if (S_MIKMOD_initlib(NULL))
|
||||||
{
|
{
|
||||||
Con_DPrintf("Could not initialize MikMod: %s\n", MikMod_strerror(MikMod_errno));
|
console::debug("Could not initialize MikMod: %s\n", MikMod_strerror(MikMod_errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ static bool S_MIKMOD_CodecOpenStream (snd_stream_t *stream)
|
|||||||
priv->module = Player_LoadGeneric((MREADER *)stream->priv, 64, 0);
|
priv->module = Player_LoadGeneric((MREADER *)stream->priv, 64, 0);
|
||||||
if (!priv->module)
|
if (!priv->module)
|
||||||
{
|
{
|
||||||
Con_DPrintf("Could not load module: %s\n", MikMod_strerror(MikMod_errno));
|
console::debug("Could not load module: %s\n", MikMod_strerror(MikMod_errno));
|
||||||
Z_Free(stream->priv);
|
Z_Free(stream->priv);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ static bool S_MIKMOD_CodecOpenStream (snd_stream_t *stream)
|
|||||||
stream->info.bits = (md_mode & DMODE_16BITS)? 16: 8;
|
stream->info.bits = (md_mode & DMODE_16BITS)? 16: 8;
|
||||||
stream->info.width = stream->info.bits / 8;
|
stream->info.width = stream->info.bits / 8;
|
||||||
stream->info.channels = (md_mode & DMODE_STEREO)? 2 : 1;
|
stream->info.channels = (md_mode & DMODE_STEREO)? 2 : 1;
|
||||||
/* Con_DPrintf("Playing %s (%d chn)\n", priv->module->songname, priv->module->numchn);*/
|
/* console::debug("Playing %s (%d chn)\n", priv->module->songname, priv->module->numchn);*/
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -435,9 +435,9 @@ void S_PaintChannels (int endtime)
|
|||||||
paintbuffer[i - paintedtime].right += s_rawsamples[s].right / 2;
|
paintbuffer[i - paintedtime].right += s_rawsamples[s].right / 2;
|
||||||
}
|
}
|
||||||
// if (i != end)
|
// if (i != end)
|
||||||
// Con_Printf ("partial stream\n");
|
// console::info ("partial stream\n");
|
||||||
// else
|
// else
|
||||||
// Con_Printf ("full stream\n");
|
// console::info ("full stream\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// transfer out according to DMA format
|
// transfer out according to DMA format
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ static bool S_MODPLUG_CodecOpenStream (snd_stream_t *stream)
|
|||||||
Hunk_FreeToLowMark(mark); /* free original file data */
|
Hunk_FreeToLowMark(mark); /* free original file data */
|
||||||
if (!stream->priv)
|
if (!stream->priv)
|
||||||
{
|
{
|
||||||
Con_DPrintf("Could not load module %s\n", stream->name);
|
console::debug("Could not load module %s\n", stream->name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+12
-12
@@ -139,7 +139,7 @@ static int mp3_startread(snd_stream_t *stream)
|
|||||||
|
|
||||||
if (p->Stream.error)
|
if (p->Stream.error)
|
||||||
{
|
{
|
||||||
Con_Printf("MP3: No valid MP3 frame found\n");
|
console::info("MP3: No valid MP3 frame found\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ static int mp3_startread(snd_stream_t *stream)
|
|||||||
stream->info.channels = MAD_NCHANNELS(&p->Frame.header);
|
stream->info.channels = MAD_NCHANNELS(&p->Frame.header);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("MP3: Cannot determine number of channels\n");
|
console::info("MP3: Cannot determine number of channels\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ static int mp3_decode(snd_stream_t *stream, byte *buf, int len)
|
|||||||
if (mp3_inputdata(stream) == -1)
|
if (mp3_inputdata(stream) == -1)
|
||||||
{
|
{
|
||||||
/* check feof() ?? */
|
/* check feof() ?? */
|
||||||
Con_DPrintf("mp3 EOF\n");
|
console::debug("mp3 EOF\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -243,7 +243,7 @@ static int mp3_decode(snd_stream_t *stream, byte *buf, int len)
|
|||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Con_Printf("MP3: unrecoverable frame level error (%s)\n",
|
console::info("MP3: unrecoverable frame level error (%s)\n",
|
||||||
mad_stream_errorstr(&p->Stream));
|
mad_stream_errorstr(&p->Stream));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -305,7 +305,7 @@ static int mp3_madseek(snd_stream_t *stream, unsigned long offset)
|
|||||||
MP3_BUFFER_SIZE - leftover, &stream->fh);
|
MP3_BUFFER_SIZE - leftover, &stream->fh);
|
||||||
if (bytes_read <= 0)
|
if (bytes_read <= 0)
|
||||||
{
|
{
|
||||||
Con_DPrintf("seek failure. unexpected EOF (frames=%lu leftover=%lu)\n",
|
console::debug("seek failure. unexpected EOF (frames=%lu leftover=%lu)\n",
|
||||||
(unsigned long)p->FrameCount, (unsigned long)leftover);
|
(unsigned long)p->FrameCount, (unsigned long)leftover);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -326,16 +326,16 @@ static int mp3_madseek(snd_stream_t *stream, unsigned long offset)
|
|||||||
break; /* Normal behaviour; get some more data from the file */
|
break; /* Normal behaviour; get some more data from the file */
|
||||||
if (!MAD_RECOVERABLE(p->Stream.error))
|
if (!MAD_RECOVERABLE(p->Stream.error))
|
||||||
{
|
{
|
||||||
Con_DPrintf("unrecoverable MAD error\n");
|
console::debug("unrecoverable MAD error\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (p->Stream.error == MAD_ERROR_LOSTSYNC)
|
if (p->Stream.error == MAD_ERROR_LOSTSYNC)
|
||||||
{
|
{
|
||||||
Con_DPrintf("MAD lost sync\n");
|
console::debug("MAD lost sync\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Con_DPrintf("recoverable MAD error\n");
|
console::debug("recoverable MAD error\n");
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -391,24 +391,24 @@ static bool S_MP3_CodecOpenStream (snd_stream_t *stream)
|
|||||||
|
|
||||||
if (mp3_skiptags(stream) < 0)
|
if (mp3_skiptags(stream) < 0)
|
||||||
{
|
{
|
||||||
Con_Printf("Corrupt mp3 file (bad tags.)\n");
|
console::info("Corrupt mp3 file (bad tags.)\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
stream->priv = calloc(1, sizeof(mp3_priv_t));
|
stream->priv = calloc(1, sizeof(mp3_priv_t));
|
||||||
if (!stream->priv)
|
if (!stream->priv)
|
||||||
{
|
{
|
||||||
Con_Printf("Insufficient memory for MP3 audio\n");
|
console::info("Insufficient memory for MP3 audio\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
err = mp3_startread(stream);
|
err = mp3_startread(stream);
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is not a valid mp3 file\n", stream->name);
|
console::info("%s is not a valid mp3 file\n", stream->name);
|
||||||
}
|
}
|
||||||
else if (stream->info.channels != 1 && stream->info.channels != 2)
|
else if (stream->info.channels != 1 && stream->info.channels != 2)
|
||||||
{
|
{
|
||||||
Con_Printf("Unsupported number of channels %d in %s\n",
|
console::info("Unsupported number of channels %d in %s\n",
|
||||||
stream->info.channels, stream->name);
|
stream->info.channels, stream->name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ static int probe_id3v1(snd_stream_t *stream, unsigned char *buf, int atend) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stream->fh.length -= 128;
|
stream->fh.length -= 128;
|
||||||
Con_DPrintf("MP3: skipped %ld bytes ID3v1 tag\n", 128L);
|
console::debug("MP3: skipped %ld bytes ID3v1 tag\n", 128L);
|
||||||
return 1;
|
return 1;
|
||||||
/* FIXME: handle possible double-ID3v1 tags? */
|
/* FIXME: handle possible double-ID3v1 tags? */
|
||||||
}
|
}
|
||||||
@@ -269,7 +269,7 @@ static int probe_mmtag(snd_stream_t *stream, unsigned char *buf) {
|
|||||||
if (len < 0) return -1;
|
if (len < 0) return -1;
|
||||||
if (len >= stream->fh.length) return -1;
|
if (len >= stream->fh.length) return -1;
|
||||||
stream->fh.length -= len;
|
stream->fh.length -= len;
|
||||||
Con_DPrintf("MP3: skipped %ld bytes MusicMatch tag\n", len);
|
console::debug("MP3: skipped %ld bytes MusicMatch tag\n", len);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -285,7 +285,7 @@ static int probe_apetag(snd_stream_t *stream, unsigned char *buf) {
|
|||||||
len = get_ape_len(buf);
|
len = get_ape_len(buf);
|
||||||
if (len >= stream->fh.length) return -1;
|
if (len >= stream->fh.length) return -1;
|
||||||
stream->fh.length -= len;
|
stream->fh.length -= len;
|
||||||
Con_DPrintf("MP3: skipped %ld bytes APE tag\n", len);
|
console::debug("MP3: skipped %ld bytes APE tag\n", len);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -307,14 +307,14 @@ static int probe_lyrics3(snd_stream_t *stream, unsigned char *buf) {
|
|||||||
return -1;
|
return -1;
|
||||||
if (!verify_lyrics3v2(buf, 11)) return -1;
|
if (!verify_lyrics3v2(buf, 11)) return -1;
|
||||||
stream->fh.length -= len;
|
stream->fh.length -= len;
|
||||||
Con_DPrintf("MP3: skipped %ld bytes Lyrics3 tag\n", len);
|
console::debug("MP3: skipped %ld bytes Lyrics3 tag\n", len);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if (len == 1) {
|
else if (len == 1) {
|
||||||
len = get_lyrics3v1_len(stream);
|
len = get_lyrics3v1_len(stream);
|
||||||
if (len < 0) return -1;
|
if (len < 0) return -1;
|
||||||
stream->fh.length -= len;
|
stream->fh.length -= len;
|
||||||
Con_DPrintf("MP3: skipped %ld bytes Lyrics3 tag\n", len);
|
console::debug("MP3: skipped %ld bytes Lyrics3 tag\n", len);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -348,7 +348,7 @@ int mp3_skiptags(snd_stream_t *stream)
|
|||||||
if (len >= stream->fh.length) goto fail;
|
if (len >= stream->fh.length) goto fail;
|
||||||
stream->fh.start += len;
|
stream->fh.start += len;
|
||||||
stream->fh.length -= len;
|
stream->fh.length -= len;
|
||||||
Con_DPrintf("MP3: skipped %ld bytes ID3v2 tag\n", len);
|
console::debug("MP3: skipped %ld bytes ID3v2 tag\n", len);
|
||||||
}
|
}
|
||||||
/* APE tag _might_ be at the start (discouraged
|
/* APE tag _might_ be at the start (discouraged
|
||||||
* but not forbidden, either.) read the header. */
|
* but not forbidden, either.) read the header. */
|
||||||
@@ -357,7 +357,7 @@ int mp3_skiptags(snd_stream_t *stream)
|
|||||||
if (len >= stream->fh.length) goto fail;
|
if (len >= stream->fh.length) goto fail;
|
||||||
stream->fh.start += len;
|
stream->fh.start += len;
|
||||||
stream->fh.length -= len;
|
stream->fh.length -= len;
|
||||||
Con_DPrintf("MP3: skipped %ld bytes APE tag\n", len);
|
console::debug("MP3: skipped %ld bytes APE tag\n", len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* it's not impossible that _old_ MusicMatch tag
|
/* it's not impossible that _old_ MusicMatch tag
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ static bool S_MP3_CodecInitialize (void)
|
|||||||
{
|
{
|
||||||
if (mpg123_init() != MPG123_OK)
|
if (mpg123_init() != MPG123_OK)
|
||||||
{
|
{
|
||||||
Con_Printf ("Could not initialize mpg123\n");
|
console::info ("Could not initialize mpg123\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
mp3_codec.initialized = true;
|
mp3_codec.initialized = true;
|
||||||
@@ -86,7 +86,7 @@ static bool S_MP3_CodecOpenStream (snd_stream_t *stream)
|
|||||||
|
|
||||||
if (mp3_skiptags(stream) < 0)
|
if (mp3_skiptags(stream) < 0)
|
||||||
{
|
{
|
||||||
Con_Printf("Corrupt mp3 file (bad tags.)\n");
|
console::info("Corrupt mp3 file (bad tags.)\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,21 +95,21 @@ static bool S_MP3_CodecOpenStream (snd_stream_t *stream)
|
|||||||
priv->handle = mpg123_new(NULL, NULL);
|
priv->handle = mpg123_new(NULL, NULL);
|
||||||
if (priv->handle == NULL)
|
if (priv->handle == NULL)
|
||||||
{
|
{
|
||||||
Con_Printf("Unable to allocate mpg123 handle\n");
|
console::info("Unable to allocate mpg123 handle\n");
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mpg123_replace_reader_handle(priv->handle, mp3_read, mp3_seek, NULL) != MPG123_OK ||
|
if (mpg123_replace_reader_handle(priv->handle, mp3_read, mp3_seek, NULL) != MPG123_OK ||
|
||||||
mpg123_open_handle(priv->handle, &stream->fh) != MPG123_OK)
|
mpg123_open_handle(priv->handle, &stream->fh) != MPG123_OK)
|
||||||
{
|
{
|
||||||
Con_Printf("Unable to open mpg123 handle\n");
|
console::info("Unable to open mpg123 handle\n");
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
priv->handle_open = 1;
|
priv->handle_open = 1;
|
||||||
|
|
||||||
if (mpg123_getformat(priv->handle, &rate, &channels, &encoding) != MPG123_OK)
|
if (mpg123_getformat(priv->handle, &rate, &channels, &encoding) != MPG123_OK)
|
||||||
{
|
{
|
||||||
Con_Printf("Unable to retrieve mpg123 format for %s\n", stream->name);
|
console::info("Unable to retrieve mpg123 format for %s\n", stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ static bool S_MP3_CodecOpenStream (snd_stream_t *stream)
|
|||||||
stream->info.channels = 2;
|
stream->info.channels = 2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("Unsupported number of channels %d in %s\n", channels, stream->name);
|
console::info("Unsupported number of channels %d in %s\n", channels, stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ static bool S_MP3_CodecOpenStream (snd_stream_t *stream)
|
|||||||
}
|
}
|
||||||
if (mpg123_format_support(priv->handle, rate, encoding) == 0)
|
if (mpg123_format_support(priv->handle, rate, encoding) == 0)
|
||||||
{
|
{
|
||||||
Con_Printf("Unsupported format for %s\n", stream->name);
|
console::info("Unsupported format for %s\n", stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
mpg123_format_none(priv->handle);
|
mpg123_format_none(priv->handle);
|
||||||
@@ -180,7 +180,7 @@ static int S_MP3_CodecReadStream (snd_stream_t *stream, int bytes, void *buffer)
|
|||||||
int res = mpg123_read (priv->handle, (unsigned char *)buffer, (size_t)bytes, &bytes_read);
|
int res = mpg123_read (priv->handle, (unsigned char *)buffer, (size_t)bytes, &bytes_read);
|
||||||
switch (res) {
|
switch (res) {
|
||||||
case MPG123_DONE:
|
case MPG123_DONE:
|
||||||
Con_DPrintf("mp3 EOF\n");
|
console::debug("mp3 EOF\n");
|
||||||
case MPG123_OK:
|
case MPG123_OK:
|
||||||
return (int)bytes_read;
|
return (int)bytes_read;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -93,7 +93,7 @@ static bool S_OPUS_CodecOpenStream (snd_stream_t *stream)
|
|||||||
opFile = op_open_callbacks(&stream->fh, &opc_qfs, NULL, 0, &res);
|
opFile = op_open_callbacks(&stream->fh, &opc_qfs, NULL, 0, &res);
|
||||||
if (!opFile)
|
if (!opFile)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is not a valid Opus file (error %i).\n",
|
console::info("%s is not a valid Opus file (error %i).\n",
|
||||||
stream->name, res);
|
stream->name, res);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
@@ -102,14 +102,14 @@ static bool S_OPUS_CodecOpenStream (snd_stream_t *stream)
|
|||||||
|
|
||||||
if (!op_seekable(opFile))
|
if (!op_seekable(opFile))
|
||||||
{
|
{
|
||||||
Con_Printf("Opus stream %s not seekable.\n", stream->name);
|
console::info("Opus stream %s not seekable.\n", stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
op_info = op_head(opFile, -1);
|
op_info = op_head(opFile, -1);
|
||||||
if (!op_info)
|
if (!op_info)
|
||||||
{
|
{
|
||||||
Con_Printf("Unable to get stream information for %s.\n", stream->name);
|
console::info("Unable to get stream information for %s.\n", stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,14 +117,14 @@ static bool S_OPUS_CodecOpenStream (snd_stream_t *stream)
|
|||||||
numstreams = op_info->stream_count;
|
numstreams = op_info->stream_count;
|
||||||
if (numstreams != 1)
|
if (numstreams != 1)
|
||||||
{
|
{
|
||||||
Con_Printf("More than one (%ld) stream in %s\n",
|
console::info("More than one (%ld) stream in %s\n",
|
||||||
(long)op_info->stream_count, stream->name);
|
(long)op_info->stream_count, stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (op_info->channel_count != 1 && op_info->channel_count != 2)
|
if (op_info->channel_count != 1 && op_info->channel_count != 2)
|
||||||
{
|
{
|
||||||
Con_Printf("Unsupported number of channels %d in %s\n",
|
console::info("Unsupported number of channels %d in %s\n",
|
||||||
op_info->channel_count, stream->name);
|
op_info->channel_count, stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -86,7 +86,7 @@ bool SNDDMA_Init (dma_t *dma)
|
|||||||
|
|
||||||
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
||||||
{
|
{
|
||||||
Con_Printf("Couldn't init SDL audio: %s\n", SDL_GetError());
|
console::info("Couldn't init SDL audio: %s\n", SDL_GetError());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ bool SNDDMA_Init (dma_t *dma)
|
|||||||
/* Open the audio device */
|
/* Open the audio device */
|
||||||
if (SDL_OpenAudio(&desired, NULL) == -1)
|
if (SDL_OpenAudio(&desired, NULL) == -1)
|
||||||
{
|
{
|
||||||
Con_Printf("Couldn't open SDL audio: %s\n", SDL_GetError());
|
console::info("Couldn't open SDL audio: %s\n", SDL_GetError());
|
||||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ bool SNDDMA_Init (dma_t *dma)
|
|||||||
shm->samplepos = 0;
|
shm->samplepos = 0;
|
||||||
shm->submission_chunk = 1;
|
shm->submission_chunk = 1;
|
||||||
|
|
||||||
Con_Printf ("SDL audio spec : %d Hz, %d samples, %d channels\n",
|
console::info ("SDL audio spec : %d Hz, %d samples, %d channels\n",
|
||||||
desired.freq, desired.samples, desired.channels);
|
desired.freq, desired.samples, desired.channels);
|
||||||
#if defined(USE_SDL2)
|
#if defined(USE_SDL2)
|
||||||
{
|
{
|
||||||
@@ -154,7 +154,7 @@ bool SNDDMA_Init (dma_t *dma)
|
|||||||
strcpy(drivername, "(UNKNOWN)");
|
strcpy(drivername, "(UNKNOWN)");
|
||||||
#endif
|
#endif
|
||||||
buffersize = shm->samples * (shm->samplebits / 8);
|
buffersize = shm->samples * (shm->samplebits / 8);
|
||||||
Con_Printf ("SDL audio driver: %s, %d bytes buffer\n", drivername, buffersize);
|
console::info ("SDL audio driver: %s, %d bytes buffer\n", drivername, buffersize);
|
||||||
|
|
||||||
shm->buffer = (unsigned char *) calloc (1, buffersize);
|
shm->buffer = (unsigned char *) calloc (1, buffersize);
|
||||||
if (!shm->buffer)
|
if (!shm->buffer)
|
||||||
@@ -162,7 +162,7 @@ bool SNDDMA_Init (dma_t *dma)
|
|||||||
SDL_CloseAudio();
|
SDL_CloseAudio();
|
||||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||||
shm = NULL;
|
shm = NULL;
|
||||||
Con_Printf ("Failed allocating memory for SDL audio\n");
|
console::info ("Failed allocating memory for SDL audio\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ void SNDDMA_Shutdown (void)
|
|||||||
{
|
{
|
||||||
if (shm)
|
if (shm)
|
||||||
{
|
{
|
||||||
Con_Printf ("Shutting down SDL sound\n");
|
console::info ("Shutting down SDL sound\n");
|
||||||
SDL_CloseAudio();
|
SDL_CloseAudio();
|
||||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||||
if (shm->buffer)
|
if (shm->buffer)
|
||||||
|
|||||||
+6
-6
@@ -234,7 +234,7 @@ static int probe_umx (fshandle_t *f, const struct upkg_hdr *hdr,
|
|||||||
if (hdr->name_offset >= fsiz ||
|
if (hdr->name_offset >= fsiz ||
|
||||||
hdr->export_offset >= fsiz ||
|
hdr->export_offset >= fsiz ||
|
||||||
hdr->import_offset >= fsiz) {
|
hdr->import_offset >= fsiz) {
|
||||||
Con_DPrintf("Illegal values in header.\n");
|
console::debug("Illegal values in header.\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ static int32_t probe_header (fshandle_t *f, struct upkg_hdr *hdr)
|
|||||||
hdr->import_offset = LittleLong(hdr->import_offset);
|
hdr->import_offset = LittleLong(hdr->import_offset);
|
||||||
|
|
||||||
if (hdr->tag != UPKG_HDR_TAG) {
|
if (hdr->tag != UPKG_HDR_TAG) {
|
||||||
Con_DPrintf("Unknown header tag 0x%x\n", hdr->tag);
|
console::debug("Unknown header tag 0x%x\n", hdr->tag);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (hdr->name_count < 0 ||
|
if (hdr->name_count < 0 ||
|
||||||
@@ -301,7 +301,7 @@ static int32_t probe_header (fshandle_t *f, struct upkg_hdr *hdr)
|
|||||||
hdr->name_offset < 36 ||
|
hdr->name_offset < 36 ||
|
||||||
hdr->export_offset < 36 ||
|
hdr->export_offset < 36 ||
|
||||||
hdr->import_offset < 36) {
|
hdr->import_offset < 36) {
|
||||||
Con_DPrintf("Illegal values in header.\n");
|
console::debug("Illegal values in header.\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ static int32_t probe_header (fshandle_t *f, struct upkg_hdr *hdr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_DPrintf("Unknown upkg version %d\n", hdr->file_version);
|
console::debug("Unknown upkg version %d\n", hdr->file_version);
|
||||||
return -1;
|
return -1;
|
||||||
#endif /* #if 0 */
|
#endif /* #if 0 */
|
||||||
}
|
}
|
||||||
@@ -356,11 +356,11 @@ static bool S_UMX_CodecOpenStream (snd_stream_t *stream)
|
|||||||
|
|
||||||
type = process_upkg(&stream->fh, &ofs, &size);
|
type = process_upkg(&stream->fh, &ofs, &size);
|
||||||
if (type < 0) {
|
if (type < 0) {
|
||||||
Con_DPrintf("%s: unrecognized umx\n", stream->name);
|
console::debug("%s: unrecognized umx\n", stream->name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_DPrintf("%s: %s data @ 0x%x, %d bytes\n", stream->name, mustype[type], ofs, size);
|
console::debug("%s: %s data @ 0x%x, %d bytes\n", stream->name, mustype[type], ofs, size);
|
||||||
/* hack the fshandle_t start pos and length members so
|
/* hack the fshandle_t start pos and length members so
|
||||||
* that only the relevant data is accessed from now on */
|
* that only the relevant data is accessed from now on */
|
||||||
stream->fh.start += ofs;
|
stream->fh.start += ofs;
|
||||||
|
|||||||
@@ -85,21 +85,21 @@ static bool S_VORBIS_CodecOpenStream (snd_stream_t *stream)
|
|||||||
res = ov_open_callbacks(&stream->fh, ovFile, NULL, 0, ovc_qfs);
|
res = ov_open_callbacks(&stream->fh, ovFile, NULL, 0, ovc_qfs);
|
||||||
if (res != 0)
|
if (res != 0)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is not a valid Ogg Vorbis file (error %i).\n",
|
console::info("%s is not a valid Ogg Vorbis file (error %i).\n",
|
||||||
stream->name, res);
|
stream->name, res);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ov_seekable(ovFile))
|
if (!ov_seekable(ovFile))
|
||||||
{
|
{
|
||||||
Con_Printf("Stream %s not seekable.\n", stream->name);
|
console::info("Stream %s not seekable.\n", stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ovf_info = ov_info(ovFile, 0);
|
ovf_info = ov_info(ovFile, 0);
|
||||||
if (!ovf_info)
|
if (!ovf_info)
|
||||||
{
|
{
|
||||||
Con_Printf("Unable to get stream info for %s.\n", stream->name);
|
console::info("Unable to get stream info for %s.\n", stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,14 +107,14 @@ static bool S_VORBIS_CodecOpenStream (snd_stream_t *stream)
|
|||||||
numstreams = ov_streams(ovFile);
|
numstreams = ov_streams(ovFile);
|
||||||
if (numstreams != 1)
|
if (numstreams != 1)
|
||||||
{
|
{
|
||||||
Con_Printf("More than one (%ld) stream in %s.\n",
|
console::info("More than one (%ld) stream in %s.\n",
|
||||||
numstreams, stream->name);
|
numstreams, stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ovf_info->channels != 1 && ovf_info->channels != 2)
|
if (ovf_info->channels != 1 && ovf_info->channels != 2)
|
||||||
{
|
{
|
||||||
Con_Printf("Unsupported number of channels %d in %s\n",
|
console::info("Unsupported number of channels %d in %s\n",
|
||||||
ovf_info->channels, stream->name);
|
ovf_info->channels, stream->name);
|
||||||
goto _fail;
|
goto _fail;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -72,7 +72,7 @@ static int WAV_ReadChunkInfo(FILE *f, char *name)
|
|||||||
len = FGetLittleLong(f);
|
len = FGetLittleLong(f);
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
{
|
{
|
||||||
Con_Printf("WAV: Negative chunk length\n");
|
console::info("WAV: Negative chunk length\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,14 +120,14 @@ static bool WAV_ReadRIFFHeader(const char *name, FILE *file, snd_info_t *info)
|
|||||||
strncmp(dump, "RIFF", 4) != 0 ||
|
strncmp(dump, "RIFF", 4) != 0 ||
|
||||||
strncmp(&dump[8], "WAVE", 4) != 0)
|
strncmp(&dump[8], "WAVE", 4) != 0)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is missing RIFF/WAVE chunks\n", name);
|
console::info("%s is missing RIFF/WAVE chunks\n", name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scan for the format chunk */
|
/* Scan for the format chunk */
|
||||||
if ((fmtlen = WAV_FindRIFFChunk(file, "fmt ")) < 0)
|
if ((fmtlen = WAV_FindRIFFChunk(file, "fmt ")) < 0)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is missing fmt chunk\n", name);
|
console::info("%s is missing fmt chunk\n", name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ static bool WAV_ReadRIFFHeader(const char *name, FILE *file, snd_info_t *info)
|
|||||||
wav_format = FGetLittleShort(file);
|
wav_format = FGetLittleShort(file);
|
||||||
if (wav_format != WAV_FORMAT_PCM)
|
if (wav_format != WAV_FORMAT_PCM)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is not Microsoft PCM format\n", name);
|
console::info("%s is not Microsoft PCM format\n", name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ static bool WAV_ReadRIFFHeader(const char *name, FILE *file, snd_info_t *info)
|
|||||||
|
|
||||||
if (info->bits != 8 && info->bits != 16)
|
if (info->bits != 8 && info->bits != 16)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is not 8 or 16 bit\n", name);
|
console::info("%s is not 8 or 16 bit\n", name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,20 +164,20 @@ static bool WAV_ReadRIFFHeader(const char *name, FILE *file, snd_info_t *info)
|
|||||||
/* Scan for the data chunk */
|
/* Scan for the data chunk */
|
||||||
if ((info->size = WAV_FindRIFFChunk(file, "data")) < 0)
|
if ((info->size = WAV_FindRIFFChunk(file, "data")) < 0)
|
||||||
{
|
{
|
||||||
Con_Printf("%s is missing data chunk\n", name);
|
console::info("%s is missing data chunk\n", name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->channels != 1 && info->channels != 2)
|
if (info->channels != 1 && info->channels != 2)
|
||||||
{
|
{
|
||||||
Con_Printf("Unsupported number of channels %d in %s\n",
|
console::info("Unsupported number of channels %d in %s\n",
|
||||||
info->channels, name);
|
info->channels, name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
info->samples = (info->size / info->width) / info->channels;
|
info->samples = (info->size / info->width) / info->channels;
|
||||||
if (info->samples == 0)
|
if (info->samples == 0)
|
||||||
{
|
{
|
||||||
Con_Printf("%s has zero samples\n", name);
|
console::info("%s has zero samples\n", name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +203,7 @@ static bool S_WAV_CodecOpenStream(snd_stream_t *stream)
|
|||||||
stream->fh.start = ftell(stream->fh.file); /* reset to data position */
|
stream->fh.start = ftell(stream->fh.file); /* reset to data position */
|
||||||
if (stream->fh.start - start + stream->info.size > stream->fh.length)
|
if (stream->fh.start - start + stream->info.size > stream->fh.length)
|
||||||
{
|
{
|
||||||
Con_Printf("%s data size mismatch\n", stream->name);
|
console::info("%s data size mismatch\n", stream->name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -84,7 +84,7 @@ static bool S_XMP_CodecOpenStream (snd_stream_t *stream)
|
|||||||
|
|
||||||
#if (XMP_VERCODE >= 0x040500)
|
#if (XMP_VERCODE >= 0x040500)
|
||||||
if (xmp_load_module_from_callbacks(c, &stream->fh, file_callbacks) < 0) {
|
if (xmp_load_module_from_callbacks(c, &stream->fh, file_callbacks) < 0) {
|
||||||
Con_DPrintf("Could not load module %s\n", stream->name);
|
console::debug("Could not load module %s\n", stream->name);
|
||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -94,7 +94,7 @@ static bool S_XMP_CodecOpenStream (snd_stream_t *stream)
|
|||||||
FS_fread(moddata, 1, len, &stream->fh);
|
FS_fread(moddata, 1, len, &stream->fh);
|
||||||
if (xmp_load_module_from_memory(c, moddata, len) < 0) {
|
if (xmp_load_module_from_memory(c, moddata, len) < 0) {
|
||||||
Hunk_FreeToLowMark(mark);
|
Hunk_FreeToLowMark(mark);
|
||||||
Con_DPrintf("Could not load module %s\n", stream->name);
|
console::debug("Could not load module %s\n", stream->name);
|
||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
Hunk_FreeToLowMark(mark); /* free original file data */
|
Hunk_FreeToLowMark(mark); /* free original file data */
|
||||||
@@ -141,7 +141,7 @@ static int S_XMP_CodecReadStream (snd_stream_t *stream, int bytes, void *buffer)
|
|||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
if (r == -XMP_END) {
|
if (r == -XMP_END) {
|
||||||
Con_DPrintf("XMP EOF\n");
|
console::debug("XMP EOF\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+14
-14
@@ -47,20 +47,20 @@ void SV_Protocol_f(void) {
|
|||||||
|
|
||||||
switch (command::argc()) {
|
switch (command::argc()) {
|
||||||
case 1:
|
case 1:
|
||||||
Con_Printf("\"sv_protocol\" is \"%i\"\n", sv_protocol);
|
console::info("\"sv_protocol\" is \"%i\"\n", sv_protocol);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
i = atoi(command::argv(1)->c_str());
|
i = atoi(command::argv(1)->c_str());
|
||||||
if (i != PROTOCOL_NETQUAKE && i != PROTOCOL_FITZQUAKE && i != PROTOCOL_RMQ)
|
if (i != PROTOCOL_NETQUAKE && i != PROTOCOL_FITZQUAKE && i != PROTOCOL_RMQ)
|
||||||
Con_Printf("sv_protocol must be %i or %i or %i\n", PROTOCOL_NETQUAKE, PROTOCOL_FITZQUAKE, PROTOCOL_RMQ);
|
console::info("sv_protocol must be %i or %i or %i\n", PROTOCOL_NETQUAKE, PROTOCOL_FITZQUAKE, PROTOCOL_RMQ);
|
||||||
else {
|
else {
|
||||||
sv_protocol = i;
|
sv_protocol = i;
|
||||||
if (sv.active)
|
if (sv.active)
|
||||||
Con_Printf("changes will not take effect until the next level load.\n");
|
console::info("changes will not take effect until the next level load.\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_SafePrintf("usage: sv_protocol <protocol>\n");
|
console::safe_print("usage: sv_protocol <protocol>\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -202,7 +202,7 @@ void SV_StartSound(edict_t *entity, int channel, const char *sample, int volume,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) {
|
if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) {
|
||||||
Con_Printf("SV_StartSound: %s not precached\n", sample);
|
console::info("SV_StartSound: %s not precached\n", sample);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ void SV_LocalSound(client_t *client, const char *sample) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) {
|
if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) {
|
||||||
Con_Printf("SV_LocalSound: %s not precached\n", sample);
|
console::info("SV_LocalSound: %s not precached\n", sample);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,7 +383,7 @@ void SV_ConnectClient(int clientnum) {
|
|||||||
|
|
||||||
client = svs.clients + clientnum;
|
client = svs.clients + clientnum;
|
||||||
|
|
||||||
Con_DPrintf("Client %s connected\n", NET_QSocketGetAddressString(client->netconnection));
|
console::debug("Client %s connected\n", NET_QSocketGetAddressString(client->netconnection));
|
||||||
|
|
||||||
edictnum = clientnum + 1;
|
edictnum = clientnum + 1;
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@ void SV_WriteEntitiesToClient(edict_t *clent, sizebuf_t *msg) {
|
|||||||
if (msg->cursize + 40 > msg->maxsize) {
|
if (msg->cursize + 40 > msg->maxsize) {
|
||||||
//johnfitz -- less spammy overflow message
|
//johnfitz -- less spammy overflow message
|
||||||
if (!dev_overflows.packetsize || dev_overflows.packetsize + CONSOLE_RESPAM_TIME < realtime) {
|
if (!dev_overflows.packetsize || dev_overflows.packetsize + CONSOLE_RESPAM_TIME < realtime) {
|
||||||
Con_Printf("Packet overflow!\n");
|
console::info("Packet overflow!\n");
|
||||||
dev_overflows.packetsize = realtime;
|
dev_overflows.packetsize = realtime;
|
||||||
}
|
}
|
||||||
goto stats;
|
goto stats;
|
||||||
@@ -759,7 +759,7 @@ void SV_WriteEntitiesToClient(edict_t *clent, sizebuf_t *msg) {
|
|||||||
//johnfitz -- devstats
|
//johnfitz -- devstats
|
||||||
stats:
|
stats:
|
||||||
if (msg->cursize > 1024 && dev_peakstats.packetsize <= 1024)
|
if (msg->cursize > 1024 && dev_peakstats.packetsize <= 1024)
|
||||||
Con_DWarning("%i byte packet exceeds standard limit of 1024 (max = %d).\n", msg->cursize, msg->maxsize);
|
console::dev_warn("%i byte packet exceeds standard limit of 1024 (max = %d).\n", msg->cursize, msg->maxsize);
|
||||||
dev_stats.packetsize = msg->cursize;
|
dev_stats.packetsize = msg->cursize;
|
||||||
dev_peakstats.packetsize = std::max(msg->cursize, dev_peakstats.packetsize);
|
dev_peakstats.packetsize = std::max(msg->cursize, dev_peakstats.packetsize);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
@@ -1380,7 +1380,7 @@ void SV_SpawnServer(const char *server) {
|
|||||||
convar::set("hostname", "UNNAMED");
|
convar::set("hostname", "UNNAMED");
|
||||||
scr_centertime_off = 0;
|
scr_centertime_off = 0;
|
||||||
|
|
||||||
Con_DPrintf("SpawnServer: %s\n", server);
|
console::debug("SpawnServer: %s\n", server);
|
||||||
svs.changelevel_issued = false; // now safe to issue another
|
svs.changelevel_issued = false; // now safe to issue another
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1454,7 +1454,7 @@ void SV_SpawnServer(const char *server) {
|
|||||||
q_snprintf(sv.modelname, sizeof(sv.modelname), "maps/%s.bsp", server);
|
q_snprintf(sv.modelname, sizeof(sv.modelname), "maps/%s.bsp", server);
|
||||||
sv.worldmodel = Mod_ForName(sv.modelname, false);
|
sv.worldmodel = Mod_ForName(sv.modelname, false);
|
||||||
if (!sv.worldmodel) {
|
if (!sv.worldmodel) {
|
||||||
Con_Printf("Couldn't spawn server %s\n", sv.modelname);
|
console::info("Couldn't spawn server %s\n", sv.modelname);
|
||||||
sv.active = false;
|
sv.active = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1513,10 +1513,10 @@ void SV_SpawnServer(const char *server) {
|
|||||||
for (i = 0, signonsize = 0; i < sv.num_signon_buffers; i++)
|
for (i = 0, signonsize = 0; i < sv.num_signon_buffers; i++)
|
||||||
signonsize += sv.signon_buffers[i]->cursize;
|
signonsize += sv.signon_buffers[i]->cursize;
|
||||||
if (signonsize > 64000 - 2)
|
if (signonsize > 64000 - 2)
|
||||||
Con_DWarning("%i byte signon buffer exceeds QS limit of 63998.\n", signonsize);
|
console::dev_warn("%i byte signon buffer exceeds QS limit of 63998.\n", signonsize);
|
||||||
else if (signonsize > 8000 - 2)
|
else if (signonsize > 8000 - 2)
|
||||||
//max size that will fit into 8000-sized client->message buffer with 2 extra bytes on the end
|
//max size that will fit into 8000-sized client->message buffer with 2 extra bytes on the end
|
||||||
Con_DWarning("%i byte signon buffer exceeds standard limit of 7998.\n", signonsize);
|
console::dev_warn("%i byte signon buffer exceeds standard limit of 7998.\n", signonsize);
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
// send serverinfo to all connected clients
|
// send serverinfo to all connected clients
|
||||||
@@ -1524,5 +1524,5 @@ void SV_SpawnServer(const char *server) {
|
|||||||
if (host_client->active)
|
if (host_client->active)
|
||||||
SV_SendServerinfo(host_client);
|
SV_SendServerinfo(host_client);
|
||||||
|
|
||||||
Con_DPrintf("Server spawned.\n");
|
console::debug("Server spawned.\n");
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -183,7 +183,7 @@ bool SV_movestep (edict_t *ent, vec3_t move, bool relink)
|
|||||||
if (relink)
|
if (relink)
|
||||||
SV_LinkEdict (ent, true);
|
SV_LinkEdict (ent, true);
|
||||||
ent->v.flags = (int)ent->v.flags & ~FL_ONGROUND;
|
ent->v.flags = (int)ent->v.flags & ~FL_ONGROUND;
|
||||||
// Con_Printf ("fall down\n");
|
// console::info ("fall down\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ bool SV_movestep (edict_t *ent, vec3_t move, bool relink)
|
|||||||
|
|
||||||
if ( (int)ent->v.flags & FL_PARTIALGROUND )
|
if ( (int)ent->v.flags & FL_PARTIALGROUND )
|
||||||
{
|
{
|
||||||
// Con_Printf ("back on ground\n");
|
// console::info ("back on ground\n");
|
||||||
ent->v.flags = (int)ent->v.flags & ~FL_PARTIALGROUND;
|
ent->v.flags = (int)ent->v.flags & ~FL_PARTIALGROUND;
|
||||||
}
|
}
|
||||||
ent->v.groundentity = EDICT_TO_PROG(trace.ent);
|
ent->v.groundentity = EDICT_TO_PROG(trace.ent);
|
||||||
@@ -269,7 +269,7 @@ SV_FixCheckBottom
|
|||||||
*/
|
*/
|
||||||
void SV_FixCheckBottom (edict_t *ent)
|
void SV_FixCheckBottom (edict_t *ent)
|
||||||
{
|
{
|
||||||
// Con_Printf ("SV_FixCheckBottom\n");
|
// console::info ("SV_FixCheckBottom\n");
|
||||||
ent->v.flags = (int)ent->v.flags | FL_PARTIALGROUND;
|
ent->v.flags = (int)ent->v.flags | FL_PARTIALGROUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -75,7 +75,7 @@ void SV_CheckAllEnts (void)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (SV_TestEntityPosition (check))
|
if (SV_TestEntityPosition (check))
|
||||||
Con_Printf ("entity in invalid position\n");
|
console::info ("entity in invalid position\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,12 +95,12 @@ void SV_CheckVelocity (edict_t *ent)
|
|||||||
{
|
{
|
||||||
if (IS_NAN(ent->v.velocity[i]))
|
if (IS_NAN(ent->v.velocity[i]))
|
||||||
{
|
{
|
||||||
Con_Printf ("Got a NaN velocity on %s\n", PR_GetString(ent->v.classname));
|
console::info ("Got a NaN velocity on %s\n", PR_GetString(ent->v.classname));
|
||||||
ent->v.velocity[i] = 0;
|
ent->v.velocity[i] = 0;
|
||||||
}
|
}
|
||||||
if (IS_NAN(ent->v.origin[i]))
|
if (IS_NAN(ent->v.origin[i]))
|
||||||
{
|
{
|
||||||
Con_Printf ("Got a NaN origin on %s\n", PR_GetString(ent->v.classname));
|
console::info ("Got a NaN origin on %s\n", PR_GetString(ent->v.classname));
|
||||||
ent->v.origin[i] = 0;
|
ent->v.origin[i] = 0;
|
||||||
}
|
}
|
||||||
if (ent->v.velocity[i] > sv_maxvelocity.value)
|
if (ent->v.velocity[i] > sv_maxvelocity.value)
|
||||||
@@ -340,7 +340,7 @@ int SV_FlyMove (edict_t *ent, float time, trace_t *steptrace)
|
|||||||
{ // go along the crease
|
{ // go along the crease
|
||||||
if (numplanes != 2)
|
if (numplanes != 2)
|
||||||
{
|
{
|
||||||
// Con_Printf ("clip velocity, numplanes == %i\n",numplanes);
|
// console::info ("clip velocity, numplanes == %i\n",numplanes);
|
||||||
VectorCopy (vec3_origin, ent->v.velocity);
|
VectorCopy (vec3_origin, ent->v.velocity);
|
||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
@@ -630,7 +630,7 @@ void SV_CheckStuck (edict_t *ent)
|
|||||||
VectorCopy (ent->v.oldorigin, ent->v.origin);
|
VectorCopy (ent->v.oldorigin, ent->v.origin);
|
||||||
if (!SV_TestEntityPosition(ent))
|
if (!SV_TestEntityPosition(ent))
|
||||||
{
|
{
|
||||||
Con_DPrintf ("Unstuck.\n");
|
console::debug ("Unstuck.\n");
|
||||||
SV_LinkEdict (ent, true);
|
SV_LinkEdict (ent, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -644,14 +644,14 @@ void SV_CheckStuck (edict_t *ent)
|
|||||||
ent->v.origin[2] = org[2] + z;
|
ent->v.origin[2] = org[2] + z;
|
||||||
if (!SV_TestEntityPosition(ent))
|
if (!SV_TestEntityPosition(ent))
|
||||||
{
|
{
|
||||||
Con_DPrintf ("Unstuck.\n");
|
console::debug ("Unstuck.\n");
|
||||||
SV_LinkEdict (ent, true);
|
SV_LinkEdict (ent, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorCopy (org, ent->v.origin);
|
VectorCopy (org, ent->v.origin);
|
||||||
Con_DPrintf ("player is stuck.\n");
|
console::debug ("player is stuck.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -768,7 +768,7 @@ int SV_TryUnstick (edict_t *ent, vec3_t oldvel)
|
|||||||
if ( fabs(oldorg[1] - ent->v.origin[1]) > 4
|
if ( fabs(oldorg[1] - ent->v.origin[1]) > 4
|
||||||
|| fabs(oldorg[0] - ent->v.origin[0]) > 4 )
|
|| fabs(oldorg[0] - ent->v.origin[0]) > 4 )
|
||||||
{
|
{
|
||||||
// Con_DPrintf ("unstuck!\n");
|
// console::debug ("unstuck!\n");
|
||||||
return clip;
|
return clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -572,7 +572,7 @@ nextmsg:
|
|||||||
if (ret == 1)
|
if (ret == 1)
|
||||||
command::execute_string (s, command::source::client);
|
command::execute_string (s, command::source::client);
|
||||||
else
|
else
|
||||||
Con_DPrintf("%s tried to %s\n", host_client->name, s);
|
console::debug("%s tried to %s\n", host_client->name, s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case clc_disconnect:
|
case clc_disconnect:
|
||||||
|
|||||||
+3
-3
@@ -125,7 +125,7 @@ float V_CalcBob(void) {
|
|||||||
// (don't count Z, or jumping messes it up)
|
// (don't count Z, or jumping messes it up)
|
||||||
|
|
||||||
bob = sqrt(cl.velocity[0] * cl.velocity[0] + cl.velocity[1] * cl.velocity[1]) * cl_bob.value;
|
bob = sqrt(cl.velocity[0] * cl.velocity[0] + cl.velocity[1] * cl.velocity[1]) * cl_bob.value;
|
||||||
//Con_Printf ("speed: %5.1f\n", VectorLength(cl.velocity));
|
//console::info ("speed: %5.1f\n", VectorLength(cl.velocity));
|
||||||
bob = bob * 0.3 + bob * 0.7 * sin(cycle);
|
bob = bob * 0.3 + bob * 0.7 * sin(cycle);
|
||||||
if (bob > 4)
|
if (bob > 4)
|
||||||
bob = 4;
|
bob = 4;
|
||||||
@@ -209,7 +209,7 @@ void V_DriftPitch(void) {
|
|||||||
move = host_frametime * cl.pitchvel;
|
move = host_frametime * cl.pitchvel;
|
||||||
cl.pitchvel += host_frametime * v_centerspeed.value;
|
cl.pitchvel += host_frametime * v_centerspeed.value;
|
||||||
|
|
||||||
//Con_Printf ("move: %f (%f)\n", move, host_frametime);
|
//console::info ("move: %f (%f)\n", move, host_frametime);
|
||||||
|
|
||||||
if (delta > 0) {
|
if (delta > 0) {
|
||||||
if (move > delta) {
|
if (move > delta) {
|
||||||
@@ -842,7 +842,7 @@ the entity origin, so any view position inside that will be valid
|
|||||||
extern vrect_t scr_vrect;
|
extern vrect_t scr_vrect;
|
||||||
|
|
||||||
void V_RenderView(void) {
|
void V_RenderView(void) {
|
||||||
if (con_forcedup)
|
if (console::forced_up)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cl.intermission)
|
if (cl.intermission)
|
||||||
|
|||||||
+1
-1
@@ -125,7 +125,7 @@ lumpinfo_t *W_GetLumpinfo (const char *name)
|
|||||||
return lump_p;
|
return lump_p;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_SafePrintf ("W_GetLumpinfo: %s not found\n", name); //johnfitz -- was Sys_Error
|
console::safe_print ("W_GetLumpinfo: %s not found\n", name); //johnfitz -- was Sys_Error
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -686,7 +686,7 @@ bool SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t
|
|||||||
if (SV_HullPointContents (sv_hullmodel, mid, node->children[side])
|
if (SV_HullPointContents (sv_hullmodel, mid, node->children[side])
|
||||||
== CONTENTS_SOLID)
|
== CONTENTS_SOLID)
|
||||||
{
|
{
|
||||||
Con_Printf ("mid PointInHullSolid\n");
|
console::info ("mid PointInHullSolid\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -721,7 +721,7 @@ bool SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t
|
|||||||
{
|
{
|
||||||
trace->fraction = midf;
|
trace->fraction = midf;
|
||||||
VectorCopy (mid, trace->endpos);
|
VectorCopy (mid, trace->endpos);
|
||||||
Con_DPrintf ("backup past 0\n");
|
console::debug ("backup past 0\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
midf = p1f + (p2f - p1f)*frac;
|
midf = p1f + (p2f - p1f)*frac;
|
||||||
|
|||||||
+19
-19
@@ -265,21 +265,21 @@ void Z_Print (memzone_t *zone)
|
|||||||
{
|
{
|
||||||
memblock_t *block;
|
memblock_t *block;
|
||||||
|
|
||||||
Con_Printf ("zone size: %i location: %p\n",mainzone->size,mainzone);
|
console::info ("zone size: %i location: %p\n",mainzone->size,mainzone);
|
||||||
|
|
||||||
for (block = zone->blocklist.next ; ; block = block->next)
|
for (block = zone->blocklist.next ; ; block = block->next)
|
||||||
{
|
{
|
||||||
Con_Printf ("block:%p size:%7i tag:%3i\n",
|
console::info ("block:%p size:%7i tag:%3i\n",
|
||||||
block, block->size, block->tag);
|
block, block->size, block->tag);
|
||||||
|
|
||||||
if (block->next == &zone->blocklist)
|
if (block->next == &zone->blocklist)
|
||||||
break; // all blocks have been hit
|
break; // all blocks have been hit
|
||||||
if ( (byte *)block + block->size != (byte *)block->next)
|
if ( (byte *)block + block->size != (byte *)block->next)
|
||||||
Con_Printf ("ERROR: block size does not touch the next block\n");
|
console::info ("ERROR: block size does not touch the next block\n");
|
||||||
if ( block->next->prev != block)
|
if ( block->next->prev != block)
|
||||||
Con_Printf ("ERROR: next block doesn't have proper back link\n");
|
console::info ("ERROR: next block doesn't have proper back link\n");
|
||||||
if (!block->tag && !block->next->tag)
|
if (!block->tag && !block->next->tag)
|
||||||
Con_Printf ("ERROR: two consecutive free blocks\n");
|
console::info ("ERROR: two consecutive free blocks\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,8 +350,8 @@ void Hunk_Print (bool all)
|
|||||||
starthigh = (hunk_t *)(hunk_base + hunk_size - hunk_high_used);
|
starthigh = (hunk_t *)(hunk_base + hunk_size - hunk_high_used);
|
||||||
endhigh = (hunk_t *)(hunk_base + hunk_size);
|
endhigh = (hunk_t *)(hunk_base + hunk_size);
|
||||||
|
|
||||||
Con_Printf (" :%8i total hunk size\n", hunk_size);
|
console::info (" :%8i total hunk size\n", hunk_size);
|
||||||
Con_Printf ("-------------------------\n");
|
console::info ("-------------------------\n");
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
@@ -360,9 +360,9 @@ void Hunk_Print (bool all)
|
|||||||
//
|
//
|
||||||
if ( h == endlow )
|
if ( h == endlow )
|
||||||
{
|
{
|
||||||
Con_Printf ("-------------------------\n");
|
console::info ("-------------------------\n");
|
||||||
Con_Printf (" :%8i REMAINING\n", hunk_size - hunk_low_used - hunk_high_used);
|
console::info (" :%8i REMAINING\n", hunk_size - hunk_low_used - hunk_high_used);
|
||||||
Con_Printf ("-------------------------\n");
|
console::info ("-------------------------\n");
|
||||||
h = starthigh;
|
h = starthigh;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,7 +390,7 @@ void Hunk_Print (bool all)
|
|||||||
//
|
//
|
||||||
memcpy (name, h->name, HUNKNAME_LEN);
|
memcpy (name, h->name, HUNKNAME_LEN);
|
||||||
if (all)
|
if (all)
|
||||||
Con_Printf ("%8p :%8i %8s\n",h, h->size, name);
|
console::info ("%8p :%8i %8s\n",h, h->size, name);
|
||||||
|
|
||||||
//
|
//
|
||||||
// print the total
|
// print the total
|
||||||
@@ -399,7 +399,7 @@ void Hunk_Print (bool all)
|
|||||||
strncmp (h->name, next->name, HUNKNAME_LEN - 1))
|
strncmp (h->name, next->name, HUNKNAME_LEN - 1))
|
||||||
{
|
{
|
||||||
if (!all)
|
if (!all)
|
||||||
Con_Printf (" :%8i %8s (TOTAL)\n",sum, name);
|
console::info (" :%8i %8s (TOTAL)\n",sum, name);
|
||||||
count = 0;
|
count = 0;
|
||||||
sum = 0;
|
sum = 0;
|
||||||
}
|
}
|
||||||
@@ -407,8 +407,8 @@ void Hunk_Print (bool all)
|
|||||||
h = next;
|
h = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf ("-------------------------\n");
|
console::info ("-------------------------\n");
|
||||||
Con_Printf ("%8i total blocks\n", totalblocks);
|
console::info ("%8i total blocks\n", totalblocks);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,7 +531,7 @@ void *Hunk_HighAllocName (int size, const char *name)
|
|||||||
|
|
||||||
if (hunk_size - hunk_low_used - hunk_high_used < size)
|
if (hunk_size - hunk_low_used - hunk_high_used < size)
|
||||||
{
|
{
|
||||||
Con_Printf ("Hunk_HighAlloc: failed on %i bytes\n",size);
|
console::info ("Hunk_HighAlloc: failed on %i bytes\n",size);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -620,7 +620,7 @@ void Cache_Move ( cache_system_t *c)
|
|||||||
new_cs = Cache_TryAlloc (c->size, true);
|
new_cs = Cache_TryAlloc (c->size, true);
|
||||||
if (new_cs)
|
if (new_cs)
|
||||||
{
|
{
|
||||||
// Con_Printf ("cache_move ok\n");
|
// console::info ("cache_move ok\n");
|
||||||
|
|
||||||
std::memcpy ( new_cs+1, c+1, c->size - sizeof(cache_system_t) );
|
std::memcpy ( new_cs+1, c+1, c->size - sizeof(cache_system_t) );
|
||||||
new_cs->user = c->user;
|
new_cs->user = c->user;
|
||||||
@@ -630,7 +630,7 @@ void Cache_Move ( cache_system_t *c)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Con_Printf ("cache_move failed\n");
|
// console::info ("cache_move failed\n");
|
||||||
|
|
||||||
Cache_Free (c->user, true); // tough luck... //johnfitz -- added second argument
|
Cache_Free (c->user, true); // tough luck... //johnfitz -- added second argument
|
||||||
}
|
}
|
||||||
@@ -814,7 +814,7 @@ void Cache_Print (void)
|
|||||||
|
|
||||||
for (cd = cache_head.next ; cd != &cache_head ; cd = cd->next)
|
for (cd = cache_head.next ; cd != &cache_head ; cd = cd->next)
|
||||||
{
|
{
|
||||||
Con_Printf ("%8i : %s\n", cd->size, cd->name);
|
console::info ("%8i : %s\n", cd->size, cd->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -826,7 +826,7 @@ Cache_Report
|
|||||||
*/
|
*/
|
||||||
void Cache_Report (void)
|
void Cache_Report (void)
|
||||||
{
|
{
|
||||||
Con_DPrintf ("%4.1f megabyte data cache\n", (hunk_size - hunk_high_used - hunk_low_used) / (float)(1024*1024) );
|
console::debug ("%4.1f megabyte data cache\n", (hunk_size - hunk_high_used - hunk_low_used) / (float)(1024*1024) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user