From 76d0a7b0a7f80e6ea474b396c20459dc1405c592 Mon Sep 17 00:00:00 2001 From: kacperks Date: Fri, 4 Nov 2022 10:15:05 +0100 Subject: [PATCH 1/2] Linux & Windows CBP file --- XtreemNodesLinux.cbp | 59 +++++++++++++++++++++++ XtreemNodes.cbp => XtreemNodesWindows.cbp | 0 2 files changed, 59 insertions(+) create mode 100644 XtreemNodesLinux.cbp rename XtreemNodes.cbp => XtreemNodesWindows.cbp (100%) diff --git a/XtreemNodesLinux.cbp b/XtreemNodesLinux.cbp new file mode 100644 index 0000000..b7c8c00 --- /dev/null +++ b/XtreemNodesLinux.cbp @@ -0,0 +1,59 @@ + + + + + + diff --git a/XtreemNodes.cbp b/XtreemNodesWindows.cbp similarity index 100% rename from XtreemNodes.cbp rename to XtreemNodesWindows.cbp From ac2c3b5c79d4b8463637ddea6cda7c6924b4b3fc Mon Sep 17 00:00:00 2001 From: Kacper Kostka Date: Mon, 26 Dec 2022 20:50:14 -0500 Subject: [PATCH 2/2] All the changes since last commit --- LevelGenerator.cpp | 43 ++++++++++++++++++++ XtreemNodes.cbp | 3 ++ XtreemNodes.depend | 21 +++++----- XtreemNodes.layout | 84 ++++++++++++++++++++++++--------------- data/img/apple.png | Bin 231 -> 0 bytes data/img/cobble.png | Bin 225 -> 0 bytes data/img/gold.png | Bin 401 -> 0 bytes data/img/grass.png | Bin 423 -> 0 bytes data/img/grass_side.png | Bin 857 -> 0 bytes data/img/iron.png | Bin 289 -> 0 bytes data/img/maple.png | Bin 991 -> 0 bytes data/img/oak.png | Bin 877 -> 0 bytes data/img/test.png | Bin 347 -> 0 bytes data/img/texturemap.png | Bin 0 -> 5415 bytes include/LevelGenerator.h | 18 +++++++++ include/TextureHandler.h | 2 +- main.cpp | 31 --------------- 17 files changed, 127 insertions(+), 75 deletions(-) create mode 100644 LevelGenerator.cpp delete mode 100644 data/img/apple.png delete mode 100644 data/img/cobble.png delete mode 100644 data/img/gold.png delete mode 100644 data/img/grass.png delete mode 100644 data/img/grass_side.png delete mode 100644 data/img/iron.png delete mode 100644 data/img/maple.png delete mode 100644 data/img/oak.png delete mode 100644 data/img/test.png create mode 100644 data/img/texturemap.png create mode 100644 include/LevelGenerator.h diff --git a/LevelGenerator.cpp b/LevelGenerator.cpp new file mode 100644 index 0000000..c8084b8 --- /dev/null +++ b/LevelGenerator.cpp @@ -0,0 +1,43 @@ +#include "LevelGenerator.h" + +FastNoiseLite perlin, os, cellular; +int seed = 138; + +perlin.SetSeed(seed); +perlin.SetNoiseType(FastNoiseLite::NoiseType_Perlin); +perlin.SetFrequency(.01F); + +os.SetSeed(seed); +os.SetNoiseType(FastNoiseLite::NoiseType_OpenSimplex2); +os.SetFrequency(.01F); + +cellular.SetSeed(seed); +cellular.SetNoiseType(FastNoiseLite::NoiseType_Cellular); +cellular.SetFrequency(.1F); + +LevelGenerator::LevelGenerator() +{ + +} + +void LevelGenerator::generateBlock() +{ + for(int bx = 0; bx < 8; bx++) + { + for(int bz = 0; bz < 8; bz++) + { + for(int x = 0; x < 16; x++) + { + for(int z = 0; z < 16; z++) + { + float cX = (float)x + (16 * bx); + float cZ = (float)z + (16 * bz); + for(int y = 0; y < 48 * abs(perlin.GetNoise(cX, cZ)) / 2 + abs(cellular.GetNoise(cX, cZ)) * 2 + abs(os.GetNoise(cX, cZ)) * 4 + 10; y++) + { + blockManager.mapBlocks[bx][bz].addNode(y > 20 ? 1 : 2, 0, x, y, z); + } + } + } + } + } +} diff --git a/XtreemNodes.cbp b/XtreemNodes.cbp index 7678d56..1f7feae 100644 --- a/XtreemNodes.cbp +++ b/XtreemNodes.cbp @@ -40,12 +40,15 @@ + + + diff --git a/XtreemNodes.depend b/XtreemNodes.depend index 26a9616..c6795c3 100644 --- a/XtreemNodes.depend +++ b/XtreemNodes.depend @@ -1,5 +1,5 @@ # depslib dependency file v1.0 -1667337375 source:c:\development\xtreemminer\main.cpp +1672097148 source:c:\development\xtreemminer\main.cpp "Utilities.h" @@ -9,31 +9,30 @@ "TextureHandler.h" - "FastNoiseLite.h" -1667164197 c:\development\xtreemminer\include\noderenderer.h +1667160597 c:\development\xtreemminer\include\noderenderer.h "Base.h" "MapBlock.h" -1667167677 c:\development\xtreemminer\include\mapblock.h +1667164077 c:\development\xtreemminer\include\mapblock.h "Base.h" -1667069440 c:\development\xtreemminer\include\base.h +1667065840 c:\development\xtreemminer\include\base.h 1666531672 source:c:\development\xtreemminer\base.cpp "MapBlock.h" "Base.h" -1667148859 c:\development\xtreemminer\include\texturehandler.h +1672105046 c:\development\xtreemminer\include\texturehandler.h "stb_image.h" "Base.h" -1666448933 c:\development\xtreemminer\include\stb_image.h +1666445333 c:\development\xtreemminer\include\stb_image.h "stb_image.h" @@ -50,12 +49,12 @@ -1667069440 c:\development\xtreemminer\include\utilities.h +1667065840 c:\development\xtreemminer\include\utilities.h 1667079584 c:\development\xtreemminer\include\fastnoiselite.h -1667167831 source:c:\development\xtreemminer\mapblock.cpp +1667350805 source:c:\development\xtreemminer\mapblock.cpp "MapBlock.h" 1667294728 source:/home/kacperks/projects/XtreemNodes/MapBlock.cpp @@ -113,10 +112,10 @@ 1667294728 /home/kacperks/projects/XtreemNodes/include/FastNoiseLite.h -1667351497 source:c:\development\xtreemminer\gui.cpp +1667347897 source:c:\development\xtreemminer\gui.cpp "GUI.h" -1667336637 c:\development\xtreemminer\include\gui.h +1667333037 c:\development\xtreemminer\include\gui.h "Base.h" diff --git a/XtreemNodes.layout b/XtreemNodes.layout index 862f813..9c6732e 100644 --- a/XtreemNodes.layout +++ b/XtreemNodes.layout @@ -2,52 +2,72 @@ - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/img/apple.png b/data/img/apple.png deleted file mode 100644 index 750557e631a3a21d7ad06ce765edc26bfcdef3c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFUwskHdqW;=tl*U~G@^Omtp>?yQ!=*_4XnB}sdXpc&E`&9ewQ%fzp-|f62 YKRsVW-*aNQE6@cDp00i_>zopr00wzc3jhEB diff --git a/data/img/cobble.png b/data/img/cobble.png deleted file mode 100644 index 0faee33023b84726e16bf007a48a06867354a75a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFyQ%f5}%UM5o{9h}xe_HMl$te#UL#noIUzl~jBrPM#?OUtHy0^2%eQJ-T7Nlk! z7CERPBIhY0joPx$OG!jQR4C7tlFd%TFc5^lgh1Vd6hXxSo&z468xMq#_){+s*NMIBxE$&3V3|T4;4fx$`gh60Ou9f@%Bcw*JU7PbzPGZV?-pYH6Bd>#)Jy( z3Lqs^vZ5$42EaPZ0-yv$vf}d#6~@Sz7$bF!F`QTI5@vzu1QaDA7{jW?ZfE}eBf}}N zOQbYK+B+Q*2Vs{8idi5+N@yf#ZaHZFt8CJpd_`q2? zl|HKw!3Vr&=yQjIv2{3y?WWSkph8j7He9vz!wKvhU5DLb-4y8%6bQ}h(sf5b+Yl7D&E?F3?;pm9MpS8*xPjGb0$yIZxjvb@ v>81&a3SCEYNxhtaF|yg@zjbjj-+!K8@VgH2Nqf9K00000NkvXXu0mjfRw3M^JBeIx*fm;}a85w5HkpK#^mw5WRvOnXJW8hVPCcRJuD0IZr#W6(UGVeLg zre*^U28XDvZpDHM0?Dg(|NXCgTl@?|Jg={S<*%NDb055SUs=Ly_%LRpqw|ZJS2af4 z*DMQ|tVUcgo9& zJA_|_H9U6|viQ`?Kfi`~Qpok?vzcdh^x4lS$@%tjN94l~mmO|xSVrVAM3W6Lc)UW(?Wp$ OVeoYIb6Mw<&;$UtTBYp( diff --git a/data/img/grass_side.png b/data/img/grass_side.png deleted file mode 100644 index 453c64d67a7d5fb5dff7971179cc80affc790718..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 857 zcmV-f1E&0mP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2j&S2 z5hNf1y1!-s00P-bL_t(I%WacOZyR+K#eXyNpU%TGb{tP8b&Q;}H8iaPs8LpFM3G>H zgoG4z#im~b35l=5mNomV5aLmUXeml@Ax@of#;13Tk`@y)dk@o0ie<_h==JKP-z%z@;8__F@Oy4;nN7)HP?RJ zE7@q-e0(jT>H>gxm?A3@^|SGs=-zK*)b=JX^AVHUgj!1rL6WIXS!!z{6iM z0G=$GbXfA%8G{+OmyMUo|)O^fcuCF5+>W|(ByrUrm__AR!lvE@1h`HbDY zI`WQF1t1DDl5~#e9up-Qwx+Sa<8t)=dswwPEvLqQ+vR+aVi_8DTJO-i3|3pPO^v&E zb^#du`#rMI2(ygK$rL-u2um6J|3V$t;P)4QW0@L;ED*Y!69doxdWEj46l4ku%x$%Lw@p{N$8j}AzdD*Np%X8Dq-KcnT;*xRnJW))||qdDf$ zV@7F;T+vm|2MMJBQ&}*LXPiDd;OuFa^PZ3U@JkBSpim9Gu%O-EL6kDt&)+c@3#6}3 z56dvg=rkMjmm$?c2SDFc@x2K0mF8RR763o|aly7Nb8>i}^X|p!lx3}gH;s@ZiC|U` zB^k|%OFR>JVL>`uFi#>{P7PDZ@xp>>JR{2Hh-UL9{r(kUlCe>5Ko;RR4pExHJZ0Nf z(W@G-gMi+T6Kqq%2D%rQt7i(Y#z?Zn2M0|IC8trX5Cu~__n7TX3rlDW$0b+8C6bV^ jY8qRH#dQ$V_XGX|vfwv~A~-O}00000NkvXXu0mjf*oKCW diff --git a/data/img/iron.png b/data/img/iron.png deleted file mode 100644 index e3e6e847bfb0842b2768171ac1522200c9d5d190..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF7fcO5*u-^Z_N zCdi;9Z+91l4pvzYAZL=Ni(?4K_2eJ_|NplZNT?`&cJAix<=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JdzI} zDv$06bg2QL@rKa~4|0Rn{D5s|5H5s3DTtLquokxN3_H}YLyy2}#Gyu<)d(m?oW-b9 z>(Hk~UB#Ha8pE`hyA*SkY+CTK{QBG+m^Ow#jGg}Fy0kC2wRY&G-aGV>R`c-Sx$vj2jpMp5 zJ=;5{L{I#)b(?HZpFc0W)9N|?!HDgZZ@=8XH@p&8YL?u>;evN%y4-d?_1?C3&q{y) z?mV(~`y#UNbD%cezVpZOllvAn=65f?_0fgRTNkFpzMFg7{8jC%o2mQK6ASk1-Mcpz zU%mHd`}L1+EH0TY9k_cUCeF=XE>8Wm`CoRzcVnXK`^lfiSFa(st@U)d<^Q_ge&*P7 cYqRwSsN+=Y{1=n^?Z%6l^kQ9|FSHK*4{<*0+yDRo diff --git a/data/img/test.png b/data/img/test.png deleted file mode 100644 index 8ace58ba76c59f958b4736be6997a05575f98f23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 347 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~`v9L1R|bav z>o^$x11X08)wNZ14YjT9EgfC$z5P8CCr_9*W9sa=v*s_Hw{Y=-#Y-2hShal3y44#u zZvd*^y?58a!}~ikzD)p`o8;~8!qCAg>jC6&7I;J!Gca%qgD@k*tT_@uLG}_)Usv{L zTwSkKL-j;^>lFzk+`he$IW*{frItnwXPbL+k5{7{@Z@lbUJH(kJ^J9ahAKuZ@U57=1<6EWJJ1f6mt$ kMvJ}=iODN6?ASlBTL*K=nm_b21Uitx)78&qol`;+06x5eo&W#< diff --git a/data/img/texturemap.png b/data/img/texturemap.png new file mode 100644 index 0000000000000000000000000000000000000000..b9facd7e630c25b43ae6f9f9303b03f6df669655 GIT binary patch literal 5415 zcmd5=c{J2t*#FKbR6>z0%P3|2SyBjNY?0E4M8rsbw#L41nGvG0MUrK#S;COAo3SMP zq8VFEVNCXAXb6pA%)EZ@`|tbjyWDf`x%YX_J?DAu=YF2gJ@-Dl4L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tz@c7uH}BRHh)9>t%}k1Z3XyO$i?rE{yI zukX5XsxmtBuDJz%U26%>#zN6gYldkhV3)H}4(gg(tuv|i8CzI0Trfvo zXk&}aTD4~lACr;?Ik)E?uv #include -#include "FastNoiseLite.h" #include #include NodeRenderer renderer; -//BlockManager blockManager; BlockManager blockManager; TextureHandler textureHandler; @@ -163,38 +161,9 @@ int main(int argc, char **argv) // Load textures textureHandler.loadAllTextures(); - FastNoiseLite perlin, os, cellular; - int seed = 138; - perlin.SetSeed(seed); - perlin.SetNoiseType(FastNoiseLite::NoiseType_Perlin); - perlin.SetFrequency(.01F); - os.SetSeed(seed); - os.SetNoiseType(FastNoiseLite::NoiseType_OpenSimplex2); - os.SetFrequency(.01F); - cellular.SetSeed(seed); - cellular.SetNoiseType(FastNoiseLite::NoiseType_Cellular); - cellular.SetFrequency(.1F); - for(int bx = 0; bx < 8; bx++) - { - for(int bz = 0; bz < 8; bz++) - { - for(int x = 0; x < 16; x++) - { - for(int z = 0; z < 16; z++) - { - float cX = (float)x + (16 * bx); - float cZ = (float)z + (16 * bz); - for(int y = 0; y < 48 * abs(perlin.GetNoise(cX, cZ)) / 2 + abs(cellular.GetNoise(cX, cZ)) * 2 + abs(os.GetNoise(cX, cZ)) * 4 + 10; y++) - { - blockManager.mapBlocks[bx][bz].addNode(y > 20 ? 1 : 2, 0, x, y, z); - } - } - } - } - }