Kp
56122687d1
Delegate newmenu subfunction handling into virtual function
2020-12-19 16:13:26 +00:00
Kp
d4cf9943c5
Make newmenu subfunction const
2020-12-19 16:13:26 +00:00
Kp
1032462988
Make newmenu max_displayable const
2020-12-19 16:13:26 +00:00
Kp
de5c300724
Make newmenu_layout::all_text const
2020-12-19 16:13:26 +00:00
Kp
530f396b2e
Make newmenu::tiny_mode_flag, tabs_flag, max_on_menu const
2020-12-19 16:13:26 +00:00
Kp
200952c3d9
Add type-specific tag wrappers for newmenu calls
...
Make the compiler check that title, subtitle, and filename are passed in
the right places.
2020-12-19 16:13:26 +00:00
Kp
53566b7673
Move struct newmenu to newmenu.h
2020-12-19 16:13:26 +00:00
Kp
017c4ce933
Restore buffering on PCX loads
...
Commit 3114874713
delegated PCX loading to
SDL_image, and as an incidental change, switched to using an unbuffered
PHYSFS file. On Linux, this has no perceptible difference in
performance. On Windows, the unbuffered accesses cause enough of a
performance problem for users to notice and report an issue. Add a new
helper to create an SDL_RWops around a buffered file, and use that for
PCX loading.
Fixes: 3114874713
("Delegate PCX loading to SDL_image")
Reported-by: Q3BFG10K <https://github.com/dxx-rebirth/dxx-rebirth/issues/549 >
Reported-by: aybe <https://github.com/dxx-rebirth/dxx-rebirth/issues/555 >
Analyzed-by: arbruijn <https://github.com/dxx-rebirth/dxx-rebirth/issues/555#issuecomment-735442076 >
2020-11-30 05:12:00 +00:00
Kp
a028ea14ae
Restore format(printf) attribute for powerup_basic
...
Kreeblah reports that clang now warns for powerup.cpp due to a missing
__attribute_format_printf. This was incorrectly dropped in
ffb653c0b8
. gcc did not warn, but clang
now warns. Add back the attribute.
Fixes: ffb653c0b8
("Pass control_info & to various functions")
Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/pull/547 >
2020-10-27 04:27:55 +00:00
Kp
ddcf8c1798
Remove support for show_order_form
...
The original way to order the full version is defunct. Remove the code
that showed that page.
2020-10-22 02:26:17 +00:00
Kp
52e4d6f103
Remove printf checking on vnm_messagebox_aN
...
It is always invoked with format arguments.
2020-10-22 02:26:17 +00:00
Kp
e7cd8bedec
Remove obsolete embed_window_pointer_t
2020-10-22 02:26:16 +00:00
Kp
d2c5b4d64a
Make listbox inherit from window
2020-10-22 02:26:16 +00:00
Kp
09531047b9
Use uint8_t for allow_abort_flag
...
It is only ever 0 or 1.
2020-10-22 02:26:16 +00:00
Kp
ffb653c0b8
Pass control_info & to various functions
...
Switch from a direct global reference to passing control_info& as a
parameter.
2020-10-12 03:28:26 +00:00
Kp
7e73ee2c78
Pass newmenu& to newmenu_create_structure
2020-10-12 03:28:26 +00:00
Kp
2ccfcb64d8
Use named enum for newmenu TinyMode
2020-10-12 03:28:26 +00:00
Kp
96f5428378
Use named enum for newmenu TabsFlag
2020-10-12 03:28:26 +00:00
Kp
a6abf76d0a
Use enum class for index into ObjBitmaps
2020-10-07 03:59:14 +00:00
Kp
24497fa085
Use enum class for bmread mode selector
2020-10-07 03:59:14 +00:00
Kp
c482d01be5
Move some fvi types to namespaces
2020-10-01 03:25:27 +00:00
Kp
b136994551
Move valptridx<segment> to dcx
...
segment is now dcx, so move the valptridx wrapper.
2020-10-01 03:25:27 +00:00
Kp
e6126b800f
Reorder endlevel definitions to split by dcx/dsx
2020-10-01 03:25:27 +00:00
Kp
e068c685f4
Make scores_menu inherit from window
2020-09-21 03:18:12 +00:00
Kp
08701ca190
Store kmatrix_result in a uint8_t size enum
2020-09-21 03:18:12 +00:00
Kp
3ee3ac7b7a
Delete multi_do_death
...
It is not needed. Deathmatch players never lose their keys, so there is
no need to reapply them.
2020-09-11 03:08:02 +00:00
Kp
6a9444e5d6
Move some multiplayer functions into namespaces
2020-09-11 03:08:02 +00:00
Kp
61f186bc18
Use enum class for texture1_value
2020-09-11 03:08:02 +00:00
Kp
39cb42b878
Push partial_range construction to newmenu callers
...
In some cases, callers know the length of the range and can apply better
checks than the called code.
2020-09-11 03:08:02 +00:00
Kp
7de81a7293
Move Afterburner_charge to dsx
2020-09-11 03:08:02 +00:00
Kp
18282d5b66
Move some menu code into namespaces
2020-09-11 03:08:02 +00:00
Kp
0f2c1cdd45
Make game window inherit from dcx::window
2020-08-28 00:18:45 +00:00
Kp
b79eff0e5c
Deduplicate fades[]
...
Two identical copies were defined in different places. Use the global
one for both consumers.
2020-08-28 00:18:45 +00:00
Kp
cdca112f0a
Pass LevelUniqueAutomapState to automap_clear_visited
2020-08-28 00:18:45 +00:00
Kp
ef8c0e7527
Make kmatrix window inherit from dcx::window
2020-08-28 00:18:45 +00:00
Kp
97315725fa
Move get_multi_endlevel_poll2 into dsx
2020-08-28 00:18:45 +00:00
Kp
53f75c3c72
Use enum class for kmatrix network flag
2020-08-28 00:18:45 +00:00
Kp
5b45fd3bae
Add compile-time check that zip() will not exceed static sizes
...
This is necessarily incomplete since it can only check ranges that have
a compile-time static size. However, it catches some simple mistakes,
and imposes no runtime cost, so it is still useful.
2020-08-28 00:18:45 +00:00
Kp
6d3dce4e16
Use enum class for tmap_num2
...
Define separate enum values for rotation data in both the high bits,
where it is usually kept, and the low bits, where it is sometimes used
for math or comparisons.
Define an enum value to represent the composite of the index and the
rotation, since the composite is not suitable for use as an array
subscript. Add helper functions to extract the component pieces.
2020-08-24 01:31:28 +00:00
Kp
da66b1d9b8
Move d1_tmap_num_unique to piggy.cpp
...
It is only used in one file. Move it there and make it static.
2020-08-24 01:31:28 +00:00
Kp
ab44115aa4
Move N_robot_joints to d_level_shared_robot_joint_state
2020-08-24 01:31:28 +00:00
Kp
c96671f763
Move Pof_names to d_level_shared_polygon_model_state
2020-08-24 01:31:28 +00:00
Kp
dca3c6cdca
Move savegame POF names to stack
...
They are only used while loading a savegame file. There is no need for
them to be global.
2020-08-24 01:31:28 +00:00
Kp
636978db4b
Move Marker_model_num to d_level_shared_polygon_model_state
2020-08-24 01:31:28 +00:00
Kp
9c3fc7523c
Make extra_bitmap_num static
...
Modify read_extra_bitmap_d1_pig to take the bitmap-to-write as a
parameter, instead of computing it from extra_bitmap_num.
2020-08-24 01:31:28 +00:00
Kp
faf37e3c14
Always allocate D2-sized sound array
...
This makes other code simpler, and the extra elements will simply be
ignored in D1.
2020-08-24 01:31:28 +00:00
Kp
514c63efad
Expose both MAX_SOUNDS in both games
2020-08-24 01:31:28 +00:00
Kp
dd035a8f2f
Move some piggy code into namespace dsx
2020-08-24 01:31:28 +00:00
Kp
b29f19da51
Use enum class for GameBitmapOffset
...
Values in GameBitmapOffset are only intended for use indexing within the
game's PIG file. Give them a specific type to reflect that.
2020-08-24 01:31:28 +00:00
Kp
8a1bc7f318
Move Exit_models_loaded into d_level_shared_polygon_model_state
2020-08-24 01:31:28 +00:00