Assembler Problems in Pascal 
Author Message
 Assembler Problems in Pascal

I wonder if you can help me. I need some help with assembler. A sprite
routine actually. In my routine I have a register, let's say AX which
holds the current Y pixel. Now...The problem is...I need to draw some of
my sprites above the screen so only part of the sprite is on the map.
But what happens is, any thing that's meant to be off the screen (Above
it) is displayed in all funny weird positions. It's meant to clip to
size but that doesn't help :(

Hope you may be able to help me in this matter

Kevin Roberts (Spider)




Wed, 18 Jun 1902 08:00:00 GMT  
 Assembler Problems in Pascal

Quote:

> I wonder if you can help me. I need some help with assembler. A sprite
> routine actually. In my routine I have a register, let's say AX which
> holds the current Y pixel. Now...The problem is...I need to draw some
> of my sprites above the screen so only part of the sprite is on the
> map. But what happens is, any thing that's meant to be off the screen
> (Above it) is displayed in all funny weird positions. It's meant to
> clip to size but that doesn't help :(

> Hope you may be able to help me in this matter

> Kevin Roberts (Spider)



The problem is, is that your Y value is out of range.  If the Y value is
too large or too samall, it will cause a wrap around effect.  This is
the same as when your x value is too large and it just wraps around to
the left side of the screen.  However, the Y value doesn't just wrap
around to the top side of the screen when it is too big, instead, it
displays the pixels at basically random positions on the screen.  

Sounds like the routine you have is a general sprite blitting routine.
What you need is a routine that checks the x and y values to make sure
they are in range, and if not, ajust acordingly.

Hope this helps,

Greg Brland



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Assembler: Problem with using real values

2. Assembler problem (EASY)

3. Assembler problem (EASY)

4. Assembler Problems for a game.

5. Problem With Nested Assembler Procedure

6. Mouse Drivers in Pascal (possibly some assembler) ?

7. pascal + assembler

8. Turbo Pascal 7.0 inline assembler and 386 and newer instructions

9. translate assembler code into turbo pascal code

10. 386 assembler in Turbo Pascal

11. Pascal-Assembler

12. Translate Assembler to Pascal

 

 
Powered by phpBB® Forum Software