From ef20eba54785473caa827c09acf27607f927b990 Mon Sep 17 00:00:00 2001 From: hgn Date: Tue, 9 Aug 2022 11:43:27 +0100 Subject: [PATCH] docs --- build.sh | 25 ++++++------------------- shaders.sh | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 19 deletions(-) mode change 100644 => 100755 shaders.sh diff --git a/build.sh b/build.sh index d7ea276..55c61df 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,11 @@ #!/bin/bash # Copyright (C) 2021-2022 Harry Godden (hgn) - All Rights Reserved - +# +# Main cross-compiling build script for Skate Rift +# Supports Linux and Windows building from a Linux Host +# +# vg must be "ln -s"'d into this src folder as the only dependency +# # Compiler Presets # ============================================================================== @@ -66,23 +71,6 @@ delay_run_game(){ run_game } -#TODO: Make this a seperate script -# it should not be called compile, rename to 'generate' shader headers, -# its a code writing tool, not a compiling tool -# -target_shaders="" -shader(){ - target_shaders="$target_shaders $1 $2 $3" -} - -compile_shaders(){ - titleit "Compiling shaders" - source shaders.sh - cd shaders - ../bin/linux/tools/shader $target_shaders - cd .. -} - link_content(){ ln -sr bin/content/textures/ $1/textures ln -sr bin/content/models/ $1/models @@ -118,7 +106,6 @@ vg_command(){ _folder=$_linux_folder _ext="" vg_compile_tools - compile_shaders # Main build _link="$_linux_linkgraphics $_linux_linksteam" diff --git a/shaders.sh b/shaders.sh old mode 100644 new mode 100755 index 2ebc67b..21beda4 --- a/shaders.sh +++ b/shaders.sh @@ -1,3 +1,15 @@ +#!/bin/bash +# Copyright (C) 2021-2022 Harry Godden (hgn) - All Rights Reserved +# +# Shader header generator script which wraps vg's tool +# Stores a list of shaders to build into -> .h files +# + +target_shaders="" +shader(){ + target_shaders="$target_shaders $1 $2 $3" +} + shader blit blit.vs blit.fs shader fscolour blit.vs colour.fs shader terrain standard.vs terrain.fs @@ -14,3 +26,7 @@ shader planeinf standard.vs planeinf.fs shader gpos standard.vs gpos.fs shader route standard.vs route.fs shader scoretext scoretext.vs vblend.fs + +cd shaders +../bin/linux/tools/shader $target_shaders +cd .. -- 2.25.1