Jump to content

Script directory: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 78: Line 78:


char* get_string(int id) {
char* get_string(int id) {
   // top bit is unknown, always seems to be 1?
   // Mask out the top bit, it's not part of the offset.
  // If the top bit = 1, then the string is text.
  // If the top bit = 0, then the string is other binary data.
   u32 offset = string_index[id] & 0x7fffffff;
   u32 offset = string_index[id] & 0x7fffffff;
   return string_data + offset;
   return string_data + offset;
Line 127: Line 129:


char* get_string(int id) {
char* get_string(int id) {
   // top bit is unknown, always seems to be 1?
   // Mask out the top bit, it's not part of the offset.
  // If the top bit = 1, then the string is text.
  // If the top bit = 0, then the string is other binary data.
   u32 offset = string_index[id] & 0x7fffffff;
   u32 offset = string_index[id] & 0x7fffffff;
   return string_data + offset;
   return string_data + offset;