Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Mensajes - adworgen

Páginas: [1]
1
He añadido estas líneas a trs y funciona correctamente en el juego; la traducción funciona.

Quizás tu archivo trs esté dañado. Asegúrate de usar el archivo "Translation.trs" que proporciona el juego o regenera trs con la última versión de AGSUnpacker.

2
¿Podrías darme ejemplos de estas frases? Este juego utiliza con frecuencia secuencias de escape similares a las de C (\n,\\,\", etc.), añadidas en versiones más recientes de AGS, que también deben estar presentes en el archivo trs.

3
El juego debería ser completamente traducible ahora sin modificar ningún archivo binario; sólo se debe traducir el archivo trs. Esto también significa que la traducción funcionará correctamente con futuras actualizaciones.

Cualquier problema con AGSUnpacker debe reportarse en GitHub. En este caso, game28.dta contiene bloques de extensión que aún no son compatibles con el programa de descompresión.

4
nralsd, debes incrementar el valor del cuarto byte desde el final del archivo header.bin usando cualquier editor hexadecimal.
Si tienes algún problema, aquí tienes un enlace a los archivos del parche preparados:
https://www.mediafire.com/file/m6232fnrk020y40/hobs_barrow_105_patch.zip

5
You're right, red and blue channels are swapped so it's BGR pixel format not RGB.
On top of that I converted image indices into palette incorrectly which resulted in a color shift to right by 1 pixel on green and red channels :rolleyes:

I've created a small tool to decode and encode LZS files. You can use it to convert LZS to TGA and TGA back to LZS.
TGA files can be opened by most graphical editors. You can modify image in any way you want, you can also replace original palette colors.
When ready to convert to LZS you should export image file as TGA with TrueColor colormap (palette) and without RLE compression (otherwise lzstool won't load it).

You can find lzstool and its source code (in C) in the attachment.

6
LZS file structure:
Código: [Seleccionar]
    uint8[4] signature = "LZSS"
    uint16 width
    uint16 height
    uint8[4] palette_signature = "CMAP"
    rgb[256] palette (in RGB format 24-bit for pixel)
    uint8[4] image_signature = "FORM"
    uint32 compressed_size
    uint8[compressed_size] compressed_image_data (indexes into palette)

The compression algorithm is LZSS (no big surprise here).
This code successfully decompressed this image:
Código: [Seleccionar]
    #define N         4096  /* size of ring buffer - must be power of 2 */
    #define F         18    /* upper limit for match_length */
    #define THRESHOLD 2     /* encode string into position and length
                               if match_length is greater than this */

    int decompress_lzss(
        u_int8_t       * dst,
        u_int32_t        dstlen,
        u_int8_t       * src,
        u_int32_t        srclen)
    {
        /* ring buffer of size N, with extra F-1 bytes to aid string comparison */
        u_int8_t text_buf[N + F - 1];
        u_int8_t * dststart = dst;
        const u_int8_t * dstend = dst + dstlen;
        const u_int8_t * srcend = src + srclen;
        int  i, j, k, r, c;
        unsigned int flags;
       
        dst = dststart;
        for (i = 0; i < N - F; i++)
            text_buf[i] = ' ';
        r = N - F;
        flags = 0;
        for ( ; ; ) {
            if (((flags >>= 1) & 0x100) == 0) {
                if (src < srcend) c = *src++; else break;
                flags = c | 0xFF00;  /* uses higher byte cleverly */
            }   /* to count eight */
            if (flags & 1) {
                if (src < srcend) c = *src++; else break;
                if (dst < dstend) *dst++ = c; else break;
                text_buf[r++] = c;
                r &= (N - 1);
            } else {
                if (src < srcend) i = *src++; else break;
                if (src < srcend) j = *src++; else break;
                i |= ((j & 0xF0) << 4);
                j  =  (j & 0x0F) + THRESHOLD;
                for (k = 0; k <= j; k++) {
                    c = text_buf[(i + k) & (N - 1)];
                    if (dst < dstend) *dst++ = c; else break;
                    text_buf[r++] = c;
                    r &= (N - 1);
                }
            }
        }
       
        return (int)(dst - dststart);
    }

Converted to PNG image in the attachment.


:es: I use Google Translate :en:

Páginas: [1]