mirror of
https://github.com/open-goal/jak-project
synced 2026-05-31 09:22:14 -04:00
5b44aece75
* delete unused shaders * hide some options in debug menu * change fullscreen logic a bit * add "all actors" toggle * borderless fix and fix alpha in direct renderer untextured (do we need a separate shader for that?) * fix fuel cell orbit icons in widescreen * fix `curve` types * refs * fix levitator task... * fix some task stuff * update font code a bit (temp) * cmake, third-party and visual studio overhaul * Update .gitmodules * update modules * clone repos * fix encoding in zydis * where did these come from * try again * add submodule * Update 11zip * Update 11zip * Update 11zip * delete * try again * clang * update compiler flags * delete 11zip. go away. * Create memory-dump-p2s.py * properly * fix minimum architecture c++ compiler flags * fix zydis * oops * Update all-types.gc * fix clang-cl tests * make "all actors" work better, entity debug qol * update game-text conversion code to be more modularized * Create vendor.txt * fix typos and minor things * update refs * clang * Attempt to add clang-cl support to vs2019 and CI * vs2022 + clang-cl * srsly? fix clang build * Update launch.vs.json * extend windows CI timer
47 lines
1.1 KiB
Python
Vendored
Generated
47 lines
1.1 KiB
Python
Vendored
Generated
#!/usr/bin/env python3
|
|
from struct import pack
|
|
|
|
|
|
class BinaryWriter(object):
|
|
|
|
def __init__(self):
|
|
self.data = b''
|
|
|
|
def _write_internal(self, fmt, val):
|
|
self.data += pack(fmt, val)
|
|
return self
|
|
|
|
def write_uint8(self, val):
|
|
return self._write_internal('<B', val)
|
|
|
|
def write_uint16(self, val):
|
|
return self._write_internal('<H', val)
|
|
|
|
def write_uint32(self, val):
|
|
return self._write_internal('<L', val)
|
|
|
|
def write_uint64(self, val):
|
|
return self._write_internal('<Q', val)
|
|
|
|
def write_int8(self, val):
|
|
return self._write_internal('<b', val)
|
|
|
|
def write_int16(self, val):
|
|
return self._write_internal('<h', val)
|
|
|
|
def write_int32(self, val):
|
|
return self._write_internal('<l', val)
|
|
|
|
def write_int64(self, val):
|
|
return self._write_internal('<q', val)
|
|
|
|
def write_bytes(self, data):
|
|
self.data += bytes(data)
|
|
return self
|
|
|
|
def write_padding(self, size, padding_byte=b'\x00'):
|
|
self.write_bytes(padding_byte * size)
|
|
|
|
def get_data(self):
|
|
return self.data
|