English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 17 January 2024, 11:35   #1
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
Decode Sprites

In my game Robot Jet Action 2 I load most of the data in one file and decompose it in the mem. Except sprites. I load sprites separately as seams there's no DecodeSprites function.
Is there away to Decode sprites from memory?

I mean I could load shapes and convert them to sprites but I'm afraid that it will take double amount of the mem, does it?
carrion is offline  
Old 22 January 2024, 15:10   #2
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
You could use "GetaSprite Sprite#, Shape#" to create a sprite out of the shape.
After creating the shape you can free the shapes memory by using "Free Shape Shape#".

But you are right: while creating the sprite you will need the extra memory before you can free it up.
Honitos is offline  
Old 23 January 2024, 08:42   #3
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
Quote:
Originally Posted by Honitos View Post
But you are right: while creating the sprite you will need the extra memory before you can free it up.
Yeah, plus I'm afraid that creating sprites this way would end up with memory fragmented a lot.

I wonder why there's no decodeSprites function , wha was the rationale?
carrion is offline  
Old 23 January 2024, 19:23   #4
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
There are goood chances the fragmentation will be not that as severe if you convert one shape after another to a sprite.

The memory needed for GetaSprite could could be allocated at the same memory location then.

I possibly could implment a DecodeSprites-function but the benefit would be low as your requirement is fullfilled with the existing routines.
Honitos is offline  
Old 24 January 2024, 09:15   #5
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
You are right
What I will do I will try to use CludgeBitmap on already allocated mem and load sprite bitmap there.
Thanks for ideas.
carrion is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Decode Kickstart failure by address lines? outzider support.Hardware 0 06 November 2022 23:13
Please help me decode this macro.. hceline Coders. C/C++ 3 27 September 2022 17:02
Utillity to decode MFM data mark_k request.Apps 5 26 August 2017 14:32
How to decode ZX Spectrum and C64 fonts Leandro Jardim Retrogaming General Discussion 4 04 July 2014 02:05
Optimising ILBM decode pmc Coders. Asm / Hardware 21 12 October 2011 20:24

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:34.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14798 seconds with 15 queries