rebase
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
tgtk/builds/*
|
||||
tgtk/x64/*
|
||||
tgtk/massshoot/x64/*
|
||||
tgtk/edwyplanner/x64/*
|
||||
tgtk/include
|
||||
tgtk/.vs/*
|
||||
textures/*
|
37
README.md
Normal file
@ -0,0 +1,37 @@
|
||||
<<<<<<< HEAD
|
||||
# TGTK
|
||||
TGTK(formerly MassShoot) is a game engine based on cubic geometry. Its map format is entirely composed of bounding boxes. This allows for simple to parse/write map files.
|
||||
|
||||
This is a mirror of the game I made for the Acerola Jam Zero.
|
||||
|
||||
## License
|
||||
The engine code is MIT. The assets are under all rights reserved.
|
||||
=======
|
||||
# Dead Weather
|
||||
|
||||
My submission for the Acerola Jam Zero.
|
||||
|
||||
## Synopsis
|
||||
Dead Weather is a game where you have to defend a local TV station from a ghost attack to prevent it from getting hijacked.
|
||||
|
||||
## Dependencies:
|
||||
### For building the game:
|
||||
- raylib
|
||||
- Chaiscript
|
||||
|
||||
### For reading its garbage code:
|
||||
- alcohol
|
||||
- crack
|
||||
- caffeine
|
||||
- therapy
|
||||
- mescaline
|
||||
- lynks disease
|
||||
- a three-tiered pot
|
||||
- 12 gauge granular clay
|
||||
|
||||
## About the code
|
||||
Trans Girl Toolkit / TGTK is an engine I've been cooking for the past few months. Its code is... uh... considered abstract art and is reminiscent of Jackson Pollock paintings.
|
||||
|
||||
## License
|
||||
All rights reserved. For now at least.
|
||||
>>>>>>> 948d2dd (Update README.md)
|
BIN
ghosttexture.png
Normal file
After Width: | Height: | Size: 20 KiB |
8
tgtk/New Build (with Debug binaries).bat
Normal file
@ -0,0 +1,8 @@
|
||||
@echo off
|
||||
set /p buildname=What build name?
|
||||
mkdir builds\debug\build-%date%-%buildname%
|
||||
xcopy /e /i massshoot\massshoot builds\debug\build-%date%-%buildname%\massshoot
|
||||
copy x64\Debug\massshoot.exe builds\debug\build-%date%-%buildname%\
|
||||
copy x64\Debug\edwyplanner.exe builds\debug\build-%date%-%buildname%\
|
||||
echo Debug build done. Press any key to exit.
|
||||
pause > nul
|
8
tgtk/New Build (with Release binaries).bat
Normal file
@ -0,0 +1,8 @@
|
||||
@echo off
|
||||
set /p buildname=What build name?
|
||||
mkdir builds\release\build-%date%-%buildname%
|
||||
xcopy /e /i massshoot\massshoot builds\release\build-%date%-%buildname%\massshoot
|
||||
copy x64\Release\massshoot.exe builds\release\build-%date%-%buildname%\
|
||||
copy x64\Release\edwyplanner.exe builds\release\build-%date%-%buildname%\
|
||||
echo Release build done. Press any key to exit.
|
||||
pause > nul
|
151
tgtk/edwyplanner/edwyplanner.vcxproj
Normal file
@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{fd6eb8a2-0498-4330-8675-b99e1b87f265}</ProjectGuid>
|
||||
<RootNamespace>edwyplanner</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>raylib.lib;gdi32.lib;winmm.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>raylib.lib;gdi32.lib;winmm.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>raylib.lib;gdi32.lib;winmm.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>raylib.lib;gdi32.lib;winmm.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="rlremoved.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="rlremoved.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
30
tgtk/edwyplanner/edwyplanner.vcxproj.filters
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Fichiers sources">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers d%27en-tête">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers de ressources">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="rlremoved.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="rlremoved.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
4
tgtk/edwyplanner/edwyplanner.vcxproj.user
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
149
tgtk/edwyplanner/main.cpp
Normal file
@ -0,0 +1,149 @@
|
||||
#include <raylib.h>
|
||||
#include "rlremoved.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
class KwaplanBox {
|
||||
public:
|
||||
float x, y, z, width, height, length;
|
||||
std::string textureInTextures;
|
||||
};
|
||||
int main() {
|
||||
InitWindow(1280, 720, "EdwyPlanner");
|
||||
SetTargetFPS(60);
|
||||
Camera camera;
|
||||
camera.position = { 10, 10, 10 };
|
||||
camera.target = { 0,0,0 };
|
||||
camera.fovy = 70;
|
||||
camera.up = { 0,1,0 };
|
||||
camera.projection = CAMERA_PERSPECTIVE;
|
||||
std::map<std::string, Texture2D> textures;
|
||||
std::string texturefile;
|
||||
std::cout << "Select texture file: ";
|
||||
|
||||
std::getline(std::cin, texturefile);
|
||||
std::ifstream textureData(texturefile);
|
||||
|
||||
std::string textureName, texturePath;
|
||||
|
||||
while (textureData >> textureName >> texturePath) {
|
||||
// MassShoot::Skybox::LoadSkybox(line);
|
||||
if (textures.find(textureName) != textures.end()) {
|
||||
UnloadTexture(textures.at(textureName));
|
||||
textures.erase(textureName);
|
||||
}
|
||||
textures.insert_or_assign(textureName, LoadTexture(texturePath.c_str()));
|
||||
}
|
||||
|
||||
textureData.close();
|
||||
|
||||
std::vector<KwaplanBox> boxes;
|
||||
std::vector<KwaplanBox> boxesCancelled;
|
||||
std::string mapfile;
|
||||
std::cout << "Select map file: ";
|
||||
|
||||
std::getline(std::cin, mapfile);
|
||||
std::ifstream mapData(mapfile);
|
||||
|
||||
float x1,y1,z1,x2,y2,z2;
|
||||
|
||||
while (mapData >> x1 >> y1 >> z1 >> x2 >> y2 >> z2 >> textureName) {
|
||||
KwaplanBox newBox;
|
||||
newBox.width = x2 - x1;
|
||||
newBox.height = y2 - y1;
|
||||
newBox.length = z2 - z1;
|
||||
newBox.x = x2 - (newBox.width/2);
|
||||
newBox.y = y2 - (newBox.height/2);
|
||||
newBox.z = z2 - (newBox.length/2);
|
||||
newBox.textureInTextures = textureName;
|
||||
boxes.push_back(newBox);
|
||||
}
|
||||
|
||||
mapData.close();
|
||||
std::cout << boxes.size();
|
||||
bool stuck = true;
|
||||
while (!WindowShouldClose()) {
|
||||
SetExitKey(0);
|
||||
|
||||
if (IsKeyPressed(KEY_ESCAPE)) {
|
||||
if (stuck) {
|
||||
stuck = false;
|
||||
EnableCursor();
|
||||
}
|
||||
else {
|
||||
stuck = true;
|
||||
DisableCursor();
|
||||
}
|
||||
}
|
||||
|
||||
BeginDrawing();
|
||||
ClearBackground(SKYBLUE);
|
||||
|
||||
UpdateCameraPro(&camera,
|
||||
{
|
||||
(IsKeyDown(KEY_W) || IsKeyDown(KEY_UP)) * 0.1f - // Move forward-backward
|
||||
(IsKeyDown(KEY_S) || IsKeyDown(KEY_DOWN)) * 0.1f,
|
||||
(IsKeyDown(KEY_D) || IsKeyDown(KEY_RIGHT)) * 0.1f - // Move right-left
|
||||
(IsKeyDown(KEY_A) || IsKeyDown(KEY_LEFT)) * 0.1f,
|
||||
0.0f // Move up-down
|
||||
},
|
||||
{
|
||||
GetMouseDelta().x * 0.05f, // Rotation: yaw
|
||||
GetMouseDelta().y * 0.05f, // Rotation: pitch
|
||||
0.0f // Rotation: roll
|
||||
},
|
||||
0); // Move to target (zoom)
|
||||
BeginMode3D(camera);
|
||||
DrawGrid(10, 10);
|
||||
|
||||
for (int i = 0; i < boxes.size(); i++) {
|
||||
// à tes souhaits
|
||||
DrawCubeTexture(textures[boxes.at(i).textureInTextures], { (float)boxes.at(i).x, (float)boxes.at(i).y, (float)boxes.at(i).z }, (float)boxes.at(i).width, (float)boxes.at(i).height, (float)boxes.at(i).length, WHITE);
|
||||
}
|
||||
|
||||
EndMode3D();
|
||||
EndDrawing();
|
||||
|
||||
|
||||
if (IsKeyDown(KEY_LEFT_CONTROL)) {
|
||||
if (IsKeyPressed(KEY_Z)) {
|
||||
boxesCancelled.push_back(boxes.at(boxes.size() - 1));
|
||||
boxes.pop_back();
|
||||
}
|
||||
if (IsKeyPressed(KEY_Y)) {
|
||||
boxes.push_back(boxesCancelled.at(boxesCancelled.size() - 1));
|
||||
boxesCancelled.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (IsKeyPressed(KEY_ENTER)) {
|
||||
KwaplanBox newBox;
|
||||
std::string command;
|
||||
std::cout << "X:";
|
||||
std::cin >> command;
|
||||
newBox.x = std::stoi(command);
|
||||
std::cout << "Y:";
|
||||
std::cin >> command;
|
||||
newBox.y = std::stoi(command);
|
||||
std::cout << "Z:";
|
||||
std::cin >> command;
|
||||
newBox.z = std::stoi(command);
|
||||
std::cout << "W:";
|
||||
std::cin >> command;
|
||||
newBox.width = std::stoi(command);
|
||||
std::cout << "H:";
|
||||
std::cin >> command;
|
||||
newBox.height = std::stoi(command);
|
||||
std::cout << "L:";
|
||||
std::cin >> command;
|
||||
newBox.length = std::stoi(command);
|
||||
std::cout << "Texture:";
|
||||
std::cin >> command;
|
||||
newBox.textureInTextures = command;
|
||||
boxes.push_back(newBox);
|
||||
}
|
||||
}
|
||||
}
|
7
tgtk/edwyplanner/map.txt
Normal file
@ -0,0 +1,7 @@
|
||||
-55 -1000 -55 55 0 55 grass
|
||||
5 0 0 10 10 5 concrete
|
||||
10 5 0 30 10 5 concrete
|
||||
5 10 0 10 20 5 concrete
|
||||
10 15 0 20 20 5 concrete
|
||||
10 15 15 15 20 20 concrete
|
||||
10 15 25 25 20 30 concrete
|
262
tgtk/edwyplanner/rlremoved.cpp
Normal file
@ -0,0 +1,262 @@
|
||||
// these were once in raylib but were removed afterwards :(
|
||||
#include "rlremoved.h"
|
||||
#include <rlgl.h>
|
||||
#include <raylib.h>
|
||||
|
||||
void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color)
|
||||
{
|
||||
float x = position.x;
|
||||
float y = position.y;
|
||||
float z = position.z;
|
||||
|
||||
// Set desired texture to be enabled while drawing following vertex data
|
||||
rlSetTexture(texture.id);
|
||||
|
||||
// Vertex data transformation can be defined with the commented lines,
|
||||
// but in this example we calculate the transformed vertex data directly when calling rlVertex3f()
|
||||
//rlPushMatrix();
|
||||
// NOTE: Transformation is applied in inverse order (scale -> rotate -> translate)
|
||||
//rlTranslatef(2.0f, 0.0f, 0.0f);
|
||||
//rlRotatef(45, 0, 1, 0);
|
||||
//rlScalef(2.0f, 2.0f, 2.0f);
|
||||
|
||||
rlBegin(RL_QUADS);
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
// Front Face
|
||||
rlNormal3f(0.0f, 0.0f, 1.0f); // Normal Pointing Towards Viewer
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z + length / 2); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z + length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z + length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z + length / 2); // Top Left Of The Texture and Quad
|
||||
// Back Face
|
||||
rlNormal3f(0.0f, 0.0f, -1.0f); // Normal Pointing Away From Viewer
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z - length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z - length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z - length / 2); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z - length / 2); // Bottom Left Of The Texture and Quad
|
||||
// Top Face
|
||||
rlNormal3f(0.0f, 1.0f, 0.0f); // Normal Pointing Up
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z - length / 2); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x - width / 2, y + height / 2, z + length / 2); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x + width / 2, y + height / 2, z + length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z - length / 2); // Top Right Of The Texture and Quad
|
||||
// Bottom Face
|
||||
rlNormal3f(0.0f, -1.0f, 0.0f); // Normal Pointing Down
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x - width / 2, y - height / 2, z - length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x + width / 2, y - height / 2, z - length / 2); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z + length / 2); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z + length / 2); // Bottom Right Of The Texture and Quad
|
||||
// Right face
|
||||
rlNormal3f(1.0f, 0.0f, 0.0f); // Normal Pointing Right
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z - length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z - length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z + length / 2); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z + length / 2); // Bottom Left Of The Texture and Quad
|
||||
// Left Face
|
||||
rlNormal3f(-1.0f, 0.0f, 0.0f); // Normal Pointing Left
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z - length / 2); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z + length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z + length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z - length / 2); // Top Left Of The Texture and Quad
|
||||
rlEnd();
|
||||
//rlPopMatrix();
|
||||
|
||||
rlSetTexture(0);
|
||||
}
|
||||
|
||||
// Draw cube with texture piece applied to all faces
|
||||
void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color)
|
||||
{
|
||||
float x = position.x;
|
||||
float y = position.y;
|
||||
float z = position.z;
|
||||
float texWidth = (float)texture.width;
|
||||
float texHeight = (float)texture.height;
|
||||
|
||||
// Set desired texture to be enabled while drawing following vertex data
|
||||
rlSetTexture(texture.id);
|
||||
|
||||
// We calculate the normalized texture coordinates for the desired texture-source-rectangle
|
||||
// It means converting from (tex.width, tex.height) coordinates to [0.0f, 1.0f] equivalent
|
||||
rlBegin(RL_QUADS);
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
|
||||
// Front face
|
||||
rlNormal3f(0.0f, 0.0f, 1.0f);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z + length / 2);
|
||||
|
||||
// Back face
|
||||
rlNormal3f(0.0f, 0.0f, -1.0f);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z - length / 2);
|
||||
|
||||
// Top face
|
||||
rlNormal3f(0.0f, 1.0f, 0.0f);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z - length / 2);
|
||||
|
||||
// Bottom face
|
||||
rlNormal3f(0.0f, -1.0f, 0.0f);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z + length / 2);
|
||||
|
||||
// Right face
|
||||
rlNormal3f(1.0f, 0.0f, 0.0f);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z + length / 2);
|
||||
|
||||
// Left face
|
||||
rlNormal3f(-1.0f, 0.0f, 0.0f);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z - length / 2);
|
||||
|
||||
rlEnd();
|
||||
|
||||
rlSetTexture(0);
|
||||
}
|
||||
|
||||
void DrawTextCodepoint3D(Font font, int codepoint, Vector3 position, float fontSize, bool backface, Color tint)
|
||||
{
|
||||
// Character index position in sprite font
|
||||
// NOTE: In case a codepoint is not available in the font, index returned points to '?'
|
||||
int index = GetGlyphIndex(font, codepoint);
|
||||
float scale = fontSize / (float)font.baseSize;
|
||||
|
||||
// Character destination rectangle on screen
|
||||
// NOTE: We consider charsPadding on drawing
|
||||
position.x += (float)(font.glyphs[index].offsetX - font.glyphPadding) / (float)font.baseSize * scale;
|
||||
position.z += (float)(font.glyphs[index].offsetY - font.glyphPadding) / (float)font.baseSize * scale;
|
||||
|
||||
// Character source rectangle from font texture atlas
|
||||
// NOTE: We consider chars padding when drawing, it could be required for outline/glow shader effects
|
||||
Rectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding,
|
||||
font.recs[index].width + 2.0f * font.glyphPadding, font.recs[index].height + 2.0f * font.glyphPadding };
|
||||
|
||||
float width = (float)(font.recs[index].width + 2.0f * font.glyphPadding) / (float)font.baseSize * scale;
|
||||
float height = (float)(font.recs[index].height + 2.0f * font.glyphPadding) / (float)font.baseSize * scale;
|
||||
|
||||
if (font.texture.id > 0)
|
||||
{
|
||||
const float x = 0.0f;
|
||||
const float y = 0.0f;
|
||||
const float z = 0.0f;
|
||||
|
||||
// normalized texture coordinates of the glyph inside the font texture (0.0f -> 1.0f)
|
||||
const float tx = srcRec.x / font.texture.width;
|
||||
const float ty = srcRec.y / font.texture.height;
|
||||
const float tw = (srcRec.x + srcRec.width) / font.texture.width;
|
||||
const float th = (srcRec.y + srcRec.height) / font.texture.height;
|
||||
|
||||
// if (SHOW_LETTER_BOUNDRY) DrawCubeWiresV((Vector3) { position.x + width / 2, position.y, position.z + height / 2 }, (Vector3) { width, LETTER_BOUNDRY_SIZE, height }, LETTER_BOUNDRY_COLOR);
|
||||
|
||||
rlCheckRenderBatchLimit(4 + 4 * backface);
|
||||
rlSetTexture(font.texture.id);
|
||||
|
||||
rlPushMatrix();
|
||||
rlTranslatef(position.x, position.y, position.z);
|
||||
|
||||
rlBegin(RL_QUADS);
|
||||
rlColor4ub(tint.r, tint.g, tint.b, tint.a);
|
||||
|
||||
// Front Face
|
||||
rlNormal3f(0.0f, 1.0f, 0.0f); // Normal Pointing Up
|
||||
rlTexCoord2f(tx, ty); rlVertex3f(x, y, z); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(tx, th); rlVertex3f(x, y, z + height); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(tw, th); rlVertex3f(x + width, y, z + height); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(tw, ty); rlVertex3f(x + width, y, z); // Top Right Of The Texture and Quad
|
||||
|
||||
if (backface)
|
||||
{
|
||||
// Back Face
|
||||
rlNormal3f(0.0f, -1.0f, 0.0f); // Normal Pointing Down
|
||||
rlTexCoord2f(tx, ty); rlVertex3f(x, y, z); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(tw, ty); rlVertex3f(x + width, y, z); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(tw, th); rlVertex3f(x + width, y, z + height); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(tx, th); rlVertex3f(x, y, z + height); // Bottom Right Of The Texture and Quad
|
||||
}
|
||||
rlEnd();
|
||||
rlPopMatrix();
|
||||
|
||||
rlSetTexture(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw a 2D text in 3D space
|
||||
void DrawText3D(Font font, const char* text, Vector3 position, float fontSize, float fontSpacing, float lineSpacing, bool backface, Color tint)
|
||||
{
|
||||
int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop
|
||||
|
||||
float textOffsetY = 0.0f; // Offset between lines (on line break '\n')
|
||||
float textOffsetX = 0.0f; // Offset X to next character to draw
|
||||
|
||||
float scale = fontSize / (float)font.baseSize;
|
||||
|
||||
for (int i = 0; i < length;)
|
||||
{
|
||||
// Get next codepoint from byte string and glyph index in font
|
||||
int codepointByteCount = 0;
|
||||
int codepoint = GetCodepoint(&text[i], &codepointByteCount);
|
||||
int index = GetGlyphIndex(font, codepoint);
|
||||
|
||||
// NOTE: Normally we exit the decoding sequence as soon as a bad byte is found (and return 0x3f)
|
||||
// but we need to draw all of the bad bytes using the '?' symbol moving one byte
|
||||
if (codepoint == 0x3f) codepointByteCount = 1;
|
||||
|
||||
if (codepoint == '\n')
|
||||
{
|
||||
// NOTE: Fixed line spacing of 1.5 line-height
|
||||
// TODO: Support custom line spacing defined by user
|
||||
textOffsetY += scale + lineSpacing / (float)font.baseSize * scale;
|
||||
textOffsetX = 0.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((codepoint != ' ') && (codepoint != '\t'))
|
||||
{
|
||||
DrawTextCodepoint3D(font, codepoint, { position.x + textOffsetX, position.y, position.z + textOffsetY }, fontSize, backface, tint);
|
||||
}
|
||||
|
||||
if (font.glyphs[index].advanceX == 0) textOffsetX += (float)(font.recs[index].width + fontSpacing) / (float)font.baseSize * scale;
|
||||
else textOffsetX += (float)(font.glyphs[index].advanceX + fontSpacing) / (float)font.baseSize * scale;
|
||||
}
|
||||
|
||||
i += codepointByteCount; // Move text bytes counter to next codepoint
|
||||
}
|
||||
}
|
5
tgtk/edwyplanner/rlremoved.h
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include <raylib.h>
|
||||
|
||||
void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color);
|
||||
void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color);
|
3
tgtk/edwyplanner/textures.txt
Normal file
@ -0,0 +1,3 @@
|
||||
grass ../massshoot/massshoot/textures/grass.png
|
||||
concrete ../massshoot/massshoot/textures/concrete.png
|
||||
tiles ../massshoot/massshoot/textures/tiles.png
|
172
tgtk/massshoot/Camera.cpp
Normal file
@ -0,0 +1,172 @@
|
||||
#include "Camera.h"
|
||||
#include "defines.h"
|
||||
#include <raylib.h>
|
||||
#include <raymath.h>
|
||||
#include "cameraextern.h"
|
||||
#include "Fonts.h"
|
||||
|
||||
#define BHOPFACTOR 0.025f
|
||||
|
||||
bool locked = true;
|
||||
Camera camera = { 0 };
|
||||
|
||||
Vector3 rotation = { 1,0,0 };
|
||||
Vector3 hRotation = { 1,0,0 };
|
||||
Vector3 oldCamPos;
|
||||
Vector3 oldTargPos;
|
||||
|
||||
BoundingBox playerCollider;
|
||||
|
||||
Music wind;
|
||||
Sound stomp;
|
||||
Vector3 gravity = { 0,0,0 };
|
||||
|
||||
Camera MassShoot::Camera::GetCamera()
|
||||
{
|
||||
return camera;
|
||||
}
|
||||
|
||||
BoundingBox MassShoot::Camera::GetCollider() {
|
||||
return playerCollider;
|
||||
}
|
||||
|
||||
LOADING_FUNC MassShoot::Camera::InitCamera()
|
||||
{
|
||||
gravity = { 0,0,0 };
|
||||
camera = { 0 };
|
||||
camera.position = { 0.0f, 5.0f, 0.0f }; // Camera position
|
||||
camera.target = { 4.0f, 1.0f, 4.0f }; // Camera looking at point
|
||||
camera.up = { 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 90.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE;
|
||||
/*if (wind.stream.buffer == NULL) {
|
||||
wind = LoadMusicStream("massshoot/sounds/wind.wav");
|
||||
}
|
||||
if (stomp.stream.buffer == NULL) {
|
||||
stomp = LoadSound("massshoot/sounds/stomp.wav");
|
||||
}
|
||||
StopMusicStream(wind);
|
||||
PlayMusicStream(wind);*/
|
||||
}
|
||||
|
||||
INPUT_FUNC MassShoot::Camera::LockCamera() {
|
||||
locked = true;
|
||||
DisableCursor();
|
||||
}
|
||||
|
||||
INPUT_FUNC MassShoot::Camera::UnlockCamera() {
|
||||
locked = false;
|
||||
EnableCursor();
|
||||
}
|
||||
|
||||
float playerSpeed = 0.25f;
|
||||
|
||||
bool gravityActivated = false;
|
||||
|
||||
bool previouslyGrounded;
|
||||
|
||||
int bhopcooldown = 0;
|
||||
|
||||
RENDERING_FUNC MassShoot::Camera::GravityDisplay() {
|
||||
DrawTextEx(textFont, TextFormat("gravity.x: %f\ngravity.y: %f\ngravity.z: %f", gravity.x, gravity.y, gravity.z), {0,0}, 20, 0, WHITE);
|
||||
}
|
||||
|
||||
INPUT_FUNC MassShoot::Camera::CameraMovement(MassShoot::Maps::Map map, bool enableBhop = false, bool enableAdvancedPhysics = true, bool enableNewGroundCollider = true)
|
||||
{
|
||||
if (camera.position.y < -1000) InitCamera();
|
||||
// UpdateMusicStream(wind);
|
||||
// float windVol = 0.1f;
|
||||
// windVol = 0.1f + abs(gravity.y);
|
||||
// if (windVol > 1.5f) windVol = 1.5f;
|
||||
// SetMusicVolume(wind, windVol*0.5f);
|
||||
if(locked){
|
||||
camera.target = Vector3Add(camera.position, rotation);
|
||||
oldCamPos = camera.position;
|
||||
oldTargPos = camera.target;
|
||||
Vector2 mouseDelta = GetMouseDelta();
|
||||
rotation = Vector3RotateByAxisAngle(rotation, { 0,1,0 }, (-mouseDelta.x) / 100);
|
||||
hRotation = Vector3RotateByAxisAngle(hRotation, { 0,1,0 }, (-mouseDelta.x) / 100);
|
||||
rotation.y -= mouseDelta.y / 100;
|
||||
rotation.y = Clamp(rotation.y, -0.99, 0.99);
|
||||
rotation = Vector3Normalize(rotation);
|
||||
Vector3 newCamPos = camera.position;
|
||||
|
||||
BoundingBox groundCollider;
|
||||
groundCollider.max = Vector3Add(newCamPos, { 1,1,1 });
|
||||
if(enableNewGroundCollider) groundCollider.max = Vector3Add(newCamPos, { 1,-1,1 });
|
||||
groundCollider.min = Vector3Subtract(newCamPos, { 1,3,1 });
|
||||
|
||||
bool grounded = map.IsColliding(groundCollider);
|
||||
|
||||
// if (!previouslyGrounded) PlaySound(stomp);
|
||||
|
||||
// if (IsKeyPressed(KEY_G)) gravityActivated = !gravityActivated;
|
||||
|
||||
if (grounded) {
|
||||
gravity.y = 0;
|
||||
if(enableBhop){
|
||||
bhopcooldown++;
|
||||
if (bhopcooldown > 5) {
|
||||
gravity = Vector3Zero();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
gravity.y+=0.01f;
|
||||
}
|
||||
|
||||
if (IsKeyDown(KEY_W))
|
||||
newCamPos = Vector3Add(newCamPos, Vector3Multiply(hRotation, { playerSpeed, playerSpeed, playerSpeed }));
|
||||
|
||||
if (IsKeyDown(KEY_S))
|
||||
newCamPos = Vector3Subtract(newCamPos, Vector3Multiply(hRotation, { playerSpeed, playerSpeed, playerSpeed }));
|
||||
|
||||
|
||||
Vector3 left;
|
||||
left = Vector3RotateByAxisAngle(hRotation, { 0,1,0 }, 1.5708f);
|
||||
left.y = 0;
|
||||
if (IsKeyDown(KEY_A))
|
||||
newCamPos = Vector3Add(newCamPos, Vector3Multiply(left, { playerSpeed, playerSpeed, playerSpeed }));
|
||||
if (IsKeyDown(KEY_D))
|
||||
newCamPos = Vector3Subtract(newCamPos, Vector3Multiply(left, { playerSpeed, playerSpeed, playerSpeed }));
|
||||
|
||||
if (IsKeyDown(KEY_SPACE) && grounded) {
|
||||
gravity.y -= 0.25;
|
||||
if(enableBhop){
|
||||
Vector3 bhopVec = Vector3Zero();
|
||||
if(IsKeyDown(KEY_W)) bhopVec = Vector3Multiply(Vector3Subtract(camera.position, camera.target), { BHOPFACTOR, 0, BHOPFACTOR });
|
||||
if (IsKeyDown(KEY_S)) bhopVec = Vector3Multiply(Vector3Subtract(camera.position, camera.target), { -BHOPFACTOR, 0, -BHOPFACTOR });
|
||||
gravity = Vector3Add(gravity, bhopVec);
|
||||
bhopcooldown = 0;
|
||||
}
|
||||
}
|
||||
|
||||
newCamPos = Vector3Subtract(newCamPos, gravity);
|
||||
|
||||
playerCollider.max = Vector3Add(newCamPos, { 1,0,1 });
|
||||
playerCollider.min = Vector3Subtract(newCamPos, { 1,2,1 });
|
||||
|
||||
if (!map.IsColliding(playerCollider)) camera.position = newCamPos;
|
||||
else {
|
||||
if(enableAdvancedPhysics) camera.position = map.CollideCollAdvanced(newCamPos, { camera.position.x, camera.position.y - 1, camera.position.z }, 2, 4).newPossiblePos;
|
||||
}
|
||||
camera.target = Vector3Add(camera.position, rotation);
|
||||
previouslyGrounded = grounded;
|
||||
}
|
||||
}
|
||||
|
||||
RENDERING_FUNC MassShoot::Camera::StartCameraFrame()
|
||||
{
|
||||
BeginMode3D(camera);
|
||||
ClearBackground(BLACK);
|
||||
}
|
||||
|
||||
RENDERING_FUNC MassShoot::Camera::StopCameraFrame()
|
||||
{
|
||||
EndMode3D();
|
||||
}
|
||||
|
||||
Vector3 MassShoot::Camera::GetCameraPosition()
|
||||
{
|
||||
return camera.position;
|
||||
}
|
18
tgtk/massshoot/Camera.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include "defines.h"
|
||||
#include "Map.h"
|
||||
#include <raylib.h>
|
||||
namespace MassShoot {
|
||||
namespace Camera {
|
||||
Camera3D GetCamera();
|
||||
BoundingBox GetCollider();
|
||||
LOADING_FUNC InitCamera();
|
||||
INPUT_FUNC LockCamera();
|
||||
INPUT_FUNC UnlockCamera();
|
||||
RENDERING_FUNC GravityDisplay();
|
||||
INPUT_FUNC CameraMovement(MassShoot::Maps::Map map, bool enableBhop, bool enableAdvancedPhysics, bool enableNewGroundCollider);
|
||||
RENDERING_FUNC StartCameraFrame();
|
||||
RENDERING_FUNC StopCameraFrame();
|
||||
Vector3 GetCameraPosition();
|
||||
}
|
||||
}
|
0
tgtk/massshoot/Chai.cpp
Normal file
19
tgtk/massshoot/Chai.h
Normal file
@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include "Weapons.h"
|
||||
#include <vector>
|
||||
#include "defines.h"
|
||||
|
||||
namespace MassShoot {
|
||||
namespace Scripting {
|
||||
SCRIPTING_FUNC InitChai();
|
||||
SCRIPTING_FUNC ChaiEval(std::string code);
|
||||
}
|
||||
namespace Weapons {
|
||||
class WeaponSuite {
|
||||
public:
|
||||
std::vector<MassShoot::Weapons::WeaponUpgrade> upgrades;
|
||||
SCRIPTING_FUNC CheckForUpgradeTriggers();
|
||||
SCRIPTING_FUNC Execute(int upgradeId);
|
||||
};
|
||||
}
|
||||
}
|
49
tgtk/massshoot/ChaiScript.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
#include "Chai.h"
|
||||
#include <chaiscript/chaiscript.hpp>
|
||||
#include "Engine.h"
|
||||
#include "chaiLoadMap.h"
|
||||
|
||||
#include "unraylibedExterns.h"
|
||||
|
||||
|
||||
|
||||
void Chai_SetAmmo(int ammo) {
|
||||
AmmoSetter = ammo;
|
||||
}
|
||||
|
||||
int Chai_GetAmmo() {
|
||||
return AmmoGetter;
|
||||
}
|
||||
|
||||
void Chai_Puts(std::string text) {
|
||||
MassShoot::Engine::Puts(text);
|
||||
}
|
||||
|
||||
void Chai_Log(std::string text) {
|
||||
va_list args = nullptr;
|
||||
MassShoot::Engine::Log(0, text.c_str(), args);
|
||||
}
|
||||
|
||||
|
||||
chaiscript::ChaiScript chai;
|
||||
|
||||
|
||||
SCRIPTING_FUNC MassShoot::Scripting::InitChai()
|
||||
{
|
||||
chai.add(chaiscript::fun(&Chai_SetAmmo), "MassShoot_SetAmmo");
|
||||
chai.add(chaiscript::fun(&Chai_GetAmmo), "MassShoot_GetAmmo");
|
||||
chai.add(chaiscript::fun(&Chai_Log), "MassShoot_Log");
|
||||
chai.add(chaiscript::fun(&Chai_Puts), "puts");
|
||||
chai.add(chaiscript::fun(&Chai_LoadMap), "MassShoot_LoadMap");
|
||||
|
||||
}
|
||||
|
||||
SCRIPTING_FUNC MassShoot::Scripting::ChaiEval(std::string code)
|
||||
{
|
||||
chai.eval(code);
|
||||
}
|
||||
|
||||
SCRIPTING_FUNC MassShoot::Weapons::WeaponSuite::Execute(int upgradeId)
|
||||
{
|
||||
chai.eval(upgrades.at(upgradeId).script);
|
||||
}
|
140
tgtk/massshoot/Engine.cpp
Normal file
@ -0,0 +1,140 @@
|
||||
#include "Engine.h"
|
||||
#include <raylib.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <array>
|
||||
#include "Chai.h"
|
||||
|
||||
std::string Logs;
|
||||
int LogsSize;
|
||||
|
||||
|
||||
std::string exec(const char* cmd) {
|
||||
std::array<char, 128> buffer;
|
||||
std::string result;
|
||||
std::unique_ptr<FILE, decltype(&_pclose)> pipe(_popen(cmd, "r"), _pclose);
|
||||
if (!pipe) {
|
||||
throw std::runtime_error("popen() failed!");
|
||||
}
|
||||
while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
|
||||
result += buffer.data();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
VITAL_FUNC MassShoot::Engine::Puts(std::string text) {
|
||||
Logs += text;
|
||||
|
||||
LogsSize++;
|
||||
for (int i = 0; i < text.size(); i++) {
|
||||
if (text.at(i) == '\n')
|
||||
LogsSize++;
|
||||
}
|
||||
Logs += "\n";
|
||||
}
|
||||
|
||||
VITAL_FUNC MassShoot::Engine::Log(int msgType, const char* text, va_list args)
|
||||
{
|
||||
char timeStr[64] = { 0 };
|
||||
time_t now = time(NULL);
|
||||
struct tm* tm_info = localtime(&now);
|
||||
|
||||
strftime(timeStr, sizeof(timeStr), "%Y-%m-%d %H:%M:%S", tm_info);
|
||||
printf("[%s] ", timeStr);
|
||||
std::string newLogLine;
|
||||
newLogLine += TextFormat("[%s] ", timeStr);
|
||||
switch (msgType)
|
||||
{
|
||||
case LOG_INFO:
|
||||
printf("Info : ");
|
||||
newLogLine += "Info : ";
|
||||
break;
|
||||
case LOG_ERROR:
|
||||
printf("ERROR : ");
|
||||
newLogLine += "ERROR : ";
|
||||
break;
|
||||
case LOG_WARNING:
|
||||
printf("Warn : ");
|
||||
newLogLine += "Warn : ";
|
||||
break;
|
||||
case LOG_DEBUG:
|
||||
printf("DEBUG : ");
|
||||
newLogLine += "DEBUG : ";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
vprintf(text, args);
|
||||
char buffer[256];
|
||||
vsnprintf(buffer, 256, text, args);
|
||||
newLogLine += buffer;
|
||||
// system(TextFormat("echo %s\"%s\" > log.txt", exec("type log.txt").c_str(), newLogLine.c_str()));
|
||||
|
||||
newLogLine += "\n";
|
||||
Logs += newLogLine;
|
||||
for(int i = 0; i < newLogLine.size(); i++){
|
||||
if(newLogLine.at(i) == '\n')
|
||||
LogsSize++;
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
Font consoleFont;
|
||||
|
||||
VITAL_FUNC MassShoot::Engine::InitEngine(int width, int height, int fps, std::string title)
|
||||
{
|
||||
SetTraceLogCallback(Log);
|
||||
SetConfigFlags(FLAG_WINDOW_RESIZABLE);
|
||||
SetConfigFlags(FLAG_MSAA_4X_HINT);
|
||||
InitWindow(width, height, title.c_str());
|
||||
SetTargetFPS(fps);
|
||||
consoleFont = LoadFontEx("massshoot/sys/CozetteVector.otf", 100, 0, 360);
|
||||
InitAudioDevice();
|
||||
}
|
||||
|
||||
bool consoleRender;
|
||||
int consoleYOffset = 0;
|
||||
std::string command;
|
||||
int backspaceFrames = 0;
|
||||
VITAL_FUNC MassShoot::Engine::Console()
|
||||
{
|
||||
if (IsKeyPressed(KEY_BACKSLASH)) consoleRender = !consoleRender;
|
||||
|
||||
if (consoleRender) {
|
||||
DrawRectangle(0, 0, GetScreenWidth(), 500 + consoleYOffset, {100,100,100,100});
|
||||
DrawTextEx(consoleFont, Logs.c_str(), { 3, (float)500 - (30 * LogsSize) + consoleYOffset+3 }, 20, 0, BLACK);
|
||||
DrawTextEx(consoleFont, Logs.c_str(), { 0, (float)500 - (30 * LogsSize) + consoleYOffset }, 20, 0, WHITE);
|
||||
DrawRectangle(0, 500 + consoleYOffset, GetScreenWidth(), 30, BLACK);
|
||||
DrawRectangleLines(0, 500 + consoleYOffset, GetScreenWidth(), 30, WHITE);
|
||||
DrawTextEx(consoleFont, command.c_str(), { 0, (float)500 + consoleYOffset }, 20, 0, WHITE);
|
||||
consoleYOffset += GetMouseWheelMove() * 10;
|
||||
if (IsKeyPressed(KEY_HOME)) consoleYOffset = 0;
|
||||
int key = GetCharPressed();
|
||||
if ((key >= 32) && (key <= 125))
|
||||
{
|
||||
command += (char)key;
|
||||
}
|
||||
|
||||
if (IsKeyDown(KEY_BACKSPACE) && command.size() != 0) {
|
||||
if(backspaceFrames == 0 || backspaceFrames > 30)
|
||||
command.pop_back();
|
||||
backspaceFrames++;
|
||||
}
|
||||
else {
|
||||
backspaceFrames = 0;
|
||||
}
|
||||
if (IsKeyPressed(KEY_ENTER)) {
|
||||
MassShoot::Engine::Puts("> " + command);
|
||||
MassShoot::Scripting::ChaiEval(command);
|
||||
command = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
tgtk/massshoot/Engine.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include "defines.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace MassShoot {
|
||||
namespace Engine {
|
||||
VITAL_FUNC Puts(std::string text);
|
||||
VITAL_FUNC Log(int msgType, const char* text, va_list args);
|
||||
VITAL_FUNC InitEngine(int width, int height, int fps, std::string title);
|
||||
VITAL_FUNC Console();
|
||||
}
|
||||
}
|
4
tgtk/massshoot/ExternMap.h
Normal file
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
#include "Map.h"
|
||||
|
||||
extern MassShoot::Maps::Map map;
|
3
tgtk/massshoot/ExternSuite.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
#include "Chai.h"
|
||||
extern MassShoot::Weapons::WeaponSuite suite;
|
13
tgtk/massshoot/Fonts.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
#include "Fonts.h"
|
||||
#include <raylib.h>
|
||||
|
||||
Font titleFont;
|
||||
Font textFont;
|
||||
Font smallFont;
|
||||
|
||||
LOADING_FUNC MassShoot::Fonts::LoadFonts()
|
||||
{
|
||||
titleFont = LoadFontEx("massshoot/fonts/title.ttf", 300, 0, 360);
|
||||
textFont = LoadFontEx("massshoot/fonts/text.ttf", 300, 0, 360);
|
||||
smallFont = LoadFontEx("massshoot/fonts/small.ttf", 300, 0, 360);
|
||||
}
|
13
tgtk/massshoot/Fonts.h
Normal file
@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include <raylib.h>
|
||||
#include "defines.h"
|
||||
|
||||
extern Font titleFont;
|
||||
extern Font textFont;
|
||||
extern Font smallFont;
|
||||
|
||||
namespace MassShoot {
|
||||
namespace Fonts {
|
||||
LOADING_FUNC LoadFonts();
|
||||
}
|
||||
}
|
458
tgtk/massshoot/Ghost.cpp
Normal file
@ -0,0 +1,458 @@
|
||||
#include "Ghost.h"
|
||||
#include <raylib.h>
|
||||
#include <iostream>
|
||||
#include <rlgl.h>
|
||||
#include <raymath.h>
|
||||
#include "Fonts.h"
|
||||
#include "Particles.h"
|
||||
#include "Shop.h"
|
||||
int money = 0;
|
||||
bool GhostHandlerAvailable = false;
|
||||
MassShoot::Particles::ParticleSystem particleSystem;
|
||||
Model ghostModel;
|
||||
|
||||
#pragma region
|
||||
#define LETTER_BOUNDRY_SIZE 0.25f
|
||||
#define TEXT_MAX_LAYERS 32
|
||||
#define LETTER_BOUNDRY_COLOR VIOLET
|
||||
|
||||
bool SHOW_LETTER_BOUNDRY = false;
|
||||
bool SHOW_TEXT_BOUNDRY = false;
|
||||
|
||||
typedef struct WaveTextConfig {
|
||||
Vector3 waveRange;
|
||||
Vector3 waveSpeed;
|
||||
Vector3 waveOffset;
|
||||
} WaveTextConfig;
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Module Functions Definitions
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Draw codepoint at specified position in 3D space
|
||||
static void DrawTextCodepoint3D(Font font, int codepoint, Vector3 position, float fontSize, bool backface, Color tint)
|
||||
{
|
||||
// Character index position in sprite font
|
||||
// NOTE: In case a codepoint is not available in the font, index returned points to '?'
|
||||
int index = GetGlyphIndex(font, codepoint);
|
||||
float scale = fontSize / (float)font.baseSize;
|
||||
|
||||
// Character destination rectangle on screen
|
||||
// NOTE: We consider charsPadding on drawing
|
||||
position.x += (float)(font.glyphs[index].offsetX - font.glyphPadding) / (float)font.baseSize * scale;
|
||||
position.z += (float)(font.glyphs[index].offsetY - font.glyphPadding) / (float)font.baseSize * scale;
|
||||
|
||||
// Character source rectangle from font texture atlas
|
||||
// NOTE: We consider chars padding when drawing, it could be required for outline/glow shader effects
|
||||
Rectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding,
|
||||
font.recs[index].width + 2.0f * font.glyphPadding, font.recs[index].height + 2.0f * font.glyphPadding };
|
||||
|
||||
float width = (float)(font.recs[index].width + 2.0f * font.glyphPadding) / (float)font.baseSize * scale;
|
||||
float height = (float)(font.recs[index].height + 2.0f * font.glyphPadding) / (float)font.baseSize * scale;
|
||||
|
||||
if (font.texture.id > 0)
|
||||
{
|
||||
const float x = 0.0f;
|
||||
const float y = 0.0f;
|
||||
const float z = 0.0f;
|
||||
|
||||
// normalized texture coordinates of the glyph inside the font texture (0.0f -> 1.0f)
|
||||
const float tx = srcRec.x / font.texture.width;
|
||||
const float ty = srcRec.y / font.texture.height;
|
||||
const float tw = (srcRec.x + srcRec.width) / font.texture.width;
|
||||
const float th = (srcRec.y + srcRec.height) / font.texture.height;
|
||||
|
||||
if (SHOW_LETTER_BOUNDRY) DrawCubeWiresV({ position.x + width / 2, position.y, position.z + height / 2 },{ width, LETTER_BOUNDRY_SIZE, height }, LETTER_BOUNDRY_COLOR);
|
||||
|
||||
rlCheckRenderBatchLimit(4 + 4 * backface);
|
||||
rlSetTexture(font.texture.id);
|
||||
|
||||
rlPushMatrix();
|
||||
rlTranslatef(position.x, position.y, position.z);
|
||||
|
||||
rlBegin(RL_QUADS);
|
||||
rlColor4ub(tint.r, tint.g, tint.b, tint.a);
|
||||
|
||||
// Front Face
|
||||
rlNormal3f(0.0f, 1.0f, 0.0f); // Normal Pointing Up
|
||||
rlTexCoord2f(tx, ty); rlVertex3f(x, y, z); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(tx, th); rlVertex3f(x, y, z + height); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(tw, th); rlVertex3f(x + width, y, z + height); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(tw, ty); rlVertex3f(x + width, y, z); // Top Right Of The Texture and Quad
|
||||
|
||||
if (backface)
|
||||
{
|
||||
// Back Face
|
||||
rlNormal3f(0.0f, -1.0f, 0.0f); // Normal Pointing Down
|
||||
rlTexCoord2f(tx, ty); rlVertex3f(x, y, z); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(tw, ty); rlVertex3f(x + width, y, z); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(tw, th); rlVertex3f(x + width, y, z + height); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(tx, th); rlVertex3f(x, y, z + height); // Bottom Right Of The Texture and Quad
|
||||
}
|
||||
rlEnd();
|
||||
rlPopMatrix();
|
||||
|
||||
rlSetTexture(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw a 2D text in 3D space
|
||||
static void DrawText3D(Font font, const char* text, Vector3 position, float fontSize, float fontSpacing, float lineSpacing, bool backface, Color tint)
|
||||
{
|
||||
int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop
|
||||
|
||||
float textOffsetY = 0.0f; // Offset between lines (on line break '\n')
|
||||
float textOffsetX = 0.0f; // Offset X to next character to draw
|
||||
|
||||
float scale = fontSize / (float)font.baseSize;
|
||||
|
||||
for (int i = 0; i < length;)
|
||||
{
|
||||
// Get next codepoint from byte string and glyph index in font
|
||||
int codepointByteCount = 0;
|
||||
int codepoint = GetCodepoint(&text[i], &codepointByteCount);
|
||||
int index = GetGlyphIndex(font, codepoint);
|
||||
|
||||
// NOTE: Normally we exit the decoding sequence as soon as a bad byte is found (and return 0x3f)
|
||||
// but we need to draw all of the bad bytes using the '?' symbol moving one byte
|
||||
if (codepoint == 0x3f) codepointByteCount = 1;
|
||||
|
||||
if (codepoint == '\n')
|
||||
{
|
||||
// NOTE: Fixed line spacing of 1.5 line-height
|
||||
// TODO: Support custom line spacing defined by user
|
||||
textOffsetY += scale + lineSpacing / (float)font.baseSize * scale;
|
||||
textOffsetX = 0.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((codepoint != ' ') && (codepoint != '\t'))
|
||||
{
|
||||
DrawTextCodepoint3D(font, codepoint, { position.x + textOffsetX, position.y, position.z + textOffsetY }, fontSize, backface, tint);
|
||||
}
|
||||
|
||||
if (font.glyphs[index].advanceX == 0) textOffsetX += (float)(font.recs[index].width + fontSpacing) / (float)font.baseSize * scale;
|
||||
else textOffsetX += (float)(font.glyphs[index].advanceX + fontSpacing) / (float)font.baseSize * scale;
|
||||
}
|
||||
|
||||
i += codepointByteCount; // Move text bytes counter to next codepoint
|
||||
}
|
||||
}
|
||||
|
||||
// Measure a text in 3D. For some reason `MeasureTextEx()` just doesn't seem to work so i had to use this instead.
|
||||
static Vector3 MeasureText3D(Font font, const char* text, float fontSize, float fontSpacing, float lineSpacing)
|
||||
{
|
||||
int len = TextLength(text);
|
||||
int tempLen = 0; // Used to count longer text line num chars
|
||||
int lenCounter = 0;
|
||||
|
||||
float tempTextWidth = 0.0f; // Used to count longer text line width
|
||||
|
||||
float scale = fontSize / (float)font.baseSize;
|
||||
float textHeight = scale;
|
||||
float textWidth = 0.0f;
|
||||
|
||||
int letter = 0; // Current character
|
||||
int index = 0; // Index position in sprite font
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
lenCounter++;
|
||||
|
||||
int next = 0;
|
||||
letter = GetCodepoint(&text[i], &next);
|
||||
index = GetGlyphIndex(font, letter);
|
||||
|
||||
// NOTE: normally we exit the decoding sequence as soon as a bad byte is found (and return 0x3f)
|
||||
// but we need to draw all of the bad bytes using the '?' symbol so to not skip any we set next = 1
|
||||
if (letter == 0x3f) next = 1;
|
||||
i += next - 1;
|
||||
|
||||
if (letter != '\n')
|
||||
{
|
||||
if (font.glyphs[index].advanceX != 0) textWidth += (font.glyphs[index].advanceX + fontSpacing) / (float)font.baseSize * scale;
|
||||
else textWidth += (font.recs[index].width + font.glyphs[index].offsetX) / (float)font.baseSize * scale;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tempTextWidth < textWidth) tempTextWidth = textWidth;
|
||||
lenCounter = 0;
|
||||
textWidth = 0.0f;
|
||||
textHeight += scale + lineSpacing / (float)font.baseSize * scale;
|
||||
}
|
||||
|
||||
if (tempLen < lenCounter) tempLen = lenCounter;
|
||||
}
|
||||
|
||||
if (tempTextWidth < textWidth) tempTextWidth = textWidth;
|
||||
|
||||
Vector3 vec = { 0 };
|
||||
vec.x = tempTextWidth + (float)((tempLen - 1) * fontSpacing / (float)font.baseSize * scale); // Adds chars spacing to measure
|
||||
vec.y = 0.25f;
|
||||
vec.z = textHeight;
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
||||
// Draw a 2D text in 3D space and wave the parts that start with `~~` and end with `~~`.
|
||||
// This is a modified version of the original code by @Nighten found here https://github.com/NightenDushi/Raylib_DrawTextStyle
|
||||
static void DrawTextWave3D(Font font, const char* text, Vector3 position, float fontSize, float fontSpacing, float lineSpacing, bool backface, WaveTextConfig* config, float time, Color tint)
|
||||
{
|
||||
int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop
|
||||
|
||||
float textOffsetY = 0.0f; // Offset between lines (on line break '\n')
|
||||
float textOffsetX = 0.0f; // Offset X to next character to draw
|
||||
|
||||
float scale = fontSize / (float)font.baseSize;
|
||||
|
||||
bool wave = false;
|
||||
|
||||
for (int i = 0, k = 0; i < length; ++k)
|
||||
{
|
||||
// Get next codepoint from byte string and glyph index in font
|
||||
int codepointByteCount = 0;
|
||||
int codepoint = GetCodepoint(&text[i], &codepointByteCount);
|
||||
int index = GetGlyphIndex(font, codepoint);
|
||||
|
||||
// NOTE: Normally we exit the decoding sequence as soon as a bad byte is found (and return 0x3f)
|
||||
// but we need to draw all of the bad bytes using the '?' symbol moving one byte
|
||||
if (codepoint == 0x3f) codepointByteCount = 1;
|
||||
|
||||
if (codepoint == '\n')
|
||||
{
|
||||
// NOTE: Fixed line spacing of 1.5 line-height
|
||||
// TODO: Support custom line spacing defined by user
|
||||
textOffsetY += scale + lineSpacing / (float)font.baseSize * scale;
|
||||
textOffsetX = 0.0f;
|
||||
k = 0;
|
||||
}
|
||||
else if (codepoint == '~')
|
||||
{
|
||||
if (GetCodepoint(&text[i + 1], &codepointByteCount) == '~')
|
||||
{
|
||||
codepointByteCount += 1;
|
||||
wave = !wave;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((codepoint != ' ') && (codepoint != '\t'))
|
||||
{
|
||||
Vector3 pos = position;
|
||||
if (wave) // Apply the wave effect
|
||||
{
|
||||
pos.x += sinf(time * config->waveSpeed.x - k * config->waveOffset.x) * config->waveRange.x;
|
||||
pos.y += sinf(time * config->waveSpeed.y - k * config->waveOffset.y) * config->waveRange.y;
|
||||
pos.z += sinf(time * config->waveSpeed.z - k * config->waveOffset.z) * config->waveRange.z;
|
||||
}
|
||||
|
||||
DrawTextCodepoint3D(font, codepoint, { pos.x + textOffsetX, pos.y, pos.z + textOffsetY }, fontSize, backface, tint);
|
||||
}
|
||||
|
||||
if (font.glyphs[index].advanceX == 0) textOffsetX += (float)(font.recs[index].width + fontSpacing) / (float)font.baseSize * scale;
|
||||
else textOffsetX += (float)(font.glyphs[index].advanceX + fontSpacing) / (float)font.baseSize * scale;
|
||||
}
|
||||
|
||||
i += codepointByteCount; // Move text bytes counter to next codepoint
|
||||
}
|
||||
}
|
||||
|
||||
// Measure a text in 3D ignoring the `~~` chars.
|
||||
static Vector3 MeasureTextWave3D(Font font, const char* text, float fontSize, float fontSpacing, float lineSpacing)
|
||||
{
|
||||
int len = TextLength(text);
|
||||
int tempLen = 0; // Used to count longer text line num chars
|
||||
int lenCounter = 0;
|
||||
|
||||
float tempTextWidth = 0.0f; // Used to count longer text line width
|
||||
|
||||
float scale = fontSize / (float)font.baseSize;
|
||||
float textHeight = scale;
|
||||
float textWidth = 0.0f;
|
||||
|
||||
int letter = 0; // Current character
|
||||
int index = 0; // Index position in sprite font
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
lenCounter++;
|
||||
|
||||
int next = 0;
|
||||
letter = GetCodepoint(&text[i], &next);
|
||||
index = GetGlyphIndex(font, letter);
|
||||
|
||||
// NOTE: normally we exit the decoding sequence as soon as a bad byte is found (and return 0x3f)
|
||||
// but we need to draw all of the bad bytes using the '?' symbol so to not skip any we set next = 1
|
||||
if (letter == 0x3f) next = 1;
|
||||
i += next - 1;
|
||||
|
||||
if (letter != '\n')
|
||||
{
|
||||
if (letter == '~' && GetCodepoint(&text[i + 1], &next) == '~')
|
||||
{
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (font.glyphs[index].advanceX != 0) textWidth += (font.glyphs[index].advanceX + fontSpacing) / (float)font.baseSize * scale;
|
||||
else textWidth += (font.recs[index].width + font.glyphs[index].offsetX) / (float)font.baseSize * scale;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tempTextWidth < textWidth) tempTextWidth = textWidth;
|
||||
lenCounter = 0;
|
||||
textWidth = 0.0f;
|
||||
textHeight += scale + lineSpacing / (float)font.baseSize * scale;
|
||||
}
|
||||
|
||||
if (tempLen < lenCounter) tempLen = lenCounter;
|
||||
}
|
||||
|
||||
if (tempTextWidth < textWidth) tempTextWidth = textWidth;
|
||||
|
||||
Vector3 vec = { 0 };
|
||||
vec.x = tempTextWidth + (float)((tempLen - 1) * fontSpacing / (float)font.baseSize * scale); // Adds chars spacing to measure
|
||||
vec.y = 0.25f;
|
||||
vec.z = textHeight;
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
||||
// Generates a nice color with a random hue
|
||||
static Color GenerateRandomColor(float s, float v)
|
||||
{
|
||||
const float Phi = 0.618033988749895f; // Golden ratio conjugate
|
||||
float h = (float)GetRandomValue(0, 360);
|
||||
h = fmodf((h + h * Phi), 360.0f);
|
||||
return ColorFromHSV(h, s, v);
|
||||
}
|
||||
|
||||
#pragma endregion raylib
|
||||
|
||||
void TVGame::Ghost::CalculateNextPos(Vector3 camera) {
|
||||
if (position.x < camera.x) position.x += speed;
|
||||
if (position.y < camera.y) position.y += speed;
|
||||
if (position.z < camera.z) position.z += speed;
|
||||
if (position.x > camera.x) position.x -= speed;
|
||||
if (position.y > camera.y) position.y -= speed;
|
||||
if (position.z > camera.z) position.z -= speed;
|
||||
}
|
||||
|
||||
void TVGame::Ghost::RenderGhost() {
|
||||
if (!GhostHandlerAvailable) {
|
||||
std::cout << "Error: no ghost handler available for ghost rendering.";
|
||||
return void();
|
||||
}
|
||||
// DrawModel(ghostModel, position, 1, {(unsigned char)health,(unsigned char)health, (unsigned char)health, 255});
|
||||
if(!hurt){
|
||||
DrawModel(ghostModel, position, 1, WHITE);
|
||||
return void();
|
||||
}
|
||||
else DrawModel(ghostModel, position, 1, RED);
|
||||
hurt = false;
|
||||
}
|
||||
|
||||
void TVGame::GhostHandler::GhostHandlerInit() {
|
||||
GhostHandlerAvailable = true;
|
||||
|
||||
ghostModel = LoadModel("massshoot/actors/ghost/ghost.obj");
|
||||
ghostModel.materials[0].maps[0].texture = LoadTexture("massshoot/actors/ghost/ghost.png");
|
||||
|
||||
particleSystem.particleColor = WHITE;
|
||||
particleSystem.maxlife = 800;
|
||||
}
|
||||
|
||||
TVGame::GhostHandler::~GhostHandler() {
|
||||
GhostHandlerAvailable = false;
|
||||
UnloadModel(ghostModel);
|
||||
}
|
||||
|
||||
void TVGame::GhostHandler::SpawnGhosts(int number) {
|
||||
for (int i = 0; i < number; i++) {
|
||||
Ghost ghost;
|
||||
ghost.health = 100;
|
||||
ghost.speed = (float)GetRandomValue(50, 150) / 1000;
|
||||
ghost.position = { (float)GetRandomValue(-100, 100), (float)GetRandomValue(10, 100) , (float)GetRandomValue(-100, 100) };
|
||||
ghosts.push_back(ghost);
|
||||
}
|
||||
}
|
||||
|
||||
void TVGame::GhostHandler::KillAllGhosts() {
|
||||
ghosts.clear();
|
||||
}
|
||||
|
||||
int TVGame::GhostHandler::CheckForGhostCollision(BoundingBox playerCollision) {
|
||||
int collisions = 0;
|
||||
BoundingBox ghostBoundingBox = GetMeshBoundingBox(ghostModel.meshes[0]);
|
||||
if(ghosts.size() <= 1000){
|
||||
for (int i = 0; i < ghosts.size(); i++) {
|
||||
BoundingBox currentBoundingBox;
|
||||
currentBoundingBox.min = Vector3Add(ghostBoundingBox.min, ghosts.at(i).position);
|
||||
currentBoundingBox.max = Vector3Add(ghostBoundingBox.max, ghosts.at(i).position);
|
||||
if (CheckCollisionBoxes(currentBoundingBox, playerCollision)) collisions++;
|
||||
}
|
||||
}
|
||||
if (ghosts.size() > 1000) {
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
BoundingBox currentBoundingBox;
|
||||
currentBoundingBox.min = Vector3Add(ghostBoundingBox.min, ghosts.at(i).position);
|
||||
currentBoundingBox.max = Vector3Add(ghostBoundingBox.max, ghosts.at(i).position);
|
||||
if (CheckCollisionBoxes(currentBoundingBox, playerCollision)) collisions++;
|
||||
}
|
||||
}
|
||||
return collisions;
|
||||
}
|
||||
|
||||
void TVGame::GhostHandler::CheckForHarmedGhosts(Ray ray) {
|
||||
BoundingBox ghostBoundingBox = GetMeshBoundingBox(ghostModel.meshes[0]);
|
||||
if(ghosts.size() <= 1000){
|
||||
for (int i = 0; i < ghosts.size(); i++) {
|
||||
BoundingBox currentBoundingBox;
|
||||
currentBoundingBox.min = Vector3Add(ghostBoundingBox.min, ghosts.at(i).position);
|
||||
currentBoundingBox.max = Vector3Add(ghostBoundingBox.max, ghosts.at(i).position);
|
||||
RayCollision collision = GetRayCollisionBox(ray, currentBoundingBox);
|
||||
if (collision.hit) {
|
||||
ghosts.at(i).health-= (5 + damageboosts);
|
||||
ghosts.at(i).hurt = true;
|
||||
}
|
||||
if (ghosts.at(i).health <= 0) {
|
||||
particleSystem.SpawnParticles(100, 4, ghosts.at(i).position);
|
||||
ghosts.erase(ghosts.begin() + i);
|
||||
i--;
|
||||
money += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ghosts.size() > 1000) {
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
BoundingBox currentBoundingBox;
|
||||
currentBoundingBox.min = Vector3Add(ghostBoundingBox.min, ghosts.at(i).position);
|
||||
currentBoundingBox.max = Vector3Add(ghostBoundingBox.max, ghosts.at(i).position);
|
||||
RayCollision collision = GetRayCollisionBox(ray, currentBoundingBox);
|
||||
if (collision.hit) {
|
||||
ghosts.at(i).health -= (5 + damageboosts);
|
||||
ghosts.at(i).hurt = true;
|
||||
}
|
||||
if (ghosts.at(i).health <= 0) {
|
||||
particleSystem.SpawnParticles(100, 4, ghosts.at(i).position);
|
||||
ghosts.erase(ghosts.begin() + i);
|
||||
i--;
|
||||
money += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TVGame::GhostHandler::GhostsUpdate(Vector3 camera) {
|
||||
for (int i = 0; i < ghosts.size(); i++) {
|
||||
ghosts.at(i).CalculateNextPos(camera);
|
||||
ghosts.at(i).RenderGhost();
|
||||
}
|
||||
particleSystem.CalculateNextPos();
|
||||
particleSystem.RenderParticles();
|
||||
}
|
||||
|
||||
int TVGame::GhostHandler::GetGhostCount()
|
||||
{
|
||||
return ghosts.size();
|
||||
}
|
28
tgtk/massshoot/Ghost.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include <raylib.h>
|
||||
#include <vector>
|
||||
|
||||
namespace TVGame {
|
||||
class Ghost {
|
||||
public:
|
||||
int health;
|
||||
float speed;
|
||||
Vector3 position;
|
||||
bool hurt;
|
||||
void CalculateNextPos(Vector3 camera);
|
||||
void RenderGhost();
|
||||
};
|
||||
class GhostHandler {
|
||||
void GhostHandlerInit();
|
||||
std::vector<Ghost> ghosts;
|
||||
public:
|
||||
GhostHandler() { GhostHandlerInit(); }
|
||||
~GhostHandler();
|
||||
void SpawnGhosts(int number);
|
||||
void KillAllGhosts();
|
||||
int CheckForGhostCollision(BoundingBox playerCollision);
|
||||
void CheckForHarmedGhosts(Ray ray);
|
||||
void GhostsUpdate(Vector3 camera);
|
||||
int GetGhostCount();
|
||||
};
|
||||
}
|
13
tgtk/massshoot/HUD.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
#include "HUD.h"
|
||||
#include "UI.h"
|
||||
#include "defines.h"
|
||||
#include "Fonts.h"
|
||||
#include <raylib.h>
|
||||
|
||||
|
||||
UI_FUNC HeadsUpDisplay::Update()
|
||||
{
|
||||
/*DrawTextEx(textFont, TextFormat("%i/%i", ammo, maxAmmo), {12, (float)GetScreenHeight() - 48}, 40, 0, DARKBLUE);
|
||||
DrawTextEx(textFont, TextFormat("%i/%i", ammo, maxAmmo), { 10, (float)GetScreenHeight() - 50 }, 40, 0, BLUE);
|
||||
DrawText("+", (GetScreenWidth() / 2) - 10, (GetScreenHeight() / 2) - 10, 20, WHITE);*/
|
||||
}
|
9
tgtk/massshoot/HUD.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include "defines.h"
|
||||
#include "UI.h"
|
||||
|
||||
class HeadsUpDisplay : public MassShoot::UI::UIPanel {
|
||||
public:
|
||||
int ammo, maxAmmo;
|
||||
UI_FUNC Update();
|
||||
};
|
469
tgtk/massshoot/Map.cpp
Normal file
@ -0,0 +1,469 @@
|
||||
#include "Map.h"
|
||||
#include <raylib.h>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include "Skybox.h"
|
||||
#include <raymath.h>
|
||||
#include "rlgl.h"
|
||||
#include <map>
|
||||
#include "Fonts.h"
|
||||
#include "Camera.h"
|
||||
#include "Chai.h"
|
||||
#define RLIGHTS_IMPLEMENTATION
|
||||
#include "rlights.h"
|
||||
#include "titles.h"
|
||||
#include "Engine.h"
|
||||
#include <filesystem>
|
||||
#include "cameraextern.h"
|
||||
std::string currMapName;
|
||||
|
||||
void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color); // Draw cube textured
|
||||
void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color); // Draw cube with a region of a texture
|
||||
|
||||
std::map<std::string, Texture2D> mapTextures;
|
||||
std::map<std::string, Texture2D> mapSprites;
|
||||
Shader lightingShader;
|
||||
|
||||
std::string MassShoot::Maps::Map::GetMapName() {
|
||||
return currMapName;
|
||||
}
|
||||
|
||||
std::vector<BoundingBox> upgradeTriggers;
|
||||
std::vector<std::string> upgradeTriggersNames;
|
||||
|
||||
bool loadedSound = false;
|
||||
Sound upgradeSound;
|
||||
|
||||
LOADING_FUNC MassShoot::Maps::Map::LoadMap(std::string mapName)
|
||||
{
|
||||
if (!loadedSound) {
|
||||
upgradeSound = LoadSound("massshoot/sounds/upgrade.mp3");
|
||||
loadedSound = true;
|
||||
}
|
||||
#ifdef LIGHTING_ENABLED
|
||||
lights.clear();
|
||||
if (lightingShader.id != NULL) UnloadShader(lightingShader);
|
||||
lightingShader = LoadShader("massshoot/shaders/lighting.vs",
|
||||
"massshoot/shaders/lighting.fs");
|
||||
// Get some required lightingShader locations
|
||||
lightingShader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(lightingShader, "viewPos");
|
||||
// NOTE: "matModel" location name is automatically assigned on lightingShader loading,
|
||||
// no need to get the location again if using that uniform name
|
||||
//lightingShader.locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocation(lightingShader, "matModel");
|
||||
|
||||
// Ambient light level (some basic lighting)
|
||||
int ambientLoc = GetShaderLocation(lightingShader, "ambient");
|
||||
float basicLight[4] = { 0.1f, 0.1f, 0.1f, 1.0f };
|
||||
SetShaderValue(lightingShader, ambientLoc, basicLight, SHADER_UNIFORM_VEC4);
|
||||
|
||||
|
||||
std::ifstream lightsfile("massshoot/maps/" + mapName + "/lighting.txt");
|
||||
int xlights, ylights, zlights, rlights, glights, blights, alights;
|
||||
while (lightsfile >> xlights >> ylights >> zlights >> rlights >> glights >> blights >> alights)
|
||||
{
|
||||
Light light = CreateLight(LIGHT_POINT, { (float)xlights, (float)ylights, (float)zlights}, Vector3Zero(), {(unsigned char)rlights, (unsigned char)glights, (unsigned char)blights, (unsigned char)alights}, lightingShader);
|
||||
lights.push_back(light);
|
||||
}
|
||||
lightsfile.close();
|
||||
#endif
|
||||
std::ifstream textureData("massshoot/maps/" + mapName + "/textures.txt");
|
||||
|
||||
std::string textureName, texturePath;
|
||||
collisions.clear();
|
||||
triggers.clear();
|
||||
triggerMaps.clear();
|
||||
upgradeTriggers.clear();
|
||||
textures.clear();
|
||||
sprites.clear();
|
||||
billboards.clear();
|
||||
// textures.clear();
|
||||
while (textureData >> textureName >> texturePath) {
|
||||
// MassShoot::Skybox::LoadSkybox(line);
|
||||
if (mapTextures.find(textureName) != mapTextures.end()) {
|
||||
UnloadTexture(mapTextures.at(textureName));
|
||||
mapTextures.erase(textureName);
|
||||
}
|
||||
mapTextures.insert_or_assign(textureName, LoadTexture(texturePath.c_str()));
|
||||
}
|
||||
textureData.close();
|
||||
|
||||
std::ifstream spritesData("massshoot/maps/" + mapName + "/sprites.txt");
|
||||
// textures.clear();
|
||||
while (spritesData >> textureName >> texturePath) {
|
||||
// MassShoot::Skybox::LoadSkybox(line);
|
||||
if (mapSprites.find(textureName) != mapSprites.end()) {
|
||||
UnloadTexture(mapSprites.at(textureName));
|
||||
mapSprites.erase(textureName);
|
||||
}
|
||||
mapSprites.insert_or_assign(textureName, LoadTexture(texturePath.c_str()));
|
||||
}
|
||||
spritesData.close();
|
||||
|
||||
std::ifstream mapfile("massshoot/maps/" + mapName + "/map.txt");
|
||||
float x1, y1, z1, x2, y2, z2;
|
||||
while (mapfile >> x1 >> y1 >> z1 >> x2 >> y2 >> z2 >> textureName)
|
||||
{
|
||||
BoundingBox newBox;
|
||||
newBox.min = { (float)x1, (float)y1, (float)z1 };
|
||||
newBox.max = { (float)x2, (float)y2, (float)z2 };
|
||||
|
||||
collisions.push_back(newBox);
|
||||
textures.push_back(textureName);
|
||||
}
|
||||
mapfile.close();
|
||||
|
||||
std::ifstream upgradefiles("massshoot/maps/" + mapName + "/upgrades.txt");
|
||||
while (upgradefiles >> x1 >> y1 >> z1 >> textureName)
|
||||
{
|
||||
BoundingBox newBox;
|
||||
newBox.min = { (float)x1-1, (float)y1-1, (float)z1-1 };
|
||||
newBox.max = { (float)x1+1, (float)y1+1, (float)z1+1 };
|
||||
|
||||
upgradeTriggers.push_back(newBox);
|
||||
upgradeTriggersNames.push_back(textureName);
|
||||
}
|
||||
upgradefiles.close();
|
||||
|
||||
std::ifstream triggerData("massshoot/maps/" + mapName + "/triggers.txt");
|
||||
// float x1, y1, z1, x2, y2, z2;
|
||||
std::string mapTrigName;
|
||||
while (triggerData >> x1 >> y1 >> z1 >> x2 >> y2 >> z2 >> mapTrigName)
|
||||
{
|
||||
BoundingBox newBox;
|
||||
newBox.min = { (float)x1, (float)y1, (float)z1 };
|
||||
newBox.max = { (float)x2, (float)y2, (float)z2 };
|
||||
|
||||
triggers.push_back(newBox);
|
||||
triggerMaps.push_back(mapTrigName);
|
||||
}
|
||||
triggerData.close();
|
||||
|
||||
std::ifstream skyboxData("massshoot/maps/" + mapName + "/skybox.txt");
|
||||
std::string line;
|
||||
while (std::getline(skyboxData, line)) {
|
||||
MassShoot::Skybox::LoadSkybox(line);
|
||||
}
|
||||
for (int i = 0; i < collisions.size(); i++) {
|
||||
printf("%f, %f, %f | %f, %f, %f\n",
|
||||
collisions.at(i).min.x,
|
||||
collisions.at(i).min.y,
|
||||
collisions.at(i).min.z,
|
||||
collisions.at(i).max.x,
|
||||
collisions.at(i).max.y,
|
||||
collisions.at(i).max.z
|
||||
);
|
||||
}
|
||||
std::string spritename;
|
||||
|
||||
std::ifstream billboardsData("massshoot/maps/" + mapName + "/billboards.txt");
|
||||
// float x1, y1, z1, x2, y2, z2;
|
||||
|
||||
while (billboardsData >> x1 >> y1 >> z1 >> spritename)
|
||||
{
|
||||
Vector3 newvec = { x1, y1, z1 };
|
||||
|
||||
billboards.push_back(newvec);
|
||||
sprites.push_back(spritename);
|
||||
}
|
||||
triggerData.close();
|
||||
skyboxData.close();
|
||||
shaded = std::filesystem::exists("massshoot/maps/" + mapName + "/pleaseshademap");
|
||||
std::ifstream titlefile("massshoot/maps/" + mapName + "/title.txt");
|
||||
std::getline(titlefile, title);
|
||||
std::getline(titlefile, subtitle);
|
||||
titlefile.close();
|
||||
MassShoot::StoryTools::LaunchTitle(title, subtitle);
|
||||
MassShoot::Engine::Log(2, TextFormat("Title: %s\nSubtitle: %s\n\n", title.c_str(), subtitle.c_str()), nullptr);
|
||||
|
||||
}
|
||||
|
||||
LIGHTING_FUNC MassShoot::Maps::Map::UpdateLighting(Vector3 cameraPosition) {
|
||||
#ifdef LIGHTING_ENABLED
|
||||
float cameraPos[3] = { cameraPosition.x, cameraPosition.y, cameraPosition.z };
|
||||
SetShaderValue(lightingShader, lightingShader.locs[SHADER_LOC_VECTOR_VIEW], cameraPos, SHADER_UNIFORM_VEC3);
|
||||
|
||||
// Update light values (actually, only enable/disable them)
|
||||
// for (int i = 0; i < MAX_LIGHTS; i++) UpdateLightValues(shader, lights[i]);
|
||||
for (int i = 0; i < lights.size(); i++) {
|
||||
UpdateLightValues(lightingShader, lights.at(i));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
RENDERING_FUNC MassShoot::Maps::Map::RenderBillboards() {
|
||||
for (int i = 0; i < billboards.size(); i++) {
|
||||
DrawBillboard(camera, mapSprites.at(sprites.at(i)), billboards.at(i), 10.0f, WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RENDERING_FUNC MassShoot::Maps::Map::RenderBoxes()
|
||||
{
|
||||
// BeginShaderMode(lightingShader);
|
||||
for (int i = 0; i < collisions.size(); i++) {
|
||||
// DrawBoundingBox(collisions.at(i), BLACK);
|
||||
Vector3 size = { 0 };
|
||||
|
||||
size.x = fabsf(collisions.at(i).max.x - collisions.at(i).min.x);
|
||||
size.y = fabsf(collisions.at(i).max.y - collisions.at(i).min.y);
|
||||
size.z = fabsf(collisions.at(i).max.z - collisions.at(i).min.z);
|
||||
|
||||
Vector3 center = { collisions.at(i).min.x + size.x / 2.0f, collisions.at(i).min.y + size.y / 2.0f, collisions.at(i).min.z + size.z / 2.0f };
|
||||
// int color = 255 / collisions.size() * i; {255, (unsigned char)color, 0, 255}
|
||||
if(textures.at(i) != "invis")
|
||||
DrawCubeTexture(mapTextures.at(textures.at(i)), center, size.x, size.y, size.z, WHITE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
for (int i = 0; i < upgradeTriggers.size(); i++) {
|
||||
DrawCube(upgradeTriggers.at(i).min, 1, 1, 1, PURPLE);
|
||||
}
|
||||
// EndShaderMode();
|
||||
#ifdef LIGHTING_ENABLED
|
||||
for (int l = 0; l < lights.size(); l++) {
|
||||
DrawSphere(lights.at(l).position, 2, lights.at(l).color);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
PHYSICS_BOOL MassShoot::Maps::Map::IsColliding(BoundingBox box)
|
||||
{
|
||||
for (int i = 0; i < collisions.size(); i++) {
|
||||
if (CheckCollisionBoxes(collisions.at(i), box)) {
|
||||
// printf("%i\n", i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
BoundingBox GenerateBoundingBox(Vector3 center, int margin, int height) {
|
||||
BoundingBox box;
|
||||
box.min.x = center.x - (margin / 2);
|
||||
box.max.x = center.x + (margin / 2);
|
||||
box.min.y = center.y - (height / 2);
|
||||
box.max.y = center.y + (height / 2);
|
||||
box.min.z = center.z - (margin / 2);
|
||||
box.max.z = center.z + (margin / 2);
|
||||
return box;
|
||||
}
|
||||
|
||||
MassShoot::Maps::CollideCollAdvancedResult MassShoot::Maps::Map::CollideCollAdvanced(Vector3 newbox, Vector3 oldbox, int margin, int height)
|
||||
{
|
||||
MassShoot::Maps::CollideCollAdvancedResult result = { oldbox };
|
||||
|
||||
if (!IsColliding(GenerateBoundingBox({ oldbox.x, oldbox.y, newbox.z }, margin, height))) result = { oldbox.x, oldbox.y, newbox.z };
|
||||
if (!IsColliding(GenerateBoundingBox({ oldbox.x, newbox.y, oldbox.z }, margin, height))) result = { oldbox.x, newbox.y, oldbox.z };
|
||||
if (!IsColliding(GenerateBoundingBox({ oldbox.x, newbox.y, newbox.z }, margin, height))) result = { oldbox.x, newbox.y, newbox.z };
|
||||
if (!IsColliding(GenerateBoundingBox({ newbox.x, oldbox.y, oldbox.z }, margin, height))) result = { newbox.x, oldbox.y, oldbox.z };
|
||||
if (!IsColliding(GenerateBoundingBox({ newbox.x, oldbox.y, newbox.z }, margin, height))) result = { newbox.x, oldbox.y, newbox.z };
|
||||
if (!IsColliding(GenerateBoundingBox({ newbox.x, newbox.y, oldbox.z }, margin, height))) result = { newbox.x, newbox.y, oldbox.z };
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
PHYSICS_FUNC MassShoot::Maps::Map::CheckForTriggers(BoundingBox box)
|
||||
{
|
||||
for (int i = 0; i < triggers.size(); i++) {
|
||||
if (CheckCollisionBoxes(triggers.at(i), box)) {
|
||||
DrawTextEx(textFont, TextFormat("PRESS E TO GO TO %s", triggerMaps.at(i).c_str()), {(float)GetScreenWidth()/2-180, (float)GetScreenHeight() / 2 +140}, 40, 0, WHITE);
|
||||
if (IsKeyPressed(KEY_E)) {
|
||||
DrawRectangle(0, 0, 300, 70, { 150,150,150,150 });
|
||||
MassShoot::Camera::InitCamera();
|
||||
std::cout << triggerMaps.at(i);
|
||||
DrawTextEx(smallFont, "LOADING...", { 0,0 }, 60, 0, WHITE);
|
||||
LoadMap(triggerMaps.at(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SCRIPTING_FUNC MassShoot::Weapons::WeaponSuite::CheckForUpgradeTriggers()
|
||||
{
|
||||
for (int i = 0; i < upgradeTriggers.size(); i++) {
|
||||
if (CheckCollisionBoxes(upgradeTriggers.at(i), MassShoot::Camera::GetCollider())) {
|
||||
DrawTextEx(textFont, "PRESS E TO GRAB", { (float)GetScreenWidth() / 2 - 180, (float)GetScreenHeight() / 2 + 140 }, 40, 0, WHITE);
|
||||
if (IsKeyPressed(KEY_E)) {
|
||||
std::string info, script;
|
||||
int key;
|
||||
std::ifstream infoData("massshoot/upgrades/" + upgradeTriggersNames.at(i) + "/info.txt");
|
||||
while (std::getline(infoData, info)) {
|
||||
// truc
|
||||
}
|
||||
infoData.close();
|
||||
std::ifstream scriptData("massshoot/upgrades/" + upgradeTriggersNames.at(i) + "/script.chai");
|
||||
std::string scriptline;
|
||||
while (std::getline(scriptData, scriptline)) {
|
||||
script = script + "\n" + scriptline;
|
||||
}
|
||||
scriptData.close();
|
||||
std::ifstream keyData("massshoot/upgrades/" + upgradeTriggersNames.at(i) + "/key.txt");
|
||||
while (keyData >> key) {
|
||||
printf("New Key: %i\n", key);
|
||||
}
|
||||
keyData.close();
|
||||
MassShoot::Weapons::WeaponUpgrade newUpgrade;
|
||||
newUpgrade.keyID = key;
|
||||
newUpgrade.name = info;
|
||||
newUpgrade.script = script;
|
||||
upgrades.push_back(newUpgrade);
|
||||
PlaySound(upgradeSound);
|
||||
upgradeTriggers.erase(upgradeTriggers.begin()+i);
|
||||
upgradeTriggersNames.erase(upgradeTriggersNames.begin() + i);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color)
|
||||
{
|
||||
float x = position.x;
|
||||
float y = position.y;
|
||||
float z = position.z;
|
||||
|
||||
// Set desired texture to be enabled while drawing following vertex data
|
||||
rlSetTexture(texture.id);
|
||||
|
||||
// Vertex data transformation can be defined with the commented lines,
|
||||
// but in this example we calculate the transformed vertex data directly when calling rlVertex3f()
|
||||
//rlPushMatrix();
|
||||
// NOTE: Transformation is applied in inverse order (scale -> rotate -> translate)
|
||||
//rlTranslatef(2.0f, 0.0f, 0.0f);
|
||||
//rlRotatef(45, 0, 1, 0);
|
||||
//rlScalef(2.0f, 2.0f, 2.0f);
|
||||
|
||||
rlBegin(RL_QUADS);
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
// Front Face
|
||||
rlNormal3f(0.0f, 0.0f, 1.0f); // Normal Pointing Towards Viewer
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z + length / 2); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z + length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z + length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z + length / 2); // Top Left Of The Texture and Quad
|
||||
// Back Face
|
||||
rlNormal3f(0.0f, 0.0f, -1.0f); // Normal Pointing Away From Viewer
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z - length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z - length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z - length / 2); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z - length / 2); // Bottom Left Of The Texture and Quad
|
||||
// Top Face
|
||||
rlNormal3f(0.0f, 1.0f, 0.0f); // Normal Pointing Up
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z - length / 2); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x - width / 2, y + height / 2, z + length / 2); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x + width / 2, y + height / 2, z + length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z - length / 2); // Top Right Of The Texture and Quad
|
||||
// Bottom Face
|
||||
rlNormal3f(0.0f, -1.0f, 0.0f); // Normal Pointing Down
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x - width / 2, y - height / 2, z - length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x + width / 2, y - height / 2, z - length / 2); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z + length / 2); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z + length / 2); // Bottom Right Of The Texture and Quad
|
||||
// Right face
|
||||
rlNormal3f(1.0f, 0.0f, 0.0f); // Normal Pointing Right
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z - length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z - length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x + width / 2, y + height / 2, z + length / 2); // Top Left Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x + width / 2, y - height / 2, z + length / 2); // Bottom Left Of The Texture and Quad
|
||||
// Left Face
|
||||
rlNormal3f(-1.0f, 0.0f, 0.0f); // Normal Pointing Left
|
||||
rlTexCoord2f(0.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z - length / 2); // Bottom Left Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 0.0f); rlVertex3f(x - width / 2, y - height / 2, z + length / 2); // Bottom Right Of The Texture and Quad
|
||||
rlTexCoord2f(1.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z + length / 2); // Top Right Of The Texture and Quad
|
||||
rlTexCoord2f(0.0f, 1.0f); rlVertex3f(x - width / 2, y + height / 2, z - length / 2); // Top Left Of The Texture and Quad
|
||||
rlEnd();
|
||||
//rlPopMatrix();
|
||||
|
||||
rlSetTexture(0);
|
||||
}
|
||||
|
||||
// Draw cube with texture piece applied to all faces
|
||||
void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color)
|
||||
{
|
||||
float x = position.x;
|
||||
float y = position.y;
|
||||
float z = position.z;
|
||||
float texWidth = (float)texture.width;
|
||||
float texHeight = (float)texture.height;
|
||||
|
||||
// Set desired texture to be enabled while drawing following vertex data
|
||||
rlSetTexture(texture.id);
|
||||
|
||||
// We calculate the normalized texture coordinates for the desired texture-source-rectangle
|
||||
// It means converting from (tex.width, tex.height) coordinates to [0.0f, 1.0f] equivalent
|
||||
rlBegin(RL_QUADS);
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
|
||||
// Front face
|
||||
rlNormal3f(0.0f, 0.0f, 1.0f);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z + length / 2);
|
||||
|
||||
// Back face
|
||||
rlNormal3f(0.0f, 0.0f, -1.0f);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z - length / 2);
|
||||
|
||||
// Top face
|
||||
rlNormal3f(0.0f, 1.0f, 0.0f);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z - length / 2);
|
||||
|
||||
// Bottom face
|
||||
rlNormal3f(0.0f, -1.0f, 0.0f);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z + length / 2);
|
||||
|
||||
// Right face
|
||||
rlNormal3f(1.0f, 0.0f, 0.0f);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z - length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x + width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x + width / 2, y - height / 2, z + length / 2);
|
||||
|
||||
// Left face
|
||||
rlNormal3f(-1.0f, 0.0f, 0.0f);
|
||||
rlTexCoord2f(source.x / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z - length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, (source.y + source.height) / texHeight);
|
||||
rlVertex3f(x - width / 2, y - height / 2, z + length / 2);
|
||||
rlTexCoord2f((source.x + source.width) / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z + length / 2);
|
||||
rlTexCoord2f(source.x / texWidth, source.y / texHeight);
|
||||
rlVertex3f(x - width / 2, y + height / 2, z - length / 2);
|
||||
|
||||
rlEnd();
|
||||
|
||||
rlSetTexture(0);
|
||||
}
|
35
tgtk/massshoot/Map.h
Normal file
@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "defines.h"
|
||||
#include <raylib.h>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <rlights.h>
|
||||
|
||||
namespace MassShoot {
|
||||
namespace Maps {
|
||||
class CollideCollAdvancedResult {
|
||||
public:
|
||||
Vector3 newPossiblePos;
|
||||
};
|
||||
class Map {
|
||||
std::vector<BoundingBox> collisions;
|
||||
std::vector<std::string> textures;
|
||||
std::vector<Light> lights;
|
||||
std::vector<std::string> triggerMaps;
|
||||
std::vector<BoundingBox> triggers;
|
||||
std::vector<std::string> sprites;
|
||||
std::vector<Vector3> billboards;
|
||||
public:
|
||||
LOADING_FUNC LoadMap(std::string mapName);
|
||||
LIGHTING_FUNC UpdateLighting(Vector3 cameraPosition);
|
||||
RENDERING_FUNC RenderBillboards();
|
||||
RENDERING_FUNC RenderBoxes();
|
||||
PHYSICS_BOOL IsColliding(BoundingBox box);
|
||||
CollideCollAdvancedResult CollideCollAdvanced(Vector3 newbox, Vector3 oldbox, int margin, int height);
|
||||
PHYSICS_FUNC CheckForTriggers(BoundingBox box);
|
||||
std::string GetMapName();
|
||||
std::string title, subtitle;
|
||||
bool shaded = true;
|
||||
};
|
||||
}
|
||||
}
|
0
tgtk/massshoot/Multiplayer.cpp
Normal file
7
tgtk/massshoot/Multiplayer.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace MassShoot {
|
||||
namespace Multiplayer {
|
||||
|
||||
}
|
||||
}
|
8
tgtk/massshoot/Music.h
Normal file
@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include "defines.h"
|
||||
|
||||
namespace MassShoot {
|
||||
namespace Music {
|
||||
// AUDIO_FUNC PlayMusic()
|
||||
}
|
||||
}
|
42
tgtk/massshoot/Particles.cpp
Normal file
@ -0,0 +1,42 @@
|
||||
#include <raylib.h>
|
||||
#include <iostream>
|
||||
#include "Particles.h"
|
||||
#include <raymath.h>
|
||||
|
||||
void MassShoot::Particles::ParticleSystem::CalculateNextPos(){
|
||||
for (int i = 0; i < particles.size(); i++) {
|
||||
particles.at(i).position = Vector3Add(particles.at(i).position, particles.at(i).velocity);
|
||||
particles.at(i).life++;
|
||||
if (particles.at(i).life > maxlife) {
|
||||
particles.erase(particles.begin() + i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MassShoot::Particles::ParticleSystem::SpawnParticles(int number, int size, Vector3 position)
|
||||
{
|
||||
for (int i = 0; i < number; i++) {
|
||||
SetRandomSeed(GetTime() + i);
|
||||
MassShoot::Particles::Particle newParticle;
|
||||
newParticle.velocity.x = (float)GetRandomValue(-100, 100) / 10;
|
||||
newParticle.velocity.y = (float)GetRandomValue(-100, 100) / 10;
|
||||
newParticle.velocity.z = (float)GetRandomValue(-100, 100) / 10;
|
||||
newParticle.position = position;
|
||||
newParticle.size = size;
|
||||
newParticle.life = 0;
|
||||
particles.push_back(newParticle);
|
||||
if (particles.size() > 5000) {
|
||||
particles.erase(particles.begin());
|
||||
printf("PARTICLE SYSTEM WARNING: OVERFLOW\n");
|
||||
}
|
||||
printf("New Particle: %f %f %f %f %f %f %i %i\n", newParticle.position.x, newParticle.position.y, newParticle.position.z, newParticle.velocity.x, newParticle.velocity.y, newParticle.velocity.z, newParticle.size, newParticle.life);
|
||||
}
|
||||
}
|
||||
|
||||
void MassShoot::Particles::ParticleSystem::RenderParticles()
|
||||
{
|
||||
for (int i = 0; i < particles.size(); i++) {
|
||||
DrawModel(ghostModel, particles.at(i).position, 0.4f, WHITE);
|
||||
}
|
||||
}
|
24
tgtk/massshoot/Particles.h
Normal file
@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include <raylib.h>
|
||||
#include <vector>
|
||||
extern Model ghostModel;
|
||||
namespace MassShoot {
|
||||
namespace Particles {
|
||||
class Particle {
|
||||
public:
|
||||
Vector3 position;
|
||||
Vector3 velocity;
|
||||
int life;
|
||||
int size;
|
||||
};
|
||||
class ParticleSystem {
|
||||
public:
|
||||
std::vector<Particle> particles;
|
||||
Color particleColor;
|
||||
int maxlife;
|
||||
void CalculateNextPos();
|
||||
void SpawnParticles(int number, int size, Vector3 position);
|
||||
void RenderParticles();
|
||||
};
|
||||
}
|
||||
}
|
26
tgtk/massshoot/PauseMenu.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "PauseMenu.h"
|
||||
#include <raylib.h>
|
||||
#include "defines.h"
|
||||
#include "Map.h"
|
||||
#include "Fonts.h"
|
||||
#include "ExternSuite.h"
|
||||
|
||||
UI_FUNC PauseMenuTitle::Update()
|
||||
{
|
||||
DrawTextEx(titleFont, GAMENAME, { 12, 12 }, 50, 0, WHITE);
|
||||
}
|
||||
MassShoot::Maps::Map newMap;
|
||||
UI_FUNC PauseMenuMapName::Update()
|
||||
{
|
||||
DrawTextEx(smallFont, "massshoot/tgtk - massshoot > cocaineondrugs > headdisease", {10, (float)GetScreenHeight() - 32}, 30, 0, WHITE);
|
||||
}
|
||||
|
||||
UI_FUNC PauseMenu::Update()
|
||||
{
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), { 50, 50, 50, 150 });
|
||||
for (int i = 0; i < suite.upgrades.size(); i++) {
|
||||
DrawTextEx(textFont, suite.upgrades.at(i).name.c_str(), { 10, (float)i * 20 + 70 }, 20, 0, WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
|
20
tgtk/massshoot/PauseMenu.h
Normal file
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include "UI.h"
|
||||
#include "defines.h"
|
||||
#include <iostream>
|
||||
|
||||
class PauseMenuTitle : public MassShoot::UI::UIElement {
|
||||
public:
|
||||
UI_FUNC Update();
|
||||
};
|
||||
|
||||
class PauseMenuMapName : public MassShoot::UI::UIElement {
|
||||
public:
|
||||
std::string mapName;
|
||||
UI_FUNC Update();
|
||||
};
|
||||
|
||||
class PauseMenu : public MassShoot::UI::UIPanel {
|
||||
public:
|
||||
UI_FUNC Update();
|
||||
};
|
12
tgtk/massshoot/Player.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
|
||||
namespace MassShoot{
|
||||
class Player {
|
||||
public:
|
||||
int x, y, z;
|
||||
int a;
|
||||
int l;
|
||||
char* name;
|
||||
};
|
||||
}
|
28
tgtk/massshoot/Shop.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include "Shop.h"
|
||||
#include <raylib.h>
|
||||
#include "Fonts.h"
|
||||
#include <raymath.h>
|
||||
int damageboosts;
|
||||
|
||||
UI_FUNC Shop::FrameFunc()
|
||||
{
|
||||
DrawRectangle(50, 50, GetScreenWidth() - 100, GetScreenHeight() - 100, RAYWHITE);
|
||||
DrawTextEx(titleFont, "BIGASSFOREST SHOP", { 50, 50 }, 40, 0, BLACK);
|
||||
DrawRectangle(52, 102, GetScreenWidth() - 104, GetScreenHeight() - 154, GRAY);
|
||||
DrawTextEx(textFont, "Health up (10$)", { 54, 104 }, 30, 0, BLACK);
|
||||
DrawTextEx(textFont, "Damage up (20$)", { 54, 134 }, 30, 0, BLACK);
|
||||
DrawTextEx(textFont, TextFormat("Money: %i", money), { 54, 194 }, 30, 0, BLACK);
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) {
|
||||
Vector2 mousePos = GetMousePosition();
|
||||
if (mousePos.x > 54 && mousePos.y > 104 && mousePos.x < GetScreenWidth() - 54 && mousePos.y < 164) {
|
||||
if (mousePos.y < 134 && money >= 10) {
|
||||
playerHealth += 5;
|
||||
money -= 10;
|
||||
}
|
||||
else if (money >= 20) {
|
||||
damageboosts += 1;
|
||||
money -= 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
12
tgtk/massshoot/Shop.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include "UI.h"
|
||||
#include "defines.h"
|
||||
|
||||
extern int money;
|
||||
extern int playerHealth;
|
||||
extern int damageboosts;
|
||||
|
||||
class Shop {
|
||||
public:
|
||||
UI_FUNC FrameFunc();
|
||||
};
|
60
tgtk/massshoot/Skybox.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
#include <raylib.h>
|
||||
#include <rlgl.h>
|
||||
#include <raymath.h>
|
||||
#include "defines.h"
|
||||
#include <iostream>
|
||||
#include "Skybox.h"
|
||||
|
||||
Model skybox;
|
||||
bool skyboxGenerated = false;
|
||||
|
||||
LOADING_FUNC MassShoot::Skybox::LoadSkybox(std::string filePath) {
|
||||
if(skyboxGenerated) UnloadTexture(skybox.materials->maps->texture);
|
||||
// vestigial
|
||||
bool useHDR = false;
|
||||
|
||||
// workarounds from converting c to c++
|
||||
int zeroarray[1] = { 0 };
|
||||
int onearray[1] = { 1 };
|
||||
int matMapCube[1] = { MATERIAL_MAP_CUBEMAP };
|
||||
|
||||
/*
|
||||
|
||||
Quick timeout here: Why doesn't C++ allow me to write (int[1]){value} like
|
||||
C does? Sure it's lame and stupid but C++ is C, plus
|
||||
plus. To be fair C++ has so many other stupid features
|
||||
I'm convinced they removed this feature to make the
|
||||
compiler less obese on slower hard drives.
|
||||
|
||||
*/
|
||||
|
||||
Mesh cube = GenMeshCube(1.0f, 1.0f, 1.0f);
|
||||
skybox = LoadModelFromMesh(cube);
|
||||
skybox.materials[0].shader = LoadShader("massshoot/shaders/skybox.vs", "massshoot/shaders/skybox.fs");
|
||||
|
||||
SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "environmentMap"), matMapCube, SHADER_UNIFORM_INT);
|
||||
|
||||
// Load cubemap shader and setup required shader locations
|
||||
Shader shdrCubemap = LoadShader("massshoot/shaders/cubemap.vs", "massshoot/shaders/cubemap.fs");
|
||||
|
||||
SetShaderValue(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), zeroarray, SHADER_UNIFORM_INT);
|
||||
|
||||
// Half Vestigial TBH Kinda I Don't Fucking Know Anymore™
|
||||
SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "doGamma"), zeroarray, SHADER_UNIFORM_INT);
|
||||
SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "vflipped"), zeroarray, SHADER_UNIFORM_INT);
|
||||
|
||||
// Load the fucking texture you illiterate criss.
|
||||
Image img = LoadImage(filePath.c_str());
|
||||
skybox.materials[0].maps[MATERIAL_MAP_CUBEMAP].texture = LoadTextureCubemap(img, CUBEMAP_LAYOUT_AUTO_DETECT); // CUBEMAP_LAYOUT_PANORAMA
|
||||
UnloadImage(img);
|
||||
skyboxGenerated = true;
|
||||
}
|
||||
|
||||
RENDERING_FUNC MassShoot::Skybox::DrawSkybox() {
|
||||
// We are inside the cube, we need to disable backface culling!
|
||||
rlDisableBackfaceCulling();
|
||||
rlDisableDepthMask();
|
||||
DrawModel(skybox, { 0, 0, 0 }, 1.0f, WHITE);
|
||||
rlEnableBackfaceCulling();
|
||||
rlEnableDepthMask();
|
||||
}
|
10
tgtk/massshoot/Skybox.h
Normal file
@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
#include "defines.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace MassShoot {
|
||||
namespace Skybox{
|
||||
LOADING_FUNC LoadSkybox(std::string filePath);
|
||||
RENDERING_FUNC DrawSkybox();
|
||||
}
|
||||
}
|
9
tgtk/massshoot/UI.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "UI.h"
|
||||
|
||||
UI_FUNC MassShoot::UI::UIPanel::FrameFunc()
|
||||
{
|
||||
Update();
|
||||
for (int i = 0; i < elements.size(); i++) {
|
||||
elements.at(i)->Update();
|
||||
}
|
||||
}
|
18
tgtk/massshoot/UI.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "defines.h"
|
||||
|
||||
namespace MassShoot {
|
||||
namespace UI {
|
||||
class UIElement {
|
||||
public:
|
||||
virtual UI_FUNC Update() = 0;
|
||||
};
|
||||
class UIPanel {
|
||||
public:
|
||||
std::vector<UIElement*> elements;
|
||||
virtual UI_FUNC Update() = 0;
|
||||
UI_FUNC FrameFunc();
|
||||
};
|
||||
}
|
||||
}
|
6
tgtk/massshoot/WeaponUpgradeUI.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "WeaponUpgradeUI.h"
|
||||
|
||||
UI_FUNC WeaponUpgradeMenu::Update()
|
||||
{
|
||||
return UI_FUNC();
|
||||
}
|
8
tgtk/massshoot/WeaponUpgradeUI.h
Normal file
@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include "UI.h"
|
||||
|
||||
class WeaponUpgradeMenu : public MassShoot::UI::UIPanel {
|
||||
public:
|
||||
UI_FUNC Update();
|
||||
};
|
43
tgtk/massshoot/Weapons.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
#include "Weapons.h"
|
||||
#include <raylib.h>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <stdio.h>
|
||||
#include "rlgl.h"
|
||||
std::vector<Model> weaponModels;
|
||||
std::vector<const char*> weaponPaths;
|
||||
Camera weaponCamera;
|
||||
LOADING_FUNC MassShoot::Weapons::InitWeaponCamera() {
|
||||
weaponCamera = { 0 };
|
||||
weaponCamera.position = { 0.0f, 1.0f, -1.0f }; // Camera position
|
||||
weaponCamera.target = { 0,1,0 }; // Camera looking at point
|
||||
weaponCamera.up = { 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
weaponCamera.fovy = 90.0f; // Camera field-of-view Y
|
||||
weaponCamera.projection = CAMERA_PERSPECTIVE;
|
||||
}
|
||||
|
||||
LOADING_FUNC MassShoot::Weapons::InitModel(Weapon* weapon)
|
||||
{
|
||||
Model newModel = LoadModel(weapon->modelPath.c_str());
|
||||
newModel.materials[0].maps->texture = LoadTexture(weapon->texturePath);
|
||||
weaponModels.push_back(newModel);
|
||||
weaponPaths.push_back(weapon->modelPath.c_str());
|
||||
// weaponModels.at(weaponModels.size() - 1)
|
||||
}
|
||||
|
||||
RENDERING_FUNC MassShoot::Weapons::DrawWeapon(Weapon* weapon, int offset)
|
||||
{
|
||||
bool found = false;
|
||||
for (int i = 0; i < weaponPaths.size(); i++) {
|
||||
if (strcmp(weaponPaths.at(i), weapon->modelPath.c_str()) == 0) {
|
||||
BeginMode3D(weaponCamera);
|
||||
DrawModel(weaponModels.at(i), { -0.4f,0.9f, -0.5f - (float)(0.01 * offset)}, 0.05f, WHITE);
|
||||
EndMode3D();
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
printf("Couldn't find weapon. Did you initialize it?\n");
|
||||
}
|
||||
}
|
26
tgtk/massshoot/Weapons.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "defines.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace MassShoot {
|
||||
namespace Weapons {
|
||||
class WeaponUpgrade {
|
||||
public:
|
||||
std::string name;
|
||||
std::string script;
|
||||
int keyID;
|
||||
};
|
||||
class Weapon {
|
||||
public:
|
||||
std::string modelPath;
|
||||
const char* texturePath;
|
||||
int ammo;
|
||||
int maxAmmo;
|
||||
virtual INPUT_FUNC Shoot() = 0;
|
||||
};
|
||||
LOADING_FUNC InitModel(Weapon* weapon);
|
||||
LOADING_FUNC InitWeaponCamera();
|
||||
RENDERING_FUNC DrawWeapon(Weapon* weapon, int offset = 0);
|
||||
}
|
||||
}
|
3
tgtk/massshoot/cameraextern.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
#include <raylib.h>
|
||||
extern Camera camera;
|
11
tgtk/massshoot/chaiLoadMap.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "chaiLoadMap.h"
|
||||
#include "ExternMap.h"
|
||||
#include "Camera.h"
|
||||
#include "unraylibedExterns.h"
|
||||
void Chai_LoadMap(std::string mapname)
|
||||
{
|
||||
menuEnum = 2;
|
||||
map.LoadMap(mapname);
|
||||
MassShoot::Camera::InitCamera();
|
||||
MassShoot::Camera::LockCamera();
|
||||
}
|
4
tgtk/massshoot/chaiLoadMap.h
Normal file
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
|
||||
void Chai_LoadMap(std::string mapname);
|
0
tgtk/massshoot/dark.cpp
Normal file
1
tgtk/massshoot/dark.h
Normal file
@ -0,0 +1 @@
|
||||
#pragma once
|
20
tgtk/massshoot/defines.h
Normal file
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
// Macros for clarity
|
||||
|
||||
#define AUDIO_FUNC void // Functions related to audio
|
||||
#define LOADING_FUNC void // Functions that load or otherwise initialize elements
|
||||
#define RENDERING_FUNC void // Functions related to rendering
|
||||
#define INPUT_FUNC void // Functions that read inputs from the user
|
||||
#define VITAL_FUNC void // If all goes well, you don't have to worry about them.
|
||||
#define UI_FUNC void // Functions related to interfaces
|
||||
#define PHYSICS_BOOL bool // Boolean functions related to physics
|
||||
#define PHYSICS_FUNC void // Functions related to physics
|
||||
#define LIGHTING_FUNC void // Functions related to lighting
|
||||
#define SCRIPTING_BOOL bool // Boolean functions related to scripting
|
||||
#define SCRIPTING_FUNC void // Functions related to scripting
|
||||
|
||||
extern int AmmoSetter;
|
||||
extern int AmmoGetter;
|
||||
|
||||
#define GAMENAME "Dead Weather"
|
BIN
tgtk/massshoot/freeglut.dll
Normal file
1
tgtk/massshoot/highscore.tgtk
Normal file
@ -0,0 +1 @@
|
||||
121
|
1
tgtk/massshoot/log.txt
Normal file
@ -0,0 +1 @@
|
||||
"[2023-11-17 18:27:21] Info : Window closed successfully"
|
477
tgtk/massshoot/main.cpp
Normal file
@ -0,0 +1,477 @@
|
||||
#include <iostream>
|
||||
#include <raylib.h>
|
||||
#include "defines.h"
|
||||
#include "Skybox.h"
|
||||
#include "Camera.h"
|
||||
#include "Engine.h"
|
||||
#include "UI.h"
|
||||
#include "PauseMenu.h"
|
||||
#include "Weapons.h"
|
||||
#include "Fonts.h"
|
||||
#include "HUD.h"
|
||||
#include "Map.h"
|
||||
#include "Chai.h"
|
||||
#include "ExternSuite.h"
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include "titles.h"
|
||||
#include "ExternMap.h"
|
||||
#include <filesystem>
|
||||
#include "Shop.h"
|
||||
#include "Ghost.h"
|
||||
|
||||
|
||||
int menuEnum = 0; // 0 = warning; 1 = mainmenu; 2 = game;
|
||||
MassShoot::Maps::Map map;
|
||||
MassShoot::Weapons::WeaponSuite suite;
|
||||
|
||||
Sound gunshot;
|
||||
float vacuumLoudness = 0.0f;
|
||||
|
||||
int AmmoSetter = -1;
|
||||
|
||||
int AmmoGetter = 0;
|
||||
|
||||
int countdown = 0;
|
||||
class MKInfinite : public MassShoot::Weapons::Weapon{
|
||||
|
||||
public:
|
||||
INPUT_FUNC Shoot() {
|
||||
if(ammo > 0 && countdown == 0){
|
||||
ammo--;
|
||||
countdown = 5;
|
||||
PlaySound(gunshot);
|
||||
}
|
||||
// SetWindowTitle(TextFormat("BULLETS: %i/%i", ammo, maxAmmo));
|
||||
}
|
||||
};
|
||||
|
||||
int monitor = 0;
|
||||
|
||||
bool unlockResolution = false;
|
||||
bool windowed = true;
|
||||
bool isNight = false;
|
||||
int nights = 0;
|
||||
int playerHealth = 100;
|
||||
bool debugMenu = false;
|
||||
|
||||
|
||||
|
||||
int WinMain(int argc, char** argv) {
|
||||
monitor = GetCurrentMonitor();
|
||||
|
||||
MassShoot::Scripting::InitChai();
|
||||
|
||||
|
||||
bool isShopOpen = false;
|
||||
if (!std::filesystem::exists("highscore.tgtk")) {
|
||||
std::ofstream hsfile("highscore.tgtk");
|
||||
hsfile << "0";
|
||||
hsfile.close();
|
||||
}
|
||||
int highscore;
|
||||
{
|
||||
std::ifstream hsfile("highscore.tgtk");
|
||||
hsfile >> highscore;
|
||||
hsfile.close();
|
||||
}
|
||||
// suite.upgrades.push_back({ "Reload", "MassShoot_SetAmmo(100);", KEY_Q });
|
||||
|
||||
MassShoot::Engine::InitEngine(640, 480, 60, GAMENAME);
|
||||
|
||||
TVGame::GhostHandler ghostHandler;
|
||||
// ghostHandler.SpawnGhosts(100);
|
||||
|
||||
// MassShoot::Skybox::LoadSkybox("massshoot/textures/skybox.png");
|
||||
MassShoot::Camera::InitCamera();
|
||||
// MassShoot::Camera::LockCamera();
|
||||
Shop shopDisplay;
|
||||
MassShoot::Fonts::LoadFonts();
|
||||
Texture2D startup = LoadTexture("massshoot/menus/startup.png");
|
||||
Texture2D logo = LoadTexture("massshoot/menus/logo.png");
|
||||
Texture2D windowedIcon = LoadTexture("massshoot/menus/windowed.png");
|
||||
Texture2D unwindowedIcon = LoadTexture("massshoot/menus/unwindowed.png");
|
||||
Texture2D townLocator = LoadTexture("massshoot/menus/townlocator.png");
|
||||
gunshot = LoadSound("massshoot/sounds/smg.wav");
|
||||
|
||||
PauseMenu pauseMenu;
|
||||
PauseMenuTitle pauseMenuTitle;
|
||||
PauseMenuMapName pauseMenuMapName;
|
||||
pauseMenu.elements.push_back(&pauseMenuTitle);
|
||||
pauseMenu.elements.push_back(&pauseMenuMapName);
|
||||
|
||||
HeadsUpDisplay headsUpDisplay;
|
||||
|
||||
bool isPaused = false;
|
||||
|
||||
// Music music = LoadMusicStream("massshoot/music/Motherlode.mp3");
|
||||
Music splashMusic = LoadMusicStream("massshoot/music/splash.mp3");
|
||||
Music mainMenuMusic = LoadMusicStream("massshoot/music/mainmenu.mp3");
|
||||
Sound startGame = LoadSound("massshoot/music/startgame.mp3");
|
||||
MassShoot::Weapons::InitWeaponCamera();
|
||||
|
||||
Music footsteps = LoadMusicStream("massshoot/sounds/ilikefeet.mp3");
|
||||
Music vacuum = LoadMusicStream("massshoot/sounds/vacuum.wav");
|
||||
footsteps.looping = true;
|
||||
vacuum.looping = true;
|
||||
PlayMusicStream(splashMusic);
|
||||
|
||||
|
||||
// PlayMusicStream(music);
|
||||
|
||||
std::ifstream firstMapData("massshoot/firstmap.txt");
|
||||
std::string firstmap;
|
||||
while (std::getline(firstMapData, firstmap)) {
|
||||
// do nothing
|
||||
}
|
||||
firstMapData.close();
|
||||
|
||||
RenderTexture2D rttarget = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
|
||||
|
||||
Shader bloom = LoadShader(0, "massshoot/shaders/bloom.fs");
|
||||
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
|
||||
SetExitKey(0);
|
||||
// map.UpdateLighting(MassShoot::Camera::GetCameraPosition());
|
||||
|
||||
if (IsKeyDown(KEY_LEFT_ALT)) {
|
||||
if (IsKeyPressed(KEY_ENTER)) {
|
||||
windowed = !windowed;
|
||||
}
|
||||
}
|
||||
|
||||
if (!unlockResolution && windowed) {
|
||||
if (GetScreenWidth() != 640 || GetScreenHeight() != 480) SetWindowSize(640, 480);
|
||||
}
|
||||
if (!windowed) {
|
||||
if (GetScreenWidth() != GetMonitorWidth(GetCurrentMonitor()) || GetScreenHeight() != GetMonitorHeight(GetCurrentMonitor())) {
|
||||
SetWindowSize(GetMonitorWidth(GetCurrentMonitor()), GetMonitorHeight(GetCurrentMonitor()));
|
||||
SetWindowPosition(GetMonitorPosition(GetCurrentMonitor()).x, GetMonitorPosition(GetCurrentMonitor()).y);
|
||||
}
|
||||
}
|
||||
|
||||
switch(menuEnum){
|
||||
case 0:
|
||||
UpdateMusicStream(splashMusic);
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(BLACK);
|
||||
// DrawTextEx(titleFont, GAMENAME, {(float)GetScreenWidth()/2-175, (float)GetScreenHeight()/2-200}, 40, 0, WHITE);
|
||||
// DrawTextEx(textFont, "This game is currently in development. Gameplay elements are subject\nto change.\n\nPress Enter to continue.", { (float)GetScreenWidth() / 2 - 300, (float)GetScreenHeight() / 2 - 100 }, 20, 0, WHITE);
|
||||
DrawTexture(startup, 0, 0, WHITE);
|
||||
if(IsKeyPressed(KEY_ENTER)){
|
||||
map.LoadMap("background");
|
||||
menuEnum = 1;
|
||||
StopMusicStream(splashMusic);
|
||||
PlayMusicStream(mainMenuMusic);
|
||||
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
// BeginTextureMode(rttarget);
|
||||
BeginDrawing();
|
||||
MassShoot::Camera::StartCameraFrame();
|
||||
// MassShoot::Skybox::DrawSkybox();
|
||||
// ClearBackground({ 102, 146, 212, 255 });
|
||||
ClearBackground(DARKBLUE);
|
||||
// DrawSphere({ 500, -1000, 500 }, 1000, DARKGREEN);
|
||||
// map.RenderBoxes();
|
||||
MassShoot::Camera::StopCameraFrame();
|
||||
// EndTextureMode();
|
||||
DrawCircle(GetScreenWidth() / 2, GetScreenHeight(), GetScreenHeight() / 1.5, DARKGREEN);
|
||||
DrawTextureEx(townLocator, { (float)GetScreenWidth() / 5, (float)GetScreenHeight() / 2 }, 0, 0.5f, WHITE);
|
||||
DrawTextEx(textFont, "Play Game", { (float)GetScreenWidth() / 5 + 100, (float)GetScreenHeight() / 2 }, 20, 0, WHITE);
|
||||
DrawTextureEx(townLocator, { (float)GetScreenWidth() - ((float)GetScreenWidth() / 5) *2, (float)GetScreenHeight() / 2 }, 0, 0.5f, WHITE);
|
||||
DrawTextEx(textFont, "Quit Game", { (float)GetScreenWidth() - ((float)GetScreenWidth() / 5) * 2 + 100, (float)GetScreenHeight() / 2 - 10}, 20, 0, WHITE);
|
||||
|
||||
if (windowed) {
|
||||
DrawRectangle(0, 400, 640, 80, WHITE);
|
||||
DrawTextureEx(logo, {460, 400}, 0, 0.7, WHITE);
|
||||
DrawRectangle(0, 400, 460, 80, BLUE);
|
||||
DrawTextEx(textFont, TextFormat("High score: %i nights", highscore), { 12, 432 }, 20, 0, DARKBLUE);
|
||||
DrawTextEx(textFont, TextFormat("High score: %i nights", highscore), { 10, 430 }, 20, 0, WHITE);
|
||||
}
|
||||
else {
|
||||
DrawRectangle(0, GetScreenHeight() - 80, GetScreenWidth(), 80, WHITE);
|
||||
DrawTextureEx(logo, { (float)GetScreenWidth()-180, (float)GetScreenHeight()-80}, 0, 0.7, WHITE);
|
||||
DrawRectangle(0, 0, 180, GetScreenHeight(), BLUE);
|
||||
DrawRectangle(0, GetScreenHeight()-80, GetScreenWidth()-180, 80, BLUE);
|
||||
DrawTextEx(textFont, TextFormat("High score: %i nights", highscore), { 12, (float)GetScreenHeight() - 48}, 20, 0, DARKBLUE);
|
||||
DrawTextEx(textFont, TextFormat("High score: %i nights", highscore), { 10, (float)GetScreenHeight() - 50}, 20, 0, WHITE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
UpdateMusicStream(mainMenuMusic);
|
||||
// BeginShaderMode(bloom);
|
||||
// DrawTextureRec(rttarget.texture, { 0, 0, (float)rttarget.texture.width, -(float)rttarget.texture.height }, { 0, 0 }, WHITE);
|
||||
// EndShaderMode();
|
||||
// DrawTextEx(titleFont, GAMENAME, { 10, 10 }, 80, 0, BLACK);
|
||||
// DrawTextEx(textFont, TextFormat("Press Enter to continue...\nHigh Score: %i nights", highscore), { 10, 100 }, 20, 0, BLACK);
|
||||
// DrawRectangle(GetScreenWidth() - 10, GetScreenHeight() - 10, 10, 10, (windowed) ? GREEN : RED);
|
||||
/*if (IsKeyPressed(KEY_ENTER)) {
|
||||
menuEnum = 2;
|
||||
MassShoot::Camera::InitCamera();
|
||||
suite.upgrades.clear();
|
||||
map.LoadMap(firstmap);
|
||||
StopMusicStream(mainMenuMusic);
|
||||
MassShoot::Camera::LockCamera();
|
||||
}*/
|
||||
DrawTexture((windowed) ? windowedIcon : unwindowedIcon, GetScreenWidth() - 32, 0, WHITE);
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) {
|
||||
if (GetMouseX() > GetScreenWidth() - 32 && GetMouseY() < 32) windowed = !windowed;
|
||||
if (GetMouseX() > GetScreenWidth() / 5 && GetMouseX() < GetScreenWidth() / 5 + 128 &&
|
||||
GetMouseY() > (float)GetScreenHeight() / 2 && GetMouseY() < (float)GetScreenHeight() / 2 + 128) {
|
||||
menuEnum = 2;
|
||||
MassShoot::Camera::InitCamera();
|
||||
suite.upgrades.clear();
|
||||
map.LoadMap(firstmap);
|
||||
StopMusicStream(mainMenuMusic);
|
||||
PlaySound(startGame);
|
||||
PlayMusicStream(footsteps);
|
||||
PlayMusicStream(vacuum);
|
||||
MassShoot::Camera::LockCamera();
|
||||
}
|
||||
if (GetMouseX() > (float)GetScreenWidth() - ((float)GetScreenWidth() / 5) * 2 && GetMouseX() < (float)GetScreenWidth() - ((float)GetScreenWidth() / 5) * 2 + 128 &&
|
||||
GetMouseY() > (float)GetScreenHeight() / 2 - 10 && GetMouseY() < (float)GetScreenHeight() / 2 + 118) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (IsKeyPressed(KEY_R)) {
|
||||
MassShoot::Camera::InitCamera();
|
||||
suite.upgrades.clear();
|
||||
map.LoadMap(firstmap);
|
||||
}
|
||||
// UpdateMusicStream(music);
|
||||
headsUpDisplay.ammo = 0;
|
||||
headsUpDisplay.maxAmmo = 0;
|
||||
#pragma region
|
||||
if (IsKeyPressed(KEY_ESCAPE)) {
|
||||
switch (isPaused) {
|
||||
case false:
|
||||
isPaused = true;
|
||||
MassShoot::Camera::UnlockCamera();
|
||||
break;
|
||||
case true:
|
||||
isPaused = false;
|
||||
MassShoot::Camera::LockCamera();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
#pragma endregion Pause menu input
|
||||
#pragma region
|
||||
if (map.shaded) BeginTextureMode(rttarget);
|
||||
else BeginDrawing();
|
||||
MassShoot::Camera::StartCameraFrame();
|
||||
ClearBackground({ 102, 146, 212, 255 });
|
||||
if(!map.shaded) MassShoot::Skybox::DrawSkybox();
|
||||
|
||||
// DrawGrid(10, 1.0f);
|
||||
// bhop new ground collider
|
||||
MassShoot::Camera::CameraMovement(map, false, true, true);
|
||||
// advanced physics
|
||||
|
||||
map.RenderBoxes();
|
||||
map.RenderBillboards();
|
||||
|
||||
|
||||
// DrawRay(GetMouseRay({ (float)GetScreenWidth()/2, (float)GetScreenHeight()/2}, MassShoot::Camera::GetCamera()), RED);
|
||||
|
||||
/*if (IsKeyDown(KEY_LEFT_CONTROL)) {
|
||||
if (IsKeyPressed(KEY_O)) isShopOpen = true;
|
||||
if (IsKeyPressed(KEY_EQUAL)) nights++;
|
||||
if (IsKeyPressed(KEY_MINUS)) nights--;
|
||||
if (IsKeyPressed(KEY_P)) {
|
||||
int option, option2;
|
||||
std::cout << "What do you want to do? Skip to night(1), spawn ghosts(2), kill all ghosts(3) >";
|
||||
std::cin >> option;
|
||||
switch (option) {
|
||||
case 1:
|
||||
std::cout << "Which night? >";
|
||||
std::cin >> option2;
|
||||
nights = option2;
|
||||
break;
|
||||
case 2:
|
||||
std::cout << "How many ghosts? >";
|
||||
std::cin >> option2;
|
||||
ghostHandler.SpawnGhosts(option2);
|
||||
break;
|
||||
case 3:
|
||||
std::cout << "GHOSTINATOR 99000-HX deployed <3\n";
|
||||
ghostHandler.KillAllGhosts();
|
||||
default:
|
||||
std::cout << "Invalid option.\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//if (!isNight) {
|
||||
// if (IsKeyDown(KEY_LEFT_CONTROL) && IsKeyPressed(KEY_L)) {
|
||||
// isNight = true;
|
||||
// MassShoot::Skybox::LoadSkybox("massshoot/textures/skybox3.png");
|
||||
// nights++;
|
||||
// ghostHandler.SpawnGhosts(5 * nights * nights);
|
||||
// // playerHealth = 100;
|
||||
// }
|
||||
//}
|
||||
|
||||
ghostHandler.GhostsUpdate(MassShoot::Camera::GetCameraPosition());
|
||||
playerHealth -= ghostHandler.CheckForGhostCollision(MassShoot::Camera::GetCollider());
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT)) {
|
||||
ghostHandler.CheckForHarmedGhosts(GetMouseRay({ (float)GetScreenWidth() / 2, (float)GetScreenHeight() / 2 }, MassShoot::Camera::GetCamera()));
|
||||
}
|
||||
if (ghostHandler.GetGhostCount() == 0 && isNight) {
|
||||
MassShoot::Skybox::LoadSkybox("massshoot/textures/skybox2.png");
|
||||
isNight = false;
|
||||
}
|
||||
if (playerHealth <= 0) {
|
||||
StopMusicStream(vacuum);
|
||||
StopMusicStream(footsteps);
|
||||
menuEnum = 3;
|
||||
}
|
||||
|
||||
MassShoot::Camera::StopCameraFrame();
|
||||
if (map.shaded) {
|
||||
EndTextureMode();
|
||||
BeginShaderMode(bloom);
|
||||
DrawTextureRec(rttarget.texture, { 0, 0, (float)rttarget.texture.width, -(float)rttarget.texture.height }, { 0, 0 }, WHITE);
|
||||
EndShaderMode();
|
||||
}
|
||||
|
||||
#pragma endregion Map Rendering
|
||||
|
||||
// MassShoot::Weapons::DrawWeapon(&mkinfinite, countdown);
|
||||
map.CheckForTriggers(MassShoot::Camera::GetCollider());
|
||||
/*suite.CheckForUpgradeTriggers();
|
||||
for (int i = 0; i < suite.upgrades.size(); i++) {
|
||||
if(IsKeyPressed(suite.upgrades.at(i).keyID))
|
||||
suite.Execute(i);
|
||||
}
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT) && !isPaused) {
|
||||
mkinfinite.Shoot();
|
||||
}*/
|
||||
if (isNight) {
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), {30, 30, 60, 100});
|
||||
}
|
||||
if (isShopOpen) {
|
||||
shopDisplay.FrameFunc();
|
||||
if (IsKeyPressed(KEY_ESCAPE)) isShopOpen = false;
|
||||
}
|
||||
else{
|
||||
if (isPaused) {
|
||||
pauseMenu.FrameFunc();
|
||||
}
|
||||
if (!isPaused) {
|
||||
headsUpDisplay.FrameFunc();
|
||||
}
|
||||
}
|
||||
|
||||
if (ghostHandler.GetGhostCount() > 0) {
|
||||
|
||||
DrawTextEx(textFont, TextFormat("Ghosts left: %i\nNight: %i\nHealth: %i\nMoney: %i", ghostHandler.GetGhostCount(), nights, playerHealth, money), { 10, 10 }, 30, 0, BLACK);
|
||||
DrawTextEx(textFont, TextFormat("Ghosts left: %i\nNight: %i\nHealth: %i\nMoney: %i", ghostHandler.GetGhostCount(), nights, playerHealth, money), {0, 0}, 30, 0, WHITE);
|
||||
}
|
||||
else{
|
||||
DrawTextEx(textFont, TextFormat("Health: %i\nMoney: %i", playerHealth, money), { 10, 10 }, 30, 0, BLACK);
|
||||
DrawTextEx(textFont, TextFormat("Health: %i\nMoney: %i", playerHealth, money), { 0, 0 }, 30, 0, WHITE);
|
||||
}
|
||||
MassShoot::StoryTools::DisplayTitle(map.title, map.subtitle);
|
||||
DrawText("+", (GetScreenWidth() / 2) - 3, (GetScreenHeight() / 2) - 3, 6, WHITE);
|
||||
Vector3 camPos = MassShoot::Camera::GetCameraPosition();
|
||||
if (camPos.x > 17.5 && camPos.x < 35 && camPos.z > -49 && camPos.z < -38 && !isNight) {
|
||||
DrawTextEx(textFont, "Press E to start night...", { (float)GetScreenWidth() / 2 - MeasureTextEx(textFont, "Press E to start night...", 30, 0).x / 2 + 10, (float)GetScreenHeight() - 60 + 10}, 30, 0, BLACK);
|
||||
DrawTextEx(textFont, "Press E to start night...", { (float)GetScreenWidth() / 2 - MeasureTextEx(textFont, "Press E to start night...", 30, 0).x / 2, (float)GetScreenHeight() - 60 }, 30, 0, WHITE);
|
||||
if (IsKeyPressed(KEY_E)) {
|
||||
isNight = true;
|
||||
MassShoot::Skybox::LoadSkybox("massshoot/textures/skybox3.png");
|
||||
nights++;
|
||||
ghostHandler.SpawnGhosts(5 * nights * nights);
|
||||
}
|
||||
}
|
||||
if (camPos.x > 64 && camPos.x < 69 && camPos.z > -49 && camPos.z < -45 && !isNight) {
|
||||
DrawTextEx(textFont, "Press E to go online...", { (float)GetScreenWidth() / 2 - MeasureTextEx(textFont, "Press E to go online...", 30, 0).x / 2 + 10, (float)GetScreenHeight() - 60 + 10 }, 30, 0, BLACK);
|
||||
DrawTextEx(textFont, "Press E to go online...", { (float)GetScreenWidth() / 2 - MeasureTextEx(textFont, "Press E to go online...", 30, 0).x / 2, (float)GetScreenHeight() - 60 }, 30, 0, WHITE);
|
||||
if (IsKeyPressed(KEY_E)) {
|
||||
MassShoot::Camera::UnlockCamera();
|
||||
isShopOpen = true;
|
||||
}
|
||||
}
|
||||
printf("X: %f | Y: %f | Z: %f\n", camPos.x, camPos.y, camPos.z);
|
||||
|
||||
DrawFPS(1000, 0);
|
||||
// MassShoot::Camera::GravityDisplay();
|
||||
if (IsKeyDown(KEY_W) || IsKeyDown(KEY_A) || IsKeyDown(KEY_S) || IsKeyDown(KEY_D)) {
|
||||
SetMusicVolume(footsteps, 1.0f);
|
||||
}
|
||||
else {
|
||||
SetMusicVolume(footsteps, 0);
|
||||
}
|
||||
|
||||
UpdateMusicStream(footsteps);
|
||||
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT)) {
|
||||
if (vacuumLoudness < 1.0f) vacuumLoudness += 0.025f;
|
||||
}
|
||||
else {
|
||||
if (vacuumLoudness > 0.0f) vacuumLoudness -= 0.025f;
|
||||
}
|
||||
|
||||
SetMusicVolume(vacuum, vacuumLoudness);
|
||||
SetMusicPitch(vacuum, vacuumLoudness);
|
||||
UpdateMusicStream(vacuum);
|
||||
break;
|
||||
case 3:
|
||||
BeginDrawing();
|
||||
ClearBackground({ 12, 37, 25, 255 });
|
||||
DrawTextEx(titleFont, "Hijacked.", { 12, 12 }, 72, 0, {100, 0, 0, 255});
|
||||
DrawTextEx(titleFont, "Hijacked.", { 10, 10 }, 72, 0, RED);
|
||||
DrawTextEx(textFont, TextFormat("Your score: %i\n\nPress ENTER to return to Main Menu...", nights), { 12, 102 }, 20, 0, {100,0,0,255});
|
||||
DrawTextEx(textFont, TextFormat("Your score: %i\n\nPress ENTER to return to Main Menu...", nights), { 10, 100 }, 20, 0, RED);
|
||||
if (nights > highscore) {
|
||||
DrawTextEx(textFont, "HIGH SCORE!", { 12, (float)GetScreenHeight() - 78 }, 70, 0, {100,0,0,255});
|
||||
DrawTextEx(textFont, "HIGH SCORE!", { 10, (float)GetScreenHeight() - 80 }, 70, 0, RED);
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_ENTER)) {
|
||||
if(nights > highscore)
|
||||
{
|
||||
std::ofstream hsfile("highscore.tgtk");
|
||||
hsfile << nights;
|
||||
hsfile.close();
|
||||
highscore = nights;
|
||||
isNight = false;
|
||||
ghostHandler.KillAllGhosts();
|
||||
}
|
||||
MassShoot::Camera::InitCamera();
|
||||
menuEnum = 1;
|
||||
playerHealth = 100;
|
||||
nights = 0;
|
||||
MassShoot::Camera::UnlockCamera();
|
||||
PlayMusicStream(mainMenuMusic);
|
||||
}
|
||||
EndDrawing();
|
||||
|
||||
break;
|
||||
}
|
||||
MassShoot::Engine::Console();
|
||||
EndDrawing();
|
||||
if (countdown > 0) countdown--;
|
||||
|
||||
if (rttarget.texture.width != GetScreenWidth() || rttarget.texture.height != GetScreenHeight()) {
|
||||
UnloadRenderTexture(rttarget);
|
||||
rttarget = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
|
||||
}
|
||||
}
|
||||
CloseWindow();
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
WinMain(argc, argv);
|
||||
}
|
204
tgtk/massshoot/massshoot.vcxproj
Normal file
@ -0,0 +1,204 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{8ddd301b-42e3-4cec-a8e0-1ecc6e62fc8a}</ProjectGuid>
|
||||
<RootNamespace>massshoot</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>C:\massshoot\include;C:\massshoot\freeglut\include;C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\include</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4996;</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>C:\massshoot\freeglut\lib\x64;C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>raylib.lib;gdi32.lib;winmm.lib;;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>C:\massshoot\include;C:\massshoot\freeglut\include;C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\include</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4996;</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>C:\massshoot\freeglut\lib\x64;C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>raylib.lib;gdi32.lib;winmm.lib;;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>C:\massshoot\include;C:\massshoot\freeglut\include;C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\include</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4996;</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>C:\massshoot\freeglut\lib\x64;C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>raylib.lib;gdi32.lib;winmm.lib;;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>C:\massshoot\include;C:\massshoot\freeglut\include;C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\include</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4996;</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>C:\massshoot\freeglut\lib\x64;C:\Users\Utilisateur\Desktop\raylib-4.5.0_win64_msvc16\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>raylib.lib;gdi32.lib;winmm.lib;;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Camera.cpp" />
|
||||
<ClCompile Include="chaiLoadMap.cpp" />
|
||||
<ClCompile Include="ChaiScript.cpp" />
|
||||
<ClCompile Include="dark.cpp" />
|
||||
<ClCompile Include="Engine.cpp" />
|
||||
<ClCompile Include="Fonts.cpp" />
|
||||
<ClCompile Include="Ghost.cpp" />
|
||||
<ClCompile Include="HUD.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Map.cpp" />
|
||||
<ClCompile Include="Multiplayer.cpp" />
|
||||
<ClCompile Include="Particles.cpp" />
|
||||
<ClCompile Include="PauseMenu.cpp" />
|
||||
<ClCompile Include="Shop.cpp" />
|
||||
<ClCompile Include="Skybox.cpp" />
|
||||
<ClCompile Include="titles.cpp" />
|
||||
<ClCompile Include="UI.cpp" />
|
||||
<ClCompile Include="Weapons.cpp" />
|
||||
<ClCompile Include="WeaponUpgradeUI.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Camera.h" />
|
||||
<ClInclude Include="cameraextern.h" />
|
||||
<ClInclude Include="Chai.h" />
|
||||
<ClInclude Include="chaiLoadMap.h" />
|
||||
<ClInclude Include="dark.h" />
|
||||
<ClInclude Include="defines.h" />
|
||||
<ClInclude Include="Engine.h" />
|
||||
<ClInclude Include="ExternMap.h" />
|
||||
<ClInclude Include="ExternSuite.h" />
|
||||
<ClInclude Include="Fonts.h" />
|
||||
<ClInclude Include="Ghost.h" />
|
||||
<ClInclude Include="HUD.h" />
|
||||
<ClInclude Include="Map.h" />
|
||||
<ClInclude Include="Multiplayer.h" />
|
||||
<ClInclude Include="Music.h" />
|
||||
<ClInclude Include="Particles.h" />
|
||||
<ClInclude Include="PauseMenu.h" />
|
||||
<ClInclude Include="Player.h" />
|
||||
<ClInclude Include="Shop.h" />
|
||||
<ClInclude Include="Skybox.h" />
|
||||
<ClInclude Include="titles.h" />
|
||||
<ClInclude Include="UI.h" />
|
||||
<ClInclude Include="unraylibedExterns.h" />
|
||||
<ClInclude Include="Weapons.h" />
|
||||
<ClInclude Include="WeaponUpgradeUI.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
153
tgtk/massshoot/massshoot.vcxproj.filters
Normal file
@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Fichiers sources">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers d%27en-tête">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Fichiers de ressources">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Skybox.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Camera.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Engine.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Map.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UI.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PauseMenu.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Weapons.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Fonts.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HUD.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="WeaponUpgradeUI.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ChaiScript.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Multiplayer.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="titles.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="chaiLoadMap.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dark.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Ghost.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Particles.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Shop.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Player.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="defines.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Skybox.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Camera.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Engine.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Map.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="UI.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PauseMenu.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Weapons.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Fonts.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HUD.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Music.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="WeaponUpgradeUI.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Chai.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ExternSuite.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Multiplayer.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="titles.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="cameraextern.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="unraylibedExterns.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="chaiLoadMap.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ExternMap.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dark.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Ghost.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Particles.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Shop.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
4
tgtk/massshoot/massshoot.vcxproj.user
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
2
tgtk/massshoot/massshoot/actors/ghost/actor.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Ghost
|
||||
ghost.obj
|
BIN
tgtk/massshoot/massshoot/actors/ghost/ghost.blend
Normal file
BIN
tgtk/massshoot/massshoot/actors/ghost/ghost.blend1
Normal file
970
tgtk/massshoot/massshoot/actors/ghost/ghost.obj
Normal file
@ -0,0 +1,970 @@
|
||||
# Blender 4.0.2
|
||||
# www.blender.org
|
||||
o Cylinder
|
||||
v 0.000000 -1.204760 -1.000000
|
||||
v 0.000000 2.084089 -0.088209
|
||||
v 0.195090 -1.000000 -0.980785
|
||||
v 0.017209 2.084089 -0.086514
|
||||
v 0.382683 -1.204760 -0.923880
|
||||
v 0.033756 2.084089 -0.081494
|
||||
v 0.555570 -1.000000 -0.831470
|
||||
v 0.049006 2.084089 -0.073343
|
||||
v 0.707107 -1.204760 -0.707107
|
||||
v 0.062373 2.084089 -0.062373
|
||||
v 0.831470 -1.000000 -0.555570
|
||||
v 0.073343 2.084089 -0.049006
|
||||
v 0.923880 -1.204760 -0.382683
|
||||
v 0.081494 2.084089 -0.033756
|
||||
v 0.980785 -1.000000 -0.195090
|
||||
v 0.086514 2.084089 -0.017209
|
||||
v 1.000000 -1.204760 0.000000
|
||||
v 0.088209 2.084089 -0.000000
|
||||
v 0.980785 -1.000000 0.195090
|
||||
v 0.086514 2.084089 0.017209
|
||||
v 0.923880 -1.204760 0.382683
|
||||
v 0.081494 2.084089 0.033756
|
||||
v 0.831470 -1.000000 0.555570
|
||||
v 0.073343 2.084089 0.049006
|
||||
v 0.707107 -1.204760 0.707107
|
||||
v 0.062373 2.084089 0.062373
|
||||
v 0.555570 -1.000000 0.831470
|
||||
v 0.049006 2.084089 0.073343
|
||||
v 0.382683 -1.204760 0.923880
|
||||
v 0.033756 2.084089 0.081494
|
||||
v 0.195090 -1.000000 0.980785
|
||||
v 0.017209 2.084089 0.086514
|
||||
v 0.000000 -1.204760 1.000000
|
||||
v 0.000000 2.084089 0.088209
|
||||
v -0.195090 -1.000000 0.980785
|
||||
v -0.017209 2.084089 0.086514
|
||||
v -0.382683 -1.204760 0.923880
|
||||
v -0.033756 2.084089 0.081494
|
||||
v -0.555570 -1.000000 0.831470
|
||||
v -0.049006 2.084089 0.073343
|
||||
v -0.707107 -1.204760 0.707107
|
||||
v -0.062373 2.084089 0.062373
|
||||
v -0.831470 -1.000000 0.555570
|
||||
v -0.073343 2.084089 0.049006
|
||||
v -0.923880 -1.204760 0.382683
|
||||
v -0.081494 2.084089 0.033756
|
||||
v -0.980785 -1.000000 0.195090
|
||||
v -0.086514 2.084089 0.017209
|
||||
v -1.000000 -1.204760 0.000000
|
||||
v -0.088209 2.084089 -0.000000
|
||||
v -0.980785 -1.000000 -0.195090
|
||||
v -0.086514 2.084089 -0.017209
|
||||
v -0.923880 -1.204760 -0.382683
|
||||
v -0.081494 2.084089 -0.033756
|
||||
v -0.831470 -1.000000 -0.555570
|
||||
v -0.073343 2.084089 -0.049006
|
||||
v -0.707107 -1.204760 -0.707107
|
||||
v -0.062373 2.084089 -0.062373
|
||||
v -0.555570 -1.000000 -0.831470
|
||||
v -0.049006 2.084089 -0.073343
|
||||
v -0.382683 -1.204760 -0.923880
|
||||
v -0.033756 2.084089 -0.081494
|
||||
v -0.195090 -1.000000 -0.980785
|
||||
v -0.017209 2.084089 -0.086514
|
||||
v 0.000000 0.531433 -1.000000
|
||||
v 0.195090 0.531433 -0.980785
|
||||
v 0.382683 0.531433 -0.923880
|
||||
v 0.555570 0.531433 -0.831470
|
||||
v 0.707107 0.531433 -0.707107
|
||||
v 0.831470 0.531433 -0.555570
|
||||
v 0.923880 0.531433 -0.382683
|
||||
v 0.980785 0.531433 -0.195090
|
||||
v 1.000000 0.531433 0.000000
|
||||
v 0.980785 0.531433 0.195090
|
||||
v 0.923880 0.531433 0.382683
|
||||
v 0.831470 0.531433 0.555570
|
||||
v 0.707107 0.531433 0.707107
|
||||
v 0.555570 0.531433 0.831470
|
||||
v 0.382683 0.531433 0.923880
|
||||
v 0.195090 0.531433 0.980785
|
||||
v 0.000000 0.531433 1.000000
|
||||
v -0.195090 0.531433 0.980785
|
||||
v -0.382683 0.531433 0.923880
|
||||
v -0.555570 0.531433 0.831470
|
||||
v -0.707107 0.531433 0.707107
|
||||
v -0.831470 0.531433 0.555570
|
||||
v -0.923880 0.531433 0.382683
|
||||
v -0.980785 0.531433 0.195090
|
||||
v -1.000000 0.531433 0.000000
|
||||
v -0.980785 0.531433 -0.195090
|
||||
v -0.923880 0.531433 -0.382683
|
||||
v -0.831470 0.531433 -0.555570
|
||||
v -0.707107 0.531433 -0.707107
|
||||
v -0.555570 0.531433 -0.831470
|
||||
v -0.382683 0.531433 -0.923880
|
||||
v -0.195090 0.531433 -0.980785
|
||||
v 0.000000 1.297150 -1.000000
|
||||
v 0.195090 1.297150 -0.980785
|
||||
v 0.382683 1.297150 -0.923880
|
||||
v 0.555570 1.297150 -0.831470
|
||||
v 0.707107 1.297150 -0.707107
|
||||
v 0.831470 1.297150 -0.555570
|
||||
v 0.923880 1.297150 -0.382683
|
||||
v 0.980785 1.297150 -0.195090
|
||||
v 1.000000 1.297150 0.000000
|
||||
v 0.980785 1.297150 0.195090
|
||||
v 0.923880 1.297150 0.382683
|
||||
v 0.831470 1.297150 0.555570
|
||||
v 0.707107 1.297150 0.707107
|
||||
v 0.555570 1.297150 0.831470
|
||||
v 0.382683 1.297150 0.923880
|
||||
v 0.195090 1.297150 0.980785
|
||||
v 0.000000 1.297150 1.000000
|
||||
v -0.195090 1.297150 0.980785
|
||||
v -0.382683 1.297150 0.923880
|
||||
v -0.555570 1.297150 0.831470
|
||||
v -0.707107 1.297150 0.707107
|
||||
v -0.831470 1.297150 0.555570
|
||||
v -0.923880 1.297150 0.382683
|
||||
v -0.980785 1.297150 0.195090
|
||||
v -1.000000 1.297150 0.000000
|
||||
v -0.980785 1.297150 -0.195090
|
||||
v -0.923880 1.297150 -0.382683
|
||||
v -0.831470 1.297150 -0.555570
|
||||
v -0.707107 1.297150 -0.707107
|
||||
v -0.555570 1.297150 -0.831470
|
||||
v -0.382683 1.297150 -0.923880
|
||||
v -0.195090 1.297150 -0.980785
|
||||
v 0.000000 1.680008 -0.882329
|
||||
v 0.172134 1.680008 -0.865376
|
||||
v 0.337653 1.680008 -0.815166
|
||||
v 0.490196 1.680008 -0.733630
|
||||
v 0.623901 1.680008 -0.623901
|
||||
v 0.733630 1.680008 -0.490196
|
||||
v 0.815166 1.680008 -0.337653
|
||||
v 0.865376 1.680008 -0.172134
|
||||
v 0.882329 1.680008 -0.000000
|
||||
v 0.865376 1.680008 0.172134
|
||||
v 0.815166 1.680008 0.337653
|
||||
v 0.733630 1.680008 0.490196
|
||||
v 0.623901 1.680008 0.623901
|
||||
v 0.490196 1.680008 0.733630
|
||||
v 0.337653 1.680008 0.815166
|
||||
v 0.172134 1.680008 0.865376
|
||||
v 0.000000 1.680008 0.882329
|
||||
v -0.172134 1.680008 0.865376
|
||||
v -0.337653 1.680008 0.815166
|
||||
v -0.490196 1.680008 0.733630
|
||||
v -0.623901 1.680008 0.623901
|
||||
v -0.733630 1.680008 0.490196
|
||||
v -0.815166 1.680008 0.337653
|
||||
v -0.865376 1.680008 0.172134
|
||||
v -0.882329 1.680008 -0.000000
|
||||
v -0.865376 1.680008 -0.172134
|
||||
v -0.815166 1.680008 -0.337653
|
||||
v -0.733630 1.680008 -0.490196
|
||||
v -0.623901 1.680008 -0.623901
|
||||
v -0.490196 1.680008 -0.733630
|
||||
v -0.337653 1.680008 -0.815166
|
||||
v -0.172134 1.680008 -0.865376
|
||||
v 0.000000 1.871437 -0.766588
|
||||
v 0.149554 1.871437 -0.751859
|
||||
v 0.293361 1.871437 -0.708235
|
||||
v 0.425894 1.871437 -0.637395
|
||||
v 0.542060 1.871437 -0.542060
|
||||
v 0.637395 1.871437 -0.425894
|
||||
v 0.708235 1.871437 -0.293361
|
||||
v 0.751859 1.871437 -0.149554
|
||||
v 0.766588 1.871437 -0.000000
|
||||
v 0.751859 1.871437 0.149554
|
||||
v 0.708235 1.871437 0.293361
|
||||
v 0.637395 1.871437 0.425894
|
||||
v 0.542060 1.871437 0.542060
|
||||
v 0.425894 1.871437 0.637395
|
||||
v 0.293361 1.871437 0.708235
|
||||
v 0.149554 1.871437 0.751859
|
||||
v 0.000000 1.871437 0.766588
|
||||
v -0.149554 1.871437 0.751859
|
||||
v -0.293361 1.871437 0.708235
|
||||
v -0.425894 1.871437 0.637395
|
||||
v -0.542060 1.871437 0.542060
|
||||
v -0.637395 1.871437 0.425894
|
||||
v -0.708235 1.871437 0.293361
|
||||
v -0.751859 1.871437 0.149554
|
||||
v -0.766588 1.871437 -0.000000
|
||||
v -0.751859 1.871437 -0.149554
|
||||
v -0.708235 1.871437 -0.293361
|
||||
v -0.637395 1.871437 -0.425894
|
||||
v -0.542060 1.871437 -0.542060
|
||||
v -0.425894 1.871437 -0.637395
|
||||
v -0.293361 1.871437 -0.708235
|
||||
v -0.149554 1.871437 -0.751859
|
||||
v 0.000000 1.967152 -0.587249
|
||||
v 0.114567 1.967152 -0.575966
|
||||
v 0.224731 1.967152 -0.542548
|
||||
v 0.326258 1.967152 -0.488280
|
||||
v 0.415248 1.967152 -0.415248
|
||||
v 0.488280 1.967152 -0.326258
|
||||
v 0.542548 1.967152 -0.224731
|
||||
v 0.575966 1.967152 -0.114567
|
||||
v 0.587249 1.967152 -0.000000
|
||||
v 0.575966 1.967152 0.114567
|
||||
v 0.542548 1.967152 0.224731
|
||||
v 0.488280 1.967152 0.326258
|
||||
v 0.415248 1.967152 0.415248
|
||||
v 0.326258 1.967152 0.488280
|
||||
v 0.224731 1.967152 0.542548
|
||||
v 0.114567 1.967152 0.575966
|
||||
v 0.000000 1.967152 0.587249
|
||||
v -0.114567 1.967152 0.575966
|
||||
v -0.224731 1.967152 0.542548
|
||||
v -0.326258 1.967152 0.488280
|
||||
v -0.415248 1.967152 0.415248
|
||||
v -0.488280 1.967152 0.326258
|
||||
v -0.542548 1.967152 0.224731
|
||||
v -0.575966 1.967152 0.114567
|
||||
v -0.587249 1.967152 -0.000000
|
||||
v -0.575966 1.967152 -0.114567
|
||||
v -0.542548 1.967152 -0.224731
|
||||
v -0.488280 1.967152 -0.326258
|
||||
v -0.415248 1.967152 -0.415248
|
||||
v -0.326258 1.967152 -0.488280
|
||||
v -0.224731 1.967152 -0.542548
|
||||
v -0.114567 1.967152 -0.575966
|
||||
vn 0.0225 0.9734 -0.2281
|
||||
vn 0.0665 0.9734 -0.2193
|
||||
vn 0.1080 0.9734 -0.2021
|
||||
vn 0.1454 0.9734 -0.1772
|
||||
vn 0.1772 0.9734 -0.1454
|
||||
vn 0.2021 0.9734 -0.1080
|
||||
vn 0.2193 0.9734 -0.0665
|
||||
vn 0.2281 0.9734 -0.0225
|
||||
vn 0.2281 0.9734 0.0225
|
||||
vn 0.2193 0.9734 0.0665
|
||||
vn 0.2021 0.9734 0.1080
|
||||
vn 0.1772 0.9734 0.1454
|
||||
vn 0.1454 0.9734 0.1772
|
||||
vn 0.1080 0.9734 0.2021
|
||||
vn 0.0665 0.9734 0.2193
|
||||
vn 0.0225 0.9734 0.2281
|
||||
vn -0.0225 0.9734 0.2281
|
||||
vn -0.0665 0.9734 0.2193
|
||||
vn -0.1080 0.9734 0.2021
|
||||
vn -0.1454 0.9734 0.1772
|
||||
vn -0.1772 0.9734 0.1454
|
||||
vn -0.2021 0.9734 0.1080
|
||||
vn -0.2193 0.9734 0.0665
|
||||
vn -0.2281 0.9734 0.0225
|
||||
vn -0.2281 0.9734 -0.0225
|
||||
vn -0.2193 0.9734 -0.0665
|
||||
vn -0.2021 0.9734 -0.1080
|
||||
vn -0.1772 0.9734 -0.1454
|
||||
vn -0.1454 0.9734 -0.1772
|
||||
vn -0.1080 0.9734 -0.2021
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vn -0.0665 0.9734 -0.2193
|
||||
vn -0.0225 0.9734 -0.2281
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vn -0.0980 -0.0000 -0.9952
|
||||
vn -0.2903 -0.0000 -0.9569
|
||||
vn -0.4714 -0.0000 -0.8819
|
||||
vn -0.6344 -0.0000 -0.7730
|
||||
vn -0.7730 -0.0000 -0.6344
|
||||
vn -0.8819 -0.0000 -0.4714
|
||||
vn -0.9569 -0.0000 -0.2903
|
||||
vn -0.9952 -0.0000 -0.0980
|
||||
vn -0.9952 -0.0000 0.0980
|
||||
vn -0.9569 -0.0000 0.2903
|
||||
vn -0.8819 -0.0000 0.4714
|
||||
vn -0.7730 -0.0000 0.6344
|
||||
vn -0.6344 -0.0000 0.7730
|
||||
vn -0.4714 -0.0000 0.8819
|
||||
vn -0.2903 -0.0000 0.9569
|
||||
vn -0.0980 -0.0000 0.9952
|
||||
vn 0.0980 -0.0000 0.9952
|
||||
vn 0.2903 -0.0000 0.9569
|
||||
vn 0.4714 -0.0000 0.8819
|
||||
vn 0.6344 -0.0000 0.7730
|
||||
vn 0.7730 -0.0000 0.6344
|
||||
vn 0.8819 -0.0000 0.4714
|
||||
vn 0.9569 -0.0000 0.2903
|
||||
vn 0.9952 -0.0000 0.0980
|
||||
vn 0.9952 -0.0000 -0.0980
|
||||
vn 0.9569 -0.0000 -0.2903
|
||||
vn 0.8819 -0.0000 -0.4714
|
||||
vn 0.7730 -0.0000 -0.6344
|
||||
vn 0.6344 -0.0000 -0.7730
|
||||
vn 0.4714 -0.0000 -0.8819
|
||||
vn 0.2903 -0.0000 -0.9569
|
||||
vn 0.0980 -0.0000 -0.9952
|
||||
vn -0.0937 0.2925 -0.9517
|
||||
vn -0.2776 0.2925 -0.9151
|
||||
vn -0.4508 0.2925 -0.8434
|
||||
vn -0.6067 0.2925 -0.7392
|
||||
vn -0.7392 0.2925 -0.6067
|
||||
vn -0.8434 0.2925 -0.4508
|
||||
vn -0.9151 0.2925 -0.2776
|
||||
vn -0.9517 0.2925 -0.0937
|
||||
vn -0.9517 0.2925 0.0937
|
||||
vn -0.9151 0.2925 0.2776
|
||||
vn -0.8434 0.2925 0.4508
|
||||
vn -0.7392 0.2925 0.6067
|
||||
vn -0.6067 0.2925 0.7392
|
||||
vn -0.4508 0.2925 0.8434
|
||||
vn -0.2776 0.2925 0.9151
|
||||
vn -0.0937 0.2925 0.9517
|
||||
vn 0.0937 0.2925 0.9517
|
||||
vn 0.2776 0.2925 0.9151
|
||||
vn 0.4508 0.2925 0.8434
|
||||
vn 0.6067 0.2925 0.7392
|
||||
vn 0.7392 0.2925 0.6067
|
||||
vn 0.8434 0.2925 0.4508
|
||||
vn 0.9151 0.2925 0.2776
|
||||
vn 0.9517 0.2925 0.0937
|
||||
vn 0.9517 0.2925 -0.0937
|
||||
vn 0.9151 0.2925 -0.2776
|
||||
vn 0.8434 0.2925 -0.4508
|
||||
vn 0.7392 0.2925 -0.6067
|
||||
vn 0.6067 0.2925 -0.7392
|
||||
vn 0.4508 0.2925 -0.8434
|
||||
vn 0.2776 0.2925 -0.9151
|
||||
vn 0.0937 0.2925 -0.9517
|
||||
vn -0.0840 0.5156 -0.8527
|
||||
vn -0.2487 0.5156 -0.8200
|
||||
vn -0.4039 0.5156 -0.7557
|
||||
vn -0.5436 0.5156 -0.6624
|
||||
vn -0.6624 0.5156 -0.5436
|
||||
vn -0.7557 0.5156 -0.4039
|
||||
vn -0.8200 0.5156 -0.2487
|
||||
vn -0.8527 0.5156 -0.0840
|
||||
vn -0.8527 0.5156 0.0840
|
||||
vn -0.8200 0.5156 0.2487
|
||||
vn -0.7557 0.5156 0.4039
|
||||
vn -0.6624 0.5156 0.5436
|
||||
vn -0.5436 0.5156 0.6624
|
||||
vn -0.4039 0.5156 0.7557
|
||||
vn -0.2487 0.5156 0.8200
|
||||
vn -0.0840 0.5156 0.8527
|
||||
vn 0.0840 0.5156 0.8527
|
||||
vn 0.2487 0.5156 0.8200
|
||||
vn 0.4039 0.5156 0.7557
|
||||
vn 0.5436 0.5156 0.6624
|
||||
vn 0.6624 0.5156 0.5436
|
||||
vn 0.7557 0.5156 0.4039
|
||||
vn 0.8200 0.5156 0.2487
|
||||
vn 0.8527 0.5156 0.0840
|
||||
vn 0.8527 0.5156 -0.0840
|
||||
vn 0.8200 0.5156 -0.2487
|
||||
vn 0.7557 0.5156 -0.4039
|
||||
vn 0.6624 0.5156 -0.5436
|
||||
vn 0.5436 0.5156 -0.6624
|
||||
vn 0.4039 0.5156 -0.7557
|
||||
vn 0.2487 0.5156 -0.8200
|
||||
vn 0.0840 0.5156 -0.8527
|
||||
vn -0.0463 0.8813 -0.4703
|
||||
vn -0.1372 0.8813 -0.4523
|
||||
vn -0.2228 0.8813 -0.4168
|
||||
vn -0.2998 0.8813 -0.3653
|
||||
vn -0.3653 0.8813 -0.2998
|
||||
vn -0.4168 0.8813 -0.2228
|
||||
vn -0.4523 0.8813 -0.1372
|
||||
vn -0.4703 0.8813 -0.0463
|
||||
vn -0.4703 0.8813 0.0463
|
||||
vn -0.4523 0.8813 0.1372
|
||||
vn -0.4168 0.8813 0.2228
|
||||
vn -0.3653 0.8813 0.2998
|
||||
vn -0.2998 0.8813 0.3653
|
||||
vn -0.2228 0.8813 0.4168
|
||||
vn -0.1372 0.8813 0.4523
|
||||
vn -0.0463 0.8813 0.4703
|
||||
vn 0.0463 0.8813 0.4703
|
||||
vn 0.1372 0.8813 0.4523
|
||||
vn 0.2228 0.8813 0.4168
|
||||
vn 0.2998 0.8813 0.3653
|
||||
vn 0.3653 0.8813 0.2998
|
||||
vn 0.4168 0.8813 0.2228
|
||||
vn 0.4523 0.8813 0.1372
|
||||
vn 0.4703 0.8813 0.0463
|
||||
vn 0.4703 0.8813 -0.0463
|
||||
vn 0.4523 0.8813 -0.1372
|
||||
vn 0.4168 0.8813 -0.2228
|
||||
vn 0.3653 0.8813 -0.2998
|
||||
vn 0.2998 0.8813 -0.3653
|
||||
vn 0.2228 0.8813 -0.4168
|
||||
vn 0.1372 0.8813 -0.4523
|
||||
vn 0.0463 0.8813 -0.4703
|
||||
vn -0.0000 -0.0934 0.9956
|
||||
vn -0.3810 -0.0934 0.9198
|
||||
vn -0.7040 -0.0934 0.7040
|
||||
vn -0.9198 -0.0934 0.3810
|
||||
vn -0.9956 -0.0934 -0.0000
|
||||
vn -0.9198 -0.0934 -0.3810
|
||||
vn -0.7040 -0.0934 -0.7040
|
||||
vn -0.3810 -0.0934 -0.9198
|
||||
vn -0.0000 -0.0934 -0.9956
|
||||
vn 0.3810 -0.0934 -0.9198
|
||||
vn 0.7040 -0.0934 -0.7040
|
||||
vn 0.9198 -0.0934 -0.3810
|
||||
vn 0.9956 -0.0934 -0.0000
|
||||
vn 0.9198 -0.0934 0.3810
|
||||
vn 0.7040 -0.0934 0.7040
|
||||
vn 0.3810 -0.0934 0.9198
|
||||
vt 0.711854 0.525955
|
||||
vt 0.667333 0.521570
|
||||
vt 0.667333 0.520020
|
||||
vt 0.711854 0.515635
|
||||
vt 0.667031 0.518499
|
||||
vt 0.709840 0.505513
|
||||
vt 0.666437 0.517067
|
||||
vt 0.705891 0.495979
|
||||
vt 0.665576 0.515778
|
||||
vt 0.700158 0.487398
|
||||
vt 0.664480 0.514682
|
||||
vt 0.692860 0.480101
|
||||
vt 0.663191 0.513821
|
||||
vt 0.684280 0.474367
|
||||
vt 0.661759 0.513228
|
||||
vt 0.674745 0.470418
|
||||
vt 0.660239 0.512926
|
||||
vt 0.664624 0.468405
|
||||
vt 0.658689 0.512926
|
||||
vt 0.654304 0.468405
|
||||
vt 0.657168 0.513228
|
||||
vt 0.644182 0.470418
|
||||
vt 0.655736 0.513821
|
||||
vt 0.634648 0.474367
|
||||
vt 0.654447 0.514682
|
||||
vt 0.626067 0.480101
|
||||
vt 0.653351 0.515778
|
||||
vt 0.618770 0.487398
|
||||
vt 0.652490 0.517067
|
||||
vt 0.613036 0.495979
|
||||
vt 0.651897 0.518499
|
||||
vt 0.609087 0.505513
|
||||
vt 0.651594 0.520020
|
||||
vt 0.607074 0.515635
|
||||
vt 0.651594 0.521570
|
||||
vt 0.607074 0.525955
|
||||
vt 0.651897 0.523090
|
||||
vt 0.609087 0.536076
|
||||
vt 0.652490 0.524522
|
||||
vt 0.613036 0.545611
|
||||
vt 0.653351 0.525811
|
||||
vt 0.618770 0.554191
|
||||
vt 0.654447 0.526907
|
||||
vt 0.626067 0.561489
|
||||
vt 0.655736 0.527769
|
||||
vt 0.634648 0.567222
|
||||
vt 0.657168 0.528362
|
||||
vt 0.644182 0.571171
|
||||
vt 0.658689 0.528664
|
||||
vt 0.654304 0.573185
|
||||
vt 0.660239 0.528664
|
||||
vt 0.664624 0.573185
|
||||
vt 0.661759 0.528362
|
||||
vt 0.674745 0.571171
|
||||
vt 0.663191 0.527769
|
||||
vt 0.684280 0.567222
|
||||
vt 0.664480 0.526907
|
||||
vt 0.692860 0.561489
|
||||
vt 0.665576 0.525811
|
||||
vt 0.700158 0.554191
|
||||
vt 0.666437 0.524522
|
||||
vt 0.705891 0.545611
|
||||
vt 0.667031 0.523090
|
||||
vt 0.709840 0.536076
|
||||
vt 0.299849 0.522838
|
||||
vt 0.405259 0.452406
|
||||
vt 0.475692 0.557816
|
||||
vt 0.170883 0.710783
|
||||
vt 0.170883 0.573669
|
||||
vt 0.184467 0.573115
|
||||
vt 0.184467 0.728563
|
||||
vt 0.155384 0.729527
|
||||
vt 0.155384 0.574080
|
||||
vt 0.138568 0.711447
|
||||
vt 0.138568 0.574333
|
||||
vt 0.121079 0.729866
|
||||
vt 0.121079 0.574418
|
||||
vt 0.103590 0.711447
|
||||
vt 0.103590 0.574333
|
||||
vt 0.086774 0.729527
|
||||
vt 0.086774 0.574080
|
||||
vt 0.071275 0.710783
|
||||
vt 0.071275 0.573669
|
||||
vt 0.057691 0.728563
|
||||
vt 0.057691 0.573115
|
||||
vt 0.411260 0.317342
|
||||
vt 0.411260 0.181373
|
||||
vt 0.425731 0.179996
|
||||
vt 0.425731 0.334146
|
||||
vt 0.395121 0.336482
|
||||
vt 0.395121 0.182333
|
||||
vt 0.377936 0.318809
|
||||
vt 0.377936 0.182840
|
||||
vt 0.360365 0.337023
|
||||
vt 0.360365 0.182874
|
||||
vt 0.343082 0.318404
|
||||
vt 0.343082 0.182435
|
||||
vt 0.326753 0.335687
|
||||
vt 0.326753 0.181538
|
||||
vt 0.312004 0.316189
|
||||
vt 0.312004 0.180219
|
||||
vt 0.299402 0.332678
|
||||
vt 0.299402 0.178528
|
||||
vt 0.654841 0.316189
|
||||
vt 0.654841 0.180219
|
||||
vt 0.667443 0.178528
|
||||
vt 0.667443 0.332678
|
||||
vt 0.640093 0.335687
|
||||
vt 0.640093 0.181538
|
||||
vt 0.623763 0.318404
|
||||
vt 0.623763 0.182435
|
||||
vt 0.606481 0.337023
|
||||
vt 0.606481 0.182874
|
||||
vt 0.588909 0.318809
|
||||
vt 0.588909 0.182840
|
||||
vt 0.571724 0.336482
|
||||
vt 0.571724 0.182333
|
||||
vt 0.555585 0.317342
|
||||
vt 0.555585 0.181373
|
||||
vt 0.541114 0.334146
|
||||
vt 0.541114 0.179996
|
||||
vt 0.171419 0.316189
|
||||
vt 0.171419 0.180219
|
||||
vt 0.184020 0.178528
|
||||
vt 0.184020 0.332678
|
||||
vt 0.156670 0.335687
|
||||
vt 0.156670 0.181538
|
||||
vt 0.140341 0.318404
|
||||
vt 0.140341 0.182435
|
||||
vt 0.123058 0.337023
|
||||
vt 0.123058 0.182874
|
||||
vt 0.105487 0.318809
|
||||
vt 0.105487 0.182840
|
||||
vt 0.088301 0.336482
|
||||
vt 0.088301 0.182333
|
||||
vt 0.072163 0.317342
|
||||
vt 0.072163 0.181373
|
||||
vt 0.057691 0.334146
|
||||
vt 0.057691 0.179996
|
||||
vt 0.170883 0.505111
|
||||
vt 0.184467 0.504558
|
||||
vt 0.155384 0.505522
|
||||
vt 0.138568 0.505775
|
||||
vt 0.121079 0.505861
|
||||
vt 0.103590 0.505775
|
||||
vt 0.086774 0.505522
|
||||
vt 0.071275 0.505111
|
||||
vt 0.057691 0.504558
|
||||
vt 0.411260 0.113388
|
||||
vt 0.425731 0.112012
|
||||
vt 0.395121 0.114348
|
||||
vt 0.377936 0.114855
|
||||
vt 0.360365 0.114889
|
||||
vt 0.343082 0.114450
|
||||
vt 0.326753 0.113553
|
||||
vt 0.312004 0.112234
|
||||
vt 0.299402 0.110544
|
||||
vt 0.654841 0.112234
|
||||
vt 0.667443 0.110544
|
||||
vt 0.640093 0.113553
|
||||
vt 0.623763 0.114450
|
||||
vt 0.606481 0.114889
|
||||
vt 0.588909 0.114855
|
||||
vt 0.571724 0.114348
|
||||
vt 0.555585 0.113388
|
||||
vt 0.541114 0.112012
|
||||
vt 0.171419 0.112234
|
||||
vt 0.184020 0.110544
|
||||
vt 0.156670 0.113553
|
||||
vt 0.140341 0.114450
|
||||
vt 0.123058 0.114889
|
||||
vt 0.105487 0.114855
|
||||
vt 0.088301 0.114348
|
||||
vt 0.072163 0.113388
|
||||
vt 0.057691 0.112012
|
||||
vt 0.165022 0.470397
|
||||
vt 0.177008 0.469909
|
||||
vt 0.151348 0.470760
|
||||
vt 0.136510 0.470983
|
||||
vt 0.121079 0.471059
|
||||
vt 0.105648 0.470983
|
||||
vt 0.090810 0.470760
|
||||
vt 0.077136 0.470397
|
||||
vt 0.065150 0.469909
|
||||
vt 0.406156 0.078121
|
||||
vt 0.418924 0.076907
|
||||
vt 0.391916 0.078968
|
||||
vt 0.376753 0.079416
|
||||
vt 0.361249 0.079446
|
||||
vt 0.346000 0.079058
|
||||
vt 0.331593 0.078267
|
||||
vt 0.318579 0.077103
|
||||
vt 0.307461 0.075612
|
||||
vt 0.648266 0.077103
|
||||
vt 0.659384 0.075612
|
||||
vt 0.635253 0.078267
|
||||
vt 0.620845 0.079058
|
||||
vt 0.605596 0.079446
|
||||
vt 0.590092 0.079416
|
||||
vt 0.574929 0.078968
|
||||
vt 0.560689 0.078121
|
||||
vt 0.547921 0.076907
|
||||
vt 0.164843 0.077103
|
||||
vt 0.175962 0.075612
|
||||
vt 0.151830 0.078267
|
||||
vt 0.137422 0.079058
|
||||
vt 0.122173 0.079446
|
||||
vt 0.106669 0.079416
|
||||
vt 0.091506 0.078968
|
||||
vt 0.077267 0.078121
|
||||
vt 0.064498 0.076907
|
||||
vt 0.159258 0.452830
|
||||
vt 0.169671 0.452406
|
||||
vt 0.147377 0.453145
|
||||
vt 0.134486 0.453339
|
||||
vt 0.121079 0.453405
|
||||
vt 0.107672 0.453339
|
||||
vt 0.094781 0.453145
|
||||
vt 0.082900 0.452830
|
||||
vt 0.072487 0.452406
|
||||
vt 0.401135 0.059872
|
||||
vt 0.412229 0.058816
|
||||
vt 0.388764 0.060607
|
||||
vt 0.375590 0.060996
|
||||
vt 0.362120 0.061023
|
||||
vt 0.348871 0.060686
|
||||
vt 0.336353 0.059998
|
||||
vt 0.325047 0.058987
|
||||
vt 0.315387 0.057691
|
||||
vt 0.641798 0.058987
|
||||
vt 0.651458 0.057691
|
||||
vt 0.630492 0.059998
|
||||
vt 0.617974 0.060686
|
||||
vt 0.604725 0.061023
|
||||
vt 0.591255 0.060996
|
||||
vt 0.578081 0.060607
|
||||
vt 0.565710 0.059872
|
||||
vt 0.554616 0.058816
|
||||
vt 0.158376 0.058987
|
||||
vt 0.168036 0.057691
|
||||
vt 0.147069 0.059998
|
||||
vt 0.134552 0.060686
|
||||
vt 0.121303 0.061023
|
||||
vt 0.107833 0.060996
|
||||
vt 0.094659 0.060607
|
||||
vt 0.082287 0.059871
|
||||
vt 0.071193 0.058816
|
||||
vt 0.725225 0.540743
|
||||
vt 0.727853 0.527531
|
||||
vt 0.720069 0.553189
|
||||
vt 0.712585 0.564390
|
||||
vt 0.703059 0.573916
|
||||
vt 0.691858 0.581401
|
||||
vt 0.679412 0.586556
|
||||
vt 0.666199 0.589184
|
||||
vt 0.652728 0.589184
|
||||
vt 0.639515 0.586556
|
||||
vt 0.627069 0.581401
|
||||
vt 0.615868 0.573916
|
||||
vt 0.606342 0.564390
|
||||
vt 0.598858 0.553189
|
||||
vt 0.593703 0.540743
|
||||
vt 0.591075 0.527531
|
||||
vt 0.591075 0.514059
|
||||
vt 0.593703 0.500846
|
||||
vt 0.598858 0.488400
|
||||
vt 0.606342 0.477199
|
||||
vt 0.615868 0.467674
|
||||
vt 0.627069 0.460189
|
||||
vt 0.639515 0.455034
|
||||
vt 0.652728 0.452406
|
||||
vt 0.666199 0.452406
|
||||
vt 0.679412 0.455034
|
||||
vt 0.691858 0.460189
|
||||
vt 0.703059 0.467674
|
||||
vt 0.712585 0.477199
|
||||
vt 0.720069 0.488400
|
||||
vt 0.725225 0.500846
|
||||
vt 0.727853 0.514059
|
||||
vt 0.938893 0.072894
|
||||
vt 0.921807 0.081221
|
||||
vt 0.921807 0.057691
|
||||
vt 0.880428 0.729417
|
||||
vt 0.858026 0.729417
|
||||
vt 0.861633 0.704566
|
||||
vt 0.742644 0.739423
|
||||
vt 0.724704 0.722347
|
||||
vt 0.742644 0.704566
|
||||
vt 0.804542 0.198391
|
||||
vt 0.806425 0.223709
|
||||
vt 0.782825 0.223709
|
||||
vt 0.452797 0.884331
|
||||
vt 0.452797 0.908659
|
||||
vt 0.433171 0.902730
|
||||
vt 0.081208 0.867422
|
||||
vt 0.057691 0.870313
|
||||
vt 0.057691 0.845248
|
||||
vt 0.591075 0.704566
|
||||
vt 0.609322 0.722055
|
||||
vt 0.591075 0.739544
|
||||
vt 0.606263 0.854926
|
||||
vt 0.609322 0.879803
|
||||
vt 0.585628 0.879803
|
||||
vt 0.942309 0.221680
|
||||
vt 0.921807 0.221680
|
||||
vt 0.928843 0.198391
|
||||
vt 0.456772 0.768949
|
||||
vt 0.433172 0.768949
|
||||
vt 0.435054 0.743631
|
||||
vt 0.867992 0.452406
|
||||
vt 0.867992 0.477665
|
||||
vt 0.843235 0.476943
|
||||
vt 0.746873 0.854805
|
||||
vt 0.746873 0.879916
|
||||
vt 0.724704 0.876698
|
||||
vt 0.317789 0.912269
|
||||
vt 0.298164 0.918198
|
||||
vt 0.298164 0.893870
|
||||
vt 0.806425 0.083009
|
||||
vt 0.782825 0.083009
|
||||
vt 0.784708 0.057691
|
||||
vt 0.299849 0.743631
|
||||
vt 0.317789 0.761412
|
||||
vt 0.299849 0.778487
|
||||
vt 0.881050 0.854805
|
||||
vt 0.884657 0.879655
|
||||
vt 0.862255 0.879655
|
||||
vt 0.462307 0.590131
|
||||
vt 0.370282 0.628249
|
||||
vt 0.437574 0.614863
|
||||
vt 0.405259 0.628249
|
||||
vt 0.337967 0.614863
|
||||
vt 0.313235 0.590131
|
||||
vt 0.299849 0.557816
|
||||
vt 0.313235 0.490524
|
||||
vt 0.337967 0.465791
|
||||
vt 0.370282 0.452406
|
||||
vt 0.437574 0.465791
|
||||
vt 0.462307 0.490524
|
||||
vt 0.475692 0.522838
|
||||
s 0
|
||||
usemtl Material
|
||||
f 193/1/1 2/2/1 4/3/1 194/4/1
|
||||
f 194/4/2 4/3/2 6/5/2 195/6/2
|
||||
f 195/6/3 6/5/3 8/7/3 196/8/3
|
||||
f 196/8/4 8/7/4 10/9/4 197/10/4
|
||||
f 197/10/5 10/9/5 12/11/5 198/12/5
|
||||
f 198/12/6 12/11/6 14/13/6 199/14/6
|
||||
f 199/14/7 14/13/7 16/15/7 200/16/7
|
||||
f 200/16/8 16/15/8 18/17/8 201/18/8
|
||||
f 201/18/9 18/17/9 20/19/9 202/20/9
|
||||
f 202/20/10 20/19/10 22/21/10 203/22/10
|
||||
f 203/22/11 22/21/11 24/23/11 204/24/11
|
||||
f 204/24/12 24/23/12 26/25/12 205/26/12
|
||||
f 205/26/13 26/25/13 28/27/13 206/28/13
|
||||
f 206/28/14 28/27/14 30/29/14 207/30/14
|
||||
f 207/30/15 30/29/15 32/31/15 208/32/15
|
||||
f 208/32/16 32/31/16 34/33/16 209/34/16
|
||||
f 209/34/17 34/33/17 36/35/17 210/36/17
|
||||
f 210/36/18 36/35/18 38/37/18 211/38/18
|
||||
f 211/38/19 38/37/19 40/39/19 212/40/19
|
||||
f 212/40/20 40/39/20 42/41/20 213/42/20
|
||||
f 213/42/21 42/41/21 44/43/21 214/44/21
|
||||
f 214/44/22 44/43/22 46/45/22 215/46/22
|
||||
f 215/46/23 46/45/23 48/47/23 216/48/23
|
||||
f 216/48/24 48/47/24 50/49/24 217/50/24
|
||||
f 217/50/25 50/49/25 52/51/25 218/52/25
|
||||
f 218/52/26 52/51/26 54/53/26 219/54/26
|
||||
f 219/54/27 54/53/27 56/55/27 220/56/27
|
||||
f 220/56/28 56/55/28 58/57/28 221/58/28
|
||||
f 221/58/29 58/57/29 60/59/29 222/60/29
|
||||
f 222/60/30 60/59/30 62/61/30 223/62/30
|
||||
f 4/3/31 2/2/31 64/63/31 62/61/31 60/59/31 58/57/31 56/55/31 54/53/31 52/51/31 50/49/31 48/47/31 46/45/31 44/43/31 42/41/31 40/39/31 38/37/31 36/35/31 34/33/31 32/31/31 30/29/31 28/27/31 26/25/31 24/23/31 22/21/31 20/19/31 18/17/31 16/15/31 14/13/31 12/11/31 10/9/31 8/7/31 6/5/31
|
||||
f 223/62/32 62/61/32 64/63/32 224/64/32
|
||||
f 224/64/33 64/63/33 2/2/33 193/1/33
|
||||
f 31/65/34 47/66/34 63/67/34
|
||||
f 63/68/35 96/69/35 65/70/35 1/71/35
|
||||
f 61/72/36 95/73/36 96/69/36 63/68/36
|
||||
f 59/74/37 94/75/37 95/73/37 61/72/37
|
||||
f 57/76/38 93/77/38 94/75/38 59/74/38
|
||||
f 55/78/39 92/79/39 93/77/39 57/76/39
|
||||
f 53/80/40 91/81/40 92/79/40 55/78/40
|
||||
f 51/82/41 90/83/41 91/81/41 53/80/41
|
||||
f 49/84/42 89/85/42 90/83/42 51/82/42
|
||||
f 47/86/43 88/87/43 89/88/43 49/89/43
|
||||
f 45/90/44 87/91/44 88/87/44 47/86/44
|
||||
f 43/92/45 86/93/45 87/91/45 45/90/45
|
||||
f 41/94/46 85/95/46 86/93/46 43/92/46
|
||||
f 39/96/47 84/97/47 85/95/47 41/94/47
|
||||
f 37/98/48 83/99/48 84/97/48 39/96/48
|
||||
f 35/100/49 82/101/49 83/99/49 37/98/49
|
||||
f 33/102/50 81/103/50 82/101/50 35/100/50
|
||||
f 31/104/51 80/105/51 81/106/51 33/107/51
|
||||
f 29/108/52 79/109/52 80/105/52 31/104/52
|
||||
f 27/110/53 78/111/53 79/109/53 29/108/53
|
||||
f 25/112/54 77/113/54 78/111/54 27/110/54
|
||||
f 23/114/55 76/115/55 77/113/55 25/112/55
|
||||
f 21/116/56 75/117/56 76/115/56 23/114/56
|
||||
f 19/118/57 74/119/57 75/117/57 21/116/57
|
||||
f 17/120/58 73/121/58 74/119/58 19/118/58
|
||||
f 15/122/59 72/123/59 73/124/59 17/125/59
|
||||
f 13/126/60 71/127/60 72/123/60 15/122/60
|
||||
f 11/128/61 70/129/61 71/127/61 13/126/61
|
||||
f 9/130/62 69/131/62 70/129/62 11/128/62
|
||||
f 7/132/63 68/133/63 69/131/63 9/130/63
|
||||
f 5/134/64 67/135/64 68/133/64 7/132/64
|
||||
f 3/136/65 66/137/65 67/135/65 5/134/65
|
||||
f 1/138/66 65/139/66 66/137/66 3/136/66
|
||||
f 96/69/35 128/140/35 97/141/35 65/70/35
|
||||
f 95/73/36 127/142/36 128/140/36 96/69/36
|
||||
f 94/75/37 126/143/37 127/142/37 95/73/37
|
||||
f 93/77/38 125/144/38 126/143/38 94/75/38
|
||||
f 92/79/39 124/145/39 125/144/39 93/77/39
|
||||
f 91/81/40 123/146/40 124/145/40 92/79/40
|
||||
f 90/83/41 122/147/41 123/146/41 91/81/41
|
||||
f 89/85/42 121/148/42 122/147/42 90/83/42
|
||||
f 88/87/43 120/149/43 121/150/43 89/88/43
|
||||
f 87/91/44 119/151/44 120/149/44 88/87/44
|
||||
f 86/93/45 118/152/45 119/151/45 87/91/45
|
||||
f 85/95/46 117/153/46 118/152/46 86/93/46
|
||||
f 84/97/47 116/154/47 117/153/47 85/95/47
|
||||
f 83/99/48 115/155/48 116/154/48 84/97/48
|
||||
f 82/101/49 114/156/49 115/155/49 83/99/49
|
||||
f 81/103/50 113/157/50 114/156/50 82/101/50
|
||||
f 80/105/51 112/158/51 113/159/51 81/106/51
|
||||
f 79/109/52 111/160/52 112/158/52 80/105/52
|
||||
f 78/111/53 110/161/53 111/160/53 79/109/53
|
||||
f 77/113/54 109/162/54 110/161/54 78/111/54
|
||||
f 76/115/55 108/163/55 109/162/55 77/113/55
|
||||
f 75/117/56 107/164/56 108/163/56 76/115/56
|
||||
f 74/119/57 106/165/57 107/164/57 75/117/57
|
||||
f 73/121/58 105/166/58 106/165/58 74/119/58
|
||||
f 72/123/59 104/167/59 105/168/59 73/124/59
|
||||
f 71/127/60 103/169/60 104/167/60 72/123/60
|
||||
f 70/129/61 102/170/61 103/169/61 71/127/61
|
||||
f 69/131/62 101/171/62 102/170/62 70/129/62
|
||||
f 68/133/63 100/172/63 101/171/63 69/131/63
|
||||
f 67/135/64 99/173/64 100/172/64 68/133/64
|
||||
f 66/137/65 98/174/65 99/173/65 67/135/65
|
||||
f 65/139/66 97/175/66 98/174/66 66/137/66
|
||||
f 128/140/67 160/176/67 129/177/67 97/141/67
|
||||
f 127/142/68 159/178/68 160/176/68 128/140/68
|
||||
f 126/143/69 158/179/69 159/178/69 127/142/69
|
||||
f 125/144/70 157/180/70 158/179/70 126/143/70
|
||||
f 124/145/71 156/181/71 157/180/71 125/144/71
|
||||
f 123/146/72 155/182/72 156/181/72 124/145/72
|
||||
f 122/147/73 154/183/73 155/182/73 123/146/73
|
||||
f 121/148/74 153/184/74 154/183/74 122/147/74
|
||||
f 120/149/75 152/185/75 153/186/75 121/150/75
|
||||
f 119/151/76 151/187/76 152/185/76 120/149/76
|
||||
f 118/152/77 150/188/77 151/187/77 119/151/77
|
||||
f 117/153/78 149/189/78 150/188/78 118/152/78
|
||||
f 116/154/79 148/190/79 149/189/79 117/153/79
|
||||
f 115/155/80 147/191/80 148/190/80 116/154/80
|
||||
f 114/156/81 146/192/81 147/191/81 115/155/81
|
||||
f 113/157/82 145/193/82 146/192/82 114/156/82
|
||||
f 112/158/83 144/194/83 145/195/83 113/159/83
|
||||
f 111/160/84 143/196/84 144/194/84 112/158/84
|
||||
f 110/161/85 142/197/85 143/196/85 111/160/85
|
||||
f 109/162/86 141/198/86 142/197/86 110/161/86
|
||||
f 108/163/87 140/199/87 141/198/87 109/162/87
|
||||
f 107/164/88 139/200/88 140/199/88 108/163/88
|
||||
f 106/165/89 138/201/89 139/200/89 107/164/89
|
||||
f 105/166/90 137/202/90 138/201/90 106/165/90
|
||||
f 104/167/91 136/203/91 137/204/91 105/168/91
|
||||
f 103/169/92 135/205/92 136/203/92 104/167/92
|
||||
f 102/170/93 134/206/93 135/205/93 103/169/93
|
||||
f 101/171/94 133/207/94 134/206/94 102/170/94
|
||||
f 100/172/95 132/208/95 133/207/95 101/171/95
|
||||
f 99/173/96 131/209/96 132/208/96 100/172/96
|
||||
f 98/174/97 130/210/97 131/209/97 99/173/97
|
||||
f 97/175/98 129/211/98 130/210/98 98/174/98
|
||||
f 160/176/99 192/212/99 161/213/99 129/177/99
|
||||
f 159/178/100 191/214/100 192/212/100 160/176/100
|
||||
f 158/179/101 190/215/101 191/214/101 159/178/101
|
||||
f 157/180/102 189/216/102 190/215/102 158/179/102
|
||||
f 156/181/103 188/217/103 189/216/103 157/180/103
|
||||
f 155/182/104 187/218/104 188/217/104 156/181/104
|
||||
f 154/183/105 186/219/105 187/218/105 155/182/105
|
||||
f 153/184/106 185/220/106 186/219/106 154/183/106
|
||||
f 152/185/107 184/221/107 185/222/107 153/186/107
|
||||
f 151/187/108 183/223/108 184/221/108 152/185/108
|
||||
f 150/188/109 182/224/109 183/223/109 151/187/109
|
||||
f 149/189/110 181/225/110 182/224/110 150/188/110
|
||||
f 148/190/111 180/226/111 181/225/111 149/189/111
|
||||
f 147/191/112 179/227/112 180/226/112 148/190/112
|
||||
f 146/192/113 178/228/113 179/227/113 147/191/113
|
||||
f 145/193/114 177/229/114 178/228/114 146/192/114
|
||||
f 144/194/115 176/230/115 177/231/115 145/195/115
|
||||
f 143/196/116 175/232/116 176/230/116 144/194/116
|
||||
f 142/197/117 174/233/117 175/232/117 143/196/117
|
||||
f 141/198/118 173/234/118 174/233/118 142/197/118
|
||||
f 140/199/119 172/235/119 173/234/119 141/198/119
|
||||
f 139/200/120 171/236/120 172/235/120 140/199/120
|
||||
f 138/201/121 170/237/121 171/236/121 139/200/121
|
||||
f 137/202/122 169/238/122 170/237/122 138/201/122
|
||||
f 136/203/123 168/239/123 169/240/123 137/204/123
|
||||
f 135/205/124 167/241/124 168/239/124 136/203/124
|
||||
f 134/206/125 166/242/125 167/241/125 135/205/125
|
||||
f 133/207/126 165/243/126 166/242/126 134/206/126
|
||||
f 132/208/127 164/244/127 165/243/127 133/207/127
|
||||
f 131/209/128 163/245/128 164/244/128 132/208/128
|
||||
f 130/210/129 162/246/129 163/245/129 131/209/129
|
||||
f 129/211/130 161/247/130 162/246/130 130/210/130
|
||||
f 192/248/131 224/64/131 193/1/131 161/249/131
|
||||
f 191/250/132 223/62/132 224/64/132 192/248/132
|
||||
f 190/251/133 222/60/133 223/62/133 191/250/133
|
||||
f 189/252/134 221/58/134 222/60/134 190/251/134
|
||||
f 188/253/135 220/56/135 221/58/135 189/252/135
|
||||
f 187/254/136 219/54/136 220/56/136 188/253/136
|
||||
f 186/255/137 218/52/137 219/54/137 187/254/137
|
||||
f 185/256/138 217/50/138 218/52/138 186/255/138
|
||||
f 184/257/139 216/48/139 217/50/139 185/256/139
|
||||
f 183/258/140 215/46/140 216/48/140 184/257/140
|
||||
f 182/259/141 214/44/141 215/46/141 183/258/141
|
||||
f 181/260/142 213/42/142 214/44/142 182/259/142
|
||||
f 180/261/143 212/40/143 213/42/143 181/260/143
|
||||
f 179/262/144 211/38/144 212/40/144 180/261/144
|
||||
f 178/263/145 210/36/145 211/38/145 179/262/145
|
||||
f 177/264/146 209/34/146 210/36/146 178/263/146
|
||||
f 176/265/147 208/32/147 209/34/147 177/264/147
|
||||
f 175/266/148 207/30/148 208/32/148 176/265/148
|
||||
f 174/267/149 206/28/149 207/30/149 175/266/149
|
||||
f 173/268/150 205/26/150 206/28/150 174/267/150
|
||||
f 172/269/151 204/24/151 205/26/151 173/268/151
|
||||
f 171/270/152 203/22/152 204/24/152 172/269/152
|
||||
f 170/271/153 202/20/153 203/22/153 171/270/153
|
||||
f 169/272/154 201/18/154 202/20/154 170/271/154
|
||||
f 168/273/155 200/16/155 201/18/155 169/272/155
|
||||
f 167/274/156 199/14/156 200/16/156 168/273/156
|
||||
f 166/275/157 198/12/157 199/14/157 167/274/157
|
||||
f 165/276/158 197/10/158 198/12/158 166/275/158
|
||||
f 164/277/159 196/8/159 197/10/159 165/276/159
|
||||
f 163/278/160 195/6/160 196/8/160 164/277/160
|
||||
f 162/279/161 194/4/161 195/6/161 163/278/161
|
||||
f 161/249/162 193/1/162 194/4/162 162/279/162
|
||||
f 63/280/163 1/281/163 3/282/163
|
||||
f 3/283/164 5/284/164 7/285/164
|
||||
f 7/286/165 9/287/165 11/288/165
|
||||
f 11/289/166 13/290/166 15/291/166
|
||||
f 15/292/167 17/293/167 19/294/167
|
||||
f 19/295/168 21/296/168 23/297/168
|
||||
f 23/298/169 25/299/169 27/300/169
|
||||
f 27/301/170 29/302/170 31/303/170
|
||||
f 31/304/171 33/305/171 35/306/171
|
||||
f 35/307/172 37/308/172 39/309/172
|
||||
f 39/310/173 41/311/173 43/312/173
|
||||
f 43/313/174 45/314/174 47/315/174
|
||||
f 47/316/175 49/317/175 51/318/175
|
||||
f 51/319/176 53/320/176 55/321/176
|
||||
f 55/322/177 57/323/177 59/324/177
|
||||
f 59/325/178 61/326/178 63/327/178
|
||||
f 63/67/34 3/328/34 15/329/34
|
||||
f 3/328/34 7/330/34 15/329/34
|
||||
f 7/330/34 11/331/34 15/329/34
|
||||
f 15/329/34 19/332/34 31/65/34
|
||||
f 19/332/34 23/333/34 31/65/34
|
||||
f 23/333/34 27/334/34 31/65/34
|
||||
f 31/65/34 35/335/34 47/66/34
|
||||
f 35/335/34 39/336/34 47/66/34
|
||||
f 39/336/34 43/337/34 47/66/34
|
||||
f 47/66/34 51/338/34 63/67/34
|
||||
f 51/338/34 55/339/34 63/67/34
|
||||
f 55/339/34 59/340/34 63/67/34
|
||||
f 63/67/34 15/329/34 31/65/34
|
BIN
tgtk/massshoot/massshoot/actors/ghost/ghost.png
Normal file
After Width: | Height: | Size: 29 KiB |
1
tgtk/massshoot/massshoot/actors/ghost/log.txt
Normal file
@ -0,0 +1 @@
|
||||
"[2024-02-28 22:05:23] Info : MODEL: [massshoot/actors/ghost/ghost.obj] OBJ data loaded successfully: 1 meshes/1 materials"
|
21
tgtk/massshoot/massshoot/firstmap.txt
Normal file
@ -0,0 +1,21 @@
|
||||
Thank you for playing MassShoot!
|
||||
|
||||
So uh... you aren't REALLY supposed to read this file but uh... fuck it, might as well.
|
||||
|
||||
The way the engine's first map is loaded is by reading the last line of this file. That way, we can hide stuff inside of it.
|
||||
|
||||
The creepiest part of the engine is when I ironically created a shrine to Neil Cicierega but the engine didn't want to load any
|
||||
map OTHER THAN the shrine.
|
||||
|
||||
Anyways, @ me on Twitter (@safariminer) and I may or may not send something funny.
|
||||
|
||||
Peace,
|
||||
- Safari <3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ps: the first map is
|
||||
tvstation
|
BIN
tgtk/massshoot/massshoot/fonts/small.ttf
Normal file
BIN
tgtk/massshoot/massshoot/fonts/text.ttf
Normal file
BIN
tgtk/massshoot/massshoot/fonts/title.ttf
Normal file
2
tgtk/massshoot/massshoot/fontscredits.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Highway Gothic. And VCR OSD Mono.
|
||||
Console: https://github.com/slavfox/Cozette
|
1
tgtk/massshoot/massshoot/maps/background/map.txt
Normal file
@ -0,0 +1 @@
|
||||
-500 -1 -500 500 0 500 grassmega
|
@ -0,0 +1,3 @@
|
||||
shader: bloom
|
||||
title: ""
|
||||
subtitle: ""
|
1
tgtk/massshoot/massshoot/maps/background/skybox.txt
Normal file
@ -0,0 +1 @@
|
||||
massshoot/textures/skybox2.png
|
9
tgtk/massshoot/massshoot/maps/background/textures.txt
Normal file
@ -0,0 +1,9 @@
|
||||
grass massshoot/textures/grass.png
|
||||
grassmega massshoot/textures/grassmega.png
|
||||
concrete massshoot/textures/concrete.png
|
||||
tiles massshoot/textures/tiles.png
|
||||
wood massshoot/textures/wood.png
|
||||
wood2 massshoot/textures/wood2.png
|
||||
inftower_building massshoot/textures/inftower_building.png
|
||||
inftower_sign massshoot/textures/inftower_sign.png
|
||||
funeralhome_sign massshoot/textures/funeralhome_sign.png
|
1
tgtk/massshoot/massshoot/maps/background/title.txt
Normal file
@ -0,0 +1 @@
|
||||
|
85
tgtk/massshoot/massshoot/maps/tvstation/billboards.txt
Normal file
@ -0,0 +1,85 @@
|
||||
-100 5 -100 tree
|
||||
-90 5 -100 tree
|
||||
-80 5 -100 tree
|
||||
-70 5 -100 tree
|
||||
-60 5 -100 tree
|
||||
-50 5 -100 tree
|
||||
-40 5 -100 tree
|
||||
-30 5 -100 tree
|
||||
-20 5 -100 tree
|
||||
-10 5 -100 tree
|
||||
0 5 -100 tree
|
||||
100 5 -100 tree
|
||||
90 5 -100 tree
|
||||
80 5 -100 tree
|
||||
70 5 -100 tree
|
||||
60 5 -100 tree
|
||||
50 5 -100 tree
|
||||
40 5 -100 tree
|
||||
30 5 -100 tree
|
||||
20 5 -100 tree
|
||||
10 5 -100 tree
|
||||
-100 5 100 tree
|
||||
-90 5 100 tree
|
||||
-80 5 100 tree
|
||||
-70 5 100 tree
|
||||
-60 5 100 tree
|
||||
-50 5 100 tree
|
||||
-40 5 100 tree
|
||||
-30 5 100 tree
|
||||
-20 5 100 tree
|
||||
-10 5 100 tree
|
||||
0 5 100 tree
|
||||
100 5 100 tree
|
||||
90 5 100 tree
|
||||
80 5 100 tree
|
||||
70 5 100 tree
|
||||
60 5 100 tree
|
||||
50 5 100 tree
|
||||
40 5 100 tree
|
||||
30 5 100 tree
|
||||
20 5 100 tree
|
||||
10 5 100 tree
|
||||
-100 5 -100 tree
|
||||
-100 5 -90 tree
|
||||
-100 5 -80 tree
|
||||
-100 5 -70 tree
|
||||
-100 5 -60 tree
|
||||
-100 5 -50 tree
|
||||
-100 5 -40 tree
|
||||
-100 5 -30 tree
|
||||
-100 5 -20 tree
|
||||
-100 5 -10 tree
|
||||
0 5 -100 tree
|
||||
-100 5 100 tree
|
||||
-100 5 90 tree
|
||||
-100 5 80 tree
|
||||
-100 5 70 tree
|
||||
-100 5 60 tree
|
||||
-100 5 50 tree
|
||||
-100 5 40 tree
|
||||
-100 5 30 tree
|
||||
-100 5 20 tree
|
||||
-100 5 10 tree
|
||||
100 5 -100 tree
|
||||
100 5 -90 tree
|
||||
100 5 -80 tree
|
||||
100 5 -70 tree
|
||||
100 5 -60 tree
|
||||
100 5 -50 tree
|
||||
100 5 -40 tree
|
||||
100 5 -30 tree
|
||||
100 5 -20 tree
|
||||
100 5 -10 tree
|
||||
-100 5 0 tree
|
||||
100 5 100 tree
|
||||
100 5 90 tree
|
||||
100 5 80 tree
|
||||
100 5 70 tree
|
||||
100 5 60 tree
|
||||
100 5 50 tree
|
||||
100 5 40 tree
|
||||
100 5 30 tree
|
||||
100 5 20 tree
|
||||
100 5 10 tree
|
||||
100 5 0 tree
|
43
tgtk/massshoot/massshoot/maps/tvstation/map.txt
Normal file
@ -0,0 +1,43 @@
|
||||
0 -1 0 100 0 100 grass
|
||||
-100 -1 -100 0 0 0 grass
|
||||
-100 -1 0 0 0 100 grass
|
||||
0 -1 -100 100 0 0 grass
|
||||
|
||||
35 0 -13 52.5 10 -12 brick
|
||||
52.5 0 -13 70 10 -12 brick
|
||||
35 0 -50 52.5 10 -49 brick
|
||||
52.5 0 -50 70 10 -49 brick
|
||||
17.5 0 -50 35 10 -49 brick
|
||||
70 0 -50 72 10 -31 brick
|
||||
70 0 -31 72 10 -12 brick
|
||||
15.5 0 -50 17.5 10 -31 brick
|
||||
15.5 0 -31 17.5 10 -12 brick
|
||||
17.5 0 -13 29 10 -12 brick
|
||||
|
||||
13.5 10 -52 74 11 -10 metal
|
||||
66 2.2 -41 70 2.4 -39 metal
|
||||
|
||||
17.5 0 -49 30 2 -43 wood
|
||||
66 2 -48 70 2.2 -39 wood
|
||||
|
||||
21 0 -48.5 29.5 2.5 -43.5 red
|
||||
|
||||
18 0 -48.5 21 3.2 -43.5 white
|
||||
|
||||
68 2.2 -47 69 4.2 -45 plastic1
|
||||
|
||||
67.9 2.4 -46.8 68 4 -45.2 computer
|
||||
|
||||
66.8 2.4 -46.8 67.6 2.6 -45.2 plastic2
|
||||
|
||||
65.99 2.2 -41 66 2.4 -39 decoder
|
||||
|
||||
95 0 -95 96 10 95 invis
|
||||
-96 0 -95 -95 10 95 invis
|
||||
-95 0 95 95 10 96 invis
|
||||
-95 0 -96 95 10 -95 invis
|
||||
|
||||
105 -90 -105 106 15 105 moss
|
||||
-106 -90 -105 -105 15 105 moss
|
||||
-105 -90 105 105 15 106 moss
|
||||
-105 -90 -106 105 15 -105 moss
|
1
tgtk/massshoot/massshoot/maps/tvstation/skybox.txt
Normal file
@ -0,0 +1 @@
|
||||
massshoot/textures/skybox2.png
|
1
tgtk/massshoot/massshoot/maps/tvstation/sprites.txt
Normal file
@ -0,0 +1 @@
|
||||
tree massshoot/sprites/tree.png
|
12
tgtk/massshoot/massshoot/maps/tvstation/textures.txt
Normal file
@ -0,0 +1,12 @@
|
||||
grass massshoot/textures/photos/grass.png
|
||||
brick massshoot/textures/brick.png
|
||||
metal massshoot/textures/metal.png
|
||||
wood massshoot/textures/wood.png
|
||||
white massshoot/textures/white.png
|
||||
red massshoot/textures/red.png
|
||||
plastic1 massshoot/textures/plastic1.png
|
||||
plastic2 massshoot/textures/plastic2.png
|
||||
decoder massshoot/textures/decoder.png
|
||||
computer massshoot/textures/computer.png
|
||||
moss massshoot/textures/moss.png
|
||||
invis massshoot/textures/invis.png
|
2
tgtk/massshoot/massshoot/maps/tvstation/title.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Good luck.
|
||||
You'll need it.
|
BIN
tgtk/massshoot/massshoot/menus/diary.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
tgtk/massshoot/massshoot/menus/diary2.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
tgtk/massshoot/massshoot/menus/diary3.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
tgtk/massshoot/massshoot/menus/emptydiary.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
tgtk/massshoot/massshoot/menus/logo.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
tgtk/massshoot/massshoot/menus/startup.pdn
Normal file
BIN
tgtk/massshoot/massshoot/menus/startup.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
tgtk/massshoot/massshoot/menus/townlocator.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
tgtk/massshoot/massshoot/menus/unwindowed.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
tgtk/massshoot/massshoot/menus/windowed.png
Normal file
After Width: | Height: | Size: 174 B |
1
tgtk/massshoot/massshoot/modelscredits.txt
Normal file
@ -0,0 +1 @@
|
||||
https://opengameart.org/content/submachine-gun-scorpion-inspired
|