Start texturing
This commit is contained in:
parent
67567e210a
commit
d02b8b4ec3
5 changed files with 752 additions and 728 deletions
15
game.h
15
game.h
|
@ -112,6 +112,9 @@ void LCR_gameInit(void)
|
|||
LCR_mapLoad(map1);
|
||||
|
||||
LCR_rendererInit();
|
||||
|
||||
|
||||
LCR_loadImage(0);
|
||||
}
|
||||
|
||||
void LCR_gameEnd(void)
|
||||
|
@ -127,18 +130,8 @@ uint8_t LCR_gameStep(uint32_t time)
|
|||
|
||||
if (time >= LCR_nextRenderFrameTime)
|
||||
{
|
||||
int skyOffsetV = LCR_EFFECTIVE_RESOLUTION_Y / 2 +
|
||||
((LCR_EFFECTIVE_RESOLUTION_Y / 2) *
|
||||
LCR_rendererGetCameraPitch()) /
|
||||
(LCR_SQUARE_SIDE_LEN / LCR_SETTING_SKY_ROLL_MULTIPLIER_V);
|
||||
|
||||
int skyOffsetH = LCR_SKY_IMAGE_SIZE - 1 -
|
||||
(LCR_rendererGetCameraYaw() * LCR_SKY_IMAGE_SIZE) /
|
||||
(LCR_SQUARE_SIDE_LEN / LCR_SETTING_SKY_ROLL_MULTIPLIER_H);
|
||||
|
||||
LCR_drawBackground(skyOffsetV);
|
||||
LCR_drawBackground(0);
|
||||
LCR_rendererDraw();
|
||||
LCR_drawSkyStrip(skyOffsetV,skyOffsetH);
|
||||
|
||||
LCR_nextRenderFrameTime += 1000 / LCR_SETTING_FPS;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue