User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16

Thread: Enemy with Tile 0 not drawn

  1. #11
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    @ZoriaRPG
    Good point.

    Actually weapons use the wooden sword sprite as null. I know that for a fact. >_>
    And items use -1. "Rupees is 0 which is because of the dummy item behavior shops use i think" Right @Gleeok ?

  2. #12
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%
    Quote Originally Posted by Tamamo View Post
    @ZoriaRPG
    Good point.

    Actually weapons use the wooden sword sprite as null. I know that for a fact. >_>
    And items use -1. "Rupees is 0 which is because of the dummy item behavior shops use i think" Right @Gleeok ?
    It would sure be nice if 0 was uniformly NULL, but that may break some things, notably items. I suppose Sprite 0 might be fixable, but if people rely on it...meh.

  3. #13
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    @ZoriaRPG
    I wouldn't change any of null identifiers. Cause knowing ZC, it would break the indexes, aswell as something else.

  4. #14
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%
    Quote Originally Posted by Tamamo View Post
    @ZoriaRPG
    I wouldn't change any of null identifiers. Cause knowing ZC, it would break the indexes, aswell as something else.
    Right. I think we're pretty much stuck with a mash-up of what values are considered NULL. It's a real pain for new users, but after a while, you memorise all of them. It would just have been nice if everything was uniform, but I need more fingers to count how many things changing these would break. Any additions though, should use 0 for NULL. It most matters in ZScript return types, as that way, NULL also translates to False, whereas with those -1 returns, you need to read specifically around numeric value sets.

  5. #15
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    I think items might actually be 0 too, might be something else that determines if an item is on screen or not. (special item has this so it would make sense)
    I can't think of anything else with a none identifier other then that where something else is 0.

    It just doesn't make sense to me that anyone would program a NULL value as -1. Because that would return true.

  6. #16
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%
    Quote Originally Posted by Tamamo View Post
    I think items might actually be 0 too, might be something else that determines if an item is on screen or not. (special item has this so it would make sense)
    I can't think of anything else with a none identifier other then that where something else is 0.

    It just doesn't make sense to me that anyone would program a NULL value as -1. Because that would return true.
    The screen index for items starts at 1, for their pointers; but the item IDs start at 0.

    I agree about -1. That's exactly what I was stressing, but that;'s what we have in ZScript. -1 for NULL, providing true returns, which means we need to read if ( n == -1 ) instead of if ( !n ) to determine validity in an evaluation. That little hiccup gives people a lot of trouble. DMap screens, and DMap IDs also fall into this trap. Look at the returns in std.zh.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social