Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Variants (http://angband.oook.cz/forum/forumdisplay.php?f=4)
-   -   [Announce] PosChengband 1.0.0 (http://angband.oook.cz/forum/showthread.php?t=5848)

chris January 18, 2013 17:05

Quote:

Originally Posted by Arjen (Post 76446)
Just killed Ares, he didn't drop his hat...

Olympians no longer drop 100%. They are also a bit easier than in Chengband (but Ares is no pushover!!).

Arjen January 18, 2013 17:10

Ares is when you have a 300-400 damage darkness storm and resist teleport. ;) But too bad, I wanted to check if I could get a blow from it.

Found the Ring of Destruction with all it's brands, but those don't work... 9d9 brand all eye was just a dream. ;) But the malus on that ring are bad too.

(Nice job on the new artifacts, I like the magic based lamps too). Now if only monsters who drop {good} could drop more jewelry.

Darin January 20, 2013 20:50

For the comp I managed to compile v1.0.3 for the Mac (X11 only, Intel only). But the inventory percentages look, well, a bit off, so I don't know what other interesting numbers there may be, or if it is a cosmetic problem or something worse. I was able to play through a game with no obvious problems, though.

big_inventory_percentage

chris January 20, 2013 21:39

Quote:

Originally Posted by Darin (Post 76501)
For the comp I managed to compile v1.0.3 for the Mac (X11 only, Intel only). But the inventory percentages look, well, a bit off, so I don't know what other interesting numbers there may be, or if it is a cosmetic problem or something worse. I was able to play through a game with no obvious problems, though.

big_inventory_percentage

In cmd3.c on line 55 is the following code:
Code:

sprintf(out_val, "Inventory: carrying %d.%d pounds (%ld%% of capacity). Command: ",
  (int)(p_ptr->total_weight / 10),
  (int)(p_ptr->total_weight % 10),
  (p_ptr->total_weight * 100) / weight_limit());

The total_weight field seems correct. But I wonder if the %ld is wrong. The field is really an int and we should probably use %d instead. Could you make this change and recompile?

BTW, I've seen a lot of %ld and casting things to long throughout the code base. This makes me nervous as a long is 64 bits for 64-bit compiles while an int is still just 32 bits.

Also, if you get a Mac makefile working, could you email me a copy (perhaps with instructions). I've had interest in a mac compile for Chengband before but could never oblige as I don't have access to a mac. My email address is ckousky at gmail dot com.

Thanks!

Darin January 21, 2013 00:10

Quote:

Originally Posted by chris (Post 76505)
In cmd3.c on line 55 is the following code:
Code:

sprintf(out_val, "Inventory: carrying %d.%d pounds (%ld%% of capacity). Command: ",
  (int)(p_ptr->total_weight / 10),
  (int)(p_ptr->total_weight % 10),
  (p_ptr->total_weight * 100) / weight_limit());

The total_weight field seems correct. But I wonder if the %ld is wrong. The field is really an int and we should probably use %d instead. Could you make this change and recompile?

BTW, I've seen a lot of %ld and casting things to long throughout the code base. This makes me nervous as a long is 64 bits for 64-bit compiles while an int is still just 32 bits.

Also, if you get a Mac makefile working, could you email me a copy (perhaps with instructions). I've had interest in a mac compile for Chengband before but could never oblige as I don't have access to a mac. My email address is ckousky at gmail dot com.

Thanks!

Yup, that fixed it. I actually didn't get the mac makefile working, since I have never gotten any of the mac makefiles for variants of earlier Angband versions to work with recent Mac OS X versions. I used the makefile.linux, and even then I had to get rid of the GCU code. So as far as I can tell one would need an Intel mac with X11 or XQuartz to use the binary I made. And as with the Halls of Mist binary, one will have to rename the save file to something like "501.<username>".

Qyx January 21, 2013 05:18

On starting the game, looked for help with selecting a race... got "Cannot open 'races.txt'..." Noticed the actual file in /lib is 'Races.txt'...

chris January 21, 2013 13:55

Quote:

Originally Posted by Qyx (Post 76517)
On starting the game, looked for help with selecting a race... got "Cannot open 'races.txt'..." Noticed the actual file in /lib is 'Races.txt'...

Thanks for the catch. It works OK on windows (case preserving) but not on linux (case sensitive). It will be fixed in the next release I push, but I'm generally waiting for game crash bugs to push new releases. In the meantime, you can rename the file as 'races.txt' and it should work for you. (Note: The helpfiles for Warlocks and Weaponmasters still need to be written).

AnonymousHero January 21, 2013 16:59

Quote:

Originally Posted by chris (Post 76505)
BTW, I've seen a lot of %ld and casting things to long throughout the code base. This makes me nervous as a long is 64 bits for 64-bit compiles while an int is still just 32 bits.

Yeah, this is really an annoying part of the C89 standard printf(). The only really portable way to get this working properly (without always casting) on 32 and 64 bit is to use format string defines, so something like:

Code:

#ifdef ON_64_BIT_PLATFORM
#define FMTs32 "%d"
#define FMTu32 "%u"
#else
#define FMTs32 "%ld"
#define FMTu32 "%lu"
#endif

and then use them as follows:

Code:

    int32_t foo = 123;
    printf("something " FMTs32 " something something.", x);

(note that int32_t is also C99.)

The only other way is simply using "int" everywhere, but that may not be sufficient on all compilers/platforms.

Qyx January 28, 2013 19:52

Maybe a dumb question... is there an easy way to avoid destroying scrolls of summons?

Qyx January 29, 2013 03:48

Minor bug (or perhaps not, but seems like it might be):

Confusion affecting target after already slain:

>>You have slain the Novice rogue.
>>Your Claw stops glowing.
>>The Novice rogue appears confused.


All times are GMT +1. The time now is 05:00.

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