From af643b0388801af6ee30d080aae17d1524cfa506 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sat, 7 Sep 2024 14:01:24 +0100 Subject: [PATCH] Add Sky debug texture and add hardecoded texture IDs --- project/code/TMV/TextureLoader.cs | 11 +++++----- project/sky.png | Bin 0 -> 272 bytes project/sky.png.import | 34 ++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 project/sky.png create mode 100644 project/sky.png.import diff --git a/project/code/TMV/TextureLoader.cs b/project/code/TMV/TextureLoader.cs index f3ef513..080b299 100644 --- a/project/code/TMV/TextureLoader.cs +++ b/project/code/TMV/TextureLoader.cs @@ -16,14 +16,15 @@ public partial class TextureLoader public TextureLoader(string fmName) { _fmName = fmName; - LoadDefaultTexture(); + LoadDefaultTextures(); } - private void LoadDefaultTexture() + private void LoadDefaultTextures() { - const string path = "res://project/jorge.png"; - var texture = ResourceLoader.Load(path); - _textureCache.Add(texture); + _textureCache.Add(ResourceLoader.Load("res://project/jorge.png")); + _textureCache.Add(ResourceLoader.Load("res://project/sky.png")); + _idMap.Add(0, 0); + _idMap.Add(249, 1); } public bool Register(int id, string path) diff --git a/project/sky.png b/project/sky.png new file mode 100644 index 0000000000000000000000000000000000000000..22eab94f2a6d6a3ed10815c4536e6c3fe45fab69 GIT binary patch literal 272 zcmV+r0q_2aP)Px#%1J~)R9J=WSHTT~Fbq5pJ5;=xfH68pSLzylvq8U1&^KZV`e`cT+Qd}C;o*~b z_>$PCGoZM-;jw_AM~fpdVp_$GM^Oq|Ys7@wt+Imh0zB>K=+U0Qfe;V^LO^K&jYM8w zmsLD;v&vIWiut+3CHy#$HV@tWeJH0TN-^i9J(~io2f5gPQQh%eIH|QDw`R>jAv!?q zmy*$h(i$(g<&gRgSdbH8!LAlqzJgp1lK@W?{}F|N5D)@tKC5{mMl;}ZBcg5a9?#z- W!C(8zHHCBl0000x literal 0 HcmV?d00001 diff --git a/project/sky.png.import b/project/sky.png.import new file mode 100644 index 0000000..1733699 --- /dev/null +++ b/project/sky.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d1rqwnr7u0rq7" +path="res://.godot/imported/sky.png-312b3ba912840be802229125c22a74bb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://project/sky.png" +dest_files=["res://.godot/imported/sky.png-312b3ba912840be802229125c22a74bb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1