Commit graph

3212 commits

Author SHA1 Message Date
Simon Howard
b5d296d2ab osx: New background for .dmg package.
The old background was kind of ugly and it's nice to have a new look
for version 3. Also tweak the positions of icons and the window size.
2016-06-11 17:26:24 -04:00
Simon Howard
614a449d3c osx: Add missing connection for Chex control.
In the previous change, the connection to the new file control for
the Chex Quest IWAD was not added properly. Add this to fix Chex
Quest again.
2016-06-11 15:17:49 -04:00
Simon Howard
3626db3888 textscreen: Set parent pointer for conditionals.
We rely on the parent pointer to determine if the widget is being
hovered over. Set the parent pointer so that the background is set
properly for a widget in a conditional container.
2016-06-09 23:10:59 -04:00
Simon Howard
ef4d10f978 textscreen: Make file select more distinguishing.
File selectors widgets currently just look like an empty area of
background. Because of this they can be hard to identify as widgets.
To make them more distinguishing give them a black background, and
add a triple bar next to them.
2016-06-09 23:02:57 -04:00
Simon Howard
ad113dcdd0 setup: Use SNDDEVICE_SB for OPL, not ..._ADLIB.
We use SNDDEVICE_SB as the default everywhere else, so we need to be
consistent.
2016-06-05 15:17:47 -04:00
Simon Howard
d0de770d99 setup: Avoid use of SDL_JoystickFromInstanceID().
This function was only added in SDL2 v2.0.4. So refactor to avoid
using it, since it's not strictly necessary. This should also fix
failing build on Travis, which is using an older version of SDL2.
2016-06-05 14:30:16 -04:00
Simon Howard
1fdb037589 Merge remote-tracking branch 'origin/master' into sdl2-branch 2016-06-05 12:27:14 -04:00
Simon Howard
921a73c0fe setup: Further simplify display dialog logic.
Previously we tried to find the "nearest" window size when we were
using a window size that was not an integer multiple of the base size.
Instead, create an extra window size radio button when the configured
size is a non-standard one, to preserve the existing configuration.
Also, change all of the code that refers to "screen modes" to now
refer to "window sizes" since that is all we are doing now.
2016-06-05 12:23:12 -04:00
Simon Howard
3ec49f4028 Switch builds to use Trusty.
SDL2 packages are too new for Ubuntu Precise, which is from 2012.
Switch to the Trusty beta environment, as documented here:

https://docs.travis-ci.com/user/trusty-ci-environment/
2016-06-05 11:52:50 -04:00
Simon Howard
dbc0aaf109 Fix travis build of master branch?
Currently Travis is excluding master from builds. It looks like there
was probably a syntax error; let's see if this fixes it.
2016-06-05 11:47:44 -04:00
Simon Howard
0cd3b7e5f8 setup: Fix crash with Chex Quest warp select.
The level selection dialog was crashing on open when Chex Quest was
selected as an IWAD. This appears to have been caused by b0585fa6
which changed Chex Quest to be considered as a retail IWAD rather
than a shareware one, but did not update the tables in d_iwad.c to
match. Change the tables there to match and fix the crash.
2016-06-05 11:45:26 -04:00
Simon Howard
f3405a4d5c Use apt addon rather than sudo for builds.
The 'sudo apt-get install' instructions on the travis-ci website don't
work for containerized builds; instead we must specify packages to
install using the apt addon.
2016-06-05 11:28:02 -04:00
Simon Howard
fe0bbbb010 setup: Hide window sizes when fullscreen=true.
When the game is configured to run in full screen mode it is misleading
to keep showing the window size selectors as this can give the
impression that a fullscreen video mode is being selected. Instead,
hide the window sizes so that they only appear when running in windowed
mode. This fixes #717.
2016-06-05 11:21:47 -04:00
Simon Howard
f8063a2747 Add build file for Travis CI. 2016-06-05 11:17:25 -04:00
Simon Howard
4946e59ea3 Merge pull request #700 from nukeykt/opl-timer-fix
opl: fix time calculation after tempo change
2016-06-05 00:40:46 -04:00
Simon Howard
fcc629e855 setup: Use TXT_If() for display settings.
Simplification of more code.
2016-06-05 00:16:03 -04:00
Simon Howard
a98d35b8ef setup: Only show PC speaker option for Doom.
Other games don't have PC speaker sound effects.
2016-06-05 00:09:47 -04:00
Simon Howard
d894fd5858 setup: Use conditionals for sound dialog.
Conditionally hide parts of the sound config dialog based on which
sfx/music modes we are using. This hides some of the clutter of the
interface.
2016-06-05 00:07:20 -04:00
Simon Howard
74f35cea77 textscreen: Add widget for conditionally hiding.
A common pattern when using libtextscreen is to want to show or hide
particular UI components depending on the values of particular
variables. It is also common to want to only add things to the UI if
a particular boolean condition is true. Add a new conditional widget
to cover the first case, and a convenience TXT_If() function for the
latter.
2016-06-05 00:04:59 -04:00
Simon Howard
15425bce9c setup: Overhaul sound config dialog.
Many of the sound options in here were UI crackrock - the volume
controls are all configurable from within the game, and the sound
channels option is something that probably nobody cares about.
Replace this with a layout based on radio buttons to select the
different sfx/music options.
2016-06-04 21:28:19 -04:00
Simon Howard
a44cef9789 Merge remote-tracking branch 'origin/master' into sdl2-branch 2016-06-04 20:31:42 -04:00
Simon Howard
2532daf4e1 video: Remove useless command line arguments.
The -grabmouse, -novert and -nonovert command line arguments were added
in the early days of the project, before the setup tool existed. With
hindsight there do not appear to be clear use cases for them and it's
better that these are just configured through the config files.

The -nograbmouse argument is the one exception, which is useful for
debugging purposes as a temporary override. Change this to only be a
temporary override that does not have any permanent effect on the
config option, making it consistent with arguments found in vanilla
Doom (-nomouse, -noblit, -nosound, etc.).

This fixes #212.
2016-06-04 20:15:57 -04:00
Simon Howard
d36dafa3fc Merge remote-tracking branch 'origin/master' into sdl2-branch 2016-06-04 19:36:32 -04:00
Simon Howard
ed77a8fe11 osx: Bump OSX deployment target to 10.7.
We recently switched to targeting 10.4 because of build problems with
SDL on old versions on OSX. So make this match.
2016-06-04 19:32:59 -04:00
Simon Howard
d8cfdba5bf osx: Tweak launcher interface.
Change preferences window to use standard NSPathControl controls for
selecting IWAD file paths. Make the command line arguments text box
multiline to better support long command lines.
2016-06-04 19:29:09 -04:00
Simon Howard
f802aa44fd Merge branch 'master' of github.com:chocolate-doom/chocolate-doom 2016-06-01 14:34:18 -04:00
Simon Howard
46b0556624 video: Tweak command line parameters.
Previously we interpreted -geometry parameters with an 'f' suffix to
indicate that the provided parameter should be a screen mode. Since
fullscreen is now usually implemented using a desktop window, this is
now redundant. Instead, interpret -geometry to imply that windowed
mode should be used, and change other command line parameters to be
consistent with this behavior.
2016-06-01 01:19:07 +01:00
Simon Howard
2cc60a0d43 video: Fix rounding up of window_height adjust.
The correct behavior here is to round up to the nearest pixel; the past
logic mostly worked but wasn't quite correct.
2016-06-01 01:07:11 +01:00
Simon Howard
075ca5a761 video: Add a back door for non-desktop fullscreen.
There are some circumstances where it may be useful to be able to
specify plain SDL_WINDOW_FULLSCREEN rather than the "desktop window"
variant. Examples are for embedded devices. Implement this as two
new separate config file variables, but default them to 0x0 to mean
"use SDL_WINDOW_FULLSCREEN_DESKTOP".
2016-05-31 23:27:44 +01:00
Simon Howard
3c5aa343cb video: Rename screen_{width,height} variables.
These variables no longer mean the same thing they meant in the SDL1
versions of Chocolate Doom, and they have misleading names. To avoid
confusion, rename them to window_{width,height}.
2016-05-31 23:03:42 +01:00
Simon Howard
5a10d99d7b Remove autoadjust_video_settings variable.
Now that we are always doing hardware-based scaling, this variable
no longer does anything. In the past this used to fix broken config
files which referred to nonexistent screen modes and scaling factors,
but none of that is relevant any more.
2016-05-31 22:49:49 +01:00
Simon Howard
09d1b09dc9 video: Fix aspect ratio when resizing windows.
When resizing windows there is no restriction on the aspect ratio (or
any way to apply such a restriction through the SDL2 API). When windows
are resized, fix the aspect ratio of the window so that we never get
black borders around the game content.
2016-05-31 22:44:35 +01:00
Simon Howard
af271211eb video: Set minimum window size for SDL window.
When resizing, scaling breaks down at really small sizes. It's best to
enforce a limit so that we don't scale down beyond the base size.
2016-05-31 22:41:54 +01:00
Simon Howard
4fa746dac5 video: Get rid of SCREENWIDTH_4_3 constant.
This is redundant now that we got rid of software scaling.
2016-05-31 22:35:57 +01:00
Simon Howard
ff884786c7 video: Fix up behavior for fullscreen mode change.
The existing code had (and has) some assumptions that it will only
ever run in fullscreen or non-fullscreen mode. Because now we can
change between the two dynamically, we must fix these.

First, always set the SDL_WINDOW_RESIZABLE property on windows now so
that we can resize windows if we start in fullscreen mode and switch
to windowed.

Second, set the window size when switching to windowed mode, since
the window size was not set if we started in fullscreen mode. Adjust
window sizes to have the correct aspect ratio both on startup and
when switching.
2016-05-31 22:31:16 +01:00
Simon Howard
f0999abcf1 setup: Remove widget for disk activity icon.
This seems like UI crackrock and the disk icon code is in a good
enough state that we're already turning it on by default. In keeping
with chocolate philosophy, if people really care they can manually
turn it off by editing the config file.
2016-05-31 20:14:27 +01:00
Simon Howard
2730a06cf1 video: Remove show_diskicon from video code.
Since this is game-specific there is no real reason for this to be
defined in the common video code. This also fixes the show_diskicon
variable which was broken by recent changes.
2016-05-31 20:03:55 +01:00
Simon Howard
90a455e539 diskicon: De-dupe icon dimension constants.
These were already defined in v_diskicon.h.
2016-05-31 19:58:58 +01:00
Simon Howard
70b90f34d9 diskicon: Fix Strife disk icon.
Strife has no STCDROM lump; it always uses STDISK. Change the
V_EnableLoadingDisk() function to take the lump name as an argument,
as the lump to use for the loading disk is really game-specific.

Also fix the location where the Strife disk icon is shown on screen;
the vertical position wasn't quite right.
2016-05-31 19:56:16 +01:00
Simon Howard
5bddaa7c57 diskicon: Draw disk icon with black background.
Vanilla {Doom,Strife} show a black background to the disk icons if the
icons are transparent, a side effect of how the disk icon code works
(the commented-out version can be found in Heretic's i_ibm.c). To be
consistent with how the vanilla code works, don't use V_DrawPatch to
draw the loading icon every time, but rather draw it to a buffer on
startup and blit the whole disk region to the screen.
2016-05-31 19:47:48 +01:00
Fabian Greffrath
7607140288 Use a heuristic approach to detect infinite state cycles
Count the number of times the loop in P_SetMobjState() executes
and exit with an error once an arbitrary very large limit is reached.
2016-05-24 21:02:05 +02:00
Simon Howard
512f850d91 Fix STDISK patch offset calculation.
Directions were backwards for these offsets; the STDISK lump has a -1
y offset, so we were grabbing and restoring the background from the
wrong location in the video buffer.
2016-05-22 22:36:44 +02:00
Mike Swanson
ed8cbb08e8 NEWS: change khokh2001 attribution to Nuke.YKT 2016-05-22 10:41:37 -07:00
Simon Howard
ced40ce2c4 Refactor loading disk icon code.
Only draw the disk icon just before doing the SDL blit to the screen,
and restore the background to I_VideoBuffer immediately after doing
so. This avoids the possibility of the disk remaining in the video
buffer and fixes #668.

Also centralize most loading disk code inside v_diskicon.c.
2016-05-22 17:34:17 +02:00
Mike Swanson
ebeccb0ff2 NEWS: Use past-tense rather than present and imperative. 2016-05-22 07:43:55 -07:00
Mike Swanson
d0467c9ae2 NEWS: Strife IWAD/voices.wad loading behavior tweak 2016-05-21 12:38:27 -07:00
James Haley
7742f0d459 Swap order of checks for voices.wad; resolve issue #675 2016-05-21 13:57:58 -05:00
Mike Swanson
1efd274daf NEWS: Update for the current state of the repo. Maybe release soon...? 2016-05-20 07:40:15 -07:00
Mike Swanson
c0492ef8da d_iwad: Find Strife from a GOG.com installation 2016-05-19 08:44:33 -07:00
Simon Howard
e94e6cd994 Merge pull request #705 from nukeykt/dmxgus
music: DMX's "GUS instrument mappings bug" emulation
2016-05-14 14:17:02 -04:00