mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-12-21 23:08:49 -05:00
Continue door
This commit is contained in:
parent
4442f62b29
commit
78c3b2e2b4
34
assets.h
34
assets.h
@ -278,6 +278,40 @@ const uint8_t SFG_texturesWall[][SFG_TEXTURE_SIZE * SFG_TEXTURE_SIZE] =
|
||||
36,44,36,37,36,36,131,107,36,37,21,37,36,37,36,37,36,35,122,35,50,50,3,36,36,36,
|
||||
4,35,35,36,36,36,37,36,4,36,34,3,36,36,43,36,36,37,37,36,37,35,35,36,131,35,4,
|
||||
36,36,4,4,36,36,43,36,36,36,36,4,4,4,43,4,37,36,43,36
|
||||
},
|
||||
{ // 7: steel door
|
||||
4,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,
|
||||
80,80,80,80,80,80,6,6,6,5,6,6,6,5,6,6,6,5,6,6,6,5,6,6,5,6,6,6,5,6,6,6,5,6,6,6,
|
||||
80,80,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,80,80,4,4,4,3,
|
||||
4,4,4,3,4,4,4,3,4,4,4,3,4,4,3,4,4,4,3,4,4,4,3,4,4,4,80,80,81,2,74,2,2,74,74,2,
|
||||
74,74,2,74,2,74,2,2,2,2,2,2,2,74,2,2,74,2,74,2,74,2,80,80,80,17,17,17,17,17,17,
|
||||
17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,80,80,17,
|
||||
58,58,58,58,58,58,58,59,58,59,59,59,59,67,3,3,3,3,3,68,3,67,3,3,68,3,3,3,3,58,
|
||||
80,17,58,58,3,3,3,3,3,3,4,3,3,3,3,3,3,3,3,4,3,3,3,4,4,3,4,3,4,3,3,3,80,17,58,3,
|
||||
3,58,58,68,58,58,68,4,68,59,68,4,69,4,69,4,5,4,4,4,4,4,4,69,4,5,4,69,80,17,50,3,
|
||||
58,58,68,58,59,68,59,4,69,60,59,60,60,4,4,4,5,4,4,4,4,69,4,4,4,5,4,4,80,17,50,3,
|
||||
50,59,58,58,68,58,59,5,69,60,68,60,4,4,4,4,5,4,4,4,4,4,4,69,4,70,4,4,80,17,50,3,
|
||||
50,50,50,50,68,59,59,70,60,60,59,4,69,4,4,4,5,4,4,4,69,4,4,4,4,5,4,4,80,17,50,3,
|
||||
3,59,50,68,58,59,69,4,4,59,4,4,4,4,70,4,70,4,4,4,69,4,69,4,4,5,4,4,80,17,50,3,
|
||||
50,50,50,50,59,69,60,4,4,4,4,69,60,4,4,4,5,4,4,4,4,4,4,4,4,5,4,5,80,17,50,3,50,
|
||||
59,3,50,50,59,4,5,4,69,59,4,60,4,4,60,5,69,4,4,4,4,4,69,4,5,4,4,80,17,50,3,50,
|
||||
50,50,3,59,69,4,4,60,60,59,69,4,4,4,69,5,4,4,4,4,69,4,4,4,5,4,5,80,17,50,3,59,
|
||||
50,68,68,59,69,4,5,60,69,59,4,4,69,4,4,70,4,4,4,4,4,4,4,4,5,4,4,80,17,50,3,50,
|
||||
50,50,68,59,60,60,4,69,60,59,4,4,4,4,70,5,4,4,4,4,4,69,4,69,5,4,5,80,17,50,3,50,
|
||||
59,50,50,59,59,69,5,60,60,68,4,4,4,69,4,5,4,69,4,4,4,4,4,4,5,4,4,80,17,50,3,3,
|
||||
50,59,68,58,60,59,5,69,60,59,60,4,4,4,4,5,69,4,4,4,69,4,4,4,5,4,5,80,17,50,3,50,
|
||||
50,68,68,59,4,69,70,59,60,68,60,70,4,4,4,5,4,4,4,4,4,4,4,4,5,4,4,80,17,50,3,58,
|
||||
67,59,59,3,4,4,5,60,60,59,60,60,4,4,4,5,69,4,4,4,69,4,69,4,70,4,4,80,17,58,3,58,
|
||||
58,58,68,58,4,69,5,69,60,68,60,69,4,4,60,5,4,4,4,69,4,4,4,4,5,4,4,80,17,58,3,3,
|
||||
58,68,58,59,68,4,70,60,60,59,4,4,4,60,60,5,60,69,4,4,4,69,4,69,5,4,4,80,17,58,
|
||||
58,3,3,3,3,3,3,4,3,4,3,4,4,4,4,3,4,3,3,3,3,3,3,3,3,4,3,3,3,80,17,58,58,58,58,58,
|
||||
58,58,59,3,3,59,59,59,59,59,59,3,59,68,3,3,67,3,3,67,3,3,3,3,3,80,80,17,17,17,
|
||||
17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
|
||||
80,80,2,2,74,74,74,2,2,74,2,74,2,74,2,2,2,74,74,2,2,2,2,74,74,2,74,2,74,2,74,2,
|
||||
80,80,6,6,6,5,6,6,6,5,6,6,6,5,6,6,6,5,6,6,6,5,6,6,5,6,6,6,5,6,6,6,80,80,4,4,4,4,
|
||||
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,80,80,4,4,4,3,4,4,4,3,4,4,4,
|
||||
3,4,4,4,3,4,4,4,3,4,4,3,4,4,4,3,4,4,4,80,4,80,80,80,80,80,80,80,80,80,80,80,80,
|
||||
80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80
|
||||
}
|
||||
};
|
||||
|
||||
|
2
levels.h
2
levels.h
@ -190,7 +190,7 @@ static const SFG_Level SFG_level0 =
|
||||
SFG_TD(0 ,31,0,0),SFG_TD(0 ,63,0,0),SFG_TD(0 ,63,0,0),SFG_TD(0 ,63,0,0), // 60
|
||||
},
|
||||
{0, 1, 2, 3, 4, 5, 6}, // map.textureIndices
|
||||
0 // map.doorTextureIndex
|
||||
7 // map.doorTextureIndex
|
||||
}
|
||||
};
|
||||
|
||||
|
10
main.c
10
main.c
@ -105,12 +105,11 @@ void SFG_pixelFunc(RCL_PixelInfo *pixel)
|
||||
(pixel->hit.type & 0x7)
|
||||
:
|
||||
(
|
||||
(pixel->texCoords.y < (pixel->wallHeight - RCL_UNITS_PER_SQUARE)) ?
|
||||
(pixel->hit.type & 0x7) : SFG_currentLevel.mapPointer->doorTextureIndex
|
||||
(pixel->texCoords.y > RCL_UNITS_PER_SQUARE) ?
|
||||
(pixel->hit.type & 0x7) : 255 // SFG_currentLevel.mapPointer->doorTextureIndex
|
||||
)
|
||||
):
|
||||
((pixel->hit.type & 0x38) >> 3);
|
||||
|
||||
RCL_Unit textureV = pixel->texCoords.y;
|
||||
|
||||
if ((pixel->hit.type & SFG_TILE_PROPERTY_MASK) ==
|
||||
@ -120,13 +119,16 @@ void SFG_pixelFunc(RCL_PixelInfo *pixel)
|
||||
color =
|
||||
textureIndex != SFG_TILE_TEXTURE_TRANSPARENT ?
|
||||
(SFG_getTexel(
|
||||
SFG_currentLevel.textures[textureIndex],
|
||||
textureIndex != 255 ?
|
||||
SFG_currentLevel.textures[textureIndex]:
|
||||
SFG_texturesWall[SFG_currentLevel.mapPointer->doorTextureIndex],
|
||||
pixel->texCoords.x / 32,
|
||||
textureV / 32)
|
||||
) :
|
||||
SFG_TRANSPARENT_COLOR;
|
||||
|
||||
shadow = pixel->hit.direction >> 1;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user