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

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

9 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

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

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

9 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

9 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

9 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

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

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

9 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

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

9 months agounit: Added basic movement and state transitions
Lukas Krickl [Mon, 12 May 2025 15:06:44 +0000 (17:06 +0200)]
unit: Added basic movement and state transitions

9 months agoactors: Added states to actor templates
Lukas Krickl [Mon, 12 May 2025 14:37:38 +0000 (16:37 +0200)]
actors: Added states to actor templates

9 months agounit: Added stubs for movement code and scroll adjustmnets
Lukas Krickl [Mon, 12 May 2025 10:09:13 +0000 (12:09 +0200)]
unit: Added stubs for movement code and scroll adjustmnets

9 months agounit: working on input handling
Lukas Krickl [Mon, 12 May 2025 08:10:20 +0000 (10:10 +0200)]
unit: working on input handling

10 months agomap: Added map header for future expansion purposes
Lukas Krickl [Mon, 12 May 2025 05:12:14 +0000 (07:12 +0200)]
map: Added map header for future expansion purposes

10 months agounit: fixed scroll offset calculation
Lukas Krickl [Sun, 11 May 2025 15:47:05 +0000 (17:47 +0200)]
unit: fixed scroll offset calculation

10 months agounit: Added basic drawing rotuine for demo_1 unit
Lukas Krickl [Sun, 11 May 2025 15:31:43 +0000 (17:31 +0200)]
unit: Added basic drawing rotuine for demo_1 unit

10 months agocursor: Renamed cursor rotuines to reflect their actual use
Lukas Krickl [Sun, 11 May 2025 04:18:34 +0000 (06:18 +0200)]
cursor: Renamed cursor rotuines to reflect their actual use

This is effectively just a namespace change

10 months agomap: the map converter can now add flags
Lukas Krickl [Sat, 10 May 2025 18:38:12 +0000 (20:38 +0200)]
map: the map converter can now add flags

The map loader loads flags from maps correctly

10 months agosys: moved call_hl to rst 0x08
Lukas Krickl [Sat, 10 May 2025 16:53:39 +0000 (18:53 +0200)]
sys: moved call_hl to rst 0x08

10 months agoAdded flags to actor struct
Lukas Krickl [Thu, 8 May 2025 06:56:01 +0000 (08:56 +0200)]
Added flags to actor struct

10 months agoactors: Added tile position to actor def
Lukas Krickl [Wed, 7 May 2025 18:17:35 +0000 (20:17 +0200)]
actors: Added tile position to actor def

10 months agounit: Added unit demo code
Lukas Krickl [Tue, 6 May 2025 18:22:17 +0000 (20:22 +0200)]
unit: Added unit demo code

This code simply sets up a unit update state for testing purposes

10 months agotiles: Added test unit tiles
Lukas Krickl [Tue, 6 May 2025 15:33:37 +0000 (17:33 +0200)]
tiles: Added test unit tiles

10 months agogame: Added new unit placement state
Lukas Krickl [Tue, 6 May 2025 15:04:23 +0000 (17:04 +0200)]
game: Added new unit placement state

10 months agounit: Added act_def macro
Lukas Krickl [Tue, 6 May 2025 14:34:44 +0000 (16:34 +0200)]
unit: Added act_def macro

10 months agoTiles: update tileset
Lukas Krickl [Sun, 4 May 2025 17:25:22 +0000 (19:25 +0200)]
Tiles: update tileset

10 months agoactors: Added actor table state machine code
Lukas Krickl [Sun, 4 May 2025 14:35:12 +0000 (16:35 +0200)]
actors: Added actor table state machine code

10 months agounits: Added stub for unit update
Lukas Krickl [Sun, 4 May 2025 13:35:45 +0000 (15:35 +0200)]
units: Added stub for unit update

10 months agodefs: Added new actor tables
Lukas Krickl [Sun, 4 May 2025 13:25:41 +0000 (15:25 +0200)]
defs: Added new actor tables

Also removed more dead code

10 months agodefs: Added new actor def
Lukas Krickl [Sun, 4 May 2025 07:51:33 +0000 (09:51 +0200)]
defs: Added new actor def

10 months agocleanup: Removed dead code
Lukas Krickl [Sun, 4 May 2025 07:42:16 +0000 (09:42 +0200)]
cleanup: Removed dead code

10 months agoTODO: Updated notes on tiles
Lukas Krickl [Sun, 4 May 2025 06:14:20 +0000 (08:14 +0200)]
TODO: Updated notes on tiles

10 months agoTODO: added more notes
Lukas Krickl [Sun, 4 May 2025 05:36:30 +0000 (07:36 +0200)]
TODO: added more notes

10 months agoAdded more todo items
Lukas Krickl [Sun, 4 May 2025 05:23:46 +0000 (07:23 +0200)]
Added more todo items

10 months agoAdded TODO
Lukas Krickl [Sun, 4 May 2025 04:31:27 +0000 (06:31 +0200)]
Added TODO

10 months agoReworked TODO
Lukas Krickl [Sun, 4 May 2025 03:58:11 +0000 (05:58 +0200)]
Reworked TODO

10 months agobuildings: Added docs for buildings
Lukas Krickl [Fri, 2 May 2025 16:47:10 +0000 (18:47 +0200)]
buildings: Added docs for buildings

10 months agoadded todo notes
Lukas Krickl [Sun, 27 Apr 2025 06:09:19 +0000 (08:09 +0200)]
added todo notes

10 months agobuilding: Added under construction tile
Lukas Krickl [Thu, 24 Apr 2025 18:55:18 +0000 (20:55 +0200)]
building: Added under construction tile

10 months agobg: fixed issue where the bg update queue would incorrectly process
Lukas Krickl [Thu, 24 Apr 2025 16:10:04 +0000 (18:10 +0200)]
bg: fixed issue where the bg update queue would incorrectly process
every byte as a single update call

This caused out of bounds writes to seemingly random addresses.

10 months agocells: wip debugging cell out of bounds write
Lukas Krickl [Thu, 24 Apr 2025 03:54:19 +0000 (05:54 +0200)]
cells: wip debugging cell out of bounds write

10 months agoassert: added new parameter to assert macro
Lukas Krickl [Thu, 24 Apr 2025 03:24:59 +0000 (05:24 +0200)]
assert: added new parameter to assert macro

10 months agoBUGS: Added cell write crash bug
Lukas Krickl [Wed, 23 Apr 2025 19:42:11 +0000 (21:42 +0200)]
BUGS: Added cell write crash bug

10 months agomap: Added note for eventual map loader rewrite
Lukas Krickl [Wed, 23 Apr 2025 19:25:29 +0000 (21:25 +0200)]
map: Added note for eventual map loader rewrite

10 months agocells: cells now have a timer just like states
Lukas Krickl [Wed, 23 Apr 2025 19:20:29 +0000 (21:20 +0200)]
cells: cells now have a timer just like states

This allows easier scheduling e.g. for build timers

10 months agosimulation: simulation updates now happen in a fixed interval per frame
Lukas Krickl [Wed, 23 Apr 2025 16:01:51 +0000 (18:01 +0200)]
simulation: simulation updates now happen in a fixed interval per frame

This makes the game hit its 60fps target.
Currently inputs still get eaten if a frame drops though.

10 months agocells: Added update loop
Lukas Krickl [Sun, 20 Apr 2025 18:12:00 +0000 (20:12 +0200)]
cells: Added update loop

The simulation update loop currently updates all cells in a single
frame.
This is way too slow and will need to be split up.

10 months agocells: Added additional input to cells
Lukas Krickl [Sun, 20 Apr 2025 06:16:44 +0000 (08:16 +0200)]
cells: Added additional input to cells

cells now also get passed the screen ptr to their tile in bc

10 months agobuilding: Added cell state setter
Lukas Krickl [Fri, 18 Apr 2025 19:16:10 +0000 (21:16 +0200)]
building: Added cell state setter

10 months agoroads: Added road building
Lukas Krickl [Fri, 18 Apr 2025 11:47:00 +0000 (13:47 +0200)]
roads: Added road building

Roads now will need to check adjacent tiles to draw the correct tile.

10 months agobg: Added tile update queue processing
Lukas Krickl [Fri, 18 Apr 2025 07:56:55 +0000 (09:56 +0200)]
bg: Added tile update queue processing

10 months agobg: made queue index 2 byte offset
Lukas Krickl [Tue, 15 Apr 2025 03:35:16 +0000 (05:35 +0200)]
bg: made queue index 2 byte offset

10 months agomacros: Fixed macro expansion bug in ulas
Lukas Krickl [Mon, 14 Apr 2025 15:22:05 +0000 (17:22 +0200)]
macros: Fixed macro expansion bug in ulas

10 months agobg: Added bg update queue
Lukas Krickl [Mon, 14 Apr 2025 13:41:55 +0000 (15:41 +0200)]
bg: Added bg update queue

This queue can store up to 32 update requests for tiles.

10 months agoupdate: added stubs for cell updates
Lukas Krickl [Sat, 12 Apr 2025 19:06:48 +0000 (21:06 +0200)]
update: added stubs for cell updates

11 months agoplayer: Fixed out of bounds jump when aborting up moves
Lukas Krickl [Thu, 10 Apr 2025 16:45:08 +0000 (18:45 +0200)]
player: Fixed out of bounds jump when aborting up moves

11 months agobuildings: cusros can now call the building state
Lukas Krickl [Thu, 10 Apr 2025 15:27:55 +0000 (17:27 +0200)]
buildings: cusros can now call the building state

11 months agoplayer: Added code to calculate cursor building offset when pressing a
Lukas Krickl [Thu, 10 Apr 2025 12:04:29 +0000 (14:04 +0200)]
player: Added code to calculate cursor building offset when pressing a

11 months agoplayer: stub for building buildigs
Lukas Krickl [Thu, 10 Apr 2025 11:05:04 +0000 (13:05 +0200)]
player: stub for building buildigs

11 months agosimulation: Added cell update loop
Lukas Krickl [Tue, 8 Apr 2025 18:04:38 +0000 (20:04 +0200)]
simulation: Added cell update loop

11 months agosimulation: wip simulation loop
Lukas Krickl [Tue, 8 Apr 2025 15:48:21 +0000 (17:48 +0200)]
simulation: wip simulation loop

11 months agocells: Added copy code for next cell update routine
Lukas Krickl [Tue, 8 Apr 2025 15:04:30 +0000 (17:04 +0200)]
cells: Added copy code for next cell update routine

11 months agocells: refactored cell struct to save more memory
Lukas Krickl [Tue, 8 Apr 2025 14:57:17 +0000 (16:57 +0200)]
cells: refactored cell struct to save more memory

11 months agocells: wip cell update code
Lukas Krickl [Tue, 8 Apr 2025 10:54:24 +0000 (12:54 +0200)]
cells: wip cell update code

11 months agocells: removed comment
Lukas Krickl [Wed, 2 Apr 2025 10:43:36 +0000 (12:43 +0200)]
cells: removed comment

11 months agocells: stubs for cell updating and management
Lukas Krickl [Wed, 2 Apr 2025 10:42:50 +0000 (12:42 +0200)]
cells: stubs for cell updating and management

11 months agocells: Added basic setup for cell templates
Lukas Krickl [Wed, 2 Apr 2025 07:40:30 +0000 (09:40 +0200)]
cells: Added basic setup for cell templates

This allows updating cells

11 months agocursor: Added preview tile
Lukas Krickl [Tue, 1 Apr 2025 19:25:41 +0000 (21:25 +0200)]
cursor: Added preview tile

11 months agostate: cursor states are now also simply using a state machine
Lukas Krickl [Tue, 1 Apr 2025 11:13:00 +0000 (13:13 +0200)]
state: cursor states are now also simply using a state machine

11 months agoui: Added basic mapping for cursor selector
Lukas Krickl [Sun, 30 Mar 2025 16:31:48 +0000 (18:31 +0200)]
ui: Added basic mapping for cursor selector

This is the first step to being able to place buildings

11 months agotiles: Updated 'R'
Lukas Krickl [Sun, 30 Mar 2025 06:00:30 +0000 (08:00 +0200)]
tiles: Updated 'R'

11 months agoui: Added more strings and adjuted label position
Lukas Krickl [Sun, 30 Mar 2025 05:41:21 +0000 (07:41 +0200)]
ui: Added more strings and adjuted label position

11 months agoui: added cursor movemnet
Lukas Krickl [Sun, 30 Mar 2025 04:47:38 +0000 (06:47 +0200)]
ui: added cursor movemnet

the ui cursor can now move and displays strings from a table

11 months agotile update
Lukas Krickl [Sun, 30 Mar 2025 04:21:39 +0000 (06:21 +0200)]
tile update

11 months agoui: leaving build menu now clears oam
Lukas Krickl [Sun, 30 Mar 2025 04:16:40 +0000 (06:16 +0200)]
ui: leaving build menu now clears oam

11 months agocharacter encoding: Fixed char encoding to start at 1 for '0'
Lukas Krickl [Sat, 29 Mar 2025 18:05:53 +0000 (19:05 +0100)]
character encoding: Fixed char encoding to start at 1 for '0'

This allows NUL terminated strings to be used and still contain '0'

11 months agoui: Added objputs
Lukas Krickl [Sat, 29 Mar 2025 17:57:35 +0000 (18:57 +0100)]
ui: Added objputs

This routine allows printing using objects rather than bg tiles.

11 months agoui: Added basic ui state change
Lukas Krickl [Sat, 29 Mar 2025 15:57:43 +0000 (16:57 +0100)]
ui: Added basic ui state change

11 months agocells: Updated cell struct
Lukas Krickl [Sat, 29 Mar 2025 10:51:42 +0000 (11:51 +0100)]
cells: Updated cell struct

Added more notes for how cells operate

11 months agoupdated raod grass and water tiles
Lukas Krickl [Sat, 29 Mar 2025 06:37:57 +0000 (07:37 +0100)]
updated raod grass and water tiles

11 months agoupdate: Removed update table
Lukas Krickl [Sat, 29 Mar 2025 06:27:26 +0000 (07:27 +0100)]
update: Removed update table

11 months agoui: added stub for UI state
Lukas Krickl [Sat, 29 Mar 2025 05:22:26 +0000 (06:22 +0100)]
ui: added stub for UI state

11 months agomap: reduced cell memory size
Lukas Krickl [Fri, 28 Mar 2025 17:20:03 +0000 (18:20 +0100)]
map: reduced cell memory size

11 months agogame_state: game state updates now use the same state machine as actors
Lukas Krickl [Fri, 28 Mar 2025 13:28:39 +0000 (14:28 +0100)]
game_state: game state updates now use the same state machine as actors

11 months agostate: Added proper state machine based cursor movement
Lukas Krickl [Thu, 27 Mar 2025 19:56:04 +0000 (20:56 +0100)]
state: Added proper state machine based cursor movement

11 months agocursor: cursor movement is now handeled by the state system
Lukas Krickl [Thu, 27 Mar 2025 16:59:28 +0000 (17:59 +0100)]
cursor: cursor movement is now handeled by the state system

11 months agowip: state update routine
Lukas Krickl [Thu, 27 Mar 2025 12:59:23 +0000 (13:59 +0100)]
wip: state update routine

11 months agowip: state machine for cursor
Lukas Krickl [Thu, 27 Mar 2025 11:56:04 +0000 (12:56 +0100)]
wip: state machine for cursor

11 months agoAdded note about state handling
Lukas Krickl [Thu, 27 Mar 2025 10:53:38 +0000 (11:53 +0100)]
Added note about state handling

11 months agostate machine: working on a simple state machine
Lukas Krickl [Thu, 27 Mar 2025 10:45:39 +0000 (11:45 +0100)]
state machine: working on a simple state machine

This can be used for simple cursor actions

11 months agocursor: the cursor can no longer wrap
Lukas Krickl [Thu, 27 Mar 2025 10:16:09 +0000 (11:16 +0100)]
cursor: the cursor can no longer wrap

Scroll also stops when getting to the edge.

11 months agocursor: preventing camera from scrolling out of bounds in top/left
Lukas Krickl [Wed, 26 Mar 2025 17:21:21 +0000 (18:21 +0100)]
cursor: preventing camera from scrolling out of bounds in top/left
direction

11 months agoworking on canceling scrolls when camera cannot move
Lukas Krickl [Wed, 26 Mar 2025 16:48:05 +0000 (17:48 +0100)]
working on canceling scrolls when camera cannot move

11 months agoWIP: working on aborting moves when they would wrap map
Lukas Krickl [Sat, 22 Mar 2025 17:36:30 +0000 (18:36 +0100)]
WIP: working on aborting moves when they would wrap map

11 months agotiles: re-arranged tiles and fixed map
Lukas Krickl [Fri, 21 Mar 2025 19:20:26 +0000 (20:20 +0100)]
tiles: re-arranged tiles and fixed map

11 months agotiles: reworked tile loader to use better bank names
Lukas Krickl [Fri, 21 Mar 2025 18:56:30 +0000 (19:56 +0100)]
tiles: reworked tile loader to use better bank names

11 months agovideo: Added bg tileset cycles
Lukas Krickl [Fri, 21 Mar 2025 17:34:55 +0000 (18:34 +0100)]
video: Added bg tileset cycles