ExpandedAnims
5 messages in this thread
Keith,
The DPAint manual states: "The expanded method represents the
simplest of the two memory models where all of the memory for each
animation frame is allocated. …in low resolution mode, 320×200, and you
have 10 animation frames, then you would need enough memory to hold 10
complete 320×200 images. Two advantages of this method are that frame
flipping for animpainting is very smooth, and you will not run out of
memory to add an element to your animation within the allocated frames."
(DPaintIV Manual, p.240)
I don't know if this is enough information for you to answer my queston,
but the manual really doesn't provide more information than that.
Let me know if you can help.
Thanks Keith,
Best–George Roland
;Here's a quick hack script that will decompress an ANIM into individual
;FAST memory buffers and then play back the sequence using COPY from ;fast
memory. Another approach could be used that leaves all frames in ;CHIP
memory, but that would only work with pretty small ANIMs unless ;you're
fortunate enough to have an A3000 with 2Meg of CHIP ram. ;– Keith
;————————————————————–; ; playback
via pre-decompressing the ANIM ;
BUFFERS 300 :rem make sure we have enough slots for
the frames.
DIM fname[100]
fname$="data:tst.anim"
SETBLACK :rem hide the preliminaries
LOAD 1,fname$
COPY 1,2
LOADANIM 3,fname$
BCHECK tframes,3 :rem get the number of frames ;
compensate for 2 frame overlap and the fact we've already got 2
tframes=tframes-4
frame=3 :rem last unavailable buffer ; preallocate the
buffers, so we know if we have enough space right away
for i=1 to tframes
newfast frame+i,-1
next ; loop & decompress
b = 2
COPY 1,frame+1
count=2 /loop:
ANIM 3,b,done
COPY b,frame+count
count = count + 1
b = 3 – b
if done=0 then GOTO loop ; make last two into frames 1 & 2
ANIM 3,b,done
b = 3 – b
ANIM 3,b,done ; free the ANIM and try to make our screen pair… ;
could run out of RAM here I suppose, but the ANIM was probably ; larger
than two frames
FREE 3
NEWFAST frame+count,1
COPY 3-b,frame+count
count=count+1
COPY b,frame+count ; ready to play…
PAUSEMODE 1
SPEED 1
tframes = frame+1
setblack /ploop:
COPY tframes,b
PAUSE 1
DISPLAY b
b=3-b
tframes=tframes+1
if tframes=count then tframes=frame+1
goto ploop
Dang. CompuServe munched that program pretty good it seems, all the end of
lines were lost (that is, several were). Every where there is a semicolon,
it should be the first character on a new line, and the label /ploop:
should have started on its own line as well. I entered the script with
double slashes for the labels ( //ploop: etc.) so that it would not
think they are commands, which seemed to work, but it sure mucked up the
comment lines. Hope you can make sense out of it.
Keith
Keith,
the easiest way I found to have CompuServe leave my messages alone, when
entering lists or program code, is to add a space at the beginning of each
line. This will turn off CompuServe's line reformatting. It also works in
any program, even the automated ones like Whap! which don't give you the
option of specifying "SU" (Store Unformatted) when saving your message.
Blaq!
Thanks, I'll try that next time…
Keith