gbrg/.git
3 weeks agodoors: doors are not covered anymore
Lukas Krickl [Thu, 21 Aug 2025 06:58:34 +0000 (08:58 +0200)]
doors: doors are not covered anymore

3 weeks agoexits: removed rerferences to existing exit tables
Lukas Krickl [Thu, 21 Aug 2025 06:56:35 +0000 (08:56 +0200)]
exits: removed rerferences to existing exit tables

This is the first step for the exti system rework.

3 weeks agomapgen: refactored map loader
Lukas Krickl [Thu, 21 Aug 2025 03:58:30 +0000 (05:58 +0200)]
mapgen: refactored map loader

3 weeks agomapgen: wip rework of mapgen
Lukas Krickl [Wed, 20 Aug 2025 21:49:14 +0000 (23:49 +0200)]
mapgen: wip rework of mapgen

3 weeks agoAdded notes for map rework
Lukas Krickl [Wed, 20 Aug 2025 21:35:51 +0000 (23:35 +0200)]
Added notes for map rework

3 weeks agomap: removed seed index
Lukas Krickl [Wed, 20 Aug 2025 03:24:44 +0000 (05:24 +0200)]
map: removed seed index

3 weeks agomapgen: Added door drawing routine
Lukas Krickl [Tue, 19 Aug 2025 16:24:03 +0000 (18:24 +0200)]
mapgen: Added door drawing routine

This is the first step to making a better map generator.

Doors are now placed based on a door exit list for each possible room in a floor.

3 weeks agomaps: wip reworking map system
Lukas Krickl [Tue, 19 Aug 2025 14:50:53 +0000 (16:50 +0200)]
maps: wip reworking map system

3 weeks agoTODO: Added note about mapgen rework
Lukas Krickl [Tue, 19 Aug 2025 14:20:49 +0000 (16:20 +0200)]
TODO: Added note about mapgen rework

4 weeks agoaction: Added tile offset to attack action
Lukas Krickl [Mon, 18 Aug 2025 03:28:22 +0000 (05:28 +0200)]
action: Added tile offset to attack action

4 weeks agoattack: wip added attack animation
Lukas Krickl [Sun, 17 Aug 2025 15:51:17 +0000 (17:51 +0200)]
attack: wip added attack animation

The location is still wrong but the basic idea is there :^)

4 weeks agoaction: Added delay to active after picking an attack direction
Lukas Krickl [Sun, 17 Aug 2025 12:54:42 +0000 (14:54 +0200)]
action: Added delay to active after picking an attack direction

4 weeks agoactions: Added setup for picking directions
Lukas Krickl [Sun, 17 Aug 2025 04:09:15 +0000 (06:09 +0200)]
actions: Added setup for picking directions

4 weeks agoaction: Added ability to abort attack command
Lukas Krickl [Sat, 16 Aug 2025 16:02:49 +0000 (18:02 +0200)]
action: Added ability to abort attack command

4 weeks agoattack: Added direction UI setup.
Lukas Krickl [Sat, 16 Aug 2025 06:20:58 +0000 (08:20 +0200)]
attack: Added direction UI setup.

4 weeks agounit: Added basic stub for handling assinged actions on A or B
Lukas Krickl [Sat, 16 Aug 2025 04:17:34 +0000 (06:17 +0200)]
unit: Added basic stub for handling assinged actions on A or B

4 weeks agoTODO: Added note for menu and actions
Lukas Krickl [Fri, 15 Aug 2025 17:14:12 +0000 (19:14 +0200)]
TODO: Added note for menu and actions

4 weeks agounit: removed dedicated attack state.
Lukas Krickl [Fri, 15 Aug 2025 16:52:21 +0000 (18:52 +0200)]
unit: removed dedicated attack state.

Units now only have an active and idle state they can switch to

4 weeks agoplayer: Added player turn taken flag
Lukas Krickl [Fri, 15 Aug 2025 07:42:04 +0000 (09:42 +0200)]
player: Added player turn taken flag

This flag delays all other units from moving until the player has made
a choice.

4 weeks agounit: Added stubs for attack state
Lukas Krickl [Fri, 15 Aug 2025 07:08:23 +0000 (09:08 +0200)]
unit: Added stubs for attack state

4 weeks agodefs: Added additional note for battle order
Lukas Krickl [Fri, 15 Aug 2025 05:07:13 +0000 (07:07 +0200)]
defs: Added additional note for battle order

4 weeks agodefs: Added battle order to actors
Lukas Krickl [Fri, 15 Aug 2025 05:05:54 +0000 (07:05 +0200)]
defs: Added battle order to actors

4 weeks agobattle: Added notes about unit state switching
Lukas Krickl [Fri, 15 Aug 2025 04:53:24 +0000 (06:53 +0200)]
battle: Added notes about unit state switching

4 weeks agounit: Added unit fine at
Lukas Krickl [Fri, 15 Aug 2025 04:20:50 +0000 (06:20 +0200)]
unit: Added unit fine at

4 weeks agounit: Added stub for unit find at
Lukas Krickl [Thu, 14 Aug 2025 04:54:01 +0000 (06:54 +0200)]
unit: Added stub for unit find at

4 weeks agodefs: Added battle record struct
Lukas Krickl [Wed, 13 Aug 2025 16:23:10 +0000 (18:23 +0200)]
defs: Added battle record struct

4 weeks agobattle: Added stub for battle mode
Lukas Krickl [Wed, 13 Aug 2025 16:21:12 +0000 (18:21 +0200)]
battle: Added stub for battle mode

4 weeks agoobjanim: Added left and right door opening animations
Lukas Krickl [Wed, 13 Aug 2025 15:02:11 +0000 (17:02 +0200)]
objanim: Added left and right door opening animations

4 weeks agoroompattern: fixed constant names for left and right door...
Lukas Krickl [Tue, 12 Aug 2025 20:46:11 +0000 (22:46 +0200)]
roompattern: fixed constant names for left and right door...

4 weeks agoobjanim: removed infinite animation loop for left door
Lukas Krickl [Tue, 12 Aug 2025 20:44:20 +0000 (22:44 +0200)]
objanim: removed infinite animation loop for left door

4 weeks agoobjanim: wip left and right door animation
Lukas Krickl [Tue, 12 Aug 2025 20:43:34 +0000 (22:43 +0200)]
objanim: wip left and right  door animation

This will require special handling to actually make the animations work

4 weeks agoobjanim: Added top door animation
Lukas Krickl [Tue, 12 Aug 2025 19:16:23 +0000 (21:16 +0200)]
objanim: Added top door animation

4 weeks agoobjanim: Added framework for makign door animations more generic
Lukas Krickl [Tue, 12 Aug 2025 18:36:57 +0000 (20:36 +0200)]
objanim: Added framework for makign door animations more generic

4 weeks agoobjanim: Added simple animation for down door opening.
Lukas Krickl [Tue, 12 Aug 2025 16:23:20 +0000 (18:23 +0200)]
objanim: Added simple animation for down door opening.

This now just needs to be made more generic for the other directions.

4 weeks agoobjanim: renamed door open animation to allow room for more animations in different...
Lukas Krickl [Tue, 12 Aug 2025 15:14:05 +0000 (17:14 +0200)]
objanim: renamed door open animation to allow room for more animations in different directions

4 weeks agodoor opening: Fixed animation getting stuck.
Lukas Krickl [Mon, 11 Aug 2025 18:29:48 +0000 (20:29 +0200)]
door opening: Fixed animation getting stuck.

This was caused because the cf flag was never cleared if the player did not move.

4 weeks agocollision: moved last cf flags y and x position for collision to actor
Lukas Krickl [Mon, 11 Aug 2025 16:50:34 +0000 (18:50 +0200)]
collision: moved last cf flags y and x position for collision to actor

4 weeks agodefs: fixed player rt macros
Lukas Krickl [Mon, 11 Aug 2025 15:54:38 +0000 (17:54 +0200)]
defs: fixed player rt macros

4 weeks agodefs: Added actor last collision values
Lukas Krickl [Mon, 11 Aug 2025 15:52:08 +0000 (17:52 +0200)]
defs: Added actor last collision values

4 weeks agoAdded known bug
Lukas Krickl [Mon, 11 Aug 2025 15:48:26 +0000 (17:48 +0200)]
Added known bug

4 weeks agodoors: doors now have collision.
Lukas Krickl [Mon, 11 Aug 2025 15:44:56 +0000 (17:44 +0200)]
doors: doors now have collision.

The door animation now only plays when the player touches a door.
This made the code a lot simpler to deal with overall.

5 weeks agounit collision test: writes y and x positon to wram as a return value
Lukas Krickl [Sun, 10 Aug 2025 19:34:08 +0000 (21:34 +0200)]
unit collision test: writes y and x positon to wram as a return value

5 weeks agounit: try move now writes the tile flags if collision occured
Lukas Krickl [Sun, 10 Aug 2025 14:32:36 +0000 (16:32 +0200)]
unit: try move now writes the tile flags if collision occured

5 weeks agoplayer: disabled rendering while door animation is playing
Lukas Krickl [Sun, 10 Aug 2025 09:24:25 +0000 (11:24 +0200)]
player: disabled rendering while door animation is playing

5 weeks agoplayer: skipping input on the frame a door animation is triggered
Lukas Krickl [Sun, 10 Aug 2025 07:33:09 +0000 (09:33 +0200)]
player: skipping input on the frame a door animation is triggered

5 weeks agoobjanim: the animation now overwrites player rt special flags
Lukas Krickl [Sun, 10 Aug 2025 06:47:07 +0000 (08:47 +0200)]
objanim: the animation now overwrites player rt special flags

This makes it so the room is only uncovered when the animation finishes.

5 weeks agogameplay: the game now pauses while the door opening animation is playing.
Lukas Krickl [Sun, 10 Aug 2025 06:28:22 +0000 (08:28 +0200)]
gameplay: the game now pauses while the door opening animation is playing.

For this a new special flag to pause update was added.
This pause needs to be handeled in update routines.
This is done to keep rendering some objects while not processing gameplay code.

5 weeks agovblank: Added way to overwrite vblank handler at runtime
Lukas Krickl [Sun, 10 Aug 2025 06:17:24 +0000 (08:17 +0200)]
vblank: Added way to overwrite vblank handler at runtime

This is done by having 4 bytes of self modifying code in wram.
It offers enough space for a call and a reti instruction.
Currently it is simply hard-set to the default handler, but if a custom handler is ever needed
it can be put there.

5 weeks agoroompatterns: Defined door tiles as constants
Lukas Krickl [Sat, 9 Aug 2025 18:58:55 +0000 (20:58 +0200)]
roompatterns: Defined door tiles as constants

5 weeks agoobjanim: Fixed door tile
Lukas Krickl [Sat, 9 Aug 2025 04:19:56 +0000 (06:19 +0200)]
objanim: Fixed door tile

5 weeks agoobjanim: Added door tile animation
Lukas Krickl [Sat, 9 Aug 2025 04:18:53 +0000 (06:18 +0200)]
objanim: Added door tile animation

This still needs to be adjusted correctly.

5 weeks agounit: moved tile to screen to a macro
Lukas Krickl [Sat, 9 Aug 2025 03:44:38 +0000 (05:44 +0200)]
unit: moved tile to screen to a macro

5 weeks agoobjanim: Added placeholder animation for when a door opens.
Lukas Krickl [Fri, 8 Aug 2025 15:21:10 +0000 (17:21 +0200)]
objanim: Added placeholder animation for when a door opens.

This serves as a proof of concept for obj animations.
Soon there should be proper opening sprites for doors in all directions.

5 weeks agoobjanim: Added setup code for object animations
Lukas Krickl [Fri, 8 Aug 2025 13:10:27 +0000 (15:10 +0200)]
objanim: Added setup code for object animations

5 weeks agoAdded TODO
Lukas Krickl [Fri, 8 Aug 2025 08:29:04 +0000 (10:29 +0200)]
Added TODO

5 weeks agoobject animation: added stub for object animations
Lukas Krickl [Fri, 8 Aug 2025 04:38:09 +0000 (06:38 +0200)]
object animation: added stub for object animations

This system will allow playing simple animations e.g. when a door opens.

5 weeks agoplayers: Moved redraw into a more generic routine
Lukas Krickl [Thu, 7 Aug 2025 20:15:18 +0000 (22:15 +0200)]
players: Moved redraw into a more generic routine

5 weeks agoAdded TODO
Lukas Krickl [Thu, 7 Aug 2025 16:34:51 +0000 (18:34 +0200)]
Added TODO

5 weeks agomap: Added partial room redrawn when the player touches a door.
Lukas Krickl [Thu, 7 Aug 2025 16:28:36 +0000 (18:28 +0200)]
map: Added partial room redrawn when the player touches a door.

Fixed room redraw request offset calculation

5 weeks agoplayer: Added stub for door removal when the player enters it
Lukas Krickl [Wed, 6 Aug 2025 11:14:03 +0000 (13:14 +0200)]
player: Added stub for door removal when the player enters it

5 weeks agomapgen: reduced amount of spawned actors
Lukas Krickl [Tue, 5 Aug 2025 19:54:04 +0000 (21:54 +0200)]
mapgen: reduced amount of spawned actors

5 weeks agounit: Added basic chaser cpu script
Lukas Krickl [Tue, 5 Aug 2025 18:21:45 +0000 (20:21 +0200)]
unit: Added basic chaser cpu script

5 weeks agochore: added new math helper function to get an absolute distance btween 2 numbers
Lukas Krickl [Tue, 5 Aug 2025 16:26:09 +0000 (18:26 +0200)]
chore: added new math helper function to get an absolute distance btween 2 numbers

5 weeks agounit: moved unit cpu code to new file for generic cpu scripts
Lukas Krickl [Tue, 5 Aug 2025 10:09:39 +0000 (12:09 +0200)]
unit: moved unit cpu code to new file for generic cpu scripts

5 weeks agoUpdated TODO
Lukas Krickl [Tue, 5 Aug 2025 07:55:15 +0000 (09:55 +0200)]
Updated TODO

6 weeks agoactsave: Added basic actor saving mechanism
Lukas Krickl [Sun, 3 Aug 2025 16:38:46 +0000 (18:38 +0200)]
actsave: Added basic actor saving mechanism

This code simply stores a few select properties of all actors into a temporary table.

6 weeks agoactsave: Added setup for loading and storing actor restore data
Lukas Krickl [Sat, 2 Aug 2025 16:18:23 +0000 (18:18 +0200)]
actsave: Added setup for loading and storing actor restore data

6 weeks agomap: added separate call for clearing act_sg
Lukas Krickl [Sat, 2 Aug 2025 10:20:17 +0000 (12:20 +0200)]
map: added separate call for clearing act_sg

6 weeks agoactor saving: Added stubs for actor savegame calls
Lukas Krickl [Sat, 2 Aug 2025 10:05:37 +0000 (12:05 +0200)]
actor saving: Added stubs for actor savegame calls

6 weeks agodefs: Added actor savegame typedef
Lukas Krickl [Sat, 2 Aug 2025 04:46:09 +0000 (06:46 +0200)]
defs: Added actor savegame typedef

6 weeks agomapgen: Fixed type in rotuine name
Lukas Krickl [Fri, 1 Aug 2025 17:02:00 +0000 (19:02 +0200)]
mapgen: Fixed type in rotuine name

6 weeks agomapgen: actors are now spawned based on the current floor instead of the map header
Lukas Krickl [Fri, 1 Aug 2025 15:58:10 +0000 (17:58 +0200)]
mapgen: actors are now spawned based on the current floor instead of the map header

6 weeks agomapgen: Added check for units spawning in walls and randomized units that are spawned
Lukas Krickl [Fri, 1 Aug 2025 15:54:40 +0000 (17:54 +0200)]
mapgen: Added check for units spawning in walls and randomized units that are spawned

6 weeks agomapgen: actor type and positions are now randomly selected
Lukas Krickl [Fri, 1 Aug 2025 15:13:18 +0000 (17:13 +0200)]
mapgen: actor type and positions are now randomly selected

This is done by selecting a random actor form the map's actor table.
Currently psotions can be anywhere including walls. This will need to be fixed later :^)

6 weeks agomapgen: Added stub for placing random actors on a new map
Lukas Krickl [Thu, 31 Jul 2025 19:49:43 +0000 (21:49 +0200)]
mapgen: Added stub for placing random actors on a new map

6 weeks agotiles: made floor tiles dark when indoors
Lukas Krickl [Thu, 31 Jul 2025 18:10:12 +0000 (20:10 +0200)]
tiles: made floor tiles dark when indoors

6 weeks agounits: Added prio bit to priest unit...
Lukas Krickl [Thu, 31 Jul 2025 17:05:58 +0000 (19:05 +0200)]
units: Added prio bit to priest unit...

6 weeks agounit rendering: units are now hidden if they are inside a room
Lukas Krickl [Thu, 31 Jul 2025 17:00:56 +0000 (19:00 +0200)]
unit rendering: units are now hidden if they are inside a room

This is done by simply swapping the bg tilemap to a tile when the player is
not indoors. The BG priority bit is also set for all unit objects.

6 weeks agoplayer: Added special flag that indicates if a player is inside a covered area (e...
Lukas Krickl [Thu, 31 Jul 2025 12:15:13 +0000 (14:15 +0200)]
player: Added special flag that indicates if a player is inside a covered area (e.g. inside a room)

6 weeks agomap: Added new flag for covered tile
Lukas Krickl [Wed, 30 Jul 2025 15:18:41 +0000 (17:18 +0200)]
map: Added new flag for covered tile

6 weeks agoroompattern: replaced floors with roof pattern tiles
Lukas Krickl [Wed, 30 Jul 2025 14:00:13 +0000 (16:00 +0200)]
roompattern: replaced floors with roof pattern tiles

6 weeks agomapgen: Fixed collision flags not being set when overwriting door patterns
Lukas Krickl [Wed, 30 Jul 2025 04:30:26 +0000 (06:30 +0200)]
mapgen: Fixed collision flags not being set when overwriting door patterns

6 weeks agomapgen: added door fixup for all directions
Lukas Krickl [Tue, 29 Jul 2025 20:54:44 +0000 (22:54 +0200)]
mapgen: added door fixup for all directions

Doors still do not get collision from this, but eventually closed doors *will* have collision anyway.

6 weeks agomapgen: moved tile checker logic to a macro
Lukas Krickl [Tue, 29 Jul 2025 17:15:29 +0000 (19:15 +0200)]
mapgen: moved tile checker logic to a macro

6 weeks agomapgen: added fix for left doors
Lukas Krickl [Tue, 29 Jul 2025 15:51:19 +0000 (17:51 +0200)]
mapgen: added fix for left doors

This fix prevents doors from being generated
next to walls

6 weeks agoAdded TODO note
Lukas Krickl [Tue, 29 Jul 2025 15:00:01 +0000 (17:00 +0200)]
Added TODO note

6 weeks agochore: Added note about mapgen trying to avoid doors next to walls
Lukas Krickl [Tue, 29 Jul 2025 03:53:02 +0000 (05:53 +0200)]
chore: Added note about mapgen trying to avoid doors next to walls

7 weeks agomaps: fxied bottom east exit table. updated tiles
Lukas Krickl [Sun, 27 Jul 2025 07:29:31 +0000 (09:29 +0200)]
maps: fxied bottom east exit table. updated tiles

7 weeks agoroom patterns: Added room pattern generation for special patterns
Lukas Krickl [Sun, 27 Jul 2025 06:33:52 +0000 (08:33 +0200)]
room patterns: Added room pattern generation for special patterns

Mainmenu now ticks rng every frame to ensure randomness when pressing
new game.

7 weeks agoroompatterns: Added new patterns and fixed tile mapping
Lukas Krickl [Sat, 26 Jul 2025 17:01:22 +0000 (19:01 +0200)]
roompatterns: Added new patterns and fixed tile mapping

7 weeks agomapgen: Added room pattern placement for all 4 basic corners of the map
Lukas Krickl [Sat, 26 Jul 2025 15:28:09 +0000 (17:28 +0200)]
mapgen: Added room pattern placement for all 4 basic corners of the map

Currently there are only 2 room patterns but the basic idea works
correctly ;)

7 weeks agoroomgen: wip room generation
Lukas Krickl [Sat, 26 Jul 2025 12:37:12 +0000 (14:37 +0200)]
roomgen: wip room generation

This is currently rather broken and corrupts the map :^)

7 weeks agomapgen: wip room patter drawing
Lukas Krickl [Sat, 26 Jul 2025 05:22:33 +0000 (07:22 +0200)]
mapgen: wip room patter drawing

7 weeks agoseeds: pressing new play now generates a new seed set
Lukas Krickl [Fri, 25 Jul 2025 16:06:42 +0000 (18:06 +0200)]
seeds: pressing new play now generates a new seed set

Added seed index to every map

7 weeks agobanking: Fixed accidental write to ram area causing rom size to be out
Lukas Krickl [Fri, 25 Jul 2025 14:43:53 +0000 (16:43 +0200)]
banking: Fixed accidental write to ram area causing rom size to be out
of alignment

7 weeks agochore: fixed map header size def
Lukas Krickl [Fri, 25 Jul 2025 14:39:23 +0000 (16:39 +0200)]
chore: fixed map header size def

7 weeks agobanking: Fixed banking
Lukas Krickl [Fri, 25 Jul 2025 14:37:56 +0000 (16:37 +0200)]
banking: Fixed banking

7 weeks agomapgen: Added seed index to maps
Lukas Krickl [Fri, 25 Jul 2025 13:23:13 +0000 (15:23 +0200)]
mapgen: Added seed index to maps

7 weeks agomapgen: updated mapgen docs
Lukas Krickl [Fri, 25 Jul 2025 07:40:52 +0000 (09:40 +0200)]
mapgen: updated mapgen docs

7 weeks agoroom patterns: Added stub for room pattern draw
Lukas Krickl [Fri, 25 Jul 2025 05:08:11 +0000 (07:08 +0200)]
room patterns: Added stub for room pattern draw