diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 764465b..42a6018 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,6 +6,7 @@
+
{
"useNewFormat": true
@@ -27,85 +28,57 @@
-
+
-
+
-
-
-
+
-
+
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
@@ -122,14 +95,10 @@
-
-
-
+
-
-
@@ -138,6 +107,7 @@
+
@@ -145,6 +115,10 @@
+
+
+
+
@@ -164,32 +138,33 @@
- {
+ "keyToString": {
+ "CMake Application.quakespasm.executor": "Run",
+ "CidrDebugProfileConversion": "true",
+ "ModuleVcsDetector.initialDetectionPerformed": "true",
+ "RunOnceActivity.RadMigrateCodeStyle": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.cidr.known.project.marker": "true",
+ "RunOnceActivity.git.unshallow": "true",
+ "RunOnceActivity.readMode.enableVisualFormatting": "true",
+ "RunOnceActivity.typescript.service.memoryLimit.init": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "cf.first.check.clang-format": "false",
+ "cidr.known.project.marker": "true",
+ "codeWithMe.voiceChat.enabledByDefault": "false",
+ "git-widget-placeholder": "master",
+ "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.jshint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.jshint": "",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "settings.editor.selected.configurable": "language.cpp.clang-tidy"
}
-}]]>
+}
@@ -199,11 +174,6 @@
-
-
-
-
-
@@ -255,6 +225,11 @@
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Misc/fix_externaltex.patch b/Misc/fix_externaltex.patch
index 2459a82..be22dbc 100644
--- a/Misc/fix_externaltex.patch
+++ b/Misc/fix_externaltex.patch
@@ -21,7 +21,7 @@ index 239d361..80948f1 100644
+ if (strstr(tx->name,"sky4")) {
+ if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==13039)
+ 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)
@@ -38,40 +38,40 @@ index 239d361..80948f1 100644
+ q_strlcpy(tx->name, "plat_top1_cable", sizeof(tx->name));
+ else
+ 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 (CRC_Block((byte *)(tx+1), tx->width * tx->height)==49173)
+ q_strlcpy(tx->name, "metal5_2_x", sizeof(tx->name));
+ else
+ 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 (CRC_Block((byte *)(tx+1), tx->width * tx->height)==20977)
+ q_strlcpy(tx->name, "metal5_4_double", sizeof(tx->name));
+ else
+ 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 (CRC_Block((byte *)(tx+1), tx->width * tx->height)==48444)
+ q_strlcpy(tx->name, "metal5_8_rune", sizeof(tx->name));
+ else
+ 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 (CRC_Block((byte *)(tx+1), tx->width * tx->height)==48444)
+ q_strlcpy(tx->name, "metal5_8_rune", sizeof(tx->name));
+ else
+ 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 (CRC_Block((byte *)(tx+1), tx->width * tx->height)==63697) // e4m2 variant
+ q_strlcpy(tx->name, "window03_e4m2", sizeof(tx->name));
-+ Con_Printf(" using %s\n", tx->name);
++ console::info(" using %s\n", tx->name);
+ }
+ }
+
diff --git a/Quake/bgmusic.cpp b/Quake/bgmusic.cpp
index b1803c7..9c5ca5f 100644
--- a/Quake/bgmusic.cpp
+++ b/Quake/bgmusic.cpp
@@ -109,7 +109,7 @@ namespace music {
if (command::argc() == 2) {
play(*command::argv(1));
} else {
- Con_Printf("music \n");
+ console::info("music \n");
}
}
@@ -136,9 +136,9 @@ namespace music {
}
if (bgmloop)
- Con_Printf("Music will be looped\n");
+ console::info("Music will be looped\n");
else
- Con_Printf("Music will not be looped\n");
+ console::info("Music will not be looped\n");
}
void _stop() {
@@ -147,7 +147,7 @@ namespace music {
void _jump() {
if (command::argc() != 2) {
- Con_Printf("music_jump \n");
+ console::info("music_jump \n");
} else if (bgmstream) {
S_CodecJumpToOrder(bgmstream, static_cast(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() {
@@ -239,14 +239,14 @@ namespace music {
{
if (bgmloop) {
if (did_rewind) {
- Con_Printf("Stream keeps returning EOF.\n");
+ console::info("Stream keeps returning EOF.\n");
stop();
return;
}
res = S_CodecRewindStream(bgmstream);
if (res != 0) {
- Con_Printf("Stream seek error (%i), stopping.\n", res);
+ console::info("Stream seek error (%i), stopping.\n", res);
stop();
return;
}
@@ -257,7 +257,7 @@ namespace music {
}
} 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();
return;
}
@@ -312,7 +312,7 @@ namespace music {
return;
if (filename.empty()) {
- Con_DPrintf("null music file name\n");
+ console::debug("null music file name\n");
return;
}
@@ -332,7 +332,7 @@ namespace music {
}
}
if (chosen == nullptr) {
- Con_Printf("Unhandled extension for %s\n", filename.c_str());
+ console::info("Unhandled extension for %s\n", filename.c_str());
return;
}
q_snprintf(tmp, sizeof(tmp), "%s/%s", chosen->dir, filename.c_str());
@@ -350,7 +350,7 @@ namespace music {
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() {
@@ -433,13 +433,13 @@ namespace music {
}
if (ext == nullptr)
- Con_Printf("Couldn't find a cdrip for track %d\n", static_cast(track));
+ console::info("Couldn't find a cdrip for track %d\n", static_cast(track));
else {
q_snprintf(tmp, sizeof(tmp), "%s/track%02d.%s",
MUSIC_DIRNAME, static_cast(track), ext);
bgmstream = S_CodecOpenStreamType(tmp, type, bgmloop);
if (!bgmstream)
- Con_Printf("Couldn't handle music file %s\n", tmp);
+ console::info("Couldn't handle music file %s\n", tmp);
}
}
}
diff --git a/Quake/cd_null.cpp b/Quake/cd_null.cpp
index 51986ea..3d41064 100644
--- a/Quake/cd_null.cpp
+++ b/Quake/cd_null.cpp
@@ -43,7 +43,7 @@ void CDAudio_Update(void)
int CDAudio_Init(void)
{
- Con_Printf("CDAudio disabled at compile time\n");
+ console::info("CDAudio disabled at compile time\n");
return -1;
}
diff --git a/Quake/cd_sdl.cpp b/Quake/cd_sdl.cpp
index 601ea32..cf0a22e 100644
--- a/Quake/cd_sdl.cpp
+++ b/Quake/cd_sdl.cpp
@@ -66,7 +66,7 @@ static void CDAudio_Eject(void)
SDL_CDStop(cd_handle); /* see CDAudio_Stop() */
#endif
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)
@@ -102,13 +102,13 @@ int CDAudio_Play(byte track, bool looping)
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;
}
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;
}
@@ -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)
{
- 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;
}
@@ -161,10 +161,10 @@ void CDAudio_Stop(void)
* Samsung DVD r/w drive running under 2.6.35.6 kernel.
* Therefore, avoid dead stops if playback may be resumed shortly. */
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
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
wasPlaying = false;
@@ -182,7 +182,7 @@ void CDAudio_Pause(void)
return;
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;
playing = false;
@@ -201,7 +201,7 @@ void CDAudio_Resume(void)
return;
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;
endOfTrack += realtime - pausetime;
pausetime = -1.0;
@@ -223,10 +223,10 @@ static void CD_f (void)
if (command::argc() < 2)
{
- Con_Printf("commands:");
- Con_Printf("on, off, reset, remap, \n");
- Con_Printf("play, stop, loop, pause, resume\n");
- Con_Printf("eject, info, next, prev\n");
+ console::info("commands:");
+ console::info("on, off, reset, remap, \n");
+ console::info("play, stop, loop, pause, resume\n");
+ console::info("eject, info, next, prev\n");
return;
}
@@ -264,7 +264,7 @@ static void CD_f (void)
{
for (n = 1; n < 100; n++)
if (remap[n] != n)
- Con_Printf(" %u -> %u\n", n, remap[n]);
+ console::info(" %u -> %u\n", n, remap[n]);
return;
}
for (n = 1; n <= ret; n++)
@@ -277,7 +277,7 @@ static void CD_f (void)
CDAudio_GetAudioDiskInfo();
if (!cdValid)
{
- Con_Printf("No CD in player.\n");
+ console::info("No CD in player.\n");
return;
}
}
@@ -329,12 +329,12 @@ static void CD_f (void)
int current_min, current_sec, current_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)
- 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)
- 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)
{
@@ -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->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,
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;
}
@@ -367,7 +367,7 @@ static void CD_f (void)
return;
}
- Con_Printf ("cd: unknown command \"%s\"\n", command);
+ console::info ("cd: unknown command \"%s\"\n", command);
}
static bool CD_GetVolume (void *unused)
@@ -504,12 +504,12 @@ int CDAudio_Init(void)
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;
}
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');
if (sdl_num_drives < 1)
@@ -520,7 +520,7 @@ int CDAudio_Init(void)
const char *userdev = get_cddev_arg(com_argv[dev.value()+1]);
if (!userdev)
{
- Con_Printf("Invalid argument to -cddev\n");
+ console::info("Invalid argument to -cddev\n");
return -1;
}
for (auto i = 0; i < sdl_num_drives; i++)
@@ -533,7 +533,7 @@ int CDAudio_Init(void)
}
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;
}
}
@@ -544,7 +544,7 @@ int CDAudio_Init(void)
cd_handle = SDL_CDOpen(cd_dev);
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());
return -1;
}
@@ -554,11 +554,11 @@ int CDAudio_Init(void)
enabled = true;
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())
{
- Con_Printf("CDAudio_Init: No CD in drive\n");
+ console::info("CDAudio_Init: No CD in drive\n");
cdValid = false;
}
diff --git a/Quake/cl_demo.cpp b/Quake/cl_demo.cpp
index f97411c..f4d26ce 100644
--- a/Quake/cl_demo.cpp
+++ b/Quake/cl_demo.cpp
@@ -174,7 +174,7 @@ int CL_GetMessage (void)
// discard nop keepalive message
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
break;
}
@@ -208,7 +208,7 @@ void CL_Stop_f (void)
if (!cls.demorecording)
{
- Con_Printf ("Not recording a demo.\n");
+ console::info ("Not recording a demo.\n");
return;
}
@@ -221,7 +221,7 @@ void CL_Stop_f (void)
fclose (cls.demofile);
cls.demofile = NULL;
cls.demorecording = false;
- Con_Printf ("Completed demo\n");
+ console::info ("Completed demo\n");
// ericw -- update demo tab-completion list
DemoList_Rebuild ();
@@ -245,7 +245,7 @@ void CL_Record_f (void)
if (cls.demoplayback)
{
- Con_Printf ("Can't record during demo playback\n");
+ console::info ("Can't record during demo playback\n");
return;
}
@@ -255,25 +255,25 @@ void CL_Record_f (void)
c = command::argc();
if (c != 2 && c != 3 && c != 4)
{
- Con_Printf ("record [