spider.inc
mdsteele_annalog/src/actors/spider.inc
;;;=========================================================================;;;
;;; Copyright 2022 Matthew D. Steele <mdsteele@alum.mit.edu>                ;;;
;;;                                                                         ;;;
;;; This file is part of Annalog.                                           ;;;
;;;                                                                         ;;;
;;; Annalog 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 3 of the License, or (at your  ;;;
;;; option) any later version.                                              ;;;
;;;                                                                         ;;;
;;; Annalog 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 Annalog.  If not, see <http://www.gnu.org/licenses/>.              ;;;
;;;=========================================================================;;;

;;; State bytes for spider baddies:
;;;   * Param: Unused.
;;;   * Flags: The FlipV bit is set if the spider is hanging from a thread, or
;;;     cleared otherwise.  The FlipH bit is set if the spider is moving to the
;;;     left, or cleared if the spider is moving to the right.
;;;   * State1: Counter that decrements each frame; when it's zero, the spider
;;;     starts another movement cycle and resets the counter.
;;;   * State2: If the spider is hanging from a thread, this stores the low
;;;     byte of the room pixel Y position for the top of the thread.  Since the
;;;     thread is never longer than 255 pixels, subtracting this from the low
;;;     byte of the spider's Y position gives the length of the thread.
;;;   * State3: Unused.
;;;   * State4: Unused.

;;; Tile IDs for drawing spider baddie actors.
kTileIdObjBadSpiderFirst = $c8

;;;=========================================================================;;;
