Lukas Krickl [Wed, 16 Jul 2025 08:54:45 +0000 (10:54 +0200)]
redraw: made redraw more generic.
Moved to video
Lukas Krickl [Wed, 16 Jul 2025 03:50:21 +0000 (05:50 +0200)]
UI: added def for tiles per frame processing
Lukas Krickl [Tue, 15 Jul 2025 19:17:39 +0000 (21:17 +0200)]
video: added new system to redraw UI
The new system redraws the UI with a request system.
The entire UI tilemap is mirrored in wram where it can be updated
outside of blanks.
Lukas Krickl [Tue, 15 Jul 2025 18:11:48 +0000 (20:11 +0200)]
TODO: Added additionaly todo for map redraws
Lukas Krickl [Tue, 15 Jul 2025 18:10:32 +0000 (20:10 +0200)]
TODO: Added some notes about redraws
Lukas Krickl [Tue, 15 Jul 2025 17:14:34 +0000 (19:14 +0200)]
video: made menu to level transiton look nicer
Moved BGP handling for fade out to a shadow register
fade in now takes a target palette as a parameter.
Moved IE to a shadow register so interrupts can be centrally configured
even if they are disabled.
Lukas Krickl [Tue, 15 Jul 2025 16:05:29 +0000 (18:05 +0200)]
font update
Lukas Krickl [Tue, 15 Jul 2025 15:48:13 +0000 (17:48 +0200)]
shadow bgp: removed
Lukas Krickl [Tue, 15 Jul 2025 15:46:49 +0000 (17:46 +0200)]
main menu: added basic framework for menus
This menu is currently not doing much.
Moved palette loading to game_init and main_menu_init.
Lukas Krickl [Tue, 15 Jul 2025 03:49:37 +0000 (05:49 +0200)]
defs: reduced size of BGE_MAX to 4
Lukas Krickl [Tue, 15 Jul 2025 03:45:30 +0000 (05:45 +0200)]
mainmenu: lcd is now disabled when writing menu
Maps kinda want lcd enabled during load.
The menu should not really have the lcd on anyway.
Maybe one day vblank_wait should just return if the lcd is off....
Lukas Krickl [Mon, 14 Jul 2025 15:27:51 +0000 (17:27 +0200)]
main menu: wip main memu loader
This refactored default loading and moved it to game init.
The menu rendering is currently still broken.
Lukas Krickl [Mon, 14 Jul 2025 03:53:13 +0000 (05:53 +0200)]
video: vblank and not vblank wait not correctly disable interrpts
They ensure to restore IE as it was before they were called.
This makes sure the vblank handler does not cause the wait loop to miss
its condition. This resulted in an infinite loop under certain
conditions.
Lukas Krickl [Sun, 13 Jul 2025 15:31:55 +0000 (17:31 +0200)]
mainmenu: added stubs for main menu
Lukas Krickl [Sun, 13 Jul 2025 14:53:53 +0000 (16:53 +0200)]
video: updated background update queue to a more simple system.
Background updates now happen every frame for up to 10 tiles.
Tiles can have flags set to either set the base address, write a tile or
both. This works on SCRN0 or SCRN1.
Lukas Krickl [Sun, 13 Jul 2025 10:19:17 +0000 (12:19 +0200)]
video: removed call to bg queue process for now
Lukas Krickl [Sun, 13 Jul 2025 07:52:14 +0000 (09:52 +0200)]
video: wip bg update system
Lukas Krickl [Sun, 13 Jul 2025 05:32:37 +0000 (07:32 +0200)]
unit: fixed movement delya being too long
This was caused by the delay timer only being set *after* collision
check.
This caused the delay to be the last unit's delay which may be slower or
faster than expected.
Lukas Krickl [Thu, 10 Jul 2025 04:27:44 +0000 (06:27 +0200)]
video: disabling oam on window
Lukas Krickl [Thu, 10 Jul 2025 03:53:06 +0000 (05:53 +0200)]
video: wip stat interrupts
Lukas Krickl [Wed, 9 Jul 2025 05:40:55 +0000 (07:40 +0200)]
video: wip disabling objects when window is drawing
Lukas Krickl [Wed, 9 Jul 2025 05:27:08 +0000 (07:27 +0200)]
BUGS: Added bug
Lukas Krickl [Wed, 9 Jul 2025 05:18:48 +0000 (07:18 +0200)]
bg update: wip new queue system
Lukas Krickl [Wed, 9 Jul 2025 03:43:55 +0000 (05:43 +0200)]
ui: moved bg update to video.s
Lukas Krickl [Wed, 9 Jul 2025 02:56:10 +0000 (04:56 +0200)]
bank8c00: Added alternative empty tile
Lukas Krickl [Tue, 8 Jul 2025 03:53:46 +0000 (05:53 +0200)]
player: moved when scroll to center is called
This makes the camera behave a bit nicer.
It still kinda looks a bit off when moving a lot.
Lukas Krickl [Mon, 7 Jul 2025 07:11:57 +0000 (09:11 +0200)]
video: Added fade out and fade in for map transitions
Lukas Krickl [Mon, 7 Jul 2025 03:51:38 +0000 (05:51 +0200)]
map load: Added a bit of a delay between loads
Lukas Krickl [Sat, 5 Jul 2025 19:24:23 +0000 (21:24 +0200)]
maps: Added 3rd demo map
Lukas Krickl [Sat, 5 Jul 2025 18:57:27 +0000 (20:57 +0200)]
map: Fixed map load corrupting video memory
Map loads now always disable interrupts and the lcd.
In the future maybe we should only disable lcd if we are swapping out
tilesets.
During a map load it would probably be enough to wait for blank
for each row of tiles loaded.
Lukas Krickl [Sat, 5 Jul 2025 08:33:53 +0000 (10:33 +0200)]
maps: wip map load issue
Lukas Krickl [Sat, 5 Jul 2025 07:57:02 +0000 (09:57 +0200)]
maps: wip added second map
Lukas Krickl [Sat, 5 Jul 2025 07:51:17 +0000 (09:51 +0200)]
tms2map: now supports external tilesets
This will make re-using them easier in the future
Lukas Krickl [Sat, 5 Jul 2025 07:17:49 +0000 (09:17 +0200)]
exits: fixed exit table pointer lookup
Lukas Krickl [Sat, 5 Jul 2025 07:12:16 +0000 (09:12 +0200)]
exits: Added position adjust for player
Lukas Krickl [Sat, 5 Jul 2025 04:34:18 +0000 (06:34 +0200)]
defs: Re-defined map exit goto x and y
Lukas Krickl [Sat, 5 Jul 2025 04:32:35 +0000 (06:32 +0200)]
exits: Added map exit loader logic
Player position adjustments are still missing
Lukas Krickl [Sat, 5 Jul 2025 03:10:36 +0000 (05:10 +0200)]
exits: Added map table pointer loader
Lukas Krickl [Sat, 5 Jul 2025 02:37:16 +0000 (04:37 +0200)]
exits: Added exit table ptr to map definition
Lukas Krickl [Fri, 4 Jul 2025 16:58:42 +0000 (18:58 +0200)]
map exits: Added required input field to exit struct
Lukas Krickl [Fri, 4 Jul 2025 15:47:51 +0000 (17:47 +0200)]
maps: Added ability to add coordinate based flags to maps
Reworked how tile-based flags are read.
They are now read from a property called flags with a simple int value.
Coordinate based flags are read from layer properties.
A layer property with int value called flags_x,y will be or'd with the
tile property value to arrive at a final flag value.
This can be useful for exits to allow the setting of exit table offsets
in the upper nibble of the flags byte.
Lukas Krickl [Thu, 3 Jul 2025 17:51:01 +0000 (19:51 +0200)]
map: Added map name
Changed font to not use color 0.
Changed space tile to not use color 0.
Lukas Krickl [Thu, 3 Jul 2025 15:50:53 +0000 (17:50 +0200)]
bug: fixed shadow oam alignment. this caused DMA not behave wrongly.
Lukas Krickl [Thu, 3 Jul 2025 15:28:54 +0000 (17:28 +0200)]
sprite work
Lukas Krickl [Thu, 3 Jul 2025 10:26:30 +0000 (12:26 +0200)]
sprite work
Lukas Krickl [Thu, 3 Jul 2025 03:55:54 +0000 (05:55 +0200)]
map: Added definition for exit table
Lukas Krickl [Wed, 2 Jul 2025 15:45:55 +0000 (17:45 +0200)]
wip: sprites
Lukas Krickl [Wed, 2 Jul 2025 07:33:57 +0000 (09:33 +0200)]
updated obj tiles
Lukas Krickl [Wed, 2 Jul 2025 03:52:39 +0000 (05:52 +0200)]
oam: Enabled 8x16 objects
For this change I had to split up bank 8800 into 8800 and 8C00.
Updated the png converter script to convert 8800-8C00 into 8x16 object
compatible tiles.
Updated map loader to contain an additional pointer gfx.
Updated map generator to write the additional pointer to gfx.
Updated sprite index for player and demo actors.
Lukas Krickl [Tue, 1 Jul 2025 15:13:16 +0000 (17:13 +0200)]
bank8800: made player sprite 16x16
Lukas Krickl [Tue, 1 Jul 2025 14:33:04 +0000 (16:33 +0200)]
actor: unit_generic_draw now draws 2 objects per actor
Lukas Krickl [Mon, 30 Jun 2025 15:32:21 +0000 (17:32 +0200)]
defs: changed y viewport to 6 tiles
Lukas Krickl [Mon, 30 Jun 2025 14:36:45 +0000 (16:36 +0200)]
map: Maps are now 16x16 and have a tile size of 16x16
This mostly required reworking rendering as the actual game logic is
tile based anyway.
Drawing maps now happens in 2 steps.
Actors do not take into account the larger size yet. I will probably
switch to 8x16 objects eventually. This will however require a rework of
the image converter
Lukas Krickl [Mon, 30 Jun 2025 04:05:14 +0000 (06:05 +0200)]
added new enemy sprite
Lukas Krickl [Mon, 30 Jun 2025 02:52:05 +0000 (04:52 +0200)]
TODO: Added some todo notes
Lukas Krickl [Sat, 28 Jun 2025 17:02:34 +0000 (19:02 +0200)]
demo: fixed demo inputs
Demos can be used to play-back inputs
Lukas Krickl [Sat, 28 Jun 2025 16:55:28 +0000 (18:55 +0200)]
actortable: The demo actor table was reading out of bounds
The laoder code was behaving correctly, but the size value was
off-by-one
Lukas Krickl [Sat, 28 Jun 2025 16:52:21 +0000 (18:52 +0200)]
wip: demo inputs
This is currently very broken due to a map actor loader out of bounds
read
Lukas Krickl [Sat, 28 Jun 2025 10:11:39 +0000 (12:11 +0200)]
actor: fixed movement being slow when picking two directions
This was caused due to try_move_x destroying registers.
The fix was to simply push and pop de and hl.
Lukas Krickl [Sat, 28 Jun 2025 05:54:56 +0000 (07:54 +0200)]
actor: fixed doc comment
Lukas Krickl [Sat, 28 Jun 2025 05:54:11 +0000 (07:54 +0200)]
actor: renamed def_draw to def_meta and added dialog options ptr
Lukas Krickl [Fri, 27 Jun 2025 15:57:51 +0000 (17:57 +0200)]
actor: Added semi-smooth sub tile animation
Lukas Krickl [Thu, 26 Jun 2025 16:03:22 +0000 (18:03 +0200)]
actor: Added movement speed-based delay
This is simply done by having a writable version of
unit_delay_to_active in wram.
The timer can now be changed at will.
Also added st_custom for entierly custom runtime states :^)
Lukas Krickl [Thu, 26 Jun 2025 11:00:45 +0000 (13:00 +0200)]
unit: wip sub-tile animation
Lukas Krickl [Wed, 25 Jun 2025 17:23:05 +0000 (19:23 +0200)]
actor: removed sub-tile movement
Instead it will be replaced by a delay state that will update
an offset for rendering.
This state will move faster or slower depending on movement speed.
Lukas Krickl [Wed, 25 Jun 2025 13:53:14 +0000 (15:53 +0200)]
actor: rt variables are now in regular actor_def
this saves a macro call.
units now move in sub-tiles in all directions.
Drawing still will need to take this into account.
Lukas Krickl [Wed, 25 Jun 2025 08:18:11 +0000 (10:18 +0200)]
actors: Added sub-tile movement for up direction
Lukas Krickl [Wed, 25 Jun 2025 03:46:11 +0000 (05:46 +0200)]
actor: renamed attr to skill
Lukas Krickl [Tue, 24 Jun 2025 17:09:54 +0000 (19:09 +0200)]
unit: wip sub-tile movement
Lukas Krickl [Sun, 22 Jun 2025 08:27:22 +0000 (10:27 +0200)]
unit: Added stub for sub-tile positions
Lukas Krickl [Sun, 22 Jun 2025 05:47:19 +0000 (07:47 +0200)]
unit: the player unit can now move in multiple directions on the same
frame
Lukas Krickl [Sun, 22 Jun 2025 03:49:31 +0000 (05:49 +0200)]
unit: obj reset is now in a sub routine
Lukas Krickl [Sat, 21 Jun 2025 15:58:10 +0000 (17:58 +0200)]
unit: units are now not displayed on top of the window area anymore
Lukas Krickl [Sat, 21 Jun 2025 15:37:12 +0000 (17:37 +0200)]
unit: removed dice display
Lukas Krickl [Sat, 21 Jun 2025 14:13:25 +0000 (16:13 +0200)]
unit: fixed current actor comparison in unit->unit collision
This check was just completely busted...
Lukas Krickl [Sat, 21 Jun 2025 14:08:58 +0000 (16:08 +0200)]
wram: removed unused variables
Lukas Krickl [Sat, 21 Jun 2025 14:03:10 +0000 (16:03 +0200)]
unit: removed turn-based code
This change removes a lot of turn based code around moves, moves max
initiavite etc.
It also simply sets all units to active which effectively makes the game
real time.
Lukas Krickl [Sat, 21 Jun 2025 13:49:56 +0000 (15:49 +0200)]
unit: Fixed out of bounds reads and write in unit->unit collision
This was caused by attempting to use a clobbered A value as the loop
index.
Lukas Krickl [Sat, 21 Jun 2025 11:02:32 +0000 (13:02 +0200)]
unit: removed debu BREAKs
Lukas Krickl [Sat, 21 Jun 2025 11:01:50 +0000 (13:01 +0200)]
unit: Added unit to unit collision
Lukas Krickl [Sat, 21 Jun 2025 08:40:42 +0000 (10:40 +0200)]
maps: Added simple RLE to map converter and loader
Lukas Krickl [Sat, 21 Jun 2025 06:54:00 +0000 (08:54 +0200)]
map: refactored map converter to split up bg and flags into 2 tables
The map loader now also loads them in 2 steps.
Lukas Krickl [Sat, 21 Jun 2025 04:02:56 +0000 (06:02 +0200)]
video: removed deprecated scroll update code
Lukas Krickl [Fri, 20 Jun 2025 19:26:22 +0000 (21:26 +0200)]
macros: Added mul16 and div16 macros
Lukas Krickl [Fri, 20 Jun 2025 19:15:31 +0000 (21:15 +0200)]
defs: removed some magic numbers from scroll center
Lukas Krickl [Fri, 20 Jun 2025 18:15:57 +0000 (20:15 +0200)]
video: removed deprecated copy-tiles routine
Lukas Krickl [Fri, 20 Jun 2025 18:15:00 +0000 (20:15 +0200)]
map: maps can now load tile banks dynamically
Lukas Krickl [Fri, 20 Jun 2025 17:30:38 +0000 (19:30 +0200)]
unit: code cleanup
Lukas Krickl [Fri, 20 Jun 2025 17:26:06 +0000 (19:26 +0200)]
map: Added actor table loader
Lukas Krickl [Fri, 20 Jun 2025 14:51:17 +0000 (16:51 +0200)]
maps: Added more header values to map converter
Lukas Krickl [Fri, 20 Jun 2025 14:31:12 +0000 (16:31 +0200)]
map: refactoring map loader
Lukas Krickl [Fri, 20 Jun 2025 11:50:07 +0000 (13:50 +0200)]
tiles: Added docs for tile banking
Lukas Krickl [Fri, 20 Jun 2025 11:39:54 +0000 (13:39 +0200)]
strings: removed objputs
Lukas Krickl [Fri, 20 Jun 2025 04:34:51 +0000 (06:34 +0200)]
TODO: Added notes about map saves
Lukas Krickl [Wed, 18 Jun 2025 12:22:07 +0000 (14:22 +0200)]
map: fixed map_get_tile
This function incorrectly added y-offsets for y=0.
Lukas Krickl [Tue, 17 Jun 2025 03:30:21 +0000 (05:30 +0200)]
unit: Added a new _fast version of delay to active
This state is intended for CPU units because they do not need an input
delay to make gameplay feel better.
Lukas Krickl [Tue, 17 Jun 2025 03:26:55 +0000 (05:26 +0200)]
refactor: Removed legacy cursor code
This code was mostly deprecated.
This includes all old cursor code in player.s as well as the update
states and game modes related to cursors.
For testing purposes the base map with demo actors loads directly now.
The cursor code luckily was not used outside its own module anymore.
Lukas Krickl [Tue, 17 Jun 2025 03:16:03 +0000 (05:16 +0200)]
unit display: removed cursor around active unit
Player units are not drawn with x-flip.
Lukas Krickl [Tue, 17 Jun 2025 02:40:02 +0000 (04:40 +0200)]
ui: fixed moves max still being read from memory in ui update
Lukas Krickl [Mon, 16 Jun 2025 04:49:23 +0000 (06:49 +0200)]
unit: reworked moves stat to have the max calculated
removed initiative stat. This stat will be calculated entierly based on
other stats in the future