Skip to content

Commit

Permalink
maps: Add support of Anachronox material flags
Browse files Browse the repository at this point in the history
  • Loading branch information
0lvin committed Dec 10, 2024
1 parent baa4d81 commit 5e8ffa3
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 19 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ State:
Monsters:

* incorrect dead animation for Arachnid,
* broken fire effect for Guardian,
* q64/outpost can't change to next level.
* broken fire effect for Guardian.

Models support:

Expand Down Expand Up @@ -88,7 +87,7 @@ Note:

Games:

* Quake 2:
* Quake 2 ReRelease:
* SDK: <https://github.com/id-Software/quake2-rerelease-dll>
* Tech info: <https://bethesda.net/en/article/6NIyBxapXOurTKtF4aPiF4/enhancing-quake-ii>
* Anachronox:
Expand Down Expand Up @@ -154,7 +153,7 @@ Goals:
* [ ] MDA model skin selection by tag,
* [ ] SDEF/MDA dynamicaly allocate list of skins,
* [ ] Support material load textures/textureinfo.dat from Anachronox,
* [*] Support textures/*/*.mat load from ReRelease (footstep),
* [x] Support textures/*/*.mat load from ReRelease (footstep),
* [ ] Support textures/*/*.mat load from ReRelease texture effects,
* [ ] Support textures/*/*_glow.png load from ReRelease,
* [ ] Support tactile/*/*.bnvib/.wav feedback load from ReRelease,
Expand Down
65 changes: 50 additions & 15 deletions src/common/header/flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,30 +409,65 @@ static const int anachronox_flags[32] = {
SURF_NODRAW, /* 7: NoDraw */
0, /* 8: Hint */
0, /* 9: Skip */
0, /* 10: Unused */
0, /* 11: Unused */
0, /* 12: Unused */
0, /* 13: Unused */
0, /* 14: Unused */
0, /* 15: Unused */
0, /* 10: Snd_Wood */
0, /* 11: Snd_Metal */
0, /* 12: Snd_Stone */
0, /* 13: Snd_Carpet */
0, /* 14: Snd_Ice */
0, /* 15: Snd_Snow */
0, /* 16: Alpha Banner */
SURF_ALPHATEST, /* 17: Alpha Test */
0, /* 18: No V-turbulence */
0, /* 19: Unused */
0, /* 20: Unused */
0, /* 21: Unused */
0, /* 22: Unused */
0, /* 23: Unused */
0, /* 24: Unused */
0, /* 25: Unused */
0, /* 26: Unused */
0, /* 27: Unused */
0, /* 19: Snd_Hollow */
0, /* 20: Snd_Puddle */
0, /* 21: Surf_Scroll */
0, /* 22: Snd_Gravel */
0, /* 23: Snd_Leaves */
0, /* 24: Snd_Grass */
0, /* 25: Snd_Sand */
0, /* 26: Snd_Water */
0, /* 27: Surf_Particles */
0, /* 28: Half Scroll */
0, /* 29: Quarter Scroll */
0, /* 30: Surface Fog */
0, /* 31: Surface Curve */
};

static const char * anachronox_material[32] = {
NULL, /* 0: Light */
NULL, /* 1: Slick */
NULL, /* 2: Sky Flag */
NULL, /* 3: Warp */
NULL, /* 4: Trans33 */
NULL, /* 5: Trans66 */
NULL, /* 6: Unused */
NULL, /* 7: NoDraw */
NULL, /* 8: Hint */
NULL, /* 9: Skip */
"wood", /* 10: Snd_Wood */
"metal", /* 11: Snd_Metal */
"stone", /* 12: Snd_Stone */
"carpet", /* 13: Snd_Carpet */
"ice", /* 14: Snd_Ice */
"snow", /* 15: Snd_Snow */
NULL, /* 16: Alpha Banner */
NULL, /* 17: Alpha Test */
NULL, /* 18: No V-turbulence */
"hollow", /* 19: Snd_Hollow */
"puddle", /* 20: Snd_Puddle */
NULL, /* 21: Surf_Scroll */
"gravel", /* 22: Snd_Gravel */
"leaves", /* 23: Snd_Leaves */
"grass", /* 24: Snd_Grass */
"sand", /* 25: Snd_Sand */
"water", /* 26: Snd_Water */
NULL, /* 27: Surf_Particles */
NULL, /* 28: Half Scroll */
NULL, /* 29: Quarter Scroll */
NULL, /* 30: Surface Fog */
NULL, /* 31: Surface Curve */
};

static const int anachronox_contents_flags[32] = {
CONTENTS_SOLID, /* 0: An eye is never valid in a solid */
CONTENTS_WINDOW, /* 1: translucent, but not watery */
Expand Down
1 change: 1 addition & 0 deletions src/common/maps.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Mod_LoadMaterialConvertFlags(int flags, maptype_t maptype, char *value)

switch (maptype)
{
case map_anachronox: material = anachronox_material; break;
case map_daikatana: material = daikatana_material; break;
case map_kingpin: material = kingpin_material; break;
default: break;
Expand Down

0 comments on commit 5e8ffa3

Please sign in to comment.