ChrisOS Research ProjectOperating systems · language systems · graphics · machine emulation
DOCUMENTATION ARCHIVEMAIN BRANCH
ChrisOS/Source reference: GAMES/CUBE.CC

Source reference: GAMES/CUBE.CC

Deterministic source record. The complete textual file is reproduced below; this page does not replace architectural interpretation in the authored chapters.

File identity

Field Value
Path GAMES/CUBE.CC
Lines 32
Bytes 992
SHA-256 ec1e88f61593716b030e9dcb4bee67ac25e4f7c76d789b3f3639b70fac3335dc
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Detected syntactic dependencies

Line Include
— No preprocessor include detected.

Detected symbols

Line Symbol
1 main

Complete source

The following block is the complete textual file at the recorded revision. No lines are elided, abbreviated or paraphrased.

void main() {
  float v[24];
  int idx[36];
  float a;
  v[0]=-1.0; v[1]=-1.0; v[2]=-1.0;
  v[3]=1.0;  v[4]=-1.0; v[5]=-1.0;
  v[6]=1.0;  v[7]=1.0;  v[8]=-1.0;
  v[9]=-1.0; v[10]=1.0; v[11]=-1.0;
  v[12]=-1.0; v[13]=-1.0; v[14]=1.0;
  v[15]=1.0; v[16]=-1.0; v[17]=1.0;
  v[18]=1.0; v[19]=1.0; v[20]=1.0;
  v[21]=-1.0; v[22]=1.0; v[23]=1.0;
  idx[0]=0;  idx[1]=1;  idx[2]=2;  idx[3]=0;  idx[4]=2;  idx[5]=3;
  idx[6]=4;  idx[7]=6;  idx[8]=5;  idx[9]=4;  idx[10]=7; idx[11]=6;
  idx[12]=0; idx[13]=4; idx[14]=5; idx[15]=0; idx[16]=5; idx[17]=1;
  idx[18]=3; idx[19]=2; idx[20]=6; idx[21]=3; idx[22]=6; idx[23]=7;
  idx[24]=0; idx[25]=3; idx[26]=7; idx[27]=0; idx[28]=7; idx[29]=4;
  idx[30]=1; idx[31]=5; idx[32]=6; idx[33]=1; idx[34]=6; idx[35]=2;
  a=0.0;
  viewport(1920, 1080);
  while(1){
    if(key(1)){ return; }
    clear(1);
    cam(0.0,1.5,5.0,0.0,0.0);
    light(2.5,6.0,4.0,1.0,1.0,1.0);
    meshf(0,8,12,0.0,0.0,0.0,a,14);
    a=a+2.0;
    if(a>359.0){ a=0.0; }
    wait(1);
  }
}

Role of this record

The atlas guarantees file-by-file traceability. Responsibility, invariants, ownership, concurrency, security, performance and subsystem interactions belong in authored chapters and must cite this file when applicable.

Document record ID: source-ec1e88f61593716b Reviewed source: da3df29cb397 Class: generated-source-reference