CPCWiki forum

General Category => Programming => Topic started by: funkheld on 11:27, 30 July 20

Title: cpctelera: from bmp 640x16, 20 sprites make 32x16? with which drawing program ?
Post by: funkheld on 11:27, 30 July 20

Hi good afternoon.
I would like to make 20 sprite from the bmp 640x16, 32x16?
these must then all have the same dimensions 32x16.


with which drawing program can you do that please?

thank you.
greeting
Title: Re: cpctelera: from bmp 640x16, 20 sprites make 32x16? with which drawing program ?
Post by: SpDizzy on 16:51, 30 July 20
Hi,If you already have your .bmp image, cpctelera will convert it automaticaly to sprites with just one macro.All you need to do is add this line of code to your image_conversion.mk file on /cfg project folder:

$(eval $(call IMG2SP, CONVERT         , img/imagename.png , widht, height, imagename))
Where 'widht' and 'height' are dimensions of each font/sprite to convert (in pixels, not in bytes) - 32 x 16 on this case. -
Cpctelera will do all the work for you of splitting the image on sprites.
If you just need a software for drawing the sprites, I use photoshop as image editor, others use GIMP,..but surely there are many other, and better options.
Title: Re: cpctelera: from bmp 640x16, 20 sprites make 32x16? with which drawing program ?
Post by: funkheld on 19:21, 30 July 20
error: Command not found.

project is test.


img/text.bmp is in the project test

this is in the cfg in the project test:
$ (eval $ (call IMG2SPRITES, img / text.bmp, 0, pre, 24.12, $ (PALETTE), mask, src /, hwpalette))

are the folders wrong?

greeting





Title: Re: cpctelera: from bmp 640x16, 20 sprites make 32x16? with which drawing program ?
Post by: SpDizzy on 20:54, 30 July 20
So you are running Cpctelera 1.4.2. Use this MACRO for image conversion:


$(eval $(call IMG2SPRITES,img/example.png,0,pre,24,12,$(PALETTE),mask,src/,hwpalette))


And adapt it to your needs: name, mode, name prefix, size in pixels,..


It looks like you have a DOT '.' and not a COMMA ',' between sprite dimensions '24' '12'. There's no need also for any space on 'img / text.bmp' root.
Also take into account you have to define your PALETTE to use it on that macro for the conversion.
As usual, you can find plenty of information about image conversion usage on image_conversion.mk file. Read it carefully to understand the process
Title: Re: cpctelera: from bmp 640x16, 20 sprites make 32x16? with which drawing program ?
Post by: funkheld on 22:35, 30 July 20

it is an error calling cpct_img2sprites

this calling is ok: cpct_tmx2csv

this calling is ok: cpct_aks2c

the error is in cpctelera!



there should actually be a message like in the screen image if the data transfer is not correct.

but here comes a total failure of the call because it is not reached
greeting
Title: Re: cpctelera: from bmp 640x16, 20 sprites make 32x16? with which drawing program ?
Post by: SpDizzy on 09:24, 31 July 20

It's not a Cpctelera problem, as a user I can say everything is working as expected with the framework. Many others would say the same as me.
As @ronaldo (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1227) had suggested you a couple of times, you should invest your time on learning how to do things.
Cpctelera is a powerful framework for making anything you want. More power means more knowledge, and there are no shortcuts with this. Just invest time, improve your coding habilities, learn by repetition, trial-error,...
Instead you are constantly blaming the framework, and that's not the way for learning.
Cpctelera has a huge documentation, please take your time to read it and try to understand how things work. Also this forum has lots of information and threads about how to do things on Cpctelera. Just using the search box and reading members solutions to common problems is a invaluable source for learning.
Once you master the framework you will see everything works as expected.
In the meantime, be as much productive as you can.
Title: Re: cpctelera: from bmp 640x16, 20 sprites make 32x16? with which drawing program ?
Post by: funkheld on 12:59, 31 July 20

Quote
It's not a Cpctelera problem, as a user I can say everything is working as expected with the framework. Many others would say the same as me.

that's not true !!!

the address is reached and tells me something :
cpct_aks2c and cpct_aks2c
it has to be that way

this address is not even reached by the call:
cpct_img2sprites

this is a mistake by cpctelera and not my mistake.

I don't think you understand me or don't want to understand me.

greeting
Title: Re: cpctelera: from bmp 640x16, 20 sprites make 32x16? with which drawing program ?
Post by: robcfg on 13:11, 31 July 20
Could it be that the cpct_img2tileset is what you're looking for?


http://lronaldo.github.io/cpctelera/files/commandline/cpct_img2tileset-.html#cpct_img2tileset (http://lronaldo.github.io/cpctelera/files/commandline/cpct_img2tileset-.html#cpct_img2tileset)
Title: Re: cpctelera: from bmp 640x16, 20 sprites make 32x16? with which drawing program ?
Post by: funkheld on 13:20, 31 July 20
hello tanks.

I use this for sprite :
http://lronaldo.github.io/cpctelera/files/buildsys/asset_conversion-txt.html (http://lronaldo.github.io/cpctelera/files/buildsys/asset_conversion-txt.html)

greeting
Powered by SMFPacks Menu Editor Mod