Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUT TILEMAP issue with colours (CPC) #1040

Open
poppichicken opened this issue Nov 25, 2024 · 0 comments
Open

PUT TILEMAP issue with colours (CPC) #1040

poppichicken opened this issue Nov 25, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@poppichicken
Copy link

hi Marco.

BITMAP ENABLE(160,200,16)
BORDER WHITE
CLS BLACK
DEFINE KEYBOARD ASYNC

tilemap:=LOAD TILEMAP("image/kenney-tiny-town-large.tmx")
PUT TILEMAP tilemap FROM 0,0

This displays part of the tilemap.

image

However something strange happens to the colours if I add another PUT TILEMAP.

tilemap:=LOAD TILEMAP("image/kenney-tiny-town-large.tmx")
PUT TILEMAP tilemap FROM 0,0
PUT TILEMAP tilemap FROM 0,0

image

And another causes graphical glitching:

tilemap:=LOAD TILEMAP("image/kenney-tiny-town-large.tmx")
PUT TILEMAP tilemap FROM 0,0
PUT TILEMAP tilemap FROM 0,0
PUT TILEMAP tilemap FROM 0,0

image

This causes a strange colour problem:

tilemap:=LOAD TILEMAP("image/kenney-tiny-town-large.tmx")
PUT TILEMAP tilemap FROM 0,0
PUT TILEMAP tilemap FROM 1,0
PUT TILEMAP tilemap FROM 2,0

image

This also causes a strange colour problem:
(Note that the x variable is not actually being used inside the FOR loop)

FOR x=0 TO 0
	tilemap:=LOAD TILEMAP("image/kenney-tiny-town-large.tmx")
	PUT TILEMAP tilemap FROM 0,0
NEXT x

image

Using the x inside the loop:
(And this runs much faster than the code above!)

FOR x=0 TO 0
	tilemap:=LOAD TILEMAP("image/kenney-tiny-town-large.tmx")
	PUT TILEMAP tilemap FROM x,0
NEXT x

image

@spotlessmind1975 spotlessmind1975 added the bug Something isn't working label Nov 26, 2024
@spotlessmind1975 spotlessmind1975 moved this from Needs triage to High priority in Bug fix / Correzione bug Nov 26, 2024
@spotlessmind1975 spotlessmind1975 added this to the future milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: High priority
Development

No branches or pull requests

2 participants