Corrected some issues on game
Now it works! :)
This commit is contained in:
parent
9668f546d3
commit
61b0ab5332
@ -151,7 +151,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing
|
||||
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB)
|
||||
# -s USE_PTHREADS=1 # multithreading support
|
||||
CFLAGS += -s USE_GLFW=3 -s ASSERTIONS=1 --profiling -s TOTAL_MEMORY=16777216 --preload-file resources
|
||||
CFLAGS += -s USE_GLFW=3 -s ASSERTIONS=1 --profiling -s ALLOW_MEMORY_GROWTH=1 --preload-file resources
|
||||
endif
|
||||
|
||||
# Define include paths for required headers
|
||||
@ -218,7 +218,7 @@ endif
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# resources file contains raylib icon for windows .exe
|
||||
# -Wl,--subsystem,windows hides the console window
|
||||
CFLAGS += $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows
|
||||
LDLIBS += $(RAYLIB_PATH)/src/resources -Wl,--subsystem,windows
|
||||
endif
|
||||
|
||||
# Define output extension to generate a .html file using provided shell
|
||||
@ -253,7 +253,7 @@ all:
|
||||
|
||||
# Project target defined by PROJECT_NAME
|
||||
$(PROJECT_NAME): $(OBJS)
|
||||
$(CC) -o $(PROJECT_NAME)$(EXT) $(OBJS) $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
$(CC) -o $(PROJECT_NAME)$(EXT) $(OBJS) $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) $(WEB_SHELL)
|
||||
|
||||
# Compile source files
|
||||
# NOTE: This pattern will compile every module defined on $(OBJS)
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 899 KiB After Width: | Height: | Size: 994 KiB |
@ -6,7 +6,7 @@ attribute vec2 vertexTexCoord;
|
||||
attribute vec4 vertexColor;
|
||||
|
||||
// Input uniform values
|
||||
uniform mat4 mvpMatrix;
|
||||
uniform mat4 mvp;
|
||||
|
||||
// Output vertex attributes (to fragment shader)
|
||||
varying vec2 fragTexCoord;
|
||||
@ -21,5 +21,5 @@ void main()
|
||||
fragColor = vertexColor;
|
||||
|
||||
// Calculate final vertex position
|
||||
gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
|
||||
gl_Position = mvp*vec4(vertexPosition, 1.0);
|
||||
}
|
@ -858,8 +858,8 @@ void DrawTitleScreen(void)
|
||||
DrawTexturePro(atlas02, gameplay_background, (Rectangle){0, 0, gameplay_background.width*2, gameplay_background.height*2}, (Vector2){0, 0}, 0, color02);
|
||||
|
||||
// Draw parallax
|
||||
//DrawParallaxBack();
|
||||
//DrawParallaxMiddle();
|
||||
DrawParallaxBack();
|
||||
DrawParallaxMiddle();
|
||||
|
||||
for (int i = 0; i < MAX_particle; i++)
|
||||
{
|
||||
@ -984,8 +984,6 @@ 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);
|
||||
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
|
||||
@ -1003,10 +1001,7 @@ int FinishTitleScreen(void)
|
||||
static void DrawParallaxFront(void)
|
||||
{
|
||||
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_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);
|
||||
@ -1018,7 +1013,6 @@ 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_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);
|
||||
*/
|
||||
}
|
||||
|
||||
static void DrawParallaxMiddle(void)
|
||||
|
Loading…
Reference in New Issue
Block a user