diff options
| author | Ray <[email protected]> | 2017-10-24 00:27:25 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2017-10-24 00:27:25 +0200 |
| commit | 61b0ab53322c0063f8eda96f5dd6cdf3b0ed4f2f (patch) | |
| tree | 3f4369b485f5fcacf87f4174380f975953f84f6f /games | |
| parent | 9668f546d3d97d6ee364c5322cf3d64a7998cf55 (diff) | |
| download | raylib-61b0ab53322c0063f8eda96f5dd6cdf3b0ed4f2f.tar.gz raylib-61b0ab53322c0063f8eda96f5dd6cdf3b0ed4f2f.zip | |
Corrected some issues on game
Now it works! :)
Diffstat (limited to 'games')
| -rw-r--r-- | games/koala_seasons/Makefile | 6 | ||||
| -rw-r--r-- | games/koala_seasons/resources/graphics/atlas02.png | bin | 920645 -> 1017615 bytes | |||
| -rw-r--r-- | games/koala_seasons/resources/shaders/glsl100/base.vs | 4 | ||||
| -rw-r--r-- | games/koala_seasons/screens/screen_title.c | 10 |
4 files changed, 7 insertions, 13 deletions
diff --git a/games/koala_seasons/Makefile b/games/koala_seasons/Makefile index 90676e35..3ca03a48 100644 --- a/games/koala_seasons/Makefile +++ b/games/koala_seasons/Makefile @@ -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) diff --git a/games/koala_seasons/resources/graphics/atlas02.png b/games/koala_seasons/resources/graphics/atlas02.png Binary files differindex c9c96d2d..c9437059 100644 --- a/games/koala_seasons/resources/graphics/atlas02.png +++ b/games/koala_seasons/resources/graphics/atlas02.png diff --git a/games/koala_seasons/resources/shaders/glsl100/base.vs b/games/koala_seasons/resources/shaders/glsl100/base.vs index b05d3463..93e8c860 100644 --- a/games/koala_seasons/resources/shaders/glsl100/base.vs +++ b/games/koala_seasons/resources/shaders/glsl100/base.vs @@ -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); }
\ No newline at end of file diff --git a/games/koala_seasons/screens/screen_title.c b/games/koala_seasons/screens/screen_title.c index fd166196..0459906d 100644 --- a/games/koala_seasons/screens/screen_title.c +++ b/games/koala_seasons/screens/screen_title.c @@ -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) |
