From 0981882fd36af8c4f115c7f02b7ad9bbf108b8d8 Mon Sep 17 00:00:00 2001 From: JailDoctor Date: Mon, 23 Oct 2023 16:50:23 +0200 Subject: [PATCH] =?UTF-8?q?-=20[FIX]=20Problema=20amb=20alguns=20arxius=20?= =?UTF-8?q?binaris=20que=20alg=C3=BA=20en=20tota=20la=20cadena=20se=20pens?= =?UTF-8?q?ava=20que=20eren=20de=20text=20i=20canviava=20caracter=2013=20p?= =?UTF-8?q?er=2010+13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/offsets.bal | 31 +------------------------------ source/gamestate_password.cpp | 4 +--- source/gamestate_postfase.cpp | 5 +++-- 3 files changed, 5 insertions(+), 35 deletions(-) diff --git a/data/offsets.bal b/data/offsets.bal index c0dc5ec..d7109be 100644 --- a/data/offsets.bal +++ b/data/offsets.bal @@ -1,30 +1 @@ - -©«³¸±³¸»¹¯ -½¯´·¬¹Â®¼Ç -¦³¬¶ª³½À²º -«¸¨Á«¹¿µ·½ -¦¸¶½·®°¾ÀÆ -º¹¬ºµ¹²³²² -§§³·¸³¾®®¹ -µ«·­¹³¹À¼À -¦«¹·³«À¸²Á -¹«³­¯¹¹µ°¯ -¼«³·¿¯µ­¶º -§µ¹º¾¶·±ÁÁ -³»²±·´¬µ¹Á -¯§°´±Ã¸º¼Á -©»²­·¿¶±º¡ -µ§ª·¯¹½Å¼Ã -§§ª¼®¼´»¹Á -§¸À¶­³¾¹®¼ -«»ª³®·¬¸¹Á -³µ³­¶·´º´Á -¬¸¨«²«¾¼¼À -§»©´®¬À®¹³ -ª´¸½®®¬Á»¯ -±§«­µ°´º®º -ª´¸½®®¬¹²Á -³µº©ª­¬®®Â -³µ­©µ¾¸»¹Â -®¶¬¶¾¶¿µº¯ -ª²·©¼½Â»¿² \ No newline at end of file +©«³¸±³¸»¹¯½¯´·¬¹Â®¼Ç¦³¬¶ª³½À²º«¸¨Á«¹¿µ·½¦¸¶½·®°¾Àƺ¹¬ºµ¹²³²²§§³·¸³¾®®¹µ«·­¹³¹À¼À¦«¹·³«À¸²Á¹«³­¯¹¹µ°¯¼«³·¿¯µ­¶º§µ¹º¾¶·±ÁÁ³»²±·´¬µ¹Á¯§°´±Ã¸º¼Á©»²­·¿¶±º¡µ§ª·¯¹½Å¼Ã§§ª¼®¼´»¹Á§¸À¶­³¾¹®¼«»ª³®·¬¸¹Á³µ³­¶·´º´Á¬¸¨«²«¾¼¼À§»©´®¬À®¹³ª´¸½®®¬Á»¯±§«­µ°´º®ºª´¸½®®¬¹²Á³µº©ª­¬®®Â³µ­©µ¾¸»¹Â®¶¬¶¾¶¿µº¯ª²·©¼½Â»¿² \ No newline at end of file diff --git a/source/gamestate_password.cpp b/source/gamestate_password.cpp index 6880c0e..399c5f3 100644 --- a/source/gamestate_password.cpp +++ b/source/gamestate_password.cpp @@ -130,10 +130,8 @@ namespace gamestate while ( numPassword < 30 && !salir ) { for (int i=0;i<10;i++) { - punter++; - passFile[i] = buffer[punter] - (101+i); + passFile[i] = buffer[punter++] - (101+i); } - punter++; salir = true; for (int i=0;i<10;i++) { diff --git a/source/gamestate_postfase.cpp b/source/gamestate_postfase.cpp index 3eccd0e..5c2bcb0 100644 --- a/source/gamestate_postfase.cpp +++ b/source/gamestate_postfase.cpp @@ -106,9 +106,10 @@ namespace gamestate { char *buffer = file::getFileBuffer("offsets.bal"); - int punter = (game::getConfig("fase")-1)*11; + int punter = (game::getConfig("fase")-1)*10; char passFile[11]; - for (int i=0;i<10;i++) passFile[i] = uint8_t(buffer[++punter]) - (101+i); + for (int i=0;i<10;i++) passFile[i] = uint8_t(buffer[punter++]) - (101+i); + passFile[10] = 0; free(buffer); return passFile;