24 November 2014, 09:47 | #1 |
Beyond Mutton
Join Date: Mar 2011
Location: North West, UK
Age: 52
Posts: 347
|
Most effective way of converting sprites /bobs
Is there anything out there that will rip multiple sprites or bobs at various coordinates and sizes to a raw format? I wrote a script driven utility a long time ago, but It's lost to the Sands of time... I've seen a couple of utils that will convert them one at a time, I'm looking for something that can do a screen full of various sizes at once. Thanks
|
24 November 2014, 11:40 | #2 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
You can try it with bmp2raw from the released Solid Gold sources (tools/bmptoraw.c). It's a portable ANSI-C program. Runs everywhere.
It can cut out multiple BOBs or sprites from a picture in BMP format. BOBs are extracted in interleaved format, with optional mask generation. The picture width has to be a multiple of the BOB or sprite width you want to extract. Example to extract a maximum of 64 masked font characters of the size 16x20 with 32 colours (5 planes) from a BMP picture: Code:
bmptoraw menufont16.bmp 16 20 5 MASK 64 > menufont16.bin There are many other options. Like for example NOMASK (no mask generation), SPRITE (output sprite data), CMAP (write the picture's RGB4 colour map), etc.. The source: |
24 November 2014, 12:05 | #3 |
Registered User
Join Date: Sep 2008
Location: Germany
Age: 49
Posts: 137
|
@phx:
Which program did you use for creating the BMPs? Grafx2? I'm asking because I had the problem that some of the paint tools I used in the past didn't save the colors in the order which were shown in the programs palette (and the indexed format was "wrong" in my point of view). After trying some tools I came back using DPaint IV from within the emulator. |
24 November 2014, 12:33 | #4 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Yes, I'm mostly using GrafX2 and Gimp, although only for minor changes, as I'm no graphician. My brother used Gimp for all Solid Gold graphics, and the Retroguru graphicians use other programs, which I forgot.
I had no problems with GrafX2 and Gimp exporting BMP so far. Although with later Gimp versions you have to make sure to untoggle generation of true-color BMPs during the export, even when your image is indexed. |
24 November 2014, 17:25 | #5 |
Beyond Mutton
Join Date: Mar 2011
Location: North West, UK
Age: 52
Posts: 347
|
That sounds like a great start! Thanks. Does anyone have a compiled windows binary, I'm on mobile Internet following a house move and can't afford to download a compiler right now.
|
24 November 2014, 17:56 | #6 |
Registered User
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
|
Here is the leftover Windows exe from compiling the Solid Gold game. Be forewarned of the unapproved addition to phx's code. This was because the file redirection syntax used in some tools caused LF CR character to be output after before every CR LF in the io. Net result was an 885k ADF and a funny-looking owl on the boot screen.
Code:
#include <fcntl.h> _setmode(_fileno(stdout),_O_BINARY); Last edited by clenched; 26 November 2014 at 04:34. Reason: correct inaccurate explanation |
24 November 2014, 19:21 | #7 |
Beyond Mutton
Join Date: Mar 2011
Location: North West, UK
Age: 52
Posts: 347
|
Thank you sir, I will try it out later
|
24 November 2014, 20:16 | #8 | |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
I have drawn my own super-sized palette tables, one contains the index numbers whilst the other has the colour values in RGB format http://www.aliensrcooluk.com/public/...lourValues.PNG I didn't quite finish the indexing (yet), but so far I only use 16 colour images (usually in bitmap or PNG format). |
|
25 November 2014, 10:13 | #9 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Quote:
When using stdout then there is no portable way to guarantee binary output. I should better open a new file in binary mode for it... |
|
26 November 2014, 16:19 | #10 | |
Registered User
Join Date: Sep 2008
Location: Germany
Age: 49
Posts: 137
|
Quote:
Back in the day I wanted to convert rendered logos with GIMP into an indexed format. But I failed because I wanted to 'sort' the colors before exporting into BMP. Really, I miss 'butcher'. |
|
27 November 2014, 18:22 | #11 |
Registered User
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
|
This is the first time I've taken a close look at these tools independently. All sorts of fun trinkets to play with.
Maptapper with grid switched on is a good way to make sure the graphics will look as expected. This is phx's example. Repeat the command with CMAP to make a palette that can be loaded by Maptapper. Color 0 has been fudged a little so everything is visible. Last edited by clenched; 27 November 2014 at 19:41. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Not so fancy but effective fractal landscape generator | Morbane | request.Apps | 14 | 17 December 2014 03:41 |
Background Image and Bobs!! | Sparticle | Coders. General | 3 | 29 July 2013 11:22 |
Most cost-effective RAM upgrade for A1200? | Kenan | support.Hardware | 1 | 06 May 2013 07:27 |
FS: Various bits n bobs | jujasi | MarketPlace | 0 | 12 July 2009 19:13 |
Bobs Garden | Big-Byte | Amiga scene | 7 | 26 October 2002 11:24 |
|
|