bahamut/tools/script-extractor.hpp
//scan forward to find the end of a string
scan forward to find the end of a string
scan forward to find the end of a string
auto Script::findTerminal(u16 offset) -> maybe<u16> {
  while(offset < data.size()) {
    if(mode == Mode::Chapter) {
      if(data[offset] == 0xff) return offset;
      if(data[offset] == 0xfd) return offset;
    }
    if(mode == Mode::Field) {
      if(data[offset] == 0xff) return offset;
    }
    offset++;
  }
  return nothing;
}
auto Script :: findTerminal ( u16 offset ) -> maybe < u16 > { while ( offset < data . size ( ) ) { if ( mode == Mode :: Chapter ) { if ( data [ offset ] == 0xff ) return offset ; if ( data [ offset ] == 0xfd ) return offset ; } if ( mode == Mode :: Field ) { if ( data [ offset ] == 0xff ) return offset ; } offset ++ ; } return nothing ; }
scan forward to find the end of a string
scan forward to find the end of a string