Converte símbolos Unicode decorativos dos comentários para ASCII

Substitui barras de caixa (─ ═ │ ┌ ┐ └ ┘ ├ ┤ ┬ ┴), travessões (—),
setas (→ ←), reticências (…), bullets (•), multiplicação (×) e
guillemets (› ‹) por equivalentes ASCII. Acentos portugueses são
preservados.
This commit is contained in:
mguinhos committed 2026-10-20 19:27:33 -03:00
1 parent 1cc0ff9d02
commit 90d47bf8a0
36 files changed
+327 -327

No files matched your search

+24 -24
View File
@@ -1,16 +1,16 @@
/*
* TinyBlocks — tb_sdl2.c
* TinyBlocks - tb_sdl2.c
* Backend SDL2 para TinyBlocks.
*
* Blocos principais:
* SDL2.Events — snapshot de eventos do frame, pré-preenchido pelo SDL2.App
* SDL2.App — janela + renderer + loop principal + executor de renderables
* SDL2.Events - snapshot de eventos do frame, pré-preenchido pelo SDL2.App
* SDL2.App - janela + renderer + loop principal + executor de renderables
*
* Blocos primitivos legados: Init, Quit, Window, Renderer, etc.
*
* Também implementa o contrato TinyBlocks_GraphicsBackend da interface
* tinyblocks-graphics (várias janelas, entrada por janela, desenho com AA e
* medição de texto com a fonte real) — ver tb_sdl2_graphics_backend().
* medição de texto com a fonte real) - ver tb_sdl2_graphics_backend().
*/
#define _POSIX_C_SOURCE 200809L
@@ -27,9 +27,9 @@
#include <tb_graphics.h>
#include "../include/tb_sdl2.h"
/* ═══════════════════════════════════════════════════════════════════════════
/* ===
* Handles opacos de Window/Renderer (blocos wrapper)
* ═══════════════════════════════════════════════════════════════════════════ */
* === */
static TinyBlocks_TypeBlock* s_type_window_handle = NULL;
static TinyBlocks_TypeBlock* s_type_renderer_handle = NULL;
@@ -44,9 +44,9 @@ static void eval_handle_noop(TinyBlocks_Block* self, TinyBlocks* rt) {
(void)self; (void)rt;
}
/* ═══════════════════════════════════════════════════════════════════════════
* Fonte TTF — cache por tamanho
* ═══════════════════════════════════════════════════════════════════════════ */
/* ===
* Fonte TTF - cache por tamanho
* === */
#define FONT_CACHE_CAP 8
#define FONT_SEARCH_COUNT 6
@@ -88,11 +88,11 @@ static void fonts_close_all(void) {
s_font_cache_n = 0;
}
/* ═══════════════════════════════════════════════════════════════════════════
/* ===
* Executor de TinyBlocks_RenderableBlock via SDL2
* ═══════════════════════════════════════════════════════════════════════════ */
* === */
/* ── Rasterização com antialias ─────────────────────────────────────────────
/* -- Rasterização com antialias ---
* As formas preenchidas são varridas linha a linha com AA_SUB sub-linhas por
* pixel e cobertura horizontal exata. Cada pixel é pintado uma única vez, com
* alpha proporcional à cobertura: bordas suavizadas e sem overdraw (cores
@@ -349,9 +349,9 @@ static void sdl2_execute(SDL_Renderer* ren,
}
}
/* ═══════════════════════════════════════════════════════════════════════════
/* ===
* Backend da interface tinyblocks-graphics
* ═══════════════════════════════════════════════════════════════════════════ */
* === */
typedef struct SdlWin {
SDL_Window* win;
SDL_Renderer* ren;
@@ -586,9 +586,9 @@ const TinyBlocks_GraphicsBackend* tinyblocks_get_graphics_backend(void) {
return &s_sdl2_backend;
}
/* ═══════════════════════════════════════════════════════════════════════════
* SDL2.Events — snapshot de eventos do frame
* ═══════════════════════════════════════════════════════════════════════════ */
/* ===
* SDL2.Events - snapshot de eventos do frame
* === */
static void eval_sdl2_events(TinyBlocks_Block* self, TinyBlocks* rt) {
(void)rt;
/* Outputs são pré-preenchidos pelo SDL2.App antes de cada frame.
@@ -658,9 +658,9 @@ static void events_push(TinyBlocks_Block* ev, const FrameEvents* fe) {
ev->dirty = false;
}
/* ═══════════════════════════════════════════════════════════════════════════
* SDL2.App — janela + loop principal
* ═══════════════════════════════════════════════════════════════════════════ */
/* ===
* SDL2.App - janela + loop principal
* === */
typedef struct {
SDL_Window* win;
SDL_Renderer* ren;
@@ -824,9 +824,9 @@ static void eval_sdl2_app(TinyBlocks_Block* self, TinyBlocks* rt) {
self->dirty = false;
}
/* ═══════════════════════════════════════════════════════════════════════════
/* ===
* Blocos primitivos legados
* ═══════════════════════════════════════════════════════════════════════════ */
* === */
static void eval_sdl2_init(TinyBlocks_Block* self, TinyBlocks* rt) {
(void)self;
if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_EVENTS) != 0)
@@ -936,9 +936,9 @@ static void eval_sdl2_poll_event(TinyBlocks_Block* self, TinyBlocks* rt) {
}
}
/* ═══════════════════════════════════════════════════════════════════════════
/* ===
* Registro da library
* ═══════════════════════════════════════════════════════════════════════════ */
* === */
static bool sdl2_lib_init(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib) {
s_type_window_handle = tb_type_block_create(rt, "SDL2._WindowHandle",
NULL,0,NULL,0, eval_handle_noop);