manuals tidy tier 1: suffixes, params, switches, equals-default
This commit is contained in:
@@ -87,7 +87,7 @@ auto JD8_LoadPalette(const char* file) -> JD8_Palette {
|
||||
// Sempre retorna un buffer de 256 colors reservat amb `new Color[256]`
|
||||
// — el caller és responsable d'alliberar-lo amb `delete[]` (o lliurar-ne
|
||||
// l'ownership a `JD8_SetScreenPalette`).
|
||||
auto palette = new Color[256];
|
||||
auto* palette = new Color[256];
|
||||
|
||||
if (Resource::Cache::get() != nullptr) {
|
||||
try {
|
||||
@@ -167,7 +167,7 @@ void JD8_BlitToSurface(int x, int y, JD8_Surface surface, int sx, int sy, int sw
|
||||
}
|
||||
}
|
||||
|
||||
void JD8_BlitCK(int x, int y, const JD8_Surface surface, int sx, int sy, int sw, int sh, Uint8 colorkey) {
|
||||
void JD8_BlitCK(int x, int y, const Uint8* surface, int sx, int sy, int sw, int sh, Uint8 colorkey) {
|
||||
int src_pointer = sx + (sy * 320);
|
||||
int dst_pointer = x + (y * 320);
|
||||
for (int j = 0; j < sh; j++) {
|
||||
@@ -181,7 +181,7 @@ void JD8_BlitCK(int x, int y, const JD8_Surface surface, int sx, int sy, int sw,
|
||||
}
|
||||
}
|
||||
|
||||
void JD8_BlitCKCut(int x, int y, const JD8_Surface surface, int sx, int sy, int sw, int sh, Uint8 colorkey) {
|
||||
void JD8_BlitCKCut(int x, int y, const Uint8* surface, int sx, int sy, int sw, int sh, Uint8 colorkey) {
|
||||
int src_pointer = sx + (sy * 320);
|
||||
int dst_pointer = x + (y * 320);
|
||||
for (int j = 0; j < sh; j++) {
|
||||
@@ -195,7 +195,7 @@ void JD8_BlitCKCut(int x, int y, const JD8_Surface surface, int sx, int sy, int
|
||||
}
|
||||
}
|
||||
|
||||
void JD8_BlitCKScroll(int y, const JD8_Surface surface, int sx, int sy, int sh, Uint8 colorkey) {
|
||||
void JD8_BlitCKScroll(int y, const Uint8* surface, int sx, int sy, int sh, Uint8 colorkey) {
|
||||
int dst_pointer = y * 320;
|
||||
for (int j = sy; j < sy + sh; j++) {
|
||||
for (int i = 0; i < 320; i++) {
|
||||
@@ -208,7 +208,7 @@ void JD8_BlitCKScroll(int y, const JD8_Surface surface, int sx, int sy, int sh,
|
||||
}
|
||||
}
|
||||
|
||||
void JD8_BlitCKToSurface(int x, int y, const JD8_Surface surface, int sx, int sy, int sw, int sh, JD8_Surface dest, Uint8 colorkey) {
|
||||
void JD8_BlitCKToSurface(int x, int y, const Uint8* surface, int sx, int sy, int sw, int sh, JD8_Surface dest, Uint8 colorkey) {
|
||||
int src_pointer = sx + (sy * 320);
|
||||
int dst_pointer = x + (y * 320);
|
||||
for (int j = 0; j < sh; j++) {
|
||||
@@ -239,11 +239,11 @@ auto JD8_GetFramebuffer() -> Uint32* {
|
||||
return pixel_data;
|
||||
}
|
||||
|
||||
void JD8_FreeSurface(const JD8_Surface surface) {
|
||||
void JD8_FreeSurface(JD8_Surface surface) { // NOLINT(readability-non-const-parameter): allibera memòria, no pot ser const
|
||||
delete[] surface;
|
||||
}
|
||||
|
||||
auto JD8_GetPixel(JD8_Surface surface, int x, int y) -> Uint8 {
|
||||
auto JD8_GetPixel(const Uint8* surface, int x, int y) -> Uint8 {
|
||||
return surface[x + (y * 320)];
|
||||
}
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ void JD8_Blit(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh)
|
||||
|
||||
void JD8_BlitToSurface(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, JD8_Surface dest);
|
||||
|
||||
void JD8_BlitCK(int x, int y, const JD8_Surface surface, int sx, int sy, int sw, int sh, Uint8 colorkey);
|
||||
void JD8_BlitCK(int x, int y, const Uint8* surface, int sx, int sy, int sw, int sh, Uint8 colorkey);
|
||||
|
||||
void JD8_BlitCKCut(int x, int y, const JD8_Surface surface, int sx, int sy, int sw, int sh, Uint8 colorkey);
|
||||
void JD8_BlitCKCut(int x, int y, const Uint8* surface, int sx, int sy, int sw, int sh, Uint8 colorkey);
|
||||
|
||||
void JD8_BlitCKScroll(int y, const JD8_Surface surface, int sx, int sy, int sh, Uint8 colorkey);
|
||||
void JD8_BlitCKScroll(int y, const Uint8* surface, int sx, int sy, int sh, Uint8 colorkey);
|
||||
|
||||
void JD8_BlitCKToSurface(int x, int y, const JD8_Surface surface, int sx, int sy, int sw, int sh, JD8_Surface dest, Uint8 colorkey);
|
||||
void JD8_BlitCKToSurface(int x, int y, const Uint8* surface, int sx, int sy, int sw, int sh, JD8_Surface dest, Uint8 colorkey);
|
||||
|
||||
// Converteix la pantalla indexada a ARGB. El Director crida aquesta
|
||||
// funció al final de cada tick i després llegeix el framebuffer via
|
||||
@@ -53,9 +53,9 @@ void JD8_Flip();
|
||||
// JD8_Flip(). Propietat de jdraw8 — el caller no ha de lliberar-lo.
|
||||
auto JD8_GetFramebuffer() -> Uint32*;
|
||||
|
||||
void JD8_FreeSurface(const JD8_Surface surface);
|
||||
void JD8_FreeSurface(JD8_Surface surface);
|
||||
|
||||
auto JD8_GetPixel(JD8_Surface surface, int x, int y) -> Uint8;
|
||||
auto JD8_GetPixel(const Uint8* surface, int x, int y) -> Uint8;
|
||||
|
||||
void JD8_PutPixel(JD8_Surface surface, int x, int y, Uint8 pixel);
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ void JI_Update() {
|
||||
|
||||
if (wait_ms > 0.0F) {
|
||||
wait_ms -= delta_ms;
|
||||
wait_ms = std::max(wait_ms, 0.0f);
|
||||
wait_ms = std::max(wait_ms, 0.0F);
|
||||
}
|
||||
|
||||
// Consumim el flag de "alguna tecla no-GUI polsada" del director
|
||||
|
||||
Reference in New Issue
Block a user