View Single Post
Old 16 January 2015, 02:51   #15
Nekoniaow
Banned
 
Join Date: Dec 2014
Location: Montreal
Posts: 129
First of all, congratulations for the very nice looking graphics.
Graphics are a far cry from an actual game (gameplay is _all_ that matters in the end) but these are definitely increasing my playing desire.

Quote:
Originally Posted by Arne View Post
[snip] My tiles are 12x12 because it suits the presentation. Solutions:

1) Draw a black 'Bar' behind every refreshed tile to clear to black and avoid overlapping residuals. The only major map update will be on end turn when all of the aliens move, but i'll probably be fine because the game needs no smooth movement.
Actually as long that tile column is not visible yet you do not need to care since the 4 undesirable bits will eventually be drawn over by the next tile before they get displayed on screen right?

Argh, forget that I failed to realize that what you call "tiles" are actually the moving bobs representing player and enemies.
This actually makes my solution below now relevant.

Quote:
Originally Posted by Arne View Post
2) If there is a mask bitmap I suppose I could poke it to form a solid block with a transparent (16-12px) right edge. Right now the mask s automatically generated by AMOS (from color 0) upon grabbing. Edit: Used this solution.
For 12 bits you actually do not need a physical mask to pass to the blit operation: the blitter A channel (the source to copy from) supports a 16 bits mask that it will use for the first 2 bytes of each copied line.
This means that you can just set that mask to 0xFFF0, 0x3FFC, or 0x0FFF depending on how the tile is aligned respective to 16 bits boundaries and your tile will be properly masked.

I'm not sure Amos exposes this feature in its blit functions but it might be worth looking for it in the manual since not having to rely on a mask located in memory will make your tile copies at least one third faster.

But you do not really need it. If I understand correctly what you are doing, there should be no need to mask copied tiles since the masked part will be overwritten by the next tile anyway.
Forget that, you need it.

Last edited by Nekoniaow; 16 January 2015 at 03:03. Reason: Misunderstood the problem
Nekoniaow is offline  
 
Page generated in 0.04465 seconds with 11 queries