Commit Graph

3887 Commits

Author SHA1 Message Date
8e4e783df0 Sort most files alphabetically in the XCode project 2014-04-14 13:52:07 -04:00
9f5480ba8b Add methods to rectangle to get its corners as locations 2014-04-14 13:52:07 -04:00
7afaaf3a60 SFML doesn't like textures of size 0 2014-04-14 13:52:06 -04:00
9d6867d15b Suppress the superfluous "validates" messages from the xmllint output 2014-04-14 13:52:06 -04:00
a6a030052c Implement loading of .meg files using the Resource manager
- I extract pixel data from the resource without using QuickDraw
- Both resource-fork and data-fork .meg files work

Related changes:
- The custom graphics textures are now wrapped in a custom class
- bmp images are loaded if a meg is not found

Incidental changes:
- Various TODO notes
- Fix cScenario::spec_strs skipping several strings and potentially fetching out-of-bound entries
- oopsError now uses string streams instead of sprintf
2014-04-14 13:52:05 -04:00
4db8a0943b Convert legacy structs and endian-swapping routines to use exact-width types
- This because I discovered my compiler makes the long 8 bytes instead of 4
2014-04-14 13:52:04 -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
b9de23897e Revert "Seeding the PRNG on every call to it."
This reverts commit 7168ee91de.
2013-10-21 18:21:11 -06:00
Sylae Corell
90f4e58f98 Revert "Fixing a bug with the redone PRNG"
This reverts commit 75970023b7.
2013-10-21 18:21:02 -06:00
Sylae Corell
75970023b7 Fixing a bug with the redone PRNG
Under the current system, it would have failed to be random if two calls
were made during the same msec. It will now throw in the previous rand()
in the new seed, which should prevent duplicates (although the next seed
in the same msec will be predictable, it's not like we need to be
cryptographically secure here)
2013-10-19 14:39:10 -06:00
Sylae Corell
60326e8cea Adding some more gitignores
Codeblocks spam, as well as blades.ini, which sometimes pops up randomly
2013-10-19 14:25:21 -06:00
Sylae Corell
7168ee91de Seeding the PRNG on every call to it.
Hopefully this will make things slightly more random. Seriously, Jeff?
Why no seed?
2013-10-17 19:59:32 -06:00
Sylae Corell
771af5fafc Added a new Randomize SDF Special Node (General)
Resolves issue #32
2013-09-12 18:47:14 -06:00
Sylae Corell
f27e0e51b6 Updating build system URL again (yay jenkins!) 2013-06-30 22:18:54 -06:00
Sylae Corell
c43e921700 Update the readme, the nightly-builder now works!
Also this is totally not a test to make sure the webhook pushes
properly.
2013-06-30 16:54:48 -06:00
redsaurus
0082a57047 Character Editor Savefiles Fix
Possible fix for save files not being selectable in the Character
Editor when using WINE. Just copies file selection code from the game.
2013-06-25 21:20:05 +01:00
Sylae Corell
ef3b3d26f7 Typo fix, "Lightning" -> "Lighting" 2013-06-20 19:14:28 -06:00
Sylae Corell
1502372135 More Code::Blocks files being gitignored 2013-06-20 19:06:26 -06:00
Sylae Corell
79fb502eb5 Updating the .gitignore to filter debug trash 2013-06-20 18:35:52 -06:00
Sylae Corell
d289ae871f Partially fixing issue #32 2013-06-20 18:34:01 -06:00
Sylae Corell
3e3ffc1127 Readme typo fix, plus some handy links 2013-05-25 04:04:18 -06:00
Sylae Corell
0fa74b5cab Create README.md
This is essentially a copypaste from the Gcode project, although I've made a couple changes and will probably make more.
2013-05-25 04:33:14 -05:00
Sylae Corell
4e94cc66cb added a .gitignore for those pesky binaries 2013-05-25 03:18:09 -06: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
5f94f2cf49 - Replaced the former "How to Order" icon with a "Support and Downloads" that opens the BoE forum in the browser.
- Updated forum URL...again.

git-svn-id: http://openexile.googlecode.com/svn/trunk@171 4ebdad44-0ea0-11de-aab3-ff745001d230
2013-01-24 22:03:06 +00:00
Sylae Corell
cd30d044db Added TeX documentation (WIP) and image. This format will allow for better VC, easy exporting to multiple formats, and make automated building much easier.
git-svn-id: http://openexile.googlecode.com/svn/trunk@170 4ebdad44-0ea0-11de-aab3-ff745001d230
2013-01-18 01:06:33 +00:00
Sylae Corell
bbfbe2ec9a Following in the footsteps of r168 by also doing the Char Ed and Scen Ed.
git-svn-id: http://openexile.googlecode.com/svn/trunk@169 4ebdad44-0ea0-11de-aab3-ff745001d230
2012-05-06 15:59:12 +00:00
Sylae Corell
1b7c5a6c2b Changed from a date versioning scheme to standard versioning.
-Titlebar no longer shows version
-Help->About now shows version number and SVN revision

git-svn-id: http://openexile.googlecode.com/svn/trunk@168 4ebdad44-0ea0-11de-aab3-ff745001d230
2012-05-06 15:42:41 +00:00
Sylae Corell
ad6163aa0f Added NSIS install resources and install.nsi script.
git-svn-id: http://openexile.googlecode.com/svn/trunk@167 4ebdad44-0ea0-11de-aab3-ff745001d230
2012-02-25 21:05:19 +00:00
Sylae Corell
159306424f Added makefiles for cross-compilation to Win32 from linux systems.
-Added Makefile-Nightly-* for compilation using mingw32. amd64 makefiles currently not working due to mysteriousness in the apt repo (*)
-corrected cases in BLADPCED.RC, BLADES.RC, and BLSCENED.RC so they build properly on case-sensitive systems (*)
-Fixed a typecasting error in dlogtool.cpp and a random comma error in tfileio.cpp (ScenEd)
-Added *_private.rc files to repo to prevent build anarchy with windres.

git-svn-id: http://openexile.googlecode.com/svn/trunk@166 4ebdad44-0ea0-11de-aab3-ff745001d230
2012-02-25 03:57:36 +00:00
Icelizarrd
c8200e94ac Minor change to the Windows Scenario Editor:
Previously, when saving a scenario, it wrote uninitialized variables in lieu of the hashed/encrypted values that the original editor used for password checking. (Stored in flag_a, flag_b, etc.) That made it incompatible with earlier editors (such as Super Editor), which expected a password of "0", which is to say, data hashed using 0 as the argument.

This commit just adds the old password code back in, and saving now gives all scenarios a password of "0". Loading behavior is still unchanged.

git-svn-id: http://openexile.googlecode.com/svn/trunk@163 4ebdad44-0ea0-11de-aab3-ff745001d230
2011-06-20 05:20:53 +00:00
Sylae Corell
ecb123b6ab Updated message board URL in "Help -> About Boe" dialog.
git-svn-id: http://openexile.googlecode.com/svn/trunk@162 4ebdad44-0ea0-11de-aab3-ff745001d230
2011-02-05 21:29:41 +00:00
Chokboyz
a98e69763a Classic Blades of Exile :
- Minor adjustements to some random checks (aligned code for to-hit chances, assassinate and lockpicking).
- Fixed a potential buffer overflow of the "delayed specials" queue that could happened with the massive use of stairway nodes in a node chain. Cleaned the handling of "town entry/exit" nodes in general.

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@161 4ebdad44-0ea0-11de-aab3-ff745001d230
2011-02-05 15:29:39 +00:00
Chokboyz
1fb69d8754 Classic Blades of Exile :
- Dying to a trap while attempting to open a container won't display the "get items in container" dialog with no alive character anymore.
- Casting the priest Light spell now updates the surrounding areas automatically (like Light and Long Light mage spells; moving or waiting isn't required anymore).
- Debug and Ghost mode are now turned off when loading a game.
- The shop scrolling bar is now properly cleaned up when loading a game while shopping.
- Items are now automatically combined when identified in a shop. To avoid any loss of information, the game now gives the identified item name in the message window (format : "Your item is identified. (full_item_name)"
- If an "active" character (i.e solo fighting) is incapacitated (AP reduced to 0 because of webs, sleep, paralysis, etc) the rest of the party (if present) is now activated the next turn.
- Entering a space containing the special node number 50 won't "force move" the party anymore.
- Added a compatibility option (mainly testing purpose) : "specials are triggered when on boat".
- The restart option of the death menu now works as intended.
- Finally renamed the "Heal All" monster priest spell from "Full Heal" to "Revive Self". That should prevent any further confusion.
- Using items now always updates the ap counter.
- For the sake of consistency : changed labels "Power Potion" to "Energy Potion" potions in the Alchemy menu.
- Redrawing the screen is now correctly handled by specials in all mode (e.g a special that changes a terrain will correctly redraw the screen, even if it was called by looking or moving).

Scenario Editor :

- Redid the custom pictures drawing implementation : custom pictures should now always appears and redraw (terrain, animated terrains, monsters, items, preset items, ...).
- It is now possible to directly give the "Drain missiles" ability to bows and crossbows (use the "Weapon Ability" menu).

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@160 4ebdad44-0ea0-11de-aab3-ff745001d230
2011-01-09 19:50:46 +00:00
Chokboyz
1fb77013b4 Classic Blades of Exile :
- Various aesthetics fixes (no more buttons cut in half, justified some buttons, etc)
- Clicking the help icon next to the (unused) job button now correctly displays help.
- Redid the implementation of the (new) "check statistic node" (replaces "has enough mage lore") to prevent potential compatibility breaking with legacy scenarios.
- Small change to the (new) "Set town status" (replaces "Make Town Hostile") for the same reason.
- To clarify, renamed the "Dispel spirit" item ability to "Ravage spirit" (as it is, in fact, the spell called by the ability).
- For the same reason, renamed the monster spell "Heal All" to "Full Heal", as it isn't a mass spell but a powerful (and reliable) self-healing spell for monsters.
- Aligned the sleep immunity on the mac version : Slimes (regardless of the monster number), Stone and Undead types monsters are immuned to sleep.
- Dart throwing now only takes 2 ap for monsters (corrected from invisibility ability).
- Field generating monsters are now immuned to the type of field they generate (corrected from an Exile 3 incomplete transition).
- Rewrote the pending special queue for better events handling (no more potential overflow, entering/exiting town events are now sure to happens)
- Implemented the "No Terrain Animation" option.
- Un/Equipping something while in combat now correctly updates the ap display.
- MOnsters missile abilities now show their correct damage range in description (game and editor).
- Bashing weapons charges (if any) are now correctly shown (as usual, next to the name).

Codewise :

- The game shouldn't check if the item to be equipped is food anymore.
- Replaced lots of number checks by "human-readable" constants (some new).
- Removed some false checks about awaken spell supposed to work as dispel field.
- Fleeing and winning an outdoor battle now call the run_special function with the correct parameter (was reversed, with no consequences, since it's never checked)
- AI doesn't check the monster number, when deciding if the monster should cast a mage spell, anymore.

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@159 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-11-26 21:27:18 +00:00
Chokboyz
ab9d0cfa93 Minor adjustement to the last patch : replaced the "prog make version" fields in the scenario editor with a switch that controls legacy compatibility (as "prog make version" is to be handled by the editor itself).
Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@158 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-09-28 20:44:44 +00:00
Chokboyz
d83aa6b55c Classic BoE maintenance release :
Classic Blades of Exile :

- Fixed a compatibility breaking issue concerning Show/hide town nodes.
  Such nodes work the same way it were (i.e flawed) in legacy scenarios, fixing problems about towns that should appear but don't.
- Petrifying touch ability acts again as Disease touch in legacy scenarios, preventing the "vorpal cockroach" syndrom.


Classic Scenario Editor :

Two new working fields in the Scenario Details dialog :

- Minimum version, which is unused for now (it represents the minimum version of the game that is needed to play the scenario)
- Program Make Version (not to confuse with Scenario Version), which is the version of the scenario "format" to use :
	- first number is the major version : set to 1 for legacy scenario, hence forcing legacy compatibility.
	  Anything higher is "new scenario" format and makes the game use fixed features.
	- the two next numbers are unused for now.

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@157 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-09-27 00:51:10 +00:00
Chokboyz
1bfb19304c A try at standardizing filenames' case in the Classic BoE branch (Win32), as described in the Issue 25.
(Game)

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@154 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-07-12 04:10:14 +00:00
Chokboyz
b2dbbf096f A try at standardizing filenames' case in the Classic BoE branch (Win32), as described in the Issue 25.
(Scenario Editor)

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@153 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-07-12 04:08:14 +00:00
Chokboyz
6da7cc0da5 A try at standardizing filenames' case in the Classic BoE branch (Win32), as described in the Issue 25.
(Character Editor)

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@152 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-07-12 04:04:39 +00:00
Chokboyz
4aef873372 Fixed a code collision in a previous attempt at merging Windows and Mac codes, which would prevent the move_to_zero function to work with short types.
Most obvious effects were infinite bless, haste, poison, webs not cleaning, etc

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@151 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-05-25 23:30:07 +00:00
Chokboyz
b7f759ba0f Minor correction to the Dev-Cpp custom makefile.
Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@147 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-05-01 13:56:07 +00:00
Chokboyz
46aad7201c *Fixed a bug that prevented the Good Constitution Trait from giving bonus to shrug off disease.
*Fixed the encumberance calculation function, the last 8 items are no longer ignored.

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@146 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-04-01 22:12:05 +00:00
Chokboyz
8fa380832c *Added a custom makefile for DevCpp which solves the ressources multiple-definitions problem (Game and Editor, the Character Editor wasn't affected).
Following requests/reports :
Blades of Exile :
*Corrected the Skill and Giant Strength abilities handling so that they actually increase the chances of hitting instead of decreasing it (damages were correctly handled).
*Now trying to enter a blocked space multiple times won't produce a lot of message but add a (xX) suffix to the "blocked:" message (X number of tries to enter the space)

Minor Editor changes :
*When opening a new town or assigning a new town to a town entry on outdoor map, the input field is already selected (extended the basic function for flexibility).

Code-wise :
*Readded legacy monster skill constants in CONSTS.h, to make the original code easier to understand for newcomers.

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@145 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-03-22 02:27:00 +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
Sylae Corell
e7d76c1a8e More cleanup of documentation.
git-svn-id: http://openexile.googlecode.com/svn/trunk@143 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-02-07 20:54:56 +00:00
Chokboyz
9c062f368c Implemented an old Celtic Minstrel's suggestion : the kill_monst() function does now work on a local copy of the monster. That should be safer and fix all problems with faulty special nodes chains (like in Bandits 2 when the final pink boss form is destroyed then immediately replaced with the blue boss form, so that the "special on death" node checked is the new blue boss one ... effectively locking the game in that case)
Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@142 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-12-06 18:14:36 +00:00