- [FIX] sys.subpal() now clamps values for safety
This commit is contained in:
2
mini.cpp
2
mini.cpp
@@ -726,7 +726,7 @@ uint8_t gettrans() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void subpal(uint8_t index, uint8_t color) {
|
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() {
|
void reset_subpal() {
|
||||||
|
|||||||
@@ -436,7 +436,8 @@ function sys.time() end
|
|||||||
---Reset chrono time (with offset in seconds) (with decimals)
|
---Reset chrono time (with offset in seconds) (with decimals)
|
||||||
function sys.chrono(offset) end
|
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
|
function sys.chrono() end
|
||||||
|
|
||||||
---@return boolean
|
---@return boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user