Monday, July 10, 2017

Abiathar API - Level sets

To provide an Abiathar level format, you have to implement INextGenLevelSet, from FMod.dll. This is made somewhat more tricky by the possibility of including tileinfo in some maps files, and by VeriMaps signatures. Level set implementations have these members:

  • Levels is exactly what it claims to be: a dictionary of the levels in the level set, identified by their ID.
  • HasTileinfo returns whether there is currently a tileinfo resource in the level set.
  • TileSize is the side length of a tile in pixels. Abiathar only supports 16 pixels per tile at the moment.
  • Tileinfo is the embedded tileinfo resource. If your level set format doesn't support tileinfo embedding, discard the provided object in this property's setter.
  • IsVeriMapsSigned gets the VeriMaps status of the levels file. If your format doesn't handle VeriMaps, just return CantSign and do nothing in all the other VeriMaps-related members. NotSigned indicates that the set supports signing, but is not currently signed. Signed means that there is a signature and that Abiathar should try to verify it.
  • Signer returns the username of the person who allegedly signed the levels file.
  • SignedHash gets the signature on the level data that was stored when the file was saved.
  • Hash gets the hash of the level data. You should use the Sha512 method in your loading method to compute this. It's up to you which parts of the file to authenticate.
  • SigningCert is the certificate to use when saving a signed file. If this is set when your saving function is called, use the SignHash method to compute the signature. If this is null then, do not sign the levels.

No comments:

Post a Comment