Commit graph

2007 commits

Author SHA1 Message Date
Kp 08c0c3768c Remove unused gr_set_draw_buffer 2015-03-22 18:49:21 +00:00
Kp ce028fc843 Move Object_type_names to dumpmine 2015-03-22 18:49:21 +00:00
Kp 2f99b894f0 Remove unused state_text 2015-03-22 18:49:21 +00:00
Kp 373becd588 Remove D2-unused mode_text 2015-03-22 18:49:21 +00:00
Kp 7840885473 Fix clang -Wparentheses-equality warnings 2015-03-22 18:49:21 +00:00
Kp 7bf49fe551 Fix clang -Wmissing-braces warnings 2015-03-22 18:49:21 +00:00
Kp 08f6ad4bc7 Enable nested INI files 2015-03-22 18:49:21 +00:00
Kp 098bd2a9df Move exception std::string 2015-03-22 18:49:21 +00:00
Kp 9ddea5f570 Reduce lifetime of Args 2015-03-22 18:49:20 +00:00
Kp 65ff319ebb Use ntstring for LastMission 2015-03-22 18:49:20 +00:00
Kp 8ffb2c7f45 Use newmenu_do2 for newmenu_doreorder 2015-03-22 18:49:20 +00:00
Kp c5f6a115ec Add <stdexcept> for files that throw std::runtime_error 2015-03-22 04:16:49 +00:00
derhass b73407e791 Prevent digi_mixer_start_sound() from trying to play nonexisting sounds.
There is a an out-of-bounds access in digi_mixer_start_sound() when
soundnum is < 0. The bounds check I added here is already present in
digi_audio_start_sound().

This bug was triggered on the RPi d2x built when trying to show the
briefing screen because briefing_new_screen() tries to play
SOUND_BRIEFING_HUM, which digi_xlat_sound() translated to -1 in this
situation. The game finally crashed in mixdigi_convert_sound() because
GameSounds[-1] happened to contain some non-zero data (on my Linux desktop,
that memory seems to be always 0 by accident...). This was also the reason
why the pi version tried to allocate lots of memory before it crashed in
memcpy().
2015-03-21 23:45:42 +01:00
derhass a8283a9d45 Merge branch 'unification/master' into unification/rpi
Kp already incorporated some small changes I made in my rpi branch into
unification/master. However, besides making the rpi helper functions
static as I did, he also changed the prototype from (void) parameters
to C++ style (). I've incorporated his version here.

Conflicts:
	similar/arch/ogl/gr.cpp
2015-03-21 18:02:16 +01:00
derhass f46e4a2a7c RPi: use -isystem for the VideoCore library header path
Rebirth builds with -Werror=redundant-decls -Werror=undef, which are
triggered by the bcm_host.h. Making gcc treat those paths as
system headers avoids these issues. This was suggested by Kp.
2015-03-21 17:53:13 +01:00
Kp cf687a9a0a Make RPi OGL functions static 2015-03-20 03:30:20 +00:00
Kp 3a37b41192 Fix startup trap with D1 shareware data
D1 shareware models handle textures in a way that requires starting
highest_texture_num at -1.

Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/46>
Fixes: 68be3baeca ("Track highest_texture_num locally")
2015-03-20 03:30:20 +00:00
derhass c1a38e4433 RPi: Use explicit type casts for DISPMANX_TRANSFORM_T 2015-03-18 21:30:50 +01:00
derhass 7ce066cb8b GLES/RPi: Declare internal helper functions static 2015-03-18 21:07:57 +01:00
derhass c23c98562b GLES: Fix const correctness and for TestEGLError() 2015-03-18 21:05:34 +01:00
Kp 2458078987 Skip digi_sync_sounds loop if !Viewer
If a sound is used, it may dereference Viewer.  If Viewer is null, this
will crash.  In 630f11945e,
digi_sync_sounds changed to assume Viewer is valid.  This crashes during
early startup when not using the SDL_mixer backend, even though no
sounds are in use.

Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/45>
Fixes: 630f11945e ("Cache Viewer in digiobj")
2015-03-15 18:52:52 +00:00
Kp ac39b6cb40 Fix -Wunused-variable warning in sound_menuset for !USE_SDLMIXER
Only cache citem if USE_SDLMIXER.  It is unused if !USE_SDLMIXER.

Fixes: cc508be34c ("Pass selection for EVENT_NEWMENU_SELECTED")
2015-03-15 18:45:53 +00:00
Kp e1ff8afc88 Use ntstring for newmenu_item saved_text 2015-03-12 02:21:21 +00:00
Kp fd2cbdbb39 Use range_for in newmenu.cpp 2015-03-12 02:21:21 +00:00
Kp d1b60c2324 Pass uint_fast32_t for newmenu_* items 2015-03-12 02:21:21 +00:00
Kp 67d5bcdcef Factor out menu scroll stepping 2015-03-12 02:21:21 +00:00
Kp 45c4e09370 Cache menu->items[menu->citem] 2015-03-12 02:21:21 +00:00
Kp 65eb652895 Reduce writes in strip_end_whitespace 2015-03-12 02:21:20 +00:00
Kp 9b0a97f9d4 Flip sense of char_allowed 2015-03-12 02:21:20 +00:00
Kp 94d153e5cd Reorder ' '->'_' check 2015-03-12 02:21:20 +00:00
Kp 65810d5c77 Skip sqrt in check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp 707b69220d Skip sqrt,square in check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp f89262054f Skip sqrt in check_sphere_to_face 2015-03-12 02:21:20 +00:00
Kp 5f409c4948 Move quick checks up in check_sphere_to_face 2015-03-12 02:21:20 +00:00
Kp 337837ec15 Skip sqrt in special_check_line_to_face 2015-03-12 02:21:20 +00:00
Kp 76d383261c Return vm_distance_squared from check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp 2c09f9fa90 Propagate special types for distance/magnitude 2015-03-12 02:21:19 +00:00
Kp c5bbaaaf87 Remove unused advance_sound 2015-03-11 02:19:15 +00:00
Kp 4840ddcd22 Support overriding build date/time
Help the reproducible build effort by letting the builder set a specific
date and time.
2015-03-11 02:19:15 +00:00
Kp b69a9438a7 Fix SDL graphics menu build failure
Fixes: a84a05c701 ("Move graphics menu to macro")
2015-03-11 02:19:15 +00:00
Kp b414758505 Add stub for player color remapping 2015-03-09 03:33:07 +00:00
Kp 72a01bf56c Add indirection for player color lookup 2015-03-09 03:33:07 +00:00
Kp 0f9aa2e94e Refactor multi_do_message 2015-03-09 03:33:07 +00:00
Kp cbe6661cee Fix effecting/affecting 2015-03-09 03:33:07 +00:00
Kp ddd9d71633 Reset object size when bashed to shield
Drakona noted in Retro that objects retain their original size when
converted to shields.  Fixed in Retro as "Objects turned into shields
were sometimes the wrong size."

Reported-by: Drakona <catherine.e.darrow@gmail.com>
2015-03-09 03:33:07 +00:00
Kp dcb2fc6524 Factor out UDP broadcast lookup 2015-03-07 17:20:41 +00:00
Kp a84a05c701 Move graphics menu to macro 2015-03-07 17:20:41 +00:00
Kp d39d765208 Move sandbox menu to macro 2015-03-07 17:20:41 +00:00
Kp 1762470b3a Move options menu to macro 2015-03-07 17:20:40 +00:00
Kp 7349a90cc8 Remove unused multi_send_message_dialog 2015-03-03 04:36:16 +00:00