Commit Graph

733 Commits

Author SHA1 Message Date
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
d2ec3ff8c5 Enable range-for on the player party 2016-08-15 18:25:41 -04:00
4d739936cb Make some tables static const 2016-08-15 17:48:52 -04:00
c6bbc0e2af Fix off-by-one when loading monster attacks from saved games 2016-08-15 12:33:24 -04:00
094ca42e9f Fix Alter Monster Attack special node 2016-08-15 12:32:59 -04:00
ecdad3f2df Misc minor code cleanup 2016-08-15 12:32:34 -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
ac93dbe09f Fix some uses of wrong location 2016-08-14 22:34:16 -04:00
3359a2b778 Decouple universe and party 2016-08-14 22:28:37 -04:00
1330d10b86 Add test for legacy outdoor sector conversion 2016-08-09 13:05:53 -04:00
b5facb5bfe Add test case for loading legacy scenario header data 2016-08-05 15:12:37 -04:00
44599e0ffb Fix affect specials not affecting the correct target in some legacy scenarios 2016-08-02 18:16:04 -04:00
225b90471a Fix dialogue not working on Windows 2016-07-08 16:57:38 -04:00
2ed83ef4ac Only vocalize onscreen monsters 2016-07-04 18:35:22 -04:00
e6dd69d697 Fix automap not being drawn 2016-07-04 17:46:03 -04:00
4da1a3e44a Fix monster vocalizations
- Were played during screen update instead of each turn
- Incorrectly detected whether a monster has a vocalization
2016-07-04 17:32:47 -04:00
d008ccd6f7 Windows: Build XP-compatible binaries 2016-06-29 02:20:08 -04:00
c59c58e7ab Fix crash when viewing monster info from menu 2016-05-07 17:57:25 -04:00
4cd7368fbf Some fixes to scenario dirty flag 2016-05-07 12:42:47 -04:00
21f05c464f Fix tool buttons being unresponsive 2016-05-07 12:42:28 -04:00
6d50497684 MSVC: Link whatever Boost version is available
(Will cause problems if multiple versions are available though.)
2016-04-30 13:58:19 -04:00
8b792aea75 Eliminate some offscreen surfaces in the scenario editor
- This fixes an issue where parts of the UI were filled with black or random noise.
- This also creates some noticeable lag while drawing, though.
2016-04-29 13:36:31 -04:00
836a7a715c Merge branch 'master' from Windows 2016-04-28 19:32:06 -04:00
ca2b6c5c4f Fix crash when editing monster summoning ability 2016-04-28 19:30:10 -04:00
3166d0d002 Free editor splash image after splash screen
Since it's only used once, there's no need to keep it around.
2016-04-28 19:29:54 -04:00
Ben Scott
ddfe50298a added override annotations to various UI functions in src/dialogxml/ 2015-12-22 02:22:15 -05:00
Ben Scott
0bf48dd6ab fixed a bug which caused the menu buttons to *sneeze*. 2015-12-22 01:09:14 -05:00
Ben Scott
a44b298012 fixed some catch.hpp includes in the tests, fixed a deprecated event cast in appleevents.mm 2015-12-22 00:05:52 -05: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
63df1e4401 Fix Windows build 2015-10-15 15:16:05 -04:00
ba984279b0 Some item ability stuff
- Two new item abilities that increase damage as sp/hp is lost
- Two new item abilities that reduce damage as sp/hp is lost
- Support for using sp/hp as a weapon's key skill to determine hit chance
2015-10-12 14:11:27 -04:00
e744320518 Fix spelling 2015-10-06 22:17:30 -04:00
5cab4fdb9f Fix instant help received not being remembered 2015-10-06 22:17:29 -04:00
168e4c5e52 Fix missing default button in some custom choice dialogs 2015-10-06 22:17:28 -04:00
76168b2071 Nuke several globals; some were unused, others moved to universe 2015-10-06 22:17:28 -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
906016b98d Fix some cases of wrong cut-off point for tiny item graphics 2015-10-06 00:00:46 -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
fc8a6fa5c5 Fix MSVC build 2015-10-04 22:52:13 -04:00
1b95f06207 Split dlogutil.hpp into separate headers for each dialog 2015-10-04 22:45:01 -04:00
177a38d171 Make list of basic buttons a source file instead of a header. 2015-10-04 21:15:28 -04:00
cae5fc3140 Rearrange the basic_buttons array to avoid the extra indirection step
- All buttons from the array that were strictly related to UI have been removed.
- Some new buttons have been added. The duplicate Leave button has been removed.
2015-10-04 21:11:16 -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
d178dcea63 Allow customizing how much food a waterfall takes 2015-10-04 18:26:16 -04:00
28a513a4a0 Fix the red push button when used in dialogs 2015-10-04 00:36:16 -04:00
bb26fb35ec Raise starting skill points from 60 to 65 for blank characters.
This means that a party of all blank characters has the same effective total skill points as the prefab party.
2015-10-04 00:24:54 -04:00
d908cdff9c Tweak Vahnatai PC traits and add Magery item ability
- Vahnatai no longer have a bonus to mage spells (that's now the Magery item ability)
- Vahnatai XP gain bonus changed
- Fix sliths being noted as resistant to poison (they aren't and never have been)
2015-10-03 23:55:52 -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