View Single Post
Jerrythabest Jerrythabest's Avatar

JCF Member

Joined: Apr 2005

Posts: 2,602

Jerrythabest is a forum legendJerrythabest is a forum legendJerrythabest is a forum legend

Aug 22, 2011, 04:27 AM
Jerrythabest is offline
Reply With Quote
Quote:
Originally Posted by Unknown Rabbit View Post
Cool! I think you have an off by one error in your INFO tile#s, though.
All tile numers are 0-based. In fact I just read the numberOfTiles long and then ran a for-loop like this:
Code:
//Somewhat simplified code
for(int i = 0; i < numberOfTiles; i++){
  byte b = nextByte();
  if(b != 0)
    print("[i:b]");
}

//Actual Java-code (just for the record)
for(int lengte = buf.getInt(), b = 0, i = 0; i < lengte; i++)
  if((b = buf.get()) != 0)
    out.println("[" + i + ":" + b + "]");
Also it's interesting to see they have marked tiles as 'Caption' even though there was no windowed mode back then.
__________________