Espacio.c 1.05 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#include "Espacio.h"

extern cpSpace *modChipmunk_cpEspacio;

int modcpSpaceGetCurrentTimeStep(INSTANCE *my, intptr_t *params) {
    float r = cpSpaceGetCurrentTimeStep(modChipmunk_cpEspacio);
    return *(int *)&r;
}

int modGetStaticBody(INSTANCE *my, intptr_t *params) {
    return modChipmunk_cpEspacio->staticBody;
}

int modcpSpaceActivateShapesTouchingShape(INSTANCE *my, intptr_t *params) {
    cpSpaceActivateShapesTouchingShape(modChipmunk_cpEspacio, (cpShape *)params[0]);
    return 0;
}
int modcpSpaceResizeStaticHash(INSTANCE *my, intptr_t *params) {
    // cpHashResizeHash(modChipmunk_cpEspacio,*(( float * ) &params[0]),params[1]);
    printf("Función en desuso\n");
    return 0;
}

int modcpSpaceResizeActiveHash(INSTANCE *my, intptr_t *params) {
    // cpSpaceResizeActiveHash(modChipmunk_cpEspacio,*(( float * ) &params[0]),params[1]);
    printf("Función en desuso\n");
    return 0;
}

int modcpSpaceUseSpatialHash(INSTANCE *my, intptr_t *params) {
    cpSpaceUseSpatialHash(modChipmunk_cpEspacio, *(float *)&params[0], params[1]);
    return 1;
}