Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

1.7 KB
Raw Blame
/* GENERATED by @estella/compiler — do not edit. */
/* This file calls the engine zero times, and holds no data of its own. */
#include "estella_abi.h"
#include "estella_offsets.h"

/* Which BUILD this is, for a loader holding the sidecar written beside
   it. The two digests above answer "is this engine right" and "are the
   project shapes right"; neither answers "are these two the same pair". */
ES_EXPORT uint32_t es_module_contract_lo(void) { return 0x714ea1e3u; }
ES_EXPORT uint32_t es_module_contract_hi(void) { return 0x10bf77bbu; }

ES_EXPORT void es_sys_MoveSystem(es_addr_t es_ctx) {
    const EsSysCtx *es_c = (const EsSysCtx *)ES_PTR(es_ctx);
    const EsQueryRows *es_queries = (const EsQueryRows *)ES_PTR(es_c->queries);
    const es_addr_t *es_resources = (const es_addr_t *)ES_PTR(es_c->resources);
    unsigned char *time_1 = ES_PTR(es_resources[0]);
    {
        const es_addr_t *es_rows0 = (const es_addr_t *)ES_PTR(es_queries[0].rows);
        const es_addr_t es_n0 = es_queries[0].count;
        for (es_addr_t es_i0 = 0; es_i0 < es_n0; ++es_i0) {
            const es_addr_t *es_row0 = es_rows0 + es_i0 * 3u;
            unsigned char *transform_3 = ES_PTR(es_row0[1]);
            unsigned char *mover_4 = ES_PTR(es_row0[2]);
            es_set_f32(transform_3 + ES_OFF_Transform_position_x, (es_f32(transform_3 + ES_OFF_Transform_position_x) + ((es_f64(mover_4 + ES_OFF_Mover_directionX) * es_f64(mover_4 + ES_OFF_Mover_speed)) * es_f64(time_1 + ES_OFF_Time_delta))));
            es_set_f32(transform_3 + ES_OFF_Transform_position_y, (es_f32(transform_3 + ES_OFF_Transform_position_y) + ((es_f64(mover_4 + ES_OFF_Mover_directionY) * es_f64(mover_4 + ES_OFF_Mover_speed)) * es_f64(time_1 + ES_OFF_Time_delta))));
        }
    }
}