On Thu, Sep 29, 2011 at 01:40:06PM -0700, Adam Perry wrote: > I took a crack at it. > > I assume that gam is global. I couldn't find anywhere that said it > was, but I could find functions that referred to it out of scope.
yes, it is. the command that makes a global in FreeBasic is EXTERN. gglobals.bi:EXTERN gam AS GameState The extern command only says it is global. Some module still has to DIM it to allocate the memory. > The > only other bit I was unsure about is readattackcaption, implemented > like so: > > FUNCTION readattackcaption (byval index as integer) as string > DIM buf(40 + dimbinsize(binATTACK)) as integer > loadattackdata buf(), index > RETURN readbinstring(buf(), 37, 38) > END FUNCTION > > I don't see any reason why this wouldn't work, but I'm not familiar > with the formats and so forth. That does look correct to me. > Patch attached. Let me know if anything looks WRONG. Excellent! I will apply it and test it out. --- James _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
