JeodC / Descent3

Descent 3 by Outrage Entertainment -- Forked.
GNU General Public License v3.0
3 stars 0 forks source link

[Cleanup] mprintf statements are missing \n #2

Closed JeodC closed 3 weeks ago

JeodC commented 1 month ago

Description

This is a good first issue for anyone with reservations to programming. Below is a sample of a d3.log file:

BEGINNING LOG

WinNT system.
FindArg: Did not find [-lowmem] on command line.FindArg: Did not find [-superlowmem] on command line.FindArg: Did not find [-dedicated] on command line.System Memory Status:
Percent of memory in use: 30
Bytes of physical memory : 2147483647
Free physical memory bytes  : 2147483647
Available virtual memory : -1
FindArg: Did not find [-himem] on command line.FindArg: Did not find [-nomultibmp] on command line.FindArg: Did not find [-limitframe] on command line.FindArg: Did not find [-dedicated] on command line.FindArg: Did not find [-framecap] on command line.Using default framecap of 60
FindArg: Did not find [-mlooksens] on command line.FindArg: Did not find [-mousesens] on command line.FindArg: Did not find [+host] on command line.FindArg: Did not find [-useport] on command line.FindArg: Did not find [-pxoport] on command line.FindArg: Did not find [-setdir] on command line.FindArg: Did not find [-useexedir] on command line.FindArg: Found [-windowed] at argument index (1).FindArg: Did not find [-lorestimer] on command line.FindArg: Did not find [-alternatejoy] on command line.FindArg: Did not find [-directinput] on command line.DDIO system initializing...
DI system initializing.
Timer: Hi-Resolution Timer available
Timer system initialized.
Keyboard initialized.
FindArg: Did not find [-vsync] on command line.FindArg: Did not find [-Width] on command line.FindArg: Did not find [-Height] on command line.FindArg: Did not find [-nomotionblur] on command line.FindArg: Did not find [-nosparkles] on command line.Setting up temp directory
FindArg: Did not find [-tempdir] on command line.Temp Directory Set To: "S:\Descent 3\custom\cache"
Lock file created in temp dir
Removing any temp files left over from last execution
FindArg: Did not find [-filter] on command line.FindArg: Did not find [-oldmethod] on command line.Network is down...
table filename = Table.gam
FindArg: Did not find [-mission] on command line.OSIRIS: Initializing module manager
OSIRIS: Extracting Scripts From Hog
Search started
Done Extracting
OSIRIS: Extracting Scripts From Hog
Search started
    Found: AIGame.dll...Extracting...Done
Done Extracting
OSIRIS: Extracting Scripts From Hog
Search started
    Found: AIGame.dll...Extracting...Done
    Found: CanyonsCTF.dll...Extracting...Done
Done Extracting
OSIRIS: Extracting Scripts From Hog
Search started
    Found: AIGame.dll...Extracting...Done
    Found: clutter.dll...Extracting...Done
    Found: generic.dll...Extracting...Done
    Found: HalfPipe.dll...Extracting...Done
    Found: InfernalBolt.dll...Extracting...Done
    Found: Paranoia.dll...Extracting...Done
    Found: Polaris.dll...Extracting...Done
    Found: Quadsomniac.dll...Extracting...Done
Done Extracting
895 strings loaded from the string tables
Initializing texture system.
Font <briefing.fnt> height = 10
Font <bbriefing.fnt> height = 18
Font <newmenu.fnt> height = 19
Font <smallui.fnt> height = 11
Font <largeui.fnt> height = 18
Font <lohud.fnt> height = 10
Initting dynamic lighting.
Building specular tables.
In InitMission()
FindArg: Did not find [-nonetwork] on command line.FindArg: Did not find [-netdebug] on command line.FindArg: Did not find [-useip] on command line.FindArg: Did not find [+ip] on command line.Application not started from a lobby.
Command line: "S:\Descent 3\Descent3.exe" -WINDOWED -LOGFILE

All of these are mprintf statements, for example... https://github.com/DescentDevelopers/Descent3/blob/cffeb20a3e09d8c869134a465555374b7a9b40ae/Descent3/args.cpp#L74

Many of these statements do not have a \n at the end of their string, causing them to lump together. Sometimes this is intentional, like a continuation of a sentence. Other times, though, like below, it's just a difficult-to-read mess.

FindArg: Did not find [-himem] on command line.FindArg: Did not find [-nomultibmp] on command line.FindArg: Did not find [-limitframe] on command line.FindArg: Did not find [-dedicated] on command line.FindArg: Did not find [-framecap] on command line.Using default framecap of 60
FindArg: Did not find [-mlooksens] on command line.FindArg: Did not find [-mousesens] on command line.FindArg: Did not find [+host] on command line.FindArg: Did not find [-useport] on command line.FindArg: Did not find [-pxoport] on command line.FindArg: Did not find [-setdir] on command line.FindArg: Did not find [-useexedir] on command line.FindArg: Found [-windowed] at argument index (1).FindArg: Did not find [-lorestimer] on command line.FindArg: Did not find [-alternatejoy] on command line.FindArg: Did not find [-directinput] on command line.DDIO system initializing...

The unintentional lumps should be corrected by adding a \n to the end of the string like so:

mprintf((0, "GatherArgs: Arg (%d) is [%s].\n", q, GameArgs[q]));

This does not all need to be done in one sitting. There's a lot to sift through.