Commit Graph

431 Commits

Author SHA1 Message Date
eb2e8f3536 Fix button label in one of the PC editor dialogs 2014-04-16 17:50:16 -04:00
199f84e0db Make dialog preview stylesheet default to dark background 2014-04-16 17:49:13 -04:00
caa461f8e7 Tear out most of the legacy code in the PC editor - see below for details
(Scenario Editor is unaffected by this commit.)

- Menubar converted to a .xib file
- Don't include the Info.plist in "Copy Files" stage
- Several more dialogs converted; as before, the source resources have had their resource name changed to the new filename
- One more converted STR# has been included

There were several functions in the PC Editor code that also existed in the BoE game code. I've moved these into the pc.editors.cpp file, so that there's only one copy of each.
- display_alchemy() functions changed signatures
- moved keyToChar() function into a common file (winutil)
- Several constants and globals moved to pc.editors.cpp

Supporting changes to dialog framework:
- New formatting option to set the frame style; this because the PC editor uses a different frame style in some contexts
- Added global default dialog background setting
--> This was necessary to correctly set the default text colour
--> Will also be needed for the scenario editor, which uses a different default background

Other changes:
- Add option to load_scenario to skip loading the strings
- Fix for crash in soundtool in the event of initialization before playing the first sound
2014-04-16 17:07:08 -04:00
2ae75df4a7 Fix the blue arrows for look mode 2014-04-14 22:15:33 -04:00
48f3335160 Fix "missing" Done button in PC info dialog
- Also fix wrong resource name - the pc-spell-info DITL was mistakenly named pc-info
2014-04-14 15:51:30 -04:00
dd02dcc5d3 Realign PC spell list dialog 2014-04-14 15:51:30 -04:00
7b194c26ba Fix mage/priest spell buttons in PC info dialog being labelled with the level of the skill 2014-04-14 15:51:30 -04:00
152f828e44 XSL dialog preview now shows default-state LEDs 2014-04-14 13:55:53 -04:00
8d76aed26c Add preferences option to skip splash screen on startup 2014-04-14 13:55:52 -04:00
85afa07382 Prefs dialog alignment tweaks 2014-04-14 13:55:52 -04:00
860305df91 Organize preferences dialog so that the elements are in display order 2014-04-14 13:55:51 -04:00
fccc1a8c54 Zap fancy apostrophes in strings and dialogs 2014-04-14 13:55:50 -04:00
f79a300e76 Fix incorrect ID in 2str dialogs 2014-04-14 13:55:49 -04:00
68c8ef7ba7 Import the TinyXML dependency into the repository 2014-04-14 13:52:03 -04:00
57abf3ab68 Make the XML validation phase check against the schema, and fixed all the errors it found 2014-04-14 13:52:03 -04:00
1b72d25d52 Replace DialogXML DTD with an XSD schema 2014-04-14 13:52:03 -04:00
c413d292a9 Tear out most of the legacy code in the game - see below for details
(PC Editor and Scenario Editor are unaffected by this commit.)

Things removed:
- All references to Carbon and QuickDraw are gone.
- No more Resource Manager; the game no longer relies on old resource files at all
- The old dialog framework (from dlogtool.c, functions usually prefixed with cd_) is no longer used.
- Files that weren't being compiled
- Boost libraries that are now in the C++ library (function, shared_ptr)
- Obsolete build settings

Replacement dependencies:
- Boost Filesystem replaces references to things like FSSpec
- SFML replaces all the QuickDraw code and most window management
- Cocoa replaces AppleEvent management, menu management, and some window management
- I wrote a resource manager interface to mimick the important aspects of the behaviour of the Mac Resource Manager
- I had to rewrite some functions that QuickDraw provided natively, such as clipping regions; not all of these are tested

Things added:
- Every referenced dialog has been converted from a DITL resource into the new XML-based dialog format.
- All referenced STR# resources have been extracted into simple text files
- Now compiles against Mac OSX 10.7 SDK and libc++
- The first item in the Help menu opens the docs on Sylae's website
- It seems all the constants for soundtool vanished somewhere, so I added them back from the original Mac source

Other changes:
- Updated to XCode 4(?) project format
- Added the xcschemes created by XCode 4; I'm not sure how important these are, but they seem like they might be important
- Added document on converting dialogs to the XML format.
- Make string formatting mismatches into errors instead of warnings
- Disable error limit
- Graphics sheets that previously used masking now have alpha transparency
- Converted all graphics sheets to 8-bit PNG
- Trimmed white border from intro image
- Converted dialogs in the resource file have their resource name set to the name of the XML file of the converted version
- Referenced string resources in the resource file have their resource name set to the name of the text file of the extracted version
- Add the black-and-white patterns from the PAT resources to the pixpats.png; at least one of them is used somewhere in the game
- Recreated the menu.xib as a Cocoa xib file instead of a Carbon xib file
- Disable GNU C++ extensions; maybe this'll make it easier to compile with cl.exe later
- Add marks to the enormous handle_action function to make it easier to navigate\
- A build step to validate the XML dialogs using xmllint (doesn't quite work properly yet but does at least catch dialogs that are not well-formed)- Fix a lot of warnings about assigning string constants to non-const char pointers
- Fixed the file and application icons (which had somehow become corrupted at some point)
- Lots of additional functions in the custom location and rectangle classes, including implicit conversion to and from SFML rects and vectors; also they now store coordinates as int instead of char
- A new enum for encounter note types
- Much tweaking of the encounter note recording mechanisms
- To ease porting, I added a simple function that converts from classic Mac ticks (about 1/60 of a second) to the SFML time type
- Python script to convert STR# resources to txt files, replacing newlines with vertical bars
- Extracted the Mac font (Dungeon Bold) from the resource file and also added the Windows font (MaidenWord)

XML Dialog Framework changes:
- Remove the static initialization object in favour of manually calling cDialog::init()
- {set,get}Format() no longer used for colour; there's a dedicated {set,get}Colour() instead
- draw() methods unprotected in the control classes so that controls can be drawn in the main window
- There's no longer a friend relationship between the dialogs and the controls
- Fixed buttons duplicating the "depressed" boolean
- Buttons now properly offset the label for tiny and push buttons, and for LEDs
- Buttons no longer assume that either none or both of "width" and "height" are given in the XML
- Add {get,set}BtnType() to cButton
- cLedGroup now overrides handleClick(), which has also been made virtual; this was necessary for LEDs within a group to properly hilite while being clicked
- Add addChoice() to cLedGroup to insert additional LED choices
- Moved the key enums and cKey to a separate file
- Add a method to get a control's attached key
- Add methods to get and set a control's rect and position
- Controls can now directly take a window as a parent rather than a dialog
- Add addLabelFor() method to cDialog which adds a static text control as a label for another control
- Remove hack for storing a dialog result of arbitrary type in favour of boost::any
- Add method to get default text colour for a dialog
- Add method to get a dialog's rect
- Add method to add the same event handler to multiple controls in a dialog
- Add concept of default button to dialogs
- Add enum for text field type (currently either number or text)
- Implement the text field without use of native controls, including somewhat decent text input and a flashing insertion point
- cPict no longer stores references to every sheet; it fetches them as needed from the resource manager
- The many draw functions in cPict are no longer static, since they need to access the window containing the pict (before they could only be static due to QuickDraw's global state)
- Add setPict() without a type argument to change the graphic without changing the type, which is a common operation
- Add a scrollbar control; the specifics aren't implemented yet
- Change signature of the record callback for cStrDlog; it will no longer be passed the strings
- Publicize the no-button constructor of cChoiceDlog; it'll assume "okay" is the only button
- Add operator-> to cPictChoice for accessing the underlying dialog
- Add constructor to cPictChoice that takes a starting and ending pic num
- Remove err parameter from giveError
- Many more keys handled, plus support for catching copy, paste, cut, and select all keyboard shortcuts
- Text input fields take priority, overriding any other keyboard shortcuts in the dialog, but they never catch help (F1), escape, or enter
- Some changes to the format itself:
-> keys go in the "def-key" attribute, but modifiers go in "key-mod"
-> "clickable" is no longer a recognized attribute
-> "title" is now a recognized text size (18pt, even larger than "large" at 12pt)
-> "defbtn" attribute on the root element
2014-04-14 13:52:01 -04:00
Sylae Corell
f443171f7c Uploading the start of a schema-thing for boes, a new scenario format.
git-svn-id: http://openexile.googlecode.com/svn/trunk@172 4ebdad44-0ea0-11de-aab3-ff745001d230
2013-01-25 02:31:25 +00:00
Sylae Corell
f42f974453 Modified Win32 Character editor icon to make telling apart from game easier. I also added a PNG of it to /rsrc because iirc the mac resource fork gets screwed over by windows machines during changes or something like that.
git-svn-id: http://openexile.googlecode.com/svn/trunk@144 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-03-05 23:06:57 +00:00
Chokboyz
1f4d01118c Fixed some minor errors in the Blades of Exile Base.
Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@128 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-09-24 15:32:38 +00:00
f8990c1c9b - Added some terrain graphics
- Stripped out the navbar in the docs to a separate JS file, to reduce redundancy and improve maintainability
- Probably other stuff that I have long forgotten; hopefully nothing code-breaking.

git-svn-id: http://openexile.googlecode.com/svn/trunk@125 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-09-15 22:43:58 +00:00
9ed48e4be1 Moved a few graphics to where the Mac version will expect to find them (when I get around to implemented the Mac/Windows graphic switch).
git-svn-id: http://openexile.googlecode.com/svn/trunk@105 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-29 20:01:33 +00:00
Chokboyz
be5db37711 Graphical update :
- Added Win version of the Mac PNG graphical sheets.
Some pictures have not been changed because Windows equivalents don't exists (alter on cave floor, truncated large boulder, lots of pics for TER_7, ...).
- Added a new version of STATAREA.BMP with the job button readded.

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@103 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-29 13:48:26 +00:00
Chokboyz
cd3b2cfc43 Trivial Blade Base corrections
git-svn-id: http://openexile.googlecode.com/svn/trunk@95 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-15 11:11:22 +00:00
Chokboyz
0388e1f5c3 Added Windows graphic sheets + base scenario BMP
git-svn-id: http://openexile.googlecode.com/svn/trunk@92 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-10 21:15:06 +00:00
7cd4a618b4 - Got rid of the prefix header in favour of directly including it in every file that needs it (though some files still need the include yet apparently work fine; perhaps a clean build would catch that)
- Replaced all occurrences of FillCRect with the new tileImage, to get away from 'ppat' resources.
- Fixed a minor error in the character editor where part of a text string was off the window.
- With the prefix header gone, libticpp.dylib has been removed; TinyXML++ is now compiled right into the program.
- The scenario editor splash screen is now loaded from a file.
- The pc editor title has its transparency problem fixed.
- Added an overload of tileImage that takes a RgnHandle instead of a Rect in order to replace the single occurrence of FillCRgn.
- Removed an unused function in boe.graphics.cpp
- Changed loading of patterns. Instead of loading each pattern individually from a resource, a single file containing all of them is loading. The arrays that formerly contained the actual patterns now contain the source rects of the patterns.
- Fixed the cursor hotspots (the coordinates were reversed)
- Removed the useless flip_pict that was written when I didn't know what I was doing.
- Fixed error in tileImage in which vrep and hrep were switched.
- Added code to tileImage to ensure that the pattern will line up with anything already onscreen, regardless of the rect to fill.
- Two images were altered: pcedtitle.png to fix the transparenct problem, and pixpats.png to add one pattern that had been missed (and also rearrange the smaller patterns a little)

git-svn-id: http://openexile.googlecode.com/svn/trunk@91 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-10 04:01:15 +00:00
78cd213972 In no particular order:
- Added some of the most basic dialogs
- Changed C-style <xxx.h> headers to C++-style <cxxx> headers
- Switched graphics to load from the PNG files in graphics.exd rather than from Blades of Exile Graphics (NOTE: Some graphics still don't work, probably because of incorrect source rects)
- Switched cursors to load from GIF files in graphics.exd rather than from Blades of Exile Graphics
- Moved Niemand's tileImage functions from boe.graphics.cpp to graphtool.cpp, so they can be used by all three programs.
- Added some string lists in .txt files
- Made cursors into an enum
- Rewrote the code for displaying the Edit Terrain dialog to use the new engine (not tested yet)
- Fixed some __attribute__((deprecated)) stuff
- Most graphics are now loaded just after the custom graphics. This means they will be overridden by a file of the same name in the scenario's .exr folder.
- Altered modes a little so that when at the startup screen you are in MODE_STARTUP rather than MODE_OUTDOORS.
- Switched from function pointers to boost::function – the Boost libraries are now required.
- Finished off the new dialog engine and made gess necessary
- Added status icons as another type that can be drawn in dialogs
- C Wrappers for Cocoa cursors based on an Apple example. This is tested, and works perfectly.
- Added a switch in the program for using Windows graphics; however, there is no way as yet to set this flag, and in fact there aren't even any Windows graphics to use.
- Added include guards to graphtool.h
- Made separate mac and win directories within sounds.exa, since the Mac and Windows sounds are mostly subtly different (with two completely different!)

git-svn-id: http://openexile.googlecode.com/svn/trunk@90 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-07 18:18:24 +00:00
48210becd9 - added a system to display one or two strings and/or call a special the first time the party sees a particular type of monster
- added ambient sound, both outdoor ambient sound and monster vocalizing ambient sound (eg cat meowing when in sight)
- fixed an inconsistency whereby two sounds were swapped relative to their original Mac versions
- added (but haven't yet used much) a few more typedefs for clarity

git-svn-id: http://openexile.googlecode.com/svn/trunk@86 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-31 22:13:43 +00:00
5c91bc4062 Re-added the sounds (which were removed in the previous revision due to errors)
git-svn-id: http://openexile.googlecode.com/svn/trunk@80 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-29 04:52:06 +00:00
50829034a9 - Added enums for status and player race, traits, and skills.
- The player race enum has been expanded so that it can also be used as monster race; it's not yet used as such though.
- Additional races Vahnatai, Plant, and Bird added.
- Alter the terrain special flags so that they can be used as signed shorts in the few cases that require it, and changed dangerous terrain to combine the curse/bless and slow/haste cases.
- Fixed an unnoticed error which would have probably prevented monsters from being affected by conveyors.
- Refined the dangerous terrain special ability with more messages and also handling all cases except weapon poison.

git-svn-id: http://openexile.googlecode.com/svn/trunk@79 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-29 04:47:54 +00:00
2485e57514 Added an rsrc folder for common resources.
git-svn-id: http://openexile.googlecode.com/svn/trunk@78 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-29 01:35:13 +00:00