clean examples
|
@ -4,11 +4,11 @@
|
|||
[submodule "thirdparty/raylib"]
|
||||
path = thirdparty/raylib
|
||||
url = https://github.com/raysan5/raylib.git
|
||||
branch = tags/4.5.0
|
||||
branch = main
|
||||
[submodule "thirdparty/raygui"]
|
||||
path = thirdparty/raygui
|
||||
url = https://github.com/raysan5/raygui.git
|
||||
branch = tags/3.6
|
||||
branch = main
|
||||
[submodule "thirdparty/lightmapper"]
|
||||
path = thirdparty/lightmapper
|
||||
url = https://github.com/ands/lightmapper.git
|
||||
|
|
|
@ -1419,9 +1419,9 @@ declare function matrixScale(x: number, y: number, z: number): Matrix;
|
|||
declare function matrixFrustum(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix;
|
||||
/** Get perspective projection matrix
|
||||
NOTE: Fovy angle must be provided in radians */
|
||||
declare function matrixPerspective(fovy: number, aspect: number, near: number, far: number): Matrix;
|
||||
declare function matrixPerspective(fovY: number, aspect: number, nearPlane: number, farPlane: number): Matrix;
|
||||
/** Get orthographic projection matrix */
|
||||
declare function matrixOrtho(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix;
|
||||
declare function matrixOrtho(left: number, right: number, bottom: number, top: number, nearPlane: number, farPlane: number): Matrix;
|
||||
/** Get camera look-at matrix (view matrix) */
|
||||
declare function matrixLookAt(eye: Vector3, target: Vector3, up: Vector3): Matrix;
|
||||
/** Add two quaternions */
|
||||
|
|
|
@ -41,8 +41,8 @@ const model = loadModelFromMesh(genMeshPlane(100.0, 100.0, 3, 3));
|
|||
//const cube = loadModelFromMesh(genMeshCube(2.0, 4.0, 2.0));
|
||||
const cube = loadModel("resources/models/icosphere.glb")
|
||||
|
||||
const g1 = genImageGradientH(128, 1, YELLOW, DARKBLUE)
|
||||
const g2 = genImageGradientH(128, 1, DARKBLUE, PURPLE)
|
||||
const g1 = genImageGradientLinear(128, 1, 90, YELLOW, DARKBLUE)
|
||||
const g2 = genImageGradientLinear(128, 1, 90, DARKBLUE, PURPLE)
|
||||
const image= genImageColor(256,1,WHITE)
|
||||
const src = new Rectangle(0,0,128,1)
|
||||
imageDraw(image,g1,src,src,WHITE)
|
||||
|
@ -68,7 +68,7 @@ setShaderValue(shader, ambientLoc, new Vector4(0.1, 0.1, 0.1, 1.0), SHADER_UNIFO
|
|||
// Assign out lighting shader to model
|
||||
const matModel = loadMaterialDefault()
|
||||
matModel.shader = shader
|
||||
setModelMaterial(floor, 0, matModel)
|
||||
setModelMaterial(model, 0, matModel)
|
||||
setMaterialTexture(matModel, MATERIAL_MAP_DIFFUSE, texture)
|
||||
const matCube = loadMaterialDefault()
|
||||
matCube.shader = shader
|
||||
|
@ -107,7 +107,7 @@ while (!windowShouldClose()) // Detect window close button or ESC key
|
|||
clearBackground(RAYWHITE);
|
||||
beginMode3D(camera);
|
||||
|
||||
drawModel(floor, vector3Zero(), 1.0, WHITE);
|
||||
drawModel(model, vector3Zero(), 1.0, WHITE);
|
||||
drawModel(cube, new Vector3(0,1,0), 1.0, WHITE);
|
||||
|
||||
if (light.enabled) drawSphereEx(light.position, 0.2, 8, 8, light.color);
|
||||
|
|
|
@ -1,129 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Apply a postprocessing shader and connect a custom uniform variable
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test this example
|
||||
* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders
|
||||
* raylib comes with shaders ready for both versions, check raylib/shaders install folder
|
||||
*
|
||||
* Example originally created with raylib 1.3, last time updated with raylib 4.0
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
SetConfigFlags(FLAG_MSAA_4X_HINT); // Enable Multi Sampling Anti Aliasing 4x (if available)
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - custom uniform variable");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ 8.0f, 8.0f, 8.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 1.5f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Model model = LoadModel("resources/models/barracks.obj"); // Load OBJ model
|
||||
Texture2D texture = LoadTexture("resources/models/barracks_diffuse.png"); // Load model texture (diffuse map)
|
||||
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set model diffuse texture
|
||||
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
||||
// Load postprocessing shader
|
||||
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/swirl.fs", GLSL_VERSION));
|
||||
|
||||
// Get variable (uniform) location on the shader to connect with the program
|
||||
// NOTE: If uniform variable could not be found in the shader, function returns -1
|
||||
int swirlCenterLoc = GetShaderLocation(shader, "center");
|
||||
|
||||
float swirlCenter[2] = { (float)screenWidth/2, (float)screenHeight/2 };
|
||||
|
||||
// Create a RenderTexture2D to be used for render to texture
|
||||
RenderTexture2D target = LoadRenderTexture(screenWidth, screenHeight);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||
|
||||
Vector2 mousePosition = GetMousePosition();
|
||||
|
||||
swirlCenter[0] = mousePosition.x;
|
||||
swirlCenter[1] = screenHeight - mousePosition.y;
|
||||
|
||||
// Send new value to the shader to be used on drawing
|
||||
SetShaderValue(shader, swirlCenterLoc, swirlCenter, SHADER_UNIFORM_VEC2);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginTextureMode(target); // Enable drawing to texture
|
||||
ClearBackground(RAYWHITE); // Clear texture background
|
||||
|
||||
BeginMode3D(camera); // Begin 3d mode drawing
|
||||
DrawModel(model, position, 0.5f, WHITE); // Draw 3d model with texture
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
EndMode3D(); // End 3d mode drawing, returns to orthographic 2d mode
|
||||
|
||||
DrawText("TEXT DRAWN IN RENDER TEXTURE", 200, 10, 30, RED);
|
||||
EndTextureMode(); // End drawing to texture (now we have a texture available for next passes)
|
||||
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE); // Clear screen background
|
||||
|
||||
// Enable shader using the custom uniform
|
||||
BeginShaderMode(shader);
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
// Draw some 2d text over drawn texture
|
||||
DrawText("(c) Barracks 3D model by Alberto Cano", screenWidth - 220, screenHeight - 20, 10, GRAY);
|
||||
DrawFPS(10, 10);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
UnloadTexture(texture); // Unload texture
|
||||
UnloadModel(model); // Unload model
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Sieve of Eratosthenes
|
||||
*
|
||||
* NOTE: Sieve of Eratosthenes, the earliest known (ancient Greek) prime number sieve.
|
||||
*
|
||||
* "Sift the twos and sift the threes,
|
||||
* The Sieve of Eratosthenes.
|
||||
* When the multiples sublime,
|
||||
* the numbers that are left are prime."
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3).
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 4.0
|
||||
*
|
||||
* Example contributed by ProfJski and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2023 ProfJski and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - Sieve of Eratosthenes");
|
||||
|
||||
RenderTexture2D target = LoadRenderTexture(screenWidth, screenHeight);
|
||||
|
||||
// Load Eratosthenes shader
|
||||
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/eratosthenes.fs", GLSL_VERSION));
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// Nothing to do here, everything is happening in the shader
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginTextureMode(target); // Enable drawing to texture
|
||||
ClearBackground(BLACK); // Clear the render texture
|
||||
|
||||
// Draw a rectangle in shader mode to be used as shader canvas
|
||||
// NOTE: Rectangle uses font white character texture coordinates,
|
||||
// so shader can not be applied here directly because input vertexTexCoord
|
||||
// do not represent full screen coordinates (space where want to apply shader)
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
EndTextureMode(); // End drawing to texture (now we have a blank texture available for the shader)
|
||||
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE); // Clear screen background
|
||||
|
||||
BeginShaderMode(shader);
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE);
|
||||
EndShaderMode();
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - fog
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3).
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 3.7
|
||||
*
|
||||
* Example contributed by Chris Camacho (@chriscamacho) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2023 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include "raymath.h"
|
||||
|
||||
#define RLIGHTS_IMPLEMENTATION
|
||||
#include "rlights.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
SetConfigFlags(FLAG_MSAA_4X_HINT); // Enable Multi Sampling Anti Aliasing 4x (if available)
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - fog");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ 2.0f, 2.0f, 6.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 0.5f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
// Load models and texture
|
||||
Model modelA = LoadModelFromMesh(GenMeshTorus(0.4f, 1.0f, 16, 32));
|
||||
Model modelB = LoadModelFromMesh(GenMeshCube(1.0f, 1.0f, 1.0f));
|
||||
Model modelC = LoadModelFromMesh(GenMeshSphere(0.5f, 32, 32));
|
||||
Texture texture = LoadTexture("resources/texel_checker.png");
|
||||
|
||||
// Assign texture to default model material
|
||||
modelA.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture;
|
||||
modelB.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture;
|
||||
modelC.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture;
|
||||
|
||||
// Load shader and set up some uniforms
|
||||
Shader shader = LoadShader(TextFormat("resources/shaders/glsl%i/lighting.vs", GLSL_VERSION),
|
||||
TextFormat("resources/shaders/glsl%i/fog.fs", GLSL_VERSION));
|
||||
shader.locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocation(shader, "matModel");
|
||||
shader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos");
|
||||
|
||||
// Ambient light level
|
||||
int ambientLoc = GetShaderLocation(shader, "ambient");
|
||||
SetShaderValue(shader, ambientLoc, (float[4]){ 0.2f, 0.2f, 0.2f, 1.0f }, SHADER_UNIFORM_VEC4);
|
||||
|
||||
float fogDensity = 0.15f;
|
||||
int fogDensityLoc = GetShaderLocation(shader, "fogDensity");
|
||||
SetShaderValue(shader, fogDensityLoc, &fogDensity, SHADER_UNIFORM_FLOAT);
|
||||
|
||||
// NOTE: All models share the same shader
|
||||
modelA.materials[0].shader = shader;
|
||||
modelB.materials[0].shader = shader;
|
||||
modelC.materials[0].shader = shader;
|
||||
|
||||
// Using just 1 point lights
|
||||
CreateLight(LIGHT_POINT, (Vector3){ 0, 2, 6 }, Vector3Zero(), WHITE, shader);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||
|
||||
if (IsKeyDown(KEY_UP))
|
||||
{
|
||||
fogDensity += 0.001f;
|
||||
if (fogDensity > 1.0f) fogDensity = 1.0f;
|
||||
}
|
||||
|
||||
if (IsKeyDown(KEY_DOWN))
|
||||
{
|
||||
fogDensity -= 0.001f;
|
||||
if (fogDensity < 0.0f) fogDensity = 0.0f;
|
||||
}
|
||||
|
||||
SetShaderValue(shader, fogDensityLoc, &fogDensity, SHADER_UNIFORM_FLOAT);
|
||||
|
||||
// Rotate the torus
|
||||
modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateX(-0.025f));
|
||||
modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateZ(0.012f));
|
||||
|
||||
// Update the light shader with the camera view position
|
||||
SetShaderValue(shader, shader.locs[SHADER_LOC_VECTOR_VIEW], &camera.position.x, SHADER_UNIFORM_VEC3);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(GRAY);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
// Draw the three models
|
||||
DrawModel(modelA, Vector3Zero(), 1.0f, WHITE);
|
||||
DrawModel(modelB, (Vector3){ -2.6f, 0, 0 }, 1.0f, WHITE);
|
||||
DrawModel(modelC, (Vector3){ 2.6f, 0, 0 }, 1.0f, WHITE);
|
||||
|
||||
for (int i = -20; i < 20; i += 2) DrawModel(modelA,(Vector3){ (float)i, 0, 2 }, 1.0f, WHITE);
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText(TextFormat("Use KEY_UP/KEY_DOWN to change fog density [%.2f]", fogDensity), 10, 10, 20, RAYWHITE);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadModel(modelA); // Unload the model A
|
||||
UnloadModel(modelB); // Unload the model B
|
||||
UnloadModel(modelC); // Unload the model C
|
||||
UnloadTexture(texture); // Unload the texture
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,135 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Hot reloading
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 for shaders support and only #version 330
|
||||
* is currently supported. OpenGL ES 2.0 platforms are not supported at the moment.
|
||||
*
|
||||
* Example originally created with raylib 3.0, last time updated with raylib 3.5
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2020-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "rlgl.h"
|
||||
|
||||
#include <time.h> // Required for: localtime(), asctime()
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - hot reloading");
|
||||
|
||||
const char *fragShaderFileName = "resources/shaders/glsl%i/reload.fs";
|
||||
time_t fragShaderFileModTime = GetFileModTime(TextFormat(fragShaderFileName, GLSL_VERSION));
|
||||
|
||||
// Load raymarching shader
|
||||
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
Shader shader = LoadShader(0, TextFormat(fragShaderFileName, GLSL_VERSION));
|
||||
|
||||
// Get shader locations for required uniforms
|
||||
int resolutionLoc = GetShaderLocation(shader, "resolution");
|
||||
int mouseLoc = GetShaderLocation(shader, "mouse");
|
||||
int timeLoc = GetShaderLocation(shader, "time");
|
||||
|
||||
float resolution[2] = { (float)screenWidth, (float)screenHeight };
|
||||
SetShaderValue(shader, resolutionLoc, resolution, SHADER_UNIFORM_VEC2);
|
||||
|
||||
float totalTime = 0.0f;
|
||||
bool shaderAutoReloading = false;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
totalTime += GetFrameTime();
|
||||
Vector2 mouse = GetMousePosition();
|
||||
float mousePos[2] = { mouse.x, mouse.y };
|
||||
|
||||
// Set shader required uniform values
|
||||
SetShaderValue(shader, timeLoc, &totalTime, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, mouseLoc, mousePos, SHADER_UNIFORM_VEC2);
|
||||
|
||||
// Hot shader reloading
|
||||
if (shaderAutoReloading || (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)))
|
||||
{
|
||||
long currentFragShaderModTime = GetFileModTime(TextFormat(fragShaderFileName, GLSL_VERSION));
|
||||
|
||||
// Check if shader file has been modified
|
||||
if (currentFragShaderModTime != fragShaderFileModTime)
|
||||
{
|
||||
// Try reloading updated shader
|
||||
Shader updatedShader = LoadShader(0, TextFormat(fragShaderFileName, GLSL_VERSION));
|
||||
|
||||
if (updatedShader.id != rlGetShaderIdDefault()) // It was correctly loaded
|
||||
{
|
||||
UnloadShader(shader);
|
||||
shader = updatedShader;
|
||||
|
||||
// Get shader locations for required uniforms
|
||||
resolutionLoc = GetShaderLocation(shader, "resolution");
|
||||
mouseLoc = GetShaderLocation(shader, "mouse");
|
||||
timeLoc = GetShaderLocation(shader, "time");
|
||||
|
||||
// Reset required uniforms
|
||||
SetShaderValue(shader, resolutionLoc, resolution, SHADER_UNIFORM_VEC2);
|
||||
}
|
||||
|
||||
fragShaderFileModTime = currentFragShaderModTime;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_A)) shaderAutoReloading = !shaderAutoReloading;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// We only draw a white full-screen rectangle, frame is generated in shader
|
||||
BeginShaderMode(shader);
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawText(TextFormat("PRESS [A] to TOGGLE SHADER AUTOLOADING: %s",
|
||||
shaderAutoReloading? "AUTO" : "MANUAL"), 10, 10, 10, shaderAutoReloading? RED : BLACK);
|
||||
if (!shaderAutoReloading) DrawText("MOUSE CLICK to SHADER RE-LOADING", 10, 30, 10, BLACK);
|
||||
|
||||
DrawText(TextFormat("Shader last modification: %s", asctime(localtime(&fragShaderFileModTime))), 10, 430, 10, BLACK);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,208 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Hybrid Rendering
|
||||
*
|
||||
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
||||
*
|
||||
* Example contributed by Buğra Alptekin Sarı (@BugraAlptekinSari) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2022-2023 Buğra Alptekin Sarı (@BugraAlptekinSari)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "rlgl.h"
|
||||
#include "math.h" // Used for tan()
|
||||
#include "raymath.h" // Used to calculate camera Direction
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Declare custom functions required for the example
|
||||
//------------------------------------------------------------------------------------
|
||||
// Load custom render texture, create a writable depth texture buffer
|
||||
static RenderTexture2D LoadRenderTextureDepthTex(int width, int height);
|
||||
// Unload render texture from GPU memory (VRAM)
|
||||
static void UnloadRenderTextureDepthTex(RenderTexture2D target);
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Declare custom Structs
|
||||
//------------------------------------------------------------------------------------
|
||||
|
||||
typedef struct {
|
||||
unsigned int camPos, camDir, screenCenter;
|
||||
}RayLocs ;
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - write depth buffer");
|
||||
|
||||
// This Shader calculates pixel depth and color using raymarch
|
||||
Shader shdrRaymarch = LoadShader(0, TextFormat("resources/shaders/glsl%i/hybrid_raymarch.fs", GLSL_VERSION));
|
||||
|
||||
// This Shader is a standard rasterization fragment shader with the addition of depth writing
|
||||
// You are required to write depth for all shaders if one shader does it
|
||||
Shader shdrRaster = LoadShader(0, TextFormat("resources/shaders/glsl%i/hybrid_raster.fs", GLSL_VERSION));
|
||||
|
||||
// Declare Struct used to store camera locs.
|
||||
RayLocs marchLocs = {0};
|
||||
|
||||
// Fill the struct with shader locs.
|
||||
marchLocs.camPos = GetShaderLocation(shdrRaymarch, "camPos");
|
||||
marchLocs.camDir = GetShaderLocation(shdrRaymarch, "camDir");
|
||||
marchLocs.screenCenter = GetShaderLocation(shdrRaymarch, "screenCenter");
|
||||
|
||||
// Transfer screenCenter position to shader. Which is used to calculate ray direction.
|
||||
Vector2 screenCenter = {.x = screenWidth/2.0, .y = screenHeight/2.0};
|
||||
SetShaderValue(shdrRaymarch, marchLocs.screenCenter , &screenCenter , SHADER_UNIFORM_VEC2);
|
||||
|
||||
// Use Customized function to create writable depth texture buffer
|
||||
RenderTexture2D target = LoadRenderTextureDepthTex(screenWidth, screenHeight);
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = {
|
||||
.position = (Vector3){ 0.5f, 1.0f, 1.5f }, // Camera position
|
||||
.target = (Vector3){ 0.0f, 0.5f, 0.0f }, // Camera looking at point
|
||||
.up = (Vector3){ 0.0f, 1.0f, 0.0f }, // Camera up vector (rotation towards target)
|
||||
.fovy = 45.0f, // Camera field-of-view Y
|
||||
.projection = CAMERA_PERSPECTIVE // Camera projection type
|
||||
};
|
||||
|
||||
// Camera FOV is pre-calculated in the camera Distance.
|
||||
double camDist = 1.0/(tan(camera.fovy*0.5*DEG2RAD));
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||
|
||||
// Update Camera Postion in the ray march shader.
|
||||
SetShaderValue(shdrRaymarch, marchLocs.camPos, &(camera.position), RL_SHADER_UNIFORM_VEC3);
|
||||
|
||||
// Update Camera Looking Vector. Vector length determines FOV.
|
||||
Vector3 camDir = Vector3Scale( Vector3Normalize( Vector3Subtract(camera.target, camera.position)) , camDist);
|
||||
SetShaderValue(shdrRaymarch, marchLocs.camDir, &(camDir), RL_SHADER_UNIFORM_VEC3);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
// Draw into our custom render texture (framebuffer)
|
||||
BeginTextureMode(target);
|
||||
ClearBackground(WHITE);
|
||||
|
||||
// Raymarch Scene
|
||||
rlEnableDepthTest(); //Manually enable Depth Test to handle multiple rendering methods.
|
||||
BeginShaderMode(shdrRaymarch);
|
||||
DrawRectangleRec((Rectangle){0,0,screenWidth,screenHeight},WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
// Raserize Scene
|
||||
BeginMode3D(camera);
|
||||
BeginShaderMode(shdrRaster);
|
||||
DrawCubeWiresV((Vector3){ 0.0f, 0.5f, 1.0f }, (Vector3){ 1.0f, 1.0f, 1.0f }, RED);
|
||||
DrawCubeV((Vector3){ 0.0f, 0.5f, 1.0f }, (Vector3){ 1.0f, 1.0f, 1.0f }, PURPLE);
|
||||
DrawCubeWiresV((Vector3){ 0.0f, 0.5f, -1.0f }, (Vector3){ 1.0f, 1.0f, 1.0f }, DARKGREEN);
|
||||
DrawCubeV((Vector3) { 0.0f, 0.5f, -1.0f }, (Vector3){ 1.0f, 1.0f, 1.0f }, YELLOW);
|
||||
DrawGrid(10, 1.0f);
|
||||
EndShaderMode();
|
||||
EndMode3D();
|
||||
EndTextureMode();
|
||||
|
||||
// Draw into screen our custom render texture
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawTextureRec(target.texture, (Rectangle) { 0, 0, screenWidth, -screenHeight }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawFPS(10, 10);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadRenderTextureDepthTex(target);
|
||||
UnloadShader(shdrRaymarch);
|
||||
UnloadShader(shdrRaster);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Define custom functions required for the example
|
||||
//------------------------------------------------------------------------------------
|
||||
// Load custom render texture, create a writable depth texture buffer
|
||||
RenderTexture2D LoadRenderTextureDepthTex(int width, int height)
|
||||
{
|
||||
RenderTexture2D target = { 0 };
|
||||
|
||||
target.id = rlLoadFramebuffer(width, height); // Load an empty framebuffer
|
||||
|
||||
if (target.id > 0)
|
||||
{
|
||||
rlEnableFramebuffer(target.id);
|
||||
|
||||
// Create color texture (default to RGBA)
|
||||
target.texture.id = rlLoadTexture(0, width, height, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, 1);
|
||||
target.texture.width = width;
|
||||
target.texture.height = height;
|
||||
target.texture.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
|
||||
target.texture.mipmaps = 1;
|
||||
|
||||
// Create depth texture buffer (instead of raylib default renderbuffer)
|
||||
target.depth.id = rlLoadTextureDepth(width, height, false);
|
||||
target.depth.width = width;
|
||||
target.depth.height = height;
|
||||
target.depth.format = 19; //DEPTH_COMPONENT_24BIT?
|
||||
target.depth.mipmaps = 1;
|
||||
|
||||
// Attach color texture and depth texture to FBO
|
||||
rlFramebufferAttach(target.id, target.texture.id, RL_ATTACHMENT_COLOR_CHANNEL0, RL_ATTACHMENT_TEXTURE2D, 0);
|
||||
rlFramebufferAttach(target.id, target.depth.id, RL_ATTACHMENT_DEPTH, RL_ATTACHMENT_TEXTURE2D, 0);
|
||||
|
||||
// Check if fbo is complete with attachments (valid)
|
||||
if (rlFramebufferComplete(target.id)) TRACELOG(LOG_INFO, "FBO: [ID %i] Framebuffer object created successfully", target.id);
|
||||
|
||||
rlDisableFramebuffer();
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "FBO: Framebuffer object can not be created");
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
// Unload render texture from GPU memory (VRAM)
|
||||
void UnloadRenderTextureDepthTex(RenderTexture2D target)
|
||||
{
|
||||
if (target.id > 0)
|
||||
{
|
||||
// Color texture attached to FBO is deleted
|
||||
rlUnloadTexture(target.texture.id);
|
||||
rlUnloadTexture(target.depth.id);
|
||||
|
||||
// NOTE: Depth texture is automatically
|
||||
// queried and deleted before deleting framebuffer
|
||||
rlUnloadFramebuffer(target.id);
|
||||
}
|
||||
}
|
|
@ -1,196 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Julia sets
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3).
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 4.0
|
||||
*
|
||||
* Example contributed by eggmund (@eggmund) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2023 eggmund (@eggmund) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
// A few good julia sets
|
||||
const float pointsOfInterest[6][2] =
|
||||
{
|
||||
{ -0.348827f, 0.607167f },
|
||||
{ -0.786268f, 0.169728f },
|
||||
{ -0.8f, 0.156f },
|
||||
{ 0.285f, 0.0f },
|
||||
{ -0.835f, -0.2321f },
|
||||
{ -0.70176f, -0.3842f },
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
//SetConfigFlags(FLAG_WINDOW_HIGHDPI);
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - julia sets");
|
||||
|
||||
// Load julia set shader
|
||||
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/julia_set.fs", GLSL_VERSION));
|
||||
|
||||
// Create a RenderTexture2D to be used for render to texture
|
||||
RenderTexture2D target = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
|
||||
|
||||
// c constant to use in z^2 + c
|
||||
float c[2] = { pointsOfInterest[0][0], pointsOfInterest[0][1] };
|
||||
|
||||
// Offset and zoom to draw the julia set at. (centered on screen and default size)
|
||||
float offset[2] = { -(float)GetScreenWidth()/2, -(float)GetScreenHeight()/2 };
|
||||
float zoom = 1.0f;
|
||||
|
||||
Vector2 offsetSpeed = { 0.0f, 0.0f };
|
||||
|
||||
// Get variable (uniform) locations on the shader to connect with the program
|
||||
// NOTE: If uniform variable could not be found in the shader, function returns -1
|
||||
int cLoc = GetShaderLocation(shader, "c");
|
||||
int zoomLoc = GetShaderLocation(shader, "zoom");
|
||||
int offsetLoc = GetShaderLocation(shader, "offset");
|
||||
|
||||
// Tell the shader what the screen dimensions, zoom, offset and c are
|
||||
float screenDims[2] = { (float)GetScreenWidth(), (float)GetScreenHeight() };
|
||||
SetShaderValue(shader, GetShaderLocation(shader, "screenDims"), screenDims, SHADER_UNIFORM_VEC2);
|
||||
|
||||
SetShaderValue(shader, cLoc, c, SHADER_UNIFORM_VEC2);
|
||||
SetShaderValue(shader, zoomLoc, &zoom, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, offsetLoc, offset, SHADER_UNIFORM_VEC2);
|
||||
|
||||
int incrementSpeed = 0; // Multiplier of speed to change c value
|
||||
bool showControls = true; // Show controls
|
||||
bool pause = false; // Pause animation
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// Press [1 - 6] to reset c to a point of interest
|
||||
if (IsKeyPressed(KEY_ONE) ||
|
||||
IsKeyPressed(KEY_TWO) ||
|
||||
IsKeyPressed(KEY_THREE) ||
|
||||
IsKeyPressed(KEY_FOUR) ||
|
||||
IsKeyPressed(KEY_FIVE) ||
|
||||
IsKeyPressed(KEY_SIX))
|
||||
{
|
||||
if (IsKeyPressed(KEY_ONE)) c[0] = pointsOfInterest[0][0], c[1] = pointsOfInterest[0][1];
|
||||
else if (IsKeyPressed(KEY_TWO)) c[0] = pointsOfInterest[1][0], c[1] = pointsOfInterest[1][1];
|
||||
else if (IsKeyPressed(KEY_THREE)) c[0] = pointsOfInterest[2][0], c[1] = pointsOfInterest[2][1];
|
||||
else if (IsKeyPressed(KEY_FOUR)) c[0] = pointsOfInterest[3][0], c[1] = pointsOfInterest[3][1];
|
||||
else if (IsKeyPressed(KEY_FIVE)) c[0] = pointsOfInterest[4][0], c[1] = pointsOfInterest[4][1];
|
||||
else if (IsKeyPressed(KEY_SIX)) c[0] = pointsOfInterest[5][0], c[1] = pointsOfInterest[5][1];
|
||||
|
||||
SetShaderValue(shader, cLoc, c, SHADER_UNIFORM_VEC2);
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_SPACE)) pause = !pause; // Pause animation (c change)
|
||||
if (IsKeyPressed(KEY_F1)) showControls = !showControls; // Toggle whether or not to show controls
|
||||
|
||||
if (!pause)
|
||||
{
|
||||
if (IsKeyPressed(KEY_RIGHT)) incrementSpeed++;
|
||||
else if (IsKeyPressed(KEY_LEFT)) incrementSpeed--;
|
||||
|
||||
// TODO: The idea is to zoom and move around with mouse
|
||||
// Probably offset movement should be proportional to zoom level
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT) || IsMouseButtonDown(MOUSE_BUTTON_RIGHT))
|
||||
{
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT)) zoom += zoom*0.003f;
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT)) zoom -= zoom*0.003f;
|
||||
|
||||
Vector2 mousePos = GetMousePosition();
|
||||
|
||||
offsetSpeed.x = mousePos.x -(float)screenWidth/2;
|
||||
offsetSpeed.y = mousePos.y -(float)screenHeight/2;
|
||||
|
||||
// Slowly move camera to targetOffset
|
||||
offset[0] += GetFrameTime()*offsetSpeed.x*0.8f;
|
||||
offset[1] += GetFrameTime()*offsetSpeed.y*0.8f;
|
||||
}
|
||||
else offsetSpeed = (Vector2){ 0.0f, 0.0f };
|
||||
|
||||
SetShaderValue(shader, zoomLoc, &zoom, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, offsetLoc, offset, SHADER_UNIFORM_VEC2);
|
||||
|
||||
// Increment c value with time
|
||||
float amount = GetFrameTime()*incrementSpeed*0.0005f;
|
||||
c[0] += amount;
|
||||
c[1] += amount;
|
||||
|
||||
SetShaderValue(shader, cLoc, c, SHADER_UNIFORM_VEC2);
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
// Using a render texture to draw Julia set
|
||||
BeginTextureMode(target); // Enable drawing to texture
|
||||
ClearBackground(BLACK); // Clear the render texture
|
||||
|
||||
// Draw a rectangle in shader mode to be used as shader canvas
|
||||
// NOTE: Rectangle uses font white character texture coordinates,
|
||||
// so shader can not be applied here directly because input vertexTexCoord
|
||||
// do not represent full screen coordinates (space where want to apply shader)
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
EndTextureMode();
|
||||
|
||||
BeginDrawing();
|
||||
ClearBackground(BLACK); // Clear screen background
|
||||
|
||||
// Draw the saved texture and rendered julia set with shader
|
||||
// NOTE: We do not invert texture on Y, already considered inside shader
|
||||
BeginShaderMode(shader);
|
||||
// WARNING: If FLAG_WINDOW_HIGHDPI is enabled, HighDPI monitor scaling should be considered
|
||||
// when rendering the RenderTexture2D to fit in the HighDPI scaled Window
|
||||
DrawTextureEx(target.texture, (Vector2){ 0.0f, 0.0f }, 0.0f, 1.0f, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
if (showControls)
|
||||
{
|
||||
DrawText("Press Mouse buttons right/left to zoom in/out and move", 10, 15, 10, RAYWHITE);
|
||||
DrawText("Press KEY_F1 to toggle these controls", 10, 30, 10, RAYWHITE);
|
||||
DrawText("Press KEYS [1 - 6] to change point of interest", 10, 45, 10, RAYWHITE);
|
||||
DrawText("Press KEY_LEFT | KEY_RIGHT to change speed", 10, 60, 10, RAYWHITE);
|
||||
DrawText("Press KEY_SPACE to pause movement animation", 10, 75, 10, RAYWHITE);
|
||||
}
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,147 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Mesh instancing
|
||||
*
|
||||
* Example originally created with raylib 3.7, last time updated with raylib 4.2
|
||||
*
|
||||
* Example contributed by @seanpringle and reviewed by Max (@moliad) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2020-2023 @seanpringle, Max (@moliad) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
|
||||
#include "raylib.h"
|
||||
#include "raymath.h"
|
||||
|
||||
#define RLIGHTS_IMPLEMENTATION
|
||||
#include "rlights.h"
|
||||
|
||||
#include <stdlib.h> // Required for: calloc(), free()
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
#define MAX_INSTANCES 10000
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - mesh instancing");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ -125.0f, 125.0f, -125.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
// Define mesh to be instanced
|
||||
Mesh cube = GenMeshCube(1.0f, 1.0f, 1.0f);
|
||||
|
||||
// Define transforms to be uploaded to GPU for instances
|
||||
Matrix *transforms = (Matrix *)RL_CALLOC(MAX_INSTANCES, sizeof(Matrix)); // Pre-multiplied transformations passed to rlgl
|
||||
|
||||
// Translate and rotate cubes randomly
|
||||
for (int i = 0; i < MAX_INSTANCES; i++)
|
||||
{
|
||||
Matrix translation = MatrixTranslate((float)GetRandomValue(-50, 50), (float)GetRandomValue(-50, 50), (float)GetRandomValue(-50, 50));
|
||||
Vector3 axis = Vector3Normalize((Vector3){ (float)GetRandomValue(0, 360), (float)GetRandomValue(0, 360), (float)GetRandomValue(0, 360) });
|
||||
float angle = (float)GetRandomValue(0, 10)*DEG2RAD;
|
||||
Matrix rotation = MatrixRotate(axis, angle);
|
||||
|
||||
transforms[i] = MatrixMultiply(rotation, translation);
|
||||
}
|
||||
|
||||
// Load lighting shader
|
||||
Shader shader = LoadShader(TextFormat("resources/shaders/glsl%i/lighting_instancing.vs", GLSL_VERSION),
|
||||
TextFormat("resources/shaders/glsl%i/lighting.fs", GLSL_VERSION));
|
||||
// Get shader locations
|
||||
shader.locs[SHADER_LOC_MATRIX_MVP] = GetShaderLocation(shader, "mvp");
|
||||
shader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos");
|
||||
shader.locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocationAttrib(shader, "instanceTransform");
|
||||
|
||||
// Set shader value: ambient light level
|
||||
int ambientLoc = GetShaderLocation(shader, "ambient");
|
||||
SetShaderValue(shader, ambientLoc, (float[4]){ 0.2f, 0.2f, 0.2f, 1.0f }, SHADER_UNIFORM_VEC4);
|
||||
|
||||
// Create one light
|
||||
CreateLight(LIGHT_DIRECTIONAL, (Vector3){ 50.0f, 50.0f, 0.0f }, Vector3Zero(), WHITE, shader);
|
||||
|
||||
// NOTE: We are assigning the intancing shader to material.shader
|
||||
// to be used on mesh drawing with DrawMeshInstanced()
|
||||
Material matInstances = LoadMaterialDefault();
|
||||
matInstances.shader = shader;
|
||||
matInstances.maps[MATERIAL_MAP_DIFFUSE].color = RED;
|
||||
|
||||
// Load default material (using raylib intenral default shader) for non-instanced mesh drawing
|
||||
// WARNING: Default shader enables vertex color attribute BUT GenMeshCube() does not generate vertex colors, so,
|
||||
// when drawing the color attribute is disabled and a default color value is provided as input for thevertex attribute
|
||||
Material matDefault = LoadMaterialDefault();
|
||||
matDefault.maps[MATERIAL_MAP_DIFFUSE].color = BLUE;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||
|
||||
// Update the light shader with the camera view position
|
||||
float cameraPos[3] = { camera.position.x, camera.position.y, camera.position.z };
|
||||
SetShaderValue(shader, shader.locs[SHADER_LOC_VECTOR_VIEW], cameraPos, SHADER_UNIFORM_VEC3);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
// Draw cube mesh with default material (BLUE)
|
||||
DrawMesh(cube, matDefault, MatrixTranslate(-10.0f, 0.0f, 0.0f));
|
||||
|
||||
// Draw meshes instanced using material containing instancing shader (RED + lighting),
|
||||
// transforms[] for the instances should be provided, they are dynamically
|
||||
// updated in GPU every frame, so we can animate the different mesh instances
|
||||
DrawMeshInstanced(cube, matInstances, transforms, MAX_INSTANCES);
|
||||
|
||||
// Draw cube mesh with default material (BLUE)
|
||||
DrawMesh(cube, matDefault, MatrixTranslate(10.0f, 0.0f, 0.0f));
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
RL_FREE(transforms); // Free transforms
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,107 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Model shader
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test this example
|
||||
* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders
|
||||
* raylib comes with shaders ready for both versions, check raylib/shaders install folder
|
||||
*
|
||||
* Example originally created with raylib 1.3, last time updated with raylib 3.7
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
SetConfigFlags(FLAG_MSAA_4X_HINT); // Enable Multi Sampling Anti Aliasing 4x (if available)
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - model shader");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ 4.0f, 4.0f, 4.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 1.0f, -1.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Model model = LoadModel("resources/models/watermill.obj"); // Load OBJ model
|
||||
Texture2D texture = LoadTexture("resources/models/watermill_diffuse.png"); // Load model texture
|
||||
|
||||
// Load shader for model
|
||||
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION));
|
||||
|
||||
model.materials[0].shader = shader; // Set shader effect to 3d model
|
||||
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Bind texture to model
|
||||
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
||||
DisableCursor(); // Limit cursor to relative movement inside the window
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_FIRST_PERSON);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
DrawModel(model, position, 0.2f, WHITE); // Draw 3d model with texture
|
||||
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("(c) Watermill 3D model by Alberto Cano", screenWidth - 210, screenHeight - 20, 10, GRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
UnloadTexture(texture); // Unload texture
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,110 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Multiple sample2D with default batch system
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test this example
|
||||
* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders
|
||||
* raylib comes with shaders ready for both versions, check raylib/shaders install folder
|
||||
*
|
||||
* Example originally created with raylib 3.5, last time updated with raylib 3.5
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2020-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib - multiple sample2D");
|
||||
|
||||
Image imRed = GenImageColor(800, 450, (Color){ 255, 0, 0, 255 });
|
||||
Texture texRed = LoadTextureFromImage(imRed);
|
||||
UnloadImage(imRed);
|
||||
|
||||
Image imBlue = GenImageColor(800, 450, (Color){ 0, 0, 255, 255 });
|
||||
Texture texBlue = LoadTextureFromImage(imBlue);
|
||||
UnloadImage(imBlue);
|
||||
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/color_mix.fs", GLSL_VERSION));
|
||||
|
||||
// Get an additional sampler2D location to be enabled on drawing
|
||||
int texBlueLoc = GetShaderLocation(shader, "texture1");
|
||||
|
||||
// Get shader uniform for divider
|
||||
int dividerLoc = GetShaderLocation(shader, "divider");
|
||||
float dividerValue = 0.5f;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsKeyDown(KEY_RIGHT)) dividerValue += 0.01f;
|
||||
else if (IsKeyDown(KEY_LEFT)) dividerValue -= 0.01f;
|
||||
|
||||
if (dividerValue < 0.0f) dividerValue = 0.0f;
|
||||
else if (dividerValue > 1.0f) dividerValue = 1.0f;
|
||||
|
||||
SetShaderValue(shader, dividerLoc, ÷rValue, SHADER_UNIFORM_FLOAT);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginShaderMode(shader);
|
||||
|
||||
// WARNING: Additional samplers are enabled for all draw calls in the batch,
|
||||
// EndShaderMode() forces batch drawing and consequently resets active textures
|
||||
// to let other sampler2D to be activated on consequent drawings (if required)
|
||||
SetShaderValueTexture(shader, texBlueLoc, texBlue);
|
||||
|
||||
// We are drawing texRed using default sampler2D texture0 but
|
||||
// an additional texture units is enabled for texBlue (sampler2D texture1)
|
||||
DrawTexture(texRed, 0, 0, WHITE);
|
||||
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("Use KEY_LEFT/KEY_RIGHT to move texture mixing in shader!", 80, GetScreenHeight() - 40, 20, RAYWHITE);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
UnloadTexture(texRed); // Unload texture
|
||||
UnloadTexture(texBlue); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Color palette switch
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test this example
|
||||
* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders
|
||||
* raylib comes with shaders ready for both versions, check raylib/shaders install folder
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 3.7
|
||||
*
|
||||
* Example contributed by Marco Lizza (@MarcoLizza) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2023 Marco Lizza (@MarcoLizza) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
#define MAX_PALETTES 3
|
||||
#define COLORS_PER_PALETTE 8
|
||||
#define VALUES_PER_COLOR 3
|
||||
|
||||
static const int palettes[MAX_PALETTES][COLORS_PER_PALETTE*VALUES_PER_COLOR] = {
|
||||
{ // 3-BIT RGB
|
||||
0, 0, 0,
|
||||
255, 0, 0,
|
||||
0, 255, 0,
|
||||
0, 0, 255,
|
||||
0, 255, 255,
|
||||
255, 0, 255,
|
||||
255, 255, 0,
|
||||
255, 255, 255,
|
||||
},
|
||||
{ // AMMO-8 (GameBoy-like)
|
||||
4, 12, 6,
|
||||
17, 35, 24,
|
||||
30, 58, 41,
|
||||
48, 93, 66,
|
||||
77, 128, 97,
|
||||
137, 162, 87,
|
||||
190, 220, 127,
|
||||
238, 255, 204,
|
||||
},
|
||||
{ // RKBV (2-strip film)
|
||||
21, 25, 26,
|
||||
138, 76, 88,
|
||||
217, 98, 117,
|
||||
230, 184, 193,
|
||||
69, 107, 115,
|
||||
75, 151, 166,
|
||||
165, 189, 194,
|
||||
255, 245, 247,
|
||||
}
|
||||
};
|
||||
|
||||
static const char *paletteText[] = {
|
||||
"3-BIT RGB",
|
||||
"AMMO-8 (GameBoy-like)",
|
||||
"RKBV (2-strip film)"
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - color palette switch");
|
||||
|
||||
// Load shader to be used on some parts drawing
|
||||
// NOTE 1: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version
|
||||
// NOTE 2: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/palette_switch.fs", GLSL_VERSION));
|
||||
|
||||
// Get variable (uniform) location on the shader to connect with the program
|
||||
// NOTE: If uniform variable could not be found in the shader, function returns -1
|
||||
int paletteLoc = GetShaderLocation(shader, "palette");
|
||||
|
||||
int currentPalette = 0;
|
||||
int lineHeight = screenHeight/COLORS_PER_PALETTE;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsKeyPressed(KEY_RIGHT)) currentPalette++;
|
||||
else if (IsKeyPressed(KEY_LEFT)) currentPalette--;
|
||||
|
||||
if (currentPalette >= MAX_PALETTES) currentPalette = 0;
|
||||
else if (currentPalette < 0) currentPalette = MAX_PALETTES - 1;
|
||||
|
||||
// Send new value to the shader to be used on drawing.
|
||||
// NOTE: We are sending RGB triplets w/o the alpha channel
|
||||
SetShaderValueV(shader, paletteLoc, palettes[currentPalette], SHADER_UNIFORM_IVEC3, COLORS_PER_PALETTE);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginShaderMode(shader);
|
||||
|
||||
for (int i = 0; i < COLORS_PER_PALETTE; i++)
|
||||
{
|
||||
// Draw horizontal screen-wide rectangles with increasing "palette index"
|
||||
// The used palette index is encoded in the RGB components of the pixel
|
||||
DrawRectangle(0, lineHeight*i, GetScreenWidth(), lineHeight, (Color){ i, i, i, 255 });
|
||||
}
|
||||
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("< >", 10, 10, 30, DARKBLUE);
|
||||
DrawText("CURRENT PALETTE:", 60, 15, 20, RAYWHITE);
|
||||
DrawText(paletteText[currentPalette], 300, 15, 20, RED);
|
||||
|
||||
DrawFPS(700, 15);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,177 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Apply a postprocessing shader to a scene
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test this example
|
||||
* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders
|
||||
* raylib comes with shaders ready for both versions, check raylib/shaders install folder
|
||||
*
|
||||
* Example originally created with raylib 1.3, last time updated with raylib 4.0
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
#define MAX_POSTPRO_SHADERS 12
|
||||
|
||||
typedef enum {
|
||||
FX_GRAYSCALE = 0,
|
||||
FX_POSTERIZATION,
|
||||
FX_DREAM_VISION,
|
||||
FX_PIXELIZER,
|
||||
FX_CROSS_HATCHING,
|
||||
FX_CROSS_STITCHING,
|
||||
FX_PREDATOR_VIEW,
|
||||
FX_SCANLINES,
|
||||
FX_FISHEYE,
|
||||
FX_SOBEL,
|
||||
FX_BLOOM,
|
||||
FX_BLUR,
|
||||
//FX_FXAA
|
||||
} PostproShader;
|
||||
|
||||
static const char *postproShaderText[] = {
|
||||
"GRAYSCALE",
|
||||
"POSTERIZATION",
|
||||
"DREAM_VISION",
|
||||
"PIXELIZER",
|
||||
"CROSS_HATCHING",
|
||||
"CROSS_STITCHING",
|
||||
"PREDATOR_VIEW",
|
||||
"SCANLINES",
|
||||
"FISHEYE",
|
||||
"SOBEL",
|
||||
"BLOOM",
|
||||
"BLUR",
|
||||
//"FXAA"
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
SetConfigFlags(FLAG_MSAA_4X_HINT); // Enable Multi Sampling Anti Aliasing 4x (if available)
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - postprocessing shader");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ 2.0f, 3.0f, 2.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
Model model = LoadModel("resources/models/church.obj"); // Load OBJ model
|
||||
Texture2D texture = LoadTexture("resources/models/church_diffuse.png"); // Load model texture (diffuse map)
|
||||
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set model diffuse texture
|
||||
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
||||
// Load all postpro shaders
|
||||
// NOTE 1: All postpro shader use the base vertex shader (DEFAULT_VERTEX_SHADER)
|
||||
// NOTE 2: We load the correct shader depending on GLSL version
|
||||
Shader shaders[MAX_POSTPRO_SHADERS] = { 0 };
|
||||
|
||||
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
shaders[FX_GRAYSCALE] = LoadShader(0, TextFormat("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION));
|
||||
shaders[FX_POSTERIZATION] = LoadShader(0, TextFormat("resources/shaders/glsl%i/posterization.fs", GLSL_VERSION));
|
||||
shaders[FX_DREAM_VISION] = LoadShader(0, TextFormat("resources/shaders/glsl%i/dream_vision.fs", GLSL_VERSION));
|
||||
shaders[FX_PIXELIZER] = LoadShader(0, TextFormat("resources/shaders/glsl%i/pixelizer.fs", GLSL_VERSION));
|
||||
shaders[FX_CROSS_HATCHING] = LoadShader(0, TextFormat("resources/shaders/glsl%i/cross_hatching.fs", GLSL_VERSION));
|
||||
shaders[FX_CROSS_STITCHING] = LoadShader(0, TextFormat("resources/shaders/glsl%i/cross_stitching.fs", GLSL_VERSION));
|
||||
shaders[FX_PREDATOR_VIEW] = LoadShader(0, TextFormat("resources/shaders/glsl%i/predator.fs", GLSL_VERSION));
|
||||
shaders[FX_SCANLINES] = LoadShader(0, TextFormat("resources/shaders/glsl%i/scanlines.fs", GLSL_VERSION));
|
||||
shaders[FX_FISHEYE] = LoadShader(0, TextFormat("resources/shaders/glsl%i/fisheye.fs", GLSL_VERSION));
|
||||
shaders[FX_SOBEL] = LoadShader(0, TextFormat("resources/shaders/glsl%i/sobel.fs", GLSL_VERSION));
|
||||
shaders[FX_BLOOM] = LoadShader(0, TextFormat("resources/shaders/glsl%i/bloom.fs", GLSL_VERSION));
|
||||
shaders[FX_BLUR] = LoadShader(0, TextFormat("resources/shaders/glsl%i/blur.fs", GLSL_VERSION));
|
||||
|
||||
int currentShader = FX_GRAYSCALE;
|
||||
|
||||
// Create a RenderTexture2D to be used for render to texture
|
||||
RenderTexture2D target = LoadRenderTexture(screenWidth, screenHeight);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||
|
||||
if (IsKeyPressed(KEY_RIGHT)) currentShader++;
|
||||
else if (IsKeyPressed(KEY_LEFT)) currentShader--;
|
||||
|
||||
if (currentShader >= MAX_POSTPRO_SHADERS) currentShader = 0;
|
||||
else if (currentShader < 0) currentShader = MAX_POSTPRO_SHADERS - 1;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginTextureMode(target); // Enable drawing to texture
|
||||
ClearBackground(RAYWHITE); // Clear texture background
|
||||
|
||||
BeginMode3D(camera); // Begin 3d mode drawing
|
||||
DrawModel(model, position, 0.1f, WHITE); // Draw 3d model with texture
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
EndMode3D(); // End 3d mode drawing, returns to orthographic 2d mode
|
||||
EndTextureMode(); // End drawing to texture (now we have a texture available for next passes)
|
||||
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE); // Clear screen background
|
||||
|
||||
// Render generated texture using selected postprocessing shader
|
||||
BeginShaderMode(shaders[currentShader]);
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
// Draw 2d shapes and text over drawn texture
|
||||
DrawRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f));
|
||||
|
||||
DrawText("(c) Church 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY);
|
||||
DrawText("CURRENT POSTPRO SHADER:", 10, 15, 20, BLACK);
|
||||
DrawText(postproShaderText[currentShader], 330, 15, 20, RED);
|
||||
DrawText("< >", 540, 10, 30, DARKBLUE);
|
||||
DrawFPS(700, 15);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Unload all postpro shaders
|
||||
for (int i = 0; i < MAX_POSTPRO_SHADERS; i++) UnloadShader(shaders[i]);
|
||||
|
||||
UnloadTexture(texture); // Unload texture
|
||||
UnloadModel(model); // Unload model
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,121 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Apply a shader to some shape or texture
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test this example
|
||||
* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders
|
||||
* raylib comes with shaders ready for both versions, check raylib/shaders install folder
|
||||
*
|
||||
* Example originally created with raylib 1.7, last time updated with raylib 3.7
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - shapes and texture shaders");
|
||||
|
||||
Texture2D fudesumi = LoadTexture("resources/fudesumi.png");
|
||||
|
||||
// Load shader to be used on some parts drawing
|
||||
// NOTE 1: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version
|
||||
// NOTE 2: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION));
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// TODO: Update your variables here
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// Start drawing with default shader
|
||||
|
||||
DrawText("USING DEFAULT SHADER", 20, 40, 10, RED);
|
||||
|
||||
DrawCircle(80, 120, 35, DARKBLUE);
|
||||
DrawCircleGradient(80, 220, 60, GREEN, SKYBLUE);
|
||||
DrawCircleLines(80, 340, 80, DARKBLUE);
|
||||
|
||||
|
||||
// Activate our custom shader to be applied on next shapes/textures drawings
|
||||
BeginShaderMode(shader);
|
||||
|
||||
DrawText("USING CUSTOM SHADER", 190, 40, 10, RED);
|
||||
|
||||
DrawRectangle(250 - 60, 90, 120, 60, RED);
|
||||
DrawRectangleGradientH(250 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawRectangleLines(250 - 40, 320, 80, 60, ORANGE);
|
||||
|
||||
// Activate our default shader for next drawings
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("USING DEFAULT SHADER", 370, 40, 10, RED);
|
||||
|
||||
DrawTriangle((Vector2){430, 80},
|
||||
(Vector2){430 - 60, 150},
|
||||
(Vector2){430 + 60, 150}, VIOLET);
|
||||
|
||||
DrawTriangleLines((Vector2){430, 160},
|
||||
(Vector2){430 - 20, 230},
|
||||
(Vector2){430 + 20, 230}, DARKBLUE);
|
||||
|
||||
DrawPoly((Vector2){430, 320}, 6, 80, 0, BROWN);
|
||||
|
||||
// Activate our custom shader to be applied on next shapes/textures drawings
|
||||
BeginShaderMode(shader);
|
||||
|
||||
DrawTexture(fudesumi, 500, -30, WHITE); // Using custom shader
|
||||
|
||||
// Activate our default shader for next drawings
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("(c) Fudesumi sprite by Eiden Marsal", 380, screenHeight - 20, 10, GRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
UnloadTexture(fudesumi); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,150 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Simple shader mask
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 3.7
|
||||
*
|
||||
* Example contributed by Chris Camacho (@chriscamacho) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2023 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************
|
||||
*
|
||||
* After a model is loaded it has a default material, this material can be
|
||||
* modified in place rather than creating one from scratch...
|
||||
* While all of the maps have particular names, they can be used for any purpose
|
||||
* except for three maps that are applied as cubic maps (see below)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "raymath.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - simple shader mask");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
camera.position = (Vector3){ 0.0f, 1.0f, 2.0f }; // Camera position
|
||||
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
|
||||
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0f; // Camera field-of-view Y
|
||||
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
|
||||
|
||||
// Define our three models to show the shader on
|
||||
Mesh torus = GenMeshTorus(0.3f, 1, 16, 32);
|
||||
Model model1 = LoadModelFromMesh(torus);
|
||||
|
||||
Mesh cube = GenMeshCube(0.8f,0.8f,0.8f);
|
||||
Model model2 = LoadModelFromMesh(cube);
|
||||
|
||||
// Generate model to be shaded just to see the gaps in the other two
|
||||
Mesh sphere = GenMeshSphere(1, 16, 16);
|
||||
Model model3 = LoadModelFromMesh(sphere);
|
||||
|
||||
// Load the shader
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/mask.fs", GLSL_VERSION));
|
||||
|
||||
// Load and apply the diffuse texture (colour map)
|
||||
Texture texDiffuse = LoadTexture("resources/plasma.png");
|
||||
model1.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texDiffuse;
|
||||
model2.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texDiffuse;
|
||||
|
||||
// Using MATERIAL_MAP_EMISSION as a spare slot to use for 2nd texture
|
||||
// NOTE: Don't use MATERIAL_MAP_IRRADIANCE, MATERIAL_MAP_PREFILTER or MATERIAL_MAP_CUBEMAP as they are bound as cube maps
|
||||
Texture texMask = LoadTexture("resources/mask.png");
|
||||
model1.materials[0].maps[MATERIAL_MAP_EMISSION].texture = texMask;
|
||||
model2.materials[0].maps[MATERIAL_MAP_EMISSION].texture = texMask;
|
||||
shader.locs[SHADER_LOC_MAP_EMISSION] = GetShaderLocation(shader, "mask");
|
||||
|
||||
// Frame is incremented each frame to animate the shader
|
||||
int shaderFrame = GetShaderLocation(shader, "frame");
|
||||
|
||||
// Apply the shader to the two models
|
||||
model1.materials[0].shader = shader;
|
||||
model2.materials[0].shader = shader;
|
||||
|
||||
int framesCounter = 0;
|
||||
Vector3 rotation = { 0 }; // Model rotation angles
|
||||
|
||||
DisableCursor(); // Limit cursor to relative movement inside the window
|
||||
SetTargetFPS(60); // Set to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_FIRST_PERSON);
|
||||
|
||||
framesCounter++;
|
||||
rotation.x += 0.01f;
|
||||
rotation.y += 0.005f;
|
||||
rotation.z -= 0.0025f;
|
||||
|
||||
// Send frames counter to shader for animation
|
||||
SetShaderValue(shader, shaderFrame, &framesCounter, SHADER_UNIFORM_INT);
|
||||
|
||||
// Rotate one of the models
|
||||
model1.transform = MatrixRotateXYZ(rotation);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(DARKBLUE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
DrawModel(model1, (Vector3){ 0.5f, 0.0f, 0.0f }, 1, WHITE);
|
||||
DrawModelEx(model2, (Vector3){ -0.5f, 0.0f, 0.0f }, (Vector3){ 1.0f, 1.0f, 0.0f }, 50, (Vector3){ 1.0f, 1.0f, 1.0f }, WHITE);
|
||||
DrawModel(model3,(Vector3){ 0.0f, 0.0f, -1.5f }, 1, WHITE);
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawRectangle(16, 698, MeasureText(TextFormat("Frame: %i", framesCounter), 20) + 8, 42, BLUE);
|
||||
DrawText(TextFormat("Frame: %i", framesCounter), 20, 700, 20, WHITE);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadModel(model1);
|
||||
UnloadModel(model2);
|
||||
UnloadModel(model3);
|
||||
|
||||
UnloadTexture(texDiffuse); // Unload default diffuse texture
|
||||
UnloadTexture(texMask); // Unload texture mask
|
||||
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,255 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Simple shader mask
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 3.7
|
||||
*
|
||||
* Example contributed by Chris Camacho (@chriscamacho) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2023 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************
|
||||
*
|
||||
* The shader makes alpha holes in the forground to give the appearance of a top
|
||||
* down look at a spotlight casting a pool of light...
|
||||
*
|
||||
* The right hand side of the screen there is just enough light to see whats
|
||||
* going on without the spot light, great for a stealth type game where you
|
||||
* have to avoid the spotlights.
|
||||
*
|
||||
* The left hand side of the screen is in pitch dark except for where the spotlights are.
|
||||
*
|
||||
* Although this example doesn't scale like the letterbox example, you could integrate
|
||||
* the two techniques, but by scaling the actual colour of the render texture rather
|
||||
* than using alpha as a mask.
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include "raymath.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
#define MAX_SPOTS 3 // NOTE: It must be the same as define in shader
|
||||
#define MAX_STARS 400
|
||||
|
||||
// Spot data
|
||||
typedef struct Spot {
|
||||
Vector2 position;
|
||||
Vector2 speed;
|
||||
float inner;
|
||||
float radius;
|
||||
|
||||
// Shader locations
|
||||
unsigned int positionLoc;
|
||||
unsigned int innerLoc;
|
||||
unsigned int radiusLoc;
|
||||
} Spot;
|
||||
|
||||
// Stars in the star field have a position and velocity
|
||||
typedef struct Star {
|
||||
Vector2 position;
|
||||
Vector2 speed;
|
||||
} Star;
|
||||
|
||||
static void UpdateStar(Star *s);
|
||||
static void ResetStar(Star *s);
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - shader spotlight");
|
||||
HideCursor();
|
||||
|
||||
Texture texRay = LoadTexture("resources/raysan.png");
|
||||
|
||||
Star stars[MAX_STARS] = { 0 };
|
||||
|
||||
for (int n = 0; n < MAX_STARS; n++) ResetStar(&stars[n]);
|
||||
|
||||
// Progress all the stars on, so they don't all start in the centre
|
||||
for (int m = 0; m < screenWidth/2.0; m++)
|
||||
{
|
||||
for (int n = 0; n < MAX_STARS; n++) UpdateStar(&stars[n]);
|
||||
}
|
||||
|
||||
int frameCounter = 0;
|
||||
|
||||
// Use default vert shader
|
||||
Shader shdrSpot = LoadShader(0, TextFormat("resources/shaders/glsl%i/spotlight.fs", GLSL_VERSION));
|
||||
|
||||
// Get the locations of spots in the shader
|
||||
Spot spots[MAX_SPOTS];
|
||||
|
||||
for (int i = 0; i < MAX_SPOTS; i++)
|
||||
{
|
||||
char posName[32] = "spots[x].pos\0";
|
||||
char innerName[32] = "spots[x].inner\0";
|
||||
char radiusName[32] = "spots[x].radius\0";
|
||||
|
||||
posName[6] = '0' + i;
|
||||
innerName[6] = '0' + i;
|
||||
radiusName[6] = '0' + i;
|
||||
|
||||
spots[i].positionLoc = GetShaderLocation(shdrSpot, posName);
|
||||
spots[i].innerLoc = GetShaderLocation(shdrSpot, innerName);
|
||||
spots[i].radiusLoc = GetShaderLocation(shdrSpot, radiusName);
|
||||
|
||||
}
|
||||
|
||||
// Tell the shader how wide the screen is so we can have
|
||||
// a pitch black half and a dimly lit half.
|
||||
unsigned int wLoc = GetShaderLocation(shdrSpot, "screenWidth");
|
||||
float sw = (float)GetScreenWidth();
|
||||
SetShaderValue(shdrSpot, wLoc, &sw, SHADER_UNIFORM_FLOAT);
|
||||
|
||||
// Randomize the locations and velocities of the spotlights
|
||||
// and initialize the shader locations
|
||||
for (int i = 0; i < MAX_SPOTS; i++)
|
||||
{
|
||||
spots[i].position.x = (float)GetRandomValue(64, screenWidth - 64);
|
||||
spots[i].position.y = (float)GetRandomValue(64, screenHeight - 64);
|
||||
spots[i].speed = (Vector2){ 0, 0 };
|
||||
|
||||
while ((fabs(spots[i].speed.x) + fabs(spots[i].speed.y)) < 2)
|
||||
{
|
||||
spots[i].speed.x = GetRandomValue(-400, 40) / 10.0f;
|
||||
spots[i].speed.y = GetRandomValue(-400, 40) / 10.0f;
|
||||
}
|
||||
|
||||
spots[i].inner = 28.0f * (i + 1);
|
||||
spots[i].radius = 48.0f * (i + 1);
|
||||
|
||||
SetShaderValue(shdrSpot, spots[i].positionLoc, &spots[i].position.x, SHADER_UNIFORM_VEC2);
|
||||
SetShaderValue(shdrSpot, spots[i].innerLoc, &spots[i].inner, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shdrSpot, spots[i].radiusLoc, &spots[i].radius, SHADER_UNIFORM_FLOAT);
|
||||
}
|
||||
|
||||
SetTargetFPS(60); // Set to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
frameCounter++;
|
||||
|
||||
// Move the stars, resetting them if the go offscreen
|
||||
for (int n = 0; n < MAX_STARS; n++) UpdateStar(&stars[n]);
|
||||
|
||||
// Update the spots, send them to the shader
|
||||
for (int i = 0; i < MAX_SPOTS; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
Vector2 mp = GetMousePosition();
|
||||
spots[i].position.x = mp.x;
|
||||
spots[i].position.y = screenHeight - mp.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
spots[i].position.x += spots[i].speed.x;
|
||||
spots[i].position.y += spots[i].speed.y;
|
||||
|
||||
if (spots[i].position.x < 64) spots[i].speed.x = -spots[i].speed.x;
|
||||
if (spots[i].position.x > (screenWidth - 64)) spots[i].speed.x = -spots[i].speed.x;
|
||||
if (spots[i].position.y < 64) spots[i].speed.y = -spots[i].speed.y;
|
||||
if (spots[i].position.y > (screenHeight - 64)) spots[i].speed.y = -spots[i].speed.y;
|
||||
}
|
||||
|
||||
SetShaderValue(shdrSpot, spots[i].positionLoc, &spots[i].position.x, SHADER_UNIFORM_VEC2);
|
||||
}
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(DARKBLUE);
|
||||
|
||||
// Draw stars and bobs
|
||||
for (int n = 0; n < MAX_STARS; n++)
|
||||
{
|
||||
// Single pixel is just too small these days!
|
||||
DrawRectangle((int)stars[n].position.x, (int)stars[n].position.y, 2, 2, WHITE);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
DrawTexture(texRay,
|
||||
(int)((screenWidth/2.0f) + cos((frameCounter + i*8)/51.45f)*(screenWidth/2.2f) - 32),
|
||||
(int)((screenHeight/2.0f) + sin((frameCounter + i*8)/17.87f)*(screenHeight/4.2f)), WHITE);
|
||||
}
|
||||
|
||||
// Draw spot lights
|
||||
BeginShaderMode(shdrSpot);
|
||||
// Instead of a blank rectangle you could render here
|
||||
// a render texture of the full screen used to do screen
|
||||
// scaling (slight adjustment to shader would be required
|
||||
// to actually pay attention to the colour!)
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
DrawText("Move the mouse!", 10, 30, 20, GREEN);
|
||||
DrawText("Pitch Black", (int)(screenWidth*0.2f), screenHeight/2, 20, GREEN);
|
||||
DrawText("Dark", (int)(screenWidth*.66f), screenHeight/2, 20, GREEN);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texRay);
|
||||
UnloadShader(shdrSpot);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void ResetStar(Star *s)
|
||||
{
|
||||
s->position = (Vector2){ GetScreenWidth()/2.0f, GetScreenHeight()/2.0f };
|
||||
|
||||
do
|
||||
{
|
||||
s->speed.x = (float)GetRandomValue(-1000, 1000)/100.0f;
|
||||
s->speed.y = (float)GetRandomValue(-1000, 1000)/100.0f;
|
||||
|
||||
} while (!(fabs(s->speed.x) + (fabs(s->speed.y) > 1)));
|
||||
|
||||
s->position = Vector2Add(s->position, Vector2Multiply(s->speed, (Vector2){ 8.0f, 8.0f }));
|
||||
}
|
||||
|
||||
static void UpdateStar(Star *s)
|
||||
{
|
||||
s->position = Vector2Add(s->position, s->speed);
|
||||
|
||||
if ((s->position.x < 0) || (s->position.x > GetScreenWidth()) ||
|
||||
(s->position.y < 0) || (s->position.y > GetScreenHeight()))
|
||||
{
|
||||
ResetStar(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [textures] example - Texture drawing
|
||||
*
|
||||
* NOTE: This example illustrates how to draw into a blank texture using a shader
|
||||
*
|
||||
* Example originally created with raylib 2.0, last time updated with raylib 3.7
|
||||
*
|
||||
* Example contributed by Michał Ciesielski and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2023 Michał Ciesielski and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - texture drawing");
|
||||
|
||||
Image imBlank = GenImageColor(1024, 1024, BLANK);
|
||||
Texture2D texture = LoadTextureFromImage(imBlank); // Load blank texture to fill on shader
|
||||
UnloadImage(imBlank);
|
||||
|
||||
// NOTE: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/cubes_panning.fs", GLSL_VERSION));
|
||||
|
||||
float time = 0.0f;
|
||||
int timeLoc = GetShaderLocation(shader, "uTime");
|
||||
SetShaderValue(shader, timeLoc, &time, SHADER_UNIFORM_FLOAT);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
time = (float)GetTime();
|
||||
SetShaderValue(shader, timeLoc, &time, SHADER_UNIFORM_FLOAT);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginShaderMode(shader); // Enable our custom shader for next shapes/textures drawings
|
||||
DrawTexture(texture, 0, 0, WHITE); // Drawing BLANK texture, all magic happens on shader
|
||||
EndShaderMode(); // Disable our custom shader, return to default shader
|
||||
|
||||
DrawText("BACKGROUND is PAINTED and ANIMATED on SHADER!", 10, 10, 20, MAROON);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Apply an shdrOutline to a texture
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* Example originally created with raylib 4.0, last time updated with raylib 4.0
|
||||
*
|
||||
* Example contributed by Samuel Skiff (@GoldenThumbs) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2021-2023 Samuel SKiff (@GoldenThumbs) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - Apply an outline to a texture");
|
||||
|
||||
Texture2D texture = LoadTexture("resources/fudesumi.png");
|
||||
|
||||
Shader shdrOutline = LoadShader(0, TextFormat("resources/shaders/glsl%i/outline.fs", GLSL_VERSION));
|
||||
|
||||
float outlineSize = 2.0f;
|
||||
float outlineColor[4] = { 1.0f, 0.0f, 0.0f, 1.0f }; // Normalized RED color
|
||||
float textureSize[2] = { (float)texture.width, (float)texture.height };
|
||||
|
||||
// Get shader locations
|
||||
int outlineSizeLoc = GetShaderLocation(shdrOutline, "outlineSize");
|
||||
int outlineColorLoc = GetShaderLocation(shdrOutline, "outlineColor");
|
||||
int textureSizeLoc = GetShaderLocation(shdrOutline, "textureSize");
|
||||
|
||||
// Set shader values (they can be changed later)
|
||||
SetShaderValue(shdrOutline, outlineSizeLoc, &outlineSize, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shdrOutline, outlineColorLoc, outlineColor, SHADER_UNIFORM_VEC4);
|
||||
SetShaderValue(shdrOutline, textureSizeLoc, textureSize, SHADER_UNIFORM_VEC2);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
outlineSize += GetMouseWheelMove();
|
||||
if (outlineSize < 1.0f) outlineSize = 1.0f;
|
||||
|
||||
SetShaderValue(shdrOutline, outlineSizeLoc, &outlineSize, SHADER_UNIFORM_FLOAT);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginShaderMode(shdrOutline);
|
||||
|
||||
DrawTexture(texture, GetScreenWidth()/2 - texture.width/2, -30, WHITE);
|
||||
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("Shader-based\ntexture\noutline", 10, 10, 20, GRAY);
|
||||
|
||||
DrawText(TextFormat("Outline size: %i px", (int)outlineSize), 10, 120, 20, MAROON);
|
||||
|
||||
DrawFPS(710, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture);
|
||||
UnloadShader(shdrOutline);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,115 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Texture Waves
|
||||
*
|
||||
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
|
||||
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.
|
||||
*
|
||||
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test this example
|
||||
* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders
|
||||
* raylib comes with shaders ready for both versions, check raylib/shaders install folder
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 3.7
|
||||
*
|
||||
* Example contributed by Anata (@anatagawa) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2019-2023 Anata (@anatagawa) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - texture waves");
|
||||
|
||||
// Load texture texture to apply shaders
|
||||
Texture2D texture = LoadTexture("resources/space.png");
|
||||
|
||||
// Load shader and setup location points and values
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/wave.fs", GLSL_VERSION));
|
||||
|
||||
int secondsLoc = GetShaderLocation(shader, "secondes");
|
||||
int freqXLoc = GetShaderLocation(shader, "freqX");
|
||||
int freqYLoc = GetShaderLocation(shader, "freqY");
|
||||
int ampXLoc = GetShaderLocation(shader, "ampX");
|
||||
int ampYLoc = GetShaderLocation(shader, "ampY");
|
||||
int speedXLoc = GetShaderLocation(shader, "speedX");
|
||||
int speedYLoc = GetShaderLocation(shader, "speedY");
|
||||
|
||||
// Shader uniform values that can be updated at any time
|
||||
float freqX = 25.0f;
|
||||
float freqY = 25.0f;
|
||||
float ampX = 5.0f;
|
||||
float ampY = 5.0f;
|
||||
float speedX = 8.0f;
|
||||
float speedY = 8.0f;
|
||||
|
||||
float screenSize[2] = { (float)GetScreenWidth(), (float)GetScreenHeight() };
|
||||
SetShaderValue(shader, GetShaderLocation(shader, "size"), &screenSize, SHADER_UNIFORM_VEC2);
|
||||
SetShaderValue(shader, freqXLoc, &freqX, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, freqYLoc, &freqY, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, ampXLoc, &X, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, ampYLoc, &Y, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, speedXLoc, &speedX, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, speedYLoc, &speedY, SHADER_UNIFORM_FLOAT);
|
||||
|
||||
float seconds = 0.0f;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
seconds += GetFrameTime();
|
||||
|
||||
SetShaderValue(shader, secondsLoc, &seconds, SHADER_UNIFORM_FLOAT);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginShaderMode(shader);
|
||||
|
||||
DrawTexture(texture, 0, 0, WHITE);
|
||||
DrawTexture(texture, texture.width, 0, WHITE);
|
||||
|
||||
EndShaderMode();
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
UnloadTexture(texture); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,167 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shaders] example - Depth buffer writing
|
||||
*
|
||||
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
||||
*
|
||||
* Example contributed by Buğra Alptekin Sarı (@BugraAlptekinSari) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2022-2023 Buğra Alptekin Sarı (@BugraAlptekinSari)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include "rlgl.h"
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Declare custom functions required for the example
|
||||
//------------------------------------------------------------------------------------
|
||||
// Load custom render texture, create a writable depth texture buffer
|
||||
static RenderTexture2D LoadRenderTextureDepthTex(int width, int height);
|
||||
|
||||
// Unload render texture from GPU memory (VRAM)
|
||||
static void UnloadRenderTextureDepthTex(RenderTexture2D target);
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - write depth buffer");
|
||||
|
||||
// The shader inverts the depth buffer by writing into it by `gl_FragDepth = 1 - gl_FragCoord.z;`
|
||||
Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/write_depth.fs", GLSL_VERSION));
|
||||
|
||||
// Use Customized function to create writable depth texture buffer
|
||||
RenderTexture2D target = LoadRenderTextureDepthTex(screenWidth, screenHeight);
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = {
|
||||
.position = (Vector3){ 2.0f, 2.0f, 3.0f }, // Camera position
|
||||
.target = (Vector3){ 0.0f, 0.5f, 0.0f }, // Camera looking at point
|
||||
.up = (Vector3){ 0.0f, 1.0f, 0.0f }, // Camera up vector (rotation towards target)
|
||||
.fovy = 45.0f, // Camera field-of-view Y
|
||||
.projection = CAMERA_PERSPECTIVE // Camera projection type
|
||||
};
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw into our custom render texture (framebuffer)
|
||||
BeginTextureMode(target);
|
||||
ClearBackground(WHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
BeginShaderMode(shader);
|
||||
DrawCubeWiresV((Vector3){ 0.0f, 0.5f, 1.0f }, (Vector3){ 1.0f, 1.0f, 1.0f }, RED);
|
||||
DrawCubeV((Vector3){ 0.0f, 0.5f, 1.0f }, (Vector3){ 1.0f, 1.0f, 1.0f }, PURPLE);
|
||||
DrawCubeWiresV((Vector3){ 0.0f, 0.5f, -1.0f }, (Vector3){ 1.0f, 1.0f, 1.0f }, DARKGREEN);
|
||||
DrawCubeV((Vector3) { 0.0f, 0.5f, -1.0f }, (Vector3){ 1.0f, 1.0f, 1.0f }, YELLOW);
|
||||
DrawGrid(10, 1.0f);
|
||||
EndShaderMode();
|
||||
EndMode3D();
|
||||
EndTextureMode();
|
||||
|
||||
// Draw into screen our custom render texture
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawTextureRec(target.texture, (Rectangle) { 0, 0, screenWidth, -screenHeight }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawFPS(10, 10);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadRenderTextureDepthTex(target);
|
||||
UnloadShader(shader);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Define custom functions required for the example
|
||||
//------------------------------------------------------------------------------------
|
||||
// Load custom render texture, create a writable depth texture buffer
|
||||
RenderTexture2D LoadRenderTextureDepthTex(int width, int height)
|
||||
{
|
||||
RenderTexture2D target = { 0 };
|
||||
|
||||
target.id = rlLoadFramebuffer(width, height); // Load an empty framebuffer
|
||||
|
||||
if (target.id > 0)
|
||||
{
|
||||
rlEnableFramebuffer(target.id);
|
||||
|
||||
// Create color texture (default to RGBA)
|
||||
target.texture.id = rlLoadTexture(0, width, height, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, 1);
|
||||
target.texture.width = width;
|
||||
target.texture.height = height;
|
||||
target.texture.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
|
||||
target.texture.mipmaps = 1;
|
||||
|
||||
// Create depth texture buffer (instead of raylib default renderbuffer)
|
||||
target.depth.id = rlLoadTextureDepth(width, height, false);
|
||||
target.depth.width = width;
|
||||
target.depth.height = height;
|
||||
target.depth.format = 19; //DEPTH_COMPONENT_24BIT?
|
||||
target.depth.mipmaps = 1;
|
||||
|
||||
// Attach color texture and depth texture to FBO
|
||||
rlFramebufferAttach(target.id, target.texture.id, RL_ATTACHMENT_COLOR_CHANNEL0, RL_ATTACHMENT_TEXTURE2D, 0);
|
||||
rlFramebufferAttach(target.id, target.depth.id, RL_ATTACHMENT_DEPTH, RL_ATTACHMENT_TEXTURE2D, 0);
|
||||
|
||||
// Check if fbo is complete with attachments (valid)
|
||||
if (rlFramebufferComplete(target.id)) TRACELOG(LOG_INFO, "FBO: [ID %i] Framebuffer object created successfully", target.id);
|
||||
|
||||
rlDisableFramebuffer();
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "FBO: Framebuffer object can not be created");
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
// Unload render texture from GPU memory (VRAM)
|
||||
void UnloadRenderTextureDepthTex(RenderTexture2D target)
|
||||
{
|
||||
if (target.id > 0)
|
||||
{
|
||||
// Color texture attached to FBO is deleted
|
||||
rlUnloadTexture(target.texture.id);
|
||||
rlUnloadTexture(target.depth.id);
|
||||
|
||||
// NOTE: Depth texture is automatically
|
||||
// queried and deleted before deleting framebuffer
|
||||
rlUnloadFramebuffer(target.id);
|
||||
}
|
||||
}
|
|
@ -1,263 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* reasings - raylib easings library, based on Robert Penner library
|
||||
*
|
||||
* Useful easing functions for values animation
|
||||
*
|
||||
* This header uses:
|
||||
* #define REASINGS_STATIC_INLINE // Inlines all functions code, so it runs faster.
|
||||
* // This requires lots of memory on system.
|
||||
* How to use:
|
||||
* The four inputs t,b,c,d are defined as follows:
|
||||
* t = current time (in any unit measure, but same unit as duration)
|
||||
* b = starting value to interpolate
|
||||
* c = the total change in value of b that needs to occur
|
||||
* d = total time it should take to complete (duration)
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* int currentTime = 0;
|
||||
* int duration = 100;
|
||||
* float startPositionX = 0.0f;
|
||||
* float finalPositionX = 30.0f;
|
||||
* float currentPositionX = startPositionX;
|
||||
*
|
||||
* while (currentPositionX < finalPositionX)
|
||||
* {
|
||||
* currentPositionX = EaseSineIn(currentTime, startPositionX, finalPositionX - startPositionX, duration);
|
||||
* currentTime++;
|
||||
* }
|
||||
*
|
||||
* A port of Robert Penner's easing equations to C (http://robertpenner.com/easing/)
|
||||
*
|
||||
* Robert Penner License
|
||||
* ---------------------------------------------------------------------------------
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright (c) 2001 Robert Penner. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* - Neither the name of the author nor the names of contributors may be used
|
||||
* to endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ---------------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose, including commercial
|
||||
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not claim that you
|
||||
* wrote the original software. If you use this software in a product, an acknowledgment
|
||||
* in the product documentation would be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
|
||||
* as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*
|
||||
**********************************************************************************************/
|
||||
|
||||
#ifndef REASINGS_H
|
||||
#define REASINGS_H
|
||||
|
||||
#define REASINGS_STATIC_INLINE // NOTE: By default, compile functions as static inline
|
||||
|
||||
#if defined(REASINGS_STATIC_INLINE)
|
||||
#define EASEDEF static inline
|
||||
#else
|
||||
#define EASEDEF extern
|
||||
#endif
|
||||
|
||||
#include <math.h> // Required for: sinf(), cosf(), sqrtf(), powf()
|
||||
|
||||
#ifndef PI
|
||||
#define PI 3.14159265358979323846f //Required as PI is not always defined in math.h
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" { // Prevents name mangling of functions
|
||||
#endif
|
||||
|
||||
// Linear Easing functions
|
||||
EASEDEF float EaseLinearNone(float t, float b, float c, float d) { return (c*t/d + b); } // Ease: Linear
|
||||
EASEDEF float EaseLinearIn(float t, float b, float c, float d) { return (c*t/d + b); } // Ease: Linear In
|
||||
EASEDEF float EaseLinearOut(float t, float b, float c, float d) { return (c*t/d + b); } // Ease: Linear Out
|
||||
EASEDEF float EaseLinearInOut(float t, float b, float c, float d) { return (c*t/d + b); } // Ease: Linear In Out
|
||||
|
||||
// Sine Easing functions
|
||||
EASEDEF float EaseSineIn(float t, float b, float c, float d) { return (-c*cosf(t/d*(PI/2.0f)) + c + b); } // Ease: Sine In
|
||||
EASEDEF float EaseSineOut(float t, float b, float c, float d) { return (c*sinf(t/d*(PI/2.0f)) + b); } // Ease: Sine Out
|
||||
EASEDEF float EaseSineInOut(float t, float b, float c, float d) { return (-c/2.0f*(cosf(PI*t/d) - 1.0f) + b); } // Ease: Sine In Out
|
||||
|
||||
// Circular Easing functions
|
||||
EASEDEF float EaseCircIn(float t, float b, float c, float d) { t /= d; return (-c*(sqrtf(1.0f - t*t) - 1.0f) + b); } // Ease: Circular In
|
||||
EASEDEF float EaseCircOut(float t, float b, float c, float d) { t = t/d - 1.0f; return (c*sqrtf(1.0f - t*t) + b); } // Ease: Circular Out
|
||||
EASEDEF float EaseCircInOut(float t, float b, float c, float d) // Ease: Circular In Out
|
||||
{
|
||||
if ((t/=d/2.0f) < 1.0f) return (-c/2.0f*(sqrtf(1.0f - t*t) - 1.0f) + b);
|
||||
t -= 2.0f; return (c/2.0f*(sqrtf(1.0f - t*t) + 1.0f) + b);
|
||||
}
|
||||
|
||||
// Cubic Easing functions
|
||||
EASEDEF float EaseCubicIn(float t, float b, float c, float d) { t /= d; return (c*t*t*t + b); } // Ease: Cubic In
|
||||
EASEDEF float EaseCubicOut(float t, float b, float c, float d) { t = t/d - 1.0f; return (c*(t*t*t + 1.0f) + b); } // Ease: Cubic Out
|
||||
EASEDEF float EaseCubicInOut(float t, float b, float c, float d) // Ease: Cubic In Out
|
||||
{
|
||||
if ((t/=d/2.0f) < 1.0f) return (c/2.0f*t*t*t + b);
|
||||
t -= 2.0f; return (c/2.0f*(t*t*t + 2.0f) + b);
|
||||
}
|
||||
|
||||
// Quadratic Easing functions
|
||||
EASEDEF float EaseQuadIn(float t, float b, float c, float d) { t /= d; return (c*t*t + b); } // Ease: Quadratic In
|
||||
EASEDEF float EaseQuadOut(float t, float b, float c, float d) { t /= d; return (-c*t*(t - 2.0f) + b); } // Ease: Quadratic Out
|
||||
EASEDEF float EaseQuadInOut(float t, float b, float c, float d) // Ease: Quadratic In Out
|
||||
{
|
||||
if ((t/=d/2) < 1) return (((c/2)*(t*t)) + b);
|
||||
return (-c/2.0f*(((t - 1.0f)*(t - 3.0f)) - 1.0f) + b);
|
||||
}
|
||||
|
||||
// Exponential Easing functions
|
||||
EASEDEF float EaseExpoIn(float t, float b, float c, float d) { return (t == 0.0f) ? b : (c*powf(2.0f, 10.0f*(t/d - 1.0f)) + b); } // Ease: Exponential In
|
||||
EASEDEF float EaseExpoOut(float t, float b, float c, float d) { return (t == d) ? (b + c) : (c*(-powf(2.0f, -10.0f*t/d) + 1.0f) + b); } // Ease: Exponential Out
|
||||
EASEDEF float EaseExpoInOut(float t, float b, float c, float d) // Ease: Exponential In Out
|
||||
{
|
||||
if (t == 0.0f) return b;
|
||||
if (t == d) return (b + c);
|
||||
if ((t/=d/2.0f) < 1.0f) return (c/2.0f*powf(2.0f, 10.0f*(t - 1.0f)) + b);
|
||||
|
||||
return (c/2.0f*(-powf(2.0f, -10.0f*(t - 1.0f)) + 2.0f) + b);
|
||||
}
|
||||
|
||||
// Back Easing functions
|
||||
EASEDEF float EaseBackIn(float t, float b, float c, float d) // Ease: Back In
|
||||
{
|
||||
float s = 1.70158f;
|
||||
float postFix = t/=d;
|
||||
return (c*(postFix)*t*((s + 1.0f)*t - s) + b);
|
||||
}
|
||||
|
||||
EASEDEF float EaseBackOut(float t, float b, float c, float d) // Ease: Back Out
|
||||
{
|
||||
float s = 1.70158f;
|
||||
t = t/d - 1.0f;
|
||||
return (c*(t*t*((s + 1.0f)*t + s) + 1.0f) + b);
|
||||
}
|
||||
|
||||
EASEDEF float EaseBackInOut(float t, float b, float c, float d) // Ease: Back In Out
|
||||
{
|
||||
float s = 1.70158f;
|
||||
if ((t/=d/2.0f) < 1.0f)
|
||||
{
|
||||
s *= 1.525f;
|
||||
return (c/2.0f*(t*t*((s + 1.0f)*t - s)) + b);
|
||||
}
|
||||
|
||||
float postFix = t-=2.0f;
|
||||
s *= 1.525f;
|
||||
return (c/2.0f*((postFix)*t*((s + 1.0f)*t + s) + 2.0f) + b);
|
||||
}
|
||||
|
||||
// Bounce Easing functions
|
||||
EASEDEF float EaseBounceOut(float t, float b, float c, float d) // Ease: Bounce Out
|
||||
{
|
||||
if ((t/=d) < (1.0f/2.75f))
|
||||
{
|
||||
return (c*(7.5625f*t*t) + b);
|
||||
}
|
||||
else if (t < (2.0f/2.75f))
|
||||
{
|
||||
float postFix = t-=(1.5f/2.75f);
|
||||
return (c*(7.5625f*(postFix)*t + 0.75f) + b);
|
||||
}
|
||||
else if (t < (2.5/2.75))
|
||||
{
|
||||
float postFix = t-=(2.25f/2.75f);
|
||||
return (c*(7.5625f*(postFix)*t + 0.9375f) + b);
|
||||
}
|
||||
else
|
||||
{
|
||||
float postFix = t-=(2.625f/2.75f);
|
||||
return (c*(7.5625f*(postFix)*t + 0.984375f) + b);
|
||||
}
|
||||
}
|
||||
|
||||
EASEDEF float EaseBounceIn(float t, float b, float c, float d) { return (c - EaseBounceOut(d - t, 0.0f, c, d) + b); } // Ease: Bounce In
|
||||
EASEDEF float EaseBounceInOut(float t, float b, float c, float d) // Ease: Bounce In Out
|
||||
{
|
||||
if (t < d/2.0f) return (EaseBounceIn(t*2.0f, 0.0f, c, d)*0.5f + b);
|
||||
else return (EaseBounceOut(t*2.0f - d, 0.0f, c, d)*0.5f + c*0.5f + b);
|
||||
}
|
||||
|
||||
// Elastic Easing functions
|
||||
EASEDEF float EaseElasticIn(float t, float b, float c, float d) // Ease: Elastic In
|
||||
{
|
||||
if (t == 0.0f) return b;
|
||||
if ((t/=d) == 1.0f) return (b + c);
|
||||
|
||||
float p = d*0.3f;
|
||||
float a = c;
|
||||
float s = p/4.0f;
|
||||
float postFix = a*powf(2.0f, 10.0f*(t-=1.0f));
|
||||
|
||||
return (-(postFix*sinf((t*d-s)*(2.0f*PI)/p )) + b);
|
||||
}
|
||||
|
||||
EASEDEF float EaseElasticOut(float t, float b, float c, float d) // Ease: Elastic Out
|
||||
{
|
||||
if (t == 0.0f) return b;
|
||||
if ((t/=d) == 1.0f) return (b + c);
|
||||
|
||||
float p = d*0.3f;
|
||||
float a = c;
|
||||
float s = p/4.0f;
|
||||
|
||||
return (a*powf(2.0f,-10.0f*t)*sinf((t*d-s)*(2.0f*PI)/p) + c + b);
|
||||
}
|
||||
|
||||
EASEDEF float EaseElasticInOut(float t, float b, float c, float d) // Ease: Elastic In Out
|
||||
{
|
||||
if (t == 0.0f) return b;
|
||||
if ((t/=d/2.0f) == 2.0f) return (b + c);
|
||||
|
||||
float p = d*(0.3f*1.5f);
|
||||
float a = c;
|
||||
float s = p/4.0f;
|
||||
|
||||
if (t < 1.0f)
|
||||
{
|
||||
float postFix = a*powf(2.0f, 10.0f*(t-=1.0f));
|
||||
return -0.5f*(postFix*sinf((t*d-s)*(2.0f*PI)/p)) + b;
|
||||
}
|
||||
|
||||
float postFix = a*powf(2.0f, -10.0f*(t-=1.0f));
|
||||
|
||||
return (postFix*sinf((t*d-s)*(2.0f*PI)/p)*0.5f + c + b);
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // REASINGS_H
|
|
@ -1,86 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - Draw basic shapes 2d (rectangle, circle, line...)
|
||||
*
|
||||
* Example originally created with raylib 1.0, last time updated with raylib 4.2
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - basic shapes drawing");
|
||||
|
||||
float rotation = 0.0f;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
rotation += 0.2f;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("some basic shapes available on raylib", 20, 20, 20, DARKGRAY);
|
||||
|
||||
// Circle shapes and lines
|
||||
DrawCircle(screenWidth/5, 120, 35, DARKBLUE);
|
||||
DrawCircleGradient(screenWidth/5, 220, 60, GREEN, SKYBLUE);
|
||||
DrawCircleLines(screenWidth/5, 340, 80, DARKBLUE);
|
||||
|
||||
// Rectangle shapes and lines
|
||||
DrawRectangle(screenWidth/4*2 - 60, 100, 120, 60, RED);
|
||||
DrawRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); // NOTE: Uses QUADS internally, not lines
|
||||
|
||||
// Triangle shapes and lines
|
||||
DrawTriangle((Vector2){ screenWidth/4.0f *3.0f, 80.0f },
|
||||
(Vector2){ screenWidth/4.0f *3.0f - 60.0f, 150.0f },
|
||||
(Vector2){ screenWidth/4.0f *3.0f + 60.0f, 150.0f }, VIOLET);
|
||||
|
||||
DrawTriangleLines((Vector2){ screenWidth/4.0f*3.0f, 160.0f },
|
||||
(Vector2){ screenWidth/4.0f*3.0f - 20.0f, 230.0f },
|
||||
(Vector2){ screenWidth/4.0f*3.0f + 20.0f, 230.0f }, DARKBLUE);
|
||||
|
||||
// Polygon shapes and lines
|
||||
DrawPoly((Vector2){ screenWidth/4.0f*3, 330 }, 6, 80, rotation, BROWN);
|
||||
DrawPolyLines((Vector2){ screenWidth/4.0f*3, 330 }, 6, 90, rotation, BROWN);
|
||||
DrawPolyLinesEx((Vector2){ screenWidth/4.0f*3, 330 }, 6, 85, rotation, 6, BEIGE);
|
||||
|
||||
// NOTE: We draw all LINES based shapes together to optimize internal drawing,
|
||||
// this way, all LINES are rendered in a single draw pass
|
||||
DrawLine(18, 42, screenWidth - 18, 42, BLACK);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - bouncing ball
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//---------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - bouncing ball");
|
||||
|
||||
Vector2 ballPosition = { GetScreenWidth()/2.0f, GetScreenHeight()/2.0f };
|
||||
Vector2 ballSpeed = { 5.0f, 4.0f };
|
||||
int ballRadius = 20;
|
||||
|
||||
bool pause = 0;
|
||||
int framesCounter = 0;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//----------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//-----------------------------------------------------
|
||||
if (IsKeyPressed(KEY_SPACE)) pause = !pause;
|
||||
|
||||
if (!pause)
|
||||
{
|
||||
ballPosition.x += ballSpeed.x;
|
||||
ballPosition.y += ballSpeed.y;
|
||||
|
||||
// Check walls collision for bouncing
|
||||
if ((ballPosition.x >= (GetScreenWidth() - ballRadius)) || (ballPosition.x <= ballRadius)) ballSpeed.x *= -1.0f;
|
||||
if ((ballPosition.y >= (GetScreenHeight() - ballRadius)) || (ballPosition.y <= ballRadius)) ballSpeed.y *= -1.0f;
|
||||
}
|
||||
else framesCounter++;
|
||||
//-----------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//-----------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawCircleV(ballPosition, (float)ballRadius, MAROON);
|
||||
DrawText("PRESS SPACE to PAUSE BALL MOVEMENT", 10, GetScreenHeight() - 25, 20, LIGHTGRAY);
|
||||
|
||||
// On pause, we draw a blinking message
|
||||
if (pause && ((framesCounter/30)%2)) DrawText("PAUSED", 350, 200, 30, GRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//-----------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//---------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//----------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - collision area
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <stdlib.h> // Required for: abs()
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//---------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - collision area");
|
||||
|
||||
// Box A: Moving box
|
||||
Rectangle boxA = { 10, GetScreenHeight()/2.0f - 50, 200, 100 };
|
||||
int boxASpeedX = 4;
|
||||
|
||||
// Box B: Mouse moved box
|
||||
Rectangle boxB = { GetScreenWidth()/2.0f - 30, GetScreenHeight()/2.0f - 30, 60, 60 };
|
||||
|
||||
Rectangle boxCollision = { 0 }; // Collision rectangle
|
||||
|
||||
int screenUpperLimit = 40; // Top menu limits
|
||||
|
||||
bool pause = false; // Movement pause
|
||||
bool collision = false; // Collision detection
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//----------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//-----------------------------------------------------
|
||||
// Move box if not paused
|
||||
if (!pause) boxA.x += boxASpeedX;
|
||||
|
||||
// Bounce box on x screen limits
|
||||
if (((boxA.x + boxA.width) >= GetScreenWidth()) || (boxA.x <= 0)) boxASpeedX *= -1;
|
||||
|
||||
// Update player-controlled-box (box02)
|
||||
boxB.x = GetMouseX() - boxB.width/2;
|
||||
boxB.y = GetMouseY() - boxB.height/2;
|
||||
|
||||
// Make sure Box B does not go out of move area limits
|
||||
if ((boxB.x + boxB.width) >= GetScreenWidth()) boxB.x = GetScreenWidth() - boxB.width;
|
||||
else if (boxB.x <= 0) boxB.x = 0;
|
||||
|
||||
if ((boxB.y + boxB.height) >= GetScreenHeight()) boxB.y = GetScreenHeight() - boxB.height;
|
||||
else if (boxB.y <= screenUpperLimit) boxB.y = (float)screenUpperLimit;
|
||||
|
||||
// Check boxes collision
|
||||
collision = CheckCollisionRecs(boxA, boxB);
|
||||
|
||||
// Get collision rectangle (only on collision)
|
||||
if (collision) boxCollision = GetCollisionRec(boxA, boxB);
|
||||
|
||||
// Pause Box A movement
|
||||
if (IsKeyPressed(KEY_SPACE)) pause = !pause;
|
||||
//-----------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//-----------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectangle(0, 0, screenWidth, screenUpperLimit, collision? RED : BLACK);
|
||||
|
||||
DrawRectangleRec(boxA, GOLD);
|
||||
DrawRectangleRec(boxB, BLUE);
|
||||
|
||||
if (collision)
|
||||
{
|
||||
// Draw collision area
|
||||
DrawRectangleRec(boxCollision, LIME);
|
||||
|
||||
// Draw collision message
|
||||
DrawText("COLLISION!", GetScreenWidth()/2 - MeasureText("COLLISION!", 20)/2, screenUpperLimit/2 - 10, 20, BLACK);
|
||||
|
||||
// Draw collision area
|
||||
DrawText(TextFormat("Collision Area: %i", (int)boxCollision.width*(int)boxCollision.height), GetScreenWidth()/2 - 100, screenUpperLimit + 10, 20, BLACK);
|
||||
}
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//-----------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//---------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//----------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,104 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - Colors palette
|
||||
*
|
||||
* Example originally created with raylib 1.0, last time updated with raylib 2.5
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#define MAX_COLORS_COUNT 21 // Number of colors available
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - colors palette");
|
||||
|
||||
Color colors[MAX_COLORS_COUNT] = {
|
||||
DARKGRAY, MAROON, ORANGE, DARKGREEN, DARKBLUE, DARKPURPLE, DARKBROWN,
|
||||
GRAY, RED, GOLD, LIME, BLUE, VIOLET, BROWN, LIGHTGRAY, PINK, YELLOW,
|
||||
GREEN, SKYBLUE, PURPLE, BEIGE };
|
||||
|
||||
const char *colorNames[MAX_COLORS_COUNT] = {
|
||||
"DARKGRAY", "MAROON", "ORANGE", "DARKGREEN", "DARKBLUE", "DARKPURPLE",
|
||||
"DARKBROWN", "GRAY", "RED", "GOLD", "LIME", "BLUE", "VIOLET", "BROWN",
|
||||
"LIGHTGRAY", "PINK", "YELLOW", "GREEN", "SKYBLUE", "PURPLE", "BEIGE" };
|
||||
|
||||
Rectangle colorsRecs[MAX_COLORS_COUNT] = { 0 }; // Rectangles array
|
||||
|
||||
// Fills colorsRecs data (for every rectangle)
|
||||
for (int i = 0; i < MAX_COLORS_COUNT; i++)
|
||||
{
|
||||
colorsRecs[i].x = 20.0f + 100.0f *(i%7) + 10.0f *(i%7);
|
||||
colorsRecs[i].y = 80.0f + 100.0f *(i/7) + 10.0f *(i/7);
|
||||
colorsRecs[i].width = 100.0f;
|
||||
colorsRecs[i].height = 100.0f;
|
||||
}
|
||||
|
||||
int colorState[MAX_COLORS_COUNT] = { 0 }; // Color state: 0-DEFAULT, 1-MOUSE_HOVER
|
||||
|
||||
Vector2 mousePoint = { 0.0f, 0.0f };
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
mousePoint = GetMousePosition();
|
||||
|
||||
for (int i = 0; i < MAX_COLORS_COUNT; i++)
|
||||
{
|
||||
if (CheckCollisionPointRec(mousePoint, colorsRecs[i])) colorState[i] = 1;
|
||||
else colorState[i] = 0;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("raylib colors palette", 28, 42, 20, BLACK);
|
||||
DrawText("press SPACE to see all colors", GetScreenWidth() - 180, GetScreenHeight() - 40, 10, GRAY);
|
||||
|
||||
for (int i = 0; i < MAX_COLORS_COUNT; i++) // Draw all rectangles
|
||||
{
|
||||
DrawRectangleRec(colorsRecs[i], Fade(colors[i], colorState[i]? 0.6f : 1.0f));
|
||||
|
||||
if (IsKeyDown(KEY_SPACE) || colorState[i])
|
||||
{
|
||||
DrawRectangle((int)colorsRecs[i].x, (int)(colorsRecs[i].y + colorsRecs[i].height - 26), (int)colorsRecs[i].width, 20, BLACK);
|
||||
DrawRectangleLinesEx(colorsRecs[i], 6, Fade(BLACK, 0.3f));
|
||||
DrawText(colorNames[i], (int)(colorsRecs[i].x + colorsRecs[i].width - MeasureText(colorNames[i], 10) - 12),
|
||||
(int)(colorsRecs[i].y + colorsRecs[i].height - 20), 10, colors[i]);
|
||||
}
|
||||
}
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - draw rectangle rounded (with gui options)
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
* Example contributed by Vlad Adrian (@demizdor) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2018-2023 Vlad Adrian (@demizdor) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include <raylib.h>
|
||||
|
||||
#define RAYGUI_IMPLEMENTATION
|
||||
#include "raygui.h" // Required for GUI controls
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - draw rectangle rounded");
|
||||
|
||||
float roundness = 0.2f;
|
||||
int width = 200;
|
||||
int height = 100;
|
||||
int segments = 0;
|
||||
int lineThick = 1;
|
||||
|
||||
bool drawRect = false;
|
||||
bool drawRoundedRect = true;
|
||||
bool drawRoundedLines = false;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
Rectangle rec = { ((float)GetScreenWidth() - width - 250)/2, (GetScreenHeight() - height)/2.0f, (float)width, (float)height };
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawLine(560, 0, 560, GetScreenHeight(), Fade(LIGHTGRAY, 0.6f));
|
||||
DrawRectangle(560, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f));
|
||||
|
||||
if (drawRect) DrawRectangleRec(rec, Fade(GOLD, 0.6f));
|
||||
if (drawRoundedRect) DrawRectangleRounded(rec, roundness, segments, Fade(MAROON, 0.2f));
|
||||
if (drawRoundedLines) DrawRectangleRoundedLines(rec,roundness, segments, (float)lineThick, Fade(MAROON, 0.4f));
|
||||
|
||||
// Draw GUI controls
|
||||
//------------------------------------------------------------------------------
|
||||
width = (int)GuiSliderBar((Rectangle){ 640, 40, 105, 20 }, "Width", NULL, (float)width, 0, (float)GetScreenWidth() - 300);
|
||||
height = (int)GuiSliderBar((Rectangle){ 640, 70, 105, 20 }, "Height", NULL, (float)height, 0, (float)GetScreenHeight() - 50);
|
||||
roundness = GuiSliderBar((Rectangle){ 640, 140, 105, 20 }, "Roundness", NULL, roundness, 0.0f, 1.0f);
|
||||
lineThick = (int)GuiSliderBar((Rectangle){ 640, 170, 105, 20 }, "Thickness", NULL, (float)lineThick, 0, 20);
|
||||
segments = (int)GuiSliderBar((Rectangle){ 640, 240, 105, 20}, "Segments", NULL, (float)segments, 0, 60);
|
||||
|
||||
drawRoundedRect = GuiCheckBox((Rectangle){ 640, 320, 20, 20 }, "DrawRoundedRect", drawRoundedRect);
|
||||
drawRoundedLines = GuiCheckBox((Rectangle){ 640, 350, 20, 20 }, "DrawRoundedLines", drawRoundedLines);
|
||||
drawRect = GuiCheckBox((Rectangle){ 640, 380, 20, 20}, "DrawRect", drawRect);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
DrawText(TextFormat("MODE: %s", (segments >= 4)? "MANUAL" : "AUTO"), 640, 280, 10, (segments >= 4)? MAROON : DARKGRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - draw ring (with gui options)
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
* Example contributed by Vlad Adrian (@demizdor) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2018-2023 Vlad Adrian (@demizdor) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include <raylib.h>
|
||||
|
||||
#define RAYGUI_IMPLEMENTATION
|
||||
#include "raygui.h" // Required for GUI controls
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - draw ring");
|
||||
|
||||
Vector2 center = {(GetScreenWidth() - 300)/2.0f, GetScreenHeight()/2.0f };
|
||||
|
||||
float innerRadius = 80.0f;
|
||||
float outerRadius = 190.0f;
|
||||
|
||||
float startAngle = 0.0f;
|
||||
float endAngle = 360.0f;
|
||||
int segments = 0;
|
||||
|
||||
bool drawRing = true;
|
||||
bool drawRingLines = false;
|
||||
bool drawCircleLines = false;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// NOTE: All variables update happens inside GUI control functions
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawLine(500, 0, 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.6f));
|
||||
DrawRectangle(500, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f));
|
||||
|
||||
if (drawRing) DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, segments, Fade(MAROON, 0.3f));
|
||||
if (drawRingLines) DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, segments, Fade(BLACK, 0.4f));
|
||||
if (drawCircleLines) DrawCircleSectorLines(center, outerRadius, startAngle, endAngle, segments, Fade(BLACK, 0.4f));
|
||||
|
||||
// Draw GUI controls
|
||||
//------------------------------------------------------------------------------
|
||||
startAngle = GuiSliderBar((Rectangle){ 600, 40, 120, 20 }, "StartAngle", NULL, startAngle, -450, 450);
|
||||
endAngle = GuiSliderBar((Rectangle){ 600, 70, 120, 20 }, "EndAngle", NULL, endAngle, -450, 450);
|
||||
|
||||
innerRadius = GuiSliderBar((Rectangle){ 600, 140, 120, 20 }, "InnerRadius", NULL, innerRadius, 0, 100);
|
||||
outerRadius = GuiSliderBar((Rectangle){ 600, 170, 120, 20 }, "OuterRadius", NULL, outerRadius, 0, 200);
|
||||
|
||||
segments = (int)GuiSliderBar((Rectangle){ 600, 240, 120, 20 }, "Segments", NULL, (float)segments, 0, 100);
|
||||
|
||||
drawRing = GuiCheckBox((Rectangle){ 600, 320, 20, 20 }, "Draw Ring", drawRing);
|
||||
drawRingLines = GuiCheckBox((Rectangle){ 600, 350, 20, 20 }, "Draw RingLines", drawRingLines);
|
||||
drawCircleLines = GuiCheckBox((Rectangle){ 600, 380, 20, 20 }, "Draw CircleLines", drawCircleLines);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
int minSegments = (int)ceilf((endAngle - startAngle)/90);
|
||||
DrawText(TextFormat("MODE: %s", (segments >= minSegments)? "MANUAL" : "AUTO"), 600, 270, 10, (segments >= minSegments)? MAROON : DARKGRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,115 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - easings ball anim
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include "reasings.h" // Required for easing functions
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings ball anim");
|
||||
|
||||
// Ball variable value to be animated with easings
|
||||
int ballPositionX = -100;
|
||||
int ballRadius = 20;
|
||||
float ballAlpha = 0.0f;
|
||||
|
||||
int state = 0;
|
||||
int framesCounter = 0;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (state == 0) // Move ball position X with easing
|
||||
{
|
||||
framesCounter++;
|
||||
ballPositionX = (int)EaseElasticOut((float)framesCounter, -100, screenWidth/2.0f + 100, 120);
|
||||
|
||||
if (framesCounter >= 120)
|
||||
{
|
||||
framesCounter = 0;
|
||||
state = 1;
|
||||
}
|
||||
}
|
||||
else if (state == 1) // Increase ball radius with easing
|
||||
{
|
||||
framesCounter++;
|
||||
ballRadius = (int)EaseElasticIn((float)framesCounter, 20, 500, 200);
|
||||
|
||||
if (framesCounter >= 200)
|
||||
{
|
||||
framesCounter = 0;
|
||||
state = 2;
|
||||
}
|
||||
}
|
||||
else if (state == 2) // Change ball alpha with easing (background color blending)
|
||||
{
|
||||
framesCounter++;
|
||||
ballAlpha = EaseCubicOut((float)framesCounter, 0.0f, 1.0f, 200);
|
||||
|
||||
if (framesCounter >= 200)
|
||||
{
|
||||
framesCounter = 0;
|
||||
state = 3;
|
||||
}
|
||||
}
|
||||
else if (state == 3) // Reset state to play again
|
||||
{
|
||||
if (IsKeyPressed(KEY_ENTER))
|
||||
{
|
||||
// Reset required variables to play again
|
||||
ballPositionX = -100;
|
||||
ballRadius = 20;
|
||||
ballAlpha = 0.0f;
|
||||
state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_R)) framesCounter = 0;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
if (state >= 2) DrawRectangle(0, 0, screenWidth, screenHeight, GREEN);
|
||||
DrawCircle(ballPositionX, 200, (float)ballRadius, Fade(RED, 1.0f - ballAlpha));
|
||||
|
||||
if (state == 3) DrawText("PRESS [ENTER] TO PLAY AGAIN!", 240, 200, 20, BLACK);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - easings box anim
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include "reasings.h" // Required for easing functions
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings box anim");
|
||||
|
||||
// Box variables to be animated with easings
|
||||
Rectangle rec = { GetScreenWidth()/2.0f, -100, 100, 100 };
|
||||
float rotation = 0.0f;
|
||||
float alpha = 1.0f;
|
||||
|
||||
int state = 0;
|
||||
int framesCounter = 0;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
switch (state)
|
||||
{
|
||||
case 0: // Move box down to center of screen
|
||||
{
|
||||
framesCounter++;
|
||||
|
||||
// NOTE: Remember that 3rd parameter of easing function refers to
|
||||
// desired value variation, do not confuse it with expected final value!
|
||||
rec.y = EaseElasticOut((float)framesCounter, -100, GetScreenHeight()/2.0f + 100, 120);
|
||||
|
||||
if (framesCounter >= 120)
|
||||
{
|
||||
framesCounter = 0;
|
||||
state = 1;
|
||||
}
|
||||
} break;
|
||||
case 1: // Scale box to an horizontal bar
|
||||
{
|
||||
framesCounter++;
|
||||
rec.height = EaseBounceOut((float)framesCounter, 100, -90, 120);
|
||||
rec.width = EaseBounceOut((float)framesCounter, 100, (float)GetScreenWidth(), 120);
|
||||
|
||||
if (framesCounter >= 120)
|
||||
{
|
||||
framesCounter = 0;
|
||||
state = 2;
|
||||
}
|
||||
} break;
|
||||
case 2: // Rotate horizontal bar rectangle
|
||||
{
|
||||
framesCounter++;
|
||||
rotation = EaseQuadOut((float)framesCounter, 0.0f, 270.0f, 240);
|
||||
|
||||
if (framesCounter >= 240)
|
||||
{
|
||||
framesCounter = 0;
|
||||
state = 3;
|
||||
}
|
||||
} break;
|
||||
case 3: // Increase bar size to fill all screen
|
||||
{
|
||||
framesCounter++;
|
||||
rec.height = EaseCircOut((float)framesCounter, 10, (float)GetScreenWidth(), 120);
|
||||
|
||||
if (framesCounter >= 120)
|
||||
{
|
||||
framesCounter = 0;
|
||||
state = 4;
|
||||
}
|
||||
} break;
|
||||
case 4: // Fade out animation
|
||||
{
|
||||
framesCounter++;
|
||||
alpha = EaseSineOut((float)framesCounter, 1.0f, -1.0f, 160);
|
||||
|
||||
if (framesCounter >= 160)
|
||||
{
|
||||
framesCounter = 0;
|
||||
state = 5;
|
||||
}
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
// Reset animation at any moment
|
||||
if (IsKeyPressed(KEY_SPACE))
|
||||
{
|
||||
rec = (Rectangle){ GetScreenWidth()/2.0f, -100, 100, 100 };
|
||||
rotation = 0.0f;
|
||||
alpha = 1.0f;
|
||||
state = 0;
|
||||
framesCounter = 0;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectanglePro(rec, (Vector2){ rec.width/2, rec.height/2 }, rotation, Fade(BLACK, alpha));
|
||||
|
||||
DrawText("PRESS [SPACE] TO RESET BOX ANIMATION!", 10, GetScreenHeight() - 25, 20, LIGHTGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,123 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - easings rectangle array
|
||||
*
|
||||
* NOTE: This example requires 'easings.h' library, provided on raylib/src. Just copy
|
||||
* the library to same directory as example or make sure it's available on include path.
|
||||
*
|
||||
* Example originally created with raylib 2.0, last time updated with raylib 2.5
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include "reasings.h" // Required for easing functions
|
||||
|
||||
#define RECS_WIDTH 50
|
||||
#define RECS_HEIGHT 50
|
||||
|
||||
#define MAX_RECS_X 800/RECS_WIDTH
|
||||
#define MAX_RECS_Y 450/RECS_HEIGHT
|
||||
|
||||
#define PLAY_TIME_IN_FRAMES 240 // At 60 fps = 4 seconds
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings rectangle array");
|
||||
|
||||
Rectangle recs[MAX_RECS_X*MAX_RECS_Y] = { 0 };
|
||||
|
||||
for (int y = 0; y < MAX_RECS_Y; y++)
|
||||
{
|
||||
for (int x = 0; x < MAX_RECS_X; x++)
|
||||
{
|
||||
recs[y*MAX_RECS_X + x].x = RECS_WIDTH/2.0f + RECS_WIDTH*x;
|
||||
recs[y*MAX_RECS_X + x].y = RECS_HEIGHT/2.0f + RECS_HEIGHT*y;
|
||||
recs[y*MAX_RECS_X + x].width = RECS_WIDTH;
|
||||
recs[y*MAX_RECS_X + x].height = RECS_HEIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
float rotation = 0.0f;
|
||||
int framesCounter = 0;
|
||||
int state = 0; // Rectangles animation state: 0-Playing, 1-Finished
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (state == 0)
|
||||
{
|
||||
framesCounter++;
|
||||
|
||||
for (int i = 0; i < MAX_RECS_X*MAX_RECS_Y; i++)
|
||||
{
|
||||
recs[i].height = EaseCircOut((float)framesCounter, RECS_HEIGHT, -RECS_HEIGHT, PLAY_TIME_IN_FRAMES);
|
||||
recs[i].width = EaseCircOut((float)framesCounter, RECS_WIDTH, -RECS_WIDTH, PLAY_TIME_IN_FRAMES);
|
||||
|
||||
if (recs[i].height < 0) recs[i].height = 0;
|
||||
if (recs[i].width < 0) recs[i].width = 0;
|
||||
|
||||
if ((recs[i].height == 0) && (recs[i].width == 0)) state = 1; // Finish playing
|
||||
|
||||
rotation = EaseLinearIn((float)framesCounter, 0.0f, 360.0f, PLAY_TIME_IN_FRAMES);
|
||||
}
|
||||
}
|
||||
else if ((state == 1) && IsKeyPressed(KEY_SPACE))
|
||||
{
|
||||
// When animation has finished, press space to restart
|
||||
framesCounter = 0;
|
||||
|
||||
for (int i = 0; i < MAX_RECS_X*MAX_RECS_Y; i++)
|
||||
{
|
||||
recs[i].height = RECS_HEIGHT;
|
||||
recs[i].width = RECS_WIDTH;
|
||||
}
|
||||
|
||||
state = 0;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
if (state == 0)
|
||||
{
|
||||
for (int i = 0; i < MAX_RECS_X*MAX_RECS_Y; i++)
|
||||
{
|
||||
DrawRectanglePro(recs[i], (Vector2){ recs[i].width/2, recs[i].height/2 }, rotation, RED);
|
||||
}
|
||||
}
|
||||
else if (state == 1) DrawText("PRESS [SPACE] TO PLAY AGAIN!", 240, 200, 20, GRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,109 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - following eyes
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <math.h> // Required for: atan2f()
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - following eyes");
|
||||
|
||||
Vector2 scleraLeftPosition = { GetScreenWidth()/2.0f - 100.0f, GetScreenHeight()/2.0f };
|
||||
Vector2 scleraRightPosition = { GetScreenWidth()/2.0f + 100.0f, GetScreenHeight()/2.0f };
|
||||
float scleraRadius = 80;
|
||||
|
||||
Vector2 irisLeftPosition = { GetScreenWidth()/2.0f - 100.0f, GetScreenHeight()/2.0f };
|
||||
Vector2 irisRightPosition = { GetScreenWidth()/2.0f + 100.0f, GetScreenHeight()/2.0f };
|
||||
float irisRadius = 24;
|
||||
|
||||
float angle = 0.0f;
|
||||
float dx = 0.0f, dy = 0.0f, dxx = 0.0f, dyy = 0.0f;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
irisLeftPosition = GetMousePosition();
|
||||
irisRightPosition = GetMousePosition();
|
||||
|
||||
// Check not inside the left eye sclera
|
||||
if (!CheckCollisionPointCircle(irisLeftPosition, scleraLeftPosition, scleraRadius - 20))
|
||||
{
|
||||
dx = irisLeftPosition.x - scleraLeftPosition.x;
|
||||
dy = irisLeftPosition.y - scleraLeftPosition.y;
|
||||
|
||||
angle = atan2f(dy, dx);
|
||||
|
||||
dxx = (scleraRadius - irisRadius)*cosf(angle);
|
||||
dyy = (scleraRadius - irisRadius)*sinf(angle);
|
||||
|
||||
irisLeftPosition.x = scleraLeftPosition.x + dxx;
|
||||
irisLeftPosition.y = scleraLeftPosition.y + dyy;
|
||||
}
|
||||
|
||||
// Check not inside the right eye sclera
|
||||
if (!CheckCollisionPointCircle(irisRightPosition, scleraRightPosition, scleraRadius - 20))
|
||||
{
|
||||
dx = irisRightPosition.x - scleraRightPosition.x;
|
||||
dy = irisRightPosition.y - scleraRightPosition.y;
|
||||
|
||||
angle = atan2f(dy, dx);
|
||||
|
||||
dxx = (scleraRadius - irisRadius)*cosf(angle);
|
||||
dyy = (scleraRadius - irisRadius)*sinf(angle);
|
||||
|
||||
irisRightPosition.x = scleraRightPosition.x + dxx;
|
||||
irisRightPosition.y = scleraRightPosition.y + dyy;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawCircleV(scleraLeftPosition, scleraRadius, LIGHTGRAY);
|
||||
DrawCircleV(irisLeftPosition, irisRadius, BROWN);
|
||||
DrawCircleV(irisLeftPosition, 10, BLACK);
|
||||
|
||||
DrawCircleV(scleraRightPosition, scleraRadius, LIGHTGRAY);
|
||||
DrawCircleV(irisRightPosition, irisRadius, DARKGREEN);
|
||||
DrawCircleV(irisRightPosition, 10, BLACK);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - Cubic-bezier lines
|
||||
*
|
||||
* Example originally created with raylib 1.7, last time updated with raylib 1.7
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2017-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
SetConfigFlags(FLAG_MSAA_4X_HINT);
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - cubic-bezier lines");
|
||||
|
||||
Vector2 start = { 0, 0 };
|
||||
Vector2 end = { (float)screenWidth, (float)screenHeight };
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT)) start = GetMousePosition();
|
||||
else if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT)) end = GetMousePosition();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("USE MOUSE LEFT-RIGHT CLICK to DEFINE LINE START and END POINTS", 15, 20, 20, GRAY);
|
||||
|
||||
DrawLineBezier(start, end, 2.0f, RED);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - Draw raylib logo using basic shapes
|
||||
*
|
||||
* Example originally created with raylib 1.0, last time updated with raylib 1.0
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - raylib logo using shapes");
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// TODO: Update your variables here
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256, BLACK);
|
||||
DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, RAYWHITE);
|
||||
DrawText("raylib", screenWidth/2 - 44, screenHeight/2 + 48, 50, BLACK);
|
||||
|
||||
DrawText("this is NOT a texture!", 350, 370, 10, GRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,165 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - raylib logo animation
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 4.0
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - raylib logo animation");
|
||||
|
||||
int logoPositionX = screenWidth/2 - 128;
|
||||
int logoPositionY = screenHeight/2 - 128;
|
||||
|
||||
int framesCounter = 0;
|
||||
int lettersCount = 0;
|
||||
|
||||
int topSideRecWidth = 16;
|
||||
int leftSideRecHeight = 16;
|
||||
|
||||
int bottomSideRecWidth = 16;
|
||||
int rightSideRecHeight = 16;
|
||||
|
||||
int state = 0; // Tracking animation states (State Machine)
|
||||
float alpha = 1.0f; // Useful for fading
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
if (state == 0) // State 0: Small box blinking
|
||||
{
|
||||
framesCounter++;
|
||||
|
||||
if (framesCounter == 120)
|
||||
{
|
||||
state = 1;
|
||||
framesCounter = 0; // Reset counter... will be used later...
|
||||
}
|
||||
}
|
||||
else if (state == 1) // State 1: Top and left bars growing
|
||||
{
|
||||
topSideRecWidth += 4;
|
||||
leftSideRecHeight += 4;
|
||||
|
||||
if (topSideRecWidth == 256) state = 2;
|
||||
}
|
||||
else if (state == 2) // State 2: Bottom and right bars growing
|
||||
{
|
||||
bottomSideRecWidth += 4;
|
||||
rightSideRecHeight += 4;
|
||||
|
||||
if (bottomSideRecWidth == 256) state = 3;
|
||||
}
|
||||
else if (state == 3) // State 3: Letters appearing (one by one)
|
||||
{
|
||||
framesCounter++;
|
||||
|
||||
if (framesCounter/12) // Every 12 frames, one more letter!
|
||||
{
|
||||
lettersCount++;
|
||||
framesCounter = 0;
|
||||
}
|
||||
|
||||
if (lettersCount >= 10) // When all letters have appeared, just fade out everything
|
||||
{
|
||||
alpha -= 0.02f;
|
||||
|
||||
if (alpha <= 0.0f)
|
||||
{
|
||||
alpha = 0.0f;
|
||||
state = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (state == 4) // State 4: Reset and Replay
|
||||
{
|
||||
if (IsKeyPressed(KEY_R))
|
||||
{
|
||||
framesCounter = 0;
|
||||
lettersCount = 0;
|
||||
|
||||
topSideRecWidth = 16;
|
||||
leftSideRecHeight = 16;
|
||||
|
||||
bottomSideRecWidth = 16;
|
||||
rightSideRecHeight = 16;
|
||||
|
||||
alpha = 1.0f;
|
||||
state = 0; // Return to State 0
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
if (state == 0)
|
||||
{
|
||||
if ((framesCounter/15)%2) DrawRectangle(logoPositionX, logoPositionY, 16, 16, BLACK);
|
||||
}
|
||||
else if (state == 1)
|
||||
{
|
||||
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
|
||||
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
|
||||
}
|
||||
else if (state == 2)
|
||||
{
|
||||
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
|
||||
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
|
||||
|
||||
DrawRectangle(logoPositionX + 240, logoPositionY, 16, rightSideRecHeight, BLACK);
|
||||
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, BLACK);
|
||||
}
|
||||
else if (state == 3)
|
||||
{
|
||||
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(BLACK, alpha));
|
||||
DrawRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(BLACK, alpha));
|
||||
|
||||
DrawRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(BLACK, alpha));
|
||||
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(BLACK, alpha));
|
||||
|
||||
DrawRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112, 224, 224, Fade(RAYWHITE, alpha));
|
||||
|
||||
DrawText(TextSubtext("raylib", 0, lettersCount), GetScreenWidth()/2 - 44, GetScreenHeight()/2 + 48, 50, Fade(BLACK, alpha));
|
||||
}
|
||||
else if (state == 4)
|
||||
{
|
||||
DrawText("[R] REPLAY", 340, 200, 20, GRAY);
|
||||
}
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - rectangle scaling by mouse
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
* Example contributed by Vlad Adrian (@demizdor) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2018-2023 Vlad Adrian (@demizdor) and Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#define MOUSE_SCALE_MARK_SIZE 12
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - rectangle scaling mouse");
|
||||
|
||||
Rectangle rec = { 100, 100, 200, 80 };
|
||||
|
||||
Vector2 mousePosition = { 0 };
|
||||
|
||||
bool mouseScaleReady = false;
|
||||
bool mouseScaleMode = false;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
mousePosition = GetMousePosition();
|
||||
|
||||
if (CheckCollisionPointRec(mousePosition, (Rectangle){ rec.x + rec.width - MOUSE_SCALE_MARK_SIZE, rec.y + rec.height - MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE }))
|
||||
{
|
||||
mouseScaleReady = true;
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) mouseScaleMode = true;
|
||||
}
|
||||
else mouseScaleReady = false;
|
||||
|
||||
if (mouseScaleMode)
|
||||
{
|
||||
mouseScaleReady = true;
|
||||
|
||||
rec.width = (mousePosition.x - rec.x);
|
||||
rec.height = (mousePosition.y - rec.y);
|
||||
|
||||
// Check minimum rec size
|
||||
if (rec.width < MOUSE_SCALE_MARK_SIZE) rec.width = MOUSE_SCALE_MARK_SIZE;
|
||||
if (rec.height < MOUSE_SCALE_MARK_SIZE) rec.height = MOUSE_SCALE_MARK_SIZE;
|
||||
|
||||
// Check maximum rec size
|
||||
if (rec.width > (GetScreenWidth() - rec.x)) rec.width = GetScreenWidth() - rec.x;
|
||||
if (rec.height > (GetScreenHeight() - rec.y)) rec.height = GetScreenHeight() - rec.y;
|
||||
|
||||
if (IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) mouseScaleMode = false;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("Scale rectangle dragging from bottom-right corner!", 10, 10, 20, GRAY);
|
||||
|
||||
DrawRectangleRec(rec, Fade(GREEN, 0.5f));
|
||||
|
||||
if (mouseScaleReady)
|
||||
{
|
||||
DrawRectangleLinesEx(rec, 1, RED);
|
||||
DrawTriangle((Vector2){ rec.x + rec.width - MOUSE_SCALE_MARK_SIZE, rec.y + rec.height },
|
||||
(Vector2){ rec.x + rec.width, rec.y + rec.height },
|
||||
(Vector2){ rec.x + rec.width, rec.y + rec.height - MOUSE_SCALE_MARK_SIZE }, RED);
|
||||
}
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,355 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - top down lights
|
||||
*
|
||||
* Example originally created with raylib 4.2, last time updated with raylib 4.2
|
||||
*
|
||||
* Example contributed by Vlad Adrian (@demizdor) and reviewed by Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software
|
||||
*
|
||||
* Copyright (c) 2022-2023 Jeffery Myers (@JeffM2501)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "raymath.h"
|
||||
#include "rlgl.h"
|
||||
|
||||
// Custom Blend Modes
|
||||
#define RLGL_SRC_ALPHA 0x0302
|
||||
#define RLGL_MIN 0x8007
|
||||
#define RLGL_MAX 0x8008
|
||||
|
||||
#define MAX_BOXES 20
|
||||
#define MAX_SHADOWS MAX_BOXES*3 // MAX_BOXES *3. Each box can cast up to two shadow volumes for the edges it is away from, and one for the box itself
|
||||
#define MAX_LIGHTS 16
|
||||
|
||||
// Shadow geometry type
|
||||
typedef struct ShadowGeometry {
|
||||
Vector2 vertices[4];
|
||||
} ShadowGeometry;
|
||||
|
||||
// Light info type
|
||||
typedef struct LightInfo {
|
||||
bool active; // Is this light slot active?
|
||||
bool dirty; // Does this light need to be updated?
|
||||
bool valid; // Is this light in a valid position?
|
||||
|
||||
Vector2 position; // Light position
|
||||
RenderTexture mask; // Alpha mask for the light
|
||||
float outerRadius; // The distance the light touches
|
||||
Rectangle bounds; // A cached rectangle of the light bounds to help with culling
|
||||
|
||||
ShadowGeometry shadows[MAX_SHADOWS];
|
||||
int shadowCount;
|
||||
} LightInfo;
|
||||
|
||||
|
||||
LightInfo lights[MAX_LIGHTS] = { 0 };
|
||||
|
||||
// Move a light and mark it as dirty so that we update it's mask next frame
|
||||
void MoveLight(int slot, float x, float y)
|
||||
{
|
||||
lights[slot].dirty = true;
|
||||
lights[slot].position.x = x;
|
||||
lights[slot].position.y = y;
|
||||
|
||||
// update the cached bounds
|
||||
lights[slot].bounds.x = x - lights[slot].outerRadius;
|
||||
lights[slot].bounds.y = y - lights[slot].outerRadius;
|
||||
}
|
||||
|
||||
// Compute a shadow volume for the edge
|
||||
// It takes the edge and projects it back by the light radius and turns it into a quad
|
||||
void ComputeShadowVolumeForEdge(int slot, Vector2 sp, Vector2 ep)
|
||||
{
|
||||
if (lights[slot].shadowCount >= MAX_SHADOWS) return;
|
||||
|
||||
float extension = lights[slot].outerRadius*2;
|
||||
|
||||
Vector2 spVector = Vector2Normalize(Vector2Subtract(sp, lights[slot].position));
|
||||
Vector2 spProjection = Vector2Add(sp, Vector2Scale(spVector, extension));
|
||||
|
||||
Vector2 epVector = Vector2Normalize(Vector2Subtract(ep, lights[slot].position));
|
||||
Vector2 epProjection = Vector2Add(ep, Vector2Scale(epVector, extension));
|
||||
|
||||
lights[slot].shadows[lights[slot].shadowCount].vertices[0] = sp;
|
||||
lights[slot].shadows[lights[slot].shadowCount].vertices[1] = ep;
|
||||
lights[slot].shadows[lights[slot].shadowCount].vertices[2] = epProjection;
|
||||
lights[slot].shadows[lights[slot].shadowCount].vertices[3] = spProjection;
|
||||
|
||||
lights[slot].shadowCount++;
|
||||
}
|
||||
|
||||
// Draw the light and shadows to the mask for a light
|
||||
void DrawLightMask(int slot)
|
||||
{
|
||||
// Use the light mask
|
||||
BeginTextureMode(lights[slot].mask);
|
||||
|
||||
ClearBackground(WHITE);
|
||||
|
||||
// Force the blend mode to only set the alpha of the destination
|
||||
rlSetBlendFactors(RLGL_SRC_ALPHA, RLGL_SRC_ALPHA, RLGL_MIN);
|
||||
rlSetBlendMode(BLEND_CUSTOM);
|
||||
|
||||
// If we are valid, then draw the light radius to the alpha mask
|
||||
if (lights[slot].valid) DrawCircleGradient((int)lights[slot].position.x, (int)lights[slot].position.y, lights[slot].outerRadius, ColorAlpha(WHITE, 0), WHITE);
|
||||
|
||||
rlDrawRenderBatchActive();
|
||||
|
||||
// Cut out the shadows from the light radius by forcing the alpha to maximum
|
||||
rlSetBlendMode(BLEND_ALPHA);
|
||||
rlSetBlendFactors(RLGL_SRC_ALPHA, RLGL_SRC_ALPHA, RLGL_MAX);
|
||||
rlSetBlendMode(BLEND_CUSTOM);
|
||||
|
||||
// Draw the shadows to the alpha mask
|
||||
for (int i = 0; i < lights[slot].shadowCount; i++)
|
||||
{
|
||||
DrawTriangleFan(lights[slot].shadows[i].vertices, 4, WHITE);
|
||||
}
|
||||
|
||||
rlDrawRenderBatchActive();
|
||||
|
||||
// Go back to normal blend mode
|
||||
rlSetBlendMode(BLEND_ALPHA);
|
||||
|
||||
EndTextureMode();
|
||||
}
|
||||
|
||||
// Setup a light
|
||||
void SetupLight(int slot, float x, float y, float radius)
|
||||
{
|
||||
lights[slot].active = true;
|
||||
lights[slot].valid = false; // The light must prove it is valid
|
||||
lights[slot].mask = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
|
||||
lights[slot].outerRadius = radius;
|
||||
|
||||
lights[slot].bounds.width = radius * 2;
|
||||
lights[slot].bounds.height = radius * 2;
|
||||
|
||||
MoveLight(slot, x, y);
|
||||
|
||||
// Force the render texture to have something in it
|
||||
DrawLightMask(slot);
|
||||
}
|
||||
|
||||
// See if a light needs to update it's mask
|
||||
bool UpdateLight(int slot, Rectangle* boxes, int count)
|
||||
{
|
||||
if (!lights[slot].active || !lights[slot].dirty) return false;
|
||||
|
||||
lights[slot].dirty = false;
|
||||
lights[slot].shadowCount = 0;
|
||||
lights[slot].valid = false;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
// Are we in a box? if so we are not valid
|
||||
if (CheckCollisionPointRec(lights[slot].position, boxes[i])) return false;
|
||||
|
||||
// If this box is outside our bounds, we can skip it
|
||||
if (!CheckCollisionRecs(lights[slot].bounds, boxes[i])) continue;
|
||||
|
||||
// Check the edges that are on the same side we are, and cast shadow volumes out from them
|
||||
|
||||
// Top
|
||||
Vector2 sp = (Vector2){ boxes[i].x, boxes[i].y };
|
||||
Vector2 ep = (Vector2){ boxes[i].x + boxes[i].width, boxes[i].y };
|
||||
|
||||
if (lights[slot].position.y > ep.y) ComputeShadowVolumeForEdge(slot, sp, ep);
|
||||
|
||||
// Right
|
||||
sp = ep;
|
||||
ep.y += boxes[i].height;
|
||||
if (lights[slot].position.x < ep.x) ComputeShadowVolumeForEdge(slot, sp, ep);
|
||||
|
||||
// Bottom
|
||||
sp = ep;
|
||||
ep.x -= boxes[i].width;
|
||||
if (lights[slot].position.y < ep.y) ComputeShadowVolumeForEdge(slot, sp, ep);
|
||||
|
||||
// Left
|
||||
sp = ep;
|
||||
ep.y -= boxes[i].height;
|
||||
if (lights[slot].position.x > ep.x) ComputeShadowVolumeForEdge(slot, sp, ep);
|
||||
|
||||
// The box itself
|
||||
lights[slot].shadows[lights[slot].shadowCount].vertices[0] = (Vector2){ boxes[i].x, boxes[i].y };
|
||||
lights[slot].shadows[lights[slot].shadowCount].vertices[1] = (Vector2){ boxes[i].x, boxes[i].y + boxes[i].height };
|
||||
lights[slot].shadows[lights[slot].shadowCount].vertices[2] = (Vector2){ boxes[i].x + boxes[i].width, boxes[i].y + boxes[i].height };
|
||||
lights[slot].shadows[lights[slot].shadowCount].vertices[3] = (Vector2){ boxes[i].x + boxes[i].width, boxes[i].y };
|
||||
lights[slot].shadowCount++;
|
||||
}
|
||||
|
||||
lights[slot].valid = true;
|
||||
|
||||
DrawLightMask(slot);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Set up some boxes
|
||||
void SetupBoxes(Rectangle *boxes, int *count)
|
||||
{
|
||||
boxes[0] = (Rectangle){ 150,80, 40, 40 };
|
||||
boxes[1] = (Rectangle){ 1200, 700, 40, 40 };
|
||||
boxes[2] = (Rectangle){ 200, 600, 40, 40 };
|
||||
boxes[3] = (Rectangle){ 1000, 50, 40, 40 };
|
||||
boxes[4] = (Rectangle){ 500, 350, 40, 40 };
|
||||
|
||||
for (int i = 5; i < MAX_BOXES; i++)
|
||||
{
|
||||
boxes[i] = (Rectangle){(float)GetRandomValue(0,GetScreenWidth()), (float)GetRandomValue(0,GetScreenHeight()), (float)GetRandomValue(10,100), (float)GetRandomValue(10,100) };
|
||||
}
|
||||
|
||||
*count = MAX_BOXES;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
//------------------------------------------------------------------------------------
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - top down lights");
|
||||
|
||||
// Initialize our 'world' of boxes
|
||||
int boxCount = 0;
|
||||
Rectangle boxes[MAX_BOXES] = { 0 };
|
||||
SetupBoxes(boxes, &boxCount);
|
||||
|
||||
// Create a checkerboard ground texture
|
||||
Image img = GenImageChecked(64, 64, 32, 32, DARKBROWN, DARKGRAY);
|
||||
Texture2D backgroundTexture = LoadTextureFromImage(img);
|
||||
UnloadImage(img);
|
||||
|
||||
// Create a global light mask to hold all the blended lights
|
||||
RenderTexture lightMask = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
|
||||
|
||||
// Setup initial light
|
||||
SetupLight(0, 600, 400, 300);
|
||||
int nextLight = 1;
|
||||
|
||||
bool showLines = false;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// Drag light 0
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT)) MoveLight(0, GetMousePosition().x, GetMousePosition().y);
|
||||
|
||||
// Make a new light
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_RIGHT) && (nextLight < MAX_LIGHTS))
|
||||
{
|
||||
SetupLight(nextLight, GetMousePosition().x, GetMousePosition().y, 200);
|
||||
nextLight++;
|
||||
}
|
||||
|
||||
// Toggle debug info
|
||||
if (IsKeyPressed(KEY_F1)) showLines = !showLines;
|
||||
|
||||
// Update the lights and keep track if any were dirty so we know if we need to update the master light mask
|
||||
bool dirtyLights = false;
|
||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||
{
|
||||
if (UpdateLight(i, boxes, boxCount)) dirtyLights = true;
|
||||
}
|
||||
|
||||
// Update the light mask
|
||||
if (dirtyLights)
|
||||
{
|
||||
// Build up the light mask
|
||||
BeginTextureMode(lightMask);
|
||||
|
||||
ClearBackground(BLACK);
|
||||
|
||||
// Force the blend mode to only set the alpha of the destination
|
||||
rlSetBlendFactors(RLGL_SRC_ALPHA, RLGL_SRC_ALPHA, RLGL_MIN);
|
||||
rlSetBlendMode(BLEND_CUSTOM);
|
||||
|
||||
// Merge in all the light masks
|
||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||
{
|
||||
if (lights[i].active) DrawTextureRec(lights[i].mask.texture, (Rectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), WHITE);
|
||||
}
|
||||
|
||||
rlDrawRenderBatchActive();
|
||||
|
||||
// Go back to normal blend
|
||||
rlSetBlendMode(BLEND_ALPHA);
|
||||
EndTextureMode();
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(BLACK);
|
||||
|
||||
// Draw the tile background
|
||||
DrawTextureRec(backgroundTexture, (Rectangle){ 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, Vector2Zero(), WHITE);
|
||||
|
||||
// Overlay the shadows from all the lights
|
||||
DrawTextureRec(lightMask.texture, (Rectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), ColorAlpha(WHITE, showLines? 0.75f : 1.0f));
|
||||
|
||||
// Draw the lights
|
||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||
{
|
||||
if (lights[i].active) DrawCircle((int)lights[i].position.x, (int)lights[i].position.y, 10, (i == 0)? YELLOW : WHITE);
|
||||
}
|
||||
|
||||
if (showLines)
|
||||
{
|
||||
for (int s = 0; s < lights[0].shadowCount; s++)
|
||||
{
|
||||
DrawTriangleFan(lights[0].shadows[s].vertices, 4, DARKPURPLE);
|
||||
}
|
||||
|
||||
for (int b = 0; b < boxCount; b++)
|
||||
{
|
||||
if (CheckCollisionRecs(boxes[b],lights[0].bounds)) DrawRectangleRec(boxes[b], PURPLE);
|
||||
|
||||
DrawRectangleLines((int)boxes[b].x, (int)boxes[b].y, (int)boxes[b].width, (int)boxes[b].height, DARKBLUE);
|
||||
}
|
||||
|
||||
DrawText("(F1) Hide Shadow Volumes", 10, 50, 10, GREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawText("(F1) Show Shadow Volumes", 10, 50, 10, GREEN);
|
||||
}
|
||||
|
||||
DrawFPS(screenWidth - 80, 10);
|
||||
DrawText("Drag to move light #1", 10, 10, 10, DARKGREEN);
|
||||
DrawText("Right click to add new light", 10, 30, 10, DARKGREEN);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(backgroundTexture);
|
||||
UnloadRenderTexture(lightMask);
|
||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||
{
|
||||
if (lights[i].active) UnloadRenderTexture(lights[i].mask);
|
||||
}
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
// Game: Generic
|
||||
// Format: Standard
|
||||
// entity 0
|
||||
{
|
||||
"classname" "worldspawn"
|
||||
"_tb_textures" "textures;textures/retro-texture-pack-v9"
|
||||
"_tb_mod" "textures"
|
||||
// brush 0
|
||||
{
|
||||
( -80 144 64 ) ( -80 0 64 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 64 ) ( 0 0 64 ) ( 0 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 32 ) ( 0 144 32 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 144 64 ) ( 0 144 64 ) ( 0 0 64 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( 0 144 32 ) ( 0 144 64 ) ( -80 144 64 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 64 ) ( 0 144 64 ) ( 0 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 1
|
||||
{
|
||||
( -176 120 40 ) ( -176 32 40 ) ( -176 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -176 32 40 ) ( -152 32 40 ) ( -152 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 32 ) ( -152 120 32 ) ( -176 120 32 ) __TB_empty 0 0 0 1 1
|
||||
( -176 120 40 ) ( -152 120 40 ) ( -152 32 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -152 120 32 ) ( -152 120 40 ) ( -176 120 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 40 ) ( -152 120 40 ) ( -152 120 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 2
|
||||
{
|
||||
( -136 144 48 ) ( -136 104 48 ) ( -136 104 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 104 48 ) ( -80 104 48 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 144 32 ) ( -136 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 144 48 ) ( -80 144 48 ) ( -80 104 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 144 32 ) ( -80 144 48 ) ( -136 144 48 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 104 48 ) ( -80 144 48 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 3
|
||||
{
|
||||
( -136 40 48 ) ( -136 0 48 ) ( -136 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 0 48 ) ( -80 0 48 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 32 ) ( -80 40 32 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 40 48 ) ( -80 40 48 ) ( -80 0 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 40 48 ) ( -136 40 48 ) __TB_empty 0 0 0 1 1
|
||||
( -80 0 48 ) ( -80 40 48 ) ( -80 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 4
|
||||
{
|
||||
( -152 104 56 ) ( -152 40 56 ) ( -152 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 40 56 ) ( -80 40 56 ) ( -80 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 104 32 ) ( -152 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 104 56 ) ( -80 104 56 ) ( -80 40 56 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 104 56 ) ( -152 104 56 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 56 ) ( -80 104 56 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 5
|
||||
{
|
||||
( -192 200 32 ) ( -192 -48 32 ) ( -192 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 -48 32 ) ( 16 -48 32 ) ( 16 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 24 ) ( 16 200 24 ) ( -192 200 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 200 32 ) ( 16 200 32 ) ( 16 -48 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 200 24 ) ( 16 200 32 ) ( -192 200 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 32 ) ( 16 200 32 ) ( 16 200 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
}
|
||||
// brush 6
|
||||
{
|
||||
( -32 120 64 ) ( -8 96 80 ) ( -8 96 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 64 ) ( -32 120 64 ) ( -8 96 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 80 ) ( -32 120 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 80 ) ( -32 120 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 64 ) ( -8 96 80 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 7
|
||||
{
|
||||
( -8 48 64 ) ( -8 48 80 ) ( -32 24 80 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 64 ) ( -32 24 64 ) ( -32 24 80 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( -8 48 64 ) ( -32 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -32 24 80 ) ( -8 48 80 ) ( -8 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 48 80 ) ( -8 48 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 8
|
||||
{
|
||||
( -152 40 40 ) ( -152 16 40 ) ( -152 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 16 40 ) ( -136 16 40 ) ( -136 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 16 32 ) ( -136 40 32 ) ( -152 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 40 40 ) ( -136 40 40 ) ( -136 16 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 40 32 ) ( -136 40 40 ) ( -152 40 40 ) __TB_empty 0 0 0 1 1
|
||||
( -136 16 40 ) ( -136 40 40 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 9
|
||||
{
|
||||
( -152 128 40 ) ( -152 96 40 ) ( -152 96 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 96 40 ) ( -136 96 40 ) ( -136 96 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 96 32 ) ( -136 128 32 ) ( -152 128 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 128 40 ) ( -136 128 40 ) ( -136 96 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 128 32 ) ( -136 128 40 ) ( -152 128 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 96 40 ) ( -136 128 40 ) ( -136 128 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 10
|
||||
{
|
||||
( -32 120 144 ) ( -8 96 160 ) ( -8 96 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 144 ) ( -32 120 144 ) ( -8 96 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 160 ) ( -32 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -32 120 144 ) ( -8 120 144 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 144 ) ( -8 96 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 11
|
||||
{
|
||||
( -8 48 144 ) ( -8 48 160 ) ( -32 24 160 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 144 ) ( -32 24 144 ) ( -32 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 144 ) ( -8 48 144 ) ( -32 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 160 ) ( -8 48 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 160 ) ( -8 48 160 ) ( -8 48 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 12
|
||||
{
|
||||
( -32 0 64 ) ( -32 1 64 ) ( -32 0 65 ) retro-texture-pack-v9/CRATE_1M 0 0 0 1 1
|
||||
( -32 0 64 ) ( -32 0 65 ) ( -31 0 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -32 0 64 ) ( -31 0 64 ) ( -32 1 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 160 ) ( 0 25 160 ) ( 1 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 72 ) ( 1 24 72 ) ( 0 24 73 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 24 72 ) ( 0 24 73 ) ( 0 25 72 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 13
|
||||
{
|
||||
( -32 120 160 ) ( -32 144 64 ) ( -32 144 160 ) retro-texture-pack-v9/CRATE_1M 48 0 0 1 1
|
||||
( 0 120 160 ) ( -32 120 64 ) ( -32 120 160 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 144 64 ) ( -32 120 64 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 120 160 ) ( -32 144 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 144 64 ) ( 0 144 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 0 144 160 ) ( 0 120 64 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 14
|
||||
{
|
||||
( -32 120 104 ) ( -8 96 120 ) ( -8 96 104 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 104 ) ( -32 120 104 ) ( -8 96 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 120 ) ( -32 120 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -32 120 104 ) ( -8 120 104 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 104 ) ( -8 96 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 15
|
||||
{
|
||||
( -8 48 104 ) ( -8 48 120 ) ( -32 24 120 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 104 ) ( -32 24 104 ) ( -32 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 104 ) ( -8 48 104 ) ( -32 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 120 ) ( -8 48 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 120 ) ( -8 48 120 ) ( -8 48 104 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 16
|
||||
{
|
||||
( -8 24 160 ) ( -8 24 144 ) ( -8 120 160 ) retro-texture-pack-v9/CRATE_1L 24 -7 0 1 1
|
||||
( 0 24 160 ) ( 0 24 144 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 144 ) ( -8 120 144 ) ( 0 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( 0 120 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 120 144 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 160 ) ( 0 120 144 ) ( 0 24 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 17
|
||||
{
|
||||
( -8 24 120 ) ( -8 24 104 ) ( -8 120 120 ) retro-texture-pack-v9/CRATE_1L -40 6 0 1 1
|
||||
( 0 24 120 ) ( 0 24 104 ) ( -8 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 104 ) ( -8 120 104 ) ( 0 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( 0 120 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 120 104 ) ( 0 120 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 120 ) ( 0 120 104 ) ( 0 24 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 18
|
||||
{
|
||||
( -8 120 64 ) ( -8 120 80 ) ( -8 24 64 ) retro-texture-pack-v9/CRATE_1L 24 0 0 1 1
|
||||
( -8 24 64 ) ( -8 24 80 ) ( 0 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( 0 24 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 120 80 ) ( 0 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 120 64 ) ( 0 120 80 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 64 ) ( 0 24 80 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 19
|
||||
{
|
||||
( 0 0 144 ) ( 0 144 32 ) ( 0 144 144 ) retro-texture-pack-v9/LIGHT_1A -19 -16 0 1 1
|
||||
( 16 0 144 ) ( 0 0 32 ) ( 0 0 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 32 ) ( 0 0 32 ) ( 16 0 32 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 0 144 ) ( 0 144 144 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 144 32 ) ( 16 144 32 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 144 ) ( 16 0 32 ) ( 16 0 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 20
|
||||
{
|
||||
( -48 80 96 ) ( -48 96 64 ) ( -48 96 96 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -32 80 96 ) ( -48 80 64 ) ( -48 80 96 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -32 96 64 ) ( -48 80 64 ) ( -32 80 64 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -32 96 96 ) ( -48 80 96 ) ( -48 96 96 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -32 96 96 ) ( -48 96 64 ) ( -32 96 64 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -32 96 96 ) ( -32 80 64 ) ( -32 80 96 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
}
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
// Game: Generic
|
||||
// Format: Standard
|
||||
// entity 0
|
||||
{
|
||||
"classname" "worldspawn"
|
||||
"_tb_textures" "textures;textures/retro-texture-pack-v9"
|
||||
"_tb_mod" "textures"
|
||||
// brush 0
|
||||
{
|
||||
( -80 144 64 ) ( -80 0 64 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 64 ) ( 0 0 64 ) ( 0 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 32 ) ( 0 144 32 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 144 64 ) ( 0 144 64 ) ( 0 0 64 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( 0 144 32 ) ( 0 144 64 ) ( -80 144 64 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 64 ) ( 0 144 64 ) ( 0 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 1
|
||||
{
|
||||
( -176 120 40 ) ( -176 32 40 ) ( -176 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -176 32 40 ) ( -152 32 40 ) ( -152 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 32 ) ( -152 120 32 ) ( -176 120 32 ) __TB_empty 0 0 0 1 1
|
||||
( -176 120 40 ) ( -152 120 40 ) ( -152 32 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -152 120 32 ) ( -152 120 40 ) ( -176 120 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 40 ) ( -152 120 40 ) ( -152 120 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 2
|
||||
{
|
||||
( -136 144 48 ) ( -136 104 48 ) ( -136 104 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 104 48 ) ( -80 104 48 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 144 32 ) ( -136 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 144 48 ) ( -80 144 48 ) ( -80 104 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 144 32 ) ( -80 144 48 ) ( -136 144 48 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 104 48 ) ( -80 144 48 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 3
|
||||
{
|
||||
( -136 40 48 ) ( -136 0 48 ) ( -136 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 0 48 ) ( -80 0 48 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 32 ) ( -80 40 32 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 40 48 ) ( -80 40 48 ) ( -80 0 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 40 48 ) ( -136 40 48 ) __TB_empty 0 0 0 1 1
|
||||
( -80 0 48 ) ( -80 40 48 ) ( -80 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 4
|
||||
{
|
||||
( -152 104 56 ) ( -152 40 56 ) ( -152 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 40 56 ) ( -80 40 56 ) ( -80 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 104 32 ) ( -152 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 104 56 ) ( -80 104 56 ) ( -80 40 56 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 104 56 ) ( -152 104 56 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 56 ) ( -80 104 56 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 5
|
||||
{
|
||||
( -192 200 32 ) ( -192 -48 32 ) ( -192 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 -48 32 ) ( 16 -48 32 ) ( 16 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 24 ) ( 16 200 24 ) ( -192 200 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 200 32 ) ( 16 200 32 ) ( 16 -48 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 200 24 ) ( 16 200 32 ) ( -192 200 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 32 ) ( 16 200 32 ) ( 16 200 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
}
|
||||
// brush 6
|
||||
{
|
||||
( -32 120 64 ) ( -8 96 80 ) ( -8 96 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 64 ) ( -32 120 64 ) ( -8 96 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 80 ) ( -32 120 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 80 ) ( -32 120 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 64 ) ( -8 96 80 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 7
|
||||
{
|
||||
( -8 48 64 ) ( -8 48 80 ) ( -32 24 80 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 64 ) ( -32 24 64 ) ( -32 24 80 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( -8 48 64 ) ( -32 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -32 24 80 ) ( -8 48 80 ) ( -8 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 48 80 ) ( -8 48 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 8
|
||||
{
|
||||
( -152 40 40 ) ( -152 16 40 ) ( -152 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 16 40 ) ( -136 16 40 ) ( -136 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 16 32 ) ( -136 40 32 ) ( -152 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 40 40 ) ( -136 40 40 ) ( -136 16 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 40 32 ) ( -136 40 40 ) ( -152 40 40 ) __TB_empty 0 0 0 1 1
|
||||
( -136 16 40 ) ( -136 40 40 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 9
|
||||
{
|
||||
( -152 128 40 ) ( -152 96 40 ) ( -152 96 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 96 40 ) ( -136 96 40 ) ( -136 96 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 96 32 ) ( -136 128 32 ) ( -152 128 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 128 40 ) ( -136 128 40 ) ( -136 96 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 128 32 ) ( -136 128 40 ) ( -152 128 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 96 40 ) ( -136 128 40 ) ( -136 128 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 10
|
||||
{
|
||||
( -32 120 144 ) ( -8 96 160 ) ( -8 96 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 144 ) ( -32 120 144 ) ( -8 96 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 160 ) ( -32 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -32 120 144 ) ( -8 120 144 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 144 ) ( -8 96 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 11
|
||||
{
|
||||
( -8 48 144 ) ( -8 48 160 ) ( -32 24 160 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 144 ) ( -32 24 144 ) ( -32 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 144 ) ( -8 48 144 ) ( -32 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 160 ) ( -8 48 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 160 ) ( -8 48 160 ) ( -8 48 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 12
|
||||
{
|
||||
( -32 0 64 ) ( -32 1 64 ) ( -32 0 65 ) retro-texture-pack-v9/CRATE_1M 0 0 0 1 1
|
||||
( -32 0 64 ) ( -32 0 65 ) ( -31 0 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -32 0 64 ) ( -31 0 64 ) ( -32 1 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 160 ) ( 0 25 160 ) ( 1 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 72 ) ( 1 24 72 ) ( 0 24 73 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 24 72 ) ( 0 24 73 ) ( 0 25 72 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 13
|
||||
{
|
||||
( -32 120 160 ) ( -32 144 64 ) ( -32 144 160 ) retro-texture-pack-v9/CRATE_1M 48 0 0 1 1
|
||||
( 0 120 160 ) ( -32 120 64 ) ( -32 120 160 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 144 64 ) ( -32 120 64 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 120 160 ) ( -32 144 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 144 64 ) ( 0 144 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 0 144 160 ) ( 0 120 64 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 14
|
||||
{
|
||||
( -32 120 104 ) ( -8 96 120 ) ( -8 96 104 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 104 ) ( -32 120 104 ) ( -8 96 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 120 ) ( -32 120 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -32 120 104 ) ( -8 120 104 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 104 ) ( -8 96 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 15
|
||||
{
|
||||
( -8 48 104 ) ( -8 48 120 ) ( -32 24 120 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 104 ) ( -32 24 104 ) ( -32 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 104 ) ( -8 48 104 ) ( -32 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 120 ) ( -8 48 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 120 ) ( -8 48 120 ) ( -8 48 104 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 16
|
||||
{
|
||||
( -8 24 160 ) ( -8 24 144 ) ( -8 120 160 ) retro-texture-pack-v9/CRATE_1L 24 -7 0 1 1
|
||||
( 0 24 160 ) ( 0 24 144 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 144 ) ( -8 120 144 ) ( 0 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( 0 120 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 120 144 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 160 ) ( 0 120 144 ) ( 0 24 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 17
|
||||
{
|
||||
( -8 24 120 ) ( -8 24 104 ) ( -8 120 120 ) retro-texture-pack-v9/CRATE_1L -40 6 0 1 1
|
||||
( 0 24 120 ) ( 0 24 104 ) ( -8 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 104 ) ( -8 120 104 ) ( 0 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( 0 120 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 120 104 ) ( 0 120 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 120 ) ( 0 120 104 ) ( 0 24 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 18
|
||||
{
|
||||
( -8 120 64 ) ( -8 120 80 ) ( -8 24 64 ) retro-texture-pack-v9/CRATE_1L 24 0 0 1 1
|
||||
( -8 24 64 ) ( -8 24 80 ) ( 0 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( 0 24 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 120 80 ) ( 0 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 120 64 ) ( 0 120 80 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 64 ) ( 0 24 80 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 19
|
||||
{
|
||||
( 0 0 144 ) ( 0 144 32 ) ( 0 144 144 ) retro-texture-pack-v9/LIGHT_1A -19 -16 0 1 1
|
||||
( 16 0 144 ) ( 0 0 32 ) ( 0 0 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 32 ) ( 0 0 32 ) ( 16 0 32 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 0 144 ) ( 0 144 144 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 144 32 ) ( 16 144 32 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 144 ) ( 16 0 32 ) ( 16 0 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 20
|
||||
{
|
||||
( -70.62741699796953 80 64 ) ( -69.92031021678298 80.70710678118655 64 ) ( -70.62741699796953 80 65 ) retro-texture-pack-v9/CRATE_1H -34.274063 0 0 0.35355356 0.49999976
|
||||
( -70.62741699796953 80 64 ) ( -70.62741699796953 80 65 ) ( -69.92031021678298 79.29289321881346 64 ) retro-texture-pack-v9/CRATE_1H -7.764488 0 180 0.35355344 -0.49999976
|
||||
( -70.62741699796953 80 64 ) ( -69.92031021678298 79.29289321881346 64 ) ( -69.92031021678298 80.70710678118655 64 ) retro-texture-pack-v9/CRATE_1H 42.509666 -9.3725815 315 1 1
|
||||
( -25.372583002030495 80 96 ) ( -24.665476220843942 80.70710678118655 96 ) ( -24.665476220843942 79.29289321881345 96 ) retro-texture-pack-v9/CRATE_1H -49.952244 -21.019333 225 0.5079364 0.5
|
||||
( -25.372583002030495 80 80 ) ( -25.372583002030495 80 81 ) ( -24.665476220843942 80.70710678118655 80 ) retro-texture-pack-v9/CRATE_1H -1.137085 0 0 0.70710677 1
|
||||
( -25.372583002030495 80 80 ) ( -24.665476220843942 79.29289321881345 80 ) ( -25.372583002030495 80 81 ) retro-texture-pack-v9/CRATE_1H 25.20314 0 180 0.3649583 -0.49999988
|
||||
}
|
||||
}
|
|
@ -1,200 +0,0 @@
|
|||
// Game: Generic
|
||||
// Format: Standard
|
||||
// entity 0
|
||||
{
|
||||
"classname" "worldspawn"
|
||||
"_tb_textures" "textures;textures/retro-texture-pack-v9"
|
||||
"_tb_mod" "textures"
|
||||
// brush 0
|
||||
{
|
||||
( -80 144 64 ) ( -80 0 64 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 64 ) ( 0 0 64 ) ( 0 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 32 ) ( 0 144 32 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 144 64 ) ( 0 144 64 ) ( 0 0 64 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( 0 144 32 ) ( 0 144 64 ) ( -80 144 64 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 64 ) ( 0 144 64 ) ( 0 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 1
|
||||
{
|
||||
( -176 120 40 ) ( -176 32 40 ) ( -176 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -176 32 40 ) ( -152 32 40 ) ( -152 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 32 ) ( -152 120 32 ) ( -176 120 32 ) __TB_empty 0 0 0 1 1
|
||||
( -176 120 40 ) ( -152 120 40 ) ( -152 32 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -152 120 32 ) ( -152 120 40 ) ( -176 120 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 40 ) ( -152 120 40 ) ( -152 120 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 2
|
||||
{
|
||||
( -136 144 48 ) ( -136 104 48 ) ( -136 104 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 104 48 ) ( -80 104 48 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 144 32 ) ( -136 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 144 48 ) ( -80 144 48 ) ( -80 104 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 144 32 ) ( -80 144 48 ) ( -136 144 48 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 104 48 ) ( -80 144 48 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 3
|
||||
{
|
||||
( -136 40 48 ) ( -136 0 48 ) ( -136 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 0 48 ) ( -80 0 48 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 32 ) ( -80 40 32 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 40 48 ) ( -80 40 48 ) ( -80 0 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 40 48 ) ( -136 40 48 ) __TB_empty 0 0 0 1 1
|
||||
( -80 0 48 ) ( -80 40 48 ) ( -80 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 4
|
||||
{
|
||||
( -152 104 56 ) ( -152 40 56 ) ( -152 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 40 56 ) ( -80 40 56 ) ( -80 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 104 32 ) ( -152 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 104 56 ) ( -80 104 56 ) ( -80 40 56 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 104 56 ) ( -152 104 56 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 56 ) ( -80 104 56 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 5
|
||||
{
|
||||
( -192 376 32 ) ( -192 -48 32 ) ( -192 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 -48 32 ) ( 16 -48 32 ) ( 16 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 24 ) ( 16 376 24 ) ( -192 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 376 32 ) ( 16 376 32 ) ( 16 -48 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 376 24 ) ( 16 376 32 ) ( -192 376 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 32 ) ( 16 376 32 ) ( 16 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
}
|
||||
// brush 6
|
||||
{
|
||||
( -32 120 64 ) ( -8 96 80 ) ( -8 96 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 64 ) ( -32 120 64 ) ( -8 96 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 80 ) ( -32 120 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 80 ) ( -32 120 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 64 ) ( -8 96 80 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 7
|
||||
{
|
||||
( -8 48 64 ) ( -8 48 80 ) ( -32 24 80 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 64 ) ( -32 24 64 ) ( -32 24 80 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( -8 48 64 ) ( -32 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -32 24 80 ) ( -8 48 80 ) ( -8 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 48 80 ) ( -8 48 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 8
|
||||
{
|
||||
( -152 40 40 ) ( -152 16 40 ) ( -152 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 16 40 ) ( -136 16 40 ) ( -136 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 16 32 ) ( -136 40 32 ) ( -152 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 40 40 ) ( -136 40 40 ) ( -136 16 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 40 32 ) ( -136 40 40 ) ( -152 40 40 ) __TB_empty 0 0 0 1 1
|
||||
( -136 16 40 ) ( -136 40 40 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 9
|
||||
{
|
||||
( -152 128 40 ) ( -152 96 40 ) ( -152 96 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 96 40 ) ( -136 96 40 ) ( -136 96 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 96 32 ) ( -136 128 32 ) ( -152 128 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 128 40 ) ( -136 128 40 ) ( -136 96 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 128 32 ) ( -136 128 40 ) ( -152 128 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 96 40 ) ( -136 128 40 ) ( -136 128 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 10
|
||||
{
|
||||
( -32 120 144 ) ( -8 96 160 ) ( -8 96 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 144 ) ( -32 120 144 ) ( -8 96 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 160 ) ( -32 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -32 120 144 ) ( -8 120 144 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 144 ) ( -8 96 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 11
|
||||
{
|
||||
( -8 48 144 ) ( -8 48 160 ) ( -32 24 160 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 144 ) ( -32 24 144 ) ( -32 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 144 ) ( -8 48 144 ) ( -32 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 160 ) ( -8 48 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 160 ) ( -8 48 160 ) ( -8 48 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 12
|
||||
{
|
||||
( -32 0 64 ) ( -32 1 64 ) ( -32 0 65 ) retro-texture-pack-v9/CRATE_1M 0 0 0 1 1
|
||||
( -32 0 64 ) ( -32 0 65 ) ( -31 0 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -32 0 64 ) ( -31 0 64 ) ( -32 1 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 160 ) ( 0 25 160 ) ( 1 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 72 ) ( 1 24 72 ) ( 0 24 73 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 24 72 ) ( 0 24 73 ) ( 0 25 72 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 13
|
||||
{
|
||||
( -32 120 160 ) ( -32 144 64 ) ( -32 144 160 ) retro-texture-pack-v9/CRATE_1M 48 0 0 1 1
|
||||
( 0 120 160 ) ( -32 120 64 ) ( -32 120 160 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 144 64 ) ( -32 120 64 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 120 160 ) ( -32 144 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 144 64 ) ( 0 144 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 0 144 160 ) ( 0 120 64 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 14
|
||||
{
|
||||
( -32 120 104 ) ( -8 96 120 ) ( -8 96 104 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 104 ) ( -32 120 104 ) ( -8 96 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 120 ) ( -32 120 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -32 120 104 ) ( -8 120 104 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 104 ) ( -8 96 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 15
|
||||
{
|
||||
( -8 48 104 ) ( -8 48 120 ) ( -32 24 120 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 104 ) ( -32 24 104 ) ( -32 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 104 ) ( -8 48 104 ) ( -32 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 120 ) ( -8 48 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 120 ) ( -8 48 120 ) ( -8 48 104 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 16
|
||||
{
|
||||
( -8 24 160 ) ( -8 24 144 ) ( -8 120 160 ) retro-texture-pack-v9/CRATE_1L 24 -7 0 1 1
|
||||
( 0 24 160 ) ( 0 24 144 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 144 ) ( -8 120 144 ) ( 0 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( 0 120 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 120 144 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 160 ) ( 0 120 144 ) ( 0 24 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 17
|
||||
{
|
||||
( -8 24 120 ) ( -8 24 104 ) ( -8 120 120 ) retro-texture-pack-v9/CRATE_1L -40 6 0 1 1
|
||||
( 0 24 120 ) ( 0 24 104 ) ( -8 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 104 ) ( -8 120 104 ) ( 0 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( 0 120 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 120 104 ) ( 0 120 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 120 ) ( 0 120 104 ) ( 0 24 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 18
|
||||
{
|
||||
( -8 120 64 ) ( -8 120 80 ) ( -8 24 64 ) retro-texture-pack-v9/CRATE_1L 24 0 0 1 1
|
||||
( -8 24 64 ) ( -8 24 80 ) ( 0 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( 0 24 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 120 80 ) ( 0 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 120 64 ) ( 0 120 80 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 64 ) ( 0 24 80 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 19
|
||||
{
|
||||
( 0 0 144 ) ( 0 144 32 ) ( 0 144 144 ) retro-texture-pack-v9/LIGHT_1A -19 -16 0 1 1
|
||||
( 16 0 144 ) ( 0 0 32 ) ( 0 0 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 32 ) ( 0 0 32 ) ( 16 0 32 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 0 144 ) ( 0 144 144 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 144 32 ) ( 16 144 32 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 144 ) ( 16 0 32 ) ( 16 0 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 20
|
||||
{
|
||||
( -70.62741699796953 80 64 ) ( -69.92031021678298 80.70710678118655 64 ) ( -70.62741699796953 80 65 ) retro-texture-pack-v9/CRATE_1H -34.274063 0 0 0.35355356 0.49999976
|
||||
( -70.62741699796953 80 64 ) ( -70.62741699796953 80 65 ) ( -69.92031021678298 79.29289321881346 64 ) retro-texture-pack-v9/CRATE_1H -7.764488 0 180 0.35355344 -0.49999976
|
||||
( -70.62741699796953 80 64 ) ( -69.92031021678298 79.29289321881346 64 ) ( -69.92031021678298 80.70710678118655 64 ) retro-texture-pack-v9/CRATE_1H 42.509666 -9.3725815 315 1 1
|
||||
( -25.372583002030495 80 96 ) ( -24.665476220843942 80.70710678118655 96 ) ( -24.665476220843942 79.29289321881345 96 ) retro-texture-pack-v9/CRATE_1H -49.952244 -21.019333 225 0.5079364 0.5
|
||||
( -25.372583002030495 80 80 ) ( -25.372583002030495 80 81 ) ( -24.665476220843942 80.70710678118655 80 ) retro-texture-pack-v9/CRATE_1H -1.137085 0 0 0.70710677 1
|
||||
( -25.372583002030495 80 80 ) ( -24.665476220843942 79.29289321881345 80 ) ( -25.372583002030495 80 81 ) retro-texture-pack-v9/CRATE_1H 25.20314 0 180 0.3649583 -0.49999988
|
||||
}
|
||||
// brush 21
|
||||
{
|
||||
( 0 144 144 ) ( 0 368 32 ) ( 0 368 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 144 32 ) ( 0 144 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 368 32 ) ( 0 144 32 ) ( 16 144 32 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 368 144 ) ( 0 144 144 ) ( 0 368 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 368 144 ) ( 0 368 32 ) ( 16 368 32 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 368 144 ) ( 16 144 32 ) ( 16 144 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
}
|
||||
}
|
|
@ -1,244 +0,0 @@
|
|||
// Game: Generic
|
||||
// Format: Standard
|
||||
// entity 0
|
||||
{
|
||||
"classname" "worldspawn"
|
||||
"_tb_textures" "textures;textures/retro-texture-pack-v9"
|
||||
"_tb_mod" "textures"
|
||||
// brush 0
|
||||
{
|
||||
( -80 144 64 ) ( -80 0 64 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 64 ) ( 0 0 64 ) ( 0 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 32 ) ( 0 144 32 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 144 64 ) ( 0 144 64 ) ( 0 0 64 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( 0 144 32 ) ( 0 144 64 ) ( -80 144 64 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 64 ) ( 0 144 64 ) ( 0 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 1
|
||||
{
|
||||
( -176 120 40 ) ( -176 32 40 ) ( -176 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -176 32 40 ) ( -152 32 40 ) ( -152 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 32 ) ( -152 120 32 ) ( -176 120 32 ) __TB_empty 0 0 0 1 1
|
||||
( -176 120 40 ) ( -152 120 40 ) ( -152 32 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -152 120 32 ) ( -152 120 40 ) ( -176 120 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 40 ) ( -152 120 40 ) ( -152 120 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 2
|
||||
{
|
||||
( -136 144 48 ) ( -136 104 48 ) ( -136 104 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 104 48 ) ( -80 104 48 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 144 32 ) ( -136 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 144 48 ) ( -80 144 48 ) ( -80 104 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 144 32 ) ( -80 144 48 ) ( -136 144 48 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 104 48 ) ( -80 144 48 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 3
|
||||
{
|
||||
( -136 40 48 ) ( -136 0 48 ) ( -136 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 0 48 ) ( -80 0 48 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 32 ) ( -80 40 32 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 40 48 ) ( -80 40 48 ) ( -80 0 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 40 48 ) ( -136 40 48 ) __TB_empty 0 0 0 1 1
|
||||
( -80 0 48 ) ( -80 40 48 ) ( -80 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 4
|
||||
{
|
||||
( -152 104 56 ) ( -152 40 56 ) ( -152 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 40 56 ) ( -80 40 56 ) ( -80 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 104 32 ) ( -152 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 104 56 ) ( -80 104 56 ) ( -80 40 56 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 104 56 ) ( -152 104 56 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 56 ) ( -80 104 56 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 5
|
||||
{
|
||||
( -192 376 32 ) ( -192 -48 32 ) ( -192 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 -48 32 ) ( 16 -48 32 ) ( 16 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 24 ) ( 16 376 24 ) ( -192 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 376 32 ) ( 16 376 32 ) ( 16 -48 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 376 24 ) ( 16 376 32 ) ( -192 376 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 32 ) ( 16 376 32 ) ( 16 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
}
|
||||
// brush 6
|
||||
{
|
||||
( -32 120 64 ) ( -8 96 80 ) ( -8 96 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 64 ) ( -32 120 64 ) ( -8 96 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 80 ) ( -32 120 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 80 ) ( -32 120 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 64 ) ( -8 96 80 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 7
|
||||
{
|
||||
( -8 48 64 ) ( -8 48 80 ) ( -32 24 80 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 64 ) ( -32 24 64 ) ( -32 24 80 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( -8 48 64 ) ( -32 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -32 24 80 ) ( -8 48 80 ) ( -8 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 48 80 ) ( -8 48 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 8
|
||||
{
|
||||
( -152 40 40 ) ( -152 16 40 ) ( -152 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 16 40 ) ( -136 16 40 ) ( -136 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 16 32 ) ( -136 40 32 ) ( -152 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 40 40 ) ( -136 40 40 ) ( -136 16 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 40 32 ) ( -136 40 40 ) ( -152 40 40 ) __TB_empty 0 0 0 1 1
|
||||
( -136 16 40 ) ( -136 40 40 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 9
|
||||
{
|
||||
( -152 128 40 ) ( -152 96 40 ) ( -152 96 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 96 40 ) ( -136 96 40 ) ( -136 96 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 96 32 ) ( -136 128 32 ) ( -152 128 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 128 40 ) ( -136 128 40 ) ( -136 96 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 128 32 ) ( -136 128 40 ) ( -152 128 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 96 40 ) ( -136 128 40 ) ( -136 128 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 10
|
||||
{
|
||||
( -32 120 144 ) ( -8 96 160 ) ( -8 96 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 144 ) ( -32 120 144 ) ( -8 96 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 160 ) ( -32 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -32 120 144 ) ( -8 120 144 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 144 ) ( -8 96 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 11
|
||||
{
|
||||
( -8 48 144 ) ( -8 48 160 ) ( -32 24 160 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 144 ) ( -32 24 144 ) ( -32 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 144 ) ( -8 48 144 ) ( -32 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 160 ) ( -8 48 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 160 ) ( -8 48 160 ) ( -8 48 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 12
|
||||
{
|
||||
( -32 0 64 ) ( -32 1 64 ) ( -32 0 65 ) retro-texture-pack-v9/CRATE_1M 0 0 0 1 1
|
||||
( -32 0 64 ) ( -32 0 65 ) ( -31 0 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -32 0 64 ) ( -31 0 64 ) ( -32 1 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 160 ) ( 0 25 160 ) ( 1 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 72 ) ( 1 24 72 ) ( 0 24 73 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 24 72 ) ( 0 24 73 ) ( 0 25 72 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 13
|
||||
{
|
||||
( -32 120 160 ) ( -32 144 64 ) ( -32 144 160 ) retro-texture-pack-v9/CRATE_1M 48 0 0 1 1
|
||||
( 0 120 160 ) ( -32 120 64 ) ( -32 120 160 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 144 64 ) ( -32 120 64 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 120 160 ) ( -32 144 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 144 64 ) ( 0 144 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 0 144 160 ) ( 0 120 64 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 14
|
||||
{
|
||||
( -32 120 104 ) ( -8 96 120 ) ( -8 96 104 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 104 ) ( -32 120 104 ) ( -8 96 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 120 ) ( -32 120 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -32 120 104 ) ( -8 120 104 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 104 ) ( -8 96 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 15
|
||||
{
|
||||
( -8 48 104 ) ( -8 48 120 ) ( -32 24 120 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 104 ) ( -32 24 104 ) ( -32 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 104 ) ( -8 48 104 ) ( -32 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 120 ) ( -8 48 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 120 ) ( -8 48 120 ) ( -8 48 104 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 16
|
||||
{
|
||||
( -8 24 160 ) ( -8 24 144 ) ( -8 120 160 ) retro-texture-pack-v9/CRATE_1L 24 -7 0 1 1
|
||||
( 0 24 160 ) ( 0 24 144 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 144 ) ( -8 120 144 ) ( 0 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( 0 120 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 120 144 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 160 ) ( 0 120 144 ) ( 0 24 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 17
|
||||
{
|
||||
( -8 24 120 ) ( -8 24 104 ) ( -8 120 120 ) retro-texture-pack-v9/CRATE_1L -40 6 0 1 1
|
||||
( 0 24 120 ) ( 0 24 104 ) ( -8 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 104 ) ( -8 120 104 ) ( 0 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( 0 120 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 120 104 ) ( 0 120 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 120 ) ( 0 120 104 ) ( 0 24 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 18
|
||||
{
|
||||
( -8 120 64 ) ( -8 120 80 ) ( -8 24 64 ) retro-texture-pack-v9/CRATE_1L 24 0 0 1 1
|
||||
( -8 24 64 ) ( -8 24 80 ) ( 0 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( 0 24 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 120 80 ) ( 0 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 120 64 ) ( 0 120 80 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 64 ) ( 0 24 80 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 19
|
||||
{
|
||||
( 0 0 144 ) ( 0 144 32 ) ( 0 144 144 ) retro-texture-pack-v9/LIGHT_1A -19 -16 0 1 1
|
||||
( 16 0 144 ) ( 0 0 32 ) ( 0 0 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 32 ) ( 0 0 32 ) ( 16 0 32 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 0 144 ) ( 0 144 144 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 144 32 ) ( 16 144 32 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 144 ) ( 16 0 32 ) ( 16 0 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 20
|
||||
{
|
||||
( -70.62741699796953 80 64 ) ( -69.92031021678298 80.70710678118655 64 ) ( -70.62741699796953 80 65 ) retro-texture-pack-v9/CRATE_1H -34.274063 0 0 0.35355356 0.49999976
|
||||
( -70.62741699796953 80 64 ) ( -70.62741699796953 80 65 ) ( -69.92031021678298 79.29289321881346 64 ) retro-texture-pack-v9/CRATE_1H -7.764488 0 180 0.35355344 -0.49999976
|
||||
( -70.62741699796953 80 64 ) ( -69.92031021678298 79.29289321881346 64 ) ( -69.92031021678298 80.70710678118655 64 ) retro-texture-pack-v9/CRATE_1H 42.509666 -9.3725815 315 1 1
|
||||
( -25.372583002030495 80 96 ) ( -24.665476220843942 80.70710678118655 96 ) ( -24.665476220843942 79.29289321881345 96 ) retro-texture-pack-v9/CRATE_1H -49.952244 -21.019333 225 0.5079364 0.5
|
||||
( -25.372583002030495 80 80 ) ( -25.372583002030495 80 81 ) ( -24.665476220843942 80.70710678118655 80 ) retro-texture-pack-v9/CRATE_1H -1.137085 0 0 0.70710677 1
|
||||
( -25.372583002030495 80 80 ) ( -24.665476220843942 79.29289321881345 80 ) ( -25.372583002030495 80 81 ) retro-texture-pack-v9/CRATE_1H 25.20314 0 180 0.3649583 -0.49999988
|
||||
}
|
||||
// brush 21
|
||||
{
|
||||
( 16 256 96 ) ( 16 272 32 ) ( 16 272 80 ) retro-texture-pack-v9/DOOR_2C -16 -35 0 1 1.032258
|
||||
( 32 208 80 ) ( 16 208 32 ) ( 16 208 80 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 224 96 ) ( 16 208 80 ) ( 16 224 96 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 272 32 ) ( 16 208 32 ) ( 32 208 32 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 256 96 ) ( 16 224 96 ) ( 16 256 96 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 272 80 ) ( 16 256 96 ) ( 16 272 80 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 272 80 ) ( 16 272 32 ) ( 32 272 32 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 272 80 ) ( 32 224 96 ) ( 32 256 96 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 22
|
||||
{
|
||||
( 0 352 144 ) ( 0 272 144 ) ( 0 352 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 272 32 ) ( 0 272 32 ) ( 16 272 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 352 32 ) ( 0 272 32 ) ( 16 352 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 352 144 ) ( 16 272 144 ) ( 0 352 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 0 352 32 ) ( 16 352 32 ) ( 0 352 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 16 352 32 ) ( 16 272 32 ) ( 16 352 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 23
|
||||
{
|
||||
( 0 128 32 ) ( 0 208 32 ) ( 0 128 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 128 144 ) ( 16 128 144 ) ( 0 128 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 16 128 32 ) ( 16 208 32 ) ( 0 128 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 128 144 ) ( 0 208 144 ) ( 16 128 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 0 208 144 ) ( 0 208 32 ) ( 16 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 128 144 ) ( 16 208 144 ) ( 16 128 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 24
|
||||
{
|
||||
( 0 272 144 ) ( 0 208 144 ) ( 0 272 80 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 272 80 ) ( 0 208 144 ) ( 16 272 80 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 272 144 ) ( 16 208 144 ) ( 0 272 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 0 272 144 ) ( 0 272 80 ) ( 16 272 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 272 144 ) ( 16 272 80 ) ( 16 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 25
|
||||
{
|
||||
( 0 208 144 ) ( 0 208 80 ) ( 0 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 208 144 ) ( 16 208 80 ) ( 0 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 208 80 ) ( 16 208 80 ) ( 0 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 208 144 ) ( 0 240 112 ) ( 16 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 208 144 ) ( 16 240 112 ) ( 16 208 80 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 26
|
||||
{
|
||||
( 0 240 112 ) ( 0 224 96 ) ( 0 256 96 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 240 112 ) ( 16 224 96 ) ( 0 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 224 96 ) ( 16 256 96 ) ( 0 224 96 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 240 112 ) ( 0 256 96 ) ( 16 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 240 112 ) ( 16 256 96 ) ( 16 224 96 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
}
|
|
@ -1,244 +0,0 @@
|
|||
// Game: Generic
|
||||
// Format: Standard
|
||||
// entity 0
|
||||
{
|
||||
"classname" "worldspawn"
|
||||
"_tb_textures" "textures;textures/retro-texture-pack-v9"
|
||||
"_tb_mod" "textures"
|
||||
// brush 0
|
||||
{
|
||||
( -80 160 64 ) ( -80 0 64 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 64 ) ( 0 0 64 ) ( 0 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 32 ) ( 0 160 32 ) ( -80 160 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 160 64 ) ( 0 160 64 ) ( 0 0 64 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( 0 160 32 ) ( 0 160 64 ) ( -80 160 64 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 64 ) ( 0 160 64 ) ( 0 160 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 1
|
||||
{
|
||||
( -176 120 40 ) ( -176 32 40 ) ( -176 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -176 32 40 ) ( -152 32 40 ) ( -152 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 32 ) ( -152 120 32 ) ( -176 120 32 ) __TB_empty 0 0 0 1 1
|
||||
( -176 120 40 ) ( -152 120 40 ) ( -152 32 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -152 120 32 ) ( -152 120 40 ) ( -176 120 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 40 ) ( -152 120 40 ) ( -152 120 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 2
|
||||
{
|
||||
( -136 144 48 ) ( -136 104 48 ) ( -136 104 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 104 48 ) ( -80 104 48 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 144 32 ) ( -136 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 144 48 ) ( -80 144 48 ) ( -80 104 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 144 32 ) ( -80 144 48 ) ( -136 144 48 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 104 48 ) ( -80 144 48 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 3
|
||||
{
|
||||
( -136 40 48 ) ( -136 0 48 ) ( -136 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 0 48 ) ( -80 0 48 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 32 ) ( -80 40 32 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 40 48 ) ( -80 40 48 ) ( -80 0 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 40 48 ) ( -136 40 48 ) __TB_empty 0 0 0 1 1
|
||||
( -80 0 48 ) ( -80 40 48 ) ( -80 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 4
|
||||
{
|
||||
( -152 104 56 ) ( -152 40 56 ) ( -152 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 40 56 ) ( -80 40 56 ) ( -80 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 104 32 ) ( -152 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 104 56 ) ( -80 104 56 ) ( -80 40 56 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 104 56 ) ( -152 104 56 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 56 ) ( -80 104 56 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 5
|
||||
{
|
||||
( -192 376 32 ) ( -192 -48 32 ) ( -192 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 -48 32 ) ( 16 -48 32 ) ( 16 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 24 ) ( 16 376 24 ) ( -192 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 376 32 ) ( 16 376 32 ) ( 16 -48 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 376 24 ) ( 16 376 32 ) ( -192 376 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 32 ) ( 16 376 32 ) ( 16 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
}
|
||||
// brush 6
|
||||
{
|
||||
( -32 120 64 ) ( -8 96 80 ) ( -8 96 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 64 ) ( -32 120 64 ) ( -8 96 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 80 ) ( -32 120 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 80 ) ( -32 120 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 64 ) ( -8 96 80 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 7
|
||||
{
|
||||
( -8 48 64 ) ( -8 48 80 ) ( -32 24 80 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 64 ) ( -32 24 64 ) ( -32 24 80 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( -8 48 64 ) ( -32 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -32 24 80 ) ( -8 48 80 ) ( -8 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 48 80 ) ( -8 48 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 8
|
||||
{
|
||||
( -152 40 40 ) ( -152 16 40 ) ( -152 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 16 40 ) ( -136 16 40 ) ( -136 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 16 32 ) ( -136 40 32 ) ( -152 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 40 40 ) ( -136 40 40 ) ( -136 16 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 40 32 ) ( -136 40 40 ) ( -152 40 40 ) __TB_empty 0 0 0 1 1
|
||||
( -136 16 40 ) ( -136 40 40 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 9
|
||||
{
|
||||
( -152 128 40 ) ( -152 96 40 ) ( -152 96 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 96 40 ) ( -136 96 40 ) ( -136 96 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 96 32 ) ( -136 128 32 ) ( -152 128 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 128 40 ) ( -136 128 40 ) ( -136 96 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 128 32 ) ( -136 128 40 ) ( -152 128 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 96 40 ) ( -136 128 40 ) ( -136 128 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 10
|
||||
{
|
||||
( -32 120 144 ) ( -8 96 160 ) ( -8 96 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 144 ) ( -32 120 144 ) ( -8 96 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 160 ) ( -32 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -32 120 144 ) ( -8 120 144 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 144 ) ( -8 96 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 11
|
||||
{
|
||||
( -8 48 144 ) ( -8 48 160 ) ( -32 24 160 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 144 ) ( -32 24 144 ) ( -32 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 144 ) ( -8 48 144 ) ( -32 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 160 ) ( -8 48 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 160 ) ( -8 48 160 ) ( -8 48 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 12
|
||||
{
|
||||
( -32 0 64 ) ( -32 1 64 ) ( -32 0 65 ) retro-texture-pack-v9/CRATE_1M 0 0 0 1 1
|
||||
( -32 0 64 ) ( -32 0 65 ) ( -31 0 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -32 0 64 ) ( -31 0 64 ) ( -32 1 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 160 ) ( 0 25 160 ) ( 1 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 72 ) ( 1 24 72 ) ( 0 24 73 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 24 72 ) ( 0 24 73 ) ( 0 25 72 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 13
|
||||
{
|
||||
( -32 120 160 ) ( -32 144 64 ) ( -32 144 160 ) retro-texture-pack-v9/CRATE_1M 48 0 0 1 1
|
||||
( 0 120 160 ) ( -32 120 64 ) ( -32 120 160 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 144 64 ) ( -32 120 64 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 120 160 ) ( -32 144 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 144 64 ) ( 0 144 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 0 144 160 ) ( 0 120 64 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 14
|
||||
{
|
||||
( -32 120 104 ) ( -8 96 120 ) ( -8 96 104 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 104 ) ( -32 120 104 ) ( -8 96 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 120 ) ( -32 120 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -32 120 104 ) ( -8 120 104 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 104 ) ( -8 96 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 15
|
||||
{
|
||||
( -8 48 104 ) ( -8 48 120 ) ( -32 24 120 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 104 ) ( -32 24 104 ) ( -32 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 104 ) ( -8 48 104 ) ( -32 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 120 ) ( -8 48 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 120 ) ( -8 48 120 ) ( -8 48 104 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 16
|
||||
{
|
||||
( -8 24 160 ) ( -8 24 144 ) ( -8 120 160 ) retro-texture-pack-v9/CRATE_1L 24 -7 0 1 1
|
||||
( 0 24 160 ) ( 0 24 144 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 144 ) ( -8 120 144 ) ( 0 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( 0 120 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 120 144 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 160 ) ( 0 120 144 ) ( 0 24 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 17
|
||||
{
|
||||
( -8 24 120 ) ( -8 24 104 ) ( -8 120 120 ) retro-texture-pack-v9/CRATE_1L -40 6 0 1 1
|
||||
( 0 24 120 ) ( 0 24 104 ) ( -8 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 104 ) ( -8 120 104 ) ( 0 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( 0 120 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 120 104 ) ( 0 120 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 120 ) ( 0 120 104 ) ( 0 24 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 18
|
||||
{
|
||||
( -8 120 64 ) ( -8 120 80 ) ( -8 24 64 ) retro-texture-pack-v9/CRATE_1L 24 0 0 1 1
|
||||
( -8 24 64 ) ( -8 24 80 ) ( 0 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( 0 24 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 120 80 ) ( 0 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 120 64 ) ( 0 120 80 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 64 ) ( 0 24 80 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 19
|
||||
{
|
||||
( 0 0 144 ) ( 0 144 32 ) ( 0 144 144 ) retro-texture-pack-v9/LIGHT_1A -19 -16 0 1 1
|
||||
( 16 0 144 ) ( 0 0 32 ) ( 0 0 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 32 ) ( 0 0 32 ) ( 16 0 32 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 0 144 ) ( 0 144 144 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 144 32 ) ( 16 144 32 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 144 ) ( 16 0 32 ) ( 16 0 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 20
|
||||
{
|
||||
( -48 102.62741699796607 64 ) ( -48 102.62741699796669 96 ) ( -70.62741699796324 80 96 ) retro-texture-pack-v9/CRATE_1H -34.274063 0 0 0.35355356 0.49999976
|
||||
( -48 57.37258300203757 96 ) ( -48 57.372583002035135 64 ) ( -70.62741699796297 80 64 ) retro-texture-pack-v9/CRATE_1H 34.27414 0 180 0.35355344 -0.49999976
|
||||
( -48 57.372583002035135 64 ) ( -25.37258300202666 80 64 ) ( -48 102.62741699796607 64 ) retro-texture-pack-v9/CRATE_1H 42.509666 -9.3725815 315 1 1
|
||||
( -48 102.62741699796669 96 ) ( -25.372583002033117 80 96 ) ( -48 57.37258300203757 96 ) retro-texture-pack-v9/CRATE_1H -49.952244 -21.019333 225 0.5079364 0.5
|
||||
( -25.372583002033117 80 96 ) ( -25.37258300202666 80 64 ) ( -48 57.372583002035135 64 ) retro-texture-pack-v9/CRATE_1H 19.882263 0 0 0.70710677 1
|
||||
( -25.372583002033117 80 96 ) ( -48 102.62741699796669 96 ) ( -48 102.62741699796607 64 ) retro-texture-pack-v9/CRATE_1H -7.5218506 0 180 0.3649583 -0.49999988
|
||||
}
|
||||
// brush 21
|
||||
{
|
||||
( 16 272 80 ) ( 16 256 96 ) ( 16 224 96 ) retro-texture-pack-v9/DOOR_2C -16 -35 0 1 1.032258
|
||||
( 16 208 80 ) ( 32 208 80 ) ( 32 208 32 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 208 80 ) ( 16 208 80 ) ( 16 224 96 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 208 32 ) ( 32 272 32 ) ( 16 272 32 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 16 256 96 ) ( 32 256 96 ) ( 32 224 96 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 256 96 ) ( 16 256 96 ) ( 16 272 80 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 272 32 ) ( 32 272 80 ) ( 16 272 80 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 256 96 ) ( 32 272 80 ) ( 32 272 32 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 22
|
||||
{
|
||||
( 0 352 144 ) ( 0 272 144 ) ( 0 352 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 272 32 ) ( 0 272 32 ) ( 16 272 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 352 32 ) ( 0 272 32 ) ( 16 352 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 352 144 ) ( 16 272 144 ) ( 0 352 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 0 352 32 ) ( 16 352 32 ) ( 0 352 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 16 352 32 ) ( 16 272 32 ) ( 16 352 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 23
|
||||
{
|
||||
( 0 128 32 ) ( 0 208 32 ) ( 0 128 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 128 144 ) ( 16 128 144 ) ( 0 128 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 16 128 32 ) ( 16 208 32 ) ( 0 128 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 128 144 ) ( 0 208 144 ) ( 16 128 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 0 208 144 ) ( 0 208 32 ) ( 16 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 128 144 ) ( 16 208 144 ) ( 16 128 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 24
|
||||
{
|
||||
( 0 272 144 ) ( 0 208 144 ) ( 0 272 80 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 272 80 ) ( 0 208 144 ) ( 16 272 80 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 272 144 ) ( 16 208 144 ) ( 0 272 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 0 272 144 ) ( 0 272 80 ) ( 16 272 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 272 144 ) ( 16 272 80 ) ( 16 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 25
|
||||
{
|
||||
( 0 208 144 ) ( 0 208 80 ) ( 0 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 208 144 ) ( 16 208 80 ) ( 0 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 208 80 ) ( 16 208 80 ) ( 0 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 208 144 ) ( 0 240 112 ) ( 16 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 208 144 ) ( 16 240 112 ) ( 16 208 80 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 26
|
||||
{
|
||||
( 0 240 112 ) ( 0 224 96 ) ( 0 256 96 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 240 112 ) ( 16 224 96 ) ( 0 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 224 96 ) ( 16 256 96 ) ( 0 224 96 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 240 112 ) ( 0 256 96 ) ( 16 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 240 112 ) ( 16 256 96 ) ( 16 224 96 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
// Game: Generic
|
||||
// Format: Standard
|
||||
// entity 0
|
||||
{
|
||||
"classname" "worldspawn"
|
||||
"_tb_textures" "textures;textures/retro-texture-pack-v9"
|
||||
"_tb_mod" "textures"
|
||||
// brush 0
|
||||
{
|
||||
( -80 160 64 ) ( -80 0 64 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 64 ) ( 0 0 64 ) ( 0 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 32 ) ( 0 160 32 ) ( -80 160 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 160 64 ) ( 0 160 64 ) ( 0 0 64 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( 0 160 32 ) ( 0 160 64 ) ( -80 160 64 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 64 ) ( 0 160 64 ) ( 0 160 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 1
|
||||
{
|
||||
( -176 120 40 ) ( -176 32 40 ) ( -176 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -176 32 40 ) ( -152 32 40 ) ( -152 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 32 ) ( -152 120 32 ) ( -176 120 32 ) __TB_empty 0 0 0 1 1
|
||||
( -176 120 40 ) ( -152 120 40 ) ( -152 32 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -152 120 32 ) ( -152 120 40 ) ( -176 120 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 40 ) ( -152 120 40 ) ( -152 120 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 2
|
||||
{
|
||||
( -136 144 48 ) ( -136 104 48 ) ( -136 104 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 104 48 ) ( -80 104 48 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 144 32 ) ( -136 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 144 48 ) ( -80 144 48 ) ( -80 104 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 144 32 ) ( -80 144 48 ) ( -136 144 48 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 104 48 ) ( -80 144 48 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 3
|
||||
{
|
||||
( -136 40 48 ) ( -136 0 48 ) ( -136 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 0 48 ) ( -80 0 48 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 32 ) ( -80 40 32 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 40 48 ) ( -80 40 48 ) ( -80 0 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 40 48 ) ( -136 40 48 ) __TB_empty 0 0 0 1 1
|
||||
( -80 0 48 ) ( -80 40 48 ) ( -80 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 4
|
||||
{
|
||||
( -152 104 56 ) ( -152 40 56 ) ( -152 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 40 56 ) ( -80 40 56 ) ( -80 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 104 32 ) ( -152 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 104 56 ) ( -80 104 56 ) ( -80 40 56 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 104 56 ) ( -152 104 56 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 56 ) ( -80 104 56 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 5
|
||||
{
|
||||
( -192 376 32 ) ( -192 -48 32 ) ( -192 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 -48 32 ) ( 16 -48 32 ) ( 16 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 24 ) ( 16 376 24 ) ( -192 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 376 32 ) ( 16 376 32 ) ( 16 -48 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 376 24 ) ( 16 376 32 ) ( -192 376 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 32 ) ( 16 376 32 ) ( 16 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
}
|
||||
// brush 6
|
||||
{
|
||||
( -32 120 64 ) ( -8 96 80 ) ( -8 96 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 64 ) ( -32 120 64 ) ( -8 96 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 80 ) ( -32 120 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 80 ) ( -32 120 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 64 ) ( -8 96 80 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 7
|
||||
{
|
||||
( -8 48 64 ) ( -8 48 80 ) ( -32 24 80 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 64 ) ( -32 24 64 ) ( -32 24 80 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( -8 48 64 ) ( -32 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -32 24 80 ) ( -8 48 80 ) ( -8 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 48 80 ) ( -8 48 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 8
|
||||
{
|
||||
( -152 40 40 ) ( -152 16 40 ) ( -152 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 16 40 ) ( -136 16 40 ) ( -136 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 16 32 ) ( -136 40 32 ) ( -152 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 40 40 ) ( -136 40 40 ) ( -136 16 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 40 32 ) ( -136 40 40 ) ( -152 40 40 ) __TB_empty 0 0 0 1 1
|
||||
( -136 16 40 ) ( -136 40 40 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 9
|
||||
{
|
||||
( -152 128 40 ) ( -152 96 40 ) ( -152 96 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 96 40 ) ( -136 96 40 ) ( -136 96 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 96 32 ) ( -136 128 32 ) ( -152 128 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 128 40 ) ( -136 128 40 ) ( -136 96 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 128 32 ) ( -136 128 40 ) ( -152 128 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 96 40 ) ( -136 128 40 ) ( -136 128 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 10
|
||||
{
|
||||
( -32 120 144 ) ( -8 96 160 ) ( -8 96 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 144 ) ( -32 120 144 ) ( -8 96 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 160 ) ( -32 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -32 120 144 ) ( -8 120 144 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 144 ) ( -8 96 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 11
|
||||
{
|
||||
( -8 48 144 ) ( -8 48 160 ) ( -32 24 160 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 144 ) ( -32 24 144 ) ( -32 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 144 ) ( -8 48 144 ) ( -32 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 160 ) ( -8 48 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 160 ) ( -8 48 160 ) ( -8 48 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 12
|
||||
{
|
||||
( -32 0 64 ) ( -32 1 64 ) ( -32 0 65 ) retro-texture-pack-v9/CRATE_1M 0 0 0 1 1
|
||||
( -32 0 64 ) ( -32 0 65 ) ( -31 0 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -32 0 64 ) ( -31 0 64 ) ( -32 1 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 160 ) ( 0 25 160 ) ( 1 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 72 ) ( 1 24 72 ) ( 0 24 73 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 24 72 ) ( 0 24 73 ) ( 0 25 72 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 13
|
||||
{
|
||||
( -32 120 160 ) ( -32 144 64 ) ( -32 144 160 ) retro-texture-pack-v9/CRATE_1M 48 0 0 1 1
|
||||
( 0 120 160 ) ( -32 120 64 ) ( -32 120 160 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 144 64 ) ( -32 120 64 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 120 160 ) ( -32 144 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 144 64 ) ( 0 144 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 0 144 160 ) ( 0 120 64 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 14
|
||||
{
|
||||
( -32 120 104 ) ( -8 96 120 ) ( -8 96 104 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 104 ) ( -32 120 104 ) ( -8 96 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 120 ) ( -32 120 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -32 120 104 ) ( -8 120 104 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 104 ) ( -8 96 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 15
|
||||
{
|
||||
( -8 48 104 ) ( -8 48 120 ) ( -32 24 120 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 104 ) ( -32 24 104 ) ( -32 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 104 ) ( -8 48 104 ) ( -32 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 120 ) ( -8 48 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 120 ) ( -8 48 120 ) ( -8 48 104 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 16
|
||||
{
|
||||
( -8 24 160 ) ( -8 24 144 ) ( -8 120 160 ) retro-texture-pack-v9/CRATE_1L 24 -7 0 1 1
|
||||
( 0 24 160 ) ( 0 24 144 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 144 ) ( -8 120 144 ) ( 0 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( 0 120 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 120 144 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 160 ) ( 0 120 144 ) ( 0 24 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 17
|
||||
{
|
||||
( -8 24 120 ) ( -8 24 104 ) ( -8 120 120 ) retro-texture-pack-v9/CRATE_1L -40 6 0 1 1
|
||||
( 0 24 120 ) ( 0 24 104 ) ( -8 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 104 ) ( -8 120 104 ) ( 0 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( 0 120 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 120 104 ) ( 0 120 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 120 ) ( 0 120 104 ) ( 0 24 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 18
|
||||
{
|
||||
( -8 120 64 ) ( -8 120 80 ) ( -8 24 64 ) retro-texture-pack-v9/CRATE_1L 24 0 0 1 1
|
||||
( -8 24 64 ) ( -8 24 80 ) ( 0 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( 0 24 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 120 80 ) ( 0 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 120 64 ) ( 0 120 80 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 64 ) ( 0 24 80 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 19
|
||||
{
|
||||
( 0 0 144 ) ( 0 144 32 ) ( 0 144 144 ) retro-texture-pack-v9/LIGHT_1A -19 -16 0 1 1
|
||||
( 16 0 144 ) ( 0 0 32 ) ( 0 0 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 32 ) ( 0 0 32 ) ( 16 0 32 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 0 144 ) ( 0 144 144 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 144 32 ) ( 16 144 32 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 144 ) ( 16 0 32 ) ( 16 0 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 20
|
||||
{
|
||||
( -48 102.62741699796607 64 ) ( -48 102.62741699796669 96 ) ( -70.62741699796324 80 96 ) retro-texture-pack-v9/CRATE_1H -34.274063 0 0 0.35355356 0.49999976
|
||||
( -48 57.37258300203757 96 ) ( -48 57.372583002035135 64 ) ( -70.62741699796297 80 64 ) retro-texture-pack-v9/CRATE_1H 34.27414 0 180 0.35355344 -0.49999976
|
||||
( -48 57.372583002035135 64 ) ( -25.37258300202666 80 64 ) ( -48 102.62741699796607 64 ) retro-texture-pack-v9/CRATE_1H 42.509666 -9.3725815 315 1 1
|
||||
( -48 102.62741699796669 96 ) ( -25.372583002033117 80 96 ) ( -48 57.37258300203757 96 ) retro-texture-pack-v9/CRATE_1H -49.952244 -21.019333 225 0.5079364 0.5
|
||||
( -25.372583002033117 80 96 ) ( -25.37258300202666 80 64 ) ( -48 57.372583002035135 64 ) retro-texture-pack-v9/CRATE_1H 19.882263 0 0 0.70710677 1
|
||||
( -25.372583002033117 80 96 ) ( -48 102.62741699796669 96 ) ( -48 102.62741699796607 64 ) retro-texture-pack-v9/CRATE_1H -7.5218506 0 180 0.3649583 -0.49999988
|
||||
}
|
||||
}
|
|
@ -1,244 +0,0 @@
|
|||
// Game: Generic
|
||||
// Format: Standard
|
||||
// entity 0
|
||||
{
|
||||
"classname" "worldspawn"
|
||||
"_tb_textures" "textures;textures/retro-texture-pack-v9"
|
||||
"_tb_mod" "textures"
|
||||
// brush 0
|
||||
{
|
||||
( -80 160 64 ) ( -80 0 64 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 64 ) ( 0 0 64 ) ( 0 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 32 ) ( 0 160 32 ) ( -80 160 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 160 64 ) ( 0 160 64 ) ( 0 0 64 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( 0 160 32 ) ( 0 160 64 ) ( -80 160 64 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( 0 0 64 ) ( 0 160 64 ) ( 0 160 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 1
|
||||
{
|
||||
( -176 120 40 ) ( -176 32 40 ) ( -176 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -176 32 40 ) ( -152 32 40 ) ( -152 32 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 32 ) ( -152 120 32 ) ( -176 120 32 ) __TB_empty 0 0 0 1 1
|
||||
( -176 120 40 ) ( -152 120 40 ) ( -152 32 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -152 120 32 ) ( -152 120 40 ) ( -176 120 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 32 40 ) ( -152 120 40 ) ( -152 120 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 2
|
||||
{
|
||||
( -136 144 48 ) ( -136 104 48 ) ( -136 104 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 104 48 ) ( -80 104 48 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 144 32 ) ( -136 144 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 144 48 ) ( -80 144 48 ) ( -80 104 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 144 32 ) ( -80 144 48 ) ( -136 144 48 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 104 48 ) ( -80 144 48 ) ( -80 144 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 3
|
||||
{
|
||||
( -136 40 48 ) ( -136 0 48 ) ( -136 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 0 48 ) ( -80 0 48 ) ( -80 0 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 0 32 ) ( -80 40 32 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 40 48 ) ( -80 40 48 ) ( -80 0 48 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 40 48 ) ( -136 40 48 ) __TB_empty 0 0 0 1 1
|
||||
( -80 0 48 ) ( -80 40 48 ) ( -80 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 4
|
||||
{
|
||||
( -152 104 56 ) ( -152 40 56 ) ( -152 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 40 56 ) ( -80 40 56 ) ( -80 40 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 32 ) ( -80 104 32 ) ( -152 104 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 104 56 ) ( -80 104 56 ) ( -80 40 56 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -80 104 32 ) ( -80 104 56 ) ( -152 104 56 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -80 40 56 ) ( -80 104 56 ) ( -80 104 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 5
|
||||
{
|
||||
( -192 376 32 ) ( -192 -48 32 ) ( -192 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 -48 32 ) ( 16 -48 32 ) ( 16 -48 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 24 ) ( 16 376 24 ) ( -192 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( -192 376 32 ) ( 16 376 32 ) ( 16 -48 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 376 24 ) ( 16 376 32 ) ( -192 376 32 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
( 16 -48 32 ) ( 16 376 32 ) ( 16 376 24 ) retro-texture-pack-v9/SAND_1A 0 0 0 1 1
|
||||
}
|
||||
// brush 6
|
||||
{
|
||||
( -32 120 64 ) ( -8 96 80 ) ( -8 96 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 64 ) ( -32 120 64 ) ( -8 96 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 80 ) ( -32 120 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 80 ) ( -32 120 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 80 ) ( -8 96 64 ) ( -8 96 80 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 7
|
||||
{
|
||||
( -8 48 64 ) ( -8 48 80 ) ( -32 24 80 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 64 ) ( -32 24 64 ) ( -32 24 80 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( -8 48 64 ) ( -32 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -32 24 80 ) ( -8 48 80 ) ( -8 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 48 80 ) ( -8 48 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 8
|
||||
{
|
||||
( -152 40 40 ) ( -152 16 40 ) ( -152 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 16 40 ) ( -136 16 40 ) ( -136 16 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 16 32 ) ( -136 40 32 ) ( -152 40 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 40 40 ) ( -136 40 40 ) ( -136 16 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 40 32 ) ( -136 40 40 ) ( -152 40 40 ) __TB_empty 0 0 0 1 1
|
||||
( -136 16 40 ) ( -136 40 40 ) ( -136 40 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 9
|
||||
{
|
||||
( -152 128 40 ) ( -152 96 40 ) ( -152 96 32 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -152 96 40 ) ( -136 96 40 ) ( -136 96 32 ) __TB_empty 0 0 0 1 1
|
||||
( -136 96 32 ) ( -136 128 32 ) ( -152 128 32 ) __TB_empty 0 0 0 1 1
|
||||
( -152 128 40 ) ( -136 128 40 ) ( -136 96 40 ) retro-texture-pack-v9/TILE_2D 0 0 0 1 1
|
||||
( -136 128 32 ) ( -136 128 40 ) ( -152 128 40 ) retro-texture-pack-v9/STUCCO_1A 0 0 0 1 1
|
||||
( -136 96 40 ) ( -136 128 40 ) ( -136 128 32 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 10
|
||||
{
|
||||
( -32 120 144 ) ( -8 96 160 ) ( -8 96 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 144 ) ( -32 120 144 ) ( -8 96 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 160 ) ( -32 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -32 120 144 ) ( -8 120 144 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 96 144 ) ( -8 96 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 11
|
||||
{
|
||||
( -8 48 144 ) ( -8 48 160 ) ( -32 24 160 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 144 ) ( -32 24 144 ) ( -32 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 144 ) ( -8 48 144 ) ( -32 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 160 ) ( -8 48 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 160 ) ( -8 48 160 ) ( -8 48 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 12
|
||||
{
|
||||
( -32 0 64 ) ( -32 1 64 ) ( -32 0 65 ) retro-texture-pack-v9/CRATE_1M 0 0 0 1 1
|
||||
( -32 0 64 ) ( -32 0 65 ) ( -31 0 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -32 0 64 ) ( -31 0 64 ) ( -32 1 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 160 ) ( 0 25 160 ) ( 1 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 72 ) ( 1 24 72 ) ( 0 24 73 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 24 72 ) ( 0 24 73 ) ( 0 25 72 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 13
|
||||
{
|
||||
( -32 120 160 ) ( -32 144 64 ) ( -32 144 160 ) retro-texture-pack-v9/CRATE_1M 48 0 0 1 1
|
||||
( 0 120 160 ) ( -32 120 64 ) ( -32 120 160 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 144 64 ) ( -32 120 64 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 120 160 ) ( -32 144 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 144 160 ) ( -32 144 64 ) ( 0 144 64 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 0 144 160 ) ( 0 120 64 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 14
|
||||
{
|
||||
( -32 120 104 ) ( -8 96 120 ) ( -8 96 104 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 120 104 ) ( -32 120 104 ) ( -8 96 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 120 ) ( -32 120 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -32 120 104 ) ( -8 120 104 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 96 104 ) ( -8 96 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 15
|
||||
{
|
||||
( -8 48 104 ) ( -8 48 120 ) ( -32 24 120 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( -8 24 104 ) ( -32 24 104 ) ( -32 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 104 ) ( -8 48 104 ) ( -32 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -32 24 120 ) ( -8 48 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 24 120 ) ( -8 48 120 ) ( -8 48 104 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 16
|
||||
{
|
||||
( -8 24 160 ) ( -8 24 144 ) ( -8 120 160 ) retro-texture-pack-v9/CRATE_1L 24 -7 0 1 1
|
||||
( 0 24 160 ) ( 0 24 144 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 144 ) ( -8 120 144 ) ( 0 24 144 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 160 ) ( 0 120 160 ) ( -8 24 160 ) __TB_empty 0 0 0 1 1
|
||||
( -8 120 160 ) ( -8 120 144 ) ( 0 120 160 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 160 ) ( 0 120 144 ) ( 0 24 160 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 17
|
||||
{
|
||||
( -8 24 120 ) ( -8 24 104 ) ( -8 120 120 ) retro-texture-pack-v9/CRATE_1L -40 6 0 1 1
|
||||
( 0 24 120 ) ( 0 24 104 ) ( -8 24 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 104 ) ( -8 120 104 ) ( 0 24 104 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( 0 120 120 ) ( -8 24 120 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( -8 120 120 ) ( -8 120 104 ) ( 0 120 120 ) __TB_empty 0 0 0 1 1
|
||||
( 0 120 120 ) ( 0 120 104 ) ( 0 24 120 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 18
|
||||
{
|
||||
( -8 120 64 ) ( -8 120 80 ) ( -8 24 64 ) retro-texture-pack-v9/CRATE_1L 24 0 0 1 1
|
||||
( -8 24 64 ) ( -8 24 80 ) ( 0 24 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 64 ) ( 0 24 64 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( -8 24 80 ) ( -8 120 80 ) ( 0 24 80 ) retro-texture-pack-v9/GRID_1A 0 0 0 1 1
|
||||
( 0 120 64 ) ( 0 120 80 ) ( -8 120 64 ) __TB_empty 0 0 0 1 1
|
||||
( 0 24 64 ) ( 0 24 80 ) ( 0 120 64 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 19
|
||||
{
|
||||
( 0 0 144 ) ( 0 144 32 ) ( 0 144 144 ) retro-texture-pack-v9/LIGHT_1A -19 -16 0 1 1
|
||||
( 16 0 144 ) ( 0 0 32 ) ( 0 0 144 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 32 ) ( 0 0 32 ) ( 16 0 32 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 0 144 ) ( 0 144 144 ) __TB_empty 0 0 0 1 1
|
||||
( 16 144 144 ) ( 0 144 32 ) ( 16 144 32 ) retro-texture-pack-v9/CRATE_1L 0 0 0 1 1
|
||||
( 16 144 144 ) ( 16 0 32 ) ( 16 0 144 ) __TB_empty 0 0 0 1 1
|
||||
}
|
||||
// brush 20
|
||||
{
|
||||
( -48 102.62741699796607 64 ) ( -48 102.62741699796669 96 ) ( -70.62741699796324 80 96 ) retro-texture-pack-v9/CRATE_1H -34.274063 0 0 0.35355356 0.49999976
|
||||
( -48 57.37258300203757 96 ) ( -48 57.372583002035135 64 ) ( -70.62741699796297 80 64 ) retro-texture-pack-v9/CRATE_1H 34.27414 0 180 0.35355344 -0.49999976
|
||||
( -48 57.372583002035135 64 ) ( -25.37258300202666 80 64 ) ( -48 102.62741699796607 64 ) retro-texture-pack-v9/CRATE_1H 42.509666 -9.3725815 315 1 1
|
||||
( -48 102.62741699796669 96 ) ( -25.372583002033117 80 96 ) ( -48 57.37258300203757 96 ) retro-texture-pack-v9/CRATE_1H -49.952244 -21.019333 225 0.5079364 0.5
|
||||
( -25.372583002033117 80 96 ) ( -25.37258300202666 80 64 ) ( -48 57.372583002035135 64 ) retro-texture-pack-v9/CRATE_1H 19.882263 0 0 0.70710677 1
|
||||
( -25.372583002033117 80 96 ) ( -48 102.62741699796669 96 ) ( -48 102.62741699796607 64 ) retro-texture-pack-v9/CRATE_1H -7.5218506 0 180 0.3649583 -0.49999988
|
||||
}
|
||||
// brush 21
|
||||
{
|
||||
( 16 272 80 ) ( 16 256 96 ) ( 16 224 96 ) retro-texture-pack-v9/DOOR_2C -16 -35 0 1 1.032258
|
||||
( 16 208 80 ) ( 32 208 80 ) ( 32 208 32 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 208 80 ) ( 16 208 80 ) ( 16 224 96 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 208 32 ) ( 32 272 32 ) ( 16 272 32 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 16 256 96 ) ( 32 256 96 ) ( 32 224 96 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 256 96 ) ( 16 256 96 ) ( 16 272 80 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 272 32 ) ( 32 272 80 ) ( 16 272 80 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
( 32 256 96 ) ( 32 272 80 ) ( 32 272 32 ) retro-texture-pack-v9/DOOR_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 22
|
||||
{
|
||||
( 0 352 144 ) ( 0 272 144 ) ( 0 352 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 272 32 ) ( 0 272 32 ) ( 16 272 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 352 32 ) ( 0 272 32 ) ( 16 352 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 352 144 ) ( 16 272 144 ) ( 0 352 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 0 352 32 ) ( 16 352 32 ) ( 0 352 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 16 352 32 ) ( 16 272 32 ) ( 16 352 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 23
|
||||
{
|
||||
( 0 128 32 ) ( 0 208 32 ) ( 0 128 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 128 144 ) ( 16 128 144 ) ( 0 128 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 16 128 32 ) ( 16 208 32 ) ( 0 128 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 128 144 ) ( 0 208 144 ) ( 16 128 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 0 208 144 ) ( 0 208 32 ) ( 16 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 128 144 ) ( 16 208 144 ) ( 16 128 32 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 24
|
||||
{
|
||||
( 0 272 144 ) ( 0 208 144 ) ( 0 272 80 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 272 80 ) ( 0 208 144 ) ( 16 272 80 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 272 144 ) ( 16 208 144 ) ( 0 272 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 0.5 0.5
|
||||
( 0 272 144 ) ( 0 272 80 ) ( 16 272 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 272 144 ) ( 16 272 80 ) ( 16 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 25
|
||||
{
|
||||
( 0 208 144 ) ( 0 208 80 ) ( 0 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 208 144 ) ( 16 208 80 ) ( 0 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 208 80 ) ( 16 208 80 ) ( 0 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 208 144 ) ( 0 240 112 ) ( 16 208 144 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 208 144 ) ( 16 240 112 ) ( 16 208 80 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
// brush 26
|
||||
{
|
||||
( 0 240 112 ) ( 0 224 96 ) ( 0 256 96 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 240 112 ) ( 16 224 96 ) ( 0 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 224 96 ) ( 16 256 96 ) ( 0 224 96 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 0 240 112 ) ( 0 256 96 ) ( 16 240 112 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
( 16 240 112 ) ( 16 256 96 ) ( 16 224 96 ) retro-texture-pack-v9/CONCRETE_2C 0 0 0 1 1
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
newmtl __TB_empty
|
||||
map_Kd ..\..\..\..\..\..\..\..\Users\z002f2au\Downloads\TrenchBroom-Win64-v2023.1-Release\defaults\assets\textures\__TB_empty.png
|
||||
|
||||
newmtl retro-texture-pack-v9/CRATE_1H
|
||||
map_Kd ..\textures\retro-texture-pack-v9\CRATE_1H.png
|
||||
|
||||
newmtl retro-texture-pack-v9/CRATE_1L
|
||||
map_Kd ..\textures\retro-texture-pack-v9\CRATE_1L.png
|
||||
|
||||
newmtl retro-texture-pack-v9/CRATE_1M
|
||||
map_Kd ..\textures\retro-texture-pack-v9\CRATE_1M.png
|
||||
|
||||
newmtl retro-texture-pack-v9/GRID_1A
|
||||
map_Kd ..\textures\retro-texture-pack-v9\GRID_1A.png
|
||||
|
||||
newmtl retro-texture-pack-v9/LIGHT_1A
|
||||
map_Kd ..\textures\retro-texture-pack-v9\LIGHT_1A.png
|
||||
|
||||
newmtl retro-texture-pack-v9/SAND_1A
|
||||
map_Kd ..\textures\retro-texture-pack-v9\SAND_1A.png
|
||||
|
||||
newmtl retro-texture-pack-v9/STUCCO_1A
|
||||
map_Kd ..\textures\retro-texture-pack-v9\STUCCO_1A.png
|
||||
|
||||
newmtl retro-texture-pack-v9/TILE_2D
|
||||
map_Kd ..\textures\retro-texture-pack-v9\TILE_2D.png
|
||||
|
|
@ -1,694 +0,0 @@
|
|||
mtllib test.mtl
|
||||
# vertices
|
||||
v -80 32 -160
|
||||
v -80 32 -0
|
||||
v -80 64 -0
|
||||
v -80 64 -160
|
||||
v 0 64 -0
|
||||
v 0 32 -0
|
||||
v 0 32 -160
|
||||
v 0 64 -160
|
||||
v -176 32 -120
|
||||
v -176 32 -32
|
||||
v -176 40 -32
|
||||
v -176 40 -120
|
||||
v -152 40 -32
|
||||
v -152 32 -32
|
||||
v -152 32 -120
|
||||
v -152 40 -120
|
||||
v -136 32 -144
|
||||
v -136 32 -104
|
||||
v -136 48 -104
|
||||
v -136 48 -144
|
||||
v -80 48 -104
|
||||
v -80 32 -104
|
||||
v -80 32 -144
|
||||
v -80 48 -144
|
||||
v -136 32 -40
|
||||
v -136 32 -0
|
||||
v -136 48 -0
|
||||
v -136 48 -40
|
||||
v -80 48 -0
|
||||
v -80 32 -0
|
||||
v -80 32 -40
|
||||
v -80 48 -40
|
||||
v -152 32 -104
|
||||
v -152 32 -40
|
||||
v -152 56 -40
|
||||
v -152 56 -104
|
||||
v -80 56 -40
|
||||
v -80 32 -40
|
||||
v -80 32 -104
|
||||
v -80 56 -104
|
||||
v -192 24 -376
|
||||
v -192 24 48
|
||||
v -192 32 48
|
||||
v -192 32 -376
|
||||
v 16 32 48
|
||||
v 16 24 48
|
||||
v 16 24 -376
|
||||
v 16 32 -376
|
||||
v -8 80 -96
|
||||
v -32 80 -120
|
||||
v -32 64 -120
|
||||
v -8 64 -96
|
||||
v -8 64 -120
|
||||
v -8 80 -120
|
||||
v -8 64 -48
|
||||
v -32 64 -24
|
||||
v -32 80 -24
|
||||
v -8 80 -48
|
||||
v -8 80 -24
|
||||
v -8 64 -24
|
||||
v -152 32 -40
|
||||
v -152 32 -16
|
||||
v -152 40 -16
|
||||
v -152 40 -40
|
||||
v -136 40 -16
|
||||
v -136 32 -16
|
||||
v -136 32 -40
|
||||
v -136 40 -40
|
||||
v -152 32 -128
|
||||
v -152 32 -96
|
||||
v -152 40 -96
|
||||
v -152 40 -128
|
||||
v -136 40 -96
|
||||
v -136 32 -96
|
||||
v -136 32 -128
|
||||
v -136 40 -128
|
||||
v -8 160 -96
|
||||
v -32 160 -120
|
||||
v -32 144 -120
|
||||
v -8 144 -96
|
||||
v -8 144 -120
|
||||
v -8 160 -120
|
||||
v -8 144 -48
|
||||
v -32 144 -24
|
||||
v -32 160 -24
|
||||
v -8 160 -48
|
||||
v -8 160 -24
|
||||
v -8 144 -24
|
||||
v -32 64 -24
|
||||
v -32 64 -0
|
||||
v -32 160 -0
|
||||
v -32 160 -24
|
||||
v 0 160 -0
|
||||
v 0 64 -0
|
||||
v 0 64 -24
|
||||
v 0 160 -24
|
||||
v -32 64 -144
|
||||
v -32 64 -120
|
||||
v -32 160 -120
|
||||
v -32 160 -144
|
||||
v 0 160 -120
|
||||
v 0 64 -120
|
||||
v 0 64 -144
|
||||
v 0 160 -144
|
||||
v -8 120 -96
|
||||
v -32 120 -120
|
||||
v -32 104 -120
|
||||
v -8 104 -96
|
||||
v -8 104 -120
|
||||
v -8 120 -120
|
||||
v -8 104 -48
|
||||
v -32 104 -24
|
||||
v -32 120 -24
|
||||
v -8 120 -48
|
||||
v -8 120 -24
|
||||
v -8 104 -24
|
||||
v -8 144 -120
|
||||
v -8 144 -24
|
||||
v -8 160 -24
|
||||
v -8 160 -120
|
||||
v 0 160 -24
|
||||
v 0 144 -24
|
||||
v 0 144 -120
|
||||
v 0 160 -120
|
||||
v -8 104 -120
|
||||
v -8 104 -24
|
||||
v -8 120 -24
|
||||
v -8 120 -120
|
||||
v 0 120 -24
|
||||
v 0 104 -24
|
||||
v 0 104 -120
|
||||
v 0 120 -120
|
||||
v -8 64 -120
|
||||
v -8 64 -24
|
||||
v -8 80 -24
|
||||
v -8 80 -120
|
||||
v 0 80 -24
|
||||
v 0 64 -24
|
||||
v 0 64 -120
|
||||
v 0 80 -120
|
||||
v 0 32 -144
|
||||
v 0 32 -0
|
||||
v 0 144 -0
|
||||
v 0 144 -144
|
||||
v 16 144 -0
|
||||
v 16 32 -0
|
||||
v 16 32 -144
|
||||
v 16 144 -144
|
||||
v -48 64 -102.62741699796607
|
||||
v -70.62741699796061 64 -80
|
||||
v -70.6274169979597 96 -80
|
||||
v -48 96 -102.62741699796723
|
||||
v -48 96 -57.372583002048486
|
||||
v -48 64 -57.37258300203785
|
||||
v -25.37258300202666 64 -80
|
||||
v -25.372583002036556 96 -80
|
||||
|
||||
# texture coordinates
|
||||
vt 2.5 0.5
|
||||
vt 0 0.5
|
||||
vt 0 1
|
||||
vt 2.5 1
|
||||
vt -1.25 1
|
||||
vt -1.25 0.5
|
||||
vt 0 -0
|
||||
vt -2.5 -0
|
||||
vt -2.5 5
|
||||
vt 0 5
|
||||
vt 0 2.5
|
||||
vt -1.25 2.5
|
||||
vt -1.25 -0
|
||||
vt 5 2
|
||||
vt 0 2
|
||||
vt 5 1
|
||||
vt 1.875 0.5
|
||||
vt 0.5 0.5
|
||||
vt 0.5 0.625
|
||||
vt 1.875 0.625
|
||||
vt -2.375 0.625
|
||||
vt -2.75 0.625
|
||||
vt -2.75 0.5
|
||||
vt -2.375 0.5
|
||||
vt -4.75 1
|
||||
vt -5.5 1
|
||||
vt -5.5 3.75
|
||||
vt -4.75 3.75
|
||||
vt -2.375 1.875
|
||||
vt -2.75 1.875
|
||||
vt 3.75 1.25
|
||||
vt 1 1.25
|
||||
vt 1 1
|
||||
vt 3.75 1
|
||||
vt 2.25 0.5
|
||||
vt 1.625 0.5
|
||||
vt 1.625 0.75
|
||||
vt 2.25 0.75
|
||||
vt -2.5 1.5
|
||||
vt -4.25 1.5
|
||||
vt -4.25 1
|
||||
vt -2.5 1
|
||||
vt -2.5 3.25
|
||||
vt -4.25 3.25
|
||||
vt -4.25 4.5
|
||||
vt -2.5 4.5
|
||||
vt -1.25 2.25
|
||||
vt -2.125 2.25
|
||||
vt -2.125 1.625
|
||||
vt -1.25 1.625
|
||||
vt -2.125 0.5
|
||||
vt -2.125 0.75
|
||||
vt -1.25 0.75
|
||||
vt 4.5 1.5
|
||||
vt 3.25 1.5
|
||||
vt 3.25 1
|
||||
vt 4.5 1
|
||||
vt 0.625 0.5
|
||||
vt 0 0.75
|
||||
vt 0.625 0.75
|
||||
vt -4.25 -0
|
||||
vt -4.25 1.25
|
||||
vt -2.5 1.25
|
||||
vt -1.25 0.625
|
||||
vt -2.125 0.625
|
||||
vt -2.125 -0
|
||||
vt 1.25 1.5
|
||||
vt 0 1.5
|
||||
vt 1.25 1
|
||||
vt 0.625 0.875
|
||||
vt 1.625 0.875
|
||||
vt -1.25 0.875
|
||||
vt -2.375 0.875
|
||||
vt -4.75 1.25
|
||||
vt -4.75 3.25
|
||||
vt -2.375 1.625
|
||||
vt 3.25 1.75
|
||||
vt 1.25 1.75
|
||||
vt 5.875 0.375
|
||||
vt -0.75 0.375
|
||||
vt -0.75 0.5
|
||||
vt 5.875 0.5
|
||||
vt 0.25 0.5
|
||||
vt -3 0.5
|
||||
vt -3 0.375
|
||||
vt 0.25 0.375
|
||||
vt 0.25 -0.75
|
||||
vt -3 -0.75
|
||||
vt -3 5.875
|
||||
vt 0.25 5.875
|
||||
vt 1.5 1.25
|
||||
vt 1.875 1.25
|
||||
vt 1.875 1
|
||||
vt 1.5 1
|
||||
vt -0.25 3
|
||||
vt -1 3.75
|
||||
vt -0.25 3.75
|
||||
vt -0.125 1.875
|
||||
vt -0.5 1.875
|
||||
vt -0.125 1.5
|
||||
vt -0.25 2
|
||||
vt -1 2
|
||||
vt -1 2.5
|
||||
vt -0.25 2.5
|
||||
vt 3 2.5
|
||||
vt 3 2
|
||||
vt 3.75 2
|
||||
vt 3.75 2.5
|
||||
vt 0.75 1
|
||||
vt 0.375 1
|
||||
vt 0.375 1.25
|
||||
vt 0.75 1.25
|
||||
vt -0.25 0.75
|
||||
vt -1 0.75
|
||||
vt -0.25 1.5
|
||||
vt -0.125 0.75
|
||||
vt -0.5 0.375
|
||||
vt -0.125 0.375
|
||||
vt 0.75 2
|
||||
vt 1.5 2
|
||||
vt 1.5 2.5
|
||||
vt 0.75 2.5
|
||||
vt 0.25 0.625
|
||||
vt 0.625 0.625
|
||||
vt -4.25 0.5
|
||||
vt -4.75 0.5
|
||||
vt -2.375 0.25
|
||||
vt -2.125 0.25
|
||||
vt 1.25 1.25
|
||||
vt 0.5 1.25
|
||||
vt 0.5 1
|
||||
vt 2 0.5
|
||||
vt 1.5 0.5
|
||||
vt 1.5 0.625
|
||||
vt 2 0.625
|
||||
vt -4.25 3
|
||||
vt -4.75 3
|
||||
vt -4.75 4
|
||||
vt -4.25 4
|
||||
vt -2.125 2
|
||||
vt -2.375 2
|
||||
vt -2.375 1.5
|
||||
vt -2.125 1.5
|
||||
vt 4 1.25
|
||||
vt 3 1.25
|
||||
vt 3 1
|
||||
vt 4 1
|
||||
vt 1.875 2.5
|
||||
vt 1.875 2.25
|
||||
vt 1.5 2.25
|
||||
vt -0.25 4.5
|
||||
vt -1 4.5
|
||||
vt -1 5
|
||||
vt -0.25 5
|
||||
vt 3 5
|
||||
vt 3 4.5
|
||||
vt 3.75 4.5
|
||||
vt 3.75 5
|
||||
vt 0.75 2.25
|
||||
vt 0.375 2.25
|
||||
vt 0.375 2.5
|
||||
vt 0.75 4.5
|
||||
vt 1.5 4.5
|
||||
vt 1.5 5
|
||||
vt 0.75 5
|
||||
vt -0.5 2.5
|
||||
vt -0.5 1
|
||||
vt -1 -0
|
||||
vt 2.625 1
|
||||
vt 2.625 2.5
|
||||
vt 0 3.75
|
||||
vt 0 4.5
|
||||
vt 4.5 5
|
||||
vt 4.5 2
|
||||
vt 1.5 1.875
|
||||
vt 1.875 1.875
|
||||
vt 1.875 1.625
|
||||
vt 1.5 1.625
|
||||
vt -0.25 3.25
|
||||
vt -1 3.25
|
||||
vt 3 3.75
|
||||
vt 3 3.25
|
||||
vt 3.75 3.25
|
||||
vt 3.75 3.75
|
||||
vt 0.75 1.625
|
||||
vt 0.375 1.625
|
||||
vt 0.375 1.875
|
||||
vt 0.75 1.875
|
||||
vt 0.75 3.25
|
||||
vt 1.5 3.25
|
||||
vt 1.5 3.75
|
||||
vt 0.75 3.75
|
||||
vt 2.25 2.359375
|
||||
vt 0.75 2.359375
|
||||
vt 0.75 2.609375
|
||||
vt 2.25 2.609375
|
||||
vt 0 0.375
|
||||
vt 0 1.875
|
||||
vt 1.25 1.53125
|
||||
vt -0.25 1.53125
|
||||
vt -0.25 1.78125
|
||||
vt 1.25 1.78125
|
||||
vt 0 3.25
|
||||
vt 2.25 1
|
||||
vt 2.25 1.25
|
||||
vt 1.953125 0.75
|
||||
vt -0.296875 0.75
|
||||
vt -0.296875 2.5
|
||||
vt 1.953125 2.5
|
||||
vt 0.25 2.25
|
||||
vt 0 2.25
|
||||
vt 0.5 -0
|
||||
vt 0.5 4.5
|
||||
vt 4.5 4.5
|
||||
vt 3.9999993 2.000001
|
||||
vt 3 2.000001
|
||||
vt 3 3.0000014
|
||||
vt 3.9999993 3.0000014
|
||||
vt -2 3.0000014
|
||||
vt -3 3.0000014
|
||||
vt -3 2.000001
|
||||
vt -2 2.000001
|
||||
vt -0.5 0.75
|
||||
vt -0.5 0.24999997
|
||||
vt -1 0.24999997
|
||||
vt -1.9687498 -3
|
||||
vt -0.9843746 -3
|
||||
vt -0.9843746 -2
|
||||
vt -1.9687498 -2
|
||||
vt -0.24999982 1.5
|
||||
vt -0.7499999 1.5
|
||||
vt -0.7499999 1
|
||||
vt -0.24999982 1
|
||||
vt 1.9375005 2.0000005
|
||||
vt 1.9375005 3.0000007
|
||||
vt 0.96875036 3.0000007
|
||||
vt 0.96875036 2.0000005
|
||||
|
||||
# normals
|
||||
vn -1 0 0
|
||||
vn 0 0 1
|
||||
vn 0 -1 -0
|
||||
vn -0 1 -0
|
||||
vn 0 -0 -1
|
||||
vn 1 0 0
|
||||
vn -0.7071067811865476 0 0.7071067811865476
|
||||
vn -0.7071067811865476 0 -0.7071067811865476
|
||||
vn -0.7071067811866015 -1.3816813636416168e-14 -0.7071067811864936
|
||||
vn -0.7071067811865772 5.385417133285123e-14 0.7071067811865179
|
||||
vn 0.707106781186415 1.427214044943284e-13 0.7071067811866799
|
||||
vn 0.7071067811865445 -1.3822276656584868e-14 -0.7071067811865505
|
||||
|
||||
o entity0_brush0
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 5/3/2 3/5/2 2/6/2 6/2/2
|
||||
usemtl __TB_empty
|
||||
f 6/7/3 2/8/3 1/9/3 7/10/3
|
||||
usemtl retro-texture-pack-v9/TILE_2D
|
||||
f 8/11/4 4/12/4 3/13/4 5/7/4
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 7/2/5 1/6/5 4/5/5 8/3/5
|
||||
usemtl __TB_empty
|
||||
f 8/14/6 5/15/6 6/3/6 7/16/6
|
||||
|
||||
o entity0_brush1
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 9/17/1 10/18/1 11/19/1 12/20/1
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 13/21/2 11/22/2 10/23/2 14/24/2
|
||||
usemtl __TB_empty
|
||||
f 14/25/3 10/26/3 9/27/3 15/28/3
|
||||
usemtl retro-texture-pack-v9/TILE_2D
|
||||
f 16/29/4 12/30/4 11/23/4 13/24/4
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 15/24/5 9/23/5 12/22/5 16/21/5
|
||||
usemtl __TB_empty
|
||||
f 16/31/6 13/32/6 14/33/6 15/34/6
|
||||
|
||||
o entity0_brush2
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 17/35/1 18/36/1 19/37/1 20/38/1
|
||||
usemtl __TB_empty
|
||||
f 21/39/2 19/40/2 18/41/2 22/42/2
|
||||
usemtl __TB_empty
|
||||
f 22/43/3 18/44/3 17/45/3 23/46/3
|
||||
usemtl retro-texture-pack-v9/TILE_2D
|
||||
f 24/47/4 20/48/4 19/49/4 21/50/4
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 23/6/5 17/51/5 20/52/5 24/53/5
|
||||
usemtl __TB_empty
|
||||
f 24/54/6 21/55/6 22/56/6 23/57/6
|
||||
|
||||
o entity0_brush3
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 25/58/1 26/2/1 27/59/1 28/60/1
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 29/53/2 27/52/2 26/51/2 30/6/2
|
||||
usemtl __TB_empty
|
||||
f 30/8/3 26/61/3 25/62/3 31/63/3
|
||||
usemtl retro-texture-pack-v9/TILE_2D
|
||||
f 32/64/4 28/65/4 27/66/4 29/13/4
|
||||
usemtl __TB_empty
|
||||
f 31/42/5 25/41/5 28/40/5 32/39/5
|
||||
usemtl __TB_empty
|
||||
f 32/67/6 29/68/6 30/3/6 31/69/6
|
||||
|
||||
o entity0_brush4
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 33/36/1 34/58/1 35/70/1 36/71/1
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 37/72/2 35/73/2 34/24/2 38/6/2
|
||||
usemtl __TB_empty
|
||||
f 38/63/3 34/74/3 33/75/3 39/43/3
|
||||
usemtl retro-texture-pack-v9/TILE_2D
|
||||
f 40/50/4 36/76/4 35/21/4 37/64/4
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 39/6/5 33/24/5 36/73/5 40/72/5
|
||||
usemtl __TB_empty
|
||||
f 40/77/6 37/78/6 38/69/6 39/56/6
|
||||
|
||||
o entity0_brush5
|
||||
usemtl retro-texture-pack-v9/SAND_1A
|
||||
f 41/79/1 42/80/1 43/81/1 44/82/1
|
||||
usemtl retro-texture-pack-v9/SAND_1A
|
||||
f 45/83/2 43/84/2 42/85/2 46/86/2
|
||||
usemtl retro-texture-pack-v9/SAND_1A
|
||||
f 46/87/3 42/88/3 41/89/3 47/90/3
|
||||
usemtl retro-texture-pack-v9/SAND_1A
|
||||
f 48/90/4 44/89/4 43/88/4 45/87/4
|
||||
usemtl retro-texture-pack-v9/SAND_1A
|
||||
f 47/86/5 41/85/5 44/84/5 48/83/5
|
||||
usemtl retro-texture-pack-v9/SAND_1A
|
||||
f 48/82/6 45/81/6 46/80/6 47/79/6
|
||||
|
||||
o entity0_brush6
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 49/91/7 50/92/7 51/93/7 52/94/7
|
||||
usemtl __TB_empty
|
||||
f 52/95/3 51/96/3 53/97/3
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 54/98/4 50/99/4 49/100/4
|
||||
usemtl __TB_empty
|
||||
f 53/101/5 51/102/5 50/103/5 54/104/5
|
||||
usemtl __TB_empty
|
||||
f 49/105/6 52/106/6 53/107/6 54/108/6
|
||||
|
||||
o entity0_brush7
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 55/109/8 56/110/8 57/111/8 58/112/8
|
||||
usemtl __TB_empty
|
||||
f 59/104/2 57/103/2 56/102/2 60/101/2
|
||||
usemtl __TB_empty
|
||||
f 60/113/3 56/114/3 55/115/3
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 58/116/4 57/117/4 59/118/4
|
||||
usemtl __TB_empty
|
||||
f 60/119/6 55/120/6 58/121/6 59/122/6
|
||||
|
||||
o entity0_brush8
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 61/58/1 62/83/1 63/123/1 64/124/1
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 65/65/2 63/21/2 62/24/2 66/51/2
|
||||
usemtl __TB_empty
|
||||
f 66/125/3 62/126/3 61/74/3 67/62/3
|
||||
usemtl retro-texture-pack-v9/TILE_2D
|
||||
f 68/65/4 64/21/4 63/127/4 65/128/4
|
||||
usemtl __TB_empty
|
||||
f 67/41/5 61/25/5 64/74/5 68/62/5
|
||||
usemtl __TB_empty
|
||||
f 68/129/6 65/130/6 66/131/6 67/69/6
|
||||
|
||||
o entity0_brush9
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 69/132/1 70/133/1 71/134/1 72/135/1
|
||||
usemtl __TB_empty
|
||||
f 73/62/2 71/74/2 70/25/2 74/41/2
|
||||
usemtl __TB_empty
|
||||
f 74/136/3 70/137/3 69/138/3 75/139/3
|
||||
usemtl retro-texture-pack-v9/TILE_2D
|
||||
f 76/140/4 72/141/4 71/142/4 73/143/4
|
||||
usemtl retro-texture-pack-v9/STUCCO_1A
|
||||
f 75/51/5 69/24/5 72/21/5 76/65/5
|
||||
usemtl __TB_empty
|
||||
f 76/144/6 73/145/6 74/146/6 75/147/6
|
||||
|
||||
o entity0_brush10
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 77/121/7 78/148/7 79/149/7 80/150/7
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 80/100/3 79/99/3 81/98/3
|
||||
usemtl __TB_empty
|
||||
f 82/97/4 78/96/4 77/95/4
|
||||
usemtl __TB_empty
|
||||
f 81/151/5 79/152/5 78/153/5 82/154/5
|
||||
usemtl __TB_empty
|
||||
f 77/155/6 80/156/6 81/157/6 82/158/6
|
||||
|
||||
o entity0_brush11
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 83/159/8 84/160/8 85/161/8 86/122/8
|
||||
usemtl __TB_empty
|
||||
f 87/154/2 85/153/2 84/152/2 88/151/2
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 88/118/3 84/117/3 83/116/3
|
||||
usemtl __TB_empty
|
||||
f 86/115/4 85/114/4 87/113/4
|
||||
usemtl __TB_empty
|
||||
f 88/162/6 83/163/6 86/164/6 87/165/6
|
||||
|
||||
o entity0_brush12
|
||||
usemtl retro-texture-pack-v9/CRATE_1M
|
||||
f 89/110/1 90/3/1 91/11/1 92/161/1
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 93/11/2 91/166/2 90/167/2 94/3/2
|
||||
usemtl __TB_empty
|
||||
f 94/7/3 90/168/3 89/114/3 95/59/3
|
||||
usemtl __TB_empty
|
||||
f 96/59/4 92/114/4 91/168/4 93/7/4
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 95/3/5 89/167/5 92/166/5 96/11/5
|
||||
usemtl __TB_empty
|
||||
f 96/165/6 93/10/6 94/15/6 95/119/6
|
||||
|
||||
o entity0_brush13
|
||||
usemtl retro-texture-pack-v9/CRATE_1M
|
||||
f 97/146/1 98/169/1 99/170/1 100/105/1
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 101/11/2 99/166/2 98/167/2 102/3/2
|
||||
usemtl __TB_empty
|
||||
f 102/171/3 98/96/3 97/152/3 103/172/3
|
||||
usemtl __TB_empty
|
||||
f 104/172/4 100/152/4 99/96/4 101/171/4
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 103/3/5 97/167/5 100/166/5 104/11/5
|
||||
usemtl __TB_empty
|
||||
f 104/173/6 101/158/6 102/107/6 103/174/6
|
||||
|
||||
o entity0_brush14
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 105/175/7 106/176/7 107/177/7 108/178/7
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 108/100/3 107/99/3 109/98/3
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 110/98/4 106/99/4 105/100/4
|
||||
usemtl __TB_empty
|
||||
f 109/179/5 107/180/5 106/96/5 110/97/5
|
||||
usemtl __TB_empty
|
||||
f 105/181/6 108/182/6 109/183/6 110/184/6
|
||||
|
||||
o entity0_brush15
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 111/185/8 112/186/8 113/187/8 114/188/8
|
||||
usemtl __TB_empty
|
||||
f 115/97/2 113/96/2 112/180/2 116/179/2
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 116/118/3 112/117/3 111/116/3
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 114/116/4 113/117/4 115/118/4
|
||||
usemtl __TB_empty
|
||||
f 116/189/6 111/190/6 114/191/6 115/192/6
|
||||
|
||||
o entity0_brush16
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 117/193/1 118/194/1 119/195/1 120/196/1
|
||||
usemtl __TB_empty
|
||||
f 121/10/2 119/154/2 118/151/2 122/172/2
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 122/197/3 118/118/3 117/98/3 123/198/3
|
||||
usemtl __TB_empty
|
||||
f 124/171/4 120/97/4 119/113/4 121/59/4
|
||||
usemtl __TB_empty
|
||||
f 123/172/5 117/151/5 120/154/5 124/10/5
|
||||
usemtl __TB_empty
|
||||
f 124/158/6 121/165/6 122/162/6 123/157/6
|
||||
|
||||
o entity0_brush17
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 125/199/1 126/200/1 127/201/1 128/202/1
|
||||
usemtl __TB_empty
|
||||
f 129/171/2 127/97/2 126/179/2 130/203/2
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 130/197/3 126/118/3 125/98/3 131/198/3
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 132/198/4 128/98/4 127/118/4 129/197/4
|
||||
usemtl __TB_empty
|
||||
f 131/203/5 125/179/5 128/97/5 132/171/5
|
||||
usemtl __TB_empty
|
||||
f 132/184/6 129/192/6 130/189/6 131/183/6
|
||||
|
||||
o entity0_brush18
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 133/204/1 134/109/1 135/112/1 136/205/1
|
||||
usemtl __TB_empty
|
||||
f 137/11/2 135/104/2 134/101/2 138/15/2
|
||||
usemtl __TB_empty
|
||||
f 138/59/3 134/113/3 133/97/3 139/171/3
|
||||
usemtl retro-texture-pack-v9/GRID_1A
|
||||
f 140/198/4 136/98/4 135/118/4 137/197/4
|
||||
usemtl __TB_empty
|
||||
f 139/15/5 133/101/5 136/104/5 140/11/5
|
||||
usemtl __TB_empty
|
||||
f 140/108/6 137/122/6 138/119/6 139/107/6
|
||||
|
||||
o entity0_brush19
|
||||
usemtl retro-texture-pack-v9/LIGHT_1A
|
||||
f 141/206/1 142/207/1 143/208/1 144/209/1
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 145/210/2 143/211/2 142/2/2 146/83/2
|
||||
usemtl __TB_empty
|
||||
f 146/212/3 142/7/3 141/172/3 147/213/3
|
||||
usemtl __TB_empty
|
||||
f 148/213/4 144/172/4 143/7/4 145/212/4
|
||||
usemtl retro-texture-pack-v9/CRATE_1L
|
||||
f 147/83/5 141/2/5 144/211/5 148/210/5
|
||||
usemtl __TB_empty
|
||||
f 148/214/6 145/172/6 146/3/6 147/57/6
|
||||
|
||||
o entity0_brush20
|
||||
usemtl retro-texture-pack-v9/CRATE_1H
|
||||
f 149/215/9 150/216/9 151/217/9 152/218/9
|
||||
usemtl retro-texture-pack-v9/CRATE_1H
|
||||
f 153/219/10 151/220/10 150/221/10 154/222/10
|
||||
usemtl retro-texture-pack-v9/CRATE_1H
|
||||
f 155/223/3 154/224/3 150/225/3 149/114/3
|
||||
usemtl retro-texture-pack-v9/CRATE_1H
|
||||
f 152/226/4 151/227/4 153/228/4 156/229/4
|
||||
usemtl retro-texture-pack-v9/CRATE_1H
|
||||
f 156/230/11 153/231/11 154/232/11 155/233/11
|
||||
usemtl retro-texture-pack-v9/CRATE_1H
|
||||
f 149/234/12 152/235/12 156/236/12 155/237/12
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
# Blender MTL File: 'None'
|
||||
# Material Count: 11
|
||||
|
||||
newmtl __TB_empty
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\Users\\z002f2au\\Downloads\\TrenchBroom-Win64-v2023.1-Release\\defaults\\assets\\textures\\__TB_empty.png
|
||||
|
||||
newmtl retro-texture-pack-v9/CONCRETE_2C
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\CONCRETE_2C.png
|
||||
|
||||
newmtl retro-texture-pack-v9/CRATE_1H
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\CRATE_1H.png
|
||||
|
||||
newmtl retro-texture-pack-v9/CRATE_1L
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\CRATE_1L.png
|
||||
|
||||
newmtl retro-texture-pack-v9/CRATE_1M
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\CRATE_1M.png
|
||||
|
||||
newmtl retro-texture-pack-v9/DOOR_2C
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\DOOR_2C.png
|
||||
|
||||
newmtl retro-texture-pack-v9/GRID_1A
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\GRID_1A.png
|
||||
|
||||
newmtl retro-texture-pack-v9/LIGHT_1A
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\LIGHT_1A.png
|
||||
|
||||
newmtl retro-texture-pack-v9/SAND_1A
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\SAND_1A.png
|
||||
|
||||
newmtl retro-texture-pack-v9/STUCCO_1A
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\STUCCO_1A.png
|
||||
|
||||
newmtl retro-texture-pack-v9/TILE_2D
|
||||
Ns 0.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 1
|
||||
map_Kd C:\\UserData\\z002f2au\\Documents\\repos\\rayjs\\examples\\test_game\\textures\\retro-texture-pack-v9\\TILE_2D.png
|
|
@ -1,126 +0,0 @@
|
|||
function log(v) { traceLog(LOG_INFO, v) }
|
||||
|
||||
setConfigFlags(FLAG_MSAA_4X_HINT | FLAG_WINDOW_HIGHDPI | FLAG_VSYNC_HINT);
|
||||
|
||||
initWindow(1024,768,"Test");
|
||||
|
||||
const scene = {}
|
||||
|
||||
let m = scene.raylib_model = loadModel("levels/test.obj");
|
||||
|
||||
|
||||
//let m = loadModel("levels/test.obj");
|
||||
// if(m.meshCount > 1){
|
||||
// traceLog(LOG_INFO, "Starting merge of "+ m.meshCount + " meshes")
|
||||
// let currentMesh = getModelMesh(m, 0);
|
||||
// for (let i = 1; i < m.meshCount; i++) {
|
||||
// const mesh = getModelMesh(m, i)
|
||||
// const merged = meshMerge(mesh, currentMesh);
|
||||
// if(i > 1) unloadMesh(currentMesh)
|
||||
// currentMesh = merged
|
||||
// }
|
||||
// unloadModel(m)
|
||||
// uploadMesh(currentMesh)
|
||||
// traceLog(LOG_INFO, "Mesh successfully merged")
|
||||
// m = loadModelFromMesh(currentMesh)
|
||||
// }
|
||||
|
||||
const bbox = getModelBoundingBox(scene.raylib_model)
|
||||
|
||||
scene.w = 256;
|
||||
scene.h = 256;
|
||||
|
||||
const img = new Image();
|
||||
const data = new Uint8ClampedArray([255,255,255])
|
||||
img.data = data.buffer
|
||||
img.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8
|
||||
img.width = 1
|
||||
img.height = 1
|
||||
img.mipmaps = 1
|
||||
|
||||
const position = new Vector3( 0, bbox.min.y + ((bbox.max.y - bbox.min.y) / 2), bbox.max.z - bbox.min.z ); // Camera position
|
||||
const target = new Vector3( 0.0, bbox.min.y + ((bbox.max.y - bbox.min.y) / 2), 0.0); // Camera looking at point
|
||||
const up = new Vector3(0.0, 1.0, 0.0); // Camera up vector (rotation towards target)
|
||||
const fovy = 45.0; // Camera field-of-view Y
|
||||
const projection = CAMERA_PERSPECTIVE; // Camera mode type
|
||||
scene.camera = new Camera3D(position, target, up, fovy, projection);
|
||||
|
||||
// const config = getDefaultLightmapperConfig();
|
||||
// //config.backgroundColor = new Color(10,10,10);
|
||||
// //config.hemisphereSize = 512;
|
||||
// const mesh = getModelMesh(scene.raylib_model, 0);
|
||||
// const lm = loadLightmapper(scene.w, scene.h, mesh, config);
|
||||
// const lmMat = loadMaterialLightmapper(BLACK, 0);
|
||||
// const light = genMeshCube(0.2,0.2,0.2);
|
||||
// const lightMaterial = loadMaterialLightmapper(ORANGE, .1);
|
||||
|
||||
const rt = loadRenderTexture(256,265)
|
||||
|
||||
|
||||
while (!windowShouldClose())
|
||||
{
|
||||
const wm = getMouseWheelMove()
|
||||
if(wm !== 0){
|
||||
const camPos = scene.camera.position;
|
||||
const fac = 1 + (wm * -0.1)
|
||||
scene.camera.position = vector3Multiply(camPos, new Vector3(fac, fac, fac));
|
||||
}
|
||||
|
||||
if(isMouseButtonDown(MOUSE_BUTTON_LEFT))
|
||||
updateCamera(scene.camera, CAMERA_THIRD_PERSON);
|
||||
|
||||
// if(lm.progress < 1.0){
|
||||
// let startTime = getTime();
|
||||
// beginLightmap();
|
||||
// while(beginLightmapFragment(lm)){
|
||||
// drawMesh(mesh, lmMat, matrixIdentity());
|
||||
// // drawMesh(light, lightMaterial, matrixTranslate(0.0,0.3,0.5));
|
||||
// // drawMesh(light, lightMaterial, matrixTranslate(0.0,0.3,-0.5));
|
||||
// //drawMesh(light, lightMaterial, matrixMultiply(matrixScale(60,60,60), matrixTranslate(0.0,150,0)));
|
||||
// // drawMesh(light, lightMaterial, matrixTranslate(0.5,0.3,0));
|
||||
// // drawMesh(light, lightMaterial, matrixTranslate(-0.5,0.3,0));
|
||||
// endLightmapFragment(lm);
|
||||
// // display progress every second (printf is expensive)
|
||||
// let time = getTime();
|
||||
// if (getTime() - startTime > 0.03) break;
|
||||
// }
|
||||
// endLightmap();
|
||||
// if(lm.progress == 1.0){
|
||||
// const img = loadImageFromLightmapper(lm);
|
||||
// //exportImage(img, "my_result.png");
|
||||
// const old = scene.raylib_texture;
|
||||
// scene.raylib_texture = loadTextureFromImage(img);
|
||||
// setTextureFilter(scene.raylib_texture, TEXTURE_FILTER_TRILINEAR);
|
||||
// unloadTexture(old);
|
||||
// let mat = loadMaterialDefault();
|
||||
// setMaterialTexture(mat, MATERIAL_MAP_DIFFUSE, scene.raylib_texture);
|
||||
// setModelMaterial(scene.raylib_model, 0, mat);
|
||||
// unloadLightmapper(lm);
|
||||
// }
|
||||
// }
|
||||
|
||||
// beginTextureMode(rt)
|
||||
// clearBackground(RED);
|
||||
// drawTexture(getModelMaterial(m,1))
|
||||
// endTextureMode()
|
||||
|
||||
beginDrawing();
|
||||
clearBackground(BLUE);
|
||||
|
||||
beginMode3D(scene.camera);
|
||||
drawModel(scene.raylib_model, new Vector3(0,0,0), 1, WHITE);
|
||||
|
||||
endMode3D();
|
||||
|
||||
// if(lm.progress < 1.0){
|
||||
// drawRectangle(0,0,getScreenWidth(),20, fade(GREEN,0.5));
|
||||
// drawRectangle(0,0,getScreenWidth()*lm.progress,20, GREEN);
|
||||
// }
|
||||
|
||||
|
||||
endDrawing();
|
||||
}
|
||||
|
||||
unloadModel(scene.raylib_model);
|
||||
//unloadTexture(scene.raylib_texture);
|
||||
closeWindow();
|
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 928 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1022 B |
Before Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 892 B |
Before Width: | Height: | Size: 913 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB |