Kp
43a700a200
Prefer grs_main_bitmap::reset() to direct reinitialization
...
This ensures that any allocated resources are always freed.
2017-02-11 21:42:31 +00:00
Chris Taylor
0daf28e787
Small efficiency improvement for a return value in do_endlevel_frame()
2017-01-09 09:26:32 +08:00
Chris Taylor
4cc801f42f
Remove calls to window_close(Game_wind) when game finished or over
...
Replace calls to window_close(Game_wind) with returning window_event_result::close to game handler. Applies to when DoEndGame() is called, DoGameOver() is called, aborting in the kmatrix screen (multiplayer game) during AdvanceLevel() and playing one demo frame causes playback to stop in GameProcessFrame(). Closing a window within its handler is problematic - it can result in an unstable state.
2017-01-08 21:08:50 +08:00
Kp
22e364e030
Pass canvas to gr_clear_canvas
2017-01-01 00:45:45 +00:00
Kp
77c22d3a7f
Pass canvas to gr_settransblend
2017-01-01 00:45:44 +00:00
Kp
ef06aa089a
Pass canvas to gr_pixel
2016-12-29 03:27:09 +00:00
Kp
36f23e8d60
Use enum class for multi_send_endlevel_start
2016-11-12 18:10:09 +00:00
Kp
cc2fd7071d
Fold endlevel_render_mine g3_set_view_matrix call
2016-09-26 00:50:09 +00:00
Kp
62b58e9890
Move OGL to dxxsconf.h; rename to DXX_USE_OGL
...
Rename symbol OGL to DXX_USE_OGL to show that it is a DXX
symbol, not one inherited from a library. Move it to dxxsconf.h to
shorten the command line.
This is a mostly automated transform, but the changes to SConstruct were
manual.
git grep -lzw OGL -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGL/\1 DXX_USE_OGL/' -e 's/\(\s*#\s*if\)ndef OGL/\1 !DXX_USE_OGL/' -e 's/\(\s*#\s*if !\?\)defined(OGL)/\1DXX_USE_OGL/'
2016-09-24 18:06:11 +00:00
Kp
6a3ded191f
Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR
...
Rename symbol EDITOR to DXX_USE_EDITOR to show that it is a DXX
symbol, not one inherited from a library. Move it to dxxsconf.h to
shorten the command line.
This is a mostly automated transform, but the changes to SConstruct were
manual.
git grep -wl EDITOR -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(EDITOR\)\>/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(EDITOR\))/#\1if \2DXX_USE_\3/' -e 's/^\s*#ifndef \(EDITOR\)\>/#if !DXX_USE_\1/'
2016-09-11 18:49:16 +00:00
Kp
0104f4f938
Fix invalid access on very short exit tunnels
2016-09-03 17:30:18 +00:00
Kp
ee1003f29f
Move conditionally compiled code into namespace dsx
2016-08-25 04:05:32 +00:00
Kp
acac40bc25
Mark global constants as constexpr
...
s/^const \([^*=]*{};\)/constexpr \1/
2016-07-23 04:10:42 +00:00
Kp
c636dc4b98
Convert various static const
expressions to constexpr
2016-07-16 16:52:04 +00:00
Kp
dcc56e6b39
Propagate bm_mode::linear into iff_read_bitmap
2016-05-28 17:31:27 +00:00
Kp
398596c468
Use enum for bitmap mode
2016-05-28 17:31:26 +00:00
Kp
e51db1c312
Pass object_base &to find_exit_side
2016-04-23 17:59:47 +00:00
zico
649475e3bc
Removed subtraction of lifeleft for external_explosion in do_endlevel_sequence as it is already happening in object_mode_one() making the explosion animation play too fast
2016-03-30 14:31:13 +02:00
Kp
f4e1ebb576
Remove unnecessary gr_setcolor calls
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
f235d6b12b
Pass color to gr_pixel
2016-02-12 04:02:28 +00:00
Kp
2fd6a425b0
Remove highest_valid
2016-02-12 04:02:28 +00:00
Kp
a3ae630829
Remove default argument for basic_ptridx(index)
2016-01-09 16:38:14 +00:00
Kp
cefc79f869
Construct find_point_seg segptridx explicitly
2016-01-09 16:38:13 +00:00
Kp
23d6735f7a
Use .reset() for free_endlevel_data bm
2016-01-09 16:38:10 +00:00
Kp
e8c34be843
Use v*ptr* factories with highest_valid
2015-12-22 04:18:51 +00:00
Kp
2b51578ba6
Use enum class for Player_dead_state (formerly Player_is_dead)
2015-12-15 04:09:35 +00:00
Kp
44753209d6
Move homing_object_dist to object.ctype.player_info
2015-11-14 18:17:22 +00:00
Kp
ccee595321
Remove Interpolation_method from OGL build
2015-11-06 03:51:10 +00:00
Kp
64ff1cda89
Only restore non-alpha when alpha was used
2015-08-21 03:12:35 +00:00
Kp
e5683593ef
Expand ZERO_VECTOR inline
2015-08-13 03:15:53 +00:00
Kp
5922d3cf9e
Update endlevel !SHORT_SEQUENCE code
...
This rotted long ago, but the fixes are easy. Clean it up in case
someone wants to activate it.
2015-08-13 03:15:52 +00:00
Kp
bda7fef3a0
Use get_local_player to compute reference to local player
2015-07-25 23:10:46 +00:00
Kp
f00725f740
Use forward-declaration header for player.h
2015-07-25 23:10:45 +00:00
Kp
bf589a05b7
Use valptr for endlevel.cpp
2015-07-12 01:04:19 +00:00
Kp
b9d6c577be
Use valptr for endlevel highest_valid
2015-06-13 22:42:16 +00:00
Kp
1216c26704
Make exit nextcenter const
2015-05-28 03:08:40 +00:00
Kp
ea2c2df250
Update open-coded tests for segment_none
2015-05-28 03:08:39 +00:00
Kp
68834fb929
Expand render_mine window_rendered_data helper inline
2015-05-05 03:20:42 +00:00
Kp
4572099403
Make endlevel globals static
2015-04-22 02:44:29 +00:00
Kp
c338862ad6
Reduce gauges.h includes
2015-04-19 04:18:51 +00:00
Kp
6b6eaef226
Include polyobj.h from robot.h
...
Swap the inclusion order since all robots are polyobjects, but not all
polyobjects are robots.
2015-04-02 02:36:57 +00:00
Kp
565019f880
Remove unused movie_table_secret
2015-03-22 18:49:21 +00:00
Kp
2c09f9fa90
Propagate special types for distance/magnitude
2015-03-12 02:21:19 +00:00
Kp
d1f45f85b2
Wrap submodel angles
2015-02-14 22:48:28 +00:00
Kp
078d9513e0
Pass end-of-list for ignore_obj_list
2015-02-05 03:03:51 +00:00
Kp
673a711461
Remove vm_angles_2_matrix return value
2015-02-05 03:03:51 +00:00
Kp
99a4a0ed62
Capture range_for by-value temporaries as const
...
Modifying a by-value temporary does not affect the underlying container,
so modifying it is almost always a bug. Require use of a by-reference
capture when modification is desired.
sed -i -e 's/range_for\s*(\s*\(const\s\+\)\?auto\s\+\([[:alpha:]_]\)/range_for (const auto \2/g'
2015-02-05 03:03:49 +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
c8b5fe5552
Pass find_vector_intersection arg by &
2015-01-20 02:46:42 +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
ab326e9c8b
Reduce writes trimming endlevel input
2015-01-15 04:30:03 +00:00
Kp
fbac119095
Propagate use of objptridx_t
2014-12-23 04:20:27 +00:00
Kp
2d8f8b5d4a
Reduce inclusion of wall.h
2014-12-22 04:35:49 +00:00
Kp
9ffd958d3d
Create window_rendered_data locally
2014-12-18 04:12:38 +00:00
Kp
b79e432a3e
Pass render_mine arg by &
2014-12-13 04:11:16 +00:00
Kp
594c597621
Pass gr_init_bitmap_data arg by &
2014-11-30 22:09:20 +00:00
Kp
97332b848c
Pass gr_free_bitmap_data arg by &
2014-11-30 22:09:20 +00:00
Kp
baa39fe8f7
Add g3_rotate_point that returns result
2014-11-13 03:41:29 +00:00
Kp
d9e42e6bf3
Pass g3_draw_rod_tmap arg by &
2014-11-13 03:34:42 +00:00
Kp
207dceba33
Pass g3_draw_sphere arg by &
2014-11-13 03:22:49 +00:00
Kp
ff13155fc2
Pass g3_project_point arg by &
2014-11-13 03:21:33 +00:00
Kp
c5fd8cb859
Pass g3_code_point arg by &
2014-11-13 03:16:17 +00:00
Kp
e2741ce899
Add vm_extract_angles_matrix that returns result
2014-11-04 01:32:43 +00:00
Kp
df6b4bd783
Add vm_vec_rotate that returns result
2014-11-04 01:31:22 +00:00
Kp
3a24b20e15
Add vm_vector_2_matrix that returns result
2014-11-04 01:27:55 +00:00
Kp
40eb2e6b01
Add vm_vec_scale_add that returns result
2014-11-02 03:43:57 +00:00
Kp
b32f5e5df3
Add vm_vec_copy_scale that returns result
2014-11-02 03:43:47 +00:00
Kp
9ae0e27f29
Pass angvec_add2_scale arg by &
2014-11-02 03:42:17 +00:00
Kp
dac7f5e13b
Pass get_angs_to_object arg by &
2014-11-02 03:42:02 +00:00
Kp
ff877834cb
Pass render_terrain vector by &
2014-11-01 03:12:57 +00:00
Kp
6d61198130
Pass compute_segment_center vector by &
2014-10-30 03:32:51 +00:00
Kp
8a89eff0bb
Pass compute_center_point_on_side vector by &
2014-10-30 03:32:27 +00:00
Kp
5bb9c88979
Add vm_vec_sub that returns result
2014-10-29 03:24:31 +00:00
Kp
53aa70cecb
Use vsegptridx_t
2014-10-28 03:08:51 +00:00
Kp
09835590f3
Pass g3_set_view_matrix arg by &
2014-10-26 22:01:00 +00:00
Kp
7e955c2c7b
Pass object_create_explosion_sub position by &
2014-10-26 21:36:25 +00:00
Kp
2a5265493e
Pass obj_create position vms_vector by &
2014-10-26 21:35:16 +00:00
Kp
9dea4b4d88
Pass sound vms_vector arg by &
2014-10-26 21:33:50 +00:00
Kp
b77eb5424b
Move external_explosion into Objects
2014-10-25 16:40:18 +00:00
Kp
a32547af16
Pass position-related vms_vector arg by &
2014-10-22 02:46:03 +00:00
Kp
7f648c0f5f
Wrap segment iteration idiom
2014-10-12 23:10:05 +00:00
Kp
fb641b3250
Wrap object iteration idiom
2014-10-12 23:05:46 +00:00
Kp
2ceabf5034
Pass g3_add_delta_vec arg by &
2014-10-02 03:02:36 +00:00
Kp
adae9888b9
Pass g3_rotate_delta_vec arg by &
2014-10-02 03:02:36 +00:00
Kp
68211d20d3
Pass g3_rotate_point arg by &
2014-10-02 03:02:35 +00:00
Kp
586f9ec0ee
Pass draw_polygon_model arg by const &
2014-10-02 03:02:35 +00:00
Kp
dc5a0bcb98
Pass g3_start_instance_matrix arg by &
2014-10-02 03:02:35 +00:00
Kp
b65e9ecb61
Pass vm_extract_angles_vector arg by &
2014-10-01 02:28:42 +00:00
Kp
faeeef9b52
Pass vm_extract_angles_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
3743882fa4
Use vm_matrix_x_matrix 2 arg form where viable
2014-10-01 02:28:42 +00:00
Kp
83ccb15459
Pass vm_matrix_x_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
5af79382a5
Pass vm_vec_rotate arg by &
2014-10-01 02:28:42 +00:00
Kp
99f681c8ea
Pass vm_vector_2_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
d238b4a562
Pass vm_angles_2_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
73545f1dab
Pass vm_vec_normalized_dir_quick arg by &
2014-10-01 02:28:41 +00:00
Kp
1fff2db9a8
Pass vm_vec_dist_quick arg by &
2014-10-01 02:28:41 +00:00
Kp
ac39749382
Pass vm_vec_dist arg by &
2014-10-01 02:28:41 +00:00
Kp
0d0297553e
Simplify bm_free_extra_models
2014-09-28 21:55:59 +00:00
Kp
05a91f9b58
Pass vm_vec_scale_add2 arguments by &
2014-09-28 21:43:14 +00:00
Kp
4104bf4f11
Pass vm_vec_scale_add arguments by &
2014-09-28 21:43:14 +00:00
Kp
b5949cc4a0
Pass vm_vec_copy_scale arguments by &
2014-09-28 21:43:14 +00:00
Kp
0b2636d535
Pass vm_vec_add2 arguments by &
2014-09-28 21:43:00 +00:00
Kp
ba0b91554c
Remove vm_vec_dotprod -> vm_vec_dot redirect
2014-09-28 21:41:59 +00:00
Kp
00b59c3058
Pass vm_vec_dot arguments by &
2014-09-28 21:11:48 +00:00
Kp
321bbe37d8
Pass vm_vec_sub arguments by &
2014-09-28 21:11:45 +00:00
Kp
74925e9b45
Pass vm_vec_scale dest by &
2014-09-28 21:11:05 +00:00
Kp
69968349cb
Pass vm_transpose_matrix m by &
2014-09-28 21:11:04 +00:00
Kp
f12273746f
Pass vm_vec_zero v by &
2014-09-28 21:11:04 +00:00
Kp
a620a59bda
Pass vm_vec_normalize_quick v by &
2014-09-28 21:11:04 +00:00
Kp
7ddba1d15e
Pass vm_vec_negate v by reference
2014-09-28 21:09:37 +00:00
Kp
fc25f00eb1
Propagate for variables in similar/main/endlevel.cpp
2014-09-26 02:42:08 +00:00
Kp
0c7e5aa178
Avoid slicing obj_create return value
2014-09-08 03:24:48 +00:00
Kp
e8f4b20d1d
Use special type for PHYSFSX_fgets
2014-09-07 20:07:20 +00:00
Kp
8d835f8e34
Reduce inclusion of compiler-begin.h
2014-08-24 03:36:35 +00:00
Kp
eefdce5b04
Reduce nesting of vms_vector::{x,y,z}
2014-08-22 02:27:13 +00:00
Kp
66cb80c343
Propagate use of objptridx
2014-08-17 20:31:18 +00:00
Kp
001c0b6f51
Fix crash on failure to create mine exit explosion
2014-08-17 19:33:43 +00:00
Kp
83c6b60123
Use array<> for textures_list
2014-08-16 22:18:14 +00:00
Kp
125d9257be
Use special type names for segment/object numbers
2014-08-13 02:57:12 +00:00
Kp
6020c9c013
Use d_fname for DOS filenames
2014-07-25 02:54:31 +00:00
Kp
bd1c6d8c5d
Reduce header includes of physfsx.h
2014-07-22 23:48:23 +00:00
Kp
afeaa09e9a
Replace vm_copy_transpose_matrix with vm_transposed_matrix
...
Also, delete obsolete broken inlining support.
2014-07-14 02:17:40 +00:00
zico
ad7cb106bc
Changed custom D1X license to GPLv3
2014-06-01 19:55:23 +02:00
Kp
9a5d0f6f09
Use symbolic values for segment/object first/none
2014-01-06 04:17:55 +00:00
Kp
094dfbf3d4
Reduce header inclusions
2013-12-31 03:22:03 +00: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
75ce83098d
Write log message when local player escapes the mine
...
For consistency with messages that other players have escaped, also log
the local player escaping.
2013-12-28 18:17:09 +00:00
Kp
93ce29f88d
Simplify test for exit tunnel with wrong final child
2013-12-25 04:39:54 +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
75c229c6bf
Normalize con_printf newline usage
2013-12-07 21:13:37 +00:00
Kp
a2cec5d71f
Switch PHYSFSX_fgets to auto-sized variant where possible
2013-12-07 18:39:19 +00:00
Kp
c3288abd89
Remove global 'flydata'
2013-11-09 18:06:47 +00:00
Kp
cbda2231a6
Move similar/main/endlevel.c -> similar/main/endlevel.cpp
2013-11-09 17:46:41 +00:00