gbrg/.git
9 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

9 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.

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

9 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

9 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

10 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 :^)

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

10 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.

10 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.

10 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

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

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

10 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

10 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

10 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

10 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

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

10 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...

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

10 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.

10 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.

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

10 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

10 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

10 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.

10 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

10 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

10 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

10 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

10 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

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

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

10 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

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

10 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

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

10 months agoTODO: Added notes about map saves
Lukas Krickl [Fri, 20 Jun 2025 04:34:51 +0000 (06:34 +0200)]
TODO: Added notes about map saves

10 months agomap: fixed map_get_tile
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.

10 months agounit: Added a new _fast version of delay to active
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.

10 months agorefactor: Removed legacy cursor code
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.

10 months agounit display: removed cursor around active unit
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.

10 months agoui: fixed moves max still being read from memory in ui update
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

10 months agounit: reworked moves stat to have the max calculated
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

10 months agoTODO: updated todo
Lukas Krickl [Sun, 15 Jun 2025 10:51:41 +0000 (12:51 +0200)]
TODO: updated todo

10 months agoTODO: Added todo note
Lukas Krickl [Sat, 14 Jun 2025 02:12:11 +0000 (04:12 +0200)]
TODO: Added todo note

10 months agounit: Added docs for equipment and inventory
Lukas Krickl [Fri, 13 Jun 2025 11:42:32 +0000 (13:42 +0200)]
unit: Added docs for equipment and inventory

10 months agostats: reworked stats to save memory
Lukas Krickl [Fri, 13 Jun 2025 04:03:45 +0000 (06:03 +0200)]
stats: reworked stats to save memory

10 months agounit: Added new stats
Lukas Krickl [Tue, 10 Jun 2025 18:41:11 +0000 (20:41 +0200)]
unit: Added new stats

10 months agounit: Added stub for attributes
Lukas Krickl [Sun, 8 Jun 2025 20:09:08 +0000 (22:09 +0200)]
unit: Added stub for attributes

Attributes will be additions to stats such as weapon skills

10 months agounit: added basic random move cpu state
Lukas Krickl [Sun, 8 Jun 2025 15:09:08 +0000 (17:09 +0200)]
unit: added basic random move cpu state

10 months agounits: removed p1 units. All units are now kept in the same table
Lukas Krickl [Sun, 8 Jun 2025 08:58:16 +0000 (10:58 +0200)]
units: removed p1 units. All units are now kept in the same table

10 months agounit: Added individual dice display to each unit
Lukas Krickl [Sun, 8 Jun 2025 05:52:52 +0000 (07:52 +0200)]
unit: Added individual dice display to each unit

10 months agounit: Added level and placeholders for dice display
Lukas Krickl [Fri, 6 Jun 2025 04:06:30 +0000 (06:06 +0200)]
unit: Added level and placeholders for dice display

10 months agoUpdated TODO
Lukas Krickl [Fri, 6 Jun 2025 03:19:49 +0000 (05:19 +0200)]
Updated TODO

10 months agoUpdted todo
Lukas Krickl [Thu, 5 Jun 2025 16:32:30 +0000 (18:32 +0200)]
Updted todo

10 months agodice display: Added dice display for units
Lukas Krickl [Thu, 5 Jun 2025 16:25:12 +0000 (18:25 +0200)]
dice display: Added dice display for units

This change exposed a bug in the UI update code. UI updats need to draw
tiles which should actually happen in vblank.
UI updates where they are now should simply schedule a vblank update in
the future.

10 months agodice: wip dice display
Lukas Krickl [Thu, 5 Jun 2025 07:18:09 +0000 (09:18 +0200)]
dice: wip dice display

10 months agobank8800: Added dice assets
Lukas Krickl [Wed, 4 Jun 2025 13:41:12 +0000 (15:41 +0200)]
bank8800: Added dice assets

10 months agoTODO: updated todo list
Lukas Krickl [Sun, 1 Jun 2025 14:09:50 +0000 (16:09 +0200)]
TODO: updated todo list

10 months agotext: added status text stub
Lukas Krickl [Sun, 1 Jun 2025 09:51:16 +0000 (11:51 +0200)]
text: added status text stub

10 months agounit: Added a roll to initiative.
Lukas Krickl [Sun, 1 Jun 2025 06:40:15 +0000 (08:40 +0200)]
unit: Added a roll to initiative.

10 months agorand: Added helper for d16 rolls
Lukas Krickl [Sun, 1 Jun 2025 06:16:21 +0000 (08:16 +0200)]
rand: Added helper for d16 rolls

10 months agounit: Added basic collision check to move code
Lukas Krickl [Sat, 31 May 2025 16:11:40 +0000 (18:11 +0200)]
unit: Added basic collision check to move code

This change introduces a bug that prevents a unit from moving to the
very last tile of a map :^)

10 months agoeffect: added effect definition for all units
Lukas Krickl [Sat, 31 May 2025 03:39:17 +0000 (05:39 +0200)]
effect: added effect definition for all units

10 months agodefs: Added placeholder macros for unit inventory equipment and effects
Lukas Krickl [Fri, 30 May 2025 12:51:32 +0000 (14:51 +0200)]
defs: Added placeholder macros for unit inventory equipment and effects

10 months agounit: added more stats to each unit
Lukas Krickl [Fri, 30 May 2025 12:39:37 +0000 (14:39 +0200)]
unit: added more stats to each unit

10 months agomap: wip get tile sub routine
Lukas Krickl [Tue, 27 May 2025 17:57:06 +0000 (19:57 +0200)]
map: wip get tile sub routine

11 months agomap: added unit_get_tile subroutine
Lukas Krickl [Sun, 25 May 2025 16:49:09 +0000 (18:49 +0200)]
map: added unit_get_tile subroutine

This commit also reverts some of the map script changes made in the last
commit

11 months agomap: added ptr to map tile flags to map converter
Lukas Krickl [Sun, 25 May 2025 15:37:03 +0000 (17:37 +0200)]
map: added ptr to map tile flags to map converter

11 months agoSTORY: Added basic plot
Lukas Krickl [Sun, 25 May 2025 10:56:26 +0000 (12:56 +0200)]
STORY: Added basic plot

11 months agounit: Refactored act def macros to allow for more future stats
Lukas Krickl [Sun, 25 May 2025 06:22:24 +0000 (08:22 +0200)]
unit: Refactored act def macros to allow for more future stats

11 months agounit: Added oam flag setter to idle/active
Lukas Krickl [Sat, 24 May 2025 16:24:21 +0000 (18:24 +0200)]
unit: Added oam flag setter to idle/active

11 months agosys: Added farcall sys call
Lukas Krickl [Sat, 24 May 2025 15:29:59 +0000 (17:29 +0200)]
sys: Added farcall sys call

11 months agounit: draw now uses actor's tile and oam flags
Lukas Krickl [Sat, 24 May 2025 15:26:23 +0000 (17:26 +0200)]
unit: draw now uses actor's tile and oam flags

11 months agounit: Added tile and oam flags to default actor model
Lukas Krickl [Sat, 24 May 2025 06:56:43 +0000 (08:56 +0200)]
unit: Added tile and oam flags to default actor model

11 months agoupdated tileset
Lukas Krickl [Sat, 24 May 2025 06:40:44 +0000 (08:40 +0200)]
updated tileset

11 months agoupdated default unit tile
Lukas Krickl [Sat, 24 May 2025 05:28:13 +0000 (07:28 +0200)]
updated default unit tile

11 months agounit: fixed end turn being delayed if inputs are held
Lukas Krickl [Fri, 23 May 2025 03:57:45 +0000 (05:57 +0200)]
unit: fixed end turn being delayed if inputs are held

11 months agounits: Draw calls are not done outside of the state machine
Lukas Krickl [Thu, 22 May 2025 03:25:27 +0000 (05:25 +0200)]
units: Draw calls are not done outside of the state machine

This allows drawing to continue even if the unit state is awaiting
an idle state.
It also allows states to be shared between units more easily.

11 months agounit: implemented a temporary fix for unit redrawing failing
Lukas Krickl [Wed, 21 May 2025 16:23:22 +0000 (18:23 +0200)]
unit: implemented a temporary fix for unit redrawing failing

This fix currently pauses all obj updates while a unit is moving.
This is not a great solution and will need to be addressed properly
later.

State machine transitions are causing unit redraws to not happen.
Maybe a proper solution would be to have a few sprites for units in
motion that are not affected by the regular unit updates.

11 months agounit: working on fixing sprite flickering when moving
Lukas Krickl [Wed, 21 May 2025 15:58:02 +0000 (17:58 +0200)]
unit: working on fixing sprite flickering when moving

11 months agounit: Fixed unit switching interrupting the last move
Lukas Krickl [Wed, 21 May 2025 03:41:26 +0000 (05:41 +0200)]
unit: Fixed unit switching interrupting the last move

Unit switching is now requrested by the idle state

11 months agounit: made unit switching more user friendly
Lukas Krickl [Tue, 20 May 2025 16:32:01 +0000 (18:32 +0200)]
unit: made unit switching more user friendly

This change simply delays the switch for a few frames

11 months agounit: unit swapping now seems to work correctly
Lukas Krickl [Tue, 20 May 2025 16:10:37 +0000 (18:10 +0200)]
unit: unit swapping now seems to work correctly

Unit moves were not being reset correctly

11 months agounit: improved unit switching
Lukas Krickl [Tue, 20 May 2025 16:03:11 +0000 (18:03 +0200)]
unit: improved unit switching

Unit switching now forces the current unti to sleep and the new unit to
wake up.

Unit switching now is controlled by a flag and done in the gameplay
update loop.

11 months agounit: units now mark the correct unit as active
Lukas Krickl [Tue, 20 May 2025 13:16:27 +0000 (15:16 +0200)]
unit: units now mark the correct unit as active

11 months agowip: unit switching bugfixing
Lukas Krickl [Tue, 20 May 2025 12:53:22 +0000 (14:53 +0200)]
wip: unit switching bugfixing

The switching code is still broken, but now at least the correct init
value and actor ptr are stored by the end :^)

11 months agounit: wip unit selector
Lukas Krickl [Tue, 20 May 2025 03:57:52 +0000 (05:57 +0200)]
unit: wip unit selector

11 months agounit: wip unit switching
Lukas Krickl [Mon, 19 May 2025 16:09:26 +0000 (18:09 +0200)]
unit: wip unit switching

This still has very broken side effects.

Unit switching breaks the camera and the active actor.
The second actor should be switched to but it is not moving at all.

11 months agounit: Added move reset function
Lukas Krickl [Sun, 18 May 2025 18:29:55 +0000 (20:29 +0200)]
unit: Added move reset function

11 months agounit: added retry code for next unit selector
Lukas Krickl [Sun, 18 May 2025 08:49:59 +0000 (10:49 +0200)]
unit: added retry code for next unit selector

11 months agounit: wip actor switching
Lukas Krickl [Sun, 18 May 2025 05:33:37 +0000 (07:33 +0200)]
unit: wip actor switching

11 months agounit: wip for unit switching
Lukas Krickl [Sun, 18 May 2025 04:31:02 +0000 (06:31 +0200)]
unit: wip for unit switching

11 months agounit: Added ui redraw when using moves
Lukas Krickl [Wed, 14 May 2025 16:34:08 +0000 (18:34 +0200)]
unit: Added ui redraw when using moves

11 months agoui: Added used moves indicator to UI
Lukas Krickl [Wed, 14 May 2025 15:27:00 +0000 (17:27 +0200)]
ui: Added used moves indicator to UI

11 months agoui: Added basic ui element for remaining moves
Lukas Krickl [Tue, 13 May 2025 18:09:40 +0000 (20:09 +0200)]
ui: Added basic ui element for remaining moves

11 months agounit: wip unit switching
Lukas Krickl [Tue, 13 May 2025 03:41:35 +0000 (05:41 +0200)]
unit: wip unit switching

11 months agounit: Added camera scroll code
Lukas Krickl [Mon, 12 May 2025 19:47:51 +0000 (21:47 +0200)]
unit: Added camera scroll code

11 months agounit: camera now ceners on selected unit
Lukas Krickl [Mon, 12 May 2025 16:31:18 +0000 (18:31 +0200)]
unit: camera now ceners on selected unit

11 months agounit: Added unit scroll update
Lukas Krickl [Mon, 12 May 2025 15:41:45 +0000 (17:41 +0200)]
unit: Added unit scroll update