Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
x+y + offset in screen
Posted by: gloky Mar,08.2009-17:19 

here is a lame routine wich doesn't do it's work:

routine de merde j'en ai marre



calcrealoffset

; d0=x

; d1=y

; d2= offset sur le hardscroll

ici ext.l d0

ext.l d1

ext.l d2



move.l d0,d3

lsr.l #4,d3

lsl.l #3,d3

mulu #160,d1

move.l d1,d4

*swap d4

ext.l d1

add.l d1,d3 ;offset x + offset y

add.l d2,d3 ; offset x + offset y+ offset = realoffset

cmp.l #32000,d3

bmi.s .ok

sub.l #32000,d3

.ok

* d3.W = real offset

move.w d3,realoffset

divu #160,D3

; D3 = offx,y

move.w d3,totoy



move.w d0,d4

and.w #$F,d4

lsr #4,d3

move.w d3,totocol

move.w d4,totospr

rts

totoy ds.w 1

totocol ds.w 1

totospr ds.w 1

realoffset ds.w 1

i'm fed up to be a lamer







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
x+y + offset in screen gloky Mar,08.2009-17:19
  Re: x+y + offset in screen Randy Mar,09.2009-13:19
    Re: x+y + offset in screen nerve Mar,09.2009-14:03
      Re: x+y + offset in screen gloky Mar,09.2009-18:58
        Re: x+y + offset in screen gloky Mar,09.2009-19:04
        Re: x+y + offset in screen gloky Mar,09.2009-19:21
          Re: x+y + offset in screen wiztom Mar,09.2009-22:09
            Re: x+y + offset in screen nerve Mar,10.2009-13:22
              Re: x+y + offset in screen wiztom Mar,10.2009-23:13
            Re: x+y + offset in screen glokyy Mar,10.2009-22:58
              Re: x+y + offset in screen gloky Mar,10.2009-23:00
                Re: x+y + offset in screen h3rrv Mar,11.2009-11:08
                  Re: x+y + offset in screen gloky Mar,11.2009-17:41
              Re: x+y + offset in screen nerve Mar,13.2009-12:44
  Re: x+y + offset in screen Defjam Mar,15.2009-23:23
    Re: x+y + offset in screen nerve Mar,16.2009-14:31
    Re: x+y + offset in screen gloky Mar,21.2009-14:49


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson