aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWiimm <wiimm@wiimm.de>2020-12-26 23:18:34 +0100
committerWiimm <wiimm@wiimm.de>2020-12-26 23:18:34 +0100
commita3d605bc52ba3e53720d0dee29a470661b35a1c2 (patch)
treed36bf07ff543a013880eb0e6b81cc8e63c11e33d
parent9c0078c6b9c1309b48f9ece8b5cad1b9be9a75c5 (diff)
SZS v2.22a
Diffstat (limited to '')
-rw-r--r--project/Makefile2
-rw-r--r--project/dclib/dclib-basics.c2
-rw-r--r--project/dclib/dclib-file.c2
-rw-r--r--project/makefiles-local/Makefile.local.mac8
-rw-r--r--project/revision.sh2
-rw-r--r--project/setup.sh6
-rw-r--r--project/src/crypt.h6
-rw-r--r--project/src/lib-kmp-diff.c40
-rw-r--r--project/src/lib-kmp-text.c31
-rw-r--r--project/src/lib-kmp.c33
-rw-r--r--project/src/lib-kmp.h7
-rw-r--r--project/src/lib-lecode.c18
-rw-r--r--project/src/lib-lecode.h5
-rw-r--r--project/src/lib-object.h3
-rw-r--r--project/src/lib-staticr.c116
-rw-r--r--project/src/lib-szs-create.c21
-rw-r--r--project/src/lib-szs.h3
-rw-r--r--project/src/wszst.c2
-rw-r--r--project/templates/HISTORY.txt18
-rw-r--r--project/templates/module/last-history.txt19
-rw-r--r--project/text-files/kmp.inc/kmp-area-cr.inc8
-rw-r--r--project/text-files/lex.inc/lex-elem-set1-develop-cr.inc5
22 files changed, 170 insertions, 187 deletions
diff --git a/project/Makefile b/project/Makefile
index f918113..095243e 100644
--- a/project/Makefile
+++ b/project/Makefile
@@ -58,7 +58,7 @@ WPATT_LONG = Wiimms PAT Tool
WSTRT_SHORT = wstrt
WSTRT_LONG = Wiimms StaticR Tool
-VERSION_NUM = 2.21a
+VERSION_NUM = 2.22a
BETA_VERSION = 0
# 0:off -1:"beta" >0:"beta#"
diff --git a/project/dclib/dclib-basics.c b/project/dclib/dclib-basics.c
index 8176aed..2622765 100644
--- a/project/dclib/dclib-basics.c
+++ b/project/dclib/dclib-basics.c
@@ -1466,7 +1466,7 @@ char * PrintID
)
{
if (!buf)
- buf = GetCircBuf( id_len + 1);
+ buf = GetCircBuf( id_len + 1 );
ccp src = id;
char * dest = buf;
diff --git a/project/dclib/dclib-file.c b/project/dclib/dclib-file.c
index a527c5a..81fa6bf 100644
--- a/project/dclib/dclib-file.c
+++ b/project/dclib/dclib-file.c
@@ -1893,7 +1893,7 @@ enumError TransferFile
return ERR_MISSING_PARAM;
if (IsSameFile(src,dest))
- return ERR_OK;
+ return ERR_NOTHING_TO_DO;
if ( tfer_mode & TFMD_J_MOVE1 )
{
diff --git a/project/makefiles-local/Makefile.local.mac b/project/makefiles-local/Makefile.local.mac
index b283ed8..fb313a2 100644
--- a/project/makefiles-local/Makefile.local.mac
+++ b/project/makefiles-local/Makefile.local.mac
@@ -16,7 +16,7 @@ mac1: mac-x86_64
@for i in $(MAIN_TOOLS); do \
lipo -create bin/x86_64/$${i} -output $${i}; \
- ln -f $${i} bin/$${i}; \
+ cp -p $${i} bin/$${i}; \
done
@rm -rf bin/x86_64
@echo "done"
@@ -29,7 +29,7 @@ mac2: mac-i386 mac-x86_64
@for i in $(MAIN_TOOLS); do \
lipo -create bin/i386/$${i} bin/x86_64/$${i} -output $${i}; \
- ln -f $${i} bin/$${i}; \
+ cp -p $${i} bin/$${i}; \
done
@rm -rf bin/i386 bin/x86_64
@echo "done"
@@ -42,7 +42,7 @@ mac3: mac-i386 mac-x86_64 mac-ppc
@for i in $(MAIN_TOOLS); do \
lipo -create bin/ppc/$${i} bin/i386/$${i} bin/x86_64/$${i} -output $${i}; \
- ln -f $${i} bin/$${i}; \
+ cp -p $${i} bin/$${i}; \
done;
@rm -rf bin/ppc bin/i386 bin/x86_64
@echo "done"
@@ -89,7 +89,7 @@ gen-mac-distrib:
@mkdir -p $(DISTRIB_PATH)/bin $(DISTRIB_PATH)/doc
@cp -p $(DISTRIB_FILES) $(DISTRIB_PATH)
- @ln -f $(MAIN_TOOLS) $(WDF_LINKS) $(DISTRIB_PATH)/bin
+ @cp -p $(MAIN_TOOLS) $(WDF_LINKS) $(DISTRIB_PATH)/bin
@cp -p $(DOC_FILES) $(DISTRIB_PATH)/doc
@chmod -R 755 $(DISTRIB_PATH)
diff --git a/project/revision.sh b/project/revision.sh
index 7336ee2..5e296f4 100644
--- a/project/revision.sh
+++ b/project/revision.sh
@@ -1 +1 @@
-revision=8311
+revision=8323
diff --git a/project/setup.sh b/project/setup.sh
index f33cbfa..5e0fa24 100644
--- a/project/setup.sh
+++ b/project/setup.sh
@@ -22,10 +22,6 @@ revision_next=$revision_num
tim=($(date '+%s %Y-%m-%d %T %Y'))
-have_fuse=0
-[[ $NO_FUSE != 1 && -r /usr/include/fuse.h || -r /usr/local/include/fuse.h ]] \
- && have_fuse=1
-
have_md5=0
[[ -r /usr/include/openssl/md5.h ]] && have_md5=1
@@ -38,7 +34,6 @@ if [[ $M32 = 1 ]]
then
force_m32=1
libdir=lib
- have_fuse=0
xflags="-m32"
defines=-DFORCE_M32=1
else
@@ -176,7 +171,6 @@ cat <<- ---EOT--- >>Makefile.setup
YEAR := ${tim[3]}
FORCE_M32 := $force_m32
- HAVE_FUSE := $have_fuse
HAVE_MD5 := $have_md5
HAVE_SHA := $have_sha
STATIC := $STATIC
diff --git a/project/src/crypt.h b/project/src/crypt.h
index 6bf4359..2862466 100644
--- a/project/src/crypt.h
+++ b/project/src/crypt.h
@@ -42,7 +42,11 @@
#include <openssl/sha.h>
#else
#include "crypto/wiimm-sha.h"
- #define SHA1 WIIMM_SHA1
+ #define SHA1 WIIMM_SHA1
+ #define SHA1_Init WIIMM_SHA1_Init
+ #define SHA1_Update WIIMM_SHA1_Update
+ #define SHA1_Final WIIMM_SHA1_Final
+ #define SHA_CTX WIIMM_SHA_CTX
#endif
#endif // WIIMM_CRYPT_H
diff --git a/project/src/lib-kmp-diff.c b/project/src/lib-kmp-diff.c
index b242bf9..02fb9dc 100644
--- a/project/src/lib-kmp-diff.c
+++ b/project/src/lib-kmp-diff.c
@@ -111,6 +111,19 @@ static void print_rot ( uint n, const float *f1, const float *f2 )
//-----------------------------------------------------------------------------
+static void print_dec8_6 ( uint n, const u8 *u1, const u8 *u2 )
+{
+ while ( n-- > 0 )
+ {
+ printf(" %s%6s",
+ *u1 == *u2 ? colout->COL_OK : colout->COL_WARN, PrintU8M1(*u1) );
+ u1++;
+ u2++;
+ }
+}
+
+//-----------------------------------------------------------------------------
+
static void print_hex16 ( uint n, const u16 *u1, const u16 *u2 )
{
while ( n-- > 0 )
@@ -914,12 +927,15 @@ static void print_area
mode, OK_WARN1(e1,e2,mode), OK_WARN1(e1,e2,type) );
print_float(3,e1->position,e2->position,epsilon_pos);
putchar(' ');
- print_hex16(4,e1->setting,e2->setting);
+ print_hex16(2,e1->setting,e2->setting);
printf("%s\n%c %s%5u %s%5u",
colout->reset, mode,
- OK_WARN1(e1,e2,dest_id), OK_WARN1(e1,e2,unknown) );
+ OK_WARN1(e1,e2,dest_id), OK_WARN1(e1,e2,prio) );
print_float(3,e1->rotation,e2->rotation,epsilon_rot);
+ putchar(' ');
+ print_dec8_6(2,&e1->route,&e2->route);
+ print_hex16(1,&e1->unknown_2e,&e2->unknown_2e);
printf("%s\n%-14c", colout->reset, mode );
print_float(3,e1->scale,e2->scale,epsilon_scale);
@@ -928,16 +944,17 @@ static void print_area
}
else
{
- printf( "%c %5u %5u %11.3f %11.3f %11.3f %#6x %#6x %#6x %#6x\n"
- "%c %5u %5u %11.3f %11.3f %11.3f\n"
+ printf( "%c %5u %5u %11.3f %11.3f %11.3f %#6x %#6x\n"
+ "%c %5u %5u %11.3f %11.3f %11.3f %6s %6s %#6x\n"
"%c %24.3f %11.3f %11.3f\n",
mode,
e1->mode, e1->type,
e1->position[0], e1->position[1], e1->position[2],
- e1->setting[0], e1->setting[1], e1->setting[2], e1->setting[3],
+ e1->setting[0], e1->setting[1],
mode,
- e1->dest_id, e1->unknown,
+ e1->dest_id, e1->prio,
e1->rotation[0], e1->rotation[1], e1->rotation[2],
+ PrintU8M1(e1->route), PrintU8M1(e1->enemy), e1->unknown_2e,
mode,
e1->scale[0], e1->scale[1], e1->scale[2] );
}
@@ -973,11 +990,12 @@ static int diff_area ( const sort_area_t *e1, const sort_area_t *e2 )
uint count = ( e1->data.mode != e2->data.mode )
+ ( e1->data.type != e2->data.type )
+ ( e1->data.dest_id != e2->data.dest_id )
- + ( e1->data.unknown != e2->data.unknown );
-
- uint i;
- for ( i = 0; i < 4; i++ )
- count += e1->data.setting[i] != e2->data.setting[i];
+ + ( e1->data.prio != e2->data.prio )
+ + ( e1->data.setting[0] != e2->data.setting[0] )
+ + ( e1->data.setting[1] != e2->data.setting[1] )
+ + ( e1->data.route != e2->data.route )
+ + ( e1->data.enemy != e2->data.enemy )
+ + ( e1->data.unknown_2e != e2->data.unknown_2e );
count += fabsf( e1->data.position[0] - e2->data.position[0] ) > epsilon_pos
|| fabsf( e1->data.position[1] - e2->data.position[1] ) > epsilon_pos
diff --git a/project/src/lib-kmp-text.c b/project/src/lib-kmp-text.c
index 22bc664..2d6a46a 100644
--- a/project/src/lib-kmp-text.c
+++ b/project/src/lib-kmp-text.c
@@ -3907,16 +3907,16 @@ static enumError ScanTextAREA
}
else if ( si->cur_file->revision < 2956 )
{
- // 2011-08-26, v0.17a, r2956 -> new table layout
-
ScanBE16SI(si,(u16*)&entry->mode,2,0);
ScanFloatV3SI(si,entry->position,1);
ScanU16SI(si,entry->setting,4,0);
ScanFloatV3SI(si,entry->rotation,1);
ScanFloatV3SI(si,entry->scale,1);
}
- else
+ else if ( si->cur_file->revision < 8317 )
{
+ // since 2011-08-26, v0.17a, r2956 -> new table layout
+
ScanU8SI(si,&entry->mode,2,0);
ScanFloatV3SI(si,entry->position,1);
ScanU16SI(si,entry->setting,4,0);
@@ -3924,6 +3924,19 @@ static enumError ScanTextAREA
ScanFloatV3SI(si,entry->rotation,1);
ScanFloatV3SI(si,entry->scale,1);
}
+ else
+ {
+ // since 2020-12-04, v2.22a, r8317 -> new table layout
+
+ ScanU8SI(si,&entry->mode,2,0);
+ ScanFloatV3SI(si,entry->position,1);
+ ScanU16SI(si,entry->setting,2,0);
+ ScanU8SI(si,&entry->dest_id,2,0);
+ ScanFloatV3SI(si,entry->rotation,1);
+ ScanU8SI(si,&entry->route,2,0);
+ ScanU16SI(si,&entry->unknown_2e,1,0);
+ ScanFloatV3SI(si,entry->scale,1);
+ }
CheckEolSI(si);
}
CheckLevelSI(si);
@@ -6470,11 +6483,12 @@ enumError SaveTextKMP
{
*buf1 = 0;
PrintNameIL(F.f,ill+KMP_AREA,i,6,8,0);
+
fprintf(F.f,
- "%#4x %#4x %12.3f %11.3f %11.3f %#6x %#6x %#6x %#6x\r\n >",
+ "%#4x %#4x %12.3f %11.3f %11.3f %#6x %#6x\r\n >",
area->mode, area->type,
area->position[0], area->position[1], area->position[2],
- area->setting[0], area->setting[1], area->setting[2], area->setting[3] );
+ area->setting[0], area->setting[1] );
if ( area->type == 0x00 )
PrintNameIL(F.f,ill+KMP_CAME,area->dest_id,10,10,2);
@@ -6482,11 +6496,12 @@ enumError SaveTextKMP
fprintf(F.f,"%#10x",area->dest_id);
fprintf(F.f,
- " %#4x %12.3f %11.3f %11.3f\r\n"
+ " %#4x %12.3f %11.3f %11.3f %6s %6s %#6x\r\n"
" > %28.3f %11.3f %11.3f\r\n"
- "#%.84s\r\n",
- area->unknown,
+ "#%.78s\r\n",
+ area->prio,
area->rotation[0], area->rotation[1], area->rotation[2],
+ PrintU8M1(area->route), PrintU8M1(area->enemy), area->unknown_2e,
area->scale[0], area->scale[1], area->scale[2],
Minus300 );
}
diff --git a/project/src/lib-kmp.c b/project/src/lib-kmp.c
index 66de994..35069ea 100644
--- a/project/src/lib-kmp.c
+++ b/project/src/lib-kmp.c
@@ -2802,7 +2802,8 @@ enumError ScanRawKMP
DASSERT(entry);
memcpy(entry,area,sizeof(*entry));
bef4n(entry->position,area->position,9);
- be16n(entry->setting,area->setting,4);
+ be16n(entry->setting,area->setting,2);
+ be16n(&entry->unknown_2e,&area->unknown_2e,1);
}
@@ -3508,7 +3509,8 @@ enumError CreateRawKMP
const kmp_area_entry_t * src = (kmp_area_entry_t*)dlist->list + i;
memcpy(area,src,sizeof(*area));
write_bef4n(area->position,src->position,9);
- write_be16n(area->setting,src->setting,4);
+ write_be16n(area->setting,src->setting,2);
+ write_be16n(&area->unknown_2e,&src->unknown_2e,1);
}
@@ -6092,6 +6094,9 @@ const kmp_obj_info_t have_kmp_info[HAVEKMP__N] =
{ 0, "xobj", "XPF: Definition object" }, // HAVEKMP_X_DEFOBJ
{ 0, "xrnd", "XPF: Random scenarios" }, // HAVEKMP_X_RANDOM
{ 0, "eprop-speed", "Epropeller with speed setting" }, // HAVEKMP_EPROP_SPEED
+ { 0, "coob-r", "Conditional OOB by Riidefi" }, // HAVEKMP_COOB_R
+ { 0, "coob-k", "Conditional OOB by kHacker35000vr" }, // HAVEKMP_COOB_K
+ { 0, "uoob", "Unconditional OOB" }, // HAVEKMP_UOOB
};
///////////////////////////////////////////////////////////////////////////////
@@ -6106,9 +6111,29 @@ void DetectSpecialKMP
DASSERT(res);
memset(res,0,sizeof(kmp_special_t));
+ //--- AREA
+
+ const kmp_area_entry_t *area = (kmp_area_entry_t*)kmp->dlist[KMP_AREA].list;
+ const kmp_area_entry_t *area_end = area + kmp->dlist[KMP_AREA].used;
+ for ( ; area < area_end; area++ )
+ {
+ if ( area->type == 10 )
+ {
+ if ( area->route == 0xff && area->setting[0] + area->setting[1] )
+ res[HAVEKMP_COOB_R]++;
+ else if ( area->route == 1 )
+ res[HAVEKMP_COOB_K]++;
+ else
+ res[HAVEKMP_UOOB]++;
+ }
+ }
+
+
+ //--- GOBJ
+
const kmp_gobj_entry_t *gobj = (kmp_gobj_entry_t*)kmp->dlist[KMP_GOBJ].list;
- const kmp_gobj_entry_t *gend = gobj + kmp->dlist[KMP_GOBJ].used;
- for ( ; gobj < gend; gobj++ )
+ const kmp_gobj_entry_t *gobj_end = gobj + kmp->dlist[KMP_GOBJ].used;
+ for ( ; gobj < gobj_end; gobj++ )
{
if ( gobj->pflags )
{
diff --git a/project/src/lib-kmp.h b/project/src/lib-kmp.h
index 65566c0..4777c83 100644
--- a/project/src/lib-kmp.h
+++ b/project/src/lib-kmp.h
@@ -520,11 +520,14 @@ typedef struct kmp_area_entry_t
/*0x00*/ u8 mode; // mode of area
/*0x01*/ u8 type; // type of area
/*0x02*/ u8 dest_id; // index into CAME
- /*0x03*/ u8 unknown;
+ /*0x03*/ u8 prio; // higher number => higher priority
/*0x04*/ float32 position[3];
/*0x10*/ float32 rotation[3];
/*0x1c*/ float32 scale[3];
- /*0x28*/ u16 setting[4];
+ /*0x28*/ u16 setting[2];
+ /*0x2c*/ u8 route;
+ /*0x2d*/ u8 enemy;
+ /*0x2e*/ u16 unknown_2e;
/*0x30*/
}
__attribute__ ((packed)) kmp_area_entry_t;
diff --git a/project/src/lib-lecode.c b/project/src/lib-lecode.c
index 0974ed8..5e7aa32 100644
--- a/project/src/lib-lecode.c
+++ b/project/src/lib-lecode.c
@@ -2069,7 +2069,7 @@ void CopyTrackFile ( uint tid, ccp name )
if ( !stat(src,&st) && S_ISREG(st.st_mode) )
{
snprintf(dest,sizeof(dest),"%s/%03x.szs",opt_track_dest,tid);
- if (TransferFile(src,dest,ptr->num,0666))
+ if (!TransferFile(src,dest,ptr->num,0666))
{
PathCatBufPPE(src,sizeof(src),ptr->key,name,"_d.szs");
if ( !stat(src,&st) && S_ISREG(st.st_mode) )
@@ -2815,8 +2815,6 @@ static void FixLEXElement_SET1 ( lex_set1_t *set1 )
if ( !isnormal(f) || f < 1.0 )
write_bef4(set1->item_factor.v+i,1.0);
}
-
- set1->fix_online_delay = set1->fix_online_delay > 0;
}
//-----------------------------------------------------------------------------
@@ -3524,13 +3522,15 @@ static enumError ScanLEXElement_SET1
//--- setup data
- lex_set1_t set1;
- memset(&set1,0,sizeof(set1));
+ lex_set1_t set1 = {0};
const ScanParam_t ptab[] =
{
{ "ITEM-POS-FACTOR", SPM_FLOAT3_BE, &set1.item_factor },
- { "FIX-ONLINE-DELAY", SPM_U8, &set1.fix_online_delay },
+ { "TEST1", SPM_U8, set1.test+0 },
+ { "TEST2", SPM_U8, set1.test+1 },
+ { "TEST3", SPM_U8, set1.test+2 },
+ { "TEST4", SPM_U8, set1.test+3 },
{0}
};
@@ -4067,9 +4067,9 @@ static enumError SaveTextLEX_SET1
,bef4(&set1->item_factor.z)
);
- if (set1->fix_online_delay)
- fprintf(f,text_lex_elem_set1_develop_cr
- ,set1->fix_online_delay
+ if (*(u32*)set1->test)
+ fprintf(f,text_lex_elem_set1_develop_cr
+ ,set1->test[0],set1->test[1],set1->test[2],set1->test[3]
);
if ( size > sizeof(lex_set1_t) )
diff --git a/project/src/lib-lecode.h b/project/src/lib-lecode.h
index 6f314a2..b480166 100644
--- a/project/src/lib-lecode.h
+++ b/project/src/lib-lecode.h
@@ -627,8 +627,7 @@ __attribute__ ((packed)) lex_element_t;
typedef struct lex_set1_t
{
float3 item_factor; // factor for item positions, always >=1.0
- u8 fix_online_delay; // fix delay of GOBJ objects
- u8 padding[3];
+ u8 test[4]; // 4 test values (TEST1..TEST4)
}
__attribute__ ((packed,aligned(4))) lex_set1_t;
@@ -643,7 +642,7 @@ typedef struct lex_hipt_rule_t
u8 to; // && CHKT <= to
u8 mode; // result: 0=hide, 1:show
}
-__attribute__ ((packed,)) lex_hipt_rule_t;
+__attribute__ ((packed)) lex_hipt_rule_t;
//-----------------------------------------------------------------------------
// [[lex_test_t]]
diff --git a/project/src/lib-object.h b/project/src/lib-object.h
index cf86ba1..360c573 100644
--- a/project/src/lib-object.h
+++ b/project/src/lib-object.h
@@ -148,6 +148,9 @@ typedef enum have_kmp_obj_t
HAVEKMP_X_DEFOBJ, // XPF: Definition object
HAVEKMP_X_RANDOM, // XPF: Random scenarios
HAVEKMP_EPROP_SPEED, // 0x1a6:Epropeller setting #8>0 => speed
+ HAVEKMP_COOB_R, // Conditional Out of Bounds by Riidefi
+ HAVEKMP_COOB_K, // Conditional Out of Bounds by kHacker35000vr
+ HAVEKMP_UOOB, // Unconditional Out of Bounds
HAVEKMP__N
}
__attribute__ ((packed)) have_kmp_obj_t;
diff --git a/project/src/lib-staticr.c b/project/src/lib-staticr.c
index bd49760..9e6a576 100644
--- a/project/src/lib-staticr.c
+++ b/project/src/lib-staticr.c
@@ -1316,115 +1316,6 @@ static BZ2Manager_t * GetLecodeLoader ( str_mode_t mode )
//
///////////////////////////////////////////////////////////////////////////////
-/////////////// fix_51420 data ///////////////
-///////////////////////////////////////////////////////////////////////////////
-
-static const u8 fix_51420_pal_bz2[] =
-{
- // decompressed size: 0x88 = 136 bytes
- 0x00,0x00,0x00,0x88,
-
- // raw data
- 0x52,0x41,0x57,0x30, 0x00,0xd0,0xc0,0xde, 0x00,0xd0,0xc0,0xde, 0xc2,0x65,0x8c,0xe4,
- 0x00,0x00,0x00,0x0f, 0x48,0x00,0x00,0x0d, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
- 0x7c,0xc8,0x03,0xa6, 0x80,0x86,0x00,0x00, 0x7c,0x04,0x18,0x00, 0x41,0x82,0x00,0x4c,
- 0x80,0xa6,0x00,0x04, 0x38,0xa5,0x00,0x01, 0x2c,0x05,0x00,0x03, 0x41,0x82,0x00,0x3c,
- 0x90,0xa6,0x00,0x04, 0x90,0x66,0x00,0x00, 0x38,0x61,0x00,0x10, 0x3c,0xa0,0x80,0x66,
- 0x38,0xa5,0x84,0x18, 0x3c,0x80,0x80,0x66, 0x38,0x84,0x84,0x98, 0x90,0xa1,0x00,0x10,
- 0x90,0x81,0x00,0x14, 0x3c,0xe0,0x80,0x66, 0x38,0xe7,0x8c,0xe4, 0x38,0xe7,0xfe,0xf0,
- 0x7c,0xe9,0x03,0xa6, 0x4e,0x80,0x04,0x20, 0x3c,0x80,0x80,0x1d, 0x38,0x84,0x15,0xf4,
- 0x7c,0x88,0x03,0xa6, 0x4e,0x80,0x00,0x21, 0x60,0x00,0x00,0x00,
- // 0x88 = 136 data bytes (103%)
-};
-
-static BZ2Manager_t fix_51420_pal_mgr
- = { fix_51420_pal_bz2, sizeof(fix_51420_pal_bz2), 0, 0 };
-
-//-----------------------------------------------------------------------------
-
-static const u8 fix_51420_usa_bz2[] =
-{
- // decompressed size: 0x88 = 136 bytes
- 0x00,0x00,0x00,0x88,
-
- // raw data
- 0x52,0x41,0x57,0x30, 0x00,0xd0,0xc0,0xde, 0x00,0xd0,0xc0,0xde, 0xc2,0x65,0x48,0x5c,
- 0x00,0x00,0x00,0x0f, 0x48,0x00,0x00,0x0d, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
- 0x7c,0xc8,0x03,0xa6, 0x80,0x86,0x00,0x00, 0x7c,0x04,0x18,0x00, 0x41,0x82,0x00,0x4c,
- 0x80,0xa6,0x00,0x04, 0x38,0xa5,0x00,0x01, 0x2c,0x05,0x00,0x03, 0x41,0x82,0x00,0x3c,
- 0x90,0xa6,0x00,0x04, 0x90,0x66,0x00,0x00, 0x38,0x61,0x00,0x10, 0x3c,0xa0,0x80,0x65,
- 0x38,0xa5,0x3f,0x90, 0x3c,0x80,0x80,0x65, 0x38,0x84,0x40,0x10, 0x90,0xa1,0x00,0x10,
- 0x90,0x81,0x00,0x14, 0x3c,0xe0,0x80,0x65, 0x38,0xe7,0x48,0x5c, 0x38,0xe7,0xfe,0xf0,
- 0x7c,0xe9,0x03,0xa6, 0x4e,0x80,0x04,0x20, 0x3c,0x80,0x80,0x1d, 0x38,0x84,0x15,0x54,
- 0x7c,0x88,0x03,0xa6, 0x4e,0x80,0x00,0x21, 0x60,0x00,0x00,0x00,
- // 0x88 = 136 data bytes (103%)
-};
-
-static BZ2Manager_t fix_51420_usa_mgr
- = { fix_51420_usa_bz2, sizeof(fix_51420_usa_bz2), 0, 0 };
-
-//-----------------------------------------------------------------------------
-
-static const u8 fix_51420_jap_bz2[] =
-{
- // decompressed size: 0x88 = 136 bytes
- 0x00,0x00,0x00,0x88,
-
- // raw data
- 0x52,0x41,0x57,0x30, 0x00,0xd0,0xc0,0xde, 0x00,0xd0,0xc0,0xde, 0xc2,0x65,0x83,0x50,
- 0x00,0x00,0x00,0x0f, 0x48,0x00,0x00,0x0d, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
- 0x7c,0xc8,0x03,0xa6, 0x80,0x86,0x00,0x00, 0x7c,0x04,0x18,0x00, 0x41,0x82,0x00,0x4c,
- 0x80,0xa6,0x00,0x04, 0x38,0xa5,0x00,0x01, 0x2c,0x05,0x00,0x03, 0x41,0x82,0x00,0x3c,
- 0x90,0xa6,0x00,0x04, 0x90,0x66,0x00,0x00, 0x38,0x61,0x00,0x10, 0x3c,0xa0,0x80,0x65,
- 0x38,0xa5,0x7a,0x84, 0x3c,0x80,0x80,0x65, 0x38,0x84,0x7b,0x04, 0x90,0xa1,0x00,0x10,
- 0x90,0x81,0x00,0x14, 0x3c,0xe0,0x80,0x66, 0x38,0xe7,0x83,0x50, 0x38,0xe7,0xfe,0xf0,
- 0x7c,0xe9,0x03,0xa6, 0x4e,0x80,0x04,0x20, 0x3c,0x80,0x80,0x1d, 0x38,0x84,0x15,0x14,
- 0x7c,0x88,0x03,0xa6, 0x4e,0x80,0x00,0x21, 0x60,0x00,0x00,0x00,
- // 0x88 = 136 data bytes (103%)
-};
-
-static BZ2Manager_t fix_51420_jap_mgr
- = { fix_51420_jap_bz2, sizeof(fix_51420_jap_bz2), 0, 0 };
-
-//-----------------------------------------------------------------------------
-
-static const u8 fix_51420_kor_bz2[] =
-{
- // decompressed size: 0x88 = 136 bytes
- 0x00,0x00,0x00,0x88,
-
- // raw data
- 0x52,0x41,0x57,0x30, 0x00,0xd0,0xc0,0xde, 0x00,0xd0,0xc0,0xde, 0xc2,0x64,0x6f,0xfc,
- 0x00,0x00,0x00,0x0f, 0x48,0x00,0x00,0x0d, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
- 0x7c,0xc8,0x03,0xa6, 0x80,0x86,0x00,0x00, 0x7c,0x04,0x18,0x00, 0x41,0x82,0x00,0x4c,
- 0x80,0xa6,0x00,0x04, 0x38,0xa5,0x00,0x01, 0x2c,0x05,0x00,0x03, 0x41,0x82,0x00,0x3c,
- 0x90,0xa6,0x00,0x04, 0x90,0x66,0x00,0x00, 0x38,0x61,0x00,0x10, 0x3c,0xa0,0x80,0x64,
- 0x38,0xa5,0x67,0x30, 0x3c,0x80,0x80,0x64, 0x38,0x84,0x67,0xb0, 0x90,0xa1,0x00,0x10,
- 0x90,0x81,0x00,0x14, 0x3c,0xe0,0x80,0x64, 0x38,0xe7,0x6f,0xfc, 0x38,0xe7,0xfe,0xf0,
- 0x7c,0xe9,0x03,0xa6, 0x4e,0x80,0x04,0x20, 0x3c,0x80,0x80,0x1d, 0x38,0x84,0x19,0x50,
- 0x7c,0x88,0x03,0xa6, 0x4e,0x80,0x00,0x21, 0x60,0x00,0x00,0x00,
- // 0x88 = 136 data bytes (103%)
-};
-
-static BZ2Manager_t fix_51420_kor_mgr
- = { fix_51420_kor_bz2, sizeof(fix_51420_kor_bz2), 0, 0 };
-
-//-----------------------------------------------------------------------------
-
-static BZ2Manager_t * GetFix51420 ( str_mode_t mode )
-{
- switch (mode)
- {
- case STR_M_PAL: return &fix_51420_pal_mgr;
- case STR_M_USA: return &fix_51420_usa_mgr;
- case STR_M_JAP: return &fix_51420_jap_mgr;
- case STR_M_KOR: return &fix_51420_kor_mgr;
- default: return 0;
- }
-}
-
-//
-///////////////////////////////////////////////////////////////////////////////
/////////////// more data ///////////////
///////////////////////////////////////////////////////////////////////////////
@@ -5138,7 +5029,7 @@ static enumError ReadCodeFile
{
BZ2Manager_t *wcm = 0;
if (!strcmp(fname,"@LECODE")) wcm = GetLecodeLoader(str->mode);
- else if (!strcmp(fname,"@FIX51420")) wcm = GetFix51420(str->mode);
+// else if (!strcmp(fname,"@FIX514XX")) wcm = GetFix514XX(str->mode);
if (wcm)
{
@@ -6994,11 +6885,6 @@ const data_tab_t maindol_data_tab[] =
DEF_BZIP(lecode_loader_usa)
DEF_BZIP(lecode_loader_jap)
DEF_BZIP(lecode_loader_kor)
-
- DEF_BZIP(fix_51420_pal)
- DEF_BZIP(fix_51420_usa)
- DEF_BZIP(fix_51420_jap)
- DEF_BZIP(fix_51420_kor)
#endif
{0,0,0}
diff --git a/project/src/lib-szs-create.c b/project/src/lib-szs-create.c
index 007d2cb..a766c7f 100644
--- a/project/src/lib-szs-create.c
+++ b/project/src/lib-szs-create.c
@@ -4898,6 +4898,8 @@ void AnalyseSZS
//--- scan KMP
+ bool valid_track = true; // use temp var because of early 'return'
+
if (szs->course_kmp_data)
{
SHA1(szs->course_kmp_data,szs->course_kmp_size,sha1_data.hash);
@@ -5009,8 +5011,18 @@ void AnalyseSZS
ct_dest = StringCopyE(ct_dest,ct_end,",xpf");
}
+ if (szs->kmp_special[HAVEKMP_COOB_R])
+ ct_dest = StringCopyE(ct_dest,ct_end,",coob-r");
+ if (szs->kmp_special[HAVEKMP_COOB_K])
+ ct_dest = StringCopyE(ct_dest,ct_end,",coob-k");
+ if (szs->kmp_special[HAVEKMP_UOOB])
+ ct_dest = StringCopyE(ct_dest,ct_end,",uoob");
+
ResetKMP(&kmp);
}
+ else
+ valid_track = false;
+
if ( szs->szs_special[HAVESZS_ITEM_SLOT_TABLE] )
ct_dest = StringCopyE(ct_dest,ct_end,",itemslot");
@@ -5038,6 +5050,8 @@ void AnalyseSZS
SHA1(szs->course_kcl_data,szs->course_kcl_size,sha1_data.hash);
Sha1Bin2Hex(as->sha1_kcl,sha1_data.hash);
}
+ else
+ valid_track = false;
//--- course model (course_model.brres, course_d_model.brres)
@@ -5052,6 +5066,8 @@ void AnalyseSZS
SHA1(szs->course_d_model_data,szs->course_d_model_size,sha1_data.hash);
Sha1Bin2Hex(as->sha1_course,sha1_data.hash);
}
+ else
+ valid_track = false;
//--- vrcorn (vrcorn_model.brres)
@@ -5061,6 +5077,8 @@ void AnalyseSZS
SHA1(szs->vrcorn_model_data,szs->vrcorn_model_size,sha1_data.hash);
Sha1Bin2Hex(as->sha1_vrcorn,sha1_data.hash);
}
+ else
+ valid_track = false;
//--- minimap (map_model.brres)
@@ -5070,6 +5088,8 @@ void AnalyseSZS
SHA1(szs->map_model_data,szs->map_model_size,sha1_data.hash);
Sha1Bin2Hex(as->sha1_minimap,sha1_data.hash);
}
+ else
+ valid_track = false;
//--- finalize ct_attrib by "lex" and "warn"
@@ -5080,6 +5100,7 @@ void AnalyseSZS
if (szs->warn_bits)
ct_dest = StringCat2E(ct_dest,ct_end,",warn=",GetWarnSZSNames(szs->warn_bits,'+'));
+ as->valid_track = valid_track;
as->duration_usec = GetTimerUSec() - start_usec;
}
diff --git a/project/src/lib-szs.h b/project/src/lib-szs.h
index aac60b8..fda2010 100644
--- a/project/src/lib-szs.h
+++ b/project/src/lib-szs.h
@@ -1338,8 +1338,9 @@ typedef struct analyse_szs_t
int ckpt0_count; // number of LC in CKPT, -1 unknown
int lap_count; // STGI lap counter
- u16 speed_mod; // STGI speed mod
float speed_factor; // STGI speed factor
+ u16 speed_mod; // STGI speed mod
+ u8 valid_track; // 1: valid track or arena file
char gobj_info[20]; // gobj counters
char ct_attrib[300]; // collected ct attributes
diff --git a/project/src/wszst.c b/project/src/wszst.c
index 9f85a58..b7836d5 100644
--- a/project/src/wszst.c
+++ b/project/src/wszst.c
@@ -1984,6 +1984,7 @@ static enumError cmd_analyze()
"sha1_course=\"%s\"\n"
"sha1_vrcorn=\"%s\"\n"
"sha1_minimap=\"%s\"\n"
+ "valid_track=%u\n"
"is_arena=\"%u %s\"\n"
"n_ckpt0=%d\n"
"lap_count=%d\n"
@@ -2017,6 +2018,7 @@ static enumError cmd_analyze()
,as.sha1_course
,as.sha1_vrcorn
,as.sha1_minimap
+ ,as.valid_track
,szs.is_arena
,is_arena_name[szs.is_arena]
,as.ckpt0_count
diff --git a/project/templates/HISTORY.txt b/project/templates/HISTORY.txt
index e8e8af9..39761bc 100644
--- a/project/templates/HISTORY.txt
+++ b/project/templates/HISTORY.txt
@@ -427,6 +427,24 @@ szs v2.20a r8279 - 2020-10-03
- Fewer program crashes when reading faulty SZS files.
+szs v2.21a r8311 - 2020-11-30
+
+ - Windows only: 32 bit and 64 bit versions of Cygwin are supported now.
+ The 64 bit version is recommended.
+ - 32 bit version: Cygwin DLL 3.0.7 / 2019-04-30
+ - 64 bit version: Cygwin DLL 3.1.7 / 2020-08-22
+ - Support of LE-CODE build 25:
+ - Speedometer support for LPAR-files.
+ - New option for wlect: --speedometer=off/on
+ - Again fewer program crashes when reading faulty SZS files.
+ - BMG supports little endian files now, but only encoding UTF-8 was checked.
+ I need example files to verify other encodings (CP-1252,UTF-16,SHIFT-JIS).
+ - KCL/OBJ: Faces with any number of vertices are accepted now. Before there
+ was a limit of 50 vertices.
+ - Bug fix for CT-CODE/LE-CODE configuration file: Command 'S' stored a slot
+ number as single byte, so that only values between 0 and 255 were possible.
+
+
@@MODULE(last-history.txt)@@
diff --git a/project/templates/module/last-history.txt b/project/templates/module/last-history.txt
index 31e7704..8718e89 100644
--- a/project/templates/module/last-history.txt
+++ b/project/templates/module/last-history.txt
@@ -1,19 +1,10 @@
szs v@@VERSION@@ r@@REV-NEXT@@ - @@@@-@@-@@
- - Windows only: 32 bit and 64 bit versions of Cygwin are supported now.
- The 64 bit version is recommended.
- - 32 bit version: Cygwin DLL 3.0.7 / 2019-04-30
- - 64 bit version: Cygwin DLL 3.1.7 / 2020-08-22
- - Support of LE-CODE build 25:
- - Speedometer support for LPAR-files.
- - New option for wlect: --speedometer=off/on
- - Again fewer program crashes when reading faulty SZS files.
- - BMG supports little endian files now, but only encoding UTF-8 was checked.
- I need example files to verify other encodings (CP-1252,UTF-16,SHIFT-JIS).
- - KCL/OBJ: Faces with any number of vertices are accepted now. Before there
- was a limit of 50 vertices.
- - Bug fix for CT-CODE/LE-CODE configuration file: Command 'S' stored a slot
- number as single byte, so that only values between 0 and 255 were possible.
+ - KMP/AREA: The table layout of text output changed. Therefor parameter
+ @REVISION is important to select the correct scanning mode.
+ - KMP/AREA: Detection of "Conditional Out of Bounds".
+ - Bug fix for tool wlect: Coping/Moving/Linking source file with options
+ --copy-tracks, --move-tracks and --link-tracks failed for *_d.files.
~ - MDL support: Scanning a MDL file and transferring the data into an internal
~ format was already implemented, but only used for analysis purposes. Now it
diff --git a/project/text-files/kmp.inc/kmp-area-cr.inc b/project/text-files/kmp.inc/kmp-area-cr.inc
index 332e5b8..7ee3fb2 100644
--- a/project/text-files/kmp.inc/kmp-area-cr.inc
+++ b/project/text-files/kmp.inc/kmp-area-cr.inc
@@ -10,7 +10,7 @@
@AREA-HEAD-VALUE = %#x
#AREA#
-#------------------------------------------------------------------------------------
-# mode type _____position/rotation/scale______ _________settings_________
-# idx came prio x y z #1 #2 #3 #4
-#------------------------------------------------------------------------------------
+#------------------------------------------------------------------------------
+# mode type _____position/rotation/scale______ set-1 set-2
+# idx came prio x y z route enemy ?@0x2e
+#------------------------------------------------------------------------------
diff --git a/project/text-files/lex.inc/lex-elem-set1-develop-cr.inc b/project/text-files/lex.inc/lex-elem-set1-develop-cr.inc
index 41094ad..9950fb2 100644
--- a/project/text-files/lex.inc/lex-elem-set1-develop-cr.inc
+++ b/project/text-files/lex.inc/lex-elem-set1-develop-cr.inc
@@ -5,4 +5,7 @@
# values can still change. Therefore, they should not be used, or at most
# experimentally.
-@FIX-ONLINE-DELAY = %u
+@TEST1 = %d
+@TEST2 = %d
+@TEST3 = %d
+@TEST4 = %d