Dodgy code notes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wobbly
    Prophet
    • May 2012
    • 2633

    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.
    Last edited by wobbly; March 12, 2020, 07:55.
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9647

    #2
    Thanks, this is an unglamorous but useful task.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • wobbly
      Prophet
      • May 2012
      • 2633

      #3
      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++;
      		}

      Comment

      • backwardsEric
        Knight
        • Aug 2019
        • 531

        #4
        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 */

        Comment

        • invisibletroll
          Apprentice
          • Jul 2020
          • 50

          #5
          Originally posted by Nick
          Thanks, this is an unglamorous but useful task.
          What isn't?

          Comment

          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎