manuals tidy tier 3a: rondes, ternaris, anyofallof, padding, etc.

This commit is contained in:
2026-05-14 19:24:02 +02:00
parent 0b82be193f
commit a48fe51f73
13 changed files with 54 additions and 32 deletions
+3 -1
View File
@@ -12,7 +12,9 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
// NOLINTBEGIN(clang-analyzer-unix.Malloc): codi extern de tercers, no l'auditem.
#include "external/gif.h"
// NOLINTEND(clang-analyzer-unix.Malloc)
#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
@@ -26,7 +28,7 @@ Uint32* pixel_data = nullptr;
void JD8_Init() {
screen = new Uint8[64000]{};
main_palette = new Color[256]{};
pixel_data = new Uint32[320 * 200]{};
pixel_data = new Uint32[std::size_t{320} * 200]{};
}
void JD8_Quit() {
+1 -6
View File
@@ -106,12 +106,7 @@ auto JI_KeyPressed(int key) -> bool {
if (static_cast<int>(keystates[key]) != 0) {
return true;
}
for (auto& virtual_keystate : virtual_keystates) {
if (virtual_keystate[key] != 0) {
return true;
}
}
return false;
return std::ranges::any_of(virtual_keystates, [key](const auto& vk) { return vk[key] != 0; });
}
auto JI_CheatActivated(const char* cheat_code) -> bool {