Stop the section separators from reading as doc comments
ci/woodpecker/push/tic80 Pipeline was successful
ci/woodpecker/manual/tic80 Pipeline was successful

The docs step aborted on "definition cannot be parsed" and "'Config'
had no return?". Both come from the same thing: an 80-character rule of
dashes starts with ---, which ldoc takes for a documentation comment and
then tries to parse whatever follows as a definition.

There are no real doc comments in this project — all 48 --- lines were
decorative rules — so the fix is to spell them "-- " plus dashes. Same
width on screen, invisible to ldoc.

Verified by running the docs step's own alpine + luarocks + ldoc setup
over the merged source: ldoc completes and writes docs/.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-16 23:08:44 +02:00
co-authored by Claude Opus 5
parent 570fd666cd
commit a074c7251c
+48 -48
View File
@@ -1,6 +1,6 @@
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Constants -- Constants
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Tile constants -- Tile constants
local TILE_SIZE = 8 local TILE_SIZE = 8
@@ -51,9 +51,9 @@ local GAME_STATE_HELP = 3
local GAME_STATE_CREDITS = 4 local GAME_STATE_CREDITS = 4
local GAME_STATE_SETTINGS = 5 local GAME_STATE_SETTINGS = 5
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Game Configuration (easy to tweak game parameters) -- Game Configuration (easy to tweak game parameters)
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
local Config = { local Config = {
-- Player settings -- Player settings
@@ -91,9 +91,9 @@ local Config = {
}, },
} }
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Sound System (centralized audio management) -- Sound System (centralized audio management)
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
local Sound = { local Sound = {
effects = { effects = {
@@ -120,9 +120,9 @@ function Sound.play(effect_name)
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Modules -- Modules
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
local Input = {} local Input = {}
local Map = {} local Map = {}
@@ -141,9 +141,9 @@ local AI = {}
local Player = {} local Player = {}
local Game = {} local Game = {}
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Game State -- Game State
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
local State = { local State = {
game_state = GAME_STATE_SPLASH, game_state = GAME_STATE_SPLASH,
@@ -170,9 +170,9 @@ for row = 1, MAP_HEIGHT do
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Powerup System (extensible) -- Powerup System (extensible)
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
local POWERUP_TYPES = { local POWERUP_TYPES = {
{ {
@@ -195,9 +195,9 @@ local POWERUP_TYPES = {
}, },
} }
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Powerup module -- Powerup module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function Powerup.get_config(type_name) function Powerup.get_config(type_name)
for _, p in ipairs(POWERUP_TYPES) do for _, p in ipairs(POWERUP_TYPES) do
@@ -267,9 +267,9 @@ function Powerup.check_pickup()
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Input module -- Input module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function Input.action_pressed() function Input.action_pressed()
return btnp(4) or keyp(48) -- A button or Space return btnp(4) or keyp(48) -- A button or Space
@@ -332,9 +332,9 @@ function Input.p2_action()
return keyp(7) or btnp(12) -- G key or gamepad 2 A return keyp(7) or btnp(12) -- G key or gamepad 2 A
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Map module -- Map module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function Map.can_move_to(gridX, gridY, player) function Map.can_move_to(gridX, gridY, player)
if gridX < 1 or gridY < 1 or gridX > MAP_WIDTH or gridY > MAP_HEIGHT then if gridX < 1 or gridY < 1 or gridX > MAP_WIDTH or gridY > MAP_HEIGHT then
@@ -380,9 +380,9 @@ function Map.is_spawn_area(row, col)
return false return false
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Map Generators (extensible map generation system) -- Map Generators (extensible map generation system)
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
local MapGenerators = {} local MapGenerators = {}
@@ -500,9 +500,9 @@ function Map.draw_tiles()
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- TopBar module -- TopBar module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function TopBar.draw() function TopBar.draw()
-- Background -- Background
@@ -530,9 +530,9 @@ function TopBar.draw()
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- UI module (shared utilities) -- UI module (shared utilities)
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function UI.print_shadow(text, x, y, color, fixed, scale) function UI.print_shadow(text, x, y, color, fixed, scale)
scale = scale or 1 scale = scale or 1
@@ -540,9 +540,9 @@ function UI.print_shadow(text, x, y, color, fixed, scale)
print(text, x, y, color, fixed, scale) print(text, x, y, color, fixed, scale)
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Splash module -- Splash module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function Splash.update() function Splash.update()
-- Initialize on first frame -- Initialize on first frame
@@ -563,9 +563,9 @@ function Splash.update()
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Menu module -- Menu module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
local MENU_ITEMS = { local MENU_ITEMS = {
{ {
@@ -638,9 +638,9 @@ function Menu.update()
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Help module -- Help module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function Help.update() function Help.update()
cls(COLOR_BLACK) cls(COLOR_BLACK)
@@ -687,9 +687,9 @@ function Help.update()
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Credits module -- Credits module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function Credits.update() function Credits.update()
cls(COLOR_BLACK) cls(COLOR_BLACK)
@@ -708,9 +708,9 @@ function Credits.update()
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Settings module (persistent settings menu) -- Settings module (persistent settings menu)
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- luacheck: globals pmem -- luacheck: globals pmem
@@ -926,9 +926,9 @@ function Settings.update()
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- WinScreen module -- WinScreen module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function WinScreen.draw() function WinScreen.draw()
cls(COLOR_BLACK) cls(COLOR_BLACK)
@@ -940,9 +940,9 @@ function WinScreen.draw()
end end
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- GameBoard module -- GameBoard module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function GameBoard.draw() function GameBoard.draw()
Map.draw_shadows() Map.draw_shadows()
@@ -959,9 +959,9 @@ function GameBoard.draw()
TopBar.draw() TopBar.draw()
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Bomb module (includes explosions) -- Bomb module (includes explosions)
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function Bomb.draw(x, y) function Bomb.draw(x, y)
spr(BOMB_SPRITE, x, y, 0, 1) spr(BOMB_SPRITE, x, y, 0, 1)
@@ -1102,9 +1102,9 @@ function Bomb.clear_all()
State.explosions = {} State.explosions = {}
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- AI module -- AI module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
local function is_blast_line_blocked(pos1, pos2, fixedCoord, is_horizontal) local function is_blast_line_blocked(pos1, pos2, fixedCoord, is_horizontal)
local minPos = math.min(pos1, pos2) local minPos = math.min(pos1, pos2)
@@ -1375,9 +1375,9 @@ function AI.update(player, target)
AI.move_and_bomb(player, target) AI.move_and_bomb(player, target)
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Player module -- Player module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function Player.draw(x, y, is_player1) function Player.draw(x, y, is_player1)
local sprite_id = is_player1 and PLAYER_BLUE or PLAYER_RED local sprite_id = is_player1 and PLAYER_BLUE or PLAYER_RED
@@ -1485,9 +1485,9 @@ function Player.reset(player)
player.bombCooldown = 0 player.bombCooldown = 0
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Game module -- Game module
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
function Game.init() function Game.init()
State.winner = nil State.winner = nil
@@ -1561,9 +1561,9 @@ function Game.update()
return false return false
end end
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Main game loop -- Main game loop
-------------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
local function update_playing() local function update_playing()
cls(COLOR_GREEN) cls(COLOR_GREEN)