jeffman
6ca5f8543a
Custom control codes force a window draw
...
Also made the cash window one tile shorter
2018-12-09 21:15:42 -05:00
jeffman
442d52054b
Fix cash window formatting (when pressing B)
...
Does not fix the cash window that pops up when e.g. accessing the ATM.
2018-12-06 23:07:35 -05:00
jeffman
aa4191aec2
bin_to_bcd can be called from C
...
Remove old cash window formatting code (we'll be rewriting it in C)
2018-12-06 23:05:00 -05:00
jeffman
bd7dff7d47
Fix printing ATM balance to main text window
2018-12-06 20:44:08 -05:00
jeffman
e64b58d89e
Number menu prints and clears properly
2018-12-04 23:52:35 -05:00
jeffman
a7ffd1059d
Number selection menu fixes
...
Dollar sign, initial zeroes, and 00 symbol all display properly now
2018-12-04 22:22:53 -05:00
jeffman
7dab3d8ad5
Create number_selector struct
2018-12-04 22:22:52 -05:00
jeffman
debdea78bd
Add print_menu_string
...
This essentially does the same thing as print_string, but with some
additional behaviour:
- Custom control codes (5F and 60) are checked
- Will automatically update the window's cursor_delta value
- Updates the window's text X values
2018-12-01 00:50:29 -05:00
jeffman
ba28534e5a
Add null check
...
Also use more consistent variable naming
2018-12-01 00:44:50 -05:00
jeffman
6a52aafb6d
Add some comments on coordinate units
2018-12-01 00:44:03 -05:00
jeffman
5db8ff5901
Some type changes
...
Use stdbool; change int* to byte* for the window text pointers; put
typedefs into types.h
2018-12-01 00:43:22 -05:00
jeffman
8d1dc7803b
Window+12 is the menu text pointer
2018-11-29 22:16:01 -05:00
jeffman
26ad3435c0
Add missing function signature
2018-11-29 21:50:06 -05:00
jeffman
fcfbeb2b7a
Add print_blankstr_window
...
Same as print_blankstr, but relative to a window.
2018-11-27 23:15:28 -05:00
jeffman
fd29f1f368
clear_tile resets the tilemap
...
Not sure about the side effects... I *think* it's okay; I can't imagine
a scenario where you'd want to clear the pixels but not the tilemap.
This came up during the multi-PC Goods window clearing: the equip symbols
weren't getting cleared when calling print_blankstr. If this change has
unintended side effects, revert it and then manually clear the equip
symbol tilemap in bf858_goods.
2018-11-27 23:14:51 -05:00
jeffman
1d3ef8de13
Factored out some magic numbers
2017-04-16 19:25:11 -04:00
jeffman
a633b9d643
Added code to draw equip window header
2017-04-16 19:15:22 -04:00
jeffman
6f448b8f2c
Added some clearing routines
2017-04-16 19:14:02 -04:00
jeffman
1264803232
Imported m2_strlookup
2017-04-16 19:13:32 -04:00
jeffman
0ae74eefd9
print_window_header_string now uses pixel coordinates
...
This is so that we can glue strings together. For example, the game
prints "Weapons" and "(X)" (page number) as separate strings.
2017-04-16 19:12:33 -04:00
jeffman
08b586b1f0
Documented a page number field for WINDOW
...
For example, when you're choosing a teleport location and have multiple
pages of destinations to scroll through; this field denotes the index
of which page you're on.
2017-04-16 19:09:53 -04:00
jeffman
3ff08bb07f
Some code reformatting
2017-04-16 19:07:19 -04:00
jeffman
96b7850733
Changed how symbols are resolved
...
Got rid of the m12-symbols.sym file that I was manually curating; moved
it into m2-hack.asm instead, in the form of .definelabel directives. This
allows existing ROM symbols to be resolved gracefully when the assembler
exports everything, so that we can call existing ROM subroutines, etc.
from our compiled code.
Also added label definitions for hardcoded strings. Makes it easy to refer
to such strings in our compiled code as well.
Updated build scripts to reflect this.
2017-04-16 19:04:22 -04:00
jeffman
87d792f156
Moved window header code to C
2017-04-15 23:38:32 -04:00
jeffman
7bfedd75e7
Added arrow character
2017-04-15 23:37:17 -04:00
jeffman
3bc7fd417e
Fixed YOU WON! graphics
2017-04-15 13:36:42 -04:00
jeffman
21c703def1
Made argument types more consistent
2017-04-15 13:31:53 -04:00
jeffman
bc29d81c05
Generalized print_character
...
Now has the option to pass a get_tile callback for different coordinate
systems. Can also turn off tilemap editing.
2017-04-15 12:49:47 -04:00
jeffman
e49701cb5e
Centralized character decoding
2017-04-15 12:48:33 -04:00
jeffman
fcee9591b1
Turning off all inlining and constant propagation for now
...
Can always turn these back on again later, it's just easier to debug with
them off
2017-04-15 12:46:34 -04:00
jeffman
89a848376a
Fixed some VWF bugs
2017-04-13 18:11:46 -04:00
jeffman
72f37b4dfb
Moved print_space to vwf.c
2017-04-11 17:39:56 -04:00
jeffman
b46539dd34
Moved a bunch of tile clearing/copying code to C
2017-04-11 17:16:58 -04:00
jeffman
5b08fb966c
Added clarification to workflow notes
2017-04-11 17:15:51 -04:00
jeffman
d4e1e81bb2
Don't inline get_tile_number
...
It barely runs faster when inlined and it's just easier to debug things
when it's not inlined
2017-04-11 17:15:34 -04:00
jeffman
5b98d5d406
Added CpuFastSet stub
2017-04-11 17:12:20 -04:00
jeffman
9b7aa3cee7
Misc improvements
2017-04-11 12:51:12 -04:00
jeffman
8aac0f707e
Mark extern ROM tables as const
2017-04-11 12:50:41 -04:00
jeffman
b8864ffa52
Moved print_string to vwf.c
2017-04-11 02:12:33 -04:00
jeffman
c5de0ebb16
Moved weld_entry to vwf.c
2017-04-11 01:16:14 -04:00
jeffman
d7ae1edd3f
Ported core VWF code to C
2017-04-10 19:41:21 -04:00
jeffman
dcd0b4ea6c
Don't touch r12
...
I noticed that the generated code wasn't saving r12, but the game expects
it to be saved, so let's just not touch it
2017-04-10 19:40:30 -04:00
jeffman
7311ec1dd7
Combine .data section into .text
2017-04-10 17:08:03 -04:00
jeffman
3ab328fbf8
Use ELFSharp instead of objdump+regex
2017-04-10 16:01:54 -04:00
jeffman
8bdcf23974
Linker uses correct start address
2017-04-10 15:48:38 -04:00
jeffman
e475c34e0a
Cleanup
2017-04-08 15:09:53 -04:00
jeffman
1347a5236e
Updated notes and fixed typos
2017-04-08 05:10:33 -04:00
jeffman
ff59fee5ca
Cleaner syntax
2017-04-08 05:01:02 -04:00
jeffman
2d0a5997b8
Proof of concept by porting get_tile_number to C
2017-04-08 02:22:38 -04:00
jeffman
638b979cde
Added Amalgamator
...
This is a dumb build script that manages all the cross-compiling and
linking nonsense. You need the arm-none-eabi GNU toolchain to use any
of this.
Some more details in compiled/workflow.txt.
2017-04-08 02:22:21 -04:00