cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

space.s (35623B)


      1	;; Little demo illustrating how to use the graphical possibilities
      2	;;  of the GB (background, window and animated sprite)
      3	;; I have used fixed-point values for both the position and
      4	;;  speed of objects to get smooth movements
      5	;;
      6	;; OBJ data		: 0x8000 -> 0x8FFF (unsigned)
      7	;; Window data		: 0x8800 -> 0x97FF (signed)
      8	;; Background data	: 0x8800 -> 0x97FF (signed)
      9	;;
     10	;; Tiled 0xFC -> 0xFF are standard tiles (all black -> all white)
     11	;;
     12	;; Keys:
     13	;; Arrow keys		: Change the speed (and direction) of the sprite
     14	;; Arrow keys + A	: Change the speed (and direction) of the window
     15	;; Arrow keys + B	: Change the speed (and direction) of the background
     16	;; START		: Open/close the door
     17	;; SELECT		: Basic fading effect
     18	;;
     19	;; Note that the window is kept in the lower right part of the screen
     20	;; since it can't be made transparent
     21
     22	.include	"global.s"
     23
     24	.globl	.init_vram
     25	.globl	.copy_vram
     26	.globl	.init_wtt
     27	.globl	.init_btt
     28	.globl	.set_xy_wtt
     29	.globl	.mv_sprite
     30	.globl	.set_sprite_prop
     31	.globl	.set_sprite_tile
     32	.globl	.jpad
     33
     34	.NBDFRAMES	= .endfilm-.film	; Nb frames for the door
     35	.NBSFRAMES	= 0x07			; Nb frames for the sprite
     36	.WINSZX		= 0x80			; Size of the picture in the window
     37	.WINSZY		= 0x50
     38	.MINWINX	= .MAXWNDPOSX-.WINSZX+1 ; Bounds of the window origin
     39	.MINWINY	= .MAXWNDPOSY-.WINSZY+1
     40	.MAXWINX	= .MAXWNDPOSX
     41	.MAXWINY	= .MAXWNDPOSY
     42	.FADESTEP	= 0x10			; Nb steps for the fading effect
     43	.STARTFADE	= 0x06*.FADESTEP	; Initial value for the fading effect
     44
     45	.CLOSED		= 0x00
     46	.OPENING	= 0x01
     47	.OPENED		= 0x02
     48	.CLOSING	= 0x03
     49
     50	.module	Space
     51
     52	.area	_DATA
     53
     54.time:				; Global "time" value (counter)
     55	.ds	0x01
     56
     57.doorstate:			; State of the door (OPENED, CLOSED...)
     58	.ds	0x01
     59.doorpos:			; Current position in the door animation
     60	.ds	0x01
     61
     62.color:				; Current color for fading effect
     63	.ds	0x01
     64
     65.sframe:			; Current frame of the sprite
     66	.ds	0x01
     67
     68.bposx:				; Background position (fixed point)
     69	.ds	0x02
     70.bposy:
     71	.ds	0x02
     72.bspx:				; Background speed (fixed point)
     73	.ds	0x02
     74.bspy:
     75	.ds	0x02
     76
     77.wposx:				; Window position (fixed point)
     78	.ds	0x02
     79.wposy:
     80	.ds	0x02
     81.wspx:				; Window speed (fixed point)
     82	.ds	0x02
     83.wspy:
     84	.ds	0x02
     85
     86.sposx:				; Sprite position (fixed point)
     87	.ds	0x02
     88.sposy:
     89	.ds	0x02
     90.sspx:				; Sprite speed (fixed point)
     91	.ds	0x02
     92.sspy:
     93	.ds	0x02
     94
     95	.area	_CODE
     96
     97_main::
     98	DI			; Disable interrupts
     99	;; Turn the screen off
    100	CALL	.display_off
    101
    102	XOR	A
    103	LD	(.time),A
    104	LD	(.color),A
    105
    106	LD	A,#0b11100100
    107	LDH	(.BGP),A
    108	LDH	(.OBP0),A
    109
    110	; Initialize tiles
    111	LD	HL,#0x8000
    112	LD	DE,#0x1000
    113	LD	B,#0x00
    114	CALL	.init_vram	; Init the tile set at 0x8000 with 0x00
    115	LD	B,#0xFF
    116	CALL	.init_btt	; Init the tiles tables with 0xFF
    117	CALL	.init_wtt
    118
    119	LD	BC,#.tp0	; Move tiles (standard tiles)
    120	LD	HL,#0x9000-(.endtp0-.tp0)
    121	LD	DE,#.endtp0-.tp0
    122	CALL	.copy_vram
    123
    124	LD	BC,#.tp1	; Move tiles (earth)
    125	LD	HL,#0x8000
    126	LD	DE,#.endtp1-.tp1
    127	CALL	.copy_vram
    128
    129	LD	BC,#.tp2	; Move tiles (door)
    130	LD	HL,#0x8800
    131	LD	DE,#.endtp2-.tp2
    132	CALL	.copy_vram
    133
    134	LD	BC,#.tp3	; Move tiles (background)
    135	LD	HL,#0x9000
    136	LD	DE,#.endtp3-.tp3
    137	CALL	.copy_vram
    138
    139	;; Draw the background
    140	LD	BC,#.bkg_tiles
    141	LD	HL,#0x9800
    142	LD	DE,#0x0400	; One whole GB Screen
    143	CALL	.copy_vram
    144
    145	;; Draw the frame in the window
    146	LD	BC,#.frame_tiles
    147	LD	DE,#0x0000/8	; Place image at (0x00,0x00)
    148	LD	HL,#0x8050/8	; Image size is 0x80 x 0x50
    149	CALL	.set_xy_wtt
    150
    151	;; Draw the door in the window
    152	LD	BC,#.door1_tiles
    153	LD	DE,#0x1010/8	; Place image at (0x10,0x10)
    154	LD	HL,#0x6030/8	; Image size is 0x60 x 0x30
    155	CALL	.set_xy_wtt
    156	LD	A,#.CLOSED
    157	LD	(.doorstate),A
    158
    159	; Initialize background
    160	XOR	A
    161	LD	(.bposx),A
    162	LDH	(.SCX),A
    163	LD	(.bposx+1),A
    164	LD	(.bposy),A
    165	LDH	(.SCY),A
    166	LD	(.bposy+1),A
    167	LD	A,#-0x01
    168	LD	(.bspx),A
    169	XOR	A
    170	LD	(.bspx+1),A
    171	XOR	A
    172	LD	(.bspy),A
    173	LD	A,#0x80
    174	LD	(.bspy+1),A
    175
    176	; Initialize window
    177	LD	A,#.MAXWNDPOSX
    178	LD	(.wposx),A
    179	LDH	(.WX),A
    180	XOR	A
    181	LD	(.wposx+1),A
    182	LD	A,#.MAXWNDPOSY
    183	LD	(.wposy),A
    184	LDH	(.WY),A
    185	XOR	A
    186	LD	(.wposy+1),A
    187	LD	A,#-0x01
    188	LD	(.wspx),A
    189	LD	A,#0x80
    190	LD	(.wspx+1),A
    191	LD	A,#-0x01
    192	LD	(.wspy),A
    193	LD	A,#0xC0
    194	LD	(.wspy+1),A
    195
    196	; Initialize sprite
    197	XOR	A
    198	LD	(.sframe),A
    199	LD	C,#0x00		; Sprite 0x00
    200	LD	D,#0x00		; Default sprite properties
    201	CALL	.set_sprite_prop
    202	LD	C,#0x01		; Sprite 0x01
    203	LD	D,#0x00		; Default sprite properties
    204	CALL	.set_sprite_prop
    205
    206	LD	A,#0x10
    207	LD	(.sposx),A
    208	XOR	A
    209	LD	(.sposx+1),A
    210	LD	A,#0x10
    211	LD	(.sposy),A
    212	XOR	A
    213	LD	(.sposy+1),A
    214	XOR	A
    215	LD	(.sspx),A
    216	LD	A,#0x40
    217	LD	(.sspx+1),A
    218	XOR	A
    219	LD	(.sspy),A
    220	LD	A,#0x40
    221	LD	(.sspy+1),A
    222	CALL	.tile_sprite	; Set sprite tiles
    223	CALL	.place_sprite	; Place sprites
    224
    225	LD	A,#0b11100111	; LCD		= On
    226				; WindowBank	= 0x9C00
    227				; Window	= On
    228				; BG Chr	= 0x8800
    229				; BG Bank	= 0x9800
    230				; OBJ		= 8x16
    231				; OBJ		= On
    232				; BG		= On
    233	LDH	(.LCDC),A
    234	EI			; Enable interrupts
    2351$:
    236	LD	A,(.time)
    237	INC	A
    238	LD	(.time),A
    239
    240	LD	B,#0x04		; Skip four VBLs (slow down animation)
    2412$:
    242	CALL	.wait_vbl_done
    243	DEC	B
    244	JR	NZ,2$
    245
    246	CALL	.fade
    247	CALL	.door
    248	CALL	.scroll
    249	CALL	.animate_sprite
    250
    251	CALL	.jpad
    252	LD	D,A
    253
    254	AND	#.B		; Is B pressed ?
    255	JP	NZ,10$
    256
    257	LD	A,D
    258	AND	#.A		; Is A pressed ?
    259	JP	NZ,20$
    260
    261	LD	A,D
    262	AND	#.SELECT	; Is SELECT pressed ?
    263	JR	Z,3$
    264	LD	A,#.STARTFADE
    265	LD	(.color),A
    2663$:
    267	LD	A,D
    268	AND	#.START		; Is START pressed ?
    269	JR	Z,5$
    270	LD	A,(.doorstate)
    271	CP	#.CLOSED
    272	JR	NZ,4$
    273	LD	A,#.OPENING
    274	LD	(.doorstate),A
    275	XOR	A
    276	LD	(.doorpos),A
    277	JR	5$
    2784$:
    279	CP	#.OPENED
    280	JR	NZ,5$
    281	LD	A,#.CLOSING
    282	LD	(.doorstate),A
    283	LD	A,#.NBDFRAMES
    284	LD	(.doorpos),A
    2855$:
    286	LD	A,D
    287	AND	#.UP		; Is UP pressed ?
    288	JR	Z,6$
    289	LD	BC,#0x0010
    290	LD	A,(.sspy)	; Load speed into HL
    291	LD	H,A
    292	LD	A,(.sspy+1)
    293	LD	L,A
    294	LD	A,L		; Substract BC from HL
    295	SUB	C
    296	LD	(.sspy+1),A
    297	LD	A,H
    298	SBC	B
    299	LD	(.sspy),A	; Store new speed
    300	JR	7$
    3016$:
    302	LD	A,D
    303	AND	#.DOWN		; Is DOWN pressed ?
    304	JR	Z,7$
    305	LD	BC,#0x0010
    306	LD	A,(.sspy)	; Load speed into HL
    307	LD	H,A
    308	LD	A,(.sspy+1)
    309	LD	L,A
    310	ADD	HL,BC		; Add them
    311	LD	A,H		; Store new speed
    312	LD	(.sspy),A
    313	LD	A,L
    314	LD	(.sspy+1),A
    3157$:
    316	LD	A,D
    317	AND	#.LEFT		; Is LEFT pressed ?
    318	JR	Z,8$
    319	LD	BC,#0x0010
    320	LD	A,(.sspx)	; Load speed into HL
    321	LD	H,A
    322	LD	A,(.sspx+1)
    323	LD	L,A
    324	LD	A,L		; Substract BC from HL
    325	SUB	C
    326	LD	(.sspx+1),A
    327	LD	A,H
    328	SBC	B
    329	LD	(.sspx),A	; Store new speed
    330	JP	1$
    3318$:
    332	LD	A,D
    333	AND	#.RIGHT		; Is RIGHT pressed ?
    334	JP	Z,1$
    335	LD	BC,#0x0010
    336	LD	A,(.sspx)	; Load speed into HL
    337	LD	H,A
    338	LD	A,(.sspx+1)
    339	LD	L,A
    340	ADD	HL,BC		; Add them
    341	LD	A,H		; Store new speed
    342	LD	(.sspx),A
    343	LD	A,L
    344	LD	(.sspx+1),A
    345	JP	1$
    346
    34710$:
    348	LD	A,D
    349	AND	#.UP		; Is UP pressed ?
    350	JP	Z,11$
    351	LD	BC,#0x0010
    352	LD	A,(.bspy)	; Load speed into HL
    353	LD	H,A
    354	LD	A,(.bspy+1)
    355	LD	L,A
    356	LD	A,L		; Substract BC from HL
    357	SUB	C
    358	LD	(.bspy+1),A
    359	LD	A,H
    360	SBC	B
    361	LD	(.bspy),A	; Store new speed
    362	JR	12$
    36311$:
    364	LD	A,D
    365	AND	#.DOWN		; Is DOWN pressed ?
    366	JP	Z,12$
    367	LD	BC,#0x0010
    368	LD	A,(.bspy)	; Load speed into HL
    369	LD	H,A
    370	LD	A,(.bspy+1)
    371	LD	L,A
    372	ADD	HL,BC		; Add them
    373	LD	A,H		; Store new speed
    374	LD	(.bspy),A
    375	LD	A,L
    376	LD	(.bspy+1),A
    37712$:
    378	LD	A,D
    379	AND	#.LEFT		; Is LEFT pressed ?
    380	JP	Z,13$
    381	LD	BC,#0x0010
    382	LD	A,(.bspx)	; Load speed into HL
    383	LD	H,A
    384	LD	A,(.bspx+1)
    385	LD	L,A
    386	LD	A,L		; Substract BC from HL
    387	SUB	C
    388	LD	(.bspx+1),A
    389	LD	A,H
    390	SBC	B
    391	LD	(.bspx),A	; Store new speed
    392	JP	1$
    39313$:
    394	LD	A,D
    395	AND	#.RIGHT		; Is RIGHT pressed ?
    396	JP	Z,1$
    397	LD	BC,#0x0010
    398	LD	A,(.bspx)	; Load speed into HL
    399	LD	H,A
    400	LD	A,(.bspx+1)
    401	LD	L,A
    402	ADD	HL,BC		; Add them
    403	LD	A,H		; Store new speed
    404	LD	(.bspx),A
    405	LD	A,L
    406	LD	(.bspx+1),A
    407	JP	1$
    408
    40920$:
    410	LD	A,D
    411	AND	#.UP		; Is UP pressed ?
    412	JP	Z,21$
    413	LD	BC,#0x0010
    414	LD	A,(.wspy)	; Load speed into HL
    415	LD	H,A
    416	LD	A,(.wspy+1)
    417	LD	L,A
    418	LD	A,L		; Substract BC from HL
    419	SUB	C
    420	LD	(.wspy+1),A
    421	LD	A,H
    422	SBC	B
    423	LD	(.wspy),A	; Store new speed
    424	JR	22$
    42521$:
    426	LD	A,D
    427	AND	#.DOWN		; Is DOWN pressed ?
    428	JP	Z,22$
    429	LD	BC,#0x0010
    430	LD	A,(.wspy)	; Load speed into HL
    431	LD	H,A
    432	LD	A,(.wspy+1)
    433	LD	L,A
    434	ADD	HL,BC		; Add them
    435	LD	A,H		; Store new speed
    436	LD	(.wspy),A
    437	LD	A,L
    438	LD	(.wspy+1),A
    43922$:
    440	LD	A,D
    441	AND	#.LEFT		; Is LEFT pressed ?
    442	JP	Z,23$
    443	LD	BC,#0x0010
    444	LD	A,(.wspx)	; Load speed into HL
    445	LD	H,A
    446	LD	A,(.wspx+1)
    447	LD	L,A
    448	LD	A,L		; Substract BC from HL
    449	SUB	C
    450	LD	(.wspx+1),A
    451	LD	A,H
    452	SBC	B
    453	LD	(.wspx),A	; Store new speed
    454	JP	1$
    45523$:
    456	LD	A,D
    457	AND	#.RIGHT		; Is RIGHT pressed ?
    458	JP	Z,1$
    459	LD	BC,#0x0010
    460	LD	A,(.wspx)	; Load speed into HL
    461	LD	H,A
    462	LD	A,(.wspx+1)
    463	LD	L,A
    464	ADD	HL,BC		; Add them
    465	LD	A,H		; Store new speed
    466	LD	(.wspx),A
    467	LD	A,L
    468	LD	(.wspx+1),A
    469	JP	1$
    470
    471	RET
    472
    473	;; Fade the screen (off and on)
    474.fade:
    475
    476	LD	A,(.color)	; Load color into A
    477	CP	#0x00
    478	RET	Z
    479	CP	#.STARTFADE
    480	JR	NZ,1$
    481	LD	A,#0b11111001
    482	JR	6$
    4831$:
    484	CP	#.STARTFADE-.FADESTEP
    485	JR	NZ,2$
    486	LD	A,#0b11111110
    487	JR	6$
    4882$:
    489	CP	#.STARTFADE-0x02*.FADESTEP
    490	JR	NZ,3$
    491	LD	A,#0b11111111
    492	JR	6$
    4933$:
    494	CP	#.STARTFADE-0x03*.FADESTEP
    495	JR	NZ,4$
    496	LD	A,#0b11111110
    497	JR	6$
    4984$:
    499	CP	#.STARTFADE-0x04*.FADESTEP
    500	JR	NZ,5$
    501	LD	A,#0b11111001
    502	JR	6$
    5035$:
    504	CP	#.STARTFADE-0x05*.FADESTEP
    505	JR	NZ,7$
    506	LD	A,#0b11100100
    5076$:
    508	LDH	(.BGP),A
    5097$:
    510	LD	A,(.color)
    511	DEC	A
    512	LD	(.color),A
    513	RET
    514
    515	;; Scroll the background, the window and the sprite
    516.scroll:
    517
    518	;; Update background
    519	LD	A,(.bposx)	; Load background position into HL
    520	LD	H,A
    521	LD	A,(.bposx+1)
    522	LD	L,A
    523	LD	A,(.bspx)	; Load background speed into BC
    524	LD	B,A
    525	LD	A,(.bspx+1)
    526	LD	C,A
    527	ADD	HL,BC		; Add them
    528	LD	A,L		; Store new background position
    529	LD	(.bposx+1),A
    530	LD	A,H
    531	LD	(.bposx),A
    532	LDH	(.SCX),A	; Update position
    533
    534	LD	A,(.bposy)	; Load background position into HL
    535	LD	H,A
    536	LD	A,(.bposy+1)
    537	LD	L,A
    538	LD	A,(.bspy)	; Load background speed into BC
    539	LD	B,A
    540	LD	A,(.bspy+1)
    541	LD	C,A
    542	ADD	HL,BC		; Add them
    543	LD	A,L		; Store new background position
    544	LD	(.bposy+1),A
    545	LD	A,H
    546	LD	(.bposy),A
    547	LDH	(.SCY),A	; Update position
    548
    549	;; Update window
    550	LD	A,(.wspx)	; Load window speed into BC
    551	LD	B,A
    552	LD	A,(.wspx+1)
    553	LD	C,A
    554	LD	A,(.wposx)	; Load window position into HL
    555	LD	H,A
    556	LD	A,(.wposx+1)
    557	LD	L,A
    558	ADD	HL,BC		; Add them
    559	LD	A,L		; Store new window position
    560	LD	(.wposx+1),A
    561	LD	A,H
    562	LD	(.wposx),A
    563
    564	;; X position
    565	LD	A,(.wposx)	; Check window position
    566	LD	H,#0x00		; We must use 16 bit registers since the
    567	LD	L,A		;  window is not less than 0x80 pixels
    568	LD	BC,#.MAXWINX
    569	LD	A,L		; Substract BC from HL
    570	SUB	C
    571	LD	A,H
    572	SBC	B
    573	AND	#0x80
    574	JR	NZ,1$		; Maximum value ?
    575	LD	A,#.MAXWINX
    576	LD	(.wposx),A	; Correct window position
    577	LD	A,(.wspx+1)	; Load window speed into BC
    578	LD	C,A
    579	LD	A,(.wspx)
    580	LD	B,A
    581	AND	#0x80		; Speed is already negative ?
    582	JR	NZ,3$
    583	JR	2$
    5841$:
    585	LD	A,(.wposx)	; Check window position
    586	LD	H,#0x00		; We must use 16 bit registers since the
    587	LD	L,A		;  window is not less than 0x80 pixels
    588	LD	BC,#.MINWINX+1
    589	LD	A,L		; Substract BC from HL
    590	SUB	C
    591	LD	A,H
    592	SBC	B
    593	AND	#0x80
    594	JR	Z,3$		; Minimum value ?
    595	LD	A,#.MINWINX
    596	LD	(.wposx),A	; Correct window position
    597	LD	A,(.wspx+1)	; Load window speed into BC
    598	LD	C,A
    599	LD	A,(.wspx)
    600	LD	B,A
    601	AND	#0x80		; Speed is already positive ?
    602	JR	Z,3$
    6032$:
    604	LD	HL,#0x00	; Invert speed
    605	LD	A,L		; Substract BC from HL
    606	SUB	C
    607	LD	(.wspx+1),A
    608	LD	A,H
    609	SBC	B
    610	LD	(.wspx),A	; Store new speed
    6113$:
    612	LD	A,(.wposx)
    613	LDH	(.WX),A		; Update position
    614
    615	LD	A,(.wspy)	; Load window speed into BC
    616	LD	B,A
    617	LD	A,(.wspy+1)
    618	LD	C,A
    619	LD	A,(.wposy)	; Load window position into HL
    620	LD	H,A
    621	LD	A,(.wposy+1)
    622	LD	L,A
    623	ADD	HL,BC		; Add them
    624	LD	A,L		; Store new window position
    625	LD	(.wposy+1),A
    626	LD	A,H
    627	LD	(.wposy),A
    628
    629	;; Y position
    630	LD	A,(.wposy)	; Check window position
    631	LD	H,#0x00		; We must use 16 bit registers since the
    632	LD	L,A		;  window is not less than 0x80 pixels
    633	LD	BC,#.MAXWINY
    634	LD	A,L		; Substract BC from HL
    635	SUB	C
    636	LD	A,H
    637	SBC	B
    638	AND	#0x80
    639	JR	NZ,4$		; Maximum value ?
    640	LD	A,#.MAXWINY
    641	LD	(.wposy),A	; Correct window position
    642	LD	A,(.wspy+1)	; Load window speed into BC
    643	LD	C,A
    644	LD	A,(.wspy)
    645	LD	B,A
    646	AND	#0x80		; Speed is already negative ?
    647	JR	NZ,6$
    648	JR	5$
    6494$:
    650	LD	A,(.wposy)	; Check window position
    651	LD	H,#0x00		; We must use 16 bit registers since the
    652	LD	L,A		;  window is not less than 0x80 pixels
    653	LD	BC,#.MINWINY+1
    654	LD	A,L		; Substract BC from HL
    655	SUB	C
    656	LD	A,H
    657	SBC	B
    658	AND	#0x80
    659	JR	Z,6$		; Minimum value ?
    660	LD	A,#.MINWINY
    661	LD	(.wposy),A	; Correct window position
    662	LD	A,(.wspy+1)	; Load window speed into BC
    663	LD	C,A
    664	LD	A,(.wspy)
    665	LD	B,A
    666	AND	#0x80		; Speed is already positive ?
    667	JR	Z,6$
    6685$:
    669	LD	HL,#0x00	; Invert speed
    670	LD	A,L		; Substract BC from HL
    671	SUB	C
    672	LD	(.wspy+1),A
    673	LD	A,H
    674	SBC	B
    675	LD	(.wspy),A	; Store new speed
    6766$:
    677	LD	A,(.wposy)
    678	LDH	(.WY),A		; Update position
    679
    680	;; Update sprite
    681	LD	A,(.sposx)	; Load sprite position into HL
    682	LD	H,A
    683	LD	A,(.sposx+1)
    684	LD	L,A
    685	LD	A,(.sspx)	; Load sprite speed into BC
    686	LD	B,A
    687	LD	A,(.sspx+1)
    688	LD	C,A
    689	ADD	HL,BC		; Add them
    690	LD	A,L		; Store new sprite position
    691	LD	(.sposx+1),A
    692	LD	A,H
    693	LD	(.sposx),A
    694
    695	LD	A,(.sposy)	; Load sprite position into HL
    696	LD	H,A
    697	LD	A,(.sposy+1)
    698	LD	L,A
    699	LD	A,(.sspy)	; Load sprite speed into BC
    700	LD	B,A
    701	LD	A,(.sspy+1)
    702	LD	C,A
    703	ADD	HL,BC		; Add them
    704	LD	A,L		; Store new sprite position
    705	LD	(.sposy+1),A
    706	LD	A,H
    707	LD	(.sposy),A
    708	CALL	.place_sprite	; Update position
    709
    710	RET
    711
    712	;; Open and close the door
    713.door:
    714	LD	A,(.doorstate)
    715	CP	#.OPENING
    716	JP	Z,.open_door
    717	CP	#.CLOSING
    718	JP	Z,.close_door
    719	RET
    720
    721.open_door:
    722	LD	A,(.doorpos)
    723	LD	HL,#.film+0x02
    724	LD	B,#0x00
    725	LD	C,A
    726	ADD	HL,BC
    727	LD	C,(HL)
    728	INC	HL
    729	LD	B,(HL)
    730	LD	DE,#0x1010/8	; Place image at (0x10,0x10)
    731	LD	HL,#0x6030/8	; Image size is 0x60 x 0x30
    732	CALL	.set_xy_wtt
    733
    734	LD	A,(.doorpos)
    735	ADD	A,#0x02
    736	LD	(.doorpos),A
    737	CP	#.NBDFRAMES
    738	RET	NZ
    739	LD	A,#.OPENED
    740	LD	(.doorstate),A
    741	RET
    742
    743.close_door:
    744	LD	A,(.doorpos)
    745	LD	HL,#.film-0x02
    746	LD	B,#0x00
    747	LD	C,A
    748	ADD	HL,BC
    749	LD	C,(HL)
    750	INC	HL
    751	LD	B,(HL)
    752	LD	DE,#0x1010/8	; Place image at (0x10,0x10)
    753	LD	HL,#0x6030/8	; Image size is 0x60 x 0x30
    754	CALL	.set_xy_wtt
    755
    756	LD	A,(.doorpos)
    757	SUB	A,#0x02
    758	LD	(.doorpos),A
    759	RET	NZ
    760	LD	A,#.CLOSED
    761	LD	(.doorstate),A
    762	RET
    763
    764	;; Animate sprite
    765.animate_sprite:
    766	LD	A,(.time)
    767	AND	#0x07
    768	RET	NZ
    769
    770	LD	A,(.sframe)
    771	INC	A
    772	CP	#.NBSFRAMES
    773	JR	NZ,1$
    774	XOR	A
    7751$:
    776	LD	(.sframe),A
    777
    778	CALL	.tile_sprite
    779	RET
    780
    781	;; Set sprite tiles
    782.tile_sprite:
    783	LD	A,(.sframe)
    784	LD	HL,#.earth_tiles
    785	RLCA
    786	LD	B,#0x00
    787	LD	C,A
    788	ADD	HL,BC
    789	LD	C,#0x00		; Sprite 0x00
    790	LD	A,(HL+)
    791	LD	D,A
    792	PUSH	HL
    793	CALL	.set_sprite_tile
    794	POP	HL
    795
    796	LD	C,#0x01		; Sprite 0x01
    797	LD	A,(HL+)
    798	LD	D,A
    799	CALL	.set_sprite_tile
    800
    801	RET
    802
    803	;; Place sprite
    804.place_sprite:
    805	LD	C,#0x00		; Sprite 0x00
    806	LD	A,(.sposx)
    807	LD	D,A
    808	LD	A,(.sposy)
    809	LD	E,A
    810	PUSH	DE		; Store position
    811	CALL	.mv_sprite
    812
    813	LD	C,#0x01		; Sprite 0x01
    814	POP	DE		; Restore position
    815	LD	A,#0x08
    816	ADD	A,D
    817	LD	D,A
    818	CALL	.mv_sprite
    819
    820	RET
    821
    822	.area	_LIT
    823
    824.tp0:
    825
    826.std_data:
    827
    828	; Basic tiles (0xFC to 0xFF)
    829
    830	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    831	.byte	0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00
    832	.byte	0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF
    833	.byte	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
    834
    835.endtp0:
    836
    837.tp1:
    838
    839.earth_data:
    840
    841	; Tile 0x00
    842	.byte	0x07,0x07,0x18,0x1F,0x32,0x2D,0x71,0x4E,0x70,0x4F,0xF8,0x87,0xF8,0x87,0xF8,0x87
    843	.byte	0xFC,0x83,0xFE,0x81,0x7F,0x40,0x7F,0x40,0x3F,0x20,0x1F,0x18,0x07,0x07,0x00,0x00
    844	.byte	0xC0,0xC0,0xF0,0x30,0x78,0x88,0x3C,0xC4,0x5C,0xA4,0x9E,0x62,0x3E,0xC2,0x3E,0xC2
    845	.byte	0x5E,0xA2,0x7E,0x82,0x0C,0xF4,0x0C,0xF4,0x98,0x68,0xB0,0x70,0xC0,0xC0,0x00,0x00
    846	.byte	0x07,0x07,0x1F,0x18,0x2F,0x30,0x4F,0x70,0x6F,0x50,0x9F,0xE0,0x9F,0xE0,0xBF,0xC0
    847	.byte	0xFF,0x80,0xB7,0xC8,0x63,0x5C,0x43,0x7C,0x3F,0x20,0x1F,0x18,0x07,0x07,0x00,0x00
    848	.byte	0xC0,0xC0,0xB0,0x70,0x18,0xE8,0x0C,0xF4,0x0C,0xF4,0x82,0x7E,0x82,0x7E,0x86,0x7A
    849	.byte	0xC6,0x3A,0xE6,0x1A,0xF4,0x0C,0xFC,0x04,0xF8,0x08,0xF0,0x30,0xC0,0xC0,0x00,0x00
    850
    851	; Tile 0x08
    852	.byte	0x07,0x07,0x1E,0x19,0x20,0x3F,0x40,0x7F,0x42,0x7D,0x81,0xFE,0x81,0xFE,0x83,0xFC
    853	.byte	0xD7,0xA8,0xBB,0xC4,0x6E,0x51,0x7C,0x43,0x3F,0x20,0x1F,0x18,0x07,0x07,0x00,0x00
    854	.byte	0xC0,0xC0,0x70,0xB0,0xE8,0x18,0xF4,0x0C,0xF4,0x0C,0xFE,0x02,0xFE,0x02,0xFE,0x02
    855	.byte	0xFE,0x02,0x7E,0x82,0x3C,0xC4,0x3C,0xC4,0xF8,0x08,0xF0,0x30,0xC0,0xC0,0x00,0x00
    856	.byte	0x07,0x07,0x1B,0x1C,0x20,0x3F,0x40,0x7F,0x40,0x7F,0xE0,0x9F,0x90,0xEF,0x89,0xF6
    857	.byte	0x8D,0xF2,0x9F,0xE0,0x5E,0x61,0x6F,0x50,0x3F,0x20,0x1F,0x18,0x07,0x07,0x00,0x00
    858	.byte	0xC0,0xC0,0xB0,0x70,0x28,0xD8,0x04,0xFC,0x2C,0xD4,0x1E,0xE2,0x1E,0xE2,0x3E,0xC2
    859	.byte	0x7E,0x82,0xB6,0x4A,0xE4,0x1C,0xC4,0x3C,0xF8,0x08,0xF0,0x30,0xC0,0xC0,0x00,0x00
    860
    861	; Tile 0x10
    862	.byte	0x07,0x07,0x18,0x1F,0x20,0x3F,0x40,0x7F,0x40,0x7F,0xEE,0x91,0xF1,0x8E,0xE0,0x9F
    863	.byte	0xE0,0x9F,0xF1,0x8E,0x71,0x4E,0x72,0x4D,0x3F,0x20,0x1F,0x18,0x07,0x07,0x00,0x00
    864	.byte	0xC0,0xC0,0xF0,0x30,0x08,0xF8,0x04,0xFC,0x04,0xFC,0x02,0xFE,0x02,0xFE,0x92,0x6E
    865	.byte	0xD6,0x2A,0xFE,0x02,0xEC,0x14,0xFC,0x04,0xF8,0x08,0xF0,0x30,0xC0,0xC0,0x00,0x00
    866	.byte	0x07,0x07,0x1D,0x1A,0x36,0x29,0x5C,0x63,0x6C,0x53,0xCE,0xB1,0x9F,0xE0,0x9E,0xE1
    867	.byte	0xAE,0xD1,0xBF,0xC0,0x47,0x78,0x47,0x78,0x2F,0x30,0x1F,0x18,0x07,0x07,0x00,0x00
    868	.byte	0xC0,0xC0,0x70,0xB0,0x08,0xF8,0x04,0xFC,0x04,0xFC,0xE2,0x1E,0x32,0xCE,0x0E,0xF2
    869	.byte	0x0E,0xF2,0x1E,0xE2,0x1C,0xE4,0x2C,0xD4,0xF8,0x08,0xF0,0x30,0xC0,0xC0,0x00,0x00
    870
    871	; Tile 0x18
    872	.byte	0x07,0x07,0x1E,0x19,0x33,0x2C,0x49,0x76,0x42,0x7D,0xC4,0xBB,0xC1,0xBE,0xC1,0xBE
    873	.byte	0xE2,0x9D,0xF3,0x8C,0x78,0x47,0x78,0x47,0x3C,0x23,0x1C,0x1B,0x07,0x07,0x00,0x00
    874	.byte	0xC0,0xC0,0x70,0xB0,0x68,0x98,0xC4,0x3C,0xC4,0x3C,0xEE,0x12,0xF2,0x0E,0xE2,0x1E
    875	.byte	0xE2,0x1E,0xF2,0x0E,0x7C,0x84,0x7C,0x84,0xF8,0x08,0xF0,0x30,0xC0,0xC0,0x00,0x00
    876
    877.endtp1:
    878
    879.tp2:
    880
    881.frame_data:
    882
    883	; Tile 0x00
    884	.byte	0xFF,0x00,0x80,0x7F,0x80,0x7F,0x80,0x7F,0x80,0x7F,0x80,0x7F,0x80,0x7F,0x80,0x7F
    885	.byte	0xFF,0x00,0x01,0xFE,0x03,0xFC,0x07,0xF8,0x0F,0xF0,0x1F,0xE0,0x3F,0xC0,0x7F,0x80
    886	.byte	0xFF,0x00,0xFE,0x01,0xFC,0x03,0xF8,0x07,0xF0,0x0F,0xE0,0x1F,0xC0,0x3F,0x80,0x7F
    887	.byte	0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF
    888	.byte	0xFF,0x00,0xFF,0x01,0xFD,0x03,0xF9,0x07,0xF1,0x0F,0xE1,0x1F,0xC1,0x3F,0x81,0x7F
    889	.byte	0x80,0x7F,0x81,0x7E,0x83,0x7C,0x87,0x78,0x8F,0x70,0x9F,0x60,0xBF,0x40,0xFF,0x00
    890	.byte	0xFF,0x70,0xFF,0x98,0xEF,0xB8,0xCF,0xF8,0xFF,0x70,0xFF,0x00,0xFF,0x00,0xFF,0x01
    891	.byte	0xFF,0x00,0xFE,0x01,0xFC,0x03,0xF8,0x07,0xF0,0x0F,0xE0,0x1F,0xC0,0x3F,0xFF,0xFF
    892
    893	; Tile 0x08
    894	.byte	0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF
    895	.byte	0x00,0xFF,0x01,0xFE,0x03,0xFC,0x07,0xF8,0x0F,0xF0,0x1F,0xE0,0x3F,0xC0,0xFF,0xFF
    896	.byte	0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF
    897	.byte	0xFF,0x0E,0xFF,0x13,0xFD,0x17,0xF9,0x1F,0xFE,0x0F,0xE0,0x1F,0xC0,0x3F,0x80,0xFF
    898	.byte	0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF
    899	.byte	0xFF,0x01,0xFF,0x01,0xFD,0x03,0xF9,0x07,0xF1,0x0F,0xE1,0x1F,0xC1,0x3F,0x81,0x7F
    900	.byte	0x80,0x7F,0x80,0x7F,0x80,0x7F,0x80,0x7F,0x80,0x7F,0x80,0x7F,0x80,0x7F,0x80,0x7F
    901	.byte	0x01,0xFF,0x01,0xFF,0x03,0xFD,0x07,0xF9,0x0F,0xF1,0x1F,0xE1,0x3F,0xC1,0x7F,0x81
    902
    903	; Tile 0x10
    904	.byte	0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01
    905	.byte	0x01,0xFF,0x01,0xFE,0x03,0xFC,0x77,0xF8,0xFF,0x98,0xEF,0xB8,0xCF,0xF8,0x7F,0xF0
    906	.byte	0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x0E,0xFF,0x13,0xFD,0x17,0xF9,0x1F,0xFF,0x0E
    907	.byte	0x80,0x7F,0x81,0x7E,0x83,0x7C,0x87,0x78,0x8F,0x70,0x9F,0x60,0xBF,0x40,0xFF,0x7F
    908	.byte	0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0x01,0xFF,0xFF,0xFF
    909
    910.door1_data:
    911
    912	; Tile 0x15
    913	.byte	0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF
    914	.byte	0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF
    915	.byte	0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF
    916
    917.door2_data:
    918
    919	; Tile 0x18
    920	.byte	0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF
    921	.byte	0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF
    922	.byte	0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF
    923	.byte	0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    924
    925.door3_data:
    926
    927	; Tile 0x1C
    928	.byte	0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF
    929	.byte	0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF
    930	.byte	0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF
    931	.byte	0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    932
    933.door4_data:
    934
    935	; Tile 0x20
    936	.byte	0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    937
    938.endtp2:
    939
    940.tp3:
    941
    942.bkg_data:
    943
    944	; Tile 0x00
    945	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF,0xFF,0xFF,0xFF
    946	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF
    947	.byte	0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    948	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,0xF7,0xFF,0xFF
    949	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    950	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F
    951	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    952	.byte	0xFF,0xFF,0xDF,0xFF,0xEF,0xFF,0xFF,0xF7,0xFF,0xFB,0xFF,0xFD,0xFF,0xFE,0xFE,0xFF
    953
    954	; Tile 0x08
    955	.byte	0xFF,0xFF,0xFF,0xFF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7D,0xFE,0x7C,0x39
    956	.byte	0xFF,0xFF,0xF7,0xFF,0xEF,0xFF,0xFF,0xDF,0xFF,0xBF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF
    957	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF
    958	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFE,0xFF,0xFD
    959	.byte	0xBB,0x01,0xC7,0x83,0xC7,0x83,0xC7,0x83,0xBB,0x01,0x7C,0x39,0x7D,0xFE,0xFF,0xFF
    960	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F
    961	.byte	0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF
    962	.byte	0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFB,0xAF,0x77,0x27,0x8F,0xDF,0x8F,0x27,0x8F
    963
    964	; Tile 0x10
    965	.byte	0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    966	.byte	0xFF,0xFB,0xFF,0xF7,0xEF,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    967	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    968	.byte	0xFF,0xBF,0xFF,0xDF,0xEF,0xFF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    969	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    970	.byte	0xFF,0xFF,0xFF,0xFE,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    971	.byte	0xAF,0x77,0xFF,0xFB,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    972	.byte	0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF
    973
    974	; Tile 0x18
    975	.byte	0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF
    976	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF
    977	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF
    978	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x7D,0xFE,0x7C,0x39
    979	.byte	0xFF,0xFF,0xF7,0xFF,0xEF,0xFF,0xFF,0xDF,0xFF,0xBF,0xFF,0x7F,0x7F,0xFF,0xFF,0xFF
    980	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFF
    981	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    982	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFD
    983
    984	; Tile 0x20
    985	.byte	0xFF,0xFF,0xDF,0xFF,0xEF,0xFF,0xFF,0xF7,0xFF,0xFB,0xFE,0xFD,0xFD,0xFE,0xFE,0xFF
    986	.byte	0xAB,0x11,0xC7,0x83,0x83,0xC7,0xC7,0x83,0xAB,0x11,0x7C,0x39,0x7D,0xFE,0xFE,0xFF
    987	.byte	0xFF,0xFF,0xFF,0xFF,0xFB,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0x7F
    988	.byte	0xFB,0xFF,0xFF,0xFD,0xFE,0xFE,0xFE,0xFF,0xFE,0xFE,0xFF,0xFD,0xFB,0xFF,0xFF,0xFF
    989	.byte	0xEF,0xFF,0xFF,0xDF,0x3F,0xBF,0x3F,0x7F,0x3F,0xBF,0xFF,0xDF,0xEF,0xFF,0xFF,0xFF
    990	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFB,0xFF,0xFF,0xFF,0xFF
    991	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xFD,0xFE,0xFE,0xFD
    992	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF,0xFF
    993
    994	; Tile 0x28
    995	.byte	0xF7,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    996	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    997	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF
    998	.byte	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
    999	.byte	0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
   1000
   1001.endtp3:
   1002
   1003	; Image size: 0x40 x 0x40
   1004	; Number of tiles (total - unique): 0x40 - 0x2D
   1005
   1006.bkg_tiles:
   1007
   1008	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1009	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1010	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1011	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1012
   1013	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1014	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1015	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1016	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1017
   1018	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1019	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1020	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1021	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1022
   1023	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1024	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1025	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1026	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1027
   1028	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1029	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1030	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1031	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1032
   1033	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1034	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1035	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1036	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1037
   1038	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1039	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1040	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1041	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1042
   1043	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1044	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1045	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1046	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1047
   1048	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1049	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1050	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1051	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1052
   1053	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1054	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1055	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1056	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1057
   1058	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1059	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1060	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1061	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1062
   1063	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1064	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1065	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1066	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1067
   1068	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1069	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1070	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1071	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1072
   1073	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1074	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1075	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1076	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1077
   1078	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1079	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1080	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1081	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1082
   1083	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1084	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1085	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1086	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1087
   1088	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1089	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1090	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1091	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1092
   1093	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1094	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1095	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1096	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1097
   1098	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1099	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1100	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1101	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1102
   1103	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1104	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1105	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1106	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1107
   1108	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1109	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1110	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1111	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1112
   1113	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1114	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1115	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1116	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1117
   1118	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1119	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1120	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1121	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1122
   1123	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1124	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1125	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1126	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1127
   1128	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1129	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1130	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1131	.byte	0x00,0x01,0x02,0x03,0xFC,0xFC,0x04,0xFC
   1132
   1133	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1134	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1135	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1136	.byte	0xFC,0x05,0x06,0xFC,0x07,0x08,0x09,0x0A
   1137
   1138	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1139	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1140	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1141	.byte	0xFC,0xFC,0xFC,0x02,0x0B,0x0C,0x0D,0xFC
   1142
   1143	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1144	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1145	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1146	.byte	0x0E,0x0F,0x10,0xFC,0x11,0x12,0x13,0x14
   1147
   1148	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1149	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1150	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1151	.byte	0x15,0x16,0x17,0xFC,0x18,0x19,0x1A,0xFC
   1152
   1153	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1154	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1155	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1156	.byte	0x1B,0x1C,0x1D,0xFC,0xFC,0x1E,0x1F,0x20
   1157
   1158	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1159	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1160	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1161	.byte	0x21,0x22,0xFC,0x23,0x24,0x25,0xFC,0x26
   1162
   1163	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1164	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1165	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1166	.byte	0x27,0x13,0x28,0x29,0x2A,0x2B,0x2C,0x11
   1167
   1168	; Image size: 0x10 x 0x70
   1169	; Number of tiles (total - unique): 0x1C - 0x1C
   1170
   1171.earth_tiles:
   1172
   1173	.byte	0x00,0x02
   1174	.byte	0x04,0x06
   1175	.byte	0x08,0x0A
   1176	.byte	0x0C,0x0E
   1177	.byte	0x10,0x12
   1178	.byte	0x14,0x16
   1179	.byte	0x18,0x1A
   1180
   1181	; Image size: 0x80 x 0x50
   1182	; Number of tiles (total - unique): 0xA0 - 0x15
   1183
   1184.frame_tiles:
   1185
   1186	.byte	0x80,0x81,0xFD,0x82,0x83,0x81,0xFD,0x82,0x83,0x81,0xFD,0x82,0x83,0x81,0xFD,0x84
   1187	.byte	0x85,0x86,0x87,0x88,0x89,0x8A,0x87,0x88,0x89,0x8A,0x87,0x88,0x89,0x8A,0x8B,0x8C
   1188	.byte	0xFD,0x8D,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x8E,0x8F
   1189	.byte	0x82,0x8C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x85,0x90
   1190	.byte	0x8E,0x8F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0x8D
   1191	.byte	0x85,0x90,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x82,0x8C
   1192	.byte	0xFD,0x8D,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x8E,0x8F
   1193	.byte	0x82,0x8C,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x85,0x90
   1194	.byte	0x8E,0x91,0xFD,0x82,0x83,0x81,0xFD,0x82,0x83,0x81,0xFD,0x82,0x83,0x81,0x92,0x8D
   1195	.byte	0x93,0x8A,0x87,0x88,0x89,0x8A,0x87,0x88,0x89,0x8A,0x87,0x88,0x89,0x8A,0x87,0x94
   1196
   1197	; Image size: 0x60 x 0x30
   1198	; Number of tiles (total - unique): 0x48 - 0x03
   1199
   1200.door1_tiles:
   1201
   1202	.byte	0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95
   1203	.byte	0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96
   1204	.byte	0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97
   1205	.byte	0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95
   1206	.byte	0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96
   1207	.byte	0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97
   1208
   1209	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1210	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1211	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1212	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1213	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1214	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1215
   1216	; Image size: 0x60 x 0x30
   1217	; Number of tiles (total - unique): 0x48 - 0x04
   1218
   1219.door2_tiles:
   1220
   1221	.byte	0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98
   1222	.byte	0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99
   1223	.byte	0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A
   1224	.byte	0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98
   1225	.byte	0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99
   1226	.byte	0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B
   1227
   1228	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1229	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1230	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1231	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1232	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1233
   1234	; Image size: 0x60 x 0x30
   1235	; Number of tiles (total - unique): 0x48 - 0x04
   1236
   1237.door3_tiles:
   1238
   1239	.byte	0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C
   1240	.byte	0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D
   1241	.byte	0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E
   1242	.byte	0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C
   1243	.byte	0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D
   1244	.byte	0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F
   1245
   1246	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1247	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1248	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1249	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1250	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1251
   1252	; Image size: 0x60 x 0x30
   1253	; Number of tiles (total - unique): 0x48 - 0x01
   1254
   1255.door4_tiles:
   1256
   1257	.byte	0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95
   1258	.byte	0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96
   1259	.byte	0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97
   1260	.byte	0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95
   1261	.byte	0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96
   1262	.byte	0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0
   1263
   1264	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1265	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1266	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1267	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1268	.byte	0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC
   1269
   1270.film:
   1271	.word	.door1_tiles+0x0C*0
   1272	.word	.door2_tiles+0x0C*0
   1273	.word	.door3_tiles+0x0C*0
   1274	.word	.door4_tiles+0x0C*0
   1275	.word	.door1_tiles+0x0C*1
   1276	.word	.door2_tiles+0x0C*1
   1277	.word	.door3_tiles+0x0C*1
   1278	.word	.door4_tiles+0x0C*1
   1279	.word	.door1_tiles+0x0C*2
   1280	.word	.door2_tiles+0x0C*2
   1281	.word	.door3_tiles+0x0C*2
   1282	.word	.door4_tiles+0x0C*2
   1283	.word	.door1_tiles+0x0C*3
   1284	.word	.door2_tiles+0x0C*3
   1285	.word	.door3_tiles+0x0C*3
   1286	.word	.door4_tiles+0x0C*3
   1287	.word	.door1_tiles+0x0C*4
   1288	.word	.door2_tiles+0x0C*4
   1289	.word	.door3_tiles+0x0C*4
   1290	.word	.door4_tiles+0x0C*4
   1291	.word	.door1_tiles+0x0C*5
   1292	.word	.door2_tiles+0x0C*5
   1293	.word	.door3_tiles+0x0C*5
   1294	.word	.door4_tiles+0x0C*5
   1295.endfilm:
   1296	.word	.door1_tiles+0x0C*6