English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 05 January 2023, 19:44   #1
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,547
NewType for ANIM object

I can't seem to find any information on what the NewType for the ANIM object is (eg, the one used in commands like "LoadAnim anim#,filename$[,palette#]").

Is this documented anywhere?



Edit:

I've done my best to reverse engineer it and I understand *most* of the format, there's just one thing I can't wrap my head around.

Basically the newtype seems to maintain a pointer to the current "delta" frame of data, and the first long word of the data is simply a pointer to the next delta frame, but the *second* long word is a value I can't decipher (all values after that are the actual compressed data from the ANIM5 file)



NewType .anim
_width.w ;Set to 0 after free anim
_height.w
_depth.w
_unknown1.w ;May contain flags for EHB, HAM etc? Shifting right by 3 seems to give compression type?
_frames.w
_body.l ;Pointer to the "body" of the anim
_bodySize.l ;Size of the "body" chunk
*_firstFrame.animDelta ;Pointer to the first delta frame of data (should equal body + body size + 8)
_firstFrameOffset.l ;Increase first delta frame by this + 8 to get next frame
*_currentFrame.animDelta ;Pointer to the current delta frame of data
_currentFrameOffset.l ;Increase current frame by this + 8 to get next frame
End NewType

NewType .animDelta
*_nextFrame.animDelta ;Pointer to the next delta frame. Presumably loops back to the first one?
unknown.l ;Unknown, doesn't seem to correlate to size, could be something to do with compression format
End Newtype

Last edited by earok; 05 January 2023 at 23:57.
earok is offline  
Old 06 January 2023, 18:02   #2
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
Hi earok,

maybe it is for some help, I just disassembled the animlib and converted it to ab3-asm.
You can find the source here:

https://github.com/AmiBlitz/AmiBlitz...BS/animlib.ab3
Honitos is offline  
Old 10 January 2023, 06:59   #3
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,547
Thanks for that! I ended up switching to the RIAnimLib for what I was doing, but I'll take a deeper dive into animlib if I go back to the Blitz library.
earok is offline  
Old 10 January 2023, 09:00   #4
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
Ok for that!
I dissassembled the iffiolib and the ilbmifflib as well. Both libs are used by the animlib.
Honitos is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Share NewType to Statement/Function earok Coders. Blitz Basic 21 30 May 2018 13:37
win7 anim intro change with an amiga anim ?? turrican3 request.Other 1 12 January 2018 10:51
Object width mritter0 Coders. C/C++ 2 19 September 2014 23:06
return newtype item no. in Blitz leathered Coders. Blitz Basic 4 20 March 2013 11:59
Art App that had a Fairy Anim and a Man on Horse anim?? DDNI request.Apps 15 19 July 2011 00:24

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:41.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06924 seconds with 13 queries