Epok Engine

EPOK RUNTIME

epok::FocusLibrary::move

Method · 1 overload

Method

Performs `move` as part of the utility module.

Belongs to
epok::FocusLibrary
Header
utility.hpp
Overloads
1

Declaration

static
Declaration
static bool move(int32_t direction,bool wrap)

Performs `move` as part of the utility module.

ParameterTypeMeaning
directionint32_tValue supplied for direction. Keep referenced or pointed-to data valid for the complete call.
wrapboolValue supplied for wrap. Keep referenced or pointed-to data valid for the complete call.

Returns: bool. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "utility.hpp"

// Assume these named values have been initialized with valid data:
// int32_t direction
// bool wrap

auto result = epok::FocusLibrary::move(direction, wrap);

Why use it

The boolean result makes success, availability or state explicit without exceptions.

Trade-offs and warnings

Check the return value; `false` is part of normal control flow for many PSX resource operations.

Declared in runtime/utility.hpp:168

Related members