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

7 weeks agoroom patterns: Added header to pattern struct
Lukas Krickl [Thu, 24 Jul 2025 20:48:45 +0000 (22:48 +0200)]
room patterns: Added header to pattern struct

7 weeks agorooms: Added room pattern definitions
Lukas Krickl [Thu, 24 Jul 2025 20:41:27 +0000 (22:41 +0200)]
rooms: Added room pattern definitions

7 weeks agomapgen: Added setup for room patterns
Lukas Krickl [Thu, 24 Jul 2025 16:15:35 +0000 (18:15 +0200)]
mapgen: Added setup for room patterns

7 weeks agostats: Added note about magic res
Lukas Krickl [Wed, 23 Jul 2025 07:05:29 +0000 (09:05 +0200)]
stats: Added note about magic res

7 weeks agomaps: Added names to all maps
Lukas Krickl [Tue, 22 Jul 2025 18:59:55 +0000 (20:59 +0200)]
maps: Added names to all maps

7 weeks agomaps: set up exit tables
Lukas Krickl [Tue, 22 Jul 2025 18:31:08 +0000 (20:31 +0200)]
maps: set up exit tables

7 weeks agomaps: wip new maps
Lukas Krickl [Tue, 22 Jul 2025 13:12:02 +0000 (15:12 +0200)]
maps: wip new maps

7 weeks agomaps: Added left, right, up, down flags to mapgen
Lukas Krickl [Tue, 22 Jul 2025 10:58:49 +0000 (12:58 +0200)]
maps: Added left, right, up, down flags to mapgen

This allows setting up exits for an entire corner of the map easily.
Set up exit tables for the _c map for now.

7 weeks agomaps: wip setup for mapgen maps
Lukas Krickl [Tue, 22 Jul 2025 07:55:23 +0000 (09:55 +0200)]
maps: wip setup for mapgen maps

7 weeks agomapgen: Added notes about seed input
Lukas Krickl [Mon, 21 Jul 2025 16:42:49 +0000 (18:42 +0200)]
mapgen: Added notes about seed input

8 weeks agoTODO: added nots for spells and equipment
Lukas Krickl [Mon, 21 Jul 2025 07:20:31 +0000 (09:20 +0200)]
TODO: added nots for spells and equipment

8 weeks agoactors: reworked actor table
Lukas Krickl [Sun, 20 Jul 2025 15:54:18 +0000 (17:54 +0200)]
actors: reworked actor table

This change was made to make general actors more slim.
Actors do not need equipment and inventory slots.
Instead general actors now have a runtime spot for loot table
information.
Only the player has a special memory space for inventory/equipment data
now.

8 weeks agogame speed: speed is now based on a global setting
Lukas Krickl [Sun, 20 Jul 2025 06:30:44 +0000 (08:30 +0200)]
game speed: speed is now based on a global setting

This means all tile moves are the same speed for both player and
enemies. The AI script will determine when to move for enemies later on.
This will allow choosing between a more real time and a more tactical
gameplay style.

8 weeks agomaps: Added additional template maps
Lukas Krickl [Sun, 20 Jul 2025 03:23:36 +0000 (05:23 +0200)]
maps: Added additional template maps

8 weeks agomaps: renamed maps to indicate their direction.
Lukas Krickl [Sat, 19 Jul 2025 15:03:42 +0000 (17:03 +0200)]
maps: renamed maps to indicate their direction.

This is because maps will just serve as a template for room placement
soon.

8 weeks agomapgen: added stub for room generator
Lukas Krickl [Sat, 19 Jul 2025 13:54:07 +0000 (15:54 +0200)]
mapgen: added stub for room generator

8 weeks agoAdded more mapgen notes
Lukas Krickl [Sat, 19 Jul 2025 07:14:36 +0000 (09:14 +0200)]
Added more mapgen notes

8 weeks agoAdded note about room placement
Lukas Krickl [Sat, 19 Jul 2025 05:45:39 +0000 (07:45 +0200)]
Added note about room placement

8 weeks agoAdded notes about mapgen
Lukas Krickl [Sat, 19 Jul 2025 05:40:06 +0000 (07:40 +0200)]
Added notes about mapgen

8 weeks agoAdded todo note
Lukas Krickl [Sat, 19 Jul 2025 05:12:36 +0000 (07:12 +0200)]
Added todo note

8 weeks agoTODO: added todo note
Lukas Krickl [Sat, 19 Jul 2025 05:10:16 +0000 (07:10 +0200)]
TODO: added todo note

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.