Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old November 30, 2009, 17:49   #1
Dean Anderson
Adept
 
Join Date: Nov 2009
Posts: 124
Dean Anderson is on a distinguished road
Compiling a "Windows Console" version

Hi All,

This is my first post here, but some of you may remember me from a few years ago (I wrote the Cthangband and Hellband variants).

After a long hiatus, I've got into Angband again, but I'm having trouble with the latest source.

I notice on the download page that the older versions (e.g. 3.0.9) have "Windows Console" versions for download, but the latest version (3.1.1 beta) doesn't.

How do I compile the "Windows Console" version for myself? Do I need to include a different "main-???" file other than "main-win"? Or do I include "main-win" but set various compiler options?

I have Visual Studio 2008, if that helps.
Dean Anderson is offline   Reply With Quote
Old November 30, 2009, 18:13   #2
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by Dean Anderson View Post
Hi All,

This is my first post here, but some of you may remember me from a few years ago (I wrote the Cthangband and Hellband variants).

After a long hiatus, I've got into Angband again, but I'm having trouble with the latest source.

I notice on the download page that the older versions (e.g. 3.0.9) have "Windows Console" versions for download, but the latest version (3.1.1 beta) doesn't.

How do I compile the "Windows Console" version for myself? Do I need to include a different "main-???" file other than "main-win"? Or do I include "main-win" but set various compiler options?

I have Visual Studio 2008, if that helps.

Wow, the man himself
I have sent you several emails to which you never replied so I thought you had fallen from the face of the earth
I kind of took over Hellband, you might want to give it a spin ;]

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old November 30, 2009, 19:22   #3
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Hi. I have a nasty suspicion that you mean main-ibm.c, which was (IIRC) removed during the GPL effort. Also known as the "DOS" port. I noticed only yesterday that it wasn't there any more. Best ask Takkaria if there's any scope for resurrecting it - not sure how much was un-GPL-able.
Magnate is offline   Reply With Quote
Old November 30, 2009, 19:33   #4
Dean Anderson
Adept
 
Join Date: Nov 2009
Posts: 124
Dean Anderson is on a distinguished road
Quote:
Originally Posted by Magnate View Post
Hi. I have a nasty suspicion that you mean main-ibm.c, which was (IIRC) removed during the GPL effort. Also known as the "DOS" port. I noticed only yesterday that it wasn't there any more. Best ask Takkaria if there's any scope for resurrecting it - not sure how much was un-GPL-able.
It might have been, but I'm doubtful. The "main-ibm.c" version was a DOS version - and should therefore run inside something like DOSBox - but DOSBox refuses to run the "Windows Console" version of 3.0.9 claiming it isn't a DOS executable...

I'll download the 3.0.9 source-code and see if that still includes "main-ibm.c"...

ETA: I've just checked, and the 3.0.9 source doesn't include "main-ibm.c", so it can't have been that unless someone manually patched it.

Last edited by Dean Anderson; November 30, 2009 at 19:39. Reason: Add info
Dean Anderson is offline   Reply With Quote
Old November 30, 2009, 19:33   #5
Dean Anderson
Adept
 
Join Date: Nov 2009
Posts: 124
Dean Anderson is on a distinguished road
Quote:
Originally Posted by konijn_ View Post
Wow, the man himself
I have sent you several emails to which you never replied so I thought you had fallen from the face of the earth
Sorry about that - I haven't checked that email address in years...

Quote:
I kind of took over Hellband, you might want to give it a spin ;]

T.
I'll do that.
Dean Anderson is offline   Reply With Quote
Old November 30, 2009, 19:57   #6
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 38
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Dean Anderson View Post
This is my first post here, but some of you may remember me from a few years ago (I wrote the Cthangband and Hellband variants).
Hi Dean,

Thanks so much for writing Cthangband. Back in college that variant was my favorite and really got me into Angband variants in general.

Anyway, welcome to the forums!
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old November 30, 2009, 21:24   #7
Dean Anderson
Adept
 
Join Date: Nov 2009
Posts: 124
Dean Anderson is on a distinguished road
Found it (I think!)

The "makefile.win" file allows you to define the "USE_CONSOLE" variable, and that causes it to include "main_gcu.c" instead of "main_win.c". However, it requires the Windows version of the PDCurses library if you want to use it on Windows.

Hopefully, I'll be able to shoehorn that into a Visual Studio project and get it to work (I can't stand makefiles - I much prefer an IDE with an integrated debugger...)
Dean Anderson is offline   Reply With Quote
Old November 30, 2009, 21:40   #8
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by Dean Anderson View Post
Found it (I think!)

The "makefile.win" file allows you to define the "USE_CONSOLE" variable, and that causes it to include "main_gcu.c" instead of "main_win.c". However, it requires the Windows version of the PDCurses library if you want to use it on Windows.

Hopefully, I'll be able to shoehorn that into a Visual Studio project and get it to work (I can't stand makefiles - I much prefer an IDE with an integrated debugger...)
Awesome, let me know if you can make hellband work in that IDE as well, I could use a debugger as well

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old November 30, 2009, 21:56   #9
Dean Anderson
Adept
 
Join Date: Nov 2009
Posts: 124
Dean Anderson is on a distinguished road
Quote:
Originally Posted by konijn_ View Post
Awesome, let me know if you can make hellband work in that IDE as well, I could use a debugger as well

T.
Depends how much you've changed it, but all my Hellband code was written in Visual Studio in the first place, so you should be able to simply create a project (A Win32 Application - make sure you click the "Empty Project" option) and add the files...
Dean Anderson is offline   Reply With Quote
Old November 30, 2009, 22:29   #10
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by Dean Anderson View Post
Depends how much you've changed it, but all my Hellband code was written in Visual Studio in the first place, so you should be able to simply create a project (A Win32 Application - make sure you click the "Empty Project" option) and add the files...
I did not change much to the structure of the game.
For giggles, I created a new Win32 app, put c files under Source Files, h files under Header Files and angband.res and angband.rc under resource files.

Then I noticed a booboo where MS is less forgiving than GNU

Code:
/*
 * Birth item info
 */
typedef struct birth_item birth_item;
struct birth_item
{
	byte race;				/* Race of the counterpart */
	byte class;			/* Class of the counterpart */
had to become

t
Code:
ypedef struct birth_item birth_item;
struct birth_item
{
	byte prace;				/* Race of the counterpart */
	byte pclass;			/* Class of the counterpart */
Still, it seem that there are header problems, every single variable that is extern cannot be found when linking birth.c

1>birth.obj : error LNK2001: unresolved external symbol "struct player_race p_race" (?p_race@@3Uplayer_race@@A)
1>birth.obj : error LNK2001: unresolved external symbol "char reallyTRUE" (?reallyTRUE@@3DA)
1>birth.obj : error LNK2019: unresolved external symbol "unsigned long __cdecl Rand_div(unsigned long)" (?Rand_div@@YAKK@Z) referenced in function "void __cdecl create_random_name(int,unsigned char,char *)" (?create_random_name@@YAXHEPAD@Z)
1>birth.obj : error LNK2019: unresolved external symbol "unsigned long __cdecl Rand_num(unsigned long)" (?Rand_num@@YAKK@Z) referenced in function "void __cdecl create_random_name(int,unsigned char,char *)" (?create_random_name@@YAXHEPAD@Z)
1>birth.obj : error LNK2001: unresolved external symbol "char rand_unbiased" (?rand_unbiased@@3DA)

And this ad nauseum until 101 thingies are not found, and thats the end of it.

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"repeat" Command just little bit "smarter" ClaytonAguiar Vanilla 8 June 17, 2009 15:01
Feature request: generalize "drop chosen" bron Vanilla 23 December 23, 2008 16:33
Blast! Killed by a "summon monster" trap Wraitheist Vanilla 10 April 27, 2008 18:36
Love The New Windows Console Patch Malak Darkhunter Vanilla 0 December 8, 2007 18:50
Roguelike idea from "Lost Magic" DS game - Mr. @ teaches typing! ekolis Idle chatter 10 October 19, 2007 03:25


All times are GMT +1. The time now is 16:25.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.