Trying to correct drawing issues...
This commit is contained in:
parent
4f9de9527f
commit
b043c5e277
3 changed files with 14 additions and 11 deletions
|
@ -36,7 +36,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# define raylib directory for include and library
|
# define raylib directory for include and library
|
||||||
RAYLIB_PATH ?= C:\raylib\raylib
|
RAYLIB_PATH ?= C:\GitHub\raylib
|
||||||
|
|
||||||
# determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
# determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
|
|
@ -6,7 +6,7 @@ in vec2 vertexTexCoord;
|
||||||
in vec4 vertexColor;
|
in vec4 vertexColor;
|
||||||
|
|
||||||
// Input uniform values
|
// Input uniform values
|
||||||
uniform mat4 mvpMatrix;
|
uniform mat4 mvp;
|
||||||
|
|
||||||
// Output vertex attributes (to fragment shader)
|
// Output vertex attributes (to fragment shader)
|
||||||
out vec2 fragTexCoord;
|
out vec2 fragTexCoord;
|
||||||
|
@ -21,5 +21,5 @@ void main()
|
||||||
fragColor = vertexColor;
|
fragColor = vertexColor;
|
||||||
|
|
||||||
// Calculate final vertex position
|
// Calculate final vertex position
|
||||||
gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
|
gl_Position = mvp*vec4(vertexPosition, 1.0);
|
||||||
}
|
}
|
|
@ -855,11 +855,11 @@ void DrawTitleScreen(void)
|
||||||
{
|
{
|
||||||
BeginShaderMode(colorBlend);
|
BeginShaderMode(colorBlend);
|
||||||
|
|
||||||
DrawTexturePro(atlas02,gameplay_background, (Rectangle){0, 0, gameplay_background.width*2, gameplay_background.height*2}, (Vector2){0, 0}, 0, color02);
|
DrawTexturePro(atlas02, gameplay_background, (Rectangle){0, 0, gameplay_background.width*2, gameplay_background.height*2}, (Vector2){0, 0}, 0, color02);
|
||||||
|
|
||||||
// Draw parallax
|
// Draw parallax
|
||||||
DrawParallaxBack();
|
//DrawParallaxBack();
|
||||||
DrawParallaxMiddle();
|
//DrawParallaxMiddle();
|
||||||
|
|
||||||
for (int i = 0; i < MAX_particle; i++)
|
for (int i = 0; i < MAX_particle; i++)
|
||||||
{
|
{
|
||||||
|
@ -946,7 +946,6 @@ void DrawTitleScreen(void)
|
||||||
(Rectangle){ rainParticle.particle[i].position.x, rainParticle.particle[i].position.y, particle_waterdrop.width*rainParticle.particle[i].size, particle_waterdrop.height*rainParticle.particle[i].size },
|
(Rectangle){ rainParticle.particle[i].position.x, rainParticle.particle[i].position.y, particle_waterdrop.width*rainParticle.particle[i].size, particle_waterdrop.height*rainParticle.particle[i].size },
|
||||||
(Vector2){ particle_waterdrop.width*rainParticle.particle[i].size/2, particle_waterdrop.height*rainParticle.particle[i].size/2 }, rainParticle.particle[i].rotation,
|
(Vector2){ particle_waterdrop.width*rainParticle.particle[i].size/2, particle_waterdrop.height*rainParticle.particle[i].size/2 }, rainParticle.particle[i].rotation,
|
||||||
Fade(rainParticle.particle[i].color, rainParticle.particle[i].alpha));
|
Fade(rainParticle.particle[i].color, rainParticle.particle[i].alpha));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 1024; i++)
|
for (int i = 0; i < 1024; i++)
|
||||||
|
@ -959,7 +958,6 @@ void DrawTitleScreen(void)
|
||||||
|
|
||||||
for (int i = 0; i < 256; i++)
|
for (int i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (snowStormParticle.particle[i].active) DrawTexturePro(atlas01, particle_icecrystal,
|
if (snowStormParticle.particle[i].active) DrawTexturePro(atlas01, particle_icecrystal,
|
||||||
(Rectangle){ snowStormParticle.particle[i].position.x, snowStormParticle.particle[i].position.y, particle_icecrystal.width*snowStormParticle.particle[i].size, particle_icecrystal.height*snowStormParticle.particle[i].size },
|
(Rectangle){ snowStormParticle.particle[i].position.x, snowStormParticle.particle[i].position.y, particle_icecrystal.width*snowStormParticle.particle[i].size, particle_icecrystal.height*snowStormParticle.particle[i].size },
|
||||||
(Vector2){ particle_icecrystal.width*snowStormParticle.particle[i].size/2, particle_icecrystal.height*snowStormParticle.particle[i].size/2 }, snowStormParticle.particle[i].rotation,
|
(Vector2){ particle_icecrystal.width*snowStormParticle.particle[i].size/2, particle_icecrystal.height*snowStormParticle.particle[i].size/2 }, snowStormParticle.particle[i].rotation,
|
||||||
|
@ -969,8 +967,7 @@ void DrawTitleScreen(void)
|
||||||
|
|
||||||
for (int i = 0; i < 20; i++)
|
for (int i = 0; i < 20; i++)
|
||||||
{
|
{
|
||||||
|
if (rayparticle.particle[i].active) DrawTexturePro(atlas01, gameplay_fx_lightraymid,
|
||||||
if (rayparticle.particle[i].active) DrawTexturePro(atlas01, gameplay_fx_lightraymid,
|
|
||||||
(Rectangle){ rayparticle.particle[i].position.x, rayparticle.particle[i].position.y, gameplay_fx_lightraymid.width*rayparticle.particle[i].size, gameplay_fx_lightraymid.height*rayparticle.particle[i].size },
|
(Rectangle){ rayparticle.particle[i].position.x, rayparticle.particle[i].position.y, gameplay_fx_lightraymid.width*rayparticle.particle[i].size, gameplay_fx_lightraymid.height*rayparticle.particle[i].size },
|
||||||
(Vector2){ gameplay_fx_lightraymid.width*rayparticle.particle[i].size/2, gameplay_fx_lightraymid.height*rayparticle.particle[i].size/2 }, rayparticle.particle[i].rotation,
|
(Vector2){ gameplay_fx_lightraymid.width*rayparticle.particle[i].size/2, gameplay_fx_lightraymid.height*rayparticle.particle[i].size/2 }, rayparticle.particle[i].rotation,
|
||||||
Fade(rayparticle.particle[i].color, rayparticle.particle[i].alpha));
|
Fade(rayparticle.particle[i].color, rayparticle.particle[i].alpha));
|
||||||
|
@ -987,6 +984,8 @@ void DrawTitleScreen(void)
|
||||||
if (musicActive)DrawTexturePro(atlas01, title_speaker_on, (Rectangle){speakerButton.x, speakerButton.y, title_speaker_on.width, title_speaker_on.height}, (Vector2){0,0}, 0, WHITE);
|
if (musicActive)DrawTexturePro(atlas01, title_speaker_on, (Rectangle){speakerButton.x, speakerButton.y, title_speaker_on.width, title_speaker_on.height}, (Vector2){0,0}, 0, WHITE);
|
||||||
else DrawTexturePro(atlas01, title_speaker_off, (Rectangle){speakerButton.x, speakerButton.y, title_speaker_off.width, title_speaker_off.height}, (Vector2){0,0}, 0, WHITE);
|
else DrawTexturePro(atlas01, title_speaker_off, (Rectangle){speakerButton.x, speakerButton.y, title_speaker_off.width, title_speaker_off.height}, (Vector2){0,0}, 0, WHITE);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
DrawParallaxFront();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Title Screen Unload logic
|
// Title Screen Unload logic
|
||||||
|
@ -1004,7 +1003,10 @@ int FinishTitleScreen(void)
|
||||||
static void DrawParallaxFront(void)
|
static void DrawParallaxFront(void)
|
||||||
{
|
{
|
||||||
Rectangle ground01 = gameplay_back_ground01;
|
Rectangle ground01 = gameplay_back_ground01;
|
||||||
|
|
||||||
|
DrawTexturePro(atlas02, gameplay_back_tree01_layer01, (Rectangle){0, 0, gameplay_back_tree01_layer01.width*2, gameplay_back_tree01_layer01.height*2}, (Vector2){0,0}, 0, WHITE);
|
||||||
|
|
||||||
|
/*
|
||||||
//DrawTexturePro(atlas02, gameplay_back_tree01_layer03, (Rectangle){0, 21, gameplay_back_tree01_layer03.width*2, gameplay_back_tree01_layer03.height*2}, (Vector2){0,0}, 0, color02);
|
//DrawTexturePro(atlas02, gameplay_back_tree01_layer03, (Rectangle){0, 21, gameplay_back_tree01_layer03.width*2, gameplay_back_tree01_layer03.height*2}, (Vector2){0,0}, 0, color02);
|
||||||
DrawTexturePro(atlas02, gameplay_back_tree01_layer01, (Rectangle){(int)parallaxFrontOffset, 60, gameplay_back_tree01_layer01.width*2, gameplay_back_tree01_layer01.height*2}, (Vector2){0,0}, 0, color02);
|
DrawTexturePro(atlas02, gameplay_back_tree01_layer01, (Rectangle){(int)parallaxFrontOffset, 60, gameplay_back_tree01_layer01.width*2, gameplay_back_tree01_layer01.height*2}, (Vector2){0,0}, 0, color02);
|
||||||
DrawTexturePro(atlas02, gameplay_back_tree02_layer01, (Rectangle){(int)parallaxFrontOffset + 140, 60, gameplay_back_tree02_layer01.width*2, gameplay_back_tree02_layer01.height*2}, (Vector2){0,0}, 0, color02);
|
DrawTexturePro(atlas02, gameplay_back_tree02_layer01, (Rectangle){(int)parallaxFrontOffset + 140, 60, gameplay_back_tree02_layer01.width*2, gameplay_back_tree02_layer01.height*2}, (Vector2){0,0}, 0, color02);
|
||||||
|
@ -1016,7 +1018,8 @@ static void DrawParallaxFront(void)
|
||||||
DrawTexturePro(atlas02, gameplay_back_tree08_layer01, (Rectangle){(int)parallaxFrontOffset + 140*7, 60, gameplay_back_tree08_layer01.width*2, gameplay_back_tree08_layer01.height*2}, (Vector2){0,0}, 0, color02);
|
DrawTexturePro(atlas02, gameplay_back_tree08_layer01, (Rectangle){(int)parallaxFrontOffset + 140*7, 60, gameplay_back_tree08_layer01.width*2, gameplay_back_tree08_layer01.height*2}, (Vector2){0,0}, 0, color02);
|
||||||
DrawTexturePro(atlas02, gameplay_back_ground01, (Rectangle){0, 559, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01);
|
DrawTexturePro(atlas02, gameplay_back_ground01, (Rectangle){0, 559, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01);
|
||||||
DrawTexturePro(atlas02, (Rectangle){ground01.x, ground01.y + ground01.height, ground01.width, -ground01.height}, (Rectangle){0, -33, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01);
|
DrawTexturePro(atlas02, (Rectangle){ground01.x, ground01.y + ground01.height, ground01.width, -ground01.height}, (Rectangle){0, -33, ground01.width*2, ground01.height*2}, (Vector2){0,0}, 0, color01);
|
||||||
}
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
static void DrawParallaxMiddle(void)
|
static void DrawParallaxMiddle(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue