Commit Graph
13 Commits
Author SHA1 Message Date
Einar Johan Trøan Sømåen 5ac3ab29c9 WATCHMAKER: Fix uninitialized variable (Coverity)
CID: 1509217
2023-05-09 02:36:27 +02:00
Eugene Sandulenko d834b3bc23 WATCHMAKER: Remove non-portable and unused allocated memory size tracker 2023-04-29 22:54:01 +02:00
Einar Johan Trøan Sømåen 962bac59b7 WATCHMAKER: Optimize file loading by a lot (by not iterating over SearchMan) 2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen ca12fc10ab WATCHMAKER: Move room loading to RoomManager.
This lets us remove the dependency on malloc.h.

The replacement logic is not 100% perfect, as the original logic will
resize arrays to load additional t3dBODY-structs, and those would then
be free-d alongside their parent. This logic is currently missing, so
we will use some more memory.

However, we won't leak, as all loads are tracked by the RoomManager, and
will be freed when closing/restarting the game.
2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen 6ece7cfbc4 WATCHMAKER: Optimize t3dGetFileDate slightly
By avoiding opening the files just to check their existence.
2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen 6caa7b59aa WATCHMAKER: Remove most system includes from engine
Only leaving the malloc.h include, as that needs some further code changes.
2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen 349bf36149 WATCHMAKER: Apply astyle formatting to code base. 2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen 86ba5e2f4b WATCHMAKER: Make t3dGetFileDate just check that the file exists.
Although for now we do so in a very wasteful way.
2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen d52d67482d WATCHMAKER: Drop \n from calls to warning( 2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen 35ee83f68d WATCHMAKER: Fix substream support for handling fastfiles.
(As a temporary solution until we get a Common::Archive subclass
 implemented)
2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen f163edc585 WATCHMAKER: Make openFile return a SharedPtr 2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen 47ee7caf3f WATCHMAKER: Drop ./ prefix before opening files. 2023-04-29 13:01:08 +02:00
Einar Johan Trøan Sømåen ccf209a001 WATCHMAKER: Add all files after initial cleanup. 2023-04-29 13:01:08 +02:00