Commit Graph

37 Commits

Author SHA1 Message Date
6af129c277 - Nuked the storage_gworld and party_template_gworld. Monster, terrain, and PC graphics are now drawn directly from their sheets of origin. This is partly tested, and seems to work fine.
- Removed the terrain_pic and terrain_blockage arrays, which were redundant (though shorter).
- Cleaned out some of the commented code in boe.graphics.cpp and boe.graphutil.cpp
- Added a templated get function to cOutdoors::cWandering.
In the dialog engine:
- Important fields are now initialized to default values, as they should be.
- The absence of required attributes is now recognized as an error
- Added stack element to the DTD; no code support yet
- Added fore attribute to the dialog element to specify default text colour; DTD updated and code support added.
- Likewise with the def-key attribute on other clickable items besides buttons (which already had it)
- Updated stylesheet to fall back on the fore attribute when colour is unspecified
- When drawing default monster graphics, it uses m_start_pic instead of num as the index. This should be right, though it's untested.
Unfortunately, the dialog engine is still unstable.

git-svn-id: http://openexile.googlecode.com/svn/trunk@100 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-28 17:18:24 +00:00
e5ac5db275 - Got the new dialog engine into a semi-functional, mostly crash-free state!
- Created constants for the number of monster and terrain sheets, so that we can easily add more.
- Added init_sheets() function to initialize cPict's static variables.
- Moved the code for checking for an interrupt key out into a separate function so that it can be used elsewhere as well.
- Added error checking to make sure a sheet exists before drawing from it. (Note: Will need to catch the exception and draw a blank rather than simply terminating.)
- Fixed bug where status icons were drawn instead of terrain map icons.

git-svn-id: http://openexile.googlecode.com/svn/trunk@99 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-20 00:06:55 +00:00
269d6b0572 - Removed the SLEEP_TICKS and MOUSE_REGION macros (note: SLEEP_TICKS was at 2L, but I've changed it to 0; I think this should be fine, but I'm not sure)
- Stripped out the copying of external files (such as graphics, scenarios, bladbase) into a separate target which the other three are dependent on.
- Graphics.exd no longer included by reference; now the individual files are included directly.
- Added a recalcRect function to ledGroup, since it's a container.
- Added a special case to cLedGroup::setSelected to avoid a crash when no LED is initially selected.
- Added a few initializers to constructors.
- Changes to cDialog::parse<cPict> which were intended to prevent an access violation; unfortunately it doesn't work yet.
- Add cases to cDialog::parse<cPict> to handle PI_TER_MAP and PIC_STATUS.
- Fixed a stupid error in all specializations of cDialog::parse which resulted in an infinite loop.
- Fixed errors in some specializations of cDialog::parse in which an else statement belonged to a different if than it should have.
- Added code to cDialog::loadFromFile to turn the relative path in the argument into an absolute path.
- Fixed errors in cDialog::loadFromFile relating to incorrect use of the parser.
- Added exit statements to the catch clauses in cDialog::loadFromFile.
- Added definition of cDialog::init;
- Enclosed the WaitNextEvent call in cDialog::run in an if statement to ignore null events if they occur (I suspect they won't anyway though)
- Fixed errors in the Edit Terrain dialog definition which caused an exception to be thrown when parsing it: bold was changed to silom, key= was changed to def-key=
- Added status to the list of nullified GWorlPtrs in cPict::init.
- Changed the type of cPict::drawPict from map<ePicType,void(*)(short,GWorldPtr,Rect)> to void(*[])(short,GWorldPtr,Rect) - ie, it was changed from a map to an array because the map was causing an error for some reason.
- Fixed up the load_strings function, which didn't work at all due to a stupid logic error.

git-svn-id: http://openexile.googlecode.com/svn/trunk@96 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-16 22:43:51 +00:00
5001931033 - Split rect_draw_some_item into two versions, one to draw to the screen and on to draw to a GWorld.
- Temporary fix for the fact that PC #6 is often accessed.
- I think that's all...

git-svn-id: http://openexile.googlecode.com/svn/trunk@94 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-06-11 22:07:17 +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
851859d61e Cleaned out many of the warnings (reducing warning count from 718 to 334). Almost all the remaining errors are about unused parameters.
git-svn-id: http://openexile.googlecode.com/svn/trunk@85 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-31 01:38:48 +00:00
c55948c03f - Removed the ADVEN macro in favour of using the overloaded operatr[] on univ.party
- Removed all referenes to cPopulation::dudes in favour of the overloaded operator[]

git-svn-id: http://openexile.googlecode.com/svn/trunk@84 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-30 23:11:47 +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
6ef3b7c79d Nuked all occurrences of NIL, replacing them with NULL.
git-svn-id: http://openexile.googlecode.com/svn/trunk@72 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-25 03:51:29 +00:00
28f4368651 Numerous changes to terrain and trim. The changes to the scneario editor work as expected.
- New way of drawing walkway (doesn't work yet)
- New way of drawing roads (doesn't yet work correctly)
- New way of drawing trim (not tested yet)
- New way of handling marked specials (works in editor but not in game)
- New way of handling two-space rubble in the editor (works as expected)
- Merged several terrain special properties
- Deprecated several terrain graphics
- Completed (probably) the import & convert code for old-format terrain
- Probably other things that I have forgotten that have something to do with terrain
- A few other little things, bugfixes, etc

git-svn-id: http://openexile.googlecode.com/svn/trunk@56 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-09 14:11:39 +00:00
4dc75d51c0 - Merged two classes (cPopulation::cCreature and cTown::cCreature)
- Changes some C-strings to STL-strings
- Fixed the problem where the spiderweb logo would not fully appear if ShowStartupSplash is disabled

git-svn-id: http://openexile.googlecode.com/svn/trunk@54 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-07 02:50:16 +00:00
68dcf3cdef - Moved some files around for better organization
- Fixed compile errors in the other targets.
- Added three test save files: one with a party not in a scenario, one with a party who has just entered Valley of Dying things,
  and one with the same party just after leaving town.
- Added the new menu file for the game that I'm working on (not yet used)

git-svn-id: http://openexile.googlecode.com/svn/trunk@53 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-06 20:23:54 +00:00
f8701fdaff Tried in vain to get the game to write to a savefile in the newly created save format.
git-svn-id: http://openexile.googlecode.com/svn/trunk@52 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-06 19:49:07 +00:00
1cbb12e1b8 - Fixed more major bugs, both in game and scenario editor.
- Removed all remnants of the password code (I think).
- The game is now almost ready for beta.

git-svn-id: http://openexile.googlecode.com/svn/trunk@49 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-02 20:25:13 +00:00
27b95287bc Fixed a few errors from the previous revision, and nuked some of the compiler errors.
git-svn-id: http://openexile.googlecode.com/svn/trunk@46 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-30 04:21:24 +00:00
ce0b3c6089 Added enums for item ability, item variety, item weapon type, and terrain special ability.
git-svn-id: http://openexile.googlecode.com/svn/trunk@43 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-28 19:20:32 +00:00
e0115dd668 - Added a setting to skip delay when showing damage to the whole party. It's a hidden preference at the moment, like skip startup splash.
- Replaced all instances of Boolean with bool, TRUE with true, FALSE with false. (Except for a few cases where this resulted in a compile error.)

git-svn-id: http://openexile.googlecode.com/svn/trunk@38 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-27 19:41:06 +00:00
f28053ed0e - Added enum for scenario editor mode
- Rearranged the editor palette button code so that:
  - the gaps between rows are absent
  - the buttons that can't be used in town (set entrance) and outdoors (item buttons) are now hidden
  - the buttons are drawn one at a time instead of all at once, to pave the way for adding more buttons to fill the gaps
  - the buttons are shifted down enough to make room for the "Center:" line between the last terrain button and the buttons
  - the "Center:" line is no longer next to the final terrain button, to pave the way for adding more terrain buttons
  - the terrain picture for the current selection is shifted right to make room for a potential two more columns of buttons.
  - there are two separate lists each for whether a button exists and what it is
- Also altered the editor buttons sheet to support these changes.

git-svn-id: http://openexile.googlecode.com/svn/trunk@37 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-27 17:10:16 +00:00
74ec4c67b5 Fixed several bugs, including one where dialogs were not redrawn properly and one where random numbers were not in the expected range.
git-svn-id: http://openexile.googlecode.com/svn/trunk@36 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-27 13:14:24 +00:00
d3be0c107e Both the game and the scenario editor now properly load a scenario.
This means that the game can in fact be played – though saving is not currently operational.

git-svn-id: http://openexile.googlecode.com/svn/trunk@32 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-25 22:50:58 +00:00
3ba7021543 More refactoring. The code is ALMOST able to compile now – all three programs together give a mere 25 errors.
git-svn-id: http://openexile.googlecode.com/svn/trunk@31 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-25 05:12:14 +00:00
fad42597a6 - Fixed up file loading (but then broke it again)
- Reworked preferences to use plist
- Cleaned out the shareware code
- More tweaks to the dialog engine
- Edited dialog #869 (the choose prefab scenario dialog) to use new invisible button (type 6) and to remove the "Must be registered" lines.
- Tweaked window size so that the startup screen fits within it.
- More major refactoring work.
- A few additions/alterations to boe.consts.h

Current status:
- Scenario editor: compiles and runs, but can't load a scenario
- Character editor: don't know
- Game: Doesn't even compile
I wouldn't normally submit code that doesn't compile, but I have already made a lot of major changes in this revision.
I will submit a version that compiles as soon as possible.

git-svn-id: http://openexile.googlecode.com/svn/trunk@28 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-23 20:53:49 +00:00
a2c2a85a8e - Fixed some bugs in the dialog code.
- Dialogs in the scenario editor now show custom graphics.
- Scenario editor now works properly as a Universal binary.
- Started refactoring the structs into classes; so far this has only been applied to the game.
- Files now show proper icons (applications already did).
- Probably other things that I have forgotten.

Still not completely stable, but much closer.

git-svn-id: http://openexile.googlecode.com/svn/trunk@27 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-21 20:02:07 +00:00
7573c1ed98 - Fixed some bugs and inconsistencies in the dialog code
- Started a utility to quickly preview a dialog
- Moved the ppats from the individual applications into the Graphics file; reduces redudancy

git-svn-id: http://openexile.googlecode.com/svn/trunk@26 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-20 16:20:34 +00:00
457bbe3e85 Fixed the bug where dialog controls were not drawn.
git-svn-id: http://openexile.googlecode.com/svn/trunk@25 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-19 17:48:22 +00:00
4c78d68b2b Added (and put to use) several more SDF_ constants.
git-svn-id: http://openexile.googlecode.com/svn/trunk@24 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-19 15:43:04 +00:00
0794231c20 - Renamed all source files for better consistency and for a cpp extension.
- Added Bandit Busywork and the GPL license.

git-svn-id: http://openexile.googlecode.com/svn/trunk@23 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-19 14:25:48 +00:00
632f1e7b32 This revision entails a consolidation of the dialog code and its dependencies into a single place.
Formerly there were three separate copies of the dialog code; now there's only one.

It's still quite rough around the edges, though – the edit terrain dialog causes the scenario editor to crash,
and for some reason the dialog controls are not drawn in the game or in the character editor. I am still working
to resolve this.

It can't be seen in the diff, since it involves a binary file, but the resources representing dialogs for the character editor were
altered. Basically, every text item with a label of "0_105" was changed to "0_150", and each one with a label of "0_106" was changed
to "0_151". The reason for this is a conflict between the meaning of those two labels in the character editor and in the scenario editor and
the game.

In addition to the consolidation of the dialog code, I have made alterations that should theoretically allow the scenario editor to draw
custom graphics in its dialogs. I am uncertain that this works, though, since the scenario editor is now failing to FIND the custom graphics.

git-svn-id: http://openexile.googlecode.com/svn/trunk@22 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-19 01:25:14 +00:00
bc5307b413 Remove some unnecessary files
git-svn-id: http://openexile.googlecode.com/svn/trunk@13 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-13 19:42:05 +00:00
c0e2e4cfcb Adding BoE Char Editor.xcodeproj
git-svn-id: http://openexile.googlecode.com/svn/trunk@11 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-13 18:25:11 +00:00
29408f171a Remove accident files
git-svn-id: http://openexile.googlecode.com/svn/trunk@10 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-13 18:24:33 +00:00
5f9acddde5 Adding BoE Char Editor.xcodeproj
git-svn-id: http://openexile.googlecode.com/svn/trunk@9 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-13 18:19:20 +00:00
200378b3a4 Adding Blades of Exile Character Editor-Info.plist
git-svn-id: http://openexile.googlecode.com/svn/trunk@8 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-13 18:15:40 +00:00
39455c7b93 Adding BoECharEd.icns
git-svn-id: http://openexile.googlecode.com/svn/trunk@7 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-04-13 18:13:45 +00:00
188ecc8bc4 git-svn-id: http://openexile.googlecode.com/svn/trunk@3 4ebdad44-0ea0-11de-aab3-ff745001d230 2009-04-13 17:51:31 +00:00
Catphive
9bc3b0c07b Adding osx files.
git-svn-id: http://openexile.googlecode.com/svn/trunk@2 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-03-12 01:38:20 +00:00