Ultimate Amiga
Network Boards => AMOS Language Discussion => AMOS Factory => AMOS Forum => Topic started by: rja4096 on November 22, 2007, 10:51:40 AM
-
Hi, I'm nearly ready to show you all my driving game, just one thing, how do I get amos to copy some files from code. it must be possible.
Please let me know, thanks, Rick.
-
Friend:
I am looking forward to see your game. You need to copy an amos code file? The easy way to do that would be to open/load the code in amos, then 'save as' and save under a different name.
Cheers!!!
rednova
-mobilis in mobile-
-
Hi, I'm looking forward to seeing my game too!
No, sorry I was not clear, about copying files. What i have is 30 IFF files, an amimation done in Dpaint, which is an amimation of a road moving. I need top copy these from disk to RAM disk. When the program runs it loads these one by one and displays on the screen, then mack to the start. I could create a script and have the CLI copy the files, but would like this all to be done in AMOS if possible.
Thanks, Rick.
-
METHOD 1 - use an external copy command
If you're using AMOSPro you could use the Exec instruction (http://amigacoding.com/index.php/AMOSi:Exec).
Exec 'copy oldfile RAM:newfile'
If you use the old AMOS you could use an =Doscall (http://amigacoding.com/indexphp/AMOSi:iDoscall) for the same effect.
METHOD 2 - use an extension
Maybe one of the extensions has a instruction for copying.
METHOD 3 - code your own copy function
Otherwise To do it without the C:Copy file you'd have to open the old and new file
and then load part of the file, save that part, load the next part etc.
This way you don't need an external command or extension.
The reason to do the copying in pieces is to save memory and can halfway stop your program.
edit: fixed links.. apparently the forum software doesn't like me to quote the URL :P
edit (feb 2008): updated the links
-
Actually you could use RedNova's suggestion (assuming that each frame is a static IFF image):
For I=1 to 30
Load IFF "filename"+Str$(I)
Save IFF "ram:filename"+Str$(I)
Next I
-
Samurai Crow:
hehe thanks for mentioning my name!!! Now i feel really good!!!
cheers!!!
rednova
-mobilis in mobile-
-
Exec 'copy oldfile RAM:newfile'
This method is working fine! Thanks for the tip.
I've used it for my AmosPro's french installer.
If you use the old AMOS you could use an =Doscall for the same effect.
Althought, this link is broken.
-
Try the link at http://www.amigacoding.com/index.php/AMOSi:Doscall (http://www.amigacoding.com/index.php/AMOSi:Doscall) then.
-
Sorry to resurrect an old thread, you can copy files thus:
Openin 1,src$
l=lof(1)
reserve as work 1,l
close 1
bload src$,1
bsave dest$,start(1) to start(1)+l
erase 1
You can use that to copy ANY file, be it ASCII or binary.
Another option, if you have AMCAF, you'll have the FILE COPY command available to you ;)