Files
Hexwell aad2cdaabc refactor: rebrand OrionHEN to OnionHEN
Rename product, namespaces, libraries, paths, and assets from Orion/orion
to Onion/onion across the tree. TCP stack-shutdown magic is now ONIO
(0x4F4E494F) to match the corrected branding.
2026-07-15 18:23:16 +08:00

25 lines
489 B
C

/* Copyright (C) 2025 OnionHEN / LightningMods
*
* PS5 registry entity-id arithmetic (host-testable, no SDK).
*
* Account slot @a is 1..16. Entity = (slot-1)*65536 + base (@d).
* Out-of-range slots return the fallback id @e.
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
static inline int onion_reg_entity_number(int a, int d, int e) {
const int b = 16;
const int c = 65536;
if (a < 1 || a > b)
return e;
return (a - 1) * c + d;
}
#ifdef __cplusplus
}
#endif