Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
anonymous_namespace{main.cpp} Namespace Reference

Classes

struct  Options

Functions

std::optional< uint32_t > ParseCount (std::wstring_view text, uint32_t maximum)
template<size_t N>
std::optional< std::array< uint64_t, N > > ParseNumbers (std::wstring_view text)
std::expected< void, std::string > ParseTraceRange (std::wstring_view argument, std::wstring_view text, Options &options)
void ApplyTraceRange (Options &options)
std::optional< render::OrbitCameraState > ParseCamera (std::wstring_view text)
std::expected< void, std::string > ParsePeekOption (std::wstring_view argument, std::wstring_view text, frame::FrameLoopOptions &loop)
std::expected< void, std::string > ParseViewOption (std::wstring_view argument, std::wstring_view text, frame::FrameLoopOptions &loop)
std::expected< void, std::string > ParseFrameLoopCount (std::wstring_view argument, std::wstring_view text, frame::FrameLoopOptions &loop)
bool ParseFrameLoopFlag (std::wstring_view argument, frame::FrameLoopOptions &loop)
std::expected< Options, std::string > ParseOptions (std::span< wchar_t * > arguments)
int Run (std::span< wchar_t * > arguments)

Variables

constexpr uint32_t MIN_TARGET_FPS = 30
constexpr uint32_t MAX_TARGET_FPS = 1000

Function Documentation

◆ ApplyTraceRange()

void anonymous_namespace{main.cpp}::ApplyTraceRange ( Options & options)

Definition at line 142 of file main.cpp.

References anonymous_namespace{main.cpp}::Options::frameLoop, bicameral::sim::ProbeTraceFilterForCells(), bicameral::frame::FrameLoopOptions::trace, bicameral::frame::TRACE_CAPACITY_PER_FRAME, anonymous_namespace{main.cpp}::Options::traceCells, bicameral::frame::FrameLoopOptions::tracePath, and anonymous_namespace{main.cpp}::Options::traceTicks.

Referenced by ParseOptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseCamera()

std::optional< render::OrbitCameraState > anonymous_namespace{main.cpp}::ParseCamera ( std::wstring_view text)

Definition at line 156 of file main.cpp.

References bicameral::render::OrbitCameraState::distance, bicameral::render::OrbitCameraState::pitchDegrees, bicameral::ToUtf8(), and bicameral::render::OrbitCameraState::yawDegrees.

Referenced by ParseViewOption().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseCount()

std::optional< uint32_t > anonymous_namespace{main.cpp}::ParseCount ( std::wstring_view text,
uint32_t maximum )

Definition at line 84 of file main.cpp.

References bicameral::ToUtf8().

Referenced by ParseFrameLoopCount(), and ParsePeekOption().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseFrameLoopCount()

std::expected< void, std::string > anonymous_namespace{main.cpp}::ParseFrameLoopCount ( std::wstring_view argument,
std::wstring_view text,
frame::FrameLoopOptions & loop )

Definition at line 241 of file main.cpp.

References bicameral::frame::FrameLoopOptions::frameLimit, MAX_TARGET_FPS, bicameral::frame::FrameLoopOptions::maxFrameLatency, MIN_TARGET_FPS, ParseCount(), bicameral::frame::FrameLoopOptions::saveIntervalTicks, bicameral::frame::FrameLoopOptions::savePoints, bicameral::frame::FrameLoopOptions::screenshotTick, bicameral::frame::FrameLoopOptions::simLoad, bicameral::frame::FrameLoopOptions::simSplit, bicameral::frame::FrameLoopOptions::targetFps, and bicameral::ToUtf8().

Referenced by ParseOptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseFrameLoopFlag()

◆ ParseNumbers()

template<size_t N>
std::optional< std::array< uint64_t, N > > anonymous_namespace{main.cpp}::ParseNumbers ( std::wstring_view text)

Definition at line 96 of file main.cpp.

References bicameral::ToUtf8().

Referenced by ParsePeekOption(), and ParseTraceRange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseOptions()

std::expected< Options, std::string > anonymous_namespace{main.cpp}::ParseOptions ( std::span< wchar_t * > arguments)

◆ ParsePeekOption()

std::expected< void, std::string > anonymous_namespace{main.cpp}::ParsePeekOption ( std::wstring_view argument,
std::wstring_view text,
frame::FrameLoopOptions & loop )

Definition at line 185 of file main.cpp.

References ParseCount(), ParseNumbers(), bicameral::frame::FrameLoopOptions::peek, bicameral::render::PEEK_MAX_DEPTH, bicameral::frame::FrameLoopOptions::peekCell, bicameral::frame::FrameLoopOptions::peekDepth, and bicameral::ToUtf8().

Referenced by ParseViewOption().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseTraceRange()

std::expected< void, std::string > anonymous_namespace{main.cpp}::ParseTraceRange ( std::wstring_view argument,
std::wstring_view text,
Options & options )

Definition at line 118 of file main.cpp.

References ParseNumbers(), bicameral::ToUtf8(), anonymous_namespace{main.cpp}::Options::traceCells, and anonymous_namespace{main.cpp}::Options::traceTicks.

Referenced by ParseOptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseViewOption()

std::expected< void, std::string > anonymous_namespace{main.cpp}::ParseViewOption ( std::wstring_view argument,
std::wstring_view text,
frame::FrameLoopOptions & loop )

Definition at line 211 of file main.cpp.

References bicameral::frame::FrameLoopOptions::camera, bicameral::render::DebugViewSettings::mode, ParseCamera(), bicameral::render::ParseDebugViewMode(), ParsePeekOption(), bicameral::frame::FrameLoopOptions::screenshotPath, bicameral::ToUtf8(), and bicameral::frame::FrameLoopOptions::view.

Referenced by ParseOptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Run()

int anonymous_namespace{main.cpp}::Run ( std::span< wchar_t * > arguments)

Definition at line 374 of file main.cpp.

References bicameral::Core, bicameral::DefaultLogDirectory(), bicameral::Error, bicameral::GetLogger(), bicameral::Info, bicameral::Log(), bicameral::OpenLogFile(), ParseOptions(), bicameral::RunCapsProbe(), bicameral::frame::RunFrameLoop(), bicameral::Logger::SetMinLevel(), bicameral::ToUtf8(), and bicameral::Warning.

Referenced by wmain().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ MAX_TARGET_FPS

uint32_t anonymous_namespace{main.cpp}::MAX_TARGET_FPS = 1000
constexpr

Definition at line 238 of file main.cpp.

Referenced by ParseFrameLoopCount().

◆ MIN_TARGET_FPS

uint32_t anonymous_namespace{main.cpp}::MIN_TARGET_FPS = 30
constexpr

Definition at line 237 of file main.cpp.

Referenced by ParseFrameLoopCount().