Compiling BoE source code for Windows

Error message

  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: Compiling BoE source code for Windows
Apprentice
Member # 8738
Profile Homepage #25
The Almighty Do-er of Stuff, I am going bring to back splash screen and intro music soon. I've turned them off because I was chasing some nasty bugs and it was distracting me. This problem with displaying background in high resolutions must wait until I find computer with suitable monitor and graphic card because now I am working on laptop computer which can't go beyond 1024x768.

Andrea, I've just uploaded cursors on my website. Go download them. Btw, I don't remember where I found "look.cur". It's not included in original package with BoE sources and I don't remember to extract it from original BoE executable (but it is the same one). Strange. :) And that's great news that ported code compiles under Winelib! I've checked yesterday how it compiles under diffrent compilers and I've fully succeded in doing so by using Borland C++ 5.02 and Digital Mars 8.49. However, both of these had problems with resource files.

For my next releases of the BoE for Win32 I've decided to separate sound resources from main executable and I've moved them to DLL file. It is so because I don't like big EXEs, especially when I have to upload them on the net, recompile, replace etc. (Do you know that BoE executable without sounds can be packed by UPX to ~300kB?). Also I've replaced BLADMISC.DAT with simple BLADES.INI configuration file, which can be easily edited with notepad.

EDIT: I would like to invite other people to work with the code. I'm a student and there comes slowly time of exams for me. Soon I'm going to disappear from the net and you won't see me here until I pass all exams.

[ Tuesday, June 05, 2007 06:09: Message edited by: Ormus ]

--------------------
Blades of Exile for Win32
Posts: 14 | Registered: Wednesday, May 16 2007 07:00
Apprentice
Member # 8738
Profile Homepage #26
Good news, I've compiled Scenario Editor! Now I need your help to test it and find all existing bugs which could be made during porting process. Go, test, modify.

--------------------
Blades of Exile for Win32
Posts: 14 | Registered: Wednesday, May 16 2007 07:00
Apprentice
Member # 6924
Profile Homepage #27
quote:
Originally written by Ormus:

For my next releases of the BoE for Win32 I've decided to separate sound resources from main executable and I've moved them to DLL file.
Just wondering, why not put them into a directory as separate sound files? Then people can much more easily remove/replace individual sounds.

quote:
Originally written by Ormus:

EDIT: I would like to invite other people to work with the code. I'm a student and there comes slowly time of exams for me. Soon I'm going to disappear from the net and you won't see me here until I pass all exams.
Why not put it somewhere like SourceForge? Unfortunately, Google Code's limited set of licenses does not include the CPL (which is a horrible [due to insane patent retaliation clauses] and not much used license).
Posts: 30 | Registered: Friday, March 17 2006 08:00
Apprentice
Member # 8738
Profile Homepage #28
quote:
Originally written by Reve:

Just wondering, why not put them into a directory as separate sound files? Then people can much more easily remove/replace individual sounds.
Because I don't know how to load sounds from files using Windows API only. :) In the future I am going to add support for external files, but now I have other priorities.

quote:
Originally written by Reve:

Why not put it somewhere like SourceForge?
I don't have time to do this. If somebody could do this for me, I'd be happy.

--------------------
Blades of Exile for Win32
Posts: 14 | Registered: Wednesday, May 16 2007 07:00
Babelicious
Member # 39
Profile Homepage #29
I really do advise avoiding SourceForge. It's slow, it's inferior, and their tech support is tremendously poor. If you need a ticket system, I'd be glad to set up Trac or something like it on my server. Just an offer.

Also, now that the Windows and Mac versions seem to be reasonably up to date, I'm going to be putting some hours in on merging both codebases.

[ Wednesday, June 06, 2007 09:28: Message edited by: Andrea ]

--------------------
Pygmalion | Desperance | Djur
Posts: 1074 | Registered: Wednesday, October 3 2001 07:00
Apprentice
Member # 8808
Profile #30
Hi;)
I would like to share some of my observations resulting from my work on BoE open source code. I use Dev-C++ compiler and at this moment code is compiling and running, but it wasn't easy. During my work, I have found some strange errors, like unexpected program collapsions, or terminations. To find out, what's going wrong I have spent a lot of time on debugging. I hope this post will save some time to people who have found similar problems.
First obstacle was an unexpected program collapsion while showing dialog box window. The reason of this situation is incorretly string formatting in "dummy_dialog_proc" (DLOGTOOL.CPP file) dialog window procedure. As we can see in line 616:
[...]
else sscanf(item_str,"%d_%d",&type,&flag);
[...]
'type' and 'flag' variables has 'short' type, while formatting string ("%d_%d") describes 'long' types. Properly, formating string should be "%hd_%hd".

Next thing is program terminiation, while closing dialog box windows. That was very frustrating, because everything seems to be OK. In this situation something is littering our application message queue with WM_QUIT message. Problem lies in implementation of "fry_dc" function (GRAPHUTL.CPP file, line 612). The solution is to rewrite this function to something like this:
void fry_dc(HWND hwnd,HDC dc) {
if(!ReleaseDC(hwnd, dc) && !DeleteDC(dc))
PostQuitMessage(0);
}
Ok, that's all what I have to say (now;)). Hope that anybody find it useful.
Bye;)

[ Thursday, June 07, 2007 09:13: Message edited by: r.Q ]
Posts: 5 | Registered: Sunday, May 27 2007 07:00
Apprentice
Member # 8808
Profile #31
quote:
Originally written by Ormus:

quote:
Originally written by Reve:

Just wondering, why not put them into a directory as separate sound files? Then people can much more easily remove/replace individual sounds.
Because I don't know how to load sounds from files using Windows API only. :) In the future I am going to add support for external files, but now I have other priorities.

Hey Ormus ! I have something for You;) I've rewritten all sound engine. Now it reads sound data from external *.WAV files, uses 32-bit Windows Multimedia function, and locks global handles only when playing sound (in order to avoid memory fragmentation). Following archive indludes two files: EXLSOUND.CPP and EXLSOUND.H. I have added "delete_all_sounds" function, to release all allocated memory, so You should call this function in course of processing "WM_DESTROY" message.

Archive: Download here

I hope You find it useful.
Regards ;)
Posts: 5 | Registered: Sunday, May 27 2007 07:00
Babelicious
Member # 39
Profile Homepage #32
I believe I've tracked down the cause of the 100-town crashing bug in Windows BoE.

http://pygsys.com/wiki/oboe/?FrontPage

Could someone with a working build setup for WinBlades test the fix for me?

--------------------
Pygmalion | Desperance | Djur
Posts: 1074 | Registered: Wednesday, October 3 2001 07:00
Shaper
Member # 73
Profile #33
Ormus, I tried to download the scenario editor, but it appears the top two links on the page in your sig are the same as the two below them.

By the way, it turns out that the color changing thing gets annoying in the scenario editor and the character editor as well. I guess it depends on what program I switch to or something.

--------------------
My Myspace, with some of my audial and visual art
The Lyceum - The Headquarters of the Blades designing community
The Louvre - The Blades of Avernum graphics database
Alexandria - The Blades of Exile Scenario database
BoE Webring - Self explanatory
Polaris - Free porn here
Odd Todd - Fun for the unemployed (and everyone else too)
They Might Be Giants - Four websites for one of the greatest bands in existance
--------------------
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Posts: 2957 | Registered: Thursday, October 4 2001 07:00
Apprentice
Member # 8738
Profile Homepage #34
Hi all, I was busy with exams and was applying for a job so I wasn't working an BoE for a long time. First, I've fixed links at my site and you should be able to download and recompile game and scenario editor under Win32. Now I need a lot of time to familiarize myself with modifications made by people working on mac rewrite. I suppose they found a lot of bugs and fixed them and now I need to make approporiate changes in windows version of the code.

--------------------
Blades of Exile for Win32
Posts: 14 | Registered: Wednesday, May 16 2007 07:00
Shock Trooper
Member # 6666
Profile #35
Can you give a rough estimate on when the rest of the scenarios will be made playable? Oh, and thank you so much for doing this in the first place.
Posts: 353 | Registered: Monday, January 9 2006 08:00
Shaper
Member # 73
Profile #36
They're already playable, they just aren't included in the download. You can download them separately from TrueSite for Blades. Click on Walkthroughs, select the first letter of the name of the scenario you want (including VoDT, ASR, and ZKR), ignoring the words "A", "An", and "The" if they are at the beginning of the name (for instance, look under S for "A Small Rebellion").

--------------------
My Myspace, with some of my audial and visual art
The Lyceum - The Headquarters of the Blades designing community
The Louvre - The Blades of Avernum graphics database
Alexandria - The Blades of Exile Scenario database
BoE Webring - Self explanatory
Polaris - Free porn here
Odd Todd - Fun for the unemployed (and everyone else too)
They Might Be Giants - Four websites for one of the greatest bands in existance
--------------------
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Posts: 2957 | Registered: Thursday, October 4 2001 07:00
Shock Trooper
Member # 5459
Profile Homepage #37
quote:
Originally written by The Almighty Do-er of Stuff:

They're already playable
They are? Man, then I know I'm dumb (can't vouch for Redstart, though). How do you install the scenarios? I've got a bunch of them in the "BLADSCEN" folder like the Valley of Dying Things and one in its own folder. Then I have one in the main game folder, one in the "BLSCENED" folder and OBoE still claims that there are no scenarios installed when I press the Custom Scenario button.

--------------------
These are my scenarios. I may have too much free time but I really don't care.
Backwater Calls, Magus of Cattalon, Rats Aplenty
Get them here
Visit The Lyceum for all your rating needs.
Posts: 211 | Registered: Sunday, January 30 2005 08:00
Shock Trooper
Member # 6666
Profile #38
quote:
(can't vouch for Redstart, though)
Oi!

As a matter of fact I am both dumb and lazy. I hadn't event bothered with trying to install the scenarios since all other pre-packed scenarios said "must be registered" in their descriptions, and wouldn't launch.

EDIT:
Seems to work when you copy all the contents of the scenario into the bladscen folder. At least it worked for Falling Stars. Thank you ADoS.

EDIT 2:
Oh expletive. It seems I can't get Small Rebellion or Za-Khazi Run anywhere. Despite what ADoS said, they're not hosted on Gizmo's or Kelandon's sites. And Vista won't let me install the BoE demo since it's apparently 16-bit. Could someone host the two remaining pre-packed scenarios? Pretty please?

[ Saturday, July 14, 2007 06:59: Message edited by: Redstart ]
Posts: 353 | Registered: Monday, January 9 2006 08:00
Apprentice
Member # 9297
Profile Homepage #39
@Smoo:

Ormus changed the scenario folders from "BLADSCEN" to "scenarios". Makes a little more sense I suppose, but it confused me at first too.
Posts: 7 | Registered: Wednesday, July 11 2007 07:00
Shock Trooper
Member # 5459
Profile Homepage #40
Turns out that the problem was that I had my save files in the "documents" folder in stead of the Blades of Exile folder. Everything works now.

Yippee!

--------------------
Some of these BoA scenarios might be good:
Backwater Calls, Magus of Cattalon, Rats Aplenty
Get them here
Visit The Lyceum for all your rating needs.
Posts: 211 | Registered: Sunday, January 30 2005 08:00
Apprentice
Member # 4231
Profile #41
I'm quite sure that the scenarios are in Kelandon's source code releases. I seem to recall that either the ones in the mac side or those in the windows side are broken, though.

--------------------
Lifetime Spiderweb Gamer
and Fan of Classic Style Graphics
Posts: 42 | Registered: Saturday, April 10 2004 07:00
Apprentice
Member # 9965
Profile #42
I can not get custom scenarios working, I put them in the scenarios folder but it still says that there are none installed, I managed to get one working by renaming it to valleydy.exs but it wouldn't load it's custom graphics. any ideas?
Posts: 2 | Registered: Thursday, August 23 2007 07:00
Shock Trooper
Member # 7662
Profile #43
I simply rename the custom graphics sheet along with the scenario, it is the only solution. I am playing Shadow of the Stranger, or I was until I downloaded Nethergate: Resurrection, I renamed the scenario to "Stealth.exs" and the custom graphics to "Stealth.bmp".

I have only rarely been able to access the custom scenarios. Examining the source code might show the problem, but it can only be fixed by re - compiling the program.
Posts: 292 | Registered: Monday, November 13 2006 08:00
Shock Trooper
Member # 5181
Profile Homepage #44
Ormus seems to have quit. Unfortunate.

Anyway, looking at the Windows source code, a few things--

-These sources are getting only slightly less Windows-centric. Good start, but far more is necessary. #ifdef hell may not even work with the mess on our hands.

-They're never going to compile under VS2005, which is a cast-iron shame. 800+ errors say "hello." Similarly, on gcc, I can only get it to compile by mickey-mousing the CFLAGS and ignoring things that should not be ignored.

-These sources still don't work on Vista. Now, like any half-sane person, I don't use Vista (tested it in VMware), but that's still a sticking point. I'm of the opinion that a reimplementation may be necessary, especially to expand the system limitations sanely. (In my spare time I'm messing around with one.)

-New file format. Very, very necessary in the long term. I propose that a group get together and formulate this, preferably one with a lot of both scenario and code experience.
Posts: 262 | Registered: Thursday, November 11 2004 08:00
Apprentice
Member # 10385
Profile #45
quote:
-They're never going to compile under VS2005, which is a cast-iron shame. 800+ errors say "hello." Similarly, on gcc, I can only get it to compile by mickey-mousing the CFLAGS and ignoring things that should not be ignored.
I love a good challenge ;)

VS2005 project fiile that compiles (for me anyway anyone want to confirm it works?).

As far as I can tell it is working properly. Built off Ormus's (sources) link.

Ok bracing for reports about what I messed up lol

quote:
-These sources still don't work on Vista. Now, like any half-sane person, I don't use Vista (tested it in VMware), but that's still a sticking point. I'm of the opinion that a reimplementation may be necessary, especially to expand the system limitations sanely. (In my spare time I'm messing around with one.)

What's broken on Vista (messes up)?

quote:
I can not get custom scenarios working, I put them in the scenarios folder but it still says that there are none installed, I managed to get one working by renaming it to valleydy.exs but it wouldn't load it's custom graphics. any ideas?
Does anyone have a very basic example of this problem where renaming the files actually does make the scenarios load?

quote:
I really do advise avoiding SourceForge. It's slow, it's inferior, and their tech support is tremendously poor. If you need a ticket system, I'd be glad to set up Trac or something like it on my server. Just an offer.
I think the advantge to SourceForge would be a commen place that everyone can go to get code and the folks working on the project can upload it.

It would be a shame if someone quit and people were getting old versions of the code to work on because that's what their sig pointed too. Or did I miss something that is already set up? Thanks for letting me know :)

quote:
I still miss the splash screen and intro music though, but I suppose I can live without it.
I think I got it working correctly?

[ Sunday, September 09, 2007 22:11: Message edited by: Ingro ]
Posts: 3 | Registered: Sunday, September 9 2007 07:00
Apprentice
Member # 10385
Profile #46
Ok it was pointed out to me (VIA PM) that I didn't mention what file I was linking against in the VS2005 file.

winmm.lib was the file that I finally figured out I needed to link against to get the project to compile.

It needs to be included under the project properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies.

I hope this clears up that question.

EDIT:
It's probably worth mentioning that there are several bugs due to VS2005 requiring variables to be defined before being passed to a function (and many aren't). I fixed the ones I saw just quickly playing through but if you find any more please report them :)

[ Wednesday, September 19, 2007 15:11: Message edited by: Ingro ]
Posts: 3 | Registered: Sunday, September 9 2007 07:00
Apprentice
Member # 10612
Profile #47
Hmm... this is a cool game, but I just realized something: the Win32 port isn't actually covered by the GPL!. If we were ever to move source development to a better system (a la Sourceforge or Savannah), we would probably need to clarify the license issue...
Posts: 4 | Registered: Thursday, September 20 2007 07:00
Apprentice
Member # 10385
Profile #48
quote:
Originally written by madcrow:

Hmm... this is a cool game, but I just realized something: the Win32 port isn't actually covered by the GPL!.
I'm confused. "Blades of Exile Game/Editor/Character Editor are released under the terms of the GNU General Public License, Version 2." seems clear that both versions are covered by the GPL. (This is from the SpiderWeb source download Blades of Exile License.txt). Both the Mac and Windows versions are present in the file below the license.
Posts: 3 | Registered: Sunday, September 9 2007 07:00
Apprentice
Member # 10612
Profile #49
quote:
Originally written by Ingro:

quote:
Originally written by madcrow:

Hmm... this is a cool game, but I just realized something: the Win32 port isn't actually covered by the GPL!.
I'm confused. "Blades of Exile Game/Editor/Character Editor are released under the terms of the GNU General Public License, Version 2." seems clear that both versions are covered by the GPL. (This is from the SpiderWeb source download Blades of Exile License.txt). Both the Mac and Windows versions are present in the file below the license.

The Win32 port/build happened pre-GPL, back when the code was still under the CPL (Common Public License)

Thus, as the changes were never merged back into the official code tree, the changes are still CPL. We should try to contact the author of the Win32 port (who hasn't been active in a long time) and see if he'll agree to release his changes as GPL and thus bring the Windows codebase back up from Win16.
Posts: 4 | Registered: Thursday, September 20 2007 07:00

Pages