Commit graph

77 commits

Author SHA1 Message Date
Kp 094dfbf3d4 Reduce header inclusions 2013-12-31 03:22:03 +00:00
Kp d7d052857a Use bitmask for hitobj_list
Reduces sizeof(laser_info) from 392 to 80.
2013-12-31 03:22:03 +00:00
Kp cf7a3edee3 Move object::rtype up to improve packing 2013-12-29 04:54:22 +00:00
Kp 745633eabe Use vector to allow rendering unlimited robots 2013-12-29 04:54:08 +00:00
Kp dd583e9c2b Add packed *_rw versions of object subfields 2013-12-29 00:32:58 +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 67ad7811bd Remove unused physics_info::brakes 2013-12-28 22:47:46 +00:00
Kp 8c63ad4d09 Use dedicated type for Objects[] array 2013-12-25 23:49:04 +00:00
Kp 1e8036bd24 Split compiler.h for PCH compatibility 2013-12-21 05:12:38 +00:00
Kp 8c74708ad4 Improve layout of D2 powerup_info 2013-12-18 04:51:46 +00:00
Kp 9776827a33 Make Objects[] a C++ array 2013-12-18 04:51:46 +00:00
Kp 2ce15e5703 Remove unused extern object variables 2013-12-15 01:59:05 +00:00
zico 2e407fa5a8 Removed short packets and added segment number to quaternion structure 2013-12-09 14:00:23 +01:00
Kp c3dd634cce Remove unused flag OF_HARMLESS 2013-12-07 18:41:35 +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 541961a2f7 Make Object_type_names const 2013-11-28 00:27:43 +00:00
Kp 5b0c4b10ac Use accessor for most get/set object->id accesses 2013-10-20 22:49:09 +00:00
Kp 852a4c7f4d Use enum weapon_type_t in more places 2013-10-19 17:06:16 +00:00
Kp 584fc93f34 Move similar/main/automap.c -> similar/main/automap.cpp 2013-10-05 21:35:58 +00:00
Kp b4107e6526 Remove duplicate declarations 2013-10-03 03:11:52 +00:00
Kp c58c4e4d06 Move declarations to headers 2013-10-03 03:11:52 +00:00
Kp e23035e61f Move Last_afterburner_time into laser_info 2013-08-31 17:17:35 +00:00
Kp 16039a3f99 Remove unused extern global hitobj_list 2013-08-27 02:44:09 +00:00
zico bbaa3c21f3 HAMERS! Wait 33ms between each turn of a homing missile projectile, only scale turns if FPS are below 30 2013-08-08 00:29:56 +02:00
Kp a1ba420031 Mark various parameters and variables as const 2013-07-20 23:12:24 +00:00
Kp 8a153d1f63 Allow common headers with private dependencies to be used in common 2013-03-24 20:32:01 +00:00
Kp ea2cd17e70 Move */main/object.h -> common/main/object.h 2013-03-03 01:03:33 +00:00
Renamed from d2x-rebirth/main/object.h (Browse further)