Barre d'actions HD (PANEL1/PANEL2), désactivable dans F12
- Le jeu copie des bandes de lignes de PANEL1.PCX (verbes en texte) et PANEL2.PCX (icônes) sous le décor (lignes 140-199) ; le panneau d'options en superpose plusieurs, des deux planches. hd.c rapproche chaque ligne d'écran de sa ligne de planche (correspondance précédente, suite de la ligne du dessus, sinon recherche avec premier tri sur 8 pixels) et fournit des bandes (planche, ligne source) ; ce qui est dessiné par-dessus reste au jeu. - gfx_gl.c : deuxième couche HD, une bande par quad (u_vrange dans FS_HD), dessinée entre le décor et les sprites ; fonctionne aussi sans décor HD. - Menu F12 : « Barre d'actions HD » (clé display.hd_panel), sous « Pack HD ». Pas des lignes du menu 34 -> 32 px pour la place. - hd_export.py : PANEL1, PANEL2 exportés par défaut avec les décors. - docs/SETTINGS.md, docs/MODS.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
313435132d
commit
2c31978cae
10 files changed
+284
-34
No files matched your search
+7
-3
@@ -56,7 +56,7 @@ Le pack HD remplace à l'écran les **décors** du jeu par des images haute déf
|
||||
3. Chaque pixel de l'écran identique au pixel du décor d'origine laisse voir l'image HD. Les autres pixels (personnages, objets, panneau) restent ceux du jeu.
|
||||
4. Les fondus de palette (entrée et sortie de pièce, nuit…) sont appliqués à l'image HD.
|
||||
|
||||
Le moteur n'a besoin d'aucune connaissance du jeu, et un pack incomplet fonctionne : un décor sans PNG reste en 320×200. Les filtres `nearest`, `smooth` et `xbr` s'appliquent à la couche du jeu. Le filtre `crt` affiche l'image d'origine, sans le pack HD. La touche **F10** active ou coupe tout le pack en cours de partie, avec un fondu (clé `hd_pack`, enregistrée). Dans le menu F12, « Pack HD (mods) » fait la même chose ; en dessous, « Décors HD » (`hd_decors`) et « Personnages et objets HD » (`hd_sprites`) coupent une partie seulement, par exemple pour garder les décors HD avec les sprites d'origine.
|
||||
Le moteur n'a besoin d'aucune connaissance du jeu, et un pack incomplet fonctionne : un décor sans PNG reste en 320×200. Les filtres `nearest`, `smooth` et `xbr` s'appliquent à la couche du jeu. Le filtre `crt` affiche l'image d'origine, sans le pack HD. La touche **F10** active ou coupe tout le pack en cours de partie, avec un fondu (clé `hd_pack`, enregistrée). Dans le menu F12, « Pack HD (mods) » fait la même chose ; en dessous, « Décors HD » (`hd_decors`), « Personnages et objets HD » (`hd_sprites`) et « Barre d'actions HD » (`hd_panel`) coupent une partie seulement, par exemple pour garder les décors HD avec les sprites d'origine.
|
||||
|
||||
### Règles pour les images
|
||||
|
||||
@@ -84,7 +84,11 @@ python tools/hd_export.py ..\extracted\iso\TUCKER mods\hd_upscayl\hd --upscayl
|
||||
python tools/hd_export.py ..\extracted\iso\TUCKER export_png
|
||||
```
|
||||
|
||||
Cette commande exporte les décors en PNG 320×200. Agrandissez-les avec l'outil de votre choix (retouche à la main, waifu2x, ESRGAN…), puis déposez-les dans `mods/<nom>/hd/` sous le même nom. `--echelle 2` ou `--echelle 4` produit directement un agrandissement Scale2x, sans flou, pour essayer un pack tout de suite. `--motif` choisit les fichiers, en liste séparée par des virgules (par défaut `LOC*` et les 24 images fixes des cinématiques et des écrans de partie : `CLIO1`, `MAP1`, `NEWS1`, `PT1BAK`… ; liste complète : `CINEMATIQUES` dans `tools/hd_export.py`). Le moteur les affiche en HD comme les décors.
|
||||
Cette commande exporte les décors en PNG 320×200. Agrandissez-les avec l'outil de votre choix (retouche à la main, waifu2x, ESRGAN…), puis déposez-les dans `mods/<nom>/hd/` sous le même nom. `--echelle 2` ou `--echelle 4` produit directement un agrandissement Scale2x, sans flou, pour essayer un pack tout de suite. `--motif` choisit les fichiers, en liste séparée par des virgules (par défaut `LOC*` et les 24 images fixes des cinématiques et des écrans de partie : `CLIO1`, `MAP1`, `NEWS1`, `PT1BAK`… ; liste complète : `CINEMATIQUES` dans `tools/hd_export.py` ; plus la barre d'actions `PANEL1`, `PANEL2`). Le moteur les affiche en HD comme les décors.
|
||||
|
||||
## Barre d'actions HD
|
||||
|
||||
La barre d'actions (verbes et inventaire) et le panneau d'options du jeu viennent de deux planches 320×200 : `PANEL1.PCX` (verbes en texte) et `PANEL2.PCX` (verbes en icônes). Le jeu en copie des bandes de lignes sous le décor, sur les 60 lignes du bas de l'écran ; le panneau d'options en superpose plusieurs, des deux planches. Avec `hd/PANEL1.png` et `hd/PANEL2.png` (même cadrage que la planche, 1280×800 pour ×4), le moteur rapproche chaque ligne d'écran de sa ligne de planche et dessine les bandes HD correspondantes ; ce que le jeu dessine par-dessus (objets d'inventaire, texte de l'action, curseur) reste au jeu ou passe par les sprites HD. `hd_export.py` les exporte par défaut avec les décors. Réglage : « Barre d'actions HD » dans F12 (`hd_panel`).
|
||||
|
||||
## Sprites HD
|
||||
|
||||
@@ -123,6 +127,6 @@ python tools/hd_export.py ..\extracted\iso\TUCKER mods\hd_upscayl\hd --sans-deco
|
||||
|
||||
- Lister les mods : sous-dossiers de `mods/` dont le nom ne commence ni par `_` ni par `.`, avec `mod.ini` pour le nom affiché. Un mod a des décors HD s'il contient `hd/*.png`.
|
||||
- Activer ou désactiver un mod : écrire la liste dans `[mods] disabled` de `settings.ini`. La liste est prise en compte au lancement suivant.
|
||||
- Pack HD on/off : clé `[display] hd_pack`, également réglable en jeu (F10, ou F12). Sous-réglages : `hd_decors` (décors HD) et `hd_sprites` (personnages et objets HD), sans effet si `hd_pack=0`.
|
||||
- Pack HD on/off : clé `[display] hd_pack`, également réglable en jeu (F10, ou F12). Sous-réglages : `hd_decors` (décors HD), `hd_sprites` (personnages et objets HD) et `hd_panel` (barre d'actions HD), sans effet si `hd_pack=0`.
|
||||
- Un mod a des sprites HD s'il contient `hd/SHEETS/*.png` ou `hd/SPRITES/*.png`.
|
||||
- Options pour une seule session : `--mods DOSSIER`, `--sans-mods`, `--sans-hd`.
|
||||
+4
-2
@@ -34,6 +34,7 @@ vsync=0
|
||||
hd_pack=1
|
||||
hd_decors=1
|
||||
hd_sprites=1
|
||||
hd_panel=1
|
||||
|
||||
[audio]
|
||||
master_volume=100
|
||||
@@ -59,9 +60,10 @@ disabled=
|
||||
| `filter` | `nearest`, `smooth`, `xbr`, `crt` | `nearest` | Filtre d'image (voir ci-dessous) |
|
||||
| `aspect_43` | `0` / `1` | `1` | `1` : image 320×200 étirée en 4:3, comme sur un écran VGA. `0` : pixels carrés (16:10) |
|
||||
| `vsync` | `0` / `1` | `0` | Synchronisation verticale |
|
||||
| `hd_pack` | `0` / `1` | `1` | Pack HD fourni par les mods (voir [MODS.md](MODS.md)) : interrupteur général des deux clés suivantes. Sans effet si aucun mod ne fournit d'images HD, et avec le filtre `crt` |
|
||||
| `hd_pack` | `0` / `1` | `1` | Pack HD fourni par les mods (voir [MODS.md](MODS.md)) : interrupteur général des trois clés suivantes. Sans effet si aucun mod ne fournit d'images HD, et avec le filtre `crt` |
|
||||
| `hd_decors` | `0` / `1` | `1` | Décors HD du pack |
|
||||
| `hd_sprites` | `0` / `1` | `1` | Personnages, objets et curseur HD du pack (sprites) |
|
||||
| `hd_panel` | `0` / `1` | `1` | Barre d'actions et panneau d'options du jeu HD (`PANEL1`, `PANEL2` du pack) |
|
||||
|
||||
Filtres :
|
||||
|
||||
@@ -91,7 +93,7 @@ Les volumes sont des pourcentages de curseur. Le mixeur applique une courbe quad
|
||||
| `dir` | chemin | vide | Dossier des mods. Vide : `mods` à côté de l'exécutable, sinon `mods` dans le dossier parent (cas de `build\tucker.exe`), sinon `mods` dans le dossier courant |
|
||||
| `disabled` | noms séparés par des virgules | vide | Mods (noms de dossiers) à ignorer, par exemple `disabled=hd_upscayl,voix_fr` |
|
||||
|
||||
Les mods sont lus au démarrage : un changement de `[mods]` prend effet au lancement suivant. `hd_pack`, `hd_decors` et `hd_sprites`, eux, s'appliquent tout de suite depuis le menu F12 ; la touche F10 bascule `hd_pack` en cours de partie, avec un fondu. Le format des mods est décrit dans [MODS.md](MODS.md).
|
||||
Les mods sont lus au démarrage : un changement de `[mods]` prend effet au lancement suivant. `hd_pack`, `hd_decors`, `hd_sprites` et `hd_panel`, eux, s'appliquent tout de suite depuis le menu F12 ; la touche F10 bascule `hd_pack` en cours de partie, avec un fondu. Le format des mods est décrit dans [MODS.md](MODS.md).
|
||||
|
||||
## Ligne de commande
|
||||
|
||||
|
||||
@@ -24,6 +24,13 @@ int gfx_hd_load(int part, const uint32_t *argb, int w, int h); /* 0 si l'image
|
||||
/* état de l'image suivante : offset = colonne d'origine affichée à gauche ; tint = facteur de couleur (fondus) */
|
||||
void gfx_hd_frame(int active, int parts, int offset, const float tint[3]);
|
||||
|
||||
/* Barre d'actions HD : planches PANEL1/PANEL2 (320×200 d'origine), dessinées par bandes de lignes sur le décor */
|
||||
#define GFX_PANELS 2
|
||||
#define GFX_PANEL_RUNS 12
|
||||
typedef struct { int y0, y1, sheet, src_y; } GfxRun; /* lignes d'écran [y0, y1) ← planche, à partir de src_y */
|
||||
int gfx_panel_load(int sheet, const uint32_t *argb, int w, int h); /* argb NULL : planche retirée */
|
||||
void gfx_panel_frame(int n, const GfxRun *runs, const float tint[3]); /* n = 0 : pas de barre HD */
|
||||
|
||||
/* Sprites HD : une texture par image HD (planche de sprites), puis la liste des sprites de l'image suivante,
|
||||
* dessinés dans l'ordre sur le décor, sous l'image du jeu. */
|
||||
#define GFX_SPR_TEX 128 /* textures de sprites chargées en même temps */
|
||||
|
||||
+60
-8
@@ -106,11 +106,13 @@ static const char *FS_HD = FS_HEAD
|
||||
"uniform sampler2D u_hd0, u_hd1, u_hd2, u_hd3;\n"
|
||||
"uniform float u_offset;\n"
|
||||
"uniform int u_parts;\n"
|
||||
"uniform vec2 u_vrange;\n" /* lignes de l'image affichées : (0, 1) pour un décor, une bande pour la barre */
|
||||
"void main() {\n"
|
||||
" float gx = (v_uv.x * 320.0 + u_offset) / 320.0;\n"
|
||||
" float gy = mix(u_vrange.x, u_vrange.y, v_uv.y);\n"
|
||||
" int i = clamp(int(floor(gx)), 0, u_parts - 1);\n"
|
||||
" vec2 uv = vec2(gx - float(i), v_uv.y);\n"
|
||||
" vec2 dx = dFdx(vec2(gx, v_uv.y)), dy = dFdy(vec2(gx, v_uv.y));\n"
|
||||
" vec2 uv = vec2(gx - float(i), gy);\n"
|
||||
" vec2 dx = dFdx(vec2(gx, gy)), dy = dFdy(vec2(gx, gy));\n"
|
||||
" vec4 c;\n"
|
||||
" if (i == 0) c = textureGrad(u_hd0, uv, dx, dy);\n"
|
||||
" else if (i == 1) c = textureGrad(u_hd1, uv, dx, dy);\n"
|
||||
@@ -244,6 +246,10 @@ static int game_w = 320, game_h = 200;
|
||||
static GLuint tex_hd[GFX_HD_PARTS];
|
||||
static int hd_w[GFX_HD_PARTS];
|
||||
static struct { int active, parts, offset; float tint[3]; } hd;
|
||||
static GLuint tex_panel[GFX_PANELS];
|
||||
static int panel_ok[GFX_PANELS], panel_n;
|
||||
static GfxRun panel_runs[GFX_PANEL_RUNS];
|
||||
static float panel_tint[3];
|
||||
/* sprites HD */
|
||||
static GLuint spr_tex[GFX_SPR_TEX], tex_mask;
|
||||
static int has_dxt; /* GL_EXT_texture_compression_s3tc */
|
||||
@@ -355,6 +361,7 @@ void gfx_shutdown(void) {
|
||||
if (tex_ovl) glDeleteTextures(1, &tex_ovl);
|
||||
if (tex_xbr) glDeleteTextures(1, &tex_xbr);
|
||||
for (i = 0; i < GFX_HD_PARTS; i++) if (tex_hd[i]) glDeleteTextures(1, &tex_hd[i]);
|
||||
for (i = 0; i < GFX_PANELS; i++) if (tex_panel[i]) glDeleteTextures(1, &tex_panel[i]);
|
||||
for (i = 0; i < GFX_SPR_TEX; i++) if (spr_tex[i]) glDeleteTextures(1, &spr_tex[i]);
|
||||
if (tex_mask) glDeleteTextures(1, &tex_mask);
|
||||
if (vao) p_glDeleteVertexArrays(1, &vao);
|
||||
@@ -370,24 +377,44 @@ void gfx_set_overlay(const uint32_t *argb, int w, int h) {
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_BGRA, GL_UNSIGNED_BYTE, argb);
|
||||
}
|
||||
|
||||
int gfx_hd_load(int part, const uint32_t *argb, int w, int h) {
|
||||
/* image HD plein écran (décor, planche de la barre) → texture avec mipmaps ; 0 si trop grande */
|
||||
static int upload_hd(GLuint *tex, const uint32_t *argb, int w, int h) {
|
||||
GLint max = 0;
|
||||
if (part < 0 || part >= GFX_HD_PARTS) return 0;
|
||||
hd_w[part] = 0;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max);
|
||||
if (w > max || h > max) { fprintf(stderr, "[gfx] image HD %dx%d trop grande (max %d)\n", w, h, max); return 0; }
|
||||
if (!tex_hd[part]) glGenTextures(1, &tex_hd[part]);
|
||||
glBindTexture(GL_TEXTURE_2D, tex_hd[part]);
|
||||
if (!*tex) glGenTextures(1, tex);
|
||||
glBindTexture(GL_TEXTURE_2D, *tex);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, argb);
|
||||
p_glGenerateMipmap(GL_TEXTURE_2D);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int gfx_hd_load(int part, const uint32_t *argb, int w, int h) {
|
||||
if (part < 0 || part >= GFX_HD_PARTS) return 0;
|
||||
hd_w[part] = 0;
|
||||
if (!upload_hd(&tex_hd[part], argb, w, h)) return 0;
|
||||
hd_w[part] = w;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int gfx_panel_load(int sheet, const uint32_t *argb, int w, int h) {
|
||||
if (sheet < 0 || sheet >= GFX_PANELS) return 0;
|
||||
panel_ok[sheet] = argb && upload_hd(&tex_panel[sheet], argb, w, h);
|
||||
return panel_ok[sheet];
|
||||
}
|
||||
|
||||
void gfx_panel_frame(int n, const GfxRun *runs, const float tint[3]) {
|
||||
int i;
|
||||
panel_n = 0;
|
||||
for (i = 0; i < n && i < GFX_PANEL_RUNS; i++)
|
||||
if (runs[i].sheet >= 0 && runs[i].sheet < GFX_PANELS && panel_ok[runs[i].sheet]) panel_runs[panel_n++] = runs[i];
|
||||
for (i = 0; i < 3; i++) panel_tint[i] = tint ? tint[i] : 1.f;
|
||||
}
|
||||
|
||||
void gfx_hd_frame(int active, int parts, int offset, const float tint[3]) {
|
||||
int i;
|
||||
hd.active = active && parts > 0 && parts <= GFX_HD_PARTS;
|
||||
@@ -411,11 +438,35 @@ static void draw_hd(GfxRect g, int out_h) {
|
||||
p_glActiveTexture(GL_TEXTURE0);
|
||||
p_glUniform1f(p_glGetUniformLocation(p->id, "u_offset"), (float)hd.offset);
|
||||
p_glUniform1i(p_glGetUniformLocation(p->id, "u_parts"), hd.parts);
|
||||
p_glUniform2f(p_glGetUniformLocation(p->id, "u_vrange"), 0.f, 1.f);
|
||||
p_glUniform4f(p->color, hd.tint[0], hd.tint[1], hd.tint[2], 1.f);
|
||||
if (p->flip >= 0) p_glUniform1f(p->flip, 1.f);
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
}
|
||||
|
||||
/* barre d'actions : chaque bande de lignes d'écran reçoit les lignes correspondantes de sa planche HD */
|
||||
static void draw_panel(GfxRect g, int out_h) {
|
||||
const Prog *p = &prog[PG_HD];
|
||||
GLint u_v = p_glGetUniformLocation(p->id, "u_vrange");
|
||||
int i;
|
||||
p_glUseProgram(p->id);
|
||||
p_glActiveTexture(GL_TEXTURE0);
|
||||
p_glUniform1i(p_glGetUniformLocation(p->id, "u_hd0"), 0);
|
||||
p_glUniform1f(p_glGetUniformLocation(p->id, "u_offset"), 0.f);
|
||||
p_glUniform1i(p_glGetUniformLocation(p->id, "u_parts"), 1);
|
||||
p_glUniform4f(p->color, panel_tint[0], panel_tint[1], panel_tint[2], 1.f);
|
||||
if (p->flip >= 0) p_glUniform1f(p->flip, 1.f);
|
||||
for (i = 0; i < panel_n; i++) {
|
||||
const GfxRun *r = &panel_runs[i];
|
||||
int top = g.y + (int)((double)g.h * r->y0 / 200.0 + 0.5), bot = g.y + (int)((double)g.h * r->y1 / 200.0 + 0.5);
|
||||
if (bot <= top) continue;
|
||||
glBindTexture(GL_TEXTURE_2D, tex_panel[r->sheet]);
|
||||
glViewport(g.x, out_h - bot, g.w, bot - top);
|
||||
p_glUniform2f(u_v, (float)r->src_y / 200.f, (float)(r->src_y + r->y1 - r->y0) / 200.f);
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
}
|
||||
}
|
||||
|
||||
int gfx_spr_tex_load(const uint32_t *argb, int w, int h) {
|
||||
GLint max = 0;
|
||||
int i;
|
||||
@@ -529,8 +580,9 @@ void gfx_draw(int out_w, int out_h, int filter, int game_aspect_h, float veil, f
|
||||
glClearColor(0, 0, 0, 1);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
if (target_fb) glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); /* copie pour le fondu : reste opaque */
|
||||
if ((hd.active || spr_n) && filter != FILTER_CRT) {
|
||||
if ((hd.active || panel_n || spr_n) && filter != FILTER_CRT) {
|
||||
if (hd.active) draw_hd(g, out_h);
|
||||
if (panel_n) draw_panel(g, out_h);
|
||||
if (spr_n) draw_sprites(g, out_h);
|
||||
glEnable(GL_BLEND); /* image du jeu par-dessus, transparente là où le décor ou un sprite HD la remplace */
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
+138
-9
@@ -29,12 +29,60 @@ static int enabled = 1, next_id = 1;
|
||||
static int sx[NSAMPLES], sy[NSAMPLES];
|
||||
static const char *png_ptr[HD_MAX_PARTS];
|
||||
|
||||
/* planches de la barre d'actions (voir hd.h) */
|
||||
#define PANEL_ROWS 188 /* lignes utiles des planches PANEL (le reste est vide) */
|
||||
#define ROW_PROBE 8 /* premier tri : 8 pixels par ligne */
|
||||
#define ROW_SAMPLES 40 /* puis 40 */
|
||||
#define ROW_MATCH 30 /* 75 % : les objets d'inventaire et le texte couvrent une partie de la ligne */
|
||||
static const char *const panel_names[HD_PANELS] = {"PANEL1", "PANEL2"};
|
||||
typedef struct {
|
||||
int loaded;
|
||||
char png[600];
|
||||
uint8_t pix[W0 * H0];
|
||||
uint8_t pal[768], used[256];
|
||||
uint8_t flat[H0]; /* ligne d'une seule couleur : ne permet pas de reconnaître la ligne */
|
||||
} Panel;
|
||||
static Panel panels[HD_PANELS];
|
||||
static int panel_enabled = 1, panel_id = 1;
|
||||
static signed char row_sheet[H0]; /* dernière correspondance de chaque ligne d'écran ; -1 : aucune */
|
||||
static uint8_t row_src[H0];
|
||||
static const char *panel_ptr[HD_PANELS];
|
||||
|
||||
void hd_set_enabled(int on) { enabled = on; }
|
||||
void hd_set_panel_enabled(int on) { panel_enabled = on; }
|
||||
int hd_enabled(void) { return enabled; }
|
||||
|
||||
void hd_reset(void) {
|
||||
int i;
|
||||
for (i = 0; i < NSTRIPS; i++) { free(strips[i].pix); memset(&strips[i], 0, sizeof strips[i]); }
|
||||
for (i = 0; i < HD_PANELS; i++) panels[i].loaded = 0;
|
||||
}
|
||||
|
||||
/* planche de la barre d'actions : 1 si le nom en est une (chargée ou non) */
|
||||
static int panel_opened(const char *name, const char *host_path, const char *png) {
|
||||
int k, y, x;
|
||||
Panel *p;
|
||||
for (k = 0; k < HD_PANELS && strcmp(name, panel_names[k]); k++) {}
|
||||
if (k == HD_PANELS) return 0;
|
||||
p = &panels[k];
|
||||
if (p->loaded && !strcmp(p->png, png)) return 1; /* rouverte à chaque changement de pièce */
|
||||
p->loaded = 0;
|
||||
if (!hd_read_pcx(host_path, p->pix, p->pal)) return 1;
|
||||
memset(p->used, 0, sizeof p->used);
|
||||
for (y = 0; y < H0; y++) {
|
||||
const uint8_t *row = p->pix + y * W0;
|
||||
p->flat[y] = 1;
|
||||
for (x = 0; x < W0; x++) {
|
||||
p->used[row[x]] = 1;
|
||||
if (row[x] != row[0]) p->flat[y] = 0;
|
||||
}
|
||||
}
|
||||
snprintf(p->png, sizeof p->png, "%s", png);
|
||||
p->loaded = 1;
|
||||
panel_id++;
|
||||
memset(row_sheet, -1, sizeof row_sheet);
|
||||
if (rt_cfg.verbose) fprintf(stderr, "[hd] %s : barre d'actions (%s)\n", name, png);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* PCX 320×200 8 bits → indices + palette ; 0 si format inattendu */
|
||||
@@ -95,6 +143,7 @@ void hd_file_opened(const char *rel, const char *host_path) {
|
||||
if (len < 5 || strcmp(base + len - 4, ".PCX")) return; /* noté même désactivé : réactivable en jeu */
|
||||
snprintf(name, sizeof name, "%.*s", (int)(len - 4), base);
|
||||
if (!mods_find_hd(name, png, sizeof png)) return;
|
||||
if (panel_opened(name, host_path, png)) return;
|
||||
split_name(base, stem, sizeof stem, &letter);
|
||||
/* morceau suivant d'une pièce en plusieurs parties (LOCxxB juste après LOCxxA…) */
|
||||
if (!(letter && s->pix && s->last && letter == s->last + 1 && s->parts < HD_MAX_PARTS && !strcmp(s->stem, stem))) {
|
||||
@@ -146,30 +195,29 @@ static int score_at(const Strip *s, const uint8_t *fb, int off) {
|
||||
}
|
||||
|
||||
/* fondu : rapport entre palette courante et palette du décor, s'il s'agit bien d'un simple facteur */
|
||||
static int palette_tint(const Strip *s, const uint8_t *dac, float tint[3]) {
|
||||
static int palette_tint(const uint8_t *used, const uint8_t *pal, const uint8_t *dac, float tint[3]) {
|
||||
double cur[3] = {0}, org[3] = {0}, err = 0, tot = 0;
|
||||
int i, c;
|
||||
for (i = 0; i < 256; i++)
|
||||
if (s->used[i])
|
||||
if (used[i])
|
||||
for (c = 0; c < 3; c++) {
|
||||
int v = dac[i * 3 + c] & 63;
|
||||
cur[c] += (v << 2 | v >> 4);
|
||||
org[c] += s->pal[i * 3 + c];
|
||||
org[c] += pal[i * 3 + c];
|
||||
}
|
||||
for (c = 0; c < 3; c++) tint[c] = (float)((cur[c] + 1.0) / (org[c] + 1.0));
|
||||
for (i = 0; i < 256; i++)
|
||||
if (s->used[i])
|
||||
if (used[i])
|
||||
for (c = 0; c < 3; c++) {
|
||||
int v = dac[i * 3 + c] & 63;
|
||||
err += fabs((v << 2 | v >> 4) - tint[c] * s->pal[i * 3 + c]);
|
||||
tot += s->pal[i * 3 + c];
|
||||
err += fabs((v << 2 | v >> 4) - tint[c] * pal[i * 3 + c]);
|
||||
tot += pal[i * 3 + c];
|
||||
}
|
||||
return tot <= 0 || err / tot < 0.12;
|
||||
}
|
||||
|
||||
int hd_compose(const uint8_t *fb, const uint8_t *dac, uint8_t *mask, HdFrame *out) {
|
||||
static int compose_decor(const uint8_t *fb, const uint8_t *dac, uint8_t *mask, HdFrame *out) {
|
||||
int k, best_k = -1, best_off = 0, best = 0, x, y, i;
|
||||
memset(out, 0, sizeof *out);
|
||||
if (!enabled || !strips[0].pix) return 0;
|
||||
if (!sx[0] && !sy[0]) init_samples();
|
||||
for (k = 0; k < NSTRIPS; k++) {
|
||||
@@ -196,7 +244,7 @@ int hd_compose(const uint8_t *fb, const uint8_t *dac, uint8_t *mask, HdFrame *ou
|
||||
{
|
||||
Strip *s = &strips[best_k];
|
||||
int w = s->parts * W0;
|
||||
if (!palette_tint(s, dac, out->tint)) return 0;
|
||||
if (!palette_tint(s->used, s->pal, dac, out->tint)) return 0;
|
||||
for (y = 0; y < H0; y++) {
|
||||
const uint8_t *bg = s->pix + (size_t)y * w + best_off, *row = fb + y * W0;
|
||||
uint8_t *m = mask + y * W0;
|
||||
@@ -213,3 +261,84 @@ int hd_compose(const uint8_t *fb, const uint8_t *dac, uint8_t *mask, HdFrame *ou
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ barre d'actions */
|
||||
static int row_score(const uint8_t *a, const uint8_t *b, int need_probe) {
|
||||
int i, n = 0;
|
||||
for (i = 0; i < ROW_PROBE; i++) n += a[20 + i * 40] == b[20 + i * 40];
|
||||
if (n < need_probe) return 0;
|
||||
for (i = n = 0; i < ROW_SAMPLES; i++) n += a[4 + i * 8] == b[4 + i * 8];
|
||||
return n;
|
||||
}
|
||||
|
||||
/* ligne d'écran y → (planche, ligne) : correspondance précédente, sinon suite de la ligne du dessus, sinon
|
||||
* recherche dans les deux planches (8 pixels d'abord, pour écarter vite les mauvaises lignes) */
|
||||
static void match_row(const uint8_t *row, int y) {
|
||||
int k = row_sheet[y], py = row_src[y], kk, pp, best = 0;
|
||||
if (k >= 0 && panels[k].loaded && row_score(row, panels[k].pix + py * W0, 0) >= ROW_MATCH) return;
|
||||
k = y > HD_PANEL_Y0 ? row_sheet[y - 1] : -1;
|
||||
py = k >= 0 ? row_src[y - 1] + 1 : 0;
|
||||
if (k >= 0 && py < PANEL_ROWS && !panels[k].flat[py] && row_score(row, panels[k].pix + py * W0, 0) >= ROW_MATCH) {
|
||||
row_sheet[y] = (signed char)k;
|
||||
row_src[y] = (uint8_t)py;
|
||||
return;
|
||||
}
|
||||
row_sheet[y] = -1;
|
||||
for (kk = 0; kk < HD_PANELS; kk++) {
|
||||
if (!panels[kk].loaded) continue;
|
||||
for (pp = 0; pp < PANEL_ROWS; pp++) {
|
||||
int v;
|
||||
if (panels[kk].flat[pp]) continue;
|
||||
v = row_score(row, panels[kk].pix + pp * W0, ROW_PROBE * 5 / 8);
|
||||
if (v >= ROW_MATCH && v > best) { best = v; row_sheet[y] = (signed char)kk; row_src[y] = (uint8_t)pp; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int compose_panel(const uint8_t *fb, const uint8_t *dac, HdFrame *out) {
|
||||
int y, k, n = 0, used_sheet = -1;
|
||||
if (!panel_enabled) return 0;
|
||||
for (k = 0; k < HD_PANELS && !panels[k].loaded; k++) {}
|
||||
if (k == HD_PANELS) return 0;
|
||||
for (y = HD_PANEL_Y0; y < H0; y++) {
|
||||
match_row(fb + y * W0, y);
|
||||
k = row_sheet[y];
|
||||
if (k < 0) continue;
|
||||
if (n && out->runs[n - 1].y1 == y && out->runs[n - 1].sheet == k
|
||||
&& out->runs[n - 1].src_y + (y - out->runs[n - 1].y0) == row_src[y])
|
||||
out->runs[n - 1].y1 = y + 1;
|
||||
else if (n < HD_MAX_RUNS) {
|
||||
out->runs[n].y0 = y;
|
||||
out->runs[n].y1 = y + 1;
|
||||
out->runs[n].sheet = k;
|
||||
out->runs[n].src_y = row_src[y];
|
||||
n++;
|
||||
}
|
||||
if (used_sheet < 0) used_sheet = k;
|
||||
}
|
||||
if (!n || !palette_tint(panels[used_sheet].used, panels[used_sheet].pal, dac, out->panel_tint)) return 0;
|
||||
out->nruns = n;
|
||||
out->panel_id = panel_id;
|
||||
for (k = 0; k < HD_PANELS; k++) {
|
||||
panel_ptr[k] = panels[k].loaded ? panels[k].png : NULL;
|
||||
out->panel_png[k] = panel_ptr[k];
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int hd_compose(const uint8_t *fb, const uint8_t *dac, uint8_t *mask, HdFrame *out) {
|
||||
int decor, i, y, x;
|
||||
memset(out, 0, sizeof *out);
|
||||
decor = compose_decor(fb, dac, mask, out);
|
||||
if (!compose_panel(fb, dac, out) && !decor) return 0;
|
||||
if (!decor) memset(mask, 255, W0 * H0);
|
||||
for (i = 0; i < out->nruns; i++) {
|
||||
const HdRun *r = &out->runs[i];
|
||||
for (y = r->y0; y < r->y1; y++) {
|
||||
const uint8_t *src = panels[r->sheet].pix + (r->src_y + y - r->y0) * W0, *row = fb + y * W0;
|
||||
uint8_t *m = mask + y * W0;
|
||||
for (x = 0; x < W0; x++) m[x] = row[x] == src[x] ? 0 : 255;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
+22
-2
@@ -9,6 +9,18 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#define HD_MAX_PARTS 4
|
||||
/* Barre d'actions et panneaux du jeu (PANEL1.PCX : verbes en texte, PANEL2.PCX : en icônes) : le jeu en copie des
|
||||
* bandes de lignes entières sous le décor (lignes HD_PANEL_Y0 à 199), parfois plusieurs bandes de planches
|
||||
* différentes l'une sur l'autre (panneau d'options). Chaque ligne d'écran est rapprochée d'une ligne de planche. */
|
||||
#define HD_PANELS 2
|
||||
#define HD_PANEL_Y0 140
|
||||
#define HD_MAX_RUNS 12
|
||||
|
||||
typedef struct {
|
||||
int y0, y1; /* lignes d'écran [y0, y1) */
|
||||
int sheet; /* 0 = PANEL1, 1 = PANEL2 */
|
||||
int src_y; /* ligne de la planche affichée en y0 */
|
||||
} HdRun;
|
||||
|
||||
typedef struct {
|
||||
int active; /* 1 : dessiner l'image HD sous l'image du jeu */
|
||||
@@ -19,12 +31,20 @@ typedef struct {
|
||||
float tint[3]; /* multiplicateur de couleur (fondus) */
|
||||
const uint8_t *bg; /* décor d'origine sous l'écran (indices), ligne y = bg + y * bg_stride */
|
||||
int bg_stride;
|
||||
/* barre d'actions et panneaux HD */
|
||||
int panel_id; /* change quand une planche HD est chargée : textures à recharger */
|
||||
const char *panel_png[HD_PANELS]; /* NULL si la planche n'a pas d'image HD */
|
||||
int nruns;
|
||||
HdRun runs[HD_MAX_RUNS];
|
||||
float panel_tint[3];
|
||||
} HdFrame;
|
||||
|
||||
void hd_set_enabled(int on);
|
||||
void hd_set_enabled(int on); /* décors HD */
|
||||
void hd_set_panel_enabled(int on); /* barre d'actions et panneaux HD */
|
||||
int hd_enabled(void);
|
||||
void hd_reset(void);
|
||||
int hd_read_pcx(const char *path, uint8_t *pix, uint8_t *pal); /* PCX 320×200 8 bits : 1 si lu */
|
||||
void hd_file_opened(const char *rel, const char *host_path); /* appelé par dos.c à chaque ouverture */
|
||||
/* fb : écran 320×200 en indices ; dac : palette VGA 6 bits ; mask : 320×200, 0 = HD, 255 = pixel du jeu */
|
||||
/* fb : écran 320×200 en indices ; dac : palette VGA 6 bits ; mask : 320×200, 0 = HD, 255 = pixel du jeu.
|
||||
* 1 si un décor HD (out->active) ou une bande de panneau HD (out->nruns) est à l'écran ; mask est alors rempli. */
|
||||
int hd_compose(const uint8_t *fb, const uint8_t *dac, uint8_t *mask, HdFrame *out);
|
||||
+35
-5
@@ -153,6 +153,7 @@ static void apply_display(void) {
|
||||
}
|
||||
if (settings.vsync != done_vsync) SDL_GL_SetSwapInterval(settings.vsync ? 1 : 0);
|
||||
hd_set_enabled(settings.hd_pack && settings.hd_decors);
|
||||
hd_set_panel_enabled(settings.hd_pack && settings.hd_panel);
|
||||
redraw = 1;
|
||||
done_scale = settings.window_scale; done_w = settings.window_width; done_h = settings.window_height;
|
||||
done_fmt = settings.aspect_43; done_full = settings.fullscreen;
|
||||
@@ -288,6 +289,21 @@ static int load_hd_set(const HdFrame *f) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* planches HD de la barre d'actions ; rechargées quand hd.c en charge une nouvelle */
|
||||
static int panel_loaded_id = -1;
|
||||
|
||||
static void load_panels(const HdFrame *f) {
|
||||
int i;
|
||||
for (i = 0; i < HD_PANELS; i++) {
|
||||
int w = 0, h = 0;
|
||||
const char *err = NULL;
|
||||
uint32_t *img = f->panel_png[i] ? png_load(f->panel_png[i], &w, &h, &err) : NULL;
|
||||
if (f->panel_png[i] && !img) fprintf(stderr, "[hd] %s : %s\n", f->panel_png[i], err ? err : "illisible");
|
||||
gfx_panel_load(i, img, w, h);
|
||||
free(img);
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ cycle de vie */
|
||||
int host_init(int argc, char **argv) {
|
||||
int i;
|
||||
@@ -372,7 +388,7 @@ void host_frame(void) {
|
||||
uint32_t pal[256];
|
||||
const uint8_t *src = M + VGA_BASE;
|
||||
float toast = 0;
|
||||
int i, hd_on = 0, nspr;
|
||||
int i, hd_on = 0, panel_on = 0, nspr;
|
||||
HdFrame hf = {0};
|
||||
if (full_wait) { /* plein écran du démarrage : voir host_init */
|
||||
static uint64_t last, smooth;
|
||||
@@ -393,16 +409,29 @@ void host_frame(void) {
|
||||
pal[i] = 0xff000000u | (r << 2 | r >> 4) << 16 | (g << 2 | g >> 4) << 8 | (b << 2 | b >> 4);
|
||||
}
|
||||
if (settings.filter != FILTER_CRT && hd_compose(src, vga_dac, mask, &hf)) {
|
||||
if (hf.set_id != hd_loaded_id) { hd_loaded_id = hf.set_id; hd_loaded_ok = load_hd_set(&hf); }
|
||||
hd_on = hd_loaded_ok;
|
||||
if (hf.active && hf.set_id != hd_loaded_id) { hd_loaded_id = hf.set_id; hd_loaded_ok = load_hd_set(&hf); }
|
||||
hd_on = hf.active && hd_loaded_ok;
|
||||
if (hf.nruns && hf.panel_id != panel_loaded_id) { panel_loaded_id = hf.panel_id; load_panels(&hf); }
|
||||
panel_on = hf.nruns > 0;
|
||||
if (!hd_on && panel_on) /* décor non affiché en HD : seulement la barre */
|
||||
for (i = 0; i < HD_PANEL_Y0 * 320; i++) mask[i] = 255;
|
||||
}
|
||||
if (!hd_on) memset(mask, 255, sizeof mask);
|
||||
if (!hd_on && !panel_on) memset(mask, 255, sizeof mask);
|
||||
nspr = hds_compose(src, vga_dac, mask, hd_on ? hf.bg : NULL, hf.bg_stride,
|
||||
settings.filter != FILTER_CRT && settings.hd_pack && settings.hd_sprites);
|
||||
if (hd_on || nspr) for (i = 0; i < 320 * 200; i++) px[i] = (pal[src[i]] & 0xffffffu) | (uint32_t)mask[i] << 24;
|
||||
if (hd_on || panel_on || nspr) for (i = 0; i < 320 * 200; i++) px[i] = (pal[src[i]] & 0xffffffu) | (uint32_t)mask[i] << 24;
|
||||
else for (i = 0; i < 320 * 200; i++) px[i] = pal[src[i]];
|
||||
gfx_set_game(px, 320, 200);
|
||||
gfx_hd_frame(hd_on, hd_on ? hf.parts : 0, hd_on ? hf.offset : 0, hd_on ? hf.tint : NULL);
|
||||
{
|
||||
GfxRun runs[GFX_PANEL_RUNS];
|
||||
int n = panel_on ? hf.nruns : 0;
|
||||
for (i = 0; i < n && i < GFX_PANEL_RUNS; i++) {
|
||||
runs[i].y0 = hf.runs[i].y0; runs[i].y1 = hf.runs[i].y1;
|
||||
runs[i].sheet = hf.runs[i].sheet; runs[i].src_y = hf.runs[i].src_y;
|
||||
}
|
||||
gfx_panel_frame(n, runs, n ? hf.panel_tint : NULL);
|
||||
}
|
||||
if (toast_t0) { /* bulle « F12 : réglages » : 4 s, puis fondu d'1 s */
|
||||
double t = (double)(SDL_GetPerformanceCounter() - toast_t0) / (double)freq;
|
||||
if (t >= 5.0) toast_t0 = 0;
|
||||
@@ -427,6 +456,7 @@ static void toggle_hd(void) {
|
||||
if (settings.filter != FILTER_CRT && gfx_snapshot(w, h, settings.filter, game_h)) fade_t0 = SDL_GetPerformanceCounter();
|
||||
settings.hd_pack ^= 1;
|
||||
hd_set_enabled(settings.hd_pack && settings.hd_decors);
|
||||
hd_set_panel_enabled(settings.hd_pack && settings.hd_panel);
|
||||
settings_save(cfg_path);
|
||||
menu_draw_toast(ovl_px, settings.hd_pack ? "HD : activé (F10)" : "HD : désactivé (F10)");
|
||||
}
|
||||
|
||||
+5
-2
@@ -31,6 +31,7 @@ void settings_defaults(void) {
|
||||
settings.hd_pack = 1;
|
||||
settings.hd_decors = 1;
|
||||
settings.hd_sprites = 1;
|
||||
settings.hd_panel = 1;
|
||||
settings.mods_enabled = 1;
|
||||
settings.mods_dir[0] = 0;
|
||||
settings.mods_disabled[0] = 0;
|
||||
@@ -57,6 +58,7 @@ static const struct {
|
||||
{"display", "hd_pack", &settings.hd_pack, 0, 1, NULL},
|
||||
{"display", "hd_decors", &settings.hd_decors, 0, 1, NULL},
|
||||
{"display", "hd_sprites", &settings.hd_sprites, 0, 1, NULL},
|
||||
{"display", "hd_panel", &settings.hd_panel, 0, 1, NULL},
|
||||
{"audio", "master_volume", &settings.vol[VOL_GENERAL], 0, 100, NULL},
|
||||
{"audio", "music_volume", &settings.vol[VOL_MUSIQUE], 0, 100, NULL},
|
||||
{"audio", "voice_volume", &settings.vol[VOL_VOIX], 0, 100, NULL},
|
||||
@@ -424,13 +426,14 @@ static Item items[] = {
|
||||
{"Pack HD (mods)", IT_SWITCH, &settings.hd_pack, 0, 1, 1, NULL},
|
||||
{" Décors HD", IT_SWITCH, &settings.hd_decors, 0, 1, 1, NULL},
|
||||
{" Personnages et objets HD", IT_SWITCH, &settings.hd_sprites, 0, 1, 1, NULL},
|
||||
{" Barre d'actions HD", IT_SWITCH, &settings.hd_panel, 0, 1, 1, NULL},
|
||||
{NULL, IT_BUTTONS, NULL, 0, 1, 1, NULL},
|
||||
};
|
||||
#define N_ITEMS ((int)(sizeof items / sizeof items[0]))
|
||||
#define FIRST_DISPLAY 4
|
||||
#define ITEM_SCALE 5
|
||||
#define ITEM_HD 9
|
||||
#define ITEM_HD_LAST 11 /* Décors HD, Personnages et objets HD : sous l'interrupteur du pack */
|
||||
#define ITEM_HD_LAST 12 /* Décors, personnages et objets, barre d'actions : sous l'interrupteur du pack */
|
||||
|
||||
static int sel, button, dragging = -1, last_mx = -1, last_my = -1;
|
||||
|
||||
@@ -439,7 +442,7 @@ static int sel, button, dragging = -1, last_mx = -1, last_my = -1;
|
||||
#define PANEL_X1 810
|
||||
#define PANEL_Y0 40
|
||||
#define PANEL_Y1 700
|
||||
#define ROW_H 34
|
||||
#define ROW_H 32
|
||||
#define CTRL_X0 (PANEL_X0 + 330)
|
||||
#define CTRL_X1 (PANEL_X1 - 44)
|
||||
#define SLIDER_X1 (CTRL_X1 - 84)
|
||||
|
||||
+2
-1
@@ -20,9 +20,10 @@ typedef struct {
|
||||
int filter; /* FILTER_* */
|
||||
int aspect_43; /* 1 = 320×200 étiré en 4:3 comme sur un écran VGA, 0 = pixels carrés */
|
||||
int vsync; /* 0/1 */
|
||||
int hd_pack; /* 0/1 : pack HD des mods (interrupteur général des deux suivants) */
|
||||
int hd_pack; /* 0/1 : pack HD des mods (interrupteur général des trois suivants) */
|
||||
int hd_decors; /* 0/1 : décors HD */
|
||||
int hd_sprites; /* 0/1 : personnages et objets HD (sprites) */
|
||||
int hd_panel; /* 0/1 : barre d'actions et panneaux du jeu HD (PANEL1/PANEL2) */
|
||||
int mods_enabled; /* 0/1 : 0 = aucun mod (ni fichiers remplacés, ni pack HD) */
|
||||
char mods_dir[260]; /* dossier des mods ; vide = « mods » à côté de l'exécutable */
|
||||
char mods_disabled[512];/* noms de mods désactivés, séparés par des virgules */
|
||||
|
||||
+4
-2
@@ -10,7 +10,7 @@ puis on les dépose dans mods/<nom_du_mod>/hd/ sous le même nom et le même dos
|
||||
|
||||
--motif images plein écran à exporter, liste séparée par des virgules -> SORTIE/LOC01.png
|
||||
(défaut : LOC*, les décors des pièces, et les images fixes des cinématiques : CLIO1, MAP1,
|
||||
NEWS1, PT1BAK…, voir CINEMATIQUES)
|
||||
NEWS1, PT1BAK…, voir CINEMATIQUES, et la barre d'actions PANEL1, PANEL2)
|
||||
--sprites fichiers SPRITES\*.SPR à exporter (défaut : tous) -> SORTIE/SPRITES/<NOM>.png, une planche
|
||||
par fichier (puis <NOM>_P1.png… si elle déborde), images rangées comme le jeu les cherche
|
||||
--planches planches de sprites PCX (Bud, objets, curseur…) -> SORTIE/SHEETS/<NOM>.png
|
||||
@@ -286,6 +286,8 @@ def export_sheets(np, game, out, motif, scale):
|
||||
# Écartés : PT03A… ROCHPATH, PLATFORM (masques et chemins, jamais affichés).
|
||||
CINEMATIQUES = ("CLIO1,CLIO2,DICKDIGS,MAP1,MAP2,MEANW01,MEANW02,MEANW03,SOME01,SOME02,SOME03,NEWS1,NEWS2,"
|
||||
"PAPER_3,PHOTO,MEMO,POSTIT,PROFNOTE,PARTSCR,PT1BAK,PT2BAK,PT3BAK,CONGRAT,CONGRATS")
|
||||
# Barre d'actions et panneau d'options : verbes en texte (PANEL1) et en icônes (PANEL2), copiés par bandes sous le décor.
|
||||
PANNEAUX = "PANEL1,PANEL2"
|
||||
|
||||
|
||||
def export_backgrounds(game, out, motif, scale):
|
||||
@@ -412,7 +414,7 @@ def main():
|
||||
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
ap.add_argument("jeu")
|
||||
ap.add_argument("sortie")
|
||||
ap.add_argument("--motif", default="LOC*," + CINEMATIQUES)
|
||||
ap.add_argument("--motif", default="LOC*," + CINEMATIQUES + "," + PANNEAUX)
|
||||
ap.add_argument("--echelle", type=int, choices=(1, 2, 4), default=1)
|
||||
ap.add_argument("--sprites", nargs="?", const="*", metavar="MOTIF")
|
||||
ap.add_argument("--planches", nargs="?", const=SHEETS, metavar="MOTIF")
|
||||
|
||||
Reference in new issue
Block a user