Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
65 user(s) are online (54 user(s) are browsing Forums)

Members: 0
Guests: 65

more...
Support us!
Recent OS4 Files
OS4Depot.net





Hi some problems whit datatypes and animation
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2739
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.
   Report Go to top

Re: Hi some problems whit datatypes and animation
Home away from home
Joined:
2006/11/20 16:26
From Norway
Posts: 2739
@LiveForIt

No one knows how to do this anymore?

_________________
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
   Report Go to top

Re: Hi some problems whit datatypes and animation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
@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.

   Report Go to top





[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project