;;==========================================================================;; ;; Joe Zbiciak's Space Patrol for Intellivision. ;; ;; Copyright 2007, Joe Zbiciak, intvnut AT gmail.com. ;; ;; http://spatula-city.org/~im14u2c/intv/ ;; ;;==========================================================================;; ;;==========================================================================;; ;; UPBSP Update Moon Buggy sprites ;; ;;==========================================================================;; UPBSP PROC ;;------------------------------------------------------------------;; ;; Do buggy sprites manually -- they always get MOBs 0 and 1. ;; ;;------------------------------------------------------------------;; MVI GRATE, R0 ; 10 Get buggy's current rate SAR R0, 2 ; 8 \___ X coord == (rate/4) - 4 SUBI #$4, R0 ; 8 / ANDI #$FF, R0 ; 8 Mask to 8-bit range MOVR R0, R1 ; 6 copy X coord XORI #_X.xsiz+_X.visb+_X.intr,R0 ; 8 Merge in XSIZE, VISB, INTR bits MVO R0, $01 + SDAT ; 11 Set position of buggy ADDI #$3, R0 ; 8 Wheels/guns are 3 pixels to right MVO R0, $00 + SDAT ; 11 Set position of wheels/guns SUBI #8, R1 ; 8 \__ back end of moon buggy MVO R1, TXLO ; 11 / ;---- ; 97 @@1: MVI JHGT, R1 ; 10 \ ADDI #15, R1 ; 8 | Load in the jump height. It's SAR R1, 2 ; 8 |-- a Q5 number. Round it up as SAR R1, 2 ; 8 | we truncate it. SAR R1, 1 ; 6 / MVII #$100+GROW_p+7, R0 ; 8 \___ Y = $47 - jump_height SUBR R1, R0 ; 6 / Set 2x-height flag MVO R0, $09 + SDAT ; 11 Store Y coord for buggy. MVII #$180+GROW_p+7, R0 ; 8 \___ Y = $47 - jump_height SUBR R1, R0 ; 6 / Set 2x-height, 16-rows flags MVO R0, $08 + SDAT ; 11 Store Y coord for wheels/guns ;---- ; 90 MVII #$1807+BCARD*8, R0 ; 8 Buggy is maroon, uses GRAM card MVO R0, $11 + SDAT ; 11 Set attributes for buggy MVII #$0800+WCARD*8, R0 ; 8 Wheels/guns are black, use GRAM MVO R0, $10 + SDAT ; 11 Set attributes for wheels/guns ;---- ; 38 ; 12 (fxn call) ; 97 ; 90 ; 38 JR R5 ; 7 ;---- ; 246 ENDP __ ;* ======================================================================== *; ;* This program is free software; you can redistribute it and/or modify *; ;* it under the terms of the GNU General Public License as published by *; ;* the Free Software Foundation; either version 2 of the License, or *; ;* (at your option) any later version. *; ;* *; ;* This program is distributed in the hope that it will be useful, *; ;* but WITHOUT ANY WARRANTY; without even the implied warranty of *; ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *; ;* General Public License for more details. *; ;* *; ;* You should have received a copy of the GNU General Public License *; ;* along with this program; if not, write to the Free Software *; ;* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *; ;* ======================================================================== *; ;* Copyright (c) 2007, Joseph Zbiciak *; ;* ======================================================================== *; _