diff --git a/SQCSim2021.sln b/SQCSim2021.sln new file mode 100644 index 0000000..a4beb16 --- /dev/null +++ b/SQCSim2021.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31624.102 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQCSim2021", "SQCSim2021\SQCSim2021.vcxproj", "{90AE3964-E572-47EC-A7FB-B550481DC822}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {90AE3964-E572-47EC-A7FB-B550481DC822}.Debug|x64.ActiveCfg = Debug|x64 + {90AE3964-E572-47EC-A7FB-B550481DC822}.Debug|x64.Build.0 = Debug|x64 + {90AE3964-E572-47EC-A7FB-B550481DC822}.Debug|x86.ActiveCfg = Debug|Win32 + {90AE3964-E572-47EC-A7FB-B550481DC822}.Debug|x86.Build.0 = Debug|Win32 + {90AE3964-E572-47EC-A7FB-B550481DC822}.Release|x64.ActiveCfg = Release|x64 + {90AE3964-E572-47EC-A7FB-B550481DC822}.Release|x64.Build.0 = Release|x64 + {90AE3964-E572-47EC-A7FB-B550481DC822}.Release|x86.ActiveCfg = Release|Win32 + {90AE3964-E572-47EC-A7FB-B550481DC822}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {422CB8A4-C8D4-44CC-9478-D867DE3AFFDA} + EndGlobalSection +EndGlobal diff --git a/SQCSim2021/SQCSim2021.vcxproj b/SQCSim2021/SQCSim2021.vcxproj new file mode 100644 index 0000000..fe88180 --- /dev/null +++ b/SQCSim2021/SQCSim2021.vcxproj @@ -0,0 +1,157 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {90ae3964-e572-47ec-a7fb-b550481dc822} + SQCSim2021 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SQCSim2021/SQCSim2021.vcxproj.filters b/SQCSim2021/SQCSim2021.vcxproj.filters new file mode 100644 index 0000000..2a24100 --- /dev/null +++ b/SQCSim2021/SQCSim2021.vcxproj.filters @@ -0,0 +1,48 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/SQCSim2021/blockarray3d.cpp b/SQCSim2021/blockarray3d.cpp new file mode 100644 index 0000000..50878f9 --- /dev/null +++ b/SQCSim2021/blockarray3d.cpp @@ -0,0 +1 @@ +#include "blockarray3d.h" diff --git a/SQCSim2021/blockarray3d.h b/SQCSim2021/blockarray3d.h new file mode 100644 index 0000000..9d84ff7 --- /dev/null +++ b/SQCSim2021/blockarray3d.h @@ -0,0 +1,20 @@ +#ifndef BLOCKARRAY3D_H__ +#define BLOCKARRAY3D_H__ + +#include "define.h" + +class BlockArray3d { +public: + BlockArray3d(); + BlockArray3d(BlockArray3d& ba); + ~BlockArray3d(); + +protected: + void Set(int x, int y, int z, BlockType type); + BlockType Get(int x, int y, int z) const; + void Reset(BlockType type); + +private: + int* arr; +}; +#endif \ No newline at end of file diff --git a/SQCSim2021/blockinfo.cpp b/SQCSim2021/blockinfo.cpp new file mode 100644 index 0000000..0bd7108 --- /dev/null +++ b/SQCSim2021/blockinfo.cpp @@ -0,0 +1 @@ +#include "blockinfo.h" diff --git a/SQCSim2021/blockinfo.h b/SQCSim2021/blockinfo.h new file mode 100644 index 0000000..18f8f15 --- /dev/null +++ b/SQCSim2021/blockinfo.h @@ -0,0 +1,18 @@ +#ifndef BLOCKINFO_H__ +#define BLOCKINFO_H__ + +#include "define.h" + +class BlockInfo { +public: + BlockInfo(BlockType type, const std::string& name); + ~BlockInfo(); + + BlockType GetType() const; + + void SetDurability(int durability); + int GetDurability() const; + void Show() const; +}; +#endif + diff --git a/SQCSim2021/chunk.cpp b/SQCSim2021/chunk.cpp new file mode 100644 index 0000000..3a07abc --- /dev/null +++ b/SQCSim2021/chunk.cpp @@ -0,0 +1 @@ +#include "chunk.h" diff --git a/SQCSim2021/chunk.h b/SQCSim2021/chunk.h new file mode 100644 index 0000000..a93a601 --- /dev/null +++ b/SQCSim2021/chunk.h @@ -0,0 +1,19 @@ +#ifndef CHUNK_H__ +#define CHUNK_H__ + +#include "define.h" +#include "blockarray3d.h" + +class Chunk : public BlockArray3d { +public: + Chunk(); + ~Chunk(); + + void RemoveBlock(int x, int y, int z); + void SetBlock(int x, int y, int z, BlockType type); + BlockType GetBlock(int x, int y, int z) const; + +}; + +#endif + diff --git a/SQCSim2021/define.h b/SQCSim2021/define.h new file mode 100644 index 0000000..baffa6e --- /dev/null +++ b/SQCSim2021/define.h @@ -0,0 +1,16 @@ +#ifndef DEFINE_H__ +#define DEFINE_H__ + +#include + +#define CHUNK_SIZE_X 16 +#define CHUNK_SIZE_Y 128 +#define CHUNK_SIZE_Z 16 + +enum BlockType { + BTYPE_AIR, + BTYPE_DIRT, + BTYPE_GRASS +}; + +#endif diff --git a/SQCSim2021/main.cpp b/SQCSim2021/main.cpp new file mode 100644 index 0000000..0bf4d5b --- /dev/null +++ b/SQCSim2021/main.cpp @@ -0,0 +1,5 @@ +#include "main.h" + +int main() { + return 0; +} diff --git a/SQCSim2021/main.h b/SQCSim2021/main.h new file mode 100644 index 0000000..6a0944c --- /dev/null +++ b/SQCSim2021/main.h @@ -0,0 +1,7 @@ +#ifndef MAIN_H__ +#define MAIN_H__ + +#include "define.h" + +#endif +