Epok Engine

EPOK RUNTIME

epok::modulate_channel

Function · 1 overload

Function

(c * 128 + 127) / 255 for c in 0..255, exact without a division.

Belongs to
epok
Header
polygon.hpp
Overloads
1

Declaration

Declaration
inline uint32_t modulate_channel(uint32_t c)

(c * 128 + 127) / 255 for c in 0..255, exact without a division.

ParameterTypeMeaning
cuint32_tValue supplied for c. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "polygon.hpp"

// Assume these named values have been initialized with valid data:
// uint32_t c

auto result = epok::modulate_channel(c);

Why use it

It provides direct, allocation-conscious access to PSX polygon preparation, clipping and submission. No exception-based error path is implied by the signature.

Trade-offs and warnings

Call it only in the lifecycle phase described by the module. Validate indices, capacities and object state before use.

Declared in runtime/polygon.hpp:44

Related members