Difference between revisions of "Data Types"

From RuneWiki
Jump to navigationJump to search
m
(→‎Non Standard Data Types: added tribyte ,smarts and smart)
Line 8: Line 8:
  
 
{| border=2
 
{| border=2
! Name
+
! winterLove name
 +
! JaGeX name
 
! Read transformation
 
! Read transformation
 
! Write transformation
 
! Write transformation
 
|-
 
|-
 
| Special A
 
| Special A
 +
| Unknown
 
| value - 128
 
| value - 128
 
| value + 128
 
| value + 128
 
|-
 
|-
 
| Special C
 
| Special C
 +
| Unknown
 
| 0 - value
 
| 0 - value
 
| 0 - value
 
| 0 - value
 
|-
 
|-
 
| Special S
 
| Special S
 +
| Unknown
 
| 128 - value
 
| 128 - value
 
| 128 - value
 
| 128 - value
|}
+
|-
 +
| SpaceSaverA
 +
| smarts
 +
| (value[0] < 128) ? (((value[0] - 128)<<8)+value[1]) : value[0]
 +
| if(value < 128) putword(value+32768) else putbyte(value);
 +
|-
 +
| SpaceSaverB
 +
| smart
 +
| (value[0] < 128) ? value[0] - 64 | ((value[0]<<8)+value[1]) - 49152
 +
| if(i < 64 && i >= -64) putbyte(i + 64) else if(i < 16384 && i >= -16384) putword(i + 49152);
 +
|-
 +
| tribyte / RGBColour / 3Byte / int3
 +
| 3
 +
| (value[0] << 24) + (value[1] << 16) + value[2]
 +
| putbyte(value >> 24);putbyte(value >> 16);putbyte(value);
 +
}
  
Additionally, RuneScape also uses two additional integers (named int 1 and int 2) and has a 3-byte data type (commonly named 3 byte int or tri byte).
+
Additionally, RuneScape also uses two additional integers (named int 1 and int 2).

Revision as of 10:18, 22 September 2009

Stub

This article is a stub. You can help RuneWiki by expanding it.


Introduction

RuneScape uses a number of standard and non-standard data types.

Non Standard Data Types

winterLove name JaGeX name Read transformation Write transformation
Special A Unknown value - 128 value + 128
Special C Unknown 0 - value 0 - value
Special S Unknown 128 - value 128 - value
SpaceSaverA smarts (value[0] < 128) ? (((value[0] - 128)<<8)+value[1]) : value[0] if(value < 128) putword(value+32768) else putbyte(value);
SpaceSaverB smart ((value[0]<<8)+value[1]) - 49152 if(i < 64 && i >= -64) putbyte(i + 64) else if(i < 16384 && i >= -16384) putword(i + 49152);
tribyte / RGBColour / 3Byte / int3 3 (value[0] << 24) + (value[1] << 16) + value[2] putbyte(value >> 24);putbyte(value >> 16);putbyte(value);

}

Additionally, RuneScape also uses two additional integers (named int 1 and int 2).