Jump to content

[v35.3] SFO2E library bugs


Recommended Posts

lib_struct

Function struct_get fails to fetch fields of type 'flag', such as the can_buy or can_buy_cures flags of a store.  Suggested fix:

--- a/mih_fr/third_party/sfo2e/lib_struct.tph
+++ b/mih_fr/third_party/sfo2e/lib_struct.tph
@@ -3583,6 +3583,11 @@ BEGIN
                strref BEGIN
                        READ_STRREF offset value
                END
+               flag BEGIN
+                       n=$"SFO_%strtype%_flags"("%arguments%")
+                       READ_BYTE offset byte
+                       value = (byte BAND (2**n)) >> n
+               END
                DEFAULT
                        PATCH_WARN "unrecognized type %type% in struct_get"
                END

 

Link to comment

lib_bam:

The function to recenter bam frames went missing between SFO and SFO2E.  I'd write my own, but I'm uncertain about BAM v2 trickery for EE.

I used this one to restore misc9k (Third Journal of Irenicus) in BG2, which has a way off center description image.  Not a biggy as I can do the fix in a different way, but it would be a nice to have, please? 😁

Link to comment
On 1/2/2024 at 6:09 PM, DavidW said:

I think there are quite a few things struct_get doesn't recognize, but I've added that one.

I realized that when I was comparing code for struct_get and struct_read, but this was a particular case that I needed.  I wanted to find stores that sell cures.   Thanks!

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...