Language…
20 users online: 7 up, Ahrion,  Alex, Alex No, crocodileman94,  DeppySlide, Fullcannon, Heraga,  Hooded Edge, Israelcv12cv, Jaden1291 the Toad, Natsuz2, OrangeBronzeDaisy, playagmes169, Power_Boii, QuantumNate, Romano338, squiggly, SteamyPanini, Zavok - Guests: 98 - Bots: 285
Users: 56,286 (2,255 active)
Latest user: Avadar Shadowsong

Graphical layer 3 Air meter

SMW Sprites → Graphical layer 3 Air meter

Submission Details

Name: Graphical layer 3 Air meter
Author: HammerBrother
Added:
Version History: View
Tool: PIXI
Type: Generator
Dynamic: No
Disassembly: No
Includes GFX: Yes
Description: When the player enters water, the air meter will appear on the layer 3 heads-up display as a bar and starts emptying. If it hits empty, the player dies. If the player gets off the water, it will refill and disappear after a second it reaches full.


Unlike 0x400's (aka. 1024)'s air meter, this generator shows the smallest amount of fill pieces as pixels, not 8x8. Thus not blocky effects.

Edit: made it easy to convert to old status bar and compressed the size on the "init" section
Tags: air bar air meter lorom status bar water
Comments: 2 (jump to comments)
Rating:
5.0 (3 ratings)
No rating
Download 32.50 KiB | 549 downloads

Screenshots

View all

Comments (2)

 Vitor Vilela From older version: Graphical layer 3 Air meter Link
You still can optimize a few bytes there and there but nothing major, like

Code
	LDA !Freeram_Init	;\If init already triggered, return
	BNE .Return		;/
	LDA #$01		;\Indicate that the init can only done once
	STA !Freeram_Init	;/


to

Code
	LDA !Freeram_Init	;\If init already triggered, return
	BNE .Return		;/
	INC			;\Indicate that the init can only done once
	STA !Freeram_Init	;/


------------------------

Code
	LDA $0000		;\Middle tiles, where the fillable region is.
	STA !BarPos+$02		;|>If you are using the old status bar, start at !BarPos+$01 instead
	LDA $0001		;| because !BarPos itself is reserved for the left end tile.
	STA !BarPos+$04		;|
	LDA $0002		;|
	STA !BarPos+$06		;|
	LDA $0003		;|
	STA !BarPos+$08		;|
	LDA $0004		;|
	STA !BarPos+$0A		;/
	RTS


You could have used simply a multiplication here to keep compatibility with old status bar, like:

Code
!StatusSize = $02 ; put $01 for compatibility with old status bar.
!BarPos	= $7FA100 ; Position of the meter, change to $0EF9 for old status bar.

...


	LDA $0000			;\Middle tiles, where the fillable region is.
	STA !StatusSize*1+!BarPos	;|
	LDA $0001			;|
	STA !StatusSize*2+!BarPos	;|
	LDA $0002			;|
	STA !StatusSize*3+!BarPos	;|
	LDA $0003			;|
	STA !StatusSize*4+!BarPos	;|
	LDA $0004			;|
	STA !StatusSize*5+!BarPos	;/
	RTS


It would make much easier to non-ASM hackers modify the code. Trust me, even if you state clearly how to change, not all hackers have the ability at all to understand the logic of an ASM code.
DiscoTheBat From older version: Graphical layer 3 Air meter Link
This looks a pretty much improved version of the old air meter, the instructions are pretty clear so I had no issue. I like this submission, approved.