News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Subscreen & HUD - ALttP Engine Basics

Started by mdtaUK, September 04, 2012, 04:11:29 PM

Previous topic - Next topic

mdtaUK

I have done some tests and I have the sprite animating as I move his position, but now I am taking a break and working on figuring out how I may do the HUD and Subscreen.

I was thinking of laying it out as a text array from a spritesheet and defining the 24x24 tiles.  My issue would then be how do I update the values as the player loses Hearts and uses Magic, Rupees etc.  I would manually set the co-ordinates for the text and icons and show/hide/update strings etc as needed.

How is the Subscreen and HUD layout stored in ALttP itself, and how are values updated?  I understand you don't have source code, and just have memory addresses moved and manipulated in Assembler code, but how it handles Magic Meter value changes etc...


Quote00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00|
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00|
00, 00, 01, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 03, 00, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 00, 00|
00, 00, 04, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 05, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 04, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 05, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 04, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, A1, 05, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 04, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, A2, 05, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 06, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 07, 08, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 81, 82, 22, 22, 22, 22, 22, 22, 23, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 24, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 83, 84, 99, 99, 99, 99, 99, 99, 25, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 24, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 83, 84, 99, 99, 99, 99, 99, 99, 25, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 24, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 83, 84, 99, 99, 99, 99, 99, 99, 25, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 24, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 83, 84, 99, 99, 99, 99, 99, 99, 25, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 24, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 83, 84, 99, 99, 99, 99, 99, 99, 25, 00, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 24, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 83, 84, 99, 99, 99, 99, 99, 99, 25, 00, 14, Y1, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 24, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 83, 84, 99, 99, 99, 99, 99, 99, 25, 00, 14, Y2, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 15, 00, 00|
00, 00, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 85, 86, 27, 27, 27, 27, 27, 27, 28, 00, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 00, 00|
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00|
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00|
00, 00, H5, H5, H5, H5, H5, H5, H5, H5, H5, H5, 00, 00, R1, 00, 00, 00, 00, K1, 00, 00, 00, 00, 00, 00, M1, M4, M4, M4, M6, M5, M5, M5, M5, MB, 00, 00, 00, I1, I2, I3, 00, 00|
00, 00, H5, H3, H1, H1, H1, H1, H1, H0, H0, H0, 00, 00, N0, N5, N0, 00, 00, N0, 00, 00, 00, 00, 00, 00, B1, B4, B4, B4, B6, B5, B5, B5, B5, BB, 00, F1, F0, I4, 99, I5, 00, 00|
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, G1, G0, I6, I7, I8, 00, 00|
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00|
This is how I am thinking about laying out the screen.  The bottom 6 rows of numbers are the HUD.