Commit graph

74 commits

Author SHA1 Message Date
Kp 3c20c24ac0 Disable piggy_bitmap_page_out_all 2016-02-20 17:28:11 +00:00
Kp cc18ad2b68 Fix some -Wshadow warnings 2016-02-12 04:02:28 +00:00
Kp b57f08c798 Use partial_const_range 2016-02-12 04:02:28 +00:00
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 842756630f Remove sprintf from piggy.cpp 2016-01-03 20:21:36 +00:00
Kp 4afe97fd71 Remove sprintf from piggy_is_substitutable_bitmap 2016-01-03 20:21:36 +00:00
Kp a91ef00a86 Move DbgNoCompressPigBitmap to CArg 2015-12-24 04:01:28 +00:00
Kp 93f3162a41 Move SysLowMem to CArg 2015-12-24 04:01:26 +00:00
Kp db9fb0ed42 Move more symbols into namespace dcx/dsx 2015-12-22 04:18:50 +00:00
Kp a579f75d05 Move SndDisableSdlMixer to CGameArg 2015-11-24 04:05:36 +00:00
Kp 7034b68357 Manage world time automatically where possible
For all cases where world time nests, use automatic management.  Some
sites disable time in one function and enable it elsewhere.  These are
untouched.
2015-10-09 02:46:09 +00:00
Kp c4a8432081 Remove WORDS_NEED_ALIGNMENT memcpy src cast to const uint8_t*
The cast provokes a warning on systems that require alignment, so remove
it.  memcpy takes const void* input, so the cast is unnecessary.

Reported-by: MattWatt <https://github.com/dxx-rebirth/dxx-rebirth/issues/119>
2015-09-13 21:02:19 +00:00
Kp 3905f1a668 Enable -Wcast-qual 2015-06-13 22:42:21 +00:00
Kp 6615aff8a4 Fix gcc-4.6 piggy build
gcc-4.6 warns about the transition to new for scope rules; later gcc
does not warn.

Replace the loops with range-based for.
2015-05-22 03:33:20 +00:00
Kp cf87ebe54d Remove write-only grs_bitmap::bm_handle 2015-05-09 17:38:59 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 66a70fd373 Prepare for global arrays to be array<> 2015-04-02 02:36:52 +00:00
Kp b940ca0510 Use array<> for bogus_data 2015-02-28 19:36:01 +00:00
Kp 0ad02ad975 Remove unused piggy_game_bitmap_name 2015-02-28 19:36:01 +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 68e2168377 Use array<> for bitmap_index arrays 2015-02-14 22:48:30 +00:00
Kp dc8b88eed4 Convert various loops to range_for 2015-02-14 22:48:27 +00:00
Kp 91cc111295 Provide SndDisableSdlMixer=true if !USE_SDLMIXER
Accept -nosdlmixer as a no-op in !USE_SDLMIXER builds.
2015-02-08 17:43:29 +00:00
Kp 1985f7f295 Pass rle_swap_0_255 arg by & 2015-01-29 04:27:37 +00:00
Kp 27aeb6764d Pass rle_remap arg by & 2015-01-29 04:27:37 +00:00
Kp 912253ab00 Pass gr_bitmap_rle_compress arg by & 2015-01-29 04:27:37 +00:00
Kp b031e449de Make equal_space a preprocessor constant 2015-01-29 04:27:35 +00:00
Kp c2aa2c2e4b Rename space to space_tab
Name space is too simple and causes conflicts elsewhere.
2015-01-29 04:27:35 +00:00
Kp aa2431dc7d Use range_for in load_bitmap_replacements 2015-01-28 03:42:53 +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 fa73ca8a17 Pass gr_remap_bitmap_good arg by & 2015-01-25 05:32:45 +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 a9e9217eea Move piggy_find_bitmap temp onto stack 2015-01-17 18:31:43 +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 5b48c184af Swap order of Mac sound tests
Simplify the code by removing a now-redundant array test.
2015-01-17 18:31:41 +00:00
Kp b6a3735f53 Add convenience d_strnicmp for literal right side 2015-01-12 00:26:03 +00:00
Kp 5eddc2c197 Make bitmap bm_data const where easy 2014-12-02 03:24:38 +00:00
Kp 5dd4ebaa81 Optimize swap_0_255 2014-11-30 22:09:22 +00:00
Kp e5acd8056d Pass gr_set_bitmap_flags arg by & 2014-11-30 22:09:21 +00:00
Kp efa7566821 Pass colormap as array<> 2014-11-30 22:09:21 +00:00
Kp 53ce29e789 Pass gr_init_bitmap arg by & 2014-11-30 22:09:20 +00:00
Kp 0672cdff1b Pass gr_set_bitmap_data grs_bitmap by & 2014-11-30 22:09:20 +00:00
Kp 184f828a91 Move iff_read_animbrush array<unique_ptr<grs_bitmap>> down 2014-10-04 15:02:03 +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 6d5b9e3004 Move MAX_BITMAPS_PER_BRUSH definitions to piggy.h 2014-09-21 21:53:54 +00:00
Kp e8f4b20d1d Use special type for PHYSFSX_fgets 2014-09-07 20:07:20 +00:00
Kp 94550355a8 Use make_unique instead of bare new 2014-08-24 18:28:09 +00:00