gbrg/.git
5 months agomake: Removed verbose setting from build flags
Lukas Krickl [Thu, 2 Jan 2025 18:56:24 +0000 (19:56 +0100)]
make: Removed verbose setting from build flags

5 months agomap: Refactored actor table in base maps
Lukas Krickl [Thu, 2 Jan 2025 14:52:04 +0000 (15:52 +0100)]
map: Refactored actor table in base maps

Base maps now always include the entire actor table to make the copy
operatin easier and more clear.
This now allows us to save the actor table back.
The initial copy is now also easier :^)

5 months agomap: WIP actor table saving
Lukas Krickl [Thu, 2 Jan 2025 14:34:40 +0000 (15:34 +0100)]
map: WIP actor table saving

5 months agomap: Added randomness to room linking to make sure all linking cases
Lukas Krickl [Thu, 2 Jan 2025 14:15:31 +0000 (15:15 +0100)]
map: Added randomness to room linking to make sure all linking cases
work

5 months agomap: Rooms now dynamically add doors
Lukas Krickl [Thu, 2 Jan 2025 12:19:14 +0000 (13:19 +0100)]
map: Rooms now dynamically add doors

This is done by writing the flags and tiles when linking.
Also added a memcpy that will skip copying if the value is not zero.

5 months agomap: rooms are now generate in a basic recursive manner
Lukas Krickl [Wed, 1 Jan 2025 15:47:12 +0000 (16:47 +0100)]
map: rooms are now generate in a basic recursive manner

Rooms can generate until a pre-set max is reached
They alwys link north-south for now.

5 months agomap: room linking is now generic
Lukas Krickl [Wed, 1 Jan 2025 11:14:10 +0000 (12:14 +0100)]
map: room linking is now generic

5 months agomap: added rotuine to link two rooms to each other
Lukas Krickl [Wed, 1 Jan 2025 10:25:20 +0000 (11:25 +0100)]
map: added rotuine to link two rooms to each other

5 months agomap: Added reverse look-up-table for directions
Lukas Krickl [Wed, 1 Jan 2025 09:30:10 +0000 (10:30 +0100)]
map: Added reverse look-up-table for directions

5 months agomap: Removed clearing code for exits since they should be zeroed anyway
Lukas Krickl [Wed, 1 Jan 2025 09:20:30 +0000 (10:20 +0100)]
map: Removed clearing code for exits since they should be zeroed anyway

5 months agoLICENSE: Updated year to 2025
Lukas Krickl [Wed, 1 Jan 2025 04:20:49 +0000 (05:20 +0100)]
LICENSE: Updated year to 2025

5 months agopreproc: Added DEBUG guard around map load panic
Lukas Krickl [Tue, 31 Dec 2024 18:45:48 +0000 (19:45 +0100)]
preproc: Added DEBUG guard around map load panic

6 months agomap: Added proof of concept for linking rooms in ram
Lukas Krickl [Tue, 31 Dec 2024 16:19:21 +0000 (17:19 +0100)]
map: Added proof of concept for linking rooms in ram

6 months agomap: Added basic panic handler that is called when the map ptr is NULL
Lukas Krickl [Tue, 31 Dec 2024 15:35:49 +0000 (16:35 +0100)]
map: Added basic panic handler that is called when the map ptr is NULL

6 months agomap: Added base room copy routine
Lukas Krickl [Tue, 31 Dec 2024 10:51:42 +0000 (11:51 +0100)]
map: Added base room copy routine

6 months agoMoved stack to end of DXXX wram bank
Lukas Krickl [Tue, 31 Dec 2024 07:26:23 +0000 (08:26 +0100)]
Moved stack to end of DXXX wram bank

6 months agomap: maps now set the correct tile ptr for a newly generate map
Lukas Krickl [Tue, 31 Dec 2024 07:07:02 +0000 (08:07 +0100)]
map: maps now set the correct tile ptr for a newly generate map

6 months agomap: wip map copy
Lukas Krickl [Mon, 30 Dec 2024 18:38:55 +0000 (19:38 +0100)]
map: wip map copy

6 months agomap: Added basic structure and docs for mapgen
Lukas Krickl [Mon, 30 Dec 2024 14:16:29 +0000 (15:16 +0100)]
map: Added basic structure and docs for mapgen

This implementation is not yet functional, but the basic idea is taking
shape :^)

6 months agoAdded floor usae to map_gen docs
Lukas Krickl [Mon, 30 Dec 2024 07:28:04 +0000 (08:28 +0100)]
Added floor usae to map_gen docs

6 months agoAdded wram defs
Lukas Krickl [Mon, 30 Dec 2024 07:27:05 +0000 (08:27 +0100)]
Added wram defs

6 months agoRenamed room_struct to room_header
Lukas Krickl [Sun, 29 Dec 2024 10:41:31 +0000 (11:41 +0100)]
Renamed room_struct to room_header

6 months agoWIP: Added placeholders for map generator
Lukas Krickl [Sat, 28 Dec 2024 09:14:56 +0000 (10:14 +0100)]
WIP: Added placeholders for map generator

6 months agohram: Added hram section
Lukas Krickl [Sat, 28 Dec 2024 07:12:57 +0000 (08:12 +0100)]
hram: Added hram section

6 months agomap: Added map ram section
Lukas Krickl [Sat, 28 Dec 2024 07:10:59 +0000 (08:10 +0100)]
map: Added map ram section

The map ram section is used to store the current map.
This is a distinct section from the save ram. It should take up a 4KB
bank in WRAM (D000)

6 months agoAdded future refactoring idea for actor tables to TODO
Lukas Krickl [Fri, 27 Dec 2024 15:15:20 +0000 (16:15 +0100)]
Added future refactoring idea for actor tables to TODO

6 months agomap: renamed curr_room_init_actors to curr_room_actor_table
Lukas Krickl [Fri, 27 Dec 2024 15:13:36 +0000 (16:13 +0100)]
map: renamed curr_room_init_actors to curr_room_actor_table

6 months agoAdded version to save game
Lukas Krickl [Fri, 27 Dec 2024 10:24:08 +0000 (11:24 +0100)]
Added version to save game

6 months agoAdded version to save game
Lukas Krickl [Fri, 27 Dec 2024 10:23:41 +0000 (11:23 +0100)]
Added version to save game

6 months agoAdded room body struct
Lukas Krickl [Fri, 27 Dec 2024 09:42:04 +0000 (10:42 +0100)]
Added room body struct

6 months agoAdded docs for save game
Lukas Krickl [Fri, 27 Dec 2024 09:27:38 +0000 (10:27 +0100)]
Added docs for save game

6 months agoAdded struct for save game
Lukas Krickl [Fri, 27 Dec 2024 09:23:31 +0000 (10:23 +0100)]
Added struct for save game

6 months agoAdded better docs for savegame storage
Lukas Krickl [Fri, 27 Dec 2024 09:16:47 +0000 (10:16 +0100)]
Added better docs for savegame storage

6 months agoUpdated tileset player tiles
Lukas Krickl [Thu, 26 Dec 2024 09:26:24 +0000 (10:26 +0100)]
Updated tileset player tiles

6 months agoAdded a few constants for save game size
Lukas Krickl [Thu, 26 Dec 2024 07:40:32 +0000 (08:40 +0100)]
Added a few constants for save game size

6 months agoMade vram access more secure when loading maps.
Lukas Krickl [Tue, 24 Dec 2024 13:10:23 +0000 (14:10 +0100)]
Made vram access more secure when loading maps.

A row is now guaranteed to wait for the *next* vblank
before proceeding to draw.

Additionall we are now disabling objects when drawing a new room.

6 months agoAdded new test room.
Lukas Krickl [Tue, 24 Dec 2024 11:29:42 +0000 (12:29 +0100)]
Added new test room.

Also fixed a bug that caused the A value to be destroyed
in room_goto. This caused it to always use the special exit value.

6 months agoAdded optional vblank wait to room row draw
Lukas Krickl [Tue, 24 Dec 2024 10:56:29 +0000 (11:56 +0100)]
Added optional vblank wait to room row draw

This allows us to load a room without turning off the screen :^)

6 months agoFixed crash during room transitions
Lukas Krickl [Tue, 24 Dec 2024 07:18:34 +0000 (08:18 +0100)]
Fixed crash during room transitions

This was caused by a bad pointer being passed to load_room_from.

6 months agoWIP: room loading
Lukas Krickl [Tue, 24 Dec 2024 06:49:52 +0000 (07:49 +0100)]
WIP: room loading

It now crashes whenever a transition happens.

6 months agoAdded a few bug notes
Lukas Krickl [Tue, 24 Dec 2024 05:17:36 +0000 (06:17 +0100)]
Added a few bug notes

6 months agoRoom loading now disables lcd to draw new room.
Lukas Krickl [Mon, 23 Dec 2024 16:30:05 +0000 (17:30 +0100)]
Room loading now disables lcd to draw new room.

This should eventually become a smooth transition

6 months agoWIP: room loader
Lukas Krickl [Mon, 23 Dec 2024 13:46:51 +0000 (14:46 +0100)]
WIP: room loader

6 months agoAdded ability to flag room loading
Lukas Krickl [Mon, 23 Dec 2024 13:28:51 +0000 (14:28 +0100)]
Added ability to flag room loading

When a player collides with a door a special flag is set that
allows the engine to initiate a room load during the next vblank

6 months agoWIP: exit direction selection
Lukas Krickl [Mon, 23 Dec 2024 08:02:49 +0000 (09:02 +0100)]
WIP: exit direction selection

6 months agoAdded notes about scrolling
Lukas Krickl [Sat, 21 Dec 2024 05:33:18 +0000 (06:33 +0100)]
Added notes about scrolling

6 months agoWIP: room transition loader
Lukas Krickl [Fri, 20 Dec 2024 18:32:27 +0000 (19:32 +0100)]
WIP: room transition loader

6 months agoBat actors now use direction constants for movement
Lukas Krickl [Fri, 20 Dec 2024 10:02:31 +0000 (11:02 +0100)]
Bat actors now use direction constants for movement

6 months agoAdded special exit flag
Lukas Krickl [Fri, 20 Dec 2024 10:01:33 +0000 (11:01 +0100)]
Added special exit flag

6 months agoAdded notes for room transitions
Lukas Krickl [Sun, 15 Dec 2024 18:41:27 +0000 (19:41 +0100)]
Added notes for room transitions

6 months agoAdded docs for room transitions
Lukas Krickl [Sun, 15 Dec 2024 18:11:52 +0000 (19:11 +0100)]
Added docs for room transitions

6 months agoRemoved unused map function
Lukas Krickl [Sun, 15 Dec 2024 18:07:55 +0000 (19:07 +0100)]
Removed unused map function

6 months agoRemoved test room loader code and replaced it with an actual memcpy call
Lukas Krickl [Sun, 15 Dec 2024 10:00:21 +0000 (11:00 +0100)]
Removed test room loader code and replaced it with an actual memcpy call

The test loader for a hard coded room was still present in video init.
This lead to an incorrect assumption being made in the map converter.
Rooms are now loaded directly from the actual base struct.
The base struct now also always points to an empty room exit table.

6 months agoWIP: exit table for rooms
Lukas Krickl [Sun, 15 Dec 2024 09:28:54 +0000 (10:28 +0100)]
WIP: exit table for rooms

6 months agoRemoved redundant comparison in actor update
Lukas Krickl [Thu, 12 Dec 2024 05:23:42 +0000 (06:23 +0100)]
Removed redundant comparison in actor update

6 months agoAdded docs for map flags
Lukas Krickl [Wed, 11 Dec 2024 13:07:57 +0000 (14:07 +0100)]
Added docs for map flags

6 months agoAdded new rand table.
Lukas Krickl [Wed, 11 Dec 2024 10:32:51 +0000 (11:32 +0100)]
Added new rand table.

Re-worked rand to use the table as a source of prng

6 months agoAdded actor collision checking
Lukas Krickl [Tue, 10 Dec 2024 16:59:39 +0000 (17:59 +0100)]
Added actor collision checking

The bat actor now correctly checks for walls and doors and will
refuse to leave the screen.

6 months agoAdded def for -TILE_SIZE
Lukas Krickl [Mon, 9 Dec 2024 12:54:39 +0000 (13:54 +0100)]
Added def for -TILE_SIZE

6 months agoAdded dedicated memory space for animation target coordinates
Lukas Krickl [Mon, 9 Dec 2024 12:08:30 +0000 (13:08 +0100)]
Added dedicated memory space for animation target coordinates

6 months agoFixed bug that caused actors to incorrectly end their turn under certain
Lukas Krickl [Sun, 8 Dec 2024 17:33:50 +0000 (18:33 +0100)]
Fixed bug that caused actors to incorrectly end their turn under certain
conditions.

This was caused by actor_update_bat setting the zero flag which caused
call nz, update_actor_null to be executed

6 months agoAdded basic calls to clear animation memory whenever null actors update
Lukas Krickl [Sun, 8 Dec 2024 08:47:27 +0000 (09:47 +0100)]
Added basic calls to clear animation memory whenever null actors update

6 months agoImproved who_next performance
Lukas Krickl [Sun, 8 Dec 2024 07:32:13 +0000 (08:32 +0100)]
Improved who_next performance

6 months agoMerge pull request 'enemy-behaviour' (#2) from simple-enemy-behavior into master
unlink2 [Sat, 7 Dec 2024 13:11:40 +0000 (13:11 +0000)]
Merge pull request 'enemy-behaviour' (#2) from simple-enemy-behavior into master

Reviewed-on: https://codeberg.org/unlink2/gbrg/pulls/2

6 months agoAdded assert macro origin/simple-enemy-behavior
Lukas Krickl [Sat, 7 Dec 2024 05:39:37 +0000 (06:39 +0100)]
Added assert macro

6 months agoFixed enum value for doors
Lukas Krickl [Wed, 4 Dec 2024 12:45:29 +0000 (13:45 +0100)]
Fixed enum value for doors

6 months agoAdded BREAK macro
Lukas Krickl [Wed, 4 Dec 2024 09:54:02 +0000 (10:54 +0100)]
Added BREAK macro

6 months agoMoved flag reading to map
Lukas Krickl [Wed, 4 Dec 2024 09:49:17 +0000 (10:49 +0100)]
Moved flag reading to map

6 months agoAdded door flags to base room
Lukas Krickl [Wed, 4 Dec 2024 07:43:15 +0000 (08:43 +0100)]
Added door flags to base room

6 months agoWIP: reworking room flag access
Lukas Krickl [Wed, 4 Dec 2024 07:11:11 +0000 (08:11 +0100)]
WIP: reworking room flag access

6 months agoWIP: flag setting for maps
Lukas Krickl [Mon, 2 Dec 2024 05:01:25 +0000 (06:01 +0100)]
WIP: flag setting for maps

7 months agoAdded constant rand call to main loop
Lukas Krickl [Fri, 29 Nov 2024 17:22:31 +0000 (18:22 +0100)]
Added constant rand call to main loop

7 months agoAdded test animation for bats
Lukas Krickl [Fri, 29 Nov 2024 09:05:34 +0000 (10:05 +0100)]
Added test animation for bats

7 months agoWIP: bat movement
Lukas Krickl [Fri, 29 Nov 2024 08:10:39 +0000 (09:10 +0100)]
WIP: bat movement

7 months agoAdded basic 'rng' function
Lukas Krickl [Fri, 29 Nov 2024 05:00:01 +0000 (06:00 +0100)]
Added basic 'rng' function

7 months agoAdded simple player animation
Lukas Krickl [Tue, 26 Nov 2024 14:07:01 +0000 (15:07 +0100)]
Added simple player animation

7 months agoMoved animation load macro to macro defs
Lukas Krickl [Tue, 26 Nov 2024 13:33:12 +0000 (14:33 +0100)]
Moved animation load macro to macro defs

7 months agoMoved animation loading to a macro
Lukas Krickl [Tue, 26 Nov 2024 07:28:59 +0000 (08:28 +0100)]
Moved animation loading to a macro

7 months agoAdded bat tiles for simple animations
Lukas Krickl [Mon, 25 Nov 2024 14:24:28 +0000 (15:24 +0100)]
Added bat tiles for simple animations

7 months agoOptimized call_tbl a bit
Lukas Krickl [Mon, 25 Nov 2024 12:44:11 +0000 (13:44 +0100)]
Optimized call_tbl a bit

7 months agoAdded template for plot
Lukas Krickl [Mon, 25 Nov 2024 11:41:42 +0000 (12:41 +0100)]
Added template for plot

7 months agoUpdated map converter to align actors to the tile grid
Lukas Krickl [Mon, 25 Nov 2024 10:50:07 +0000 (11:50 +0100)]
Updated map converter to align actors to the tile grid

7 months agoWIP: actor table update
Lukas Krickl [Mon, 25 Nov 2024 09:12:39 +0000 (10:12 +0100)]
WIP: actor table update

7 months agoAdded basic bat rendering
Lukas Krickl [Wed, 20 Nov 2024 15:52:35 +0000 (16:52 +0100)]
Added basic bat rendering

7 months agowip: Added bat actor and move duplicate actor code to macros
Lukas Krickl [Wed, 20 Nov 2024 15:14:18 +0000 (16:14 +0100)]
wip: Added bat actor and move duplicate actor code to macros

7 months agoAdded bat sprite
Lukas Krickl [Tue, 19 Nov 2024 18:40:48 +0000 (19:40 +0100)]
Added bat sprite

7 months agoAdded test noise for walking
Lukas Krickl [Tue, 19 Nov 2024 14:01:19 +0000 (15:01 +0100)]
Added test noise for walking

7 months agoUpdted readme.
Lukas Krickl [Tue, 19 Nov 2024 13:16:49 +0000 (14:16 +0100)]
Updted readme.

Added built instructions as well as a reference to ulas

7 months agoAdded audio register definitions
Lukas Krickl [Tue, 19 Nov 2024 08:24:25 +0000 (09:24 +0100)]
Added audio register definitions

7 months agoAdded audio init code
Lukas Krickl [Tue, 19 Nov 2024 08:02:27 +0000 (09:02 +0100)]
Added audio init code

7 months agoAdded skip turn code to all other actor types for now
Lukas Krickl [Mon, 18 Nov 2024 18:18:33 +0000 (19:18 +0100)]
Added skip turn code to all other actor types for now

7 months agoThe player's turn is now ended after a move
Lukas Krickl [Mon, 18 Nov 2024 17:48:26 +0000 (18:48 +0100)]
The player's turn is now ended after a move

for now now other actor is handling turns so the player can only move
  once

7 months agoAdded system for ending turns
Lukas Krickl [Mon, 18 Nov 2024 17:40:54 +0000 (18:40 +0100)]
Added system for ending turns

7 months agoAdded who_next call
Lukas Krickl [Mon, 18 Nov 2024 17:04:04 +0000 (18:04 +0100)]
Added who_next call

7 months agoFixed take damage debug buttons
Lukas Krickl [Mon, 18 Nov 2024 15:17:52 +0000 (16:17 +0100)]
Fixed take damage debug buttons

7 months agoAdded collision check for new movement
Lukas Krickl [Mon, 18 Nov 2024 13:41:05 +0000 (14:41 +0100)]
Added collision check for new movement

7 months agoAdded new movement for player.
Lukas Krickl [Mon, 18 Nov 2024 12:55:32 +0000 (13:55 +0100)]
Added new movement for player.

- TODO: collision is still not implemented again

7 months agoReworking player input handling for turn-based movement
Lukas Krickl [Sun, 17 Nov 2024 20:05:44 +0000 (21:05 +0100)]
Reworking player input handling for turn-based movement

7 months agoWIP: turn based movement
Lukas Krickl [Sun, 17 Nov 2024 17:09:47 +0000 (18:09 +0100)]
WIP: turn based movement

7 months agoRemoved unused collision code
Lukas Krickl [Sun, 17 Nov 2024 07:39:29 +0000 (08:39 +0100)]
Removed unused collision code