[Warzone-commits] r5665 - /trunk/src/mapgrid.c

2008-07-25 Thread Giel van Schijndel
Author: muggenhor
Date: Fri Jul 25 18:23:09 2008
New Revision: 5665

URL: http://svn.gna.org/viewcvs/warzone?rev=5665view=rev
Log:
Small refactoring and indentation fix to increase readability of gridIntersect

Modified:
trunk/src/mapgrid.c


___
Warzone-commits mailing list
Warzone-commits@gna.org
https://mail.gna.org/listinfo/warzone-commits


[Warzone-commits] r5664 - /trunk/src/mapgrid.c

2008-07-25 Thread Giel van Schijndel
Author: muggenhor
Date: Fri Jul 25 18:10:20 2008
New Revision: 5664

URL: http://svn.gna.org/viewcvs/warzone?rev=5664view=rev
Log:
 * Make gridObjRange const correct
 * Move commented out code into an #if 0 section (instead of /**/ comment)
 * Use function world_coord instead of manual multiplication by TILE_UNITS
 * Use the MAX macro to get the largest of two values (instead of manual 
comparison and selection of values)

Modified:
trunk/src/mapgrid.c


___
Warzone-commits mailing list
Warzone-commits@gna.org
https://mail.gna.org/listinfo/warzone-commits


[Warzone-commits] r5667 - /trunk/lib/framework/strres.c

2008-07-25 Thread Giel van Schijndel
Author: muggenhor
Date: Sat Jul 26 00:14:47 2008
New Revision: 5667

URL: http://svn.gna.org/viewcvs/warzone?rev=5667view=rev
Log:
Change the debug message about a string that couldn't be found from an error 
message into a warning message because it seems to occur quite often

Modified:
trunk/lib/framework/strres.c


___
Warzone-commits mailing list
Warzone-commits@gna.org
https://mail.gna.org/listinfo/warzone-commits


[Warzone-commits] r5666 - in /trunk: lib/framework/strres.c lib/framework/strres.h lib/framework/treap.c lib/framework/treap.h src/scriptobj.c

2008-07-25 Thread Giel van Schijndel
Author: muggenhor
Date: Fri Jul 25 22:27:54 2008
New Revision: 5666

URL: http://svn.gna.org/viewcvs/warzone?rev=5666view=rev
Log:
Further hardcode the treap management code to the string resource system:
 * Don't maintain a secondary linked list of strings in strres.c
 * Add the string that's tracked and it's ID number to the TREAP_NODE structure
 * Let the treap code manage its own memory
 * Have the treap code perform reverse lookups using either the resource string 
(i.e. not the key string) or associated ID number

NOTE: Searching a treap for anything else than the key is O(n), but that's no 
worse than a linked list, which is O(n) as well. Walking a treap has O(log n) 
as memory requirement, whereas walking a linked list has O(1) as memory 
requirement (stack size). So the only disadvantage is that searching the treap 
has a (highly remote!) possibility of stack overflows.

Modified:
trunk/lib/framework/strres.c
trunk/lib/framework/strres.h
trunk/lib/framework/treap.c
trunk/lib/framework/treap.h
trunk/src/scriptobj.c


___
Warzone-commits mailing list
Warzone-commits@gna.org
https://mail.gna.org/listinfo/warzone-commits


[Warzone-commits] r5668 - in /trunk: lib/script/evntsave.c src/scriptobj.c

2008-07-25 Thread Giel van Schijndel
Author: muggenhor
Date: Sat Jul 26 02:55:23 2008
New Revision: 5668

URL: http://svn.gna.org/viewcvs/warzone?rev=5668view=rev
Log:
Make it possible for the ST_GROUP loading code in function scrValDefLoad to 
accept higher savegame event data versions than 3

Modified:
trunk/lib/script/evntsave.c
trunk/src/scriptobj.c


___
Warzone-commits mailing list
Warzone-commits@gna.org
https://mail.gna.org/listinfo/warzone-commits