Commit Graph

293 Commits

Author SHA1 Message Date
86bf93c9c5 WIP
This doesn't currently compile due to referencing some undefined variables.

[ci skip]
2017-01-31 13:03:51 -05:00
a37db72920 Some improvements to scenario-related errors when loading games
- Use the same algorithm for locating scenarios as is used when selecting a scenario to enter
- Improve the error message when the party's scenario is missing - in particular, name the scenario
- Fix legacy saved games in custom scenarios being unloadable
2017-01-30 21:11:08 -05:00
ac15358c46 Rename custom cursor class to avoid conflict with X11 type 2017-01-30 15:05:38 -05:00
73cfe2bd24 Merge branch 'master' into linux 2017-01-30 14:02:41 -05:00
823e96f637 Stuff to make linux build work 2017-01-26 22:56:07 -05:00
37d2e5f06b Additional minor fixes to Linux build 2017-01-26 17:18:01 -05:00
ultra
057aade18b Get it building and launching something 2017-01-26 17:17:25 -05:00
ultra
ffa2d0e950 Hacked scons scripts and got it building on Ubuntu with clang.
Minor changes to support building on recent clang
Addition of some headers for non-compiling files
2017-01-26 17:16:38 -05:00
15637c763b Fix showing a fixed graphic for invisible monsters in Scry Monster
Also fix dialogs never showing a frame around blank graphics
2017-01-22 11:10:40 -05:00
8e43ce4347 Add preview button to item/monster edit dialogs
This shows the monster or item info dialog as it would appear in-game
2017-01-22 11:02:26 -05:00
e30c509ff1 Fix issue with loading 0-dice monster attacks 2017-01-21 16:18:49 -05:00
380b64aa7a Fix some issues when loading new-format scenarios
- Carriage returns misinterpreted as map features
- Error code returned by CopyFiles
- Confusing error message when a file is missing in the archive
2017-01-20 23:11:40 -05:00
c1bfc99164 Fix several issues with saving and loading games
- PC's internal reference to the party was clobbered on load
- Several dynamic structures still made assumptions about their size, causing crashes
- Issues with town maps due to treating all towns as 64x64
- Town maps were saved only if you are in town
2016-10-01 17:52:05 -04:00
9aed4b418f Several small bugfixes
- Wrong image in generic lever dialog
- Crash in adventure notes dialog
- Incorrect spell costs shown on second page of spellcasting dialog
- Enable messages in "if context" node, but only for legacy scenarios
- Fix recorded dialogue not working
- Fix special items leaking between scenarios
- Fix training dialog
- Fix scenario editor sometimes crashing on scenarios that it wrote itself
2016-09-26 20:23:09 -04:00
5cce71df26 Fix several bugs introduced by refactoring 2016-09-03 12:40:48 -04:00
88d6afce27 Merge all the town classes and remove the unimplemented templated towns
This also adds a common superclass shared by towns and outdoor sectors, and
enables towns of arbitrary sizes.
2016-09-03 02:50:29 -04:00
5c3a96c69c Fix several issues when loading legacy saves 2016-09-02 19:28:25 -04:00
20f22d7952 Properly implement copying for universe and scenario
This allows a failed load to not clobber the currently-loaded save or scenario.
2016-09-02 19:00:22 -04:00
5140396cf3 Rename legacy import functions 2016-08-21 16:31:14 -04:00
e9bf63afc7 Move town-specific daved game data into the town record
Als, use bitsets for item_taken and maps.
2016-08-21 16:09:58 -04:00
9363ab2fcf Eliminate function-scope loop index variables
This makes all loop index variables local to their loop and
fixes some issue arising from the loop variables being present
through the whole function, such as using the wrong index variable.

In addition, there has been some reduction of code duplication in
the scenario editor.
2016-08-21 00:46:40 -04:00
785943b9be More usage of standard containers instead of bare arrays 2016-08-15 12:31:45 -04:00
7b617702ff Ensure stored PCs don't reference a party 2016-08-15 02:10:25 -04:00
3359a2b778 Decouple universe and party 2016-08-14 22:28:37 -04:00
fa928a122f Fix missing scenario editor menus on Windows
This also seems to fix an issue with menu accelerator keys on Windows.
2015-10-22 18:29:29 -04:00
5cab4fdb9f Fix instant help received not being remembered 2015-10-06 22:17:29 -04:00
d19880a463 Stop storing preferences and legacy flags in the saved game
- Nuke global preference variables (they're now fetched with get_xxx_pref whenever needed)
- Nuke magic SDFs that store preferences and other info
- The only preferences now stored in the saved game are those related to difficulty
- play_sound no longer takes an option repeat parameter, but instead takes a delay which will be used if sounds are disabled
- SDF array increased to 350x50
- When saving a legacy scenario, a dialog is shown to remind you to update and to allow you to clear the legacy flag
2015-10-06 22:17:25 -04:00
7f00d0c775 Change image resource type from sf::Image to sf::Texture
This includes an added optimization to the resource manager - it now uses unordered (hash) maps instead of ordered (tree) maps to keep track of loaded resources and paths, for the average constant lookup time.
2015-10-05 23:57:42 -04:00
17095e1760 Three new wallsets and one new floorset by ADoS 2015-10-05 18:27:40 -04:00
1b95f06207 Split dlogutil.hpp into separate headers for each dialog 2015-10-04 22:45:01 -04:00
96229d1f40 Lot more tests!
- Tests for converting legacy terrain types
- Tests for initialization to sane values

Fixes:
- cCreature no longer initializes spec1 and spec2 to 0. This probably didn't cause bugs, but who knows...
- In fact, cCreature no longer explicitly initializes anything in its cTownperson superclass. That's what the superclass constructor is for after all.
- Relatedly, cTownperson now defaults to a facial graphic of -1. Also a docile attitude.
- iLiving defaults to ap 0, direction here.
- Fix Change When Step terrains to properly support not having a sound while still allowing an arbitrary number of custom sounds.
- Add support for a lack of sound to Change When Used terrains, including at conversion time (original game supported it but OBoE was forcing the sound to a door sound).
- Fix conversion of crumbling terrain types (old conversion was allowing quickfire to destroy them)

Other:
- New addAttack method in cMonster.
- Change snd_num_t to signed, because it's been getting annoying that I can't easily use -1 to mean "no sound".
2015-10-04 18:44:58 -04:00
8afd3825b0 Refactor the dialog engine's event handling to make it easier to add new events in the future
- Focus event split into focus and defocus
- Scroll event added but not yet properly implemented

Also:
- Remove the useless (and ignored) clickable attributes from the schema
- Pave the way for controls other than fields to be able to recieve keyboard focus
2015-10-03 19:49:33 -04:00
06ad776236 Remove frame_region since it was unused and misleading, and nontrivial to fix 2015-10-03 12:24:43 -04:00
a515bd0b0e Fix use of | instead of & for rect intersection 2015-10-02 13:11:11 -04:00
f6183cad63 Separate "Splits When Hit" from "Immune to Assassinate" 2015-10-01 22:53:32 -04:00
a9e7988cf9 Remove custom header from saved games.
Saved games are now just a gzipped tarball with a different file extension.
2015-10-01 10:51:54 -04:00
56c533f419 Fix scons build and tests 2015-09-30 18:57:52 -04:00
5c37fa199e Some final scenario read tests 2015-09-30 17:57:48 -04:00
43e82281af More read/write tests for town and outdoors, including maps/dialogue
Fixes:
- For towns, the "has tavern" flag was not saved or loaded
- Outdoor roads were not saved or loaded
- For outdoor encounters, the "can't flee" and "forced" flags were not loaded, and "forced" was not saved
--> These two flags have also been separated in the code
2015-09-30 17:00:05 -04:00
16a09988f3 Fix Windows build 2015-09-30 02:05:22 -04:00
082e3fc9d9 Implement flood-fill tool 2015-09-27 03:15:05 -04:00
18bb16df9c More read/write test cases for monsters, especially monster abilities
Fixes:
- For radiate abilities, the pattern was not saved and defaulted to single instead of square on load
- For summon abilities, what to summon was not saved and chance was incorrectly saved
2015-09-27 01:20:33 -04:00
ab232bb31a Generalize the editor's terrain frills mechanism 2015-09-26 15:05:49 -04:00
371459d1b2 The game no longer refuses to play sounds greater than 100 2015-09-25 21:51:47 -04:00
67cf73e593 Fix resource manager not properly accounting for overrides 2015-09-25 20:14:55 -04:00
f66c1cb36f More init/splash streamlining, now including the scenario editor 2015-09-25 19:03:40 -04:00
3b647f33b2 Streamline initialization and splash screen code
Should be much less chance of beachballs on OSX
2015-09-25 17:31:57 -04:00
fbe80b22dd Fix startup splash
- No longer shows stone pattern before logo
- Music no longer cuts off
- Intro image properly centred in fullscreen
2015-09-25 15:10:00 -04:00
fdcaa98116 Fixed crash on exit (finally!) 2015-09-21 14:40:26 -04:00
350479ddbb Fix some issues with loading saved games 2015-09-14 15:51:04 -04:00