GithubHelp home page GithubHelp logo

trosettastone3's Issues

Split direction in triangulation functions

In section 4.4.7, the triangulation-functions, just below the different types illustration, the described functions are somewhat confusing when in comes to the mentioned directions.
0x07/... mentions nw/se, but below it says sw/ne
0x08/... mentions ne/sw, but below sw/nw
0x09/... mentions just nw, but below sw/ne
0x0a/... mentions just ne, but below nw/se

mathnormal is not supported

This italic font is not supported by AsciiDoc and could be replaced by mathit. The only place where it is used is in room_geometry.asc.

HTML version feature: Quick access to struct definition

Thanks for the good documentation, very useful when mucking about the games' assets.

One additional feature I think could be useful in the HTML version is some manner of quick access to a struct's (e.g. tr_room_info) definition from where the struct is mentioned inside a pseudocode block. For instance, while working through section 10 of the documentation (.PHD file layout), I kept a couple of extra browser tabs open to manually copy/paste/find struct definitions. While I may have been doing it wrong, it was in any case the workflow I adopted given the circumstances, and it was a bit tedious.

Being able to click a link in the pseudocode would've been quite handy. A further option might be to have the struct definition pop up on mouse hover, like e.g. Wikipedia does with its links. Also, since structs tend to be nested inside other structs, an expandable tree structure might another way to go - i.e. clicking on a symbol next to the struct's name expands out the struct's contents, and same for any structs inside there.

(I see that where a struct is mentioned outside of a code block, a direct link to its definition is provided; so maybe there's some technical reason involved for why code blocks include no links.)

Demo data format definition

I noticed in the rosetta stone info that there is no details on the demodata level data.

From my decompile of a TR1 exe that I'm playing with this is the usage of demo data:

LoadLevel()
{
...
  g_demoDataIndex = 0;
  g_pDemoData = (tr_demodata *)GameMalloc(36000,0x1b);  // load 36000 bytes from file, 0x1B is string "Load Demo Buffer"
...
}

// g_pDemoData is referenced in only 3 functions
// GameDemoSetCurrentEntity:00415d03(R)
// GameDemoRunTimer:00415d7e(R),
// LoadLevel:0041b36c(W), 

void GameDemoRunTimer(void)
{
  if (g_demoRunTime < 9000) {
    g_gameInputCmds = g_pDemoData[g_demoDataIndex]; // gets first tr_demodata field
  }
  else {
    g_gameInputCmds = 0xffffffff;
  }
  if (g_gameInputCmds != 0xffffffff) {
    g_demoDataIndex= g_demoDataIndex+ 1;  // moves demodata to the entity camera / position information
  }
  return;
}

void xGameDemoSetCurrentEntity(void)

{
  short height;
  tr1_room_sector *pSector;
  short room;
  tr1_entity *pEnt;
  
  pEnt = g_pCurrentEntity;
  g_pCurrentEntity->x = g_pDemoData[0];
  pEnt->y = g_pDemoData[1];
  pEnt->z = g_pDemoData[2];
  pEnt->rotateY = *(short *)(g_pDemoData + 3);
  pEnt->rotateX = *(short *)(g_pDemoData + 4);
  pEnt->rotateZ = *(short *)(g_pDemoData + 5);
  room = *(short *)(g_pDemoData + 6);

  if (pEnt->Room != room) {
    GameSetEntityItemRoom(g_currentEntityIndex, room);
  }

  pSector = GameClipToRoom(pEnt->x,pEnt->y,pEnt->z,&room);
  height = GameGetHeight(pSector,pEnt->x,pEnt->y,pEnt->z);
  g_pCurrentEntity.height = height;

  g_demoDataIndex = g_demoDataIndex + 7;  // increment demodata index to next flags field for GameDemoRunTimer()

  return;
}

/* structure definition 

struct tr_demodata
    int32_t flags; 
    struct tr_demodata_entitypos
    {
        int32_t x;
        int32_t y;
        int32_t z;
        int16_t rotX;
        int16_t reseverved1; // alignment padding
        int16_t rotY;
        int16_t reseverved2;
        int16_t rotZ;
        int16_t reseverved3;
        int16_t roomId;
        int16_t reseverved4;
    }
}

*/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.