Kp
8783c22003
Remove obsolete ogl_pal
2017-02-11 21:42:31 +00:00
Kp
c1440ff995
Factor out RLE expansion
...
Many sites open-coded walking a bitmap and handling whether it was
RLE_BIG. Factor that out into a helper class and redirect those sites
to use it.
2017-02-11 21:42:30 +00:00
Kp
1b81013a9b
Pass active palette to ogl_loadtexture
2017-01-15 00:03:13 +00:00
Kp
764d20d4e1
Make grs_bitmap::bm_flags private
2017-01-15 00:03:13 +00:00
Kp
362d526546
Pass canvas to gr_disk
2016-12-29 03:27:13 +00:00
Kp
acd309099b
Pass canvas to gr_ucircle
2016-12-29 03:27:13 +00:00
Kp
99f5cfbb10
Pass canvas to ogl_ubitmapm_cs
2016-12-29 03:27:12 +00:00
Kp
1ed06c91b7
Pass canvas to ogl_ulinec
2016-12-29 03:27:09 +00:00
Kp
fee4346dc1
Pass canvas to ogl_urect
2016-12-29 03:27:08 +00:00
Kp
290cb6e7c0
Use array<> for ogl_urect float arrays
2016-12-29 03:27:08 +00:00
derhass
551570d29b
Unify OpenGL extension handling between OpenGL and OpenGL ES code paths.
...
Split ogl_get_verinfo() into ogl_tune_for_current() and
ogl_extensions_init(), and consolidate all the OpenGL extension handling
into ogl_extensions.cpp. Unify the code paths for texture anisotropy and
GPU synchronization for OpenGL and OpenGL ES.
Currently, our renderer only uses GLES 1.0, so no real world implementation
will support sync objects for such an old context, but the logic is valid,
and this way, the GLES specific code paths are reduced.
This patch also fixes an issue where the old ogl_get_verinfo() did modify
the texture filtering mode if no anisotropic filter was available. This
was some leftover from the time when the anisotropic filter was a just
a specific CGameConfig.TexFilt mode, and not a separate, orthogonal setting
CGameCfg.TexAnisotropy that it is now.
2016-11-03 21:59:11 +01:00
Kp
52667fae6c
Merge branch derhass/patches/ogles-warning-cleanup
...
derhass reports that OpenGL ES builds warn for unused parameter
`texanis`. This parameter controls a feature that is not available in
current Rebirth OpenGL ES builds. Cast the parameter to void to silence
the warning. Long term, the code ought to be changed to advise the user
when their platform lacks this feature. In the short term, merge this
fix so that the build will succeed.
https://github.com/dxx-rebirth/dxx-rebirth/pull/256
2016-10-30 18:30:48 +00:00
derhass
b144badb11
fix old-style casts in the DXX_USE_OGLES code paths
2016-10-29 23:58:28 +00:00
derhass
1c756316cb
fix a -Wunused-parameter
warning in the DXX_USE_OGLES code path
...
The `texanis` parameter is not used in OpenGL ES, but in desktop GL.
2016-10-29 23:57:03 +00:00
Kp
ffa53eb3c4
Page in textures before caching them
...
Some custom levels attempt to use texture overrides that reference
textures that are not yet paged in. It is not legal to access the data
of a paged-out texture, but ogl_loadbmtexture_f attempted to access it
anyway, causing a crash. Page in the texture before calling
ogl_loadbmtexture_f. Old versions of the engine would have cached
garbage data when this happened.
Reported-by: kreator <https://github.com/dxx-rebirth/dxx-rebirth/issues/228 >
Fixes: 3c20c24ac0
("Disable piggy_bitmap_page_out_all")
2016-10-23 20:33:14 +00:00
Kp
d955eda96f
Fix fullscreen checkbox handling
...
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/224 >
Fixes: 7128141c55
("Use enum for newmenu item type")
2016-10-18 02:26:30 +00:00
Kp
61a53fb875
Use range_for in ogl_cache_level_textures
2016-10-15 00:53:17 +00:00
Kp
a468e2612b
Factor out gr_set_attributes SDL_GL_SetAttribute calls
2016-10-02 19:35:34 +00:00
Kp
797554f80a
Move Multisample to CCfg
2016-10-02 19:35:33 +00:00
Kp
b8f58309f0
Reuse computed filename for screenshot
2016-10-02 00:34:49 +00:00
Kp
2289ed473d
Unify computing write_bmp output size requirement
2016-10-02 00:34:49 +00:00
Kp
10f4f87a36
Fix _g3_draw_poly declaration/definition inconsistency
...
_g3_draw_poly uses type cg3s_point which is const in OGL and non-const
in SDL. gcc-6 with LTO reports a One Definition Rule violation for this
mismatch:
typedef const int cint;
void f(cint *);
void f(const int *) {}
The code ran correctly as it was, but the fix is trivial and has no
effect on the generated code, so fix it to satisfy the compiler.
2016-09-26 00:50:09 +00:00
Kp
ef6f803200
Remove unnecessary nullptr test on nonnull parameter
...
gcc-6 warns about this test because the caller is not permitted to pass
nullptr here, so the test is unnecessary.
2016-09-26 00:50:09 +00:00
Kp
3544ea097d
Move OGLES to dxxsconf.h; rename to DXX_USE_OGLES
...
Rename symbol OGLES to DXX_USE_OGLES 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 OGLES -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGLES/\1 DXX_USE_OGLES/' -e 's/\(\s*#\s*if\)ndef OGLES/\1 !DXX_USE_OGLES/'
2016-09-24 18:06:11 +00:00
Kp
7a13d3f228
Include dxxsconf.h explicitly and earlier
2016-09-24 18:06:10 +00:00
zico
1e6a5ec528
Addition for 6c6a32ba92
, allowing edge padding for overlaying level textures, disabling it for base textures. This isn't needed and improves visual appearence of base textures with transparency (fuelcenters, forcefields, grates, etc) when texture filtering is enabled.
2016-09-17 18:26:59 +02:00
zico
1f144f167c
Addition for 6c6a32ba92
, allowing edge padding for level and polymodel texturees only but disable it for sprites, fonts, hud images, etc. as those looked bad with this form of color bleeding in combination with various texture filtering mechanics.
2016-09-17 15:56:43 +02:00
Kp
ddf888cd72
Move USE_SDLMIXER to dxxsconf.h; rename to DXX_USE_SDLMIXER
...
Rename symbol USE_SDLMIXER to DXX_USE_SDLMIXER 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 and
inferno.cpp were manual.
git grep -l USE_SDLMIXER -- '*.h' '*.cpp' | xargs sed -i -e 's/^#ifdef \(USE_SDLMIXER\)$/#if DXX_\1/' -e 's/#\(el\)\?if \(.*\)defined(\(USE_SDLMIXER\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00
Kp
3fc1441b3f
Remove unused Win32 OpenGL indirections
2016-09-04 19:10:43 +00:00
Kp
c7041a9b26
Use reinterpret_cast for digi magic value (void*)-1
2016-09-04 19:10:43 +00:00
Kp
53196ec990
Switch similar/arch/ogl to C++ casts
2016-09-04 00:02:53 +00:00
Kp
30a7c28cc5
Switch gr.cpp write_bmp to static_cast
2016-09-04 00:02:51 +00:00
Kp
8d019a63fb
Fold glTexParameteri calls
2016-09-03 17:30:18 +00:00
Kp
9d2fd0ebfa
Fold glScalef calls
2016-09-03 17:30:17 +00:00
zico
b2cad09c26
Added new texture filtering options based on patch of user 'beware'
2016-08-29 20:53:10 +02:00
zico
6c6a32ba92
Added patch by user 'beware' to remove dark edges around textures and added command-line/INI option to disable this patch if desired (nostalgia). Fixed misleading indentation in ogl.cpp along the way.
2016-08-29 17:07:30 +02:00
Kp
37fed077ee
Remove useless casts in similar/arch/ogl/ogl.cpp
2016-08-17 04:44:22 +00:00
Kp
9b3adfb020
Remove useless casts in similar/arch/ogl/gr.cpp
2016-08-17 04:44:22 +00:00
Kp
1d1f3f6568
Allocate fewer jukebox pointers for small files
2016-08-08 00:07:19 +00:00
Kp
7ac89d0a14
Update jukebox song count at end of read_m3u
2016-08-08 00:07:19 +00:00
Kp
2885070ba8
Remove unnecessary ~jukebox_songs
...
The storage is managed by a unique_ptr, so the default destructor is
sufficient.
2016-08-08 00:07:19 +00:00
Kp
68ac4acd10
Combine jukebox allocations
2016-08-06 19:55:26 +00:00
Kp
8247713850
Use RAII for m3u FILE*
2016-08-06 19:55:26 +00:00
Kp
5b71faacda
Use RAII to remove temporary PHYSFS search path
2016-08-06 19:55:25 +00:00
Kp
a98510b17e
Move CMLevelMusicTrack to CCfg
2016-08-06 19:55:25 +00:00
Kp
50599c0dad
Move CMLevelMusicPath to CCfg
2016-08-06 19:55:25 +00:00
Kp
a1ab71f5ad
Avoid calling make_unique<...>({})
...
The compiler may or may not recognize that the temporary T{} passed to
make_unique can be omitted. Help it by passing nothing, then explicitly
clearing the returned data as a separate step.
2016-08-06 19:55:24 +00:00
Kp
c636dc4b98
Convert various static const
expressions to constexpr
2016-07-16 16:52:04 +00:00
Kp
7d07c24a5a
Invert sense of digi.cpp firstplay to already_playing
...
Invert the sense so that the variable can be bss-initialized. Rename
the variable to reflect the inverted sense.
2016-07-09 17:58:34 +00:00
Kp
2ccfdfcbc3
Make digi_win32_midi_song_playing static
2016-07-09 17:58:34 +00:00
Kp
b0a2205a4e
Convert various pointer casts to reinterpret_cast
2016-07-06 01:54:24 +00:00
Kp
492cc5788a
Fix -Wshadow error in SDL-only build
2016-07-02 02:04:11 +00:00
Kp
65f68877aa
Rewrite simple integer casts from C style to static_cast<>
...
This pass only targets commonly used standard types.
s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\)\s*)\s*(/static_cast<\1>(/g
2016-06-16 03:56:44 +00:00
Kp
1b12a3f7ef
Add parentheses around target of more complicated casts
...
C casts do not require parentheses. C++ casts require grouping around
the target. Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of some C casts.
This pass attempts to process expressions that involve parenthesized or
bracketed subexpressions, but only if those subexpressions do not
themselves contain parenthesized or bracketed subexpressions.
(int) f(1); // changed
(int) f(g()); // not changed
perl -p -i -e 's/(\(\s*((?:un)?signed|int|char|short|long|float|double|s?size_t|(?:u?int[[:digit:]]+_t))\s*\**\s*\)\s*)([&+-]?)([[:alnum:]_.]+\s*->\s*)*([[:alnum:]_.]+)((?:\s*(?:\[[^][]*\])*|(?:\([^()]*\))*))(\s*([;+>*\/^%,|&<>])|$|(\s*-\s*[^>]))/\1\(\3\4\5\6\)\7/g'
2016-06-12 03:45:37 +00:00
Kp
b282bea173
Rewrite simple integer casts from C style to static_cast<>
...
This pass only targets commonly used standard types.
s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\)\s*)\s*(/static_cast<\1>(/g
2016-06-05 01:04:26 +00:00
Kp
7fdce88558
Add parentheses around target of simple casts
...
C casts do not require parentheses. C++ casts require grouping around
the target. Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of simple C casts.
This pass does not attempt to process expressions that involve
any subexpression that can nest arbitrarily, such as parentheses or
brackets. It also works only on commonly used standard types.
(int) a->b; // changed
(int) a[b]; // not changed
s/\((\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\**\s*)\s*\)\([&+-]\?\)\([[:alnum:]_.]\+\s*->\s*\)*\([[:alnum:]_.]\+\)\(\s*\([];+>)*\/^%,|&<>]\)\|$\|\(\s*-\s*[^>]\)\)/\1(\5\6\7)\8/g
2016-06-05 01:04:25 +00:00
zico
a8ed0aaa9c
Added breaks in event.cpp to prevent unwanted events if -nomouse and/or -nojoystick is given; Added automap_apply_input() to prevent multiple inputs per frame causing multiple movement applications.
2016-05-30 13:17:42 +02:00
Kp
398596c468
Use enum for bitmap mode
2016-05-28 17:31:26 +00:00
Kp
a0cc2bfc7e
Pass canvas to ogl_upixelc
2016-05-28 17:31:26 +00:00
Kp
0253907a88
Factor out ogl_upixelc palette lookups
2016-05-28 17:31:26 +00:00
Kp
ed330960f5
Fix -Wshadow warnings in _g3_draw_poly
2016-05-22 17:49:31 +00:00
Kp
692bede8c3
Fix -Wshadow warnings in gr_toggle_fullscreen
2016-05-22 17:49:31 +00:00
Kp
176d9c0837
Fix -Wshadow warnings in read_m3u
2016-05-21 17:24:51 +00:00
Kp
f091ffad39
Factor out ogl_draw_vertex_reticle conditional calls
2016-04-05 01:10:18 +00:00
zico
081e5d5e3c
Removed rounding offset of x starting coordinate in ogl_ulinec which should hopefully unwanted horizontal offsets in Status Bar energy and afterburner gauges (without causing more problems) if Multisampling is applied
2016-02-14 13:59:02 +01: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
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
8c24eaa721
Pass color to g3_draw_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
0dcfa6fba5
Pass color to ogl_urect
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
2fd6a425b0
Remove highest_valid
2016-02-12 04:02:28 +00:00
Kp
4aea3b8fdc
Shorten ogl_set_blending
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
2acad85061
Remove unnecessary zero-fill in ogl_ubitmapm_cs
2016-02-11 03:25:52 +00:00
Kp
905d935a6b
Remove write-only cv_drawmode
2016-01-29 04:05:47 +00:00
Kp
b8026fa2d5
Factor out some texture precache calls
2016-01-17 05:19:10 +00:00
Kp
dacf771d43
Remove sprintf from OGL gr.cpp
2016-01-09 16:38:16 +00:00
Kp
7c8b36ec1d
Use automatic cleanup of GL client state
2016-01-09 16:38:10 +00:00
Kp
048615f95e
Move DbgRenderStats to CArg
2015-12-24 04:01:28 +00:00
Kp
ee98ef18f3
Move DbgSdlASyncBlit to CArg
2015-12-24 04:01:28 +00:00
Kp
94616f5e1c
Move DbgSdlHWSurface to CArg
2015-12-24 04:01:27 +00:00
Kp
2c3f64478d
Move OglSyncWait to CArg
2015-12-24 04:01:27 +00:00
Kp
9ec7e766cf
Move OglSyncMethod to CArg
2015-12-24 04:01:27 +00:00
Kp
948fa32f9c
Move SysNoBorders to CArg
2015-12-24 04:01:27 +00:00
Kp
4ac7055928
Move SysWindow to CArg
2015-12-24 04:01:27 +00:00
Kp
e3a0ca472a
Move SDL gr_palette_load to namespace dcx
2015-12-23 03:28:17 +00:00
Kp
e8c34be843
Use v*ptr* factories with highest_valid
2015-12-22 04:18:51 +00:00
Kp
18cca1d33c
Remove unnecessary gr_check_fullscreen ?:
2015-12-22 04:18:50 +00:00
Kp
db9fb0ed42
Move more symbols into namespace dcx/dsx
2015-12-22 04:18:50 +00:00
Kp
132367ce27
Fix SDL-only build after namespace changes
2015-12-18 04:08:24 +00:00
Kp
28ee4c1804
Move DbgUseOldTextureMerge to CArg
2015-12-18 04:08:24 +00:00
Kp
900bebe799
Move DbgGlRGBA2Ok to CArg
2015-12-18 04:08:24 +00:00
Kp
fa17246b7b
Move DbgGlLuminance4Alpha4Ok to CArg
2015-12-18 04:08:24 +00:00
Kp
7022d20b1e
Move DbgGlGetTexLevelParamOk to CArg
2015-12-18 04:08:24 +00:00
Kp
4a280e4556
Move DbgGlReadPixelsOk to CArg
2015-12-18 04:08:24 +00:00
Kp
b3e6dd3eb5
Move DbgGlIntensity4Ok to CArg
2015-12-18 04:08:23 +00:00
Kp
cdae6cad4d
Move DbgBpp to CArg
2015-12-18 04:08:23 +00:00
Kp
e0a88f4b7b
Move TexFilt to CCfg
2015-12-18 04:08:23 +00:00
Kp
22901a6636
Move WindowMode to CCfg
2015-12-18 04:08:23 +00:00
Kp
26e948d5f1
Uninline namespace dsx
2015-12-13 18:00:49 +00:00
Kp
dc8c0323d8
Uninline namespace dcx
2015-12-13 18:00:49 +00:00
Kp
232cc324f9
Use inline namespace dsx for similar/arch/sdl/
2015-12-13 18:00:48 +00:00
Kp
09eba7f48a
Use inline namespace dsx for similar/arch/ogl/
2015-12-13 18:00:48 +00:00
Kp
85d7c495e8
Use inline namespace dsx for similar/2d
2015-12-13 18:00:48 +00:00
Kp
43dd620557
Use inline namespace dcx for common/3d
2015-12-05 22:57:24 +00:00
Kp
69c5a79058
Use inline namespace dcx for common/2d
2015-12-05 22:57:23 +00:00
Kp
8a97c173a3
Remove useless gr_remap_mono_fonts
...
gr_remap_mono_fonts searches for fonts with !(font->ft_flags & FT_COLOR)
and calls gr_remap_font on any it finds.
gr_remap_font starts with:
if (!(font->ft_flags & FT_COLOR))
return;
2015-12-04 03:36:32 +00:00
Kp
e77a6ea923
Remove write-only variable r_upixelc
2015-12-04 03:36:32 +00:00
Kp
ed55763603
Remove unused symbols
2015-12-04 03:36:31 +00:00
Kp
b683b4cc68
Scope weapon type
2015-12-03 03:26:49 +00:00
Kp
90fdcfe846
Inline parameter to digi_select_system
2015-11-26 02:56:56 +00:00
Kp
b59f5d091e
Remove SDL stub gr_set_attributes
2015-11-26 02:56:55 +00:00
Kp
5782d3c604
Remove unused digi_debug
2015-11-26 02:56:55 +00:00
Kp
b1ec69a3a2
Move CtlNoJoystick to CArg
2015-11-26 02:56:55 +00:00
Kp
40588aaa0a
Remove unnecessary key.cpp Installed
2015-11-26 02:56:55 +00:00
Kp
7153ec69a9
Move SndNoSound to CGameArg
2015-11-24 04:05:36 +00:00
Kp
a579f75d05
Move SndDisableSdlMixer to CGameArg
2015-11-24 04:05:36 +00:00
Kp
533f1cb3bb
Qualify references to primary weapons
2015-10-18 21:01:18 +00:00
Kp
a37bae4b4f
Track output size for PHYSFSX_getRealPath
2015-10-11 22:21:00 +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
zico
51049794ce
Break screenshot numbering on 9999 instead of 99999 due to formatting of the string (it's still enough)
2015-09-01 19:06:14 +02:00
zico
818017398d
Added a little failsafe to screenshot function to make sure the game will not cause an endless loop if savenum ever rolls over
2015-08-30 12:47:47 +02:00
Kp
17b1943c5e
Mark various per-file structures as static
2015-08-12 03:11:46 +00:00
Kp
bc7c469ab2
Use array<> for more globals
2015-08-12 03:11:46 +00:00
Kp
f899aaeaca
Move player callsign to player-callsign.h
2015-07-25 23:10:45 +00:00
Kp
cfdffa184f
Move similar/arch/sdl/event.cpp -> common/arch/sdl/event.cpp
2015-07-18 21:01:56 +00:00
Kp
04d9f82a50
Move similar/arch/sdl/key.cpp -> common/arch/sdl/key.cpp
2015-07-18 21:01:56 +00:00
Kp
c7542fe9fc
Move similar/arch/sdl/mouse.cpp -> common/arch/sdl/mouse.cpp
2015-07-18 21:01:56 +00:00
Kp
d8f28a8767
Move Cfg::Grabinput to CCfg to improve code sharing
2015-07-18 21:01:56 +00:00
Kp
6bd93e466f
Guard args.h for LTO -Wodr
2015-07-18 21:01:56 +00:00
Kp
bbcdf9f7d2
Fix LTO -Wodr for GameCfg
2015-07-18 03:49:47 +00:00
Kp
c03fe30fc2
Move similar/arch/sdl/timer.cpp -> common/arch/sdl/timer.cpp
2015-07-04 21:01:17 +00:00
Kp
e3308be8b9
Cache font LINE_SPACING
2015-06-13 22:42:22 +00:00
Kp
3905f1a668
Enable -Wcast-qual
2015-06-13 22:42:21 +00:00
Kp
215e2dca81
Remove unused libpng support
...
HAVE_LIBPNG has not been set since 2004 when
3325c0b52b
("remove old OSX bundle stuff")
commented out the autoconf check to set it.
2015-06-13 22:42:21 +00:00
Kp
2d70cd65ea
Cache font space results
2015-06-13 22:42:20 +00:00
Kp
78f6dc29a6
Cache font scale Y float
2015-06-13 22:42:20 +00:00
Kp
5573ed6bea
Cache font scale X float
2015-06-13 22:42:20 +00:00
Kp
94a86326b5
Use valptr for ogl highest_valid
2015-06-13 22:42:18 +00:00
Kp
7c436f1fbb
Merge pull #39 into unification/master
...
Requested-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/39 >
Acked-by: Matt1360 <https://github.com/dxx-rebirth/dxx-rebirth/pull/39#issuecomment-88712761 >
Acked-by: zico <https://github.com/dxx-rebirth/dxx-rebirth/pull/39#issuecomment-88907523 >
2015-06-07 16:21:37 +00:00
Kp
babfa9d8e7
Construct d_event_mousebutton
2015-05-28 03:08:39 +00:00
Kp
692038f284
Cache modifier keys
2015-05-28 03:08:38 +00:00
Kp
e98c679f06
Simplify key_flush
2015-05-28 03:08:38 +00:00
Kp
a991ff0d82
Remove write-only key_data
2015-05-28 03:08:38 +00:00
Kp
34fb7bde90
Test for !=SDL_RELEASED, not ==SDL_PRESSED
2015-05-28 03:08:38 +00:00
Kp
25186ca984
Remove write-only keyd_last_released
2015-05-28 03:08:38 +00:00
Kp
badad2ef33
Remove write-only keyd_last_pressed
2015-05-28 03:08:38 +00:00
Kp
a66da49cb6
Factor out mouse z button
2015-05-28 03:08:38 +00:00
Kp
821fefe145
Cache locals in mouse_button_handler
2015-05-28 03:08:38 +00:00
Kp
abfd8e4d83
Split mouse_toggle_cursor
2015-05-28 03:08:38 +00:00
Kp
83326e89e2
Factor out sending mouse clicks
2015-05-28 03:08:38 +00:00
Kp
44625e2617
Remove unnecessary Mouse::button_state
2015-05-14 02:23:13 +00:00
Kp
265ad59e9c
Remove set_default_handler
...
standard_handler is the only handler. Use it directly.
2015-05-14 02:23:13 +00:00
Kp
fa591d585a
Shorten event_toggle_focus
2015-05-14 02:23:13 +00:00
Kp
68d35d8e05
Move negation of mouse_toggle_cursor argument into callee
2015-05-14 02:23:13 +00:00
Kp
e50b0d479e
Inline event_mouse_get_delta
2015-05-14 02:23:13 +00:00
Kp
2a8b79f868
Inline event_mouse_get_button
2015-05-14 02:23:13 +00:00
Kp
0ece005dfa
Use screen_mode for screen resolution
2015-05-14 02:23:13 +00:00
Kp
e592f3a0bb
Inline call to gr_set_mode(0)
2015-05-14 02:23:13 +00:00
Kp
2d9af1e348
Propagate gr_init argument
2015-05-14 02:23:13 +00:00
Kp
38e8967fba
Split event_toggle_focus
2015-05-09 17:39:03 +00:00
Kp
67240cea48
Shorten mouse_get_delta
2015-05-09 17:39:03 +00:00
Kp
9151b7f300
Remove write-only old_delta_x, old_delta_y
2015-05-09 17:39:03 +00:00
Kp
7f00061f6f
Shorten mouse_flush
2015-05-09 17:39:03 +00:00
Kp
e111d6ec22
Shorten mouse_cursor_autohide
2015-05-09 17:39:03 +00:00
Kp
f248006df5
Remove unused mouse_get_btns
2015-05-09 17:39:03 +00:00
Kp
53036c593e
Use unsigned comparison in mouse_in_window
2015-05-09 17:39:03 +00:00
Kp
2e2c17669c
Shorten timer_delay
2015-05-09 17:39:01 +00:00
Kp
b1992b5e59
Shorten timer_delay2
2015-05-09 17:39:01 +00:00
Kp
7eea02e4f8
Fix paging in wrong texture for homing missiles
2015-05-09 17:39:00 +00:00
Kp
fc4b686d9d
Store PHYSFS_list element count in list when needed
2015-05-09 17:38:57 +00:00
Kp
c3925353fd
Use null_sentinel_iterator for PHYSFS_list_t
2015-04-26 20:15:51 +00:00
Bradley Bell
844aad2639
Merge branch 'unification/master' into command-line
2015-04-24 20:54:35 -07:00
Kp
b32298df5a
Rewrite powerup cap code to centralize logic
2015-04-19 04:18:53 +00:00
Kp
84c638ed64
Move PHYSFS_list_t to separate header
2015-04-19 04:18:49 +00:00
Kp
150e2d2686
Convert local arrays to array<>
2015-04-19 04:18:49 +00:00
derhass
1c01698e88
GLES: fix use of uninitialized variables in ogl_texture_stats()
...
Querying GL_INDEX_BITS and GL_DOUBLEBUFFER is not allowed in GLES, so
just use a reasonable default values for both. This is only used to
estimate memory consumption by the framebuffer (which is a questionable
approach in itself, since all those are implementation details not exposed
by the GL, and the actual memory used is likely to be higher anyway).
2015-04-04 23:04:24 +02:00
derhass
49e7cfe37e
GLES: never declare the unused variable gl_draw_buffer
...
Move the declarition directly to the code part where it is used
(always in a #ifndef OGLES block).
2015-04-04 22:58:02 +02: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
16a1fcbb37
Cache g3_draw_bitmap constants
2015-04-02 02:36:56 +00:00
Kp
68241ffbad
Convert g3_draw_bitmap floats to structures
2015-04-02 02:36:56 +00:00
Kp
f71b3fb759
Make dark_lca,bright_lca array<>
2015-04-02 02:36:56 +00:00
Kp
5a4989c86d
Make cross_lva const array<>
2015-04-02 02:36:55 +00:00
Kp
1677d4159c
Make primary_lva const array<>
2015-04-02 02:36:55 +00:00
Kp
b712ae4603
Avoid unnecessary primary_lca initialization
2015-04-02 02:36:55 +00:00
Kp
27f50082f0
Avoid unnecessary cross_lca initialization
2015-04-02 02:36:55 +00:00
Kp
32d99ada2e
Make ret_rgba const array<>
2015-04-02 02:36:55 +00:00
Kp
2a1df52f71
Remove unused g3_draw_bitmap return value
2015-04-02 02:36:54 +00:00
Kp
72d349b0e0
Remove unused g3_draw_sphere return value
2015-04-02 02:36:54 +00:00
Kp
1125a751db
Remove unused g3_draw_poly return value
2015-04-02 02:36:54 +00:00
Kp
c3161d08d5
Remove unused g3_draw_line return value
2015-04-02 02:36:54 +00:00
Kp
0b20dea0ad
Remove unused jukebox functions
2015-03-28 17:18:02 +00:00
Kp
c645e5b477
Fix gcc-4.7 jukebox build
2015-03-28 01:16:10 +00:00
derhass
639b569496
Merge branch 'unification/master' into unification/syncgl_v2
...
Conflicts:
similar/arch/ogl/gr.cpp
similar/misc/args.cpp
2015-03-23 20:18:17 +01:00
Kp
b4eaa591c8
Fix crash when all sound channels are in use
...
If digi_mixer_find_channel returns -1, do not use that result to index
channels[].
2015-03-22 22:48:47 +00:00
derhass
6d41224638
move GL synchronization code into its own class
2015-03-22 21:19:06 +01:00