Commit graph

32 commits

Author SHA1 Message Date
Kp 8dd1f7c2cf Move texture_list_index into local scope 2015-10-09 02:46:09 +00:00
Kp bc7c469ab2 Use array<> for more globals 2015-08-12 03:11:46 +00:00
Kp 6b6eaef226 Include polyobj.h from robot.h
Swap the inclusion order since all robots are polyobjects, but not all
polyobjects are robots.
2015-04-02 02:36:57 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 68e2168377 Use array<> for bitmap_index arrays 2015-02-14 22:48:30 +00:00
Kp 29236f8668 Use array<> for multi_player_textures 2015-02-14 22:48:29 +00:00
Kp d1f45f85b2 Wrap submodel angles 2015-02-14 22:48:28 +00:00
Kp 2daaacaa26 Move robot_points onto stack 2015-02-05 03:03:50 +00:00
Kp 6b767c3a03 Remove various #include "gr.h" 2015-01-29 04:27:36 +00:00
Kp 6baa2411a1 Remove polyobj.h #include "piggy.h" 2015-01-29 04:27:35 +00:00
Kp 9aa0cf0b89 Pass read_model_guns vector as array & 2014-11-01 03:08:27 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp 44bd07d031 Make polymodel->n_models unsigned 2014-10-26 22:51:27 +00:00
Kp 586f9ec0ee Pass draw_polygon_model arg by const & 2014-10-02 03:02:35 +00:00
Kp 703f60ac3f Fix -Wtype-limits warnings 2014-09-21 21:41:55 +00:00
Kp 83c6b60123 Use array<> for textures_list 2014-08-16 22:18:14 +00:00
Kp 9e619f73d5 Inline polymodel_read_n 2014-07-26 04:18:06 +00:00
Kp 51fdeea84b Use unique_ptr for model_data 2014-07-26 04:01:35 +00:00
Kp ebb1b70350 Fix polymodel writing on x64
Packed writing a structure containing a pointer, but reading it as an
int, is wrong on x64.
2014-07-26 04:01:35 +00:00
Kp 3c6f787e15 Use array<> for Polygon_models 2014-06-20 02:59:53 +00:00
Kp 58350edab7 Convert polymodel_read_n to call polymodel_read 2014-06-20 02:59:53 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02: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 aba6c2dfee Pass glow_values as array<> to retain size information 2013-12-19 03:31:24 +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 1d073475e7 Mark various headers for C linkage 2013-10-20 22:49:11 +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 4577dd3977 Merge branch 'd2x-rebirth/master' into unification/master 2013-07-21 21:34:46 +00: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 e89d4d7765 Move */main/polyobj.h -> common/main/polyobj.h 2013-03-03 01:03:33 +00:00
Renamed from d1x-rebirth/main/polyobj.h (Browse further)