mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-20 16:37:40 +00:00
2d3d:: shadows
This commit is contained in:
@@ -828,6 +828,12 @@ void queueball(const transmatrix& V, ld rad, color_t col, eItem what) {
|
||||
}
|
||||
}
|
||||
|
||||
void make_shadow(hpcshape& sh) {
|
||||
sh.shs = isize(hpc);
|
||||
for(int i=sh.s; i < sh.e; i++) hpcpush(orthogonal_move(hpc[i], geom3::FLOOR - geom3::human_height / 100));
|
||||
sh.she = isize(hpc);
|
||||
}
|
||||
|
||||
void make_3d_models() {
|
||||
if(DIM == 2) return;
|
||||
DEBBI(DF_POLY, ("make_3d_models"));
|
||||
@@ -838,6 +844,17 @@ void make_3d_models() {
|
||||
utt.tvertices.clear();
|
||||
utt.texture_id = floor_textures->renderedTexture;
|
||||
}
|
||||
|
||||
if(WDIM == 2) {
|
||||
DEBB(DF_POLY, ("shadows"));
|
||||
for(hpcshape* sh: {&shBatWings, &shBugBody, &shBullBody, &shButterflyWing, &shCatBody, &shDogBody, &shDogTorso,
|
||||
&shEagle, &shFemaleBody, &shFlailMissile, &shGadflyWing, &shGargoyleWings, &shHawk, &shJiangShi, &shKnife,
|
||||
&shPBody, &shPHead, &shRaiderBody, &shReptileBody, &shSkeletonBody, &shTongue, &shTrapArrow, &shTrylobite,
|
||||
&shWaterElemental, &shWolfBody, &shYeti})
|
||||
make_shadow(*sh);
|
||||
|
||||
for(int i=0; i<8; i++) make_shadow(shAsteroid[i]);
|
||||
}
|
||||
|
||||
DEBB(DF_POLY, ("humanoids"));
|
||||
make_humanoid_3d(shPBody);
|
||||
|
||||
Reference in New Issue
Block a user