Commit graph

33 commits

Author SHA1 Message Date
Kp 86709f547b Fix capitalization of PHYSFS_File
Per comment in physfs.h, the spelling PHYSFS_file is deprecated.
Replace all instances with PHYSFS_File.
2016-01-09 16:38:14 +00:00
Kp ed55763603 Remove unused symbols 2015-12-04 03:36:31 +00:00
Kp c942d28197 Use accessor for grs_bitmap::bm_type 2015-07-25 23:10:47 +00:00
Kp 9bfea35e4f Use forward-declaration header for gr.h 2015-07-25 23:10:45 +00:00
Kp f900d4a5ee Remove RAIIdmem::operator pointer
Mac OS X defines uint_fast32_t to unsigned int, causing ambiguous
overloads between RAIIdmem::operator[](std::size_t) and
RAIIdmem::operator[](int).  Adding a disambiguating overload for OS X
breaks Windows.  Remove operator pointer and operator[].  Rely on the
inherited operator[] for indexing.  Require users to call ->get() to
convert to a simple pointer.

First btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
Second btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/43
2015-02-17 03:52:59 +00:00
Kp ff4a0ccd70 Fix RAIIdmem array usage
Some RAIIdmem instances managed a T[], but were declared to manage a T.
2015-01-28 03:42:53 +00:00
Kp d8f699320b Pass iff_parse_bitmap arg by & 2015-01-25 05:32:45 +00:00
Kp 86158f605a Pass convert_rgb15 arg by & 2015-01-25 05:32:44 +00:00
Kp fd7d4fc1be Pass copy_iff_to_grs arg by & 2015-01-25 05:32:44 +00:00
Kp 31450e4843 Pass iff_read_bitmap arg by & 2015-01-25 05:32:44 +00:00
Kp 922a7b7dc9 Pass grs_main_bitmap to iff_read_animbrush 2015-01-25 05:32:44 +00:00
Kp 2798ce8631 Use RAIIdmem for iff_bitmap_header 2015-01-25 05:32:44 +00:00
Kp 34761b66b3 Disable unused IFF code 2015-01-25 05:32:44 +00:00
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp 68d705a85a Use bool conversion to test PHYSFS_File pointer 2015-01-17 18:31:42 +00:00
Kp 5eddc2c197 Make bitmap bm_data const where easy 2014-12-02 03:24:38 +00:00
Kp 2697918223 Pass gr_bm_pixel arg by & 2014-11-30 22:09:22 +00:00
Kp 53ce29e789 Pass gr_init_bitmap arg by & 2014-11-30 22:09:20 +00:00
Kp 594c597621 Pass gr_init_bitmap_data arg by & 2014-11-30 22:09:20 +00:00
Kp c704cc9fc9 Add const void* conversion to various types
Add operator const void*() to prevent accidental use of pointer
comparison.  With the overload present, comparing two objects triggers
an ambiguous conversion to pointer, instead of comparing the pointer
values.
2014-10-12 22:11:28 +00:00
Kp c0023cad51 Fix memory leak writing hoard data 2014-09-27 23:14:50 +00:00
Kp dc511d0a5c Pass array<> to iff_read_animbrush 2014-09-27 23:06:33 +00:00
Kp 481a95a62b Propagate for variables in similar/main/iff.cpp 2014-09-26 02:42:09 +00:00
Kp 4fb1c7236d Remove bogus PHYSFS_readSBE32 return test
PHYSFS_readSBE32 returns 0 or 1, never EOF.
2014-08-26 03:21:55 +00:00
Kp 8d835f8e34 Reduce inclusion of compiler-begin.h 2014-08-24 03:36:35 +00:00
Kp 689c2496d0 Unify IFF palette handling 2014-07-05 03:48:57 +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 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 3b9b5ebfb0 Use RAII to manage function-local heap objects 2013-12-08 19:04:52 +00:00
Kp 6fda1ab889 Move similar/main/iff.c -> similar/main/iff.cpp 2013-12-01 23:32:56 +00:00
Renamed from similar/main/iff.c (Browse further)