[Gtkradiant] IMap branch merged back into trunk / experimental version of
map module
Timothee Besset
gtkradiant@zerowing.idsoftware.com
Sat, 25 Aug 2001 15:11:08 +0200
I merged back the IMap branch into the trunk after finishing a very first
working version of the map module. There is still a lot of issues and
things to deal with, but it passes the test of loading a map and saving it
back.
What are the most significant changes:
- the extraction of the parsing/saving code into a module was a rough
process. Basically the Map_LoadFile and Map_SaveFile functions have been
moved out and compiled in a module. This required to add a whole lot of API
calls from modules into the core (see ibrush.h and ientity.h). It was the
opportunity to experiment with some macros to maintain the same syntax for
common stuff across the core and the modules. For instance you would use
Entity_Alloc in the core or in a module the same way, but in a module it
would be expanded to g_EntityTable.m_pfnEntity_Alloc
What's left to do:
- some outdated code still lives in the core (old functions used for
parsing the map and writing it back)
it can be removed now
- debugging and stabilization. The main issue is memory alloc/free on
win32. See http://www.qeradiant.com/faq/fom-serve/cache/179.html for
details or ask here. Basically, when MSVC breaks in _dbg_free it means you
are trying to free a memory block that was not allocated in the same module
(i.e. .dll or .exe)
Long term todo:
- the way we fill in the function tables in the core is awkward in some
places. The whole scheme to share function tables across modules and fill
them intelligently will be abstracted in a seperate library.
- a new map module can be written to handle .xmap format, the existing map
module will have to be extended to support Q1 and Q2 native file formats
etc. (this work can probably start right now)
TTimo