Epok Engine

EPOK RUNTIME

epok::nav::World::set_obstacle

Method · 1 overload

Method

Sets obstacle as part of the navigation module.

Belongs to
epok::nav::World
Header
navigation.hpp
Overloads
1

Declaration

Declaration
bool set_obstacle(uint16_t id,const int32_t* lo,const int32_t* hi)

Sets obstacle as part of the navigation module.

ParameterTypeMeaning
iduint16_tValue supplied for id. Keep referenced or pointed-to data valid for the complete call.
loconst int32_t *Value supplied for lo. Keep referenced or pointed-to data valid for the complete call.
hiconst int32_t *Value supplied for hi. 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 "navigation.hpp"

// Assume these named values have been initialized with valid data:
// uint16_t id
// const int32_t * lo
// const int32_t * hi

epok::nav::World& object = /* obtain a valid instance */;

auto result = object.set_obstacle(id, lo, hi);

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. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in runtime/navigation.hpp:53

Related members