gbrg/.git
8 weeks agoTODO: added unit notes
Lukas Krickl [Fri, 18 Jul 2025 07:14:44 +0000 (09:14 +0200)]
TODO: added unit notes

8 weeks agomap: Added way to redraw 2 rows of tiles similar to UI redraw
Lukas Krickl [Thu, 17 Jul 2025 19:05:49 +0000 (21:05 +0200)]
map: Added way to redraw 2 rows of tiles similar to UI redraw

8 weeks agostats: reworked stats
Lukas Krickl [Thu, 17 Jul 2025 15:42:32 +0000 (17:42 +0200)]
stats: reworked stats

Removed a bunch of stats that are only derived from other stats and
equipment.

8 weeks agoupdated macros
Lukas Krickl [Thu, 17 Jul 2025 04:01:35 +0000 (06:01 +0200)]
updated macros

8 weeks agodefs: updated stats
Lukas Krickl [Thu, 17 Jul 2025 03:55:33 +0000 (05:55 +0200)]
defs: updated stats

2 months agoactor: Added equipment ptrs
Lukas Krickl [Wed, 16 Jul 2025 15:01:18 +0000 (17:01 +0200)]
actor: Added equipment ptrs

2 months agostats: cleaned up stats
Lukas Krickl [Wed, 16 Jul 2025 14:30:50 +0000 (16:30 +0200)]
stats: cleaned up stats

Replaced some stats with resistances

2 months agoredraw: made redraw more generic.
Lukas Krickl [Wed, 16 Jul 2025 08:54:45 +0000 (10:54 +0200)]
redraw: made redraw more generic.

Moved to video

2 months agoUI: added def for tiles per frame processing
Lukas Krickl [Wed, 16 Jul 2025 03:50:21 +0000 (05:50 +0200)]
UI: added def for tiles per frame processing

2 months agovideo: added new system to redraw UI
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.

2 months agoTODO: Added additionaly todo for map redraws
Lukas Krickl [Tue, 15 Jul 2025 18:11:48 +0000 (20:11 +0200)]
TODO: Added additionaly todo for map redraws

2 months agoTODO: Added some notes about redraws
Lukas Krickl [Tue, 15 Jul 2025 18:10:32 +0000 (20:10 +0200)]
TODO: Added some notes about redraws

2 months agovideo: made menu to level transiton look nicer
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.

2 months agofont update
Lukas Krickl [Tue, 15 Jul 2025 16:05:29 +0000 (18:05 +0200)]
font update

2 months agoshadow bgp: removed
Lukas Krickl [Tue, 15 Jul 2025 15:48:13 +0000 (17:48 +0200)]
shadow bgp: removed

2 months agomain menu: added basic framework for menus
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.

2 months agodefs: reduced size of BGE_MAX to 4
Lukas Krickl [Tue, 15 Jul 2025 03:49:37 +0000 (05:49 +0200)]
defs: reduced size of BGE_MAX to 4

2 months agomainmenu: lcd is now disabled when writing menu
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....

2 months agomain menu: wip main memu loader
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.

2 months agovideo: vblank and not vblank wait not correctly disable interrpts
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.

2 months agomainmenu: added stubs for main menu
Lukas Krickl [Sun, 13 Jul 2025 15:31:55 +0000 (17:31 +0200)]
mainmenu: added stubs for main menu

2 months agovideo: updated background update queue to a more simple system.
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.

2 months agovideo: removed call to bg queue process for now
Lukas Krickl [Sun, 13 Jul 2025 10:19:17 +0000 (12:19 +0200)]
video: removed call to bg queue process for now

2 months agovideo: wip bg update system
Lukas Krickl [Sun, 13 Jul 2025 07:52:14 +0000 (09:52 +0200)]
video: wip bg update system

2 months agounit: fixed movement delya being too long
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.

2 months agovideo: disabling oam on window
Lukas Krickl [Thu, 10 Jul 2025 04:27:44 +0000 (06:27 +0200)]
video: disabling oam on window

2 months agovideo: wip stat interrupts
Lukas Krickl [Thu, 10 Jul 2025 03:53:06 +0000 (05:53 +0200)]
video: wip stat interrupts

2 months agovideo: wip disabling objects when window is drawing
Lukas Krickl [Wed, 9 Jul 2025 05:40:55 +0000 (07:40 +0200)]
video: wip disabling objects when window is drawing

2 months agoBUGS: Added bug
Lukas Krickl [Wed, 9 Jul 2025 05:27:08 +0000 (07:27 +0200)]
BUGS: Added bug

2 months agobg update: wip new queue system
Lukas Krickl [Wed, 9 Jul 2025 05:18:48 +0000 (07:18 +0200)]
bg update: wip new queue system

2 months agoui: moved bg update to video.s
Lukas Krickl [Wed, 9 Jul 2025 03:43:55 +0000 (05:43 +0200)]
ui: moved bg update to video.s

2 months agobank8c00: Added alternative empty tile
Lukas Krickl [Wed, 9 Jul 2025 02:56:10 +0000 (04:56 +0200)]
bank8c00: Added alternative empty tile

2 months agoplayer: moved when scroll to center is called
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.

2 months agovideo: Added fade out and fade in for map transitions
Lukas Krickl [Mon, 7 Jul 2025 07:11:57 +0000 (09:11 +0200)]
video: Added fade out and fade in for map transitions

2 months agomap load: Added a bit of a delay between loads
Lukas Krickl [Mon, 7 Jul 2025 03:51:38 +0000 (05:51 +0200)]
map load: Added a bit of a delay between loads

2 months agomaps: Added 3rd demo map
Lukas Krickl [Sat, 5 Jul 2025 19:24:23 +0000 (21:24 +0200)]
maps: Added 3rd demo map

2 months agomap: Fixed map load corrupting video memory
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.

2 months agomaps: wip map load issue
Lukas Krickl [Sat, 5 Jul 2025 08:33:53 +0000 (10:33 +0200)]
maps: wip map load issue

2 months agomaps: wip added second map
Lukas Krickl [Sat, 5 Jul 2025 07:57:02 +0000 (09:57 +0200)]
maps: wip added second map

2 months agotms2map: now supports external tilesets
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

2 months agoexits: fixed exit table pointer lookup
Lukas Krickl [Sat, 5 Jul 2025 07:17:49 +0000 (09:17 +0200)]
exits: fixed exit table pointer lookup

2 months agoexits: Added position adjust for player
Lukas Krickl [Sat, 5 Jul 2025 07:12:16 +0000 (09:12 +0200)]
exits: Added position adjust for player

2 months agodefs: Re-defined map exit goto x and y
Lukas Krickl [Sat, 5 Jul 2025 04:34:18 +0000 (06:34 +0200)]
defs: Re-defined map exit goto x and y

2 months agoexits: Added map exit loader logic
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

2 months agoexits: Added map table pointer loader
Lukas Krickl [Sat, 5 Jul 2025 03:10:36 +0000 (05:10 +0200)]
exits: Added map table pointer loader

2 months agoexits: Added exit table ptr to map definition
Lukas Krickl [Sat, 5 Jul 2025 02:37:16 +0000 (04:37 +0200)]
exits: Added exit table ptr to map definition

2 months agomap exits: Added required input field to exit struct
Lukas Krickl [Fri, 4 Jul 2025 16:58:42 +0000 (18:58 +0200)]
map exits: Added required input field to exit struct

2 months agomaps: Added ability to add coordinate based flags to maps
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.

2 months agomap: Added map name
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.

2 months agobug: fixed shadow oam alignment. this caused DMA not behave wrongly.
Lukas Krickl [Thu, 3 Jul 2025 15:50:53 +0000 (17:50 +0200)]
bug: fixed shadow oam alignment. this caused DMA not behave wrongly.

2 months agosprite work
Lukas Krickl [Thu, 3 Jul 2025 15:28:54 +0000 (17:28 +0200)]
sprite work

2 months agosprite work
Lukas Krickl [Thu, 3 Jul 2025 10:26:30 +0000 (12:26 +0200)]
sprite work

2 months agomap: Added definition for exit table
Lukas Krickl [Thu, 3 Jul 2025 03:55:54 +0000 (05:55 +0200)]
map: Added definition for exit table

2 months agowip: sprites
Lukas Krickl [Wed, 2 Jul 2025 15:45:55 +0000 (17:45 +0200)]
wip: sprites

2 months agoupdated obj tiles
Lukas Krickl [Wed, 2 Jul 2025 07:33:57 +0000 (09:33 +0200)]
updated obj tiles

2 months agooam: Enabled 8x16 objects
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.

2 months agobank8800: made player sprite 16x16
Lukas Krickl [Tue, 1 Jul 2025 15:13:16 +0000 (17:13 +0200)]
bank8800: made player sprite 16x16

2 months agoactor: unit_generic_draw now draws 2 objects per actor
Lukas Krickl [Tue, 1 Jul 2025 14:33:04 +0000 (16:33 +0200)]
actor: unit_generic_draw now draws 2 objects per actor

2 months agodefs: changed y viewport to 6 tiles
Lukas Krickl [Mon, 30 Jun 2025 15:32:21 +0000 (17:32 +0200)]
defs: changed y viewport to 6 tiles

2 months agomap: Maps are now 16x16 and have a tile size of 16x16
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

2 months agoadded new enemy sprite
Lukas Krickl [Mon, 30 Jun 2025 04:05:14 +0000 (06:05 +0200)]
added new enemy sprite

2 months agoTODO: Added some todo notes
Lukas Krickl [Mon, 30 Jun 2025 02:52:05 +0000 (04:52 +0200)]
TODO: Added some todo notes

2 months agodemo: fixed demo inputs
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

2 months agoactortable: The demo actor table was reading out of bounds
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

2 months agowip: demo inputs
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

2 months agoactor: fixed movement being slow when picking two directions
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.

2 months agoactor: fixed doc comment
Lukas Krickl [Sat, 28 Jun 2025 05:54:56 +0000 (07:54 +0200)]
actor: fixed doc comment

2 months agoactor: renamed def_draw to def_meta and added dialog options ptr
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

2 months agoactor: Added semi-smooth sub tile animation
Lukas Krickl [Fri, 27 Jun 2025 15:57:51 +0000 (17:57 +0200)]
actor: Added semi-smooth sub tile animation

2 months agoactor: Added movement speed-based delay
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 :^)

2 months agounit: wip sub-tile animation
Lukas Krickl [Thu, 26 Jun 2025 11:00:45 +0000 (13:00 +0200)]
unit: wip sub-tile animation

2 months agoactor: removed sub-tile movement
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.

2 months agoactor: rt variables are now in regular actor_def
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.

2 months agoactors: Added sub-tile movement for up direction
Lukas Krickl [Wed, 25 Jun 2025 08:18:11 +0000 (10:18 +0200)]
actors: Added sub-tile movement for up direction

2 months agoactor: renamed attr to skill
Lukas Krickl [Wed, 25 Jun 2025 03:46:11 +0000 (05:46 +0200)]
actor: renamed attr to skill

2 months agounit: wip sub-tile movement
Lukas Krickl [Tue, 24 Jun 2025 17:09:54 +0000 (19:09 +0200)]
unit: wip sub-tile movement

2 months agounit: Added stub for sub-tile positions
Lukas Krickl [Sun, 22 Jun 2025 08:27:22 +0000 (10:27 +0200)]
unit: Added stub for sub-tile positions

2 months agounit: the player unit can now move in multiple directions on the same
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

2 months agounit: obj reset is now in a sub routine
Lukas Krickl [Sun, 22 Jun 2025 03:49:31 +0000 (05:49 +0200)]
unit: obj reset is now in a sub routine

2 months agounit: units are now not displayed on top of the window area anymore
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

2 months agounit: removed dice display
Lukas Krickl [Sat, 21 Jun 2025 15:37:12 +0000 (17:37 +0200)]
unit: removed dice display

2 months agounit: fixed current actor comparison in unit->unit collision
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...

2 months agowram: removed unused variables
Lukas Krickl [Sat, 21 Jun 2025 14:08:58 +0000 (16:08 +0200)]
wram: removed unused variables

2 months agounit: removed turn-based code
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.

2 months agounit: Fixed out of bounds reads and write in unit->unit collision
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.

2 months agounit: removed debu BREAKs
Lukas Krickl [Sat, 21 Jun 2025 11:02:32 +0000 (13:02 +0200)]
unit: removed debu BREAKs

2 months agounit: Added unit to unit collision
Lukas Krickl [Sat, 21 Jun 2025 11:01:50 +0000 (13:01 +0200)]
unit: Added unit to unit collision

2 months agomaps: Added simple RLE to map converter and loader
Lukas Krickl [Sat, 21 Jun 2025 08:40:42 +0000 (10:40 +0200)]
maps: Added simple RLE to map converter and loader

2 months agomap: refactored map converter to split up bg and flags into 2 tables
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.

2 months agovideo: removed deprecated scroll update code
Lukas Krickl [Sat, 21 Jun 2025 04:02:56 +0000 (06:02 +0200)]
video: removed deprecated scroll update code

2 months agomacros: Added mul16 and div16 macros
Lukas Krickl [Fri, 20 Jun 2025 19:26:22 +0000 (21:26 +0200)]
macros: Added mul16 and div16 macros

2 months agodefs: removed some magic numbers from scroll center
Lukas Krickl [Fri, 20 Jun 2025 19:15:31 +0000 (21:15 +0200)]
defs: removed some magic numbers from scroll center

2 months agovideo: removed deprecated copy-tiles routine
Lukas Krickl [Fri, 20 Jun 2025 18:15:57 +0000 (20:15 +0200)]
video: removed deprecated copy-tiles routine

2 months agomap: maps can now load tile banks dynamically
Lukas Krickl [Fri, 20 Jun 2025 18:15:00 +0000 (20:15 +0200)]
map: maps can now load tile banks dynamically

2 months agounit: code cleanup
Lukas Krickl [Fri, 20 Jun 2025 17:30:38 +0000 (19:30 +0200)]
unit: code cleanup

2 months agomap: Added actor table loader
Lukas Krickl [Fri, 20 Jun 2025 17:26:06 +0000 (19:26 +0200)]
map: Added actor table loader

2 months agomaps: Added more header values to map converter
Lukas Krickl [Fri, 20 Jun 2025 14:51:17 +0000 (16:51 +0200)]
maps: Added more header values to map converter

2 months agomap: refactoring map loader
Lukas Krickl [Fri, 20 Jun 2025 14:31:12 +0000 (16:31 +0200)]
map: refactoring map loader

2 months agotiles: Added docs for tile banking
Lukas Krickl [Fri, 20 Jun 2025 11:50:07 +0000 (13:50 +0200)]
tiles: Added docs for tile banking

2 months agostrings: removed objputs
Lukas Krickl [Fri, 20 Jun 2025 11:39:54 +0000 (13:39 +0200)]
strings: removed objputs