17 January 2024, 11:35 | #1 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
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? |
22 January 2024, 15:10 | #2 |
Registered User
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
|
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. |
23 January 2024, 08:42 | #3 | |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
Quote:
I wonder why there's no decodeSprites function , wha was the rationale? |
|
23 January 2024, 19:23 | #4 |
Registered User
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
|
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. |
24 January 2024, 09:15 | #5 |
Registered User
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
|
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. |
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 |
|
|