Commit graph

13 commits

Author SHA1 Message Date
Kp 2c07191681 Pass ntexture_map_lighted_linear arg by const & 2014-11-30 22:09:17 +00:00
Kp 11769c5fc0 Pass draw_tmap* arg as const 2014-11-16 19:14:50 +00:00
Kp 703f60ac3f Fix -Wtype-limits warnings 2014-09-21 21:41:55 +00:00
Kp df3f2fe2fe Simplify ogl/sdl texture mapping 2014-09-02 22:13:15 +00:00
Kp 90300d54d9 Precompute fix_recip table 2014-06-23 04:46:07 +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 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 a881ee455e Remove fix.h 2013-08-08 03:01:48 +00:00
Kp eb65b73b2a Move common/3d/draw.c -> common/3d/draw.cpp 2013-08-03 17:45:22 +00:00
Kp 2f4ffebde6 Add const markers to some texture mapping code 2013-07-27 21:28:53 +00:00
Kp 4187648621 Remove redundant/obsolete declarations 2013-07-21 21:55:00 +00:00
Kp 3becab2461 Move */include/texmap.h -> common/include/texmap.h 2013-03-03 01:03:33 +00:00
Renamed from d2x-rebirth/include/texmap.h (Browse further)