Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
146 user(s) are online (133 user(s) are browsing Forums)

Members: 0
Guests: 146

more...

Support us!

Headlines

 
  Register To Post  

Hi some problems whit datatypes and animation
Home away from home
Home away from home


See User information
Hi some problems whit datatypes and animation, please have a look at my code.

The problem is that I'm only able to view the first frame, I have not found any examples in the SDK, and not on amigawiki page. I have tried to google but, these days google mostly displays sponsored ads, and other nonsense.

https://github.com/khval/AmosKittens/b ... /OS/AmigaOS/animation.cpp

It looks to me that "ADTM_LOADNEWFORMATFRAME" does not work,
I have better souccess whit "ADTM_LOADFRAME", but even so can't get frame above frame "0"

alf_TimeStamp what is also lacking is description of scale of time in TimeStamp is it in micro seconds, seconds, milliseconds, it does not say in the header file nor in the autodocs for animation datatype.

Also frame.alf_Duration always returns 0.


While should need to explain the code…
There are 3 different attempts etch in their own function.

try_frame()

this function try’s to set frame number and then try get bitmap from the frame, using SetDTAttrs() and
SetDTAttrs(),

new_frame()

This tries to get frame by using “struct adtNewFormatFrame”, and setting the TimeStamp and use DoDTMethodA().

old_frame()

This tries to get frame by using “struct adtFrame”, and setting the TimeStamp and use DoDTMethodA(), to retrieve that frame.


Edited by LiveForIt on 2019/11/16 9:24:35
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Hi some problems whit datatypes and animation
Home away from home
Home away from home


See User information
@LiveForIt

No one knows how to do this anymore?

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Hi some problems whit datatypes and animation
Just can't stay away
Just can't stay away


See User information
@LiveForIt

Quote:

new_frame()

This tries to get frame by using “struct adtNewFormatFrame”, and setting the TimeStamp and use DoDTMethodA().

old_frame()

This tries to get frame by using “struct adtFrame”, and setting the TimeStamp and use DoDTMethodA(), to retrieve that frame.


I'm not very familiar with the animation.datatype API but judging from the adtFrame and adtNewFormatFrame structs you should be using IDoMethodA() instead of DoDTMethodA().

DoDTMethodA() is a thin wrapper on top of DoGadgetMethodA() which expects the field immediately after MethodID to be a pointer to a GadgetInfo structure that it will initialize before passing the message on to IDoMethodA().

Since in struct adtFrame/adtNewFormatFrame this slot is taken up by the alf_TimeStamp field it means that this value ends up being overwritten before the message gets to the animation datatype subclass.

Go to top

  Register To Post

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project