Language…
20 users online: Ahrion, AntonioDosGames, bandicoot, brickblock369, bucketofwetsocks, cohimbra, Duraner Hawkeye, evil0, Ginyu AL, JankPickle, JWMarioRoms, leafermetrics, lordkronos100,  NopeContest, oneframejames, Pancake001, shedletsky, Sparkysie, SuperMegaNick,  xHF01x - Guests: 119 - Bots: 127
Users: 57,970 (2,495 active)
Latest user: lolo24160

Coding a Graphical Bar, with Base ASM (v5.00)

Documents → Coding a Graphical Bar, with Base ASM (v5.00)

Submission Details

Name: Coding a Graphical Bar, with Base ASM (v5.00)
Author: HammerBrother
Added:
Version History: View
Platforms: SNES
Games: SMW
Type: Tutorial
Language: English
Description: This contains a template for displaying a value of something as a graphical bar on the HUD. See readme on how to use.

Github: https://github.com/GhbSmwc/SMW-Graphical-bar-display
Tags: bar health bar hud sa-1
Comments: 22 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 1.00 MiB | 196 downloads

Screenshots

View all

Comments (22)

HammerBrother Author Link
MinecraftGamerLR Make sure you have the GraphicalBarDefines folder in the right place. In the main directory of uberasm tool, for example.
MinecraftGamerLR Link
Every time I try to install the example pack, I always get the "Macro Library File Not Defined" error. What am I doing wrong??
HammerBrother Author Link
Tymare Thanks. I went all out, adding tons of features to it than just a basic rectangular meter to give it a more appealing look.
Tymare Link
i like it. it look good #smw{:|}
MarkAlarm Link
Moderated with:
- Windows 10 Home
- Google Chrome

Incredibly thorough documentation on graphical bars with tons of examples. There's a lot here so I might've missed something but it's overall quite solid. Hopefully people find this useful.
HammerBrother Author Link
Black Goku Yes, just edit the defines that would point to JSL !SharedSubroutineDefines to instead a label that would point to its code (a subroutine within the sprite code ASM) or Pixi's routines folder (must be %SubroutineFilenameFromRoutinesFolder()). And then move (cut/copy, then paste) the code to its code or in the routines folder.

I prefer the shared subroutines patch because it makes it accessible on any ASM resource (like have a bar for the HUD and as a sprite) than just uberasm tool or pixi. Another reason is that you cannot call a subroutine within another, separate subroutine file in a daisy chain -like fashion:

Originally posted by uberasm tool - readme.txt
Code
The second one is that you can't call other libraries codes from a
library file. For example, if you have a windowing HDMA code and you
need to call a sqrt routine, which is located on the math library, you
can't do that, because UberASM Tool can't guess what labels each file
will generate nor what labels each library .asm file will depend from
each other. So unfortunately the library files are pretty much
isolated from each one.
Black Goku Link
Is there some way to use the boss health mether without the Shared Subroutines Patch?
HammerBrother Author Link
OAM (sprite tile) support added.
sdfsdgvsfb From older version: Coding a Graphical Bar, with Base ASM (v4.01) Link
coool
 Major Flare From older version: Coding a Graphical Bar, with Base ASM (v4.01) Link
Since I've already tested the codes provided in an earlier version, all that there is to do is analyze the new routine and read the small changes made. No problems found, so I can accept this update (as I keep reading waiting docs for some time before even claiming them).
 Major Flare From older version: Coding a Graphical Bar, with Base ASM (v3.17) Link
Routines tested with: UberASMTool 1.3 and 1.4, SA-1 1.31, LM 3.03 and ZMZ 1.08.

Missing info successfully added. So, I do not have reasons to reject.
 Major Flare From older version: Coding a Graphical Bar, with Base ASM (v3.17) Link
I apologize if I was too harsh on you in the last removal; but you cannot deny that you improved as a result: the document is readable, easy to follow, and by it I can easily made the examples work, as an average user. Sure there'll be eventual ASM bugs here and there (as a perfect ASM code of this caliber is difficult to obtain); however, since the focus of this section is the document per-se, and the basic idea worked well, as the examples themselves... I don't see another consideration other than an approval. Thus, I'll accept this document. Kudos to you, GHB; as I said, you improved a lot.
HammerBrother Author From older version: Coding a Graphical Bar with Base ASM Link
and changing JSR to JSL too.
DiscoTheBat From older version: Coding a Graphical Bar with Base ASM Link
This tutorial is excellent for those coding their special bars to use on their own hack. A small note, if you are using UberASM tool, don't forget to convert the RTS to RTL or you'll get crashes.
HammerBrother Author From older version: Coding a Graphical Bar with Base ASM Link
@Tsutarja

The two extra tiles are end tiles. Make sure you read the readme. I tested this using gamemode main 14.
Tsutarja From older version: Coding a Graphical Bar with Base ASM Link
this doesn't seem to work with Advanced Super Statusbar.

i just see the first tile, and it was supposed to appear 9 (since !MiddleLenght is 7)

tested on statusbar_code.asm
HammerBrother Author From older version: Coding a Graphical Bar with Base ASM Link
You can even make a geometry dash progress bar.
 Vitor Vilela From older version: [Base ASM] Graphical Bar Link
Document was verified by Sonikku.
HammerBrother Author From older version: [Base ASM] Graphical Bar Link
Fixed an issue:
One of the images describing the pieces of an 8x8 says 3/6 twice.
HammerBrother Author From older version: [Base ASM] Graphical Bar Link
-Fix the Sa-1 issue if you set middle length to other than a power of 2.
-Fix the bar drawing looping routine that I've forgot to include the end tiles for old HUD.
-Fix another problem with the rounding on non-sa-1 when you use MaxQuantity a large value (like 400).
HammerBrother Author From older version: [Base ASM] Graphical Bar Link
Yeah, this code requires a HUGE explanation that it doesn't qualify to be on the uberasm thread. It's the kind of post that should be submitted to a section instead of a thread. I call them [BASE ASM], because it's an asm code for many uses, but too big of an explanation that needs to be a section submission instead of an ASM library, plus, the submission section is a big out-of-the-open area than a download linked from the forums.

Hopefully, in the future, doesn't get rejected because this is mainly code for many uses or someone changed their mind on accepting this. The smw disassembly is a code and a document, for hacking smw.
 Vitor Vilela From older version: [Base ASM] Graphical Bar Link
Honestly, probably this would fit better on the UberASM thread (or maybe in a UberASM section), but since you included a full document explaining how your system... I don't know. Since the Staff Team didn't have any opinion regarding this and everything seems ok, I'm approving this.