lib/battleLib.js
// Reads a set of bytes in reverse, then returns it's number value
Reads a set of bytes in reverse, then returns it's number value
Reads a set of bytes in reverse then returns it ' s number value
function readMoveOffset(file, offset, length){
    let toReturn = ""
    for (const byte of file.slice(offset, offset + length).reverse()){
        toReturn = toReturn + toHexString(byte, 2)
    }
    return parseInt(toReturn, 16) - 0x08000000 
}
function readMoveOffset ( file , offset , length ) { let toReturn = "" for ( const byte of file . slice ( offset , offset + length ) . reverse ( ) ) { toReturn = toReturn + toHexString ( byte , 2 ) } return parseInt ( toReturn , 16 ) - 0x08000000 }
Reads a set of bytes in reverse, then returns it's number value
Reads a set of bytes in reverse then returns it ' s number value
// All rom data pointers are offset (due to how gba ram works)