mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-02-21 12:29:05 +00:00
Sprite debugging.
This commit is contained in:
parent
0d1c8583fe
commit
25335cca9a
@ -54,7 +54,7 @@ var player = {
|
|||||||
x : 1.5, // current x, y position
|
x : 1.5, // current x, y position
|
||||||
y : 2.5,
|
y : 2.5,
|
||||||
dir : 0, // the direction that the player is turning, either -1 for left or 1 for right.
|
dir : 0, // the direction that the player is turning, either -1 for left or 1 for right.
|
||||||
angleNum : 5, // the current angle of rotation
|
angleNum : 4, // the current angle of rotation
|
||||||
speed : 0, // is the playing moving forward (speed = 1) or backwards (speed = -1).
|
speed : 0, // is the playing moving forward (speed = 1) or backwards (speed = -1).
|
||||||
moveSpeed : 0.25, // how far (in map units) does the player move each step/update
|
moveSpeed : 0.25, // how far (in map units) does the player move each step/update
|
||||||
rotSpeed : 22.5 * Math.PI / 180, // how much does the player rotate each step/update (in radians)
|
rotSpeed : 22.5 * Math.PI / 180, // how much does the player rotate each step/update (in radians)
|
||||||
@ -63,7 +63,7 @@ var player = {
|
|||||||
|
|
||||||
var options = 0;
|
var options = 0;
|
||||||
|
|
||||||
var debugRay = null; /* Debugging info printed about this ray num, or null for none */
|
var debugRay = 0; /* Debugging info printed about this ray num, or null for none */
|
||||||
|
|
||||||
var debugSprite = 0; /* Debugging info printed about this sprite, or null for none */
|
var debugSprite = 0; /* Debugging info printed about this sprite, or null for none */
|
||||||
|
|
||||||
@ -1032,7 +1032,9 @@ function intCast(x)
|
|||||||
if (x == debugRay) {
|
if (x == debugRay) {
|
||||||
console.log("lineHeight=$" + wordToHex(lineHeight) +
|
console.log("lineHeight=$" + wordToHex(lineHeight) +
|
||||||
", wallType=" + map[bMapY][bMapX] +
|
", wallType=" + map[bMapY][bMapX] +
|
||||||
", wallX=$" + byteToHex(bWallX));
|
", wallX=$" + byteToHex(bWallX) +
|
||||||
|
", wLogHeight=$" + wordToHex(wLogHeight) +
|
||||||
|
", depth=$" + byteToHex(calcZ(wLogHeight)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrap it all in a nice package. [ref BigBlue2_60]
|
// Wrap it all in a nice package. [ref BigBlue2_60]
|
||||||
|
@ -13,7 +13,7 @@ start:
|
|||||||
|
|
||||||
; Conditional assembly flags
|
; Conditional assembly flags
|
||||||
DOUBLE_BUFFER = 1 ; whether to double-buffer
|
DOUBLE_BUFFER = 1 ; whether to double-buffer
|
||||||
DEBUG = 0 ; 1=some logging, 2=lots of logging
|
DEBUG = 1 ; 1=some logging, 2=lots of logging
|
||||||
|
|
||||||
; Shared constants, zero page, buffer locations, etc.
|
; Shared constants, zero page, buffer locations, etc.
|
||||||
!source "render.i"
|
!source "render.i"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user