1 2005-06-06 Rob Savoye <rob@bertha.welcomehome.org>
3 * gameswf/gameswf_test_ogl.cpp (runThread): New SDL_Thread to
4 handle looking for network data, and if there is data, push an SDL
5 User Event on the event queue.
6 (main): Add new -e option to enable a threaded event based main
7 loop or the existing polling one. Pass SDL_INIT_EVENTTHREAD to
8 SDL_Init() on all platforms but win32.
9 (runThread): Use the global variable to pass to select().
10 * gameswf/gameswf_xmlsocket.{h,cpp}: Add checkSockets(), which
11 checks to see if there is data waiting in a socket. Add a temporay
12 global variable to pass the file descriptor from ::connect() up to
14 * gameswf/gameswf_xml.{h,cpp} (memadjust): Adjust a byte count to
15 be aligned on the proper boundary. (word size for now) Use only
16 adjusted memory for all dynamic memory allocation sizes.
17 * autogen.h: Remove bogus warning message and make it say
18 something intelligent.
20 2005-05-28 Rob Savoye <rob@bertha.welcomehome.org>
22 * gameswf/gameswf_test_ogl.cpp (main): Move the setting of the LOD
23 BIAS up a few lines, as to be effective, it has to be executed
24 before initializing the video mode for the I810. Otherwise it core
27 2005-05-26 Rob Savoye <rob@darkstar.welcomehome.org>
29 * gameswf/gameswf_test_ogl.cpp (main): Initialize the LOD BIAS
30 here, rather than in apply(). This gets rid of the global
32 * gameswf/gameswf_test_ogl.cpp (main): Don't initialize the
33 log_callback unless verbose is specified. This improves the
34 performance when not using -v, since the display function returns
37 2005-05-25 Rob Savoye <rob@bertha.welcomehome.org>
39 * macros/png.m4, sdl.m4: tweak so help output lines up.
40 * configure.ac: Add enable options for DOM or xmlReader parsers,
41 with DOM being the default.
42 * configure, config.h.in, aclocal.m4: Regenerated.
44 2005-05-23 Rob Savoye <rob@bertha.welcomehome.org>
46 * gameswf/gameswf_xmlsocket.cpp(anydata): Use our own environment
47 when calling sub functions, and then be like George Bush, and nuke
49 * gameswf/gameswf_xml.cpp: Enable the DOM parser by default, as
50 the new xmlReader one has problems with gcc 3.x.
52 2005-05-21 Rob Savoye <rob@bertha.welcomehome.org>
54 * gameswf/gameswf_xml.cpp (load): Use xmlReader API instead of
55 lower-level DOM API to save memory.
57 2005-05-20 Rob Savoye <rob@bertha.welcomehome.org>
59 * Makefile.in, base/Makefile.in, geometry/Makefile.in,
60 gameswf/Makefile.in: Add a "mudflap" target that rebuilds
61 everything with mudflap enabled. Mudflap is the new GCC memory
62 checker like Purify. Slow but thorough...
63 * gameswf/gameswf_xml.cpp: Use DEBUG_MEMORY_ALLOCATION to
64 optionally display memory allocation information. Set _name and
65 _value to zero when instantiating. Explicitly delete _name and
66 _value when destructing. Use char * rather than as_value or
67 tu_string for an XMLNode name and value so we can track every
69 * gameswf/gameswf_xml.h: Use char * rather than as_value or
70 tu_string for an XMLNode name and value so we can track every byte
71 better. Use DEBUG_MEMORY_ALLOCATION to optionally display memory
72 allocation information.
73 * gameswf/gameswf_xmlsocket.cpp: Don't pass an array to anydata()
74 anymore. Delete messages in a batch so we can track memory
76 * gameswf/gameswf_xmlsocket.h: Don't pass an array to anydata()
78 * base/tu_config.h: Don't include dmalloc.h, it conflicts with the
79 one included from glib.h, which we inherit via libxml2. Since
80 glib.h and gameswf use the same constant for enabling this
81 feature, we get this support by default.
82 * base/utility.cpp (dump_memory_stats): Renable.
84 2005-05-19 Rob Savoye <rob@darkstar.welcomehome.org>
86 * base/utility.cpp: Use _win32 rather than 0 for #ifdef.
87 * compatibility_include.h: Optionally include config.h.
88 * base/tu_config.h: Don't include config.h here.
90 2005-05-16 Rob Savoye <rob@bertha.welcomehome.org>
92 * base/utility.cpp (dump_memory_stats): Disable for now by exiting
94 * gameswf/gameswf_xmlsocket.h: Add char ** parameter to anydata().
95 * gameswf/gameswf_xmlsocket.cpp: Add char ** parameter to
96 anydata(). Call malloc_trim() to release memory back to the
97 system so we don't eat up all the memory.
98 (anydata) Use char * rather than tu_strings for the buffering so
99 we can track every byte. Parse looking for the newline delimiter
100 between messages. Setup single messages faster than processing
102 * gameswf/gameswf_xml.cpp: Delete name and value too. Use char *
103 rather than tu_strings for the attribute name and value.
105 * base/utility.{cpp,h}: Add dump_memory_stats() to dump the
106 internal statistics from malloc so we can track memory allocations
109 2005-05-14 Rob Savoye <rob@bertha.welcomehome.org>
111 * gameswf/gameswf_action.cpp: Print the address of the object for
112 get_variable and get_member so we can trace through the object
114 * geometry/Makefile.in: Add -I.. to INCLUDES so config.h can be
116 * gameswf/gameswf_xml.cpp: Call xmlCleanupParser() after freeing
118 * base/{container.h, image.cpp, ogl.cpp, tu_file.cpp}: Add support
119 for optionally using dmalloc for debugging memory problems.
120 * gameswf/{gameswf_action.cpp, gameswf_font.cpp,
121 gameswf_fontlib.cpp, gameswf_impl.cpp, gameswf_movie.cpp,
122 gameswf_string.cpp, gameswf_xml.cpp, gameswf_xmlsocket.cpp}: Add
123 support for optionally using dmalloc for debugging memory
125 * geometry/bsp.cpp: Add support for optionally using dmalloc for
126 debugging memory problems.
127 * configure.ac: Add --enable-dmalloc option. Display all config
129 * configure, config.h.in: Regenerated.
130 * gameswf/Makefile.in: Link in libdmallocxx if --enable-dmalloc is
133 2005-05-09 Rob Savoye <rob@bertha.welcomehome.org>
135 * gameswf_xmlsocket.h: Pass an array to anydata instead of a
137 * gameswf_xmlsocket.cpp: Pass an array to anydata instead of a
139 * gameswf/gameswf_timers.cpp, gameswf_timers.h,
140 gameswf_xmlsocket.cpp, gameswf_xmlsocket.h, gameswf_movie.cpp:
141 Use fn structure fields instead of a slew of local variables.
142 * gameswf/gameswf_xml.cpp: Delete all the attributes and child
145 2005-05-09 Rob Savoye <rob@wharfrat.welcomehome.org>
147 * gameswf/gameswf_action.cpp: Use xml_new instead of
148 xmlsocket_xml_new for new XML objects.
149 * gameswf/gameswf_timers.cpp, gameswf_timers.h,
150 gameswf_xmlsocket.cpp, gameswf_xmlsocket.h, gameswf_movie.cpp:
151 Extract args from fn structure. Call AS functions the new way with
154 2005-05-08 Rob Savoye <rob@bertha.welcomehome.org>
156 * gameswf/gameswf_movie.cpp (as_value): Cast wstr to be either 32
157 or 16 bit based on the size of wchar_t.
159 2005-05-08 Rob Savoye <rob@darkstar.welcomehome.org>
161 * gameswf/gameswf_action.h: Cast the wide character to a uint32 so
163 * gameswf/gameswf_xml.cpp (setupFrame): Don't set members for
164 firstChild or childNodes, these are handled differently now.
165 * gameswf/gameswf_xml.h: Add virtual overload of get_member() to
166 the xml_as_object and xmlnode_as_object to return firstChild and
167 childNodes without creating a circular dependancy.
170 2005-05-05 Rob Savoye <rob@bertha.welcomehome.org>
172 * gameswf/gameswf_timers.cpp (gameswf): If _start is trashed for
173 some reason, assuming it's expired and then reset it. This should
174 eventually be fixed once I figure out what's causing the
175 problem. It takes about an hour to occur.
176 * base/tu_timer.cpp (get_profile_ticks): Don't need the tz
177 variable, as it's not used with gettimeofday() on Linux anymore.
180 2005-05-05 Rob Savoye <rob@darkstar.welcomehome.org>
182 * gameswf_string.cpp (string_new): Don't recreate the String
184 * gameswf/gameswf_action.cpp (execute): Clear the members of an
185 object on the stack when the 'with' stack frame returns to a
188 2005-05-05 Rob Savoye <rob@darkstar.welcomehome.org>
190 * gameswf/gameswf_render_handler_ogl.cpp (render_handler): Check
191 in patch #1195922, making the workaround for the i810 OpenGL
192 problem configurable.
193 * configure.ac: Add -enable-i810-lod-bias to make workaround
194 optional. Add descriptive text to AC_DEFINE(HAVE_WINSOCK)
195 * configure, config.h.in: Regenerated.
197 2005-05-04 Rob Savoye <rob@blackpeter.welcomehome.org>
199 * gameswf/gameswf_render_handler_ogl.cpp (render_handler): Added
200 and slightly changed patch #1194680. This code now only gets
201 executed when using a non default value for the LOD BIAS.
203 2005-05-01 Rob Savoye <rob@bertha.welcomehome.org>
205 * gameswf/gameswf_textformat.cpp (textformat_setformat): Set the
206 flags if the corresponding members are set.
208 * configure.ac: Add patch from sourceforge (#1186726) for checking
209 xml option differently.
210 * aclocal.m4, configure: Regenerated.
211 * gameswf/gameswf_test_ogl.cpp: Add additional value to "-r" option
212 to optionally disable sound. From same sourceforge patch
215 2005-04-30 Rob Savoye <rob@bertha.welcomehome.org>
217 * base/container.h: Add support to tu_string for += char.
218 Added new methods to tu_string, utf8_from_char(), utf8_to_upper(),
220 * base/container.cpp: Add functions for utf8_from_char(),
221 utf8_to_upper(), utf8_to_lower().
222 * gameswf/gameswf_action.h: Add operator!= to as_value.
223 * gameswf/gameswf_action.cpp: Add operator!= to as_value. Don't
224 flag a "new String error", cause it's being used like this
225 "String.fromCharCode(67)" without needing an object to be created
227 * gameswf/gameswf_string.h: Add support for fromCharCode,
228 toUpperCase, toLowerCase.
229 * gameswf/gameswf_string.cpp: Make string_new return a
230 tu_string_as_object after attaching fromCharCode and charCodeAt
232 * gameswf/gameswf_action.cpp: Add fromCharCode, toUpperCase,
233 toLowerCase, to builtin string.
234 * gameswf/gameswf_textformat.cpp: Initialize all data in
235 constructor to -1 so we can tell if it's been set or not
236 later. Add getTextFormat() support.
237 * gameswf/gameswf_textformat.h: Make several values that were an
239 * gameswf/gameswf_xmlsocket.cpp: Add a xmlsocket_xml_new so the
240 socket class has a handle on the XML messages it's processing.
242 * gameswf/gameswf_render_handler_ogl.cpp (apply): Set the Texture
244 * gameswf/gameswf_test_ogl.cpp (main): Add -ml option to
245 set the Texture LOD Bias. "-ml -1.0" works good for small fonts.
247 2005-04-29 Rob Savoye <rob@bertha.welcomehome.org>
249 * gameswf/gameswf_test_ogl.cpp (main): Add -mi and -ma options to
250 set the minimum and maximum LOD Bias. "-mi -2 -ma 2" seems to work
252 * gameswf/gameswf_render_handler_ogl.cpp (apply): Set the LOD Bias.
254 * gameswf/gameswf_impl.cpp (get_topmost_mouse_entity): Don't
255 return a character unless the parent is visible.
257 2005-04-26 Rob Savoye <rob@bertha.welcomehome.org>
259 * gameswf/gameswf_textformat.cpp: Add setTextFormat as a variable
260 when making a new TextFormat object.
262 2005-04-19 Rob Savoye <rob@bertha.welcomehome.org>
264 * gameswf/gameswf_movie.cpp: Use different headers on win32.
265 * gameswf/gameswf_xmlsocket.cpp: Use different headers on win32
266 for tcp/ip networking. Also define MAXHOSTNAMELEN if if doesn't
267 exist, don't use fcntl(), and use SHUT_BOTH for shutdown() on
269 * configure.ac: Set HAVE_WINSOCK if the platform is win23.
270 * configure: Regenerated.
271 * gameswf/Makefile: Add optional libxml support. Update
272 dependencies to not have system paths.
273 * config: Add optional libxml defines.
275 2005-04-16 Rob Savoye <rob@bertha.welcomehome.org>
277 * gameswf/gameswf_xml.cpp (extractNode): New recursive
278 version. Faster, and uses less memory.
279 (setupFrame) New recursive version. Faster, and uses less memory.
280 * gameswf_impl.cpp: Move the definition of bitmap_character to
282 * gameswf_movie.cpp (loadclip): Various hacks trying to replace a
283 character with a bitmap defined by a jpeg. None of these works
285 * gameswf_xml.h: Add conditional debug print statements as
286 constructor/destructors so we can track memory allocation.
287 * gameswf_xmlsocket.cpp (XMLSocket::anydata): Return the returned
289 * kd_tree_dynamic.cpp: Comment out a few variable definitions that
290 aren't used cause GCC 4.1 complains.
292 2005-04-14 Rob Savoye <rob@bertha.welcomehome.org>
294 * base/utility.h: Tweak definitions of _max and _min to not
295 produce errors with a more recent GCC because the "<?" operator
296 has been depreciated.
298 2005-04-10 Rob Savoye <rob@bertha.welcomehome.org>
300 * gameswf/gameswf_test_ogl.cpp (main): Add -d option to supply a
301 different value for SDL_Delay() in the main loop.
303 2005-04-08 Rob Savoye <rob@bertha.welcomehome.org>
305 * gameswf/gameswf_xml.cpp (setupStackFrames): delete the XML
306 parsed data after setting up the stack frames.
307 * gameswf/gameswf_movie.cpp: Make sure the files exist, and is a
308 valid JPEG before trying to read it.
310 2005-04-06 Rob Savoye <rob@bertha.welcomehome.org>
312 * gameswf/gameswf_movie.cpp: New data structure to hold MCL data
315 2005-04-03 Rob Savoye <rob@bertha.welcomehome.org>
317 * gameswf/gameswf_xml.cpp (setupStackFrames): Grab nodeValue for
318 all elements if there is any.
319 * gameswf/gameswf_action.cpp (MATH_WRAP_FUNC): Return an
321 (call_method) Needs to check if the method is a NUMBER.
322 * gameswf/gameswf_xml.cpp (extractNode): Add some filtering of
323 bogus data content (just a CR) that seems to be creeping in from
324 libxml. This gets rid of the extraneous "undefined" fields. Free
325 the pointer after calling xmlParseFile.
327 * gameswf/gameswf_xml.cpp: Free xml doc pointer after parsing.
329 2005-04-02 Rob Savoye <rob@bertha.welcomehome.org>
331 * configure.ac: Add --disable-xml option to not look for XML or
332 use the XML and XMLSocket AS objects. The default is to support
333 XML, since it's part of SWF v6.
334 * configure: Regenerated.
335 * gameswf/gameswf_test_ogl.cpp (main): Ad "-c" option to turn off
336 SDL Parachutes, because sometimes we want the core file for
338 * gameswf/gameswf_action.cpp: Remove object creation code for new
340 * gameswf/gameswf_xml.cpp (xml_new): Move code from
341 gameswf_action.cpp to here so we create new objects correctly using
343 * gameswf/gameswf_string.cpp (string_new): Move code from
344 gameswf_action.cpp to here so we create new objects correctly using
346 * gameswf/gameswf_movie.cpp (moviecliploader_new): Move code from
347 gameswf_action.cpp to here so we create new objects correctly using
349 * gameswf/gameswf_xmlsocket.cpp (xmlsocket_new): Move code from
350 gameswf_action.cpp to here so we create new objects correctly using
352 * gameswf/gameswf_*: Don't use __PRETTY_FUNCTION__, it's GCC
353 specific. Instead use __FUNCTION__, which supported with VC++..
355 2005-04-01 Rob Savoye <rob@bertha.welcomehome.org>
357 * gameswf/gameswf_test_ogl.cpp (key_event): Add trapping ENTER and
358 ESCAPE too. These supposedly get turned on by an
359 fscommand('trapallkeys', true) somehow.
360 * gameswf/gameswf_xml.cpp (xml_load): Don't try to open an XML
361 disk file that doesn't exist, or the path is wrong.
362 * gameswf/gameswf_xml.cpp: Fix attribute parsing so it works for
363 all levels of the XML data.
365 2005-03-28 Rob Savoye <rob@bertha.welcomehome.org>
367 * gameswf/gameswf_xml.cpp: Process XML messages one level
368 deeper. Properly setup stack so firstChild.firstChild.nodeValue
371 2005-03-26 Rob Savoye <rob@bertha.welcomehome.org>
373 * gameswf/gameswf_xmlsocket.cpp (anydata): Read as much data as
374 there is on the socket. Break up the data into seperate messages,
375 and store them in a queue.
376 (xmlsocket_event_ondata): Process all the messages in the message
377 queue before reading more messages. Call onData callback on all
378 messages without returning.
380 2005-03-25 Rob Savoye <rob@bertha.welcomehome.org>
382 * gameswf/Makefile.in: Add optional pthreads support. (currently
384 * gameswf/gameswf_xmlsocket.h: Add prototype for pthread entry
385 point. (currently unused)
386 * gameswf/gameswf_xmlsocket.cpp: Add pthread entry point that
387 reads the socket. (currently unused)
389 * gameswf/gameswf_impl.cpp: Check for socket data every time
390 through the advance loop. Don't use an interupt handler, it's
391 orders of magnitude too slow.
392 * gameswf/gameswf_xmlsocket.cpp: Reduce by a huge amount the
396 2005-03-24 Rob Savoye <rob@bertha.welcomehome.org>
398 * gameswf/gameswf_xml.cpp (extractNode): New method to recursively
399 parse XML data. Make _nodes a pointer.
400 * gameswf/gameswf_xmlsocket.cpp: Add a NULL when sending XML
401 messages, and don't strip off the NULL when reading XML messages.
402 * gameswf/gameswf_textfield.{cpp,h}: Remove as unnecessary.
403 * gameswf/Makefile.in: Don't build gameswf_textfield, we don't
405 * gameswf/gameswf_textformat.cpp: Add minimal support for all
406 forms of setTextFormat.
408 2005-03-23 Rob Savoye <rob@bertha.welcomehome.org>
410 * configure.ac: Don't try to configure the empty testsuite
412 * configure: Regenerated.
414 2005-03-20 Rob Savoye <rob@bertha.welcomehome.org>
416 * gameswf/gameswf_movie.{cpp,h}: Add gameswf namespace.
417 * gameswf/gameswf_string.{cpp,h}: Add gameswf namespace.
418 * gameswf/gameswf_textfield.{cpp,h}: Add gameswf namespace.
419 * gameswf/gameswf_textformat.{cpp,h}: Add gameswf namespace.
420 Rename TextFormat to text_format.
421 * gameswf/gameswf_timers.cpp (Timer::start): Don't cast the double
423 * macros/libXML.m4: Define HAVE_LIBXML if libxml2 is found.
424 * configure.ac: Add AM_CONFIG_HEADER. Don't both to link to my
426 * config.h.in: Add autoheader generated config file.
427 * config.mk: Add DEFS to CFLAGS so HAVE_CONFIG_H gets passed to
429 * base/Makefile.in: Add dependencies.
430 * aclocal.m4: Regenerated using aclocal
431 * autogen.sh: Regenerate aclocal.m4, config.h.in, and configure
432 without having to understand the GNU auto tools.
433 * tu_opengl_includes.h: Don't redefine APIENTRY if it exists.
434 * gameswf_action.cpp: Include config.h if HAVE_CONFIG_H is
435 defined. Only include gameswf_xml.h and gameswf_xmlsocket.h if
436 HAVE_LIBXML is defined in config.h. Eliminate compiler
437 warnings. Use HAVE_LIBXML instead of TU_CONFIG_LINK_TO_LIBXML.
438 * gameswf_xml.cpp: Include config.h if HAVE_CONFIG_H is
439 defined. Don't use any of this code unless HAVE_LIBXML is defined
440 in config.h. Add gameswf namespace. Use HAVE_LIBXML instead of
441 TU_CONFIG_LINK_TO_LIBXML.
442 * gameswf_xml.h: Include config.h if HAVE_CONFIG_H is
443 defined. Don't use any of this code unless HAVE_LIBXML is defined
444 in config.h. Use HAVE_LIBXML instead of TU_CONFIG_LINK_TO_LIBXML.
445 * gameswf_xmlsocket.cpp: Include config.h if HAVE_CONFIG_H is
446 defined. Don't use any of this code unless HAVE_LIBXML is defined
447 in config.h. Add gameswf namespace. Use HAVE_LIBXML instead of
448 TU_CONFIG_LINK_TO_LIBXML.
449 * gameswf_xmlsocket.h: Include config.h if HAVE_CONFIG_H is
450 defined. Don't use any of this code unless HAVE_LIBXML is defined
451 in config.h. Use HAVE_LIBXML instead of TU_CONFIG_LINK_TO_LIBXML.
453 2005-03-19 Rob Savoye <rob@bertha.welcomehome.org>
455 * gameswf/Makefile.in: Update dependencies for new files.
457 * gameswf/gameswf_action.cpp: Add a few debugging statements so we
458 can track Text objects by their address. Add initial support for
459 the TextField::_visible and TextField::_width properties. Add
460 callback for XML::loaded().
461 * gameswf/gameswf_impl.cpp: Remove interval timer from array on a
462 clearInterval() command. Use our own stack when calling AS
463 functions from do_something() so they have the local variables
464 propogated into this call frame.
465 * gameswf/gameswf_timers.cpp: Propogate local variables into the
466 child function's stack frame since it's supposed to inherit these
467 values. There has got to be a better way to do this...
468 * gameswf/gameswf_xmlsocket.cpp: Don't pass additional arguments
471 2005-03-17 Rob Savoye <rob@bertha.welcomehome.org>
473 * macros/libXML.m4: New. Look for libxml2 directories.
474 * base/container.{cpp,h}: memset buffer so tu_string prints better in
476 * base/triangulate_impl.h: Use compiler_assert(0) rather than
478 * base/tu_timer.cpp: Add Linux imnplementations of get_profile_ticks()
479 and profile_ticks_to_seconds().
480 * configure.ac: Look for XML2 directories. Configure a Makefile in
481 the testsuite directory.
482 * configure: regenerate.
483 * gameswf/Makefile: Add new files, gameswf_xml, gameswf_movie,
484 gameswf_xmlsocket, gameswf_string.
485 * gameswf/gameswf_xml.{cpp,h}: New files for XML ActionScript support.
486 * gameswf/gameswf_xmlsocket.{cpp,h}: New files for XMLSocket
487 ActionScript support.
488 * gameswf/gameswf_timers.{cpp,h}: New files for setInterval
489 ActionScript support.
490 * gameswf/gameswf_movie.{cpp,h}: New files for MovieClipLoader
491 ActionScript support.
492 * gameswf/gameswf_string.{cpp,h}: New files for a more complete
493 String ActionScript implementation.
494 * gameswf/gameswf_textfield.{cpp,h}: New files for TextField
495 ActionScript support.
496 * gameswf/gameswf_textformat.{cpp,h}: New files for TextFormat
497 ActionScript support.
498 * gameswf.h: Add add_interval_timer() and void clear_interval_timer().
499 * gameswf/gameswf_action.cpp: Include gameswf_string.h,
500 gameswf_xml.h, gameswf_xmlsocket.h, gameswf_movie.h,
501 gameswf_timers.h, gameswf_textformat.h, gameswf_textfield.h. Add
502 support for new ActionScripts, XML, XMLSocket, TextField,
503 TextFormat, and MovieClipLoader.
504 * gameswf/gameswf_action.h: Move event_id to here.
505 * gameswf/gameswf_impl.{cpp,h}: Include gameswf_timers.h. Add support