ToEEZWB - pet project

Discussion in 'Tech Guides and Help Threads' started by anatoliy, Nov 8, 2017.

Remove all ads!
  1. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    4,627
    Likes Received:
    123
  2. anatoliy

    anatoliy Member

    Joined:
    Feb 18, 2017
    Messages:
    89
    Likes Received:
    4
    @Sitra Achara, I really miss that you didn't expanded this section :D

    Code:
    BOOL LegacySectorSystem::SectorLoad(SectorLoc secLoc, Sector* sect)
    {
        return (*addresses.SectorLoadFunc)(secLoc, sect);
    }
    
    Kind of tired of rewriting this bin sector format deserializer. At least structs can be borrowed from Temple+ ))
     
  3. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    2,694
    Likes Received:
    78
    Maybe the decompiled DLL file would be of use to you, here you go:

    https://we.tl/xOen2VF9r7

    The relevant function is MapSectorLoadNormal (or MapSectorLoadEditor ;) )
    If you have IDA I can also send you the database.
     
  4. anatoliy

    anatoliy Member

    Joined:
    Feb 18, 2017
    Messages:
    89
    Likes Received:
    4
    Thank you @Sitra Achara !
    I just generated temple.idb using IDA 5.0 free. Is your file different? If so, please share :)
     
  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    2,694
    Likes Received:
    78
    PM'd!

    If you're interested, ToEE itself has a hidden "editor mode" which causes many of the system to initialize in "editor mode". With some effort these could be re-enabled and extended to provide a modern in-game editor. I think that would be a cool project ;)
     
  6. anatoliy

    anatoliy Member

    Joined:
    Feb 18, 2017
    Messages:
    89
    Likes Received:
    4
    Yes, thanks again for PM conversation.

    And yes, as soon as I've seen WorldEd, which required temple.dll I assumed some editing routine could be in dll rather than in editor itself. And although I believe creating WorldEd2 would be overkill, using temple.dll as sub-routine in .net libraries would be interesting at least.

    Personally I'm more creator than decipher \ crossword lover. And from looking at such:
    Code:
    if ( tio_fread(v3 + 16, 8, 1, (TioFile *)a1) != 1 || tio_fread(v3 + 18, 36, 1, (TioFile *)a1) != 1 )
    
    I receive only headache))

    But I agree that it's kind of interesting))

    Thank you again @Sitra Achara :)
     
  7. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    2,694
    Likes Received:
    78
    Press Y to assign type, press N to rename ;)

    But yeah, going through the DLL is quite a lot of work as well. @DarkStorm and I spent many hours on that...
     
  8. anatoliy

    anatoliy Member

    Joined:
    Feb 18, 2017
    Messages:
    89
    Likes Received:
    4
    In ToEEWB (old) found errors in SectorLights parsing:
    * Flags and Type were swapped;
    * NightLight part was messed;
    * Algorithm first read 64 bytes. Then if flags & 0x10 or flags & 0x40 then read 8 bytes of partSys hash int 32 and handle int32. Then if flags & 0x40 were present then more bytes up to 108.
    That is why ToEEWB cannot read some sector lights. Sometimes size was 64, sometimes 72 and sometimes 108. ToEEWB always read 108.
     
Our Host!