raycaster/src/constants.hpp
2026-05-27 12:09:17 -04:00

94 lines
2.8 KiB
C++

#pragma once
#include <string>
#include <array>
constexpr int INV_SLOTS=16;
constexpr int TEXTURE_WIDTH=256;
constexpr int TEXTURE_HEIGHT=256;
constexpr int RAY_VIEW_WIDTH=900;
constexpr int RAY_VIEW_HEIGHT=600;
constexpr int SCREEN_WIDTH=1280;
constexpr int SCREEN_HEIGHT=720;
constexpr int RAY_VIEW_X=(SCREEN_WIDTH - RAY_VIEW_WIDTH);
constexpr int RAY_VIEW_Y=0;
constexpr int GLOW_LIMIT=220;
constexpr int LIGHT_MULTIPLIER=2.5;
constexpr float AIMED_AT_BRIGHTNESS=0.2f;
constexpr int MAP_TILE_DIM=64;
constexpr int ICONGEN_MAP_TILE_DIM=64;
constexpr int PLAYER_SPRITE_DIR_CORRECTION=270;
constexpr int RENDER_DISTANCE=500;
constexpr int ROOM_SIZE=3;
constexpr int BOSS_VIEW_WIDTH=1080;
constexpr int BOSS_VIEW_HEIGHT=SCREEN_HEIGHT;
constexpr int BOSS_VIEW_X=SCREEN_WIDTH - BOSS_VIEW_WIDTH;
constexpr int BOSS_VIEW_Y=0;
constexpr bool VSYNC=true;
constexpr int FRAME_LIMIT=60;
constexpr int NUM_SPRITES=1;
constexpr int MAX_LOG_MESSAGES=17;
#ifdef NDEBUG
constexpr bool DEBUG_BUILD=false;
#else
constexpr bool DEBUG_BUILD=true;
#endif
////////// copied from roguish
constexpr int INV_WALL = 0;
constexpr int INV_SPACE = 1;
constexpr int WALL_VALUE = 1;
constexpr int SPACE_VALUE = 0;
constexpr int WALL_PATH_LIMIT = 1000;
constexpr int ROOM_SPACE_VALUE = 1001;
constexpr int DOOR_VALUE = 1002;
constexpr int DEAD_END_VALUE = 1003;
constexpr int WALL_LIGHT_LEVEL = 3;
constexpr int WORLDBUILD_DIVISION = 4;
constexpr int WORLDBUILD_SHRINK = 2;
constexpr int WORLDBUILD_MAX_PATH = 200;
constexpr int UI_FONT_SIZE=20;
constexpr int BASE_MAP_FONT_SIZE=80;
constexpr int GAME_MAP_PIXEL_POS = 600;
constexpr int MAX_FONT_SIZE = 140;
constexpr int MIN_FONT_SIZE = 20;
constexpr float PERCENT = 0.01f;
constexpr int STATUS_UI_X = 0;
constexpr int STATUS_UI_Y = 0;
constexpr int STATUS_UI_WIDTH = SCREEN_WIDTH - RAY_VIEW_WIDTH;
constexpr int STATUS_UI_HEIGHT = SCREEN_HEIGHT;
constexpr int COMBAT_UI_X = RAY_VIEW_X;
constexpr int COMBAT_UI_Y = RAY_VIEW_HEIGHT;
constexpr int COMBAT_UI_WIDTH = RAY_VIEW_WIDTH ;
constexpr int COMBAT_UI_HEIGHT = SCREEN_HEIGHT - RAY_VIEW_HEIGHT;
constexpr int SCENE_VIEW_WIDTH=SCREEN_WIDTH;
constexpr int SCENE_VIEW_HEIGHT=SCREEN_HEIGHT;
constexpr int SCENE_VIEW_X=0;
constexpr int SCENE_VIEW_Y=0;
constexpr int INITIAL_MAP_W = 21;
constexpr int INITIAL_MAP_H = 21;
constexpr float DEFAULT_ROTATE=0.5f;
constexpr float DEFAULT_ROTATE_SPEED=DEFAULT_ROTATE / 5.0f;
constexpr float DEFAULT_MOVE_SPEED=0.1f;
// for the panels/renderer
constexpr wchar_t BG_TILE = L'';
constexpr wchar_t UI_BASE_CHAR = L'';
constexpr int BG_BOX_OFFSET=5;
constexpr const char *FONT_FILE_NAME="assets/text.otf";
constexpr std::array<std::wstring, 8> COMPASS{
// L"E", L"SE", L"S", L"SW", L"W", L"NW", L"N", L"NE"
L"\u2192", L"\u2198", L"\uffec", L"\u21d9", L"\u2190", L"\u2196", L"\uffea", L"\u21d7" };