Commit Graph

306 Commits

Author SHA1 Message Date
62f2259fb9 Hacked at it until the parser stopped crashing.
It now seems even uglier than before.
And it still doesn't actually work.
2014-12-03 05:01:06 -05:00
c119ffc242 More little grammar simplifications 2014-12-02 22:23:31 -05:00
e51cdb5c1d Simplify grammar a bit by specifying a skip parser 2014-12-02 20:56:10 -05:00
1b97c6557b Finish up most of the semantic action type stuff
- The parser does not work at present; it does at least compile and link, though
2014-12-02 20:48:31 -05:00
9da92fb904 I'm thinking allowing names here might be a bad idea 2014-12-02 18:44:38 -05:00
4a68a5b293 Unminify the semantic actions 2014-12-02 18:33:51 -05:00
5fe8b28b2e Doing the opcodes as a symbol table seems better 2014-12-02 18:30:25 -05:00
d1a8db9b70 Sample nodes file, more semantic actions
- Note: This parser is still untested.
2014-12-02 17:07:39 -05:00
01f0a62160 Define a grammar for special node definition files 2014-12-02 15:59:38 -05:00
a95f1c5b93 Fix the line-of-sight stuff that was broken thanks to 0 being implicitly convertible to std::function 2014-12-02 15:54:50 -05:00
03c64ebd7b Eliminate use of __attribute__
Ideally this would be standard C++, but here I've settled for things that should be supported by both clang and VS/cl.exe:
- Deprecated attribute retained, but now uses __declspec syntax
- Packed attribute replaced with pragma pack, except one instance where it unnecessary
- Aligned attribute replaced with explicit padding bytes inserted in the structs where needed
- Unused attribute simply removed (though where possible, the unused entities were also removed)
2014-12-02 15:54:50 -05:00
d61c0a5c1e Convert five more dialogs and fix the string choice dialog
(The latter was always returning 0)
2014-12-02 09:44:21 -05:00
d64770b1e0 Use folder references for strings and dialogs.
This means I won't have to remember to explicitly add each new file to the build.
It also means they'll be automatically kept sorted.
2014-12-01 22:51:18 -05:00
e6057387eb Strictify PC main status enum 2014-12-01 21:38:20 -05:00
4a68c16c2a Some little bits
- Check is_block as well as is_barrel in some places
(is_block is a feature new to OBoE, I have no idea if it works yet)
- Print an "equip bolts" message when trying to fire a crossbow without them
2014-12-01 20:12:45 -05:00
e86362d294 Strictify the terrain trim enum 2014-12-01 20:04:30 -05:00
d900c7edef Enumify terrain blockage and generalize the line of sight function
This should probably be two separate commits, but they're tangled together and I don't want to spend the effort to disentangle them.
2014-12-01 19:50:19 -05:00
afd45b3774 Strictify item weapon type enum 2014-12-01 14:57:18 -05:00
3a1de0c890 Strictify item variety enum 2014-12-01 14:46:17 -05:00
f0ededde17 Somehow, these lines got out of order, throwing off the whole conditional
- If I read the code correctly, the result was that you could sell weapons other than crossbows bolts without dequipping them first
(Fortunately && has higher precedence than ||, otherwise it would've been a lot worse.)
2014-12-01 13:44:24 -05:00
8a3db4177f Edit text fields now clip overflow and scroll 2014-12-01 03:44:15 -05:00
3fa0a26ec3 no message 2014-12-01 02:01:24 -05:00
70696dc42f Text fields now support multiline editing! 2014-12-01 01:20:28 -05:00
45caa9d7ff Apparently some dialogs were missing from the copy phase 2014-11-30 21:32:44 -05:00
9b626ccf44 Restore talk face 2014-11-30 21:20:35 -05:00
3fa6d0558e Restore conversation help button 2014-11-30 20:54:54 -05:00
6c0fc58bf1 Rewrite the conversation rendering and interaction engine
- The only functional change is that clickable words are now red
2014-11-30 20:38:21 -05:00
048de39583 More tweaks of scan_for_response 2014-11-29 22:02:41 -05:00
32d79e6099 scan_for_response - vast improvement in readability 2014-11-29 22:00:44 -05:00
3f857cc568 Seperate the logic of calculating where to draw the text from the code that actually draws it 2014-11-29 21:12:06 -05:00
84f2e7b831 Refactor out currently-minor code duplication in text drawing routine 2014-11-29 19:48:36 -05:00
a9ea0a114c Make text drawing mode a strict enum 2014-11-29 19:41:54 -05:00
6fae493080 Little bits
- Fix monster pic field stealing focus forever
- Fix "ask to save" behaviour
2014-11-29 16:38:31 -05:00
b537fabd13 Allow shift-tab to cycle backwards through tab order 2014-11-29 16:37:26 -05:00
84f53a8a7d Dialog tab order implementation
- Defaults to order of definition in file
- tab-order attribtue can be set to a postive number to force towards the start, or a negative number to force towards the end
2014-11-29 16:03:54 -05:00
13d00cd27a Convert the edit special item dialog 2014-11-29 12:12:01 -05:00
7aa3ba3794 Refactor the various special item arrays into a single structure array 2014-11-29 12:02:28 -05:00
1cdc7ddb7c Misc bits 2014-11-29 03:21:28 -05:00
ed056368c1 Make all the controls non-copyable so that I don't get weird, insidious, hard-to-track errors from forgetting a reference mark like I did when converting the edit item type dialogs 2014-11-29 02:14:48 -05:00
c855983de4 Convert item type editing dialogs 2014-11-29 02:13:49 -05:00
3b95d6d7c8 Implement main scenario editor menus
- Edit, monster, item menus still missing
- Fix some formatting in the menus file
- Clean up some verbose stuff
2014-11-28 02:28:43 -05:00
4f5b59e53d Fix scenario editor save on quit dialog 2014-11-28 02:19:56 -05:00
02e4f0a5d6 Fix PC Editor "Hide" menu item 2014-11-28 02:19:36 -05:00
07ff864f4b Convert monster abilities dialog 2014-11-28 02:19:07 -05:00
41c3396aa3 Tear out most of the legacy code in the scenario editor - see below for details
- All Carbon code is gone
- Many dialogs converted; some are still left unimplemented since they still need to be converted
- Menus converted to a xib file
- The giant arrays specifying the configuration of the special node dialog for each special node type have been replaced with maps and sets.

Changes to dialogs:
- pict choice dialog can now show picts of differing types; this was required for picking a monster graphic, as monsters of all sizes need to be shown in the same dialog
- string choice dialog can set the title, and properly shows the currently selected string
- LEDs now accept font format
- Fixed LED group's calculation of its rect
- Fixed LED group crashing if it has no selection
- Tabbing between text fields now works
- Fix display of larger monster graphics in dialogs
- Fix the script element content showing in the browser preview
2014-07-12 22:13:27 -04:00
a4430cdf5a Fix spellcasting and dynamic menus
- Spell targeting line and array draws nicely, though not the same as the original
- Fix targeting falsely complaining about being off the edge of town
- Monster info dialog works properly; attacks now display correctly
- Fix dialogs always showing the wrong terrain or monster graphic
- Spell menus, monster menus, and PC editor item menus all work
- Spellcasting dialog now chooses the correct spell
- Fix out-of-place LED in spellcasting dialog
2014-04-22 02:06:31 -04:00
d90a006e43 Change install location of base scenario file 2014-04-22 01:58:12 -04:00
434d4c522f Fix several crucial bits of data not being loaded
- Creature save data
- Outdoor wandering encounters
- Fix crash when entering outdoor combat after loading
- Stop using char types in cItemRec
- Move all pending attributes from cMonster to cCreature
2014-04-21 21:35:26 -04:00
e8022df514 Don't rely on exceptions for normal behaviour 2014-04-21 14:06:38 -04:00
9013096624 Fix crash when changing display mode 2014-04-21 13:56:05 -04:00