ChrisOS Research ProjectOperating systems · language systems · graphics · machine emulation
DOCUMENTATION ARCHIVEMAIN BRANCH
ChrisOS/Referência de fonte: GAMES/PHYS.CC

Referência de fonte: GAMES/PHYS.CC

Registro determinístico da fonte. O conteúdo completo do arquivo é reproduzido abaixo; esta página não substitui a interpretação arquitetural dos capítulos autorais.

Identidade do arquivo

Campo Valor
Path GAMES/PHYS.CC
Lines 34
Bytes 762
SHA-256 9d3f7ce3795b9ad7b2fa56dbd74e741c877468ec3c73357139975d160066825c
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Dependências sintáticas detectadas

Linha Include
1 LIB/BODY.CC
2 LIB/CLIP.CC
3 LIB/ANIM.CC

Símbolos detectados

Linha Símbolo
5 main

Fonte completa

O bloco seguinte é o arquivo textual integral na revisão indicada. Não há elisão, abreviação ou paráfrase.

#include "LIB/BODY.CC"
#include "LIB/CLIP.CC"
#include "LIB/ANIM.CC"

void main() {
    float x;
    float y;
    float z;
    float vy;
    float ax;
    int frames;
    x = 0.0;
    y = 8.0;
    z = 0.0;
    vy = 0.0;
    viewport(320, 200);
    frames = 0;
    while (1) {
        if (key(1))
            return;
        vy = body_step_vy(y, vy, 0.05, -20.0, 1.0);
        y = body_step_y(y, vy, 0.05, -20.0, 1.0);
        ax = anim_eval1(0.0, 0.0, 1.0, 2.0, 0.5);
        clear(1);
        meshf(0, 8, 12, x, y, z, frames, 14);
        frames = frames + 2;
        if (frames > 359)
            frames = 0;
        wait(16);
        x = x + clip_aabb(0.0, 0.0, 0.0, 1.0, ax, 0.0, 0.0, 1.0);
        x = x + body_hit(x, y, z, 1.0, ax, 0.0, 0.0, 1.0);
    }
}

Papel deste registro

O atlas garante rastreabilidade arquivo-a-arquivo. Responsabilidade, invariantes, ownership, concorrência, segurança, desempenho e interação entre subsistemas pertencem aos capítulos autorais e devem citar este arquivo quando aplicável.

Registro do documento ID: source-9d3f7ce3795b9ad7 Reviewed source: da3df29cb397 Class: generated-source-reference