Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 1, 2014, 01:52   #1
jeritind
Rookie
 
Join Date: Jan 2014
Posts: 3
jeritind is on a distinguished road
Visual Studio challenges

Hi,

I'm entertaining the possibility of porting to Windows Phone and I'm trying to get over some challenges without making significant changes to the source.

I think it would be really helpful for porting to other platforms if the main engine can be compiled as a static lib or dll and then referenced in a UI layer as opposed to having it all mashed together with multiple makes/.c files in the root.

Following that thought, I've attempted to do just that.

Right now the two biggest challenges I'm facing are:

1) using the property name of "class" on player and getting it to compile without redefining the keyword "class"

2) C99 designated initializers (primary used in declaring static structs of test data. visual studio and several other compilers don't support C99).

I really think it would be ideal to be able to maintain everything in one solution/workspace in an IDE for organization but it looks like as it stands I'd have to compile an angband source dll using a separate compiler and then reference the assembly in my main app.

Thoughts?
jeritind is offline   Reply With Quote
Old January 1, 2014, 03:35   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,022
Derakon is on a distinguished road
Hahaha, the newly-appointed maintainer is working on doing a UI/core split to accomplish basically exactly what you're looking for: a clean disconnect between the engine and the user interface. Once that's accomplished (no timeline, sadly; everyone's a volunteer here!) it should be straightforward to build just the engine as a DLL and then use it with whatever front-end you like.

Best of luck with your work though!
Derakon is offline   Reply With Quote
Old January 1, 2014, 03:49   #3
jeritind
Rookie
 
Join Date: Jan 2014
Posts: 3
jeritind is on a distinguished road
Interesting...I'll take a stab at it then I guess!
jeritind is offline   Reply With Quote
Old January 1, 2014, 15:15   #4
fph
Veteran
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 1,020
fph is on a distinguished road
Re #1, GLIB for instance (which is another pure-C project that would like to use the word "class" for internal purposes) has solved the problem by renaming all instances to "klass" in their source code.
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old January 1, 2014, 19:26   #5
jeritind
Rookie
 
Join Date: Jan 2014
Posts: 3
jeritind is on a distinguished road
Yeah, I renamed it to class_ based on this guy's off-the-cuff comment in this thread:
http://stackoverflow.com/questions/2...able-name-in-c

New best practice????
jeritind 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
Sil Builds/Challenges/Concepts/Stupid-Ascension-Tricks HallucinationMushroom Sil 214 February 17, 2014 16:01
Visual Studio 2010 Express, help for the newbie? Chud Development 12 June 14, 2013 22:40
UTF8 and the visual menu Nick Development 5 March 17, 2012 09:14
Native depth visual spoiler fph Vanilla 9 August 4, 2010 18:34
Visual Studio 2008 - building 32 & 64 bit now! LanceDiamond Development 5 April 25, 2009 13:59


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


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