114ca88b773d — Laurens Holst 6 years ago
SpanBuffer: Only support spans where x1 < x2.

Backout of changeset 2949fb9e533a.
1 files changed, 4 insertions(+), 10 deletions(-)

M src/SpanBuffer.asm
M src/SpanBuffer.asm +4 -10
@@ 33,23 33,17 @@ SpanBuffer_Init:
 	dec h
 	ret
 
-; d = x1
-; e = x2
+; d = x
+; e = end x
 ; b = z
 ; c = color
 ; hl = this
-; Modifies: af, e, d
+; Modifies: af
 SpanBuffer_Insert: PROC
 	ld a,e
-	cp d
-	ret z
 	dec a
 	cp d
-	jr nc,NoSwap
-	inc d
-	ld e,d
-	ld d,a
-NoSwap:
+	call c,System_ThrowException
 	push bc
 	xor a
 StartLoop: