flat assembler
Message board for the users of flat assembler.

Index > Main > object oriented animation file.

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 26 Nov 2008, 19:56
each image in this animation file is a set of pointers indicating the image to display, it's size ( to be or not to be scaled to fit) the color, and the palette inside the image itself ( optional)
an animation is a set of pointers and coordinates.
the coordinates will be usefull to simplify the movment of a picture
the color will be usefull to change the base color in palette
the time parameter ( in milliseconds) will be like the one used in gif format.
the pointer will point to any image structure supported. lik put for function.

and the result should be very interresting.

the extension would be "ObjectAnimationFile" or "FoolAnimationFile"
.OAF or .FAF as you want.


Description:
Filesize: 12.32 KB
Viewed: 7803 Time(s)

FAF.png




Last edited by edfed on 04 Dec 2008, 23:04; edited 1 time in total
Post 26 Nov 2008, 19:56
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 27 Nov 2008, 00:21
Sooo, what is advantage of this format against existing FLV (true and tested), for example? And then, as we all know, FLV is much inferior to DivX and modern stuff, what is advantage against those? Does your format allow for HW acceleration (present on virtually all GFX cards today)?
Post 27 Nov 2008, 00:21
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2465
Location: Bucharest, Romania
Borsuc 27 Nov 2008, 02:31
Xvid is way better than DivX Wink

also, who cares about HW acceleration that much? It's not like movies are hard to decode with a CPU or too slow... Razz

_________________
Previously known as The_Grey_Beast
Post 27 Nov 2008, 02:31
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20517
Location: In your JS exploiting you and your system
revolution 27 Nov 2008, 03:39
Borsuc wrote:
also, who cares about HW acceleration that much? It's not like movies are hard to decode with a CPU or too slow... Razz
It depends what other tasks your CPU is also doing. Not everyone is happy to let programs waste CPU cycles when other tasks are pending.
Post 27 Nov 2008, 03:39
View user's profile Send private message Visit poster's website Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2465
Location: Bucharest, Romania
Borsuc 27 Nov 2008, 03:48
oh yeah you need so many apps when watching a movie Razz
and if you need that use a multi-core CPU

_________________
Previously known as The_Grey_Beast
Post 27 Nov 2008, 03:48
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20517
Location: In your JS exploiting you and your system
revolution 27 Nov 2008, 03:54
Not all apps need an active user in front of them. My background tasks run 24/7 at 100% CPU, so any program wasting my CPU cycles will quickly get booted off and more efficient replacements found.
Post 27 Nov 2008, 03:54
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 27 Nov 2008, 17:19
the advantage of this format is that it is fool compatible.
then, it is a format for my hobby.

after, idon't know the flv format, but one thing is sure, this format is very modular because it can display everythings graphic.
assuming an evolution of the structure, like addition of current item's size instead of a fixed value ( add [ptr],item's size )
and then, your animation file can be composed of a string of many elements of different nature.
box,text,oscilloscope,image,line,effect, etc.
for the moment, i don't care about HW acceleration.
i focus only on functionality.
this is the test animation, a pulsed light ball.
Code:
tstanim dd f.anim,100,50,20,20,0,0,@f-$-4
        dd f.put,0,0,18,18,white-1,bille,1
        dd f.put,0,0,20,20,white-6,bille,2
        dd f.put,0,0,18,18,white-7,bille,3
        dd f.put,0,0,16,16,white-5,bille,4
        dd f.put,0,0,18,18,white-3,bille,5
        dd f.put,0,0,20,20,white-2,bille,2
        dd f.put,0,0,18,18,white-1,bille,3
        dd f.put,0,0,16,16,white-5,bille,4
        dd f.put,0,0,18,18,white-3,bille,5
        dd f.put,0,0,20,20,white-2,bille,2
        dd f.put,0,0,18,18,white-1,bille,3
        dd f.put,0,0,16,16,white-2,bille,4
        dd f.put,0,0,18,18,white-3,bille,5
        dd f.put,0,0,20,20,white-2,bille,6
        @@:                                  
    

it works in the last shell update.

this is the function to include
Code:
anim:
.call=0
.x=4
.y=8
.xl=12
.yl=16
.c=20
.bmp=24
.t=28
.ptr=24
.s=28
.img=32
        push esi edi
        mov edi,esi
        mov eax,[esi+.ptr]
        lea esi,[esi+eax+.img]
        mov eax,[esi+.call]
        or eax,eax
        je @f
        mov eax,[eax]
        or eax,eax
        je @f
        call eax
@@:
        pop edi esi
;here is the plce where to put the timing routine.




        add dword[esi+.ptr],.img
        mov eax,[esi+.s]
        cmp [esi+.ptr],eax
        jl @f
        mov dword[esi+.ptr],0
@@:
        ret
    

this is the line to add to flist.inc
Code:
f:
...
.anim      dd   anim       ,0

...
db         'anim.inc'
align 16
include    'anim.inc'
align 16
    
Post 27 Nov 2008, 17:19
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 27 Nov 2008, 18:57
edfed,

How do you think, which byte value will be omnipresent in your .OAF/.FAF/whatever file? Methink, it's 00. Wink

vid and Borsuc,

DivX, XviD… Let him play with self-written tools, may be it will get some result. "Tread lightly because you tread on my dreams." — William Butler Yeats. Wink
Post 27 Nov 2008, 18:57
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 27 Nov 2008, 22:51
it is not always zero that is omnipresent.
sometimes, it is -1, sometimes it is 10
etc etc.
sometimes, it is random numbers, or a count.

but at least, it will be possible to have a pointer instead of a sub object inside the parent.

Code:
time1=10
time2=10
time3=0edfedh

anim dd f.anim
dd obj1,x,y,color,time1
dd obj2,x,y,color,time2
dd obj3,x,y,color,time3
obj1 dd f.box,x,y,xl,yl,color
obj2 dd f.txt,x,y,xl,yl,color,text,font
obj3 dd f.button,x,y,xl,yl,color,bmp1,bmp2,variable??? or pointer???
    

with 0edfedh as time value, the current selection will never change, for example, if you have finixhed the reading of a video stream, you have an endless menu that needs to click to activate something.

one interresting way where to work is the parameter computation with ascii formulas as parameter.
then to just move an item, or play a loop, you just leave a formula, and it will compute parameters each times it changes frame.

maybe for the 00 redondancy problem, it is possible to crete a little code to compress the images and everithing on the 00 value
if one byte = 00 then, it will be like this:
00 01
if two bytes = 00
00 02
if 329 bytes = 00
OO FF 00 4A

to use transparentlly in the file system routine?
maybe later, it will be interresting to seek a mathematical way.
the file would be composed of vectors, counters, matrix, arythmetics, etc etc...

BTW, it means that programer and user should have an arythmetics omnipresent tool, like ctrl+C ctrl+V, or prtscr.
Post 27 Nov 2008, 22:51
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.