Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Dodgy code notes (http://angband.oook.cz/forum/showthread.php?t=9895)

wobbly March 12, 2020 06:42

Dodgy code notes
 
I'm just going to keep a record here as I find them & at some stage I'll submit a pull request to fix them all up:

genroom.c
build_crossed
room b runs east/east
locate room b followed by locate room b

build_pit
2 headings for corners - looking at it again its probably right, just written in a way that isn't exactly clear.

Nick March 12, 2020 07:12

Thanks, this is an unglamorous but useful task.

wobbly March 16, 2020 13:22

gencave.c
I don't think the odds in the note actually match the function.

Code:

                /* We generate a rarity number to figure out how exotic to make the
                * room. This number has a depth/DUN_UNUSUAL chance of being > 0,
                * a depth^2/DUN_UNUSUAL^2 chance of being > 1, up to MAX_RARITY. */
                i = 0;
                rarity = 0;
                while (i == rarity && i < dun->profile->max_rarity) {
                        if (randint0(dun_unusual) < 50 + c->depth / 2) rarity++;
                        i++;
                }


backwardsEric April 29, 2020 18:24

There's misleading comments for the brands and slays fields of struct object at line 447 and 448 of object.h.

Code:

        bool *brands;                  /**< Array of brand structures */
        bool *slays;                    /**< Array of slay structures */



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

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