Codesnippets > 2D-snippets

C64-ize graphics

<< < (6/6)

dreamerman:
I mean input bitmap that I'm using is 24bit bmp GLB logo, and the result/output bitmap 'test.bmp' is also 24bit with full color range, checked with gimp - same as result drawn on screen when running this code. hm.. probably some mismatch from pasting code but can't find it :>
Strange, because changing to integers should give speed up around 25%-30%, double checked on my pc, and btw. didn't noticed that also some other variables are floats, at least in this code on forum..

--- Code: (glbasic) ---LOCAL mindist%, dist%, ibest%, i%
LOCAL c64_pal%[]
--- End code ---
that gives speed bump from 22ms to 11ms, on my i5.

Qedo:
Try with this file.

dreamerman:
Yep this file works, and now I see what was the issue :)
Both FOR loops in main function are fixed to this image dimensions - 320x240px, despite checking sprite size with GETSPRITESIZE. How could I miss that :/
Easy to fix and now works great :-) And now I know where to use this with combination of Your FastMem2Sprite - or that Shader version by Gernot :D Thanks!

Navigation

[0] Message Index

[*] Previous page

Go to full version