Castle patch, now 0.1.0 [Was: Castle patch, version 0.0.1]

Discussion among members of the development team.

Moderator: Forum Moderators

Ayin
Inactive Developer
Posts: 294
Joined: March 30th, 2004, 4:45 pm
Location: Nîmes, France
Contact:

Post by Ayin »

A little patch that adds comments to the getBuiltTerrain() function :

http://www.anathas.org/ayin/wesnoth/cas ... .0.3.patch

The patch is against the latest CVS version of display.cpp
Frank
Posts: 32
Joined: September 19th, 2003, 3:21 pm
Location: Belgium

Re: I assume it's not supposed to look like this...

Post by Frank »

Frank wrote:It doesn't seem to work correctly on powerpc. I'll submit a bug on savanah, and maybe try to find what's wrong.
It was rather simple. See attached patch (also submitted to bug #8543)

Frank

(edit : resubmit the patch, first attachment didn't work because of filename rules...)
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

I'm committing the patch, but really, people should give their compiler options to make sure that type 'char' is signed.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Sangel
Moderator Emeritus
Posts: 2232
Joined: March 26th, 2004, 10:58 pm
Location: New York, New York

Post by Sangel »

Could the patch be modified so that the Keep always has a ring of turrets around it, even when surrounded by castle? This, plus other graphical changes (colour, perhaps taller turrets if that'd work) would seem a decent way to signal "this is the keep".
"Pure logic is the ruin of the spirit." - Antoine de Saint-Exupéry
Loriel
Posts: 66
Joined: March 27th, 2004, 12:41 pm
Location: London UK

Disable option/method ?

Post by Loriel »

Whilst this is a great improvement in most cases, there are a few scenarios where it would be useful to disable it.

For example, drawing castle walls and turrets round the starting hex in "Inside the Tower" in the Undead campaign spoils the atmosphere.
Frank
Posts: 32
Joined: September 19th, 2003, 3:21 pm
Location: Belgium

Post by Frank »

Dave wrote:I'm committing the patch, but really, people should give their compiler options to make sure that type 'char' is signed.

David
Possibly, but shouldn't configure test for it then ?
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Frank wrote:
Dave wrote:I'm committing the patch, but really, people should give their compiler options to make sure that type 'char' is signed.

David
Possibly, but shouldn't configure test for it then ?
I'll talk to ziberpunk about it :)
Loriel wrote: Whilst this is a great improvement in most cases, there are a few scenarios where it would be useful to disable it.

For example, drawing castle walls and turrets round the starting hex in "Inside the Tower" in the Undead campaign spoils the atmosphere.
We've been discussing a way to have different-look castles for different situations. This would be one such situation where we'd use some completely different look.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

a variation that could be used for castles, or it could be for the keep to distinguish it (OK, probably not)

http://lsimmons.net/joe/castlebuilding.png
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

Just wondering, is there any way to get this to give the border images for terrains other than castle? if i make the image equal the same thing for the new terrain, it still doesn't do it...
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
Woodwizzle
Posts: 719
Joined: December 9th, 2003, 9:31 pm
Contact:

Post by Woodwizzle »

Can we get rid of the brown dirt boder for castles now? They're not needed anymore.
Integral
Posts: 244
Joined: December 14th, 2003, 9:36 pm
Location: Pennsylvania

Post by Integral »

Dave wrote:I'm committing the patch, but really, people should give their compiler options to make sure that type 'char' is signed.
Unfortunately, you can't assume that char is signed if you want to write portable C++ code. Even just using gcc on Linux, code compiled on arm, powerpc, and s390 will use an unsigned char by default (this information is from the bug report I received back when I didn't know this :) )

Daniel
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Integral wrote:
Dave wrote:I'm committing the patch, but really, people should give their compiler options to make sure that type 'char' is signed.
Unfortunately, you can't assume that char is signed if you want to write portable C++ code. Even just using gcc on Linux, code compiled on arm, powerpc, and s390 will use an unsigned char by default (this information is from the bug report I received back when I didn't know this :) )
Are there options on these systems to make char signed?

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Ayin
Inactive Developer
Posts: 294
Joined: March 30th, 2004, 4:45 pm
Location: Nîmes, France
Contact:

Post by Ayin »

turin wrote:Just wondering, is there any way to get this to give the border images for terrains other than castle?
Yup, it will in the next version (along with the ability to have dynamically-built keeps.)

Just be patient, I just have to test it, and to make a sample image to demonstrate keep building.
Ayin
Inactive Developer
Posts: 294
Joined: March 30th, 2004, 4:45 pm
Location: Nîmes, France
Contact:

Post by Ayin »

Dave wrote:Are there options on these systems to make char signed?
There is the "-fsigned-char " option for GCC that does the trick, but surely the real option is to grep for "char" declarations, and to explicitly declare "signed char" on the code.
Woodwizzle wrote:Can we get rid of the brown dirt boder for castles now? They're not needed anymore.
That's true, they are not.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

actually, i woul,d prefer to keep the brown border, IF it was expanded so that it went beyond the castle. it looks kind of cool having mound of brown dirt around the castle- it makes it look like it is on a hill.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
Post Reply