Skip to content

Commit 36b1a81

Browse files
committed
* Level3 more work, fixes
1 parent 96e7965 commit 36b1a81

9 files changed

Lines changed: 127 additions & 21 deletions

File tree

src/defines.asm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ r2_outside = $20
217217
; warp flags (roomloffs)
218218
wf_nicevert = $80
219219
wf_64 = $40
220-
wf_32 = $20
221220

222221
; Entity Types
223222
; NOTE(iProgram): Keep this up to date with LEVELEDITOR\Entity.cs (public enum eEntityType)

src/g_level.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,10 +1762,10 @@ gm_fetch_room:
17621762
ldy #0
17631763
lda (temp1), y
17641764
sta roomloffs
1765-
and #%11100000 ; max offset of 32
1765+
and #%11000000 ; max offset of 64
17661766
sta warpflags
17671767
lda roomloffs
1768-
and #%00011111
1768+
and #%00111111
17691769
sta roomloffs
17701770
iny
17711771
lda (temp1), y

src/game.asm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ gm_load_room_fully:
5959
asl
6060
asl
6161
asl
62-
clc
62+
; the bit that you just shifted out... increment camera_x_pg with it
63+
bcc :+
64+
inc camera_x_pg
65+
: clc
6366
adc camera_x
6467
sta camera_x
6568
bcc @dontMarkBeginning

src/level3/layout.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@ Props,level3_00_a,0,0
3636
Spawn,level3_00_a,0,152
3737
level3_02_a,2496,-112
3838
Props,level3_02_a,0,0
39-
Spawn,level3_02_a,304,136
4039
Spawn,level3_02_a,0,160
4140
Spawn,level3_02_a,152,24
41+
Spawn,level3_02_a,304,128
4242
level3_03_a,2816,-112
4343
Props,level3_03_a,0,0
4444
Spawn,level3_03_a,0,128
4545
Spawn,level3_03_a,496,168
46-
Spawn,level3_03_a,472,16
46+
Spawn,level3_03_a,472,24
47+
level3_04_b,3136,-352
48+
Props,level3_04_b,0,0
49+
Spawn,level3_04_b,152,184
4750
Filler,1200,-240,16,240
4851
Filler,1216,128,16,112

src/level3/roomlist.asm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ level3:
22
.word level3_music ; music table
33
.word level3_banks ; list of banks for each room
44
.byte $03 ; environment type
5-
.byte $14 ; warp count
5+
.byte $16 ; warp count
66
.word level3_w_init
77
.word level3_w_s0_to_s1
88
.word level3_w_s1_to_s0
@@ -23,6 +23,8 @@ level3:
2323
.word level3_w_00_a_to_02_a
2424
.word level3_w_02_a_to_03_a
2525
.word level3_w_03_a_to_02_a
26+
.word level3_w_03_a_to_04_b
27+
.word level3_w_04_b_to_03_a
2628
level3_banks:
2729
.byte prgb_lvl3a ; level3_w_init
2830
.byte prgb_lvl3a ; level3_w_s0_to_s1
@@ -44,3 +46,5 @@ level3_banks:
4446
.byte prgb_lvl3a ; level3_w_00_a_to_02_a
4547
.byte prgb_lvl3a ; level3_w_02_a_to_03_a
4648
.byte prgb_lvl3a ; level3_w_03_a_to_02_a
49+
.byte prgb_lvl3a ; level3_w_03_a_to_04_b
50+
.byte prgb_lvl3a ; level3_w_04_b_to_03_a

src/level3/rooms/0.asm

Lines changed: 89 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ level3_03_a_p:
695695
.byte $11,$00,$00,$55,$50,$00,$10,$01
696696
.byte $00,$00,$51,$55,$10,$11,$05,$00
697697
.byte $00,$00,$15,$11,$11,$55,$01,$00
698-
.byte $11,$05,$05,$00,$11,$11,$11,$01
698+
.byte $55,$04,$05,$00,$11,$11,$51,$05
699699
.byte $FF
700700
level3_03_a_e:
701701
.byte $FF
@@ -779,16 +779,98 @@ level3_03_a_t:
779779
.byte $6E,$91,$E1,$AD,$86,$87,$6E,$8F
780780
.byte $E1,$AC,$86,$85,$00,$00,$70,$96
781781
.byte $A2,$B2,$A3,$B3,$E1,$B2,$A2,$B3
782-
.byte $E1,$B2,$A2,$B3,$A2,$B2,$E1,$B3
783-
.byte $A2,$B2,$A2,$B3,$E1,$AA,$8B,$D2
784-
.byte $E1,$AF,$84,$E1,$AD,$86,$92,$E1
785-
.byte $B0,$84,$E1,$AC,$86,$FF
782+
.byte $E9,$B2,$B3,$AA,$87,$9B,$9C,$9B
783+
.byte $9C,$8D,$8D,$CA,$E4,$AF,$89,$8A
784+
.byte $89,$A2,$88,$E2,$A5,$94,$85,$E1
785+
.byte $AD,$86,$8A,$BF,$A2,$B2,$E1,$B3
786+
.byte $A2,$B2,$A2,$B3,$E1,$AA,$84,$E1
787+
.byte $AC,$86,$FF
786788
level3_03_a:
787789
.byte 64, 0
788-
.byte 255, 255, 19, 255
789-
.byte 0, 0, 0, 0
790+
.byte 20, 255, 19, 255
791+
.byte 40, 0, 0, 0
790792
.byte 4
791793
.byte 255
792794
.word level3_03_a_t
793795
.word level3_03_a_p
794796
.word level3_03_a_e
797+
level3_04_b_p:
798+
.byte $44,$44,$44,$00,$00,$40,$44,$04
799+
.byte $00,$00,$55,$00,$00,$54,$00,$00
800+
.byte $44,$00,$55,$00,$00,$05,$00,$00
801+
.byte $55,$00,$50,$00,$00,$05,$00,$05
802+
.byte $00,$00,$50,$11,$00,$55,$00,$00
803+
.byte $55,$00,$50,$11,$00,$05,$00,$05
804+
.byte $05,$50,$55,$00,$00,$45,$00,$01
805+
.byte $01,$00,$55,$00,$00,$15,$00,$00
806+
.byte $00,$00,$55,$00,$00,$05,$00,$00
807+
.byte $44,$44,$55,$00,$00,$51,$44,$04
808+
.byte $FF
809+
level3_04_b_e:
810+
.byte $30,$A0,$02
811+
.byte $38,$58,$02
812+
.byte $60,$38,$02
813+
.byte $B0,$38,$02
814+
.byte $FE
815+
.byte $00,$38,$02
816+
.byte $20,$98,$01,$00
817+
.byte $FF
818+
level3_04_b_t:
819+
.byte $DE,$9E,$8F,$E1,$BE,$A2,$B4,$C0
820+
.byte $8B,$87,$E3,$BE,$B4,$B5,$A2,$B4
821+
.byte $E7,$B5,$B4,$B5,$AB,$A2,$A3,$A9
822+
.byte $A2,$B4,$A2,$B5,$E2,$B4,$C0,$85
823+
.byte $87,$E1,$AF,$CF,$E2,$98,$AD,$85
824+
.byte $97,$E1,$99,$86,$84,$E4,$BE,$B4
825+
.byte $B5,$AB,$8F,$E2,$9A,$AC,$85,$84
826+
.byte $E1,$B0,$D2,$E2,$85,$AD,$85,$97
827+
.byte $E1,$98,$86,$97,$E2,$99,$AC,$85
828+
.byte $84,$E1,$AF,$89,$E2,$84,$94,$87
829+
.byte $E3,$85,$A9,$C0,$84,$84,$E1,$B0
830+
.byte $89,$E4,$98,$89,$87,$8D,$85,$E3
831+
.byte $86,$8C,$AC,$84,$84,$E1,$AF,$89
832+
.byte $E4,$99,$88,$8A,$9E,$85,$E3,$00
833+
.byte $00,$AD,$84,$8C,$E6,$84,$9C,$A7
834+
.byte $88,$8B,$8E,$87,$E1,$AC,$84,$8C
835+
.byte $E6,$86,$A2,$A6,$89,$A2,$8F,$87
836+
.byte $E1,$AD,$84,$8C,$E4,$00,$00,$91
837+
.byte $95,$C9,$85,$85,$E1,$94,$88,$CB
838+
.byte $E3,$A9,$B5,$B4,$A2,$B5,$84,$E4
839+
.byte $B0,$8A,$97,$8D,$91,$C5,$84,$E4
840+
.byte $AF,$8A,$93,$8F,$96,$85,$E1,$95
841+
.byte $D3,$6E,$84,$84,$E1,$B0,$C9,$E2
842+
.byte $90,$94,$89,$70,$84,$8C,$E6,$84
843+
.byte $9C,$89,$88,$9C,$8D,$87,$E3,$A8
844+
.byte $B3,$B2,$A2,$B3,$84,$E1,$AF,$87
845+
.byte $E6,$98,$89,$8A,$A4,$A2,$95,$87
846+
.byte $E1,$AD,$C4,$8C,$E4,$99,$8A,$8B
847+
.byte $8E,$C9,$E1,$AC,$84,$84,$E1,$B0
848+
.byte $87,$E4,$86,$A2,$A6,$9F,$8E,$8C
849+
.byte $E3,$00,$00,$85,$86,$E4,$90,$A1
850+
.byte $9C,$87,$85,$84,$E2,$AF,$94,$88
851+
.byte $E2,$98,$A0,$85,$E5,$91,$8B,$8A
852+
.byte $A8,$C1,$84,$84,$E4,$B0,$A5,$9B
853+
.byte $94,$86,$E2,$99,$8E,$85,$E4,$00
854+
.byte $99,$89,$AD,$C5,$85,$E3,$8A,$93
855+
.byte $8F,$86,$E2,$9A,$9F,$86,$E2,$86
856+
.byte $88,$86,$85,$E1,$95,$C8,$E2,$91
857+
.byte $95,$86,$E2,$00,$98,$86,$85,$D2
858+
.byte $E2,$99,$AC,$85,$84,$E1,$AF,$92
859+
.byte $E1,$9A,$86,$84,$E1,$B0,$92,$E1
860+
.byte $85,$86,$84,$E1,$AF,$92,$E2,$99
861+
.byte $AD,$85,$97,$E1,$98,$86,$97,$E1
862+
.byte $85,$86,$84,$BF,$A2,$B2,$E1,$AA
863+
.byte $8F,$E2,$99,$AC,$85,$84,$E4,$00
864+
.byte $00,$00,$AF,$8F,$E2,$9A,$AD,$85
865+
.byte $87,$BF,$A2,$B3,$E1,$B2,$A3,$B3
866+
.byte $E2,$B2,$B3,$A2,$B2,$A2,$B3,$A4
867+
.byte $B2,$E1,$C1,$85,$87,$D7,$FF
868+
level3_04_b:
869+
.byte 40, 0
870+
.byte 255, 21, 255, 255
871+
.byte 0, 216, 0, 0
872+
.byte 4
873+
.byte 255
874+
.word level3_04_b_t
875+
.word level3_04_b_p
876+
.word level3_04_b_e

src/level3/warplist.asm

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,13 @@ level3_w_02_a_to_03_a:
7676
.word level3_03_a
7777
level3_w_03_a_to_02_a:
7878
.byte 8 ; room left offset
79-
.byte 240, 136 ; player spawn X/Y
79+
.byte 240, 128 ; player spawn X/Y
8080
.word level3_02_a
81+
level3_w_03_a_to_04_b:
82+
.byte 4 ; room left offset
83+
.byte 120, 184 ; player spawn X/Y
84+
.word level3_04_b
85+
level3_w_04_b_to_03_a:
86+
.byte 32 ; room left offset
87+
.byte 216, 24 ; player spawn X/Y
88+
.word level3_03_a

src/p_physic.asm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ xt_colljumptable:
10081008
.word xt_collidedream
10091009
.word xt_collidecass1
10101010
.word xt_collidecass2
1011-
.word xt_collidedeadly
1011+
.word xt_collidespinnerstatic
10121012

10131013
xt_collidecass1:
10141014
lda cassrhythm
@@ -1158,11 +1158,13 @@ xt_collidespikesDOWN:
11581158
@kill:
11591159
jmp gm_killplayer
11601160

1161-
xt_collidedeadly:
1161+
xt_collidespinnerstatic:
11621162
lda gamectrl4
11631163
and #g4_nodeath
11641164
bne @returnNone
1165-
jmp gm_killplayer
1165+
1166+
; ok, check if one of two centre points is inside this tile
1167+
;jmp gm_killplayer
11661168

11671169
@returnNone:
11681170
lda #0

src/x_rmtran.asm

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,10 @@ actuallyWarp:
608608
asl
609609
asl
610610
asl
611-
clc
611+
; the bit that you just shifted out... increment camera_x_pg with it
612+
bcc :+
613+
inc camera_x_pg
614+
: clc
612615
adc camdst_x
613616
sta camdst_x
614617
bcc :+
@@ -1190,12 +1193,14 @@ actuallyWarp:
11901193
asl
11911194
asl
11921195
asl
1193-
clc
1196+
; the bit that you just shifted out... increment camera_x_pg with it
1197+
bcc :+
1198+
inc camdst_x_pg
1199+
: clc
11941200
adc camdst_x
11951201
sta camdst_x
11961202
bcc :+
11971203
inc camdst_x_pg
1198-
11991204
: ; subtract it from the player X to determine the destination player X
12001205
lda player_x
12011206
clc

0 commit comments

Comments
 (0)