Advertisement
Soneek

Untitled

Jan 19th, 2016
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. import sys
  2. import struct
  3. from util import *
  4.  
  5. scale = 1.2
  6.  
  7. lvd = open(sys.argv[1], "rb+")
  8.  
  9. lvd.seek(0xfe) # Seeking to section for main platform
  10.  
  11. for s in range(2):
  12.     lvd.seek(1,1)
  13.     count = readu32be(lvd) # Reading section count
  14.     for i in range(count):
  15.         lvd.seek(1,1)
  16.         x = readfloatbe(lvd)
  17.         y = readfloatbe(lvd)
  18.         lvd.seek(-8,1)
  19.         x *= scale
  20.         y *= scale
  21.         lvd.write(struct.pack(">f", x))
  22.         lvd.write(struct.pack(">f", y))
  23. lvd.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement