Implementing the restructure changes

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • PowerWyrm
    replied
    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.

    Leave a comment:


  • Nick
    replied
    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.

    Leave a comment:


  • PowerWyrm
    replied
    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...

    Leave a comment:


  • PowerWyrm
    replied
    The server part compiles cleanly, runs and saves its state perfectly. Now to the client part...

    Leave a comment:


  • PowerWyrm
    replied
    All 78/78 files now ported. Next step is to adapt the remaining PWMAngband code and try to compile.

    Leave a comment:


  • Nick
    replied
    Originally posted by PowerWyrm
    Looking at the latest code, it seems that held_m_idx (on objects) is declared (and set) but never used anywhere.
    That's amusing - looks like that was mainly used when iterating through the object list. No longer needed now there's no object list, but I probably won't remove it right away.

    Leave a comment:


  • PowerWyrm
    replied
    44/78 files ported. I hope I'm not ruining the whole code in the process...

    Leave a comment:


  • PowerWyrm
    replied
    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.
    In fact this happens very often, because of drop_near(). Objects that break or that cannot be placed up to three spaces away on a pile (except artifacts) are not dropped on the ground either (as per floor_carry). In this case, the corresponding memory is not freed.

    Leave a comment:


  • PowerWyrm
    replied
    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.

    Leave a comment:


  • PowerWyrm
    replied
    make_fake_artifact() creates a copy of an object, which may allocate memory for slays and brands. The object -- even if created as a local structure "object_type_body" -- should still be freed.

    Leave a comment:


  • PowerWyrm
    replied
    In obj_known_damage(), the "obj" variable inside a loop masks the "obj" parameter. This probably gives a compilation warning.

    Leave a comment:


  • PowerWyrm
    replied
    Looking at the latest code, it seems that held_m_idx (on objects) is declared (and set) but never used anywhere.

    Leave a comment:


  • PowerWyrm
    replied
    rd_objects_aux() uses rd_item directly. I guess it could use the rd_item_version parameter instead...

    Anyway, 23/78 files ported

    Leave a comment:


  • Nick
    replied
    Originally posted by PowerWyrm
    First thing I've done is move the chunk o_idx array inside the square structure, like it was done for monsters. By doing that, I've spotted a bigger problem that will probably prevent me from moving to linked lists: the array of marked objects for each player.

    In Vanilla, the "marked" flag is on each object, and it's a simple byte. In PWMAngband, it is on each player, and it's an array of bytes indexed by object id. unfortunately, there's no way I can get around that easily...
    The correct thing for V to do - and I am hoping to get it done before 4.1 - is to move all the known player stuff to cave_k and gear_k. This should make it easier for your variant, because then the client side should know exactly cave_k and gear_k (which contain everything about the player's knowledge of stuff), whereas the server knows cave and gear (completely, and there's no need to mess around with putting knowledge info on anything).

    It's fairly amazing that you're managed to implement everything - and also very useful to me.

    Leave a comment:


  • PowerWyrm
    replied
    Piles of objects are now fully functionnal in PWMAngband... I think. Time to make a backup save of the source and start implementing the change...

    Leave a comment:

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