diff --git a/mini.cpp b/mini.cpp index e73b292..b32eb58 100644 --- a/mini.cpp +++ b/mini.cpp @@ -726,7 +726,7 @@ uint8_t gettrans() { } void subpal(uint8_t index, uint8_t color) { - ds::draw_palette[index] = color; + ds::draw_palette[SDL_clamp(index,0,255)] = SDL_clamp(color,0,255); } void reset_subpal() { diff --git a/vscode/library.lua b/vscode/library.lua index 10e5230..820b77b 100644 --- a/vscode/library.lua +++ b/vscode/library.lua @@ -436,7 +436,8 @@ function sys.time() end ---Reset chrono time (with offset in seconds) (with decimals) function sys.chrono(offset) end ----Get chrono time since last chrono reset in seconds (with decimals) +---@return number +---@---Get chrono time since last chrono reset in seconds (with decimals) function sys.chrono() end ---@return boolean