Fix small bugs

This commit is contained in:
Miloslav Ciz 2025-05-20 20:00:52 +02:00
parent c2bcf2d325
commit 35e52958f9
4 changed files with 52 additions and 20 deletions

View file

@ -1511,13 +1511,13 @@ void LCR_rendererDrawSky(int sky, S3L_Unit offsetH, S3L_Unit offsetV)
sky = 8 + 4 * sky;
LCR_loadImage(sky);
topColor = LCR_sampleImage(0,0);
topColor = LCR_sampleImage(0,0); // top strip color is the first sky pixel
LCR_loadImage(sky + 3);
LCR_loadImage(sky + 3); // load the last part of the sky (3)
bottomColor = LCR_sampleImage(LCR_IMAGE_SIZE - 1,LCR_IMAGE_SIZE - 1);
anchorPoint[0] = ((LCR_EFFECTIVE_RESOLUTION_X * offsetH) / S3L_F) %
(2 * LCR_IMAGE_SIZE * LCR_SETTING_SKY_SIZE);
anchorPoint[0] = ((LCR_IMAGE_SIZE * 2 * LCR_SETTING_SKY_SIZE * offsetH)
/ S3L_F) % (2 * LCR_IMAGE_SIZE * LCR_SETTING_SKY_SIZE);
if (anchorPoint[0] < 0)
anchorPoint[0] += 2 * LCR_IMAGE_SIZE * LCR_SETTING_SKY_SIZE;
@ -1541,7 +1541,7 @@ void LCR_rendererDrawSky(int sky, S3L_Unit offsetH, S3L_Unit offsetV)
}
anchorPoint[1] += 2 * LCR_IMAGE_SIZE * LCR_SETTING_SKY_SIZE;
int linesLeft = 0;
int skyPart = 0;
@ -1759,7 +1759,7 @@ void LCR_rendererDrawLOD(void)
{
variability = variability < 14 ? variability + 1 : 0;
bx = j * 8 + 4;
_LCR_rendererDrawLODBlock(bx,by,bz,2000,
_LCR_rendererDrawLODBlock(bx,by,bz,4 * S3L_F,
LCR_SETTING_LOD_COLOR,variability);
}
@ -2204,7 +2204,8 @@ void LCR_rendererDraw3D(void)
S3L_rotationToDirections(LCR_renderer.carModel->transform.rotation,
LCR_RENDERER_UNIT / 2,&p,&r,0);
#define LCR_PARTICLE_SIZE (16 << (LCR_EFFECTIVE_RESOLUTION_X / 640))
#define LCR_PARTICLE_SIZE \
((16 << (LCR_EFFECTIVE_RESOLUTION_X / 640)) >> LCR_ANT_RESOLUTION)
p.w = LCR_PARTICLE_SIZE;