Implementing the restructure changes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerWyrm
    Prophet
    • Apr 2008
    • 2986

    All 78/78 files now ported. Next step is to adapt the remaining PWMAngband code and try to compile.
    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

    Comment

    • PowerWyrm
      Prophet
      • Apr 2008
      • 2986

      The server part compiles cleanly, runs and saves its state perfectly. Now to the client part...
      PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

      Comment

      • PowerWyrm
        Prophet
        • Apr 2008
        • 2986

        The client part now also compiles cleanly, and I can even manage to create a character and save its state on the server. Levels are nicely generated, object lists seem to work fine. The only problem is that equipment/inventory is totally fucked up...
        PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9638

          Originally posted by PowerWyrm
          floor_carry() never deletes the "drop" object if it fails. This should really rarely happen (probably only if a character spends enough time on a level to fill every square with a pile of objects), but the code probably should handle the case.
          There are actually a number of things I don't like about floor_carry() and drop_near() - handling of mimics being a big one. I think I will rework those to be more sensible.
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • PowerWyrm
            Prophet
            • Apr 2008
            • 2986

            Originally posted by PowerWyrm
            The client part now also compiles cleanly, and I can even manage to create a character and save its state on the server. Levels are nicely generated, object lists seem to work fine. The only problem is that equipment/inventory is totally fucked up...
            Found out that wield_all() doesn't do what it's supposed to do so I'll probably have to implement all the pile-related changes before I can even think of testing the new code.
            PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

            Comment

            • PowerWyrm
              Prophet
              • Apr 2008
              • 2986

              Originally posted by PowerWyrm
              Found out that wield_all() doesn't do what it's supposed to do so I'll probably have to implement all the pile-related changes before I can even think of testing the new code.
              Well the problem was because I was sending the object indices to the client before sending the actual objects. Now it works.
              PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

              Comment

              • PowerWyrm
                Prophet
                • Apr 2008
                • 2986

                "command_menu" in ui-context is never freed.
                PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                Comment

                • PowerWyrm
                  Prophet
                  • Apr 2008
                  • 2986

                  Everything ported up to Dec 31, 2014. This means I only have the changes from this year left to port

                  Stuff seems to work fine except for one problem: the server crashes after generating a few levels with the Dungeon Master on a malloc() line. Probably a memory overwrite error somewhere, or a double free. I'll check it when everything is ported, in case it fixes itself.
                  PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                  Comment

                  • PowerWyrm
                    Prophet
                    • Apr 2008
                    • 2986

                    Commit 8e96eb changed balance drakes from color 'v' to 'V'. Why not use color 'P', which is used for Great Wyrm of Balance?

                    Btw, Nightwings have ATTR_FLICKER, so keeping color 'v' was ok.
                    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                    Comment

                    • PowerWyrm
                      Prophet
                      • Apr 2008
                      • 2986

                      Found a bug in player_outfit():

                      Code:
                      		inven_carry(p, obj, TRUE, FALSE);
                      		si->kind->everseen = TRUE;
                      
                      		/* Deduct the cost of the item from starting cash */
                      		p->au -= object_value(obj, obj->number, FALSE);
                      If the object given at birth stacks with another item, the "obj" pointer is deleted and the "object_value" line crashes.

                      I don't think this happens in V, but it happened with my variant when giving extra stuff to the Dungeon Master character. Putting the cost deduction before giving the item to the inventory would fix the (potential) problem.
                      PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                      Comment

                      • PowerWyrm
                        Prophet
                        • Apr 2008
                        • 2986

                        Copy/paste error in parse_room_height():

                        Code:
                        	/* Make sure rooms are no higher than the room profiles allow. */
                        	for (i = 0; i < N_ELEMENTS(room_builders); i++)
                        		if (streq("room template", room_builders[i].name))
                        			break;
                        	if (i == N_ELEMENTS(room_builders))
                        		return PARSE_ERROR_NO_ROOM_FOUND;
                        	if ([B][U]t->wid[/U][/B] > room_builders[i].max_height)
                        		return PARSE_ERROR_VAULT_TOO_BIG;
                        This should be t->hgt.
                        PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                        Comment

                        • PowerWyrm
                          Prophet
                          • Apr 2008
                          • 2986

                          Fix for #1867 is still incomplete.

                          If you stand on a pile of items, select one (with 'e' or 'i' and then '-') and press 'g' from the context menu to pick it up, the game asks you again which item on the floor you want to pick up.

                          I guess player_pickup_item() still should have an object as parameter, context should set the object as command argument and do_cmd_pickup() should retrieve that argument and pass it to player_pickup_item().
                          PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                          Comment

                          • PowerWyrm
                            Prophet
                            • Apr 2008
                            • 2986

                            Fix for #1872 should also be amended.

                            After the fix, you get effects IDed even when blind. I don't think you should learn an effect if you cannot see it. Also effect projection is partly shown when blind (at least it's the case for ball wands/rods).
                            PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                            Comment

                            • PowerWyrm
                              Prophet
                              • Apr 2008
                              • 2986

                              Originally posted by PowerWyrm
                              Everything ported up to Dec 31, 2014. This means I only have the changes from this year left to port

                              Stuff seems to work fine except for one problem: the server crashes after generating a few levels with the Dungeon Master on a malloc() line. Probably a memory overwrite error somewhere, or a double free. I'll check it when everything is ported, in case it fixes itself.
                              Everything ported up to Apr 02, 2015. I'm now storming through the remaining changes (most of them are bugs -- a lot coming from this thread ), only 10 pages left... and the above problem fixed itself too (was reusing somewhere an object freed with object_delete() without nullifying it first -- easily spotted with the MEM_POISON_FREE feature in DEBUG mode).
                              PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                              Comment

                              • PowerWyrm
                                Prophet
                                • Apr 2008
                                • 2986

                                inven_carry() and (possibly in the future for V, currently in my variant which has a limit on monster inventory size) monster_carry() can fail, leaving an allocated object unfreed. So some tests should be added:
                                - if (!inven_carry(object)) delete object
                                - if (!monster_carry(object) delete object
                                - be sure object is not referenced afterwards (set object to NULL and check vs NULL)
                                PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                                Comment

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