Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 9, 2009, 11:24   #1
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
display_resistance_panel f array

In files.c I noticed

Code:
u32b f[4] = {0, 0, 0, 0};
...
object_flags_known(o_ptr, &f[1], &f[2], &f[3]);
Just wondering why that isn't

Code:
u32b f[3] = {0, 0, 0};
...
object_flags_known(o_ptr, &f[0], &f[1], &f[2]);


[EDIT] Never mind, I suppose it's so that things like
Code:
f[1] |= (TR1_INFRA);
are more understandable.
__________________
Currently turning (Angband) Japanese.
PaulBlay is offline   Reply With Quote
Old April 9, 2009, 12:49   #2
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by PaulBlay View Post
In files.c I noticed

Code:
u32b f[4] = {0, 0, 0, 0};
...
object_flags_known(o_ptr, &f[1], &f[2], &f[3]);
Just wondering why that isn't

Code:
u32b f[3] = {0, 0, 0};
...
object_flags_known(o_ptr, &f[0], &f[1], &f[2]);


[EDIT] Never mind, I suppose it's so that things like
Code:
f[1] |= (TR1_INFRA);
are more understandable.
Yeah, I imagine that'd why that was done. I intend to switch from flags1/2/3 to a flags array at some point fairly soon, at which point TR1_ will become TR0_ and so forth.
__________________
takkaria whispers something about options. -more-
takkaria 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


All times are GMT +1. The time now is 09:44.


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