Vectrex System - Hardware and Periphery Vextrex Games - Modules and Cartridges Vectrex History The last Vectrex news... The museum´s shop Vectrex Links - Info and Collectors pages

Obj_Hit ($F8FF)

Thit routine checks to see if a missile hashit an object. If the missile has hit the object, then the carry bit will be set; otherwise, the carry bit will be cleared. A hit is checked for in the following fashion:

if (object y-height/2) <= missile y <= (object y+height/2)

and

(object x-width/2) <= missile x <= (object x+width/x)

then the missile hit, otherwise it missed.

 

ENTRY:

Y-reg = (y,x) position of the object

X-reg = (y,x) position of the missile

D-reg = (h/2,w/2) size of object

 

EXIT:

Carry bit set if the object & missile have collided

All registers preserved.

 

Source


 


Vectrex Last Minute RSS

Related Links and sources

Please note

The Museums Staff can not answer any programming related questions. If you have extra info about this page, if you noticed errors, please help to maintain this site. Please send us the information you have.

 

 

Back to Programming Docs Index
 
 

vectrexmuseum.com