• Displacer

    Displacer - 2007-07-02

    Going through this entry, and looks like you have a few things wrong.

    creator[16] is actually "last save" (I assume this is last saved by, but don't know)

    name[16] should be creator, and its a lot larger than [16], I think the entry zero[64] is part of the creator entry, (what you have listed as name)

    so the first few entries to this struct would be:

    char     last_save[16]
    char     creator[80]

    instead of:

    char     creator[16]
    char     name[16]
    uint8    zero[64]

    Also this is used for .cow files only, and only used in the editor.

    (all this is from system shock 2, may be different for thief)

    • Filip Volejnik

      Filip Volejnik - 2007-07-03

      Thanks for that info. I've read your other reply as well. Do you think you could write these into some sort of text file / diff against the t1/t2/ss2-types.dtype or such? The .dtype scripts are now used instead of the .h files, as it simplifies a lot of things.

      Those are just converted versions of Telliamed's .xml files (I've found some mistakes in my conversion script, so will patch those in cvs to be more actual in about a week, as I won't get to it earlier probably). Also, I'll consider splitting the dtype scripts into more files, to make orientation easier. Also thanks for the Dark DB header version fields. I'll patch the sources to reflect that.

      BRHEAD is brush header structure, if I'm not mistaken. Those will be worth if editor is created (one day).

      Do you think you could be able to find out the WR/WRRGB lightmap UV correct way of calculation? I only observed the resulting data to find out the structure, and know that it is a displacement in some kind of units, but what worries me is what is 0,0 shift and such (scale of the shift as well as what is the shift origin). See src/services/worldrep/WRTypes.h - that is what I was able to find out about the WorldRep chunk (There is brush assignment map after light lists, which I do not use currently). The calculation is done in wrcell.cpp - constructBspVertex - a bit messy I'm afraid. You would be glorified for such achievement.

    • Displacer

      Displacer - 2007-07-05

      I'll keep an eye out for the WR/WRRGB calculations, I don't know when I'll find them as I'm dealing with 90+ megs of undocumented 32bit assembly, derived from C++. I know some of the stuff may not be important, or high on the list of things that need to be found but understand that I have to grind through this stuff using little to no clues as to how it works. I'm researching things that are obvious first, hence the database info. Heh, working with disassembled code and a debugger takes more time than I'd like to admit. Also as for difference between ss2, t1, t2 I can't tell you as I'm only working with ss2.

      Anyway I have more on BRHEAD, I'm working from your DarkDBDefs.h file, you can convert the info to your script files as needed (I'll switch to using them later)

      It looks like the routine that deals with this is a bit buggy, it uses a zero terminator to find the end of the creator and last save strings, if this zero is missing it will keep spitting out whatever if finds, as it doesn't check length to make sure it doesn't go past the space reserved for it.

      I also have some more info. This entry you have:

      uint32     unknown1

      is a variable called global_ambient. Not sure what this does at this time, any ideas?

      Another one is between use_grid and time.

      Its a variable called renderHotsOnly (1 byte in length). What this is used for I don't know, does it look familiar? (Hots I assume is the key word here, hotspots perhaps?)

      The next 2 bytes look to be unused, they are not accessed anywhere I can see.

      So, we now have:

      char     name[16]     Zero terminated string
      char     creator[80]  Zero terminated string
      uint32   global_ambient (?)
      uint32   grid_size
      Boolean  show_grid
      uint32   shading
      uint32   unknown5
      boolean  use_grid

      I'm unsure about the number types of the next two, so I'll just use their length

      byte     renderHotsOnly (?)
      word     Unknown (appears unused)

      uint32   time

    • Displacer

      Displacer - 2007-07-05

      Ok, looks like the unused word is just to align the data to a dword. Since use_grid and renderHotsOnly are both bytes, it makes sense that the following unused word is there for alignment.

    • Filip Volejnik

      Filip Volejnik - 2007-07-16

      Ok, I've modified the dtype scripts, so now they should be ok for all 3 Dark's games.

      global_ambient is probably a ambient light specification.

      Hots could stand for VHots (Vertexes that are used for object attachments). Not sure.

      I believe you'll see BRHEAD even in MIS files, if those are unstripped (stripping removes the static geometry construction chunks).

      You are free to move this discussion to the opde-devel mailing list.

      If you have some C++ programming skills, would like to help coding too?

      Every helping hand is appreciated.

      That's it from me for now. Thanks for helping.

    • Displacer

      Displacer - 2007-07-18

      Well the BRHEAD entry is not in any of the unstripped system shock 2 .mis files, may be different for the thief series. The global ambient is a odd var. It is only used from the brhead entry when a circumstance is met, which I haven't found yet. It looks like its used for some sort of backup file used for editing but again I haven't tracked down how, or why. Also it looks like show_grid is incorrect, but I haven't sorted out what it is exactly so I could be mistaken.

      opde-devel says (read-only) so I can't post there. I have very little C++, I mostly deal in assembly. I can code with C++, but I doubt I would be much help...

      Oh, I have found some code that deals with WR/WRRGB, it is extremely involved so it will take quite some time to sort it out, but at least I know where it starts.

    • Filip Volejnik

      Filip Volejnik - 2007-07-19

      That's fine. You can only post after registering (subscribing) to opde-devel. Would you like being registered as a project member too? No problem to do so.

      I'll have to look at the BRHEAD thing, I only tried to work with brushes 2 years ago, when I made mis2map converter (converted the unstripped geometry to .map format). That one was quite mess, because of the fact that the Dark Engine carves out from an infinite solid, and BSP maps are the other way round (creating walls in air). That one was done using the original perl modules - cowgen/cowed or how those were named. But hey, it worked :)

      I'll be mostly offline soon for some time, but if you'll feel like, please inform about any progress. I'm interested in your work!

    • Displacer

      Displacer - 2007-07-19

      Ugggg, I knew about registering, bit short on brain cells it seems. If you want to add me as a project member, I'd be honored.

      I'll reg to the opde-devel and post there from now on.

    • Filip Volejnik

      Filip Volejnik - 2007-07-19

      Ok, done! I've given you some basic permissions, hopefully those will be sufficient. Do not hurry with modifications, take your time...

    • Displacer

      Displacer - 2007-07-19

      Heh, don't worry. I doubt I'll do any mucking with the code. I'll primarily be on the information side. The definitions you have are good as far as they go, but as you can see from just the BRHEAD entry a lot is missing or in error. I'll post a hello and what I'll be doing to the devel mailing list so as to stop loading up this area with stuff that belongs there.


Log in to post a comment.