Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old March 8, 2010, 01:04   #1
shinobibear
Rookie
 
Join Date: Mar 2010
Posts: 1
shinobibear is on a distinguished road
New to Angband Dev

Hey there community,
Im new to the Developers side, but have enjoyed the game for quite some time.
Are there any good well commented source codes? Ive been trying to navigate the 3.0.9 build but havent any luck. Also Im using Visual Basic Express 2008 if it matters too much on which complier Im using. Any help would be great.
shinobibear is offline   Reply With Quote
Old March 8, 2010, 01:08   #2
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
My experience with Angband is that some parts are relatively well-documented but there is very little useful high-level documentation about the source code.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old March 8, 2010, 04:20   #3
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,915
Donated: $40
Pete Mack is on a distinguished road
You will want to open Angband in 'C' mode, not VB mode in Visual Studio.

Also: if you have a good angband project, please submit it for checkin to the build. It's crazy not having a VS project available at this point.
Pete Mack is offline   Reply With Quote
Old March 8, 2010, 05:38   #4
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,915
Donated: $40
Pete Mack is on a distinguished road
By the way, this is much harder than you think. I've tried it more than once, but I can't figure out how to fix angband.rc to work with VS 2008.

There are also 358 warnings--almost all are security warnings for use of sscanf, and loss of data warnings for casts from int to byte.

Note: to get the subdirs to compile, you also have to add .. to additional include paths, but that's not a big problem.
Pete Mack is offline   Reply With Quote
Old March 8, 2010, 06:33   #5
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,915
Donated: $40
Pete Mack is on a distinguished road
OK, I got past that problem -- the auto-regenerated rc file contains some LANGUAGE stuff that needed to be commented out.

Now all I'm seeing is link errors -- 1198 of them!
Pete Mack is offline   Reply With Quote
Old March 8, 2010, 08:10   #6
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,915
Donated: $40
Pete Mack is on a distinguished road
Ok, I've got it down to two external symbols:
Error 362 error LNK2019: unresolved external symbol __imp__PlaySoundW@12 referenced in function _Term_xtra_win_sound main-win.obj angband
Error 363 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup MSVCRTD.lib angband

This should be easy to figure out tomorrow.

However, absolute requirement is that player/util.c be renamed. VS gets confused when a project includes two source files of the same name, even in different directories. (Eponymous include files are OK to compile, but confusing to navigate.)

EDIT:

I've got it linking (and starting up). I'll post the .sln .vcproj, and related files & changes tomorrow after testing.

EDIT:
Cool! It opens a dialog box in chinese! Needless to say, I have no idea what it says...

Last edited by Pete Mack; March 8, 2010 at 08:37.
Pete Mack is offline   Reply With Quote
Old March 8, 2010, 13:35   #7
RogerN
Swordsman
 
RogerN's Avatar
 
Join Date: Jul 2008
Posts: 306
RogerN is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
EDIT:
Cool! It opens a dialog box in chinese! Needless to say, I have no idea what it says...
IIRC, you need to set the project to use multi-byte character set instead of Unicode. Unicode is the default.
RogerN is offline   Reply With Quote
Old June 9, 2010, 19:35   #8
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
I hate to necro a thread, but do you have a working VS project Pete?

I'd love to be able to tinker around with Angband with VS. I'm too spoiled... nano and grep just aren't doing it for me... *sigh*
Sirridan is offline   Reply With Quote
Old June 10, 2010, 17:16   #9
ekolis
Knight
 
ekolis's Avatar
 
Join Date: Apr 2007
Location: Cincinnati, OH, USA
Age: 35
Posts: 911
ekolis is on a distinguished road
Send a message via AIM to ekolis Send a message via MSN to ekolis Send a message via Yahoo to ekolis
You can work around the util.c duplication by assigning player/util.c a custom output file (such as player-util.obj) in the file's property pages.

Anyway, I just now put together a solution file for the r1971... anywhere in particular you want me to post it?
__________________
You read the scroll labeled NOBIMUS UPSCOTI...
You are surrounded by a stasis field!
The tengu tries to teleport, but fails!
ekolis is offline   Reply With Quote
Old June 10, 2010, 17:59   #10
ekolis
Knight
 
ekolis's Avatar
 
Join Date: Apr 2007
Location: Cincinnati, OH, USA
Age: 35
Posts: 911
ekolis is on a distinguished road
Send a message via AIM to ekolis Send a message via MSN to ekolis Send a message via Yahoo to ekolis
Here ya go, I've posted it:
http://edkolis.exofire.net/angband-vc++2010-sln.7z

Extract this into the angband folder (not angband/src) and open up the sln file in VC++ 2010 Express or VS2010

Let me know if you have any trouble!
__________________
You read the scroll labeled NOBIMUS UPSCOTI...
You are surrounded by a stasis field!
The tengu tries to teleport, but fails!
ekolis 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
Compling with Dev-C++ PaulBlay Development 6 December 15, 2009 22:32
[O] Error Using Dev-C++ to compile BennyG Variants 8 October 2, 2009 16:51
Dev Bug rdermyer Vanilla 13 December 24, 2008 02:49
V dev bugs Pete Mack Vanilla 5 September 22, 2008 00:38
Merge in 3.0.9e changes with dev. Irashtar Vanilla 22 September 18, 2008 19:01


All times are GMT +1. The time now is 08:32.


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