Created
May 23, 2014 09:43
-
-
Save kevinburke/6bcf4a8fcc95faad7bac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
rct "github.com/kevinburke/rct-rides" | |
) | |
func main() { | |
f, err := os.Open(os.Getenv("HOME") + "/code/OpenRCT2/openrct2.exe") | |
if err != nil { | |
panic(err) | |
} | |
defer f.Close() | |
var WIDTH = 0x12 | |
b := make([]byte, 100*WIDTH) | |
// all 4 bytes here have significance on their own, somehow | |
addr := 0x0057E3A8 | |
f.ReadAt(b, int64(addr)) // direction change stored in 2nd bit. | |
for i := 0; i < len(rct.RIDENAMES); i++ { | |
fmt.Printf("\t%d,\t", b[i*WIDTH]) | |
fmt.Printf("// %02x ", i) | |
fmt.Printf("%s\n", rct.RIDENAMES[i]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment