Skip to content

Commit

Permalink
Regroup every idTech version (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifeismana authored Mar 26, 2024
1 parent 6753331 commit 96a9650
Show file tree
Hide file tree
Showing 22 changed files with 55 additions and 65 deletions.
2 changes: 2 additions & 0 deletions descriptions/Engine.idTech.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[**id Tech**](https://en.wikipedia.org/wiki/Id_Tech) is a game engine developed by id Software, first used to power [Wolfenstein 3D](https://steamdb.info/app/2270/) released in 1992.
It has since seen multiples upgrades over the years.
1 change: 0 additions & 1 deletion descriptions/Engine.idTech0.md

This file was deleted.

1 change: 0 additions & 1 deletion descriptions/Engine.idTech1.md

This file was deleted.

1 change: 0 additions & 1 deletion descriptions/Engine.idTech2.md

This file was deleted.

1 change: 0 additions & 1 deletion descriptions/Engine.idTech2_5.md

This file was deleted.

1 change: 0 additions & 1 deletion descriptions/Engine.idTech3.md

This file was deleted.

1 change: 0 additions & 1 deletion descriptions/Engine.idTech4.md

This file was deleted.

1 change: 0 additions & 1 deletion descriptions/Engine.idTech5.md

This file was deleted.

1 change: 0 additions & 1 deletion descriptions/Engine.idTech6.md

This file was deleted.

1 change: 0 additions & 1 deletion descriptions/Engine.idTech7.md

This file was deleted.

14 changes: 7 additions & 7 deletions rules.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ GZDoom[] = (?:^|/)gzdoom\.pk3$
GZDoom[] = (?:^|/)gzdoom\.sf2$
HaemimontSol = ^Local/English\.hpk$
HashLink = (?:^|/)libhl\.(?:dll|so)$
idTech2 = (?:^|/)gl(?:quake|hexen)(?:$|/)
idTech2_5 = (?:^|/)baseq2(?:$|/)
idTech4 = \.pk4$
idTech5 = \.streamed$
idTech6[] = \.mega2$
idTech6[] = \.texdb$
idTech7 = \.streamdb$
idTech[] = (?:^|/)gl(?:quake|hexen)(?:$|/)
idTech[] = (?:^|/)baseq2(?:$|/)
idTech[] = \.pk4$
idTech[] = \.streamed$
idTech[] = \.mega2$
idTech[] = \.texdb$
idTech[] = \.streamdb$
Irrlicht = (?:^|/)Irrlicht\.dll$
Kex = \.kpf$
KiriKiri = (?:^|/)data\.xp3$
Expand Down
13 changes: 4 additions & 9 deletions tests/FileDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,10 @@ private static function TryDeduceEngine( array $Files, array $Matches ) : ?strin
//If it matches the pattern of a Build engine game (Duke Nukem 3D engine)
return 'Engine.Build';
}
else if( $has( 'Evidence.VSWAP' ) )
else if( $has( 'Evidence.VSWAP' ) || ( $has( 'Evidence.CFG' ) && $has( 'Evidence.WAD' ) ) )
{
//If it's got VSWAP files it's probably idTech0 (Wolf3D engine)
return 'Engine.idTech0';
}
else if( $has( 'Evidence.CFG' ) && $has( 'Evidence.WAD' ) )
{
//If it's got CFG and WAD files it's probably idTech1 (DOOM engine)
return 'Engine.idTech1';
//If it's got VSWAP files or CFG and WAD files it's probably idTech
return 'Engine.idTech';
}
}

Expand Down Expand Up @@ -261,7 +256,7 @@ private static function TryDeduceEngine( array $Files, array $Matches ) : ?strin
//If I have matched nothing so far and I have a PK3 file, it's likely idTech3 (Quake3 engine)
if( $has( 'Evidence.PK3' ) )
{
return 'Engine.idTech3';
return 'Engine.idTech';
}

return null;
Expand Down
File renamed without changes.
File renamed without changes.
42 changes: 42 additions & 0 deletions tests/types/Engine.idTech.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/baseq2
/baseq2/
baseq2
baseq2/
baseq2/models
baseq2/pak0.pk3
baseq2/pak1.pk3
baseq2/pics
baseq2/st
/glhexen
/glhexen/
/glquake
/glquake/
Id1/glquake
Id1/glquake/15to8.pal
Id1/glquake/armor.ms2
Id1/glquake/backpack.ms2
data1/glhexen
data1/glhexen/NFarrow.ms2
data1/glhexen/a_blast.ms2
glhexen
glhexen/
glquake
glquake/
baseq3/pak0.pk3
.pk4
something.pk4
sub/dir/something.pk4
.streamed
something.streamed
sub/dir/something.streamed
.mega2
.texdb
base/chunk_2.texdb
base/gameresources.texdb
chunk_2.texdb
gameresources.texdb
something.mega2
sub/dir/something.mega2
.streamdb


15 changes: 0 additions & 15 deletions tests/types/Engine.idTech2.txt

This file was deleted.

9 changes: 0 additions & 9 deletions tests/types/Engine.idTech2_5.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/types/Engine.idTech3.txt

This file was deleted.

3 changes: 0 additions & 3 deletions tests/types/Engine.idTech4.txt

This file was deleted.

3 changes: 0 additions & 3 deletions tests/types/Engine.idTech5.txt

This file was deleted.

8 changes: 0 additions & 8 deletions tests/types/Engine.idTech6.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/types/Engine.idTech7.txt

This file was deleted.

0 comments on commit 96a9650

Please sign in to comment.