Commit graph

2263 commits

Author SHA1 Message Date
Kp b8f39b024a Move DoMenu into dsx 2016-03-19 19:08:10 +00:00
Kp 797c8b47b2 Move segment_object_iterator_t into segment_object_range_t 2016-03-19 19:08:10 +00:00
Kp 97219697a7 Make check_warn_object_type work without gcc ({}) extension 2016-03-05 17:26:24 +00:00
zico 36d22a3998 Added more specific comment on why RespawnTimer is necessary for MultiLevelInv_Repopulate() 2016-02-29 16:35:00 +01:00
Kp 95ab6076a4 Move FakingInvul to player_info
Every player can fake invulnerability independently.  In preparation for
host tracking, store FakingInvul as a player property, not a static
global.
2016-02-27 19:02:21 +00:00
zico 901a554e96 New powerup management code: Addeed functions and packet type to keep track of original and current level inventory as well as player and thief inventories. Calling maybe_drop_net_powerup() for all ammo based weapons except Concussion missiles. Limiting maybe_drop_net_powerup() to only spawn items missing from initial level inventory. Added function to let host respawn items that were lost for whatever reason. Expanded maybe_drop_net_powerup() and child functions to be able to drop item based on a random player. Changed back maybe_drop_secondary_weapon_egg() to its original behavior, dropping 3 of each type max. 2016-02-25 14:11:08 +01:00
Kp c3003fbb22 Fix vulcan ammo display
Do not abuse `f2i` to shift an unsigned quantity.  `f2i` is defined to
work on `fix`, which is `int`.
2016-02-20 17:28:11 +00:00
Kp 3c20c24ac0 Disable piggy_bitmap_page_out_all 2016-02-20 17:28:11 +00:00
Kp 1a4290002e Revert partial_const_range for HMP get_event
Fixes: b57f08c798 ("Use partial_const_range")
2016-02-17 03:34:30 +00:00
Kp 08de1bbff0 Remove cv_color
It is only ever set to 0 or copied from other canvases.  Set it to zero
everywhere.
2016-02-12 04:02:28 +00:00
Kp f4e1ebb576 Remove unnecessary gr_setcolor calls 2016-02-12 04:02:28 +00:00
Kp e09a590e6f Pass color to Vline 2016-02-12 04:02:28 +00:00
Kp 76d0e01b6e Pass color to Hline 2016-02-12 04:02:28 +00:00
Kp d08bfc3170 Pass color to g3_draw_sphere 2016-02-12 04:02:28 +00:00
Kp 1b4b6673ee Pass color to g3_draw_poly 2016-02-12 04:02:28 +00:00
Kp a98d553f3e Pass color to must_clip_flat_face 2016-02-12 04:02:28 +00:00
Kp 8c24eaa721 Pass color to g3_draw_line 2016-02-12 04:02:28 +00:00
Kp 6b9a03cf2d Pass color to gr_upoly_tmap 2016-02-12 04:02:28 +00:00
Kp 61821d0b42 Pass color to gr_upoly_tmap_ylr 2016-02-12 04:02:28 +00:00
Kp 36bd39babe Pass color to gr_line 2016-02-12 04:02:28 +00:00
Kp 3c73d44771 Pass color to gr_disk 2016-02-12 04:02:28 +00:00
Kp ecb71ba22e Pass color to gr_ucircle 2016-02-12 04:02:28 +00:00
Kp edd2acc86b Pass color to gr_box 2016-02-12 04:02:28 +00:00
Kp 8135577315 Pass color to gr_ubox12 2016-02-12 04:02:28 +00:00
Kp de08a67321 Pass color to gr_ubox 2016-02-12 04:02:28 +00:00
Kp 23047b1165 Pass color to gr_rect 2016-02-12 04:02:28 +00:00
Kp 35a4736df0 Pass color to gr_urect 2016-02-12 04:02:28 +00:00
Kp f235d6b12b Pass color to gr_pixel 2016-02-12 04:02:28 +00:00
Kp 053901b62b Pass color to gr_uline 2016-02-12 04:02:28 +00:00
Kp 5aeb7559fb Pass color to 2d/line.cpp workers 2016-02-12 04:02:28 +00:00
Kp 659f0fb3ab Pass color to gr_upixel 2016-02-12 04:02:28 +00:00
Kp 0dcfa6fba5 Pass color to ogl_urect 2016-02-12 04:02:28 +00:00
Kp fabe774291 Pass color to gr_scanline 2016-02-12 04:02:28 +00:00
Kp 8e186e93e2 Unify g3_draw_sphere must_clip_line paths 2016-02-12 04:02:28 +00:00
Kp 1c04cb70d9 Change ogl_ubitmapm_cs constant -1 to const white 2016-02-12 04:02:28 +00:00
Kp 2a50243a07 Separate out ogl_ubitmapm_cs color setup 2016-02-12 04:02:28 +00:00
Kp 553b313099 Use vwallptr 2016-02-12 04:02:28 +00:00
Kp 2fd6a425b0 Remove highest_valid 2016-02-12 04:02:28 +00:00
Kp e07c9a5f87 Combine ft_chars, ft_allocdata into one allocation 2016-02-12 04:02:28 +00:00
Kp 230f2dbb19 Make cv_blend_func OGL-specific 2016-02-12 04:02:28 +00:00
Kp b57f08c798 Use partial_const_range 2016-02-12 04:02:28 +00:00
Kp 0f700eec0b Unify g3_draw_sphere calls to gr_disk 2016-02-11 03:25:52 +00:00
Kp 455ab60c4a Switch OGL extension include to <SDL.h>
The new OGL extension code included <SDL/SDL.h>, which works when the
SDL headers are installed in a directory named SDL and that directory is
in a system search directory.  Those conditions usually hold on Linux,
both for /usr/include and /usr/local/include.  However, non-Linux users
sometimes install SDL in other places.  Kreator reports that the OGL
build on OS X failed because his SDL headers were on the search path,
but not in a directory named SDL on the search path.  Switch the
include directive to an unqualified name to match other SDL includes.

Reported-by: kreatordxx <private mail>
Fixes: db267af6f2 ("add basic OpenGL extension handling")
2016-02-11 03:25:52 +00:00
Kp 8a324f8492 Simplify gr_scanline 2016-02-10 03:58:05 +00:00
Kp 443b021db8 Precompute fade_table first level index 2016-02-10 03:58:05 +00:00
Kp e6d5b6f041 Move valptridx get_count/set_count to untyped base 2016-02-10 03:58:05 +00:00
Kp c5f4daa11b Remove write-only trigger field time 2016-02-06 22:12:55 +00:00
Kp 6e20d86941 Move OF_PLAYER_DROPPED into drop_powerup
This fixes an issue where calling drop_powerup with num > 1 only tagged
one powerup as player-dropped.

This also changes powerups dropped by the thief to be "player-dropped",
since, aside from the initial shields/energy, they came from the player
originally.
2016-02-06 22:12:55 +00:00
Kp 1f9e69b0b7 Replace highest_valid(V,offset) with partial_range 2016-02-06 22:12:55 +00:00
Kp 96a183e3d2 Move partial_range __builtin_object_size out of line 2016-02-06 22:12:55 +00:00
Kp 69b7693720 Propagate partial_range size up 2016-02-06 22:12:55 +00:00
Kp 92e6987c2c Improve exact_type comparison operators 2016-02-06 22:12:54 +00:00
Kp 198540d080 Use range_for in bm.cpp 2016-02-06 22:12:54 +00:00
Kp ec025d4e88 Pass common highest_valid to vptr factory 2016-02-06 22:12:54 +00:00
Kp 0101f98905 Use wallnum_t in more places 2016-02-06 22:12:54 +00:00
Kp bb5d1bb7e5 Use valptridx array type for Walls 2016-02-06 22:12:54 +00:00
Kp 72d2844070 Use enum for trigger flags 2016-02-06 22:12:54 +00:00
Kp 74dfa29d31 Convert most Trigger references to valptridx 2016-02-06 22:12:54 +00:00
Kp 4f0cbcffa9 Use valptridx array type for Triggers 2016-02-06 22:12:53 +00:00
Kp 5f33054161 Hide vm_distance safety net from clang
When the safety net is present, clang becomes confused.  Run without a
net and hope that gcc users catch any erroneous conversions.
2016-02-02 03:10:53 +00:00
Kp e283a22709 Use enum class for check_volatile_wall 2016-01-29 04:05:47 +00:00
Kp bc488a8f57 Improve check_volatile_wall 2016-01-29 04:05:47 +00:00
Kp 386a58e3f6 Simplify make_range 2016-01-29 04:05:47 +00:00
Kp 905d935a6b Remove write-only cv_drawmode 2016-01-29 04:05:47 +00:00
Kp ff67afd440 Propagate partial_range up into PHYSFSX_findFiles family 2016-01-29 04:05:47 +00:00
Kp 4abbc28d0f Switch to non-template operator> for vm_distance
clang considers the template form to be ambiguous
2016-01-27 04:01:55 +00:00
Kp 5a1791f7c3 Fix valptridx pch build 2016-01-26 03:45:08 +00:00
Kp bad07b668e Fix misplaced preprocessor directive 2016-01-26 03:45:06 +00:00
Kp 4e29e2625d Move multi_endlevel_poll* lookups to menu creation 2016-01-26 03:45:06 +00:00
Kp 124a2ee09c Move net_udp.cpp specific defines out of header 2016-01-26 03:45:06 +00:00
Kp 8f7d323ec6 Fix clang cvar build
Add format(printf,...) annotation to varargs functions to move format
string checking up one level.
2016-01-26 03:45:06 +00:00
Kp 9e174a0e0e Factor out primary/secondary search/reorder 2016-01-17 17:36:48 +00:00
Kp 677c70c64e Move font filename into grs_font 2016-01-10 21:18:09 +00:00
Kp 5d4fff1534 Combine gr_printf/gr_uprintf into template 2016-01-10 21:18:08 +00:00
Kp 7386094bc3 Rename menu macros to reduce token pasting 2016-01-09 16:38:17 +00:00
Kp eb3fe7acdb Remove sprintf from menubar.cpp 2016-01-09 16:38:16 +00:00
Kp 110d62a748 Remove sprintf from autosave.cpp 2016-01-09 16:38:16 +00:00
Kp dd877f52c2 Remove unused weapon defines 2016-01-09 16:38:15 +00:00
Kp 8e86a3586d Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +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 a3ae630829 Remove default argument for basic_ptridx(index) 2016-01-09 16:38:14 +00:00
Kp 9ceedc96a8 Propagate valptridx requirement up 2016-01-09 16:38:14 +00:00
Kp 0be0475309 Move valptridx array highest to base class 2016-01-09 16:38:14 +00:00
Kp 6489c64598 Use type_traits to manage valptridx const 2016-01-09 16:38:13 +00:00
Kp d6359d0eb7 Use template for object rotation functions 2016-01-09 16:38:13 +00:00
Kp a32d9f01a1 Remove return value truncation in find_object_seg 2016-01-09 16:38:13 +00:00
Kp 98f5afa9f8 Remove default argument for basic_ptr(pointer,array &) 2016-01-09 16:38:13 +00:00
Kp d17b12da31 Remove default argument for basic_ptr(index,array &) 2016-01-09 16:38:12 +00:00
Kp 1cef946a90 Remove default argument for basic_idx(index,array &) 2016-01-09 16:38:12 +00:00
Kp 96898bab0a Block direct changes to Highest_segment_index
Route updates through helper functions.
2016-01-09 16:38:12 +00:00
Kp f48eddeece Block direct changes to Highest_object_index
Route updates through helper functions.
2016-01-09 16:38:12 +00:00
Kp 5a94f8bf4f Fix check_header_includes build 2016-01-09 16:38:12 +00:00
Kp 1f91897f5d Move some game symbols to namespaces 2016-01-09 16:38:12 +00:00
Kp 568f165c28 Shrink sincos_table
For all valid i, sincos_table[i] == sincos_table[i % 256].  Remove
elements [256:] and modify callers to truncate the index.
2016-01-09 16:38:11 +00:00
Kp 0a68a6439e Use ={} to clear rle cache 2016-01-09 16:38:11 +00:00
Kp fe1c0ee59b Remove unnecessary free_text
The text is stored in a global unique_ptr, so running global destructors
will free the text.
2016-01-09 16:38:11 +00:00
Kp 0635dbf108 Pass trigger & 2016-01-09 16:38:11 +00:00
Kp 16c754f3a2 Split key_toggle_repeat paths at compile time
Every caller passes a literal truth value.  Split the implementation by
the truth value.  This saves loading the value before the call and
testing it inside the call.
2016-01-09 16:38:10 +00:00
Kp 410b09a330 Expand macro Player_exploded 2016-01-09 16:38:10 +00:00
Kp 47190be8e9 Fold Player_exploded into Player_dead_state 2016-01-09 16:38:10 +00:00