Why use it
The boolean result makes success, availability or state explicit without exceptions.
EPOK RUNTIME
Function · 1 overload
Topmost entry under a screen point (highest draw key wins; ties go to the lowest index, which keeps the result stable).
inline bool pick_2d(const Camera2D& camera, const Fixed* screen_xy, const Pick2DEntry* entries, size_t count, size_t& out_index)Topmost entry under a screen point (highest draw key wins; ties go to the lowest index, which keeps the result stable).
| Parameter | Type | Meaning |
|---|---|---|
camera | const Camera2D & | Value supplied for camera. Keep referenced or pointed-to data valid for the complete call. |
screen_xy | const Fixed * | Value supplied for screen_xy. Keep referenced or pointed-to data valid for the complete call. |
entries | const Pick2DEntry * | Value supplied for entries. Keep referenced or pointed-to data valid for the complete call. |
count | size_t | Value supplied for count. Keep referenced or pointed-to data valid for the complete call. |
out_index | size_t & | Value supplied for out_index. 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.
#include "world2d.hpp"
// Assume these named values have been initialized with valid data:
// const Camera2D & camera
// const Fixed * screen_xy
// const Pick2DEntry * entries
// size_t count
// size_t & out_index
auto result = epok::pick_2d(camera, screen_xy, entries, count, out_index);The boolean result makes success, availability or state explicit without exceptions.
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/world2d.hpp:652
aabb_may_touchPerforms `aabb may touch` as part of bounded AABB collision queries and movement.Function templateaabb_overlapPerforms `aabb overlap` as part of bounded AABB collision queries and movement.Function templateaabb2d_containsPerforms `aabb2d contains` as part of the world2d module.Functionaabb2d_overlapPerforms `aabb2d overlap` as part of the world2d module.Functionaabb2d_touchPerforms `aabb2d touch` as part of the world2d module.Functionaabb2d_translatedPerforms `aabb2d translated` as part of the world2d module.Functionactivate_texture_bankPerforms `activate texture bank` as part of the epok module.Functionactive_cameraPerforms `active camera` as part of the epok module.Functionactor_for_slotPerforms `actor for slot` as part of the actor tables module.Functionallocate_actor_dataPerforms `allocate actor data` as part of the epok module.Functionattach_componentSpatial attachment between components of the same domain.Functionaudio_initializePerforms `audio initialize` as part of SPU sound playback and voice ownership.Function