Commit graph

517 commits

Author SHA1 Message Date
Kp 85b95efc70 Fix ugly hack of using -4 for fuelcen reached 2014-01-11 22:24:55 +00:00
Kp ae88d2ed8b Split out guidebot fuelcen search to separate function 2014-01-11 22:23:37 +00:00
Kp 21c9aa6c16 Remove unused ESCORT_GOAL_EXIT2 2014-01-11 22:20:48 +00:00
Kp 1ec7ea4e8f Remove goto logic in detect_escort_goal_accomplished 2014-01-11 22:19:19 +00:00
Kp 729f9c7d90 Check escort goal directly, rather than using goal_seg hack 2014-01-11 22:17:13 +00:00
vobject 9e6ceb7ddf Fix minor leak in mvlcreate.c:main() 2014-01-07 21:52:25 +01:00
Kp 9a5d0f6f09 Use symbolic values for segment/object first/none 2014-01-06 04:17:55 +00:00
Kp 094dfbf3d4 Reduce header inclusions 2013-12-31 03:22:03 +00:00
Kp cf5343db18 Move ai_local into ai_static
Eliminates a global and some pointer math.
2013-12-29 03:59:21 +00:00
Kp 073f00974a Eliminate uses of the typedef struct X { ... } X; pattern
C++ does not require this pattern.

import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
	m = to.match(line)
	if m:
		osn = m.group(1)
		print 'struct %s\n{' % osn
		continue
	if osn:
		m = tc.match(line)
		if m:
			csn = m.group(2)
			if osn == csn:
				print '}%s;' % m.group(1)
				osn = None
				continue
			else:
				osn = None
	print line,
2013-12-28 22:48:07 +00:00
Kp 6e722eb789 Remove more unnecessary sprintf calls in do_escort_menu 2013-12-28 22:10:25 +00:00
Kp ba63c18d9b Remove unnecessary sprintf in do_escort_menu 2013-12-28 22:10:24 +00:00
Kp 38b2dbe639 Move object* -> objnum conversion into init_ai_object 2013-12-28 22:10:24 +00:00
Kp 44f1814b45 Store boss gate/teleport segments in countarray objects 2013-12-22 20:02:42 +00:00
Kp 0d7705cb05 Use visited_segment_bitarray_t for escort create_bfs_list 2013-12-22 05:29:49 +00:00
Kp 4fb6990b6c Make Stolen_items[] a C++ array 2013-12-22 01:53:26 +00:00
Kp 5b5c8a3c6a Remove write-only variable TmapList 2013-12-22 01:16:16 +00:00
Kp b1c5307eb1 Use array for palette_array_t 2013-12-22 00:37:36 +00:00
Kp a3d66a3b37 Add typedef palette_array_t for palette data 2013-12-22 00:05:13 +00:00
Kp 11f7bc51ee Use unsigned count of frames in a vclip 2013-12-22 00:05:13 +00:00
Kp cf49fd0c98 Fix memory leak in audio conversion 2013-12-20 03:24:09 +00:00
Kp 150281ac28 Use thief_message_str instead of thief_message where possible 2013-12-17 04:03:34 +00:00
Kp 21de8bc8f6 Use buddy_message_str instead of buddy_message where possible 2013-12-17 04:03:34 +00:00
Kp 92e8cb7a31 Add type checking to newmenu subfunction userdata 2013-12-15 21:54:38 +00:00
Kp cea46651fc Check type of window handler function 2013-12-15 18:51:26 +00:00
Kp 49f80d5886 Move movie control structure onto RunMovie stack 2013-12-08 19:01:53 +00:00
Kp 3e42f8c382 Move temporary bitmap descriptor onto bm_load_sub stack 2013-12-08 18:25:42 +00:00
Kp 75c229c6bf Normalize con_printf newline usage 2013-12-07 21:13:37 +00:00
Kp d3dadc66e8 Handle ESCORT_GOAL_UNSPECIFIED in say_escort_goal 2013-12-07 19:32:44 +00:00
Kp f1ddfd448a Simplify search for guide bot in escort menu 2013-12-07 19:32:29 +00:00
Kp bb2dafa7be Simplify search for guide bot in mine 2013-12-07 19:31:06 +00:00
Kp 72b6421877 Simplify Buddy_objnum calculation 2013-12-07 19:29:22 +00:00
Kp 8342558e1f Remove unused and broken escort energy center check
detect_escort_goal_accomplished is passed -4 for energy center and an
object index otherwise.  Using the index to search segments is wrong.
Using a side number to search other segments is also wrong.  Delete the
whole check, since it is broken and useless.
2013-12-07 19:25:23 +00:00
Kp a2cec5d71f Switch PHYSFSX_fgets to auto-sized variant where possible 2013-12-07 18:39:19 +00:00
Kp babbe8e9e6 Move */arch/carbon -> common/arch/carbon 2013-12-06 03:58:10 +00:00
Kp 18bf9b94ea Move */arch/cocoa -> common/arch/cocoa 2013-12-06 03:57:18 +00:00
Kp 9de54cfa74 Switch to C++ linkage
import fileinput
guard = 0
cxxguard = '#ifdef __cplusplus\n'
for line in fileinput.input(inplace=True):
	if line == cxxguard:
		guard = 1
		continue
	if guard:
		if line == 'extern "C" {\n':
			guard = 2
			continue
		if line == '}\n':
			guard = 0
			continue
		if guard == 2:
			assert(line == '#endif\n')
			guard = 0
			print cxxguard,
			continue
	print line,
2013-12-06 03:35:32 +00:00
Kp fcf216474b Move */main/collide.c -> similar/main/collide.c 2013-12-06 03:27:30 +00:00
Kp ef4db00e97 Restructure collide.c for merging 2013-12-02 00:22:11 +00:00
Kp 18aea17f9e Move */main/fireball.c -> similar/main/fireball.c 2013-12-02 00:21:31 +00:00
Kp 148dd00eeb Restructure fireball.c for merging 2013-12-02 00:12:36 +00:00
Kp ff9c15b51f Move d2x-rebirth/libmve/mveplay.c -> d2x-rebirth/libmve/mveplay.cpp 2013-12-02 00:11:33 +00:00
Kp 22f3f78ac5 Move d2x-rebirth/libmve/mvelib.c -> d2x-rebirth/libmve/mvelib.cpp 2013-12-01 23:57:00 +00:00
Kp 59e4a8f1ba Move d2x-rebirth/libmve/mve_audio.c -> d2x-rebirth/libmve/mve_audio.cpp 2013-12-01 23:57:00 +00:00
Kp 20a9c83182 Move d2x-rebirth/libmve/decoder8.c -> d2x-rebirth/libmve/decoder8.cpp 2013-12-01 23:57:00 +00:00
Kp f65d7e8d5c Move d2x-rebirth/libmve/decoder16.c -> d2x-rebirth/libmve/decoder16.cpp 2013-12-01 23:57:00 +00:00
Kp 8b50798bf7 Move d2x-rebirth/misc/physfsrwops.c -> d2x-rebirth/misc/physfsrwops.cpp 2013-12-01 23:56:17 +00:00
Kp 1ed0a170a9 Remove unused PHYSFSRWOPS_openWrite 2013-12-01 23:56:17 +00:00
Kp 3c61dc4dec Remove unused PHYSFSRWOPS_openAppend 2013-12-01 23:56:17 +00:00
Kp 8413412426 Remove unused PHYSFSRWOPS_makeRWops 2013-12-01 23:56:17 +00:00