rust-samp-sdk 3.6.0

Low-level FFI bindings for the SA-MP AMX virtual machine and open.mp native component ABI. Used internally by `rust-samp`; depend on it directly only if you need raw access without the higher-level macros and lifecycle.
Documentation
//! `IPickupsComponent` — generated by `cargo xtask gen-omp` from `Server/Components/Pickups/pickups.hpp`.
//! Implemented by `PickupsComponent` in the server's `Pickups`.
//!
//! Do not edit: change `xtask/omp-wrappers.toml` or the generator and
//! regenerate. Slots are clang's layout of the header for each ABI, checked
//! against the official binaries by `cargo xtask check-abi --generated`.

#![allow(unused_imports)]

use crate::omp::containers::{FlatSet, HybridString, Pair, Span};
use crate::omp::types::{
    Colour, GTAQuat, Hours, Microseconds, Milliseconds, Minutes, Seconds, StringView, TimePoint,
    UID, Vector2, Vector3, Vector4, WorldTimePoint,
};
use crate::omp::vtable::{call_vtable_small_struct, opaque, slots, virtual_fns};
use crate::omp::*;

slots! {
    /// `IEventDispatcher<PickupEventHandler> & IPickupsComponent::getEventDispatcher()`
    SLOT_GET_EVENT_DISPATCHER: usize = 18, 16;
    /// `int IPickupsComponent::toLegacyID(int)`
    SLOT_TO_LEGACY_ID: usize = 20, 18;
    /// `int IPickupsComponent::fromLegacyID(int)`
    SLOT_FROM_LEGACY_ID: usize = 21, 19;
    /// `void IPickupsComponent::releaseLegacyID(int)`
    SLOT_RELEASE_LEGACY_ID: usize = 22, 20;
    /// `int IPickupsComponent::reserveLegacyID()`
    SLOT_RESERVE_LEGACY_ID: usize = 23, 21;
    /// `void IPickupsComponent::setLegacyID(int, int)`
    SLOT_SET_LEGACY_ID: usize = 24, 22;
}

virtual_fns! {
    /// `IEventDispatcher<PickupEventHandler> & IPickupsComponent::getEventDispatcher()`.
    ///
    /// # Safety
    /// `component` must be a live `IPickupsComponent`.
    #[must_use]
    pub fn pickups_event_dispatcher(
        component: IPickupsComponent,
    ) -> *mut EventDispatcher<PickupHandler> = [0, SLOT_GET_EVENT_DISPATCHER] or std::ptr::null_mut();

    /// `int IPickupsComponent::toLegacyID(int)`.
    ///
    /// # Safety
    /// `component` must be a live `IPickupsComponent`.
    #[must_use]
    pub fn pickups_to_legacy_id(
        component: IPickupsComponent,
        real: i32,
    ) -> i32 = [0, SLOT_TO_LEGACY_ID] or 0;

    /// `int IPickupsComponent::fromLegacyID(int)`.
    ///
    /// # Safety
    /// `component` must be a live `IPickupsComponent`.
    #[must_use]
    pub fn pickups_from_legacy_id(
        component: IPickupsComponent,
        legacy: i32,
    ) -> i32 = [0, SLOT_FROM_LEGACY_ID] or 0;

    /// `void IPickupsComponent::releaseLegacyID(int)`.
    ///
    /// # Safety
    /// `component` must be a live `IPickupsComponent`.
    pub fn pickups_release_legacy_id(
        component: IPickupsComponent,
        legacy: i32,
    ) = [0, SLOT_RELEASE_LEGACY_ID];

    /// `int IPickupsComponent::reserveLegacyID()`.
    ///
    /// # Safety
    /// `component` must be a live `IPickupsComponent`.
    #[must_use]
    pub fn pickups_reserve_legacy_id(
        component: IPickupsComponent,
    ) -> i32 = [0, SLOT_RESERVE_LEGACY_ID] or 0;

    /// `void IPickupsComponent::setLegacyID(int, int)`.
    ///
    /// # Safety
    /// `component` must be a live `IPickupsComponent`.
    pub fn pickups_set_legacy_id(
        component: IPickupsComponent,
        legacy: i32,
        real: i32,
    ) = [0, SLOT_SET_LEGACY_ID];
}

// What the generator left out, and why.
// skipped: `IPickup * IPickupsComponent::create(int, PickupType, Vector3, uint32_t, bool)` — covered by a hand-written wrapper under another name