mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
cleanup: minor tweaks
This commit is contained in:
parent
af71e611c1
commit
7421b4f74a
@ -26,9 +26,9 @@ typedef struct {
|
||||
int filebuf_size;
|
||||
|
||||
/* custom IO */
|
||||
void* arg;
|
||||
void* arg;
|
||||
int (*read)(void* dst, int size, int n, void* arg);
|
||||
int (*seek)(void* arg, int offset, int whence);
|
||||
int (*seek)(void* arg, int offset, int whence);
|
||||
|
||||
} icesnd_callback_t;
|
||||
|
||||
|
@ -23,11 +23,11 @@
|
||||
#define AHX_GRANULES 12
|
||||
static const uint8_t AHX_BITALLOC_TABLE[32] = { 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
|
||||
static const uint8_t AHX_OFFSET_TABLE[5][16] = {
|
||||
{ 0 },
|
||||
{ 0 },
|
||||
{ 0, 1, 3, 4, },
|
||||
{ 0, 1, 3, 4, 5, 6, 7, 8, },
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }
|
||||
{ 0 },
|
||||
{ 0 },
|
||||
{ 0, 1, 3, 4, },
|
||||
{ 0, 1, 3, 4, 5, 6, 7, 8, },
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }
|
||||
};
|
||||
static const int8_t AHX_QBITS_TABLE[17] = { -5, -7, 3, -10, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 21 // object: root (x2 listN + other data)
|
||||
* 0D 04 0D 06,0B,0D,0E // list8[4]: key indexes (#0 "id", #1 "spec", #2 "version", #3 "voice"; found in a separate "key names" table)
|
||||
* 0D 04 0D 00,02,04,09 // list8[4]: byte offsets of next 4 items
|
||||
* 15 02 // #0 string8: string key #2 ("pc")
|
||||
* 15 02 // #0 string8: string key #2 ("pc")
|
||||
* 1E 5C8F823F // #1 float32: 1.02
|
||||
* 05 02 // #2 int8: 2
|
||||
* 21 // #3 object
|
||||
|
13
vspf.py
13
vspf.py
@ -38,17 +38,16 @@ class ProjectFixer:
|
||||
|
||||
|
||||
def read(self):
|
||||
with open (self.prj_pathname, 'r', encoding='utf-8') as f:
|
||||
with open (self.prj_pathname, 'r', encoding='utf-8-sig') as f:
|
||||
lines = f.readlines()
|
||||
self.in_lines = [line.strip('\r\n') for line in lines]
|
||||
|
||||
|
||||
def add(self, text):
|
||||
self.out_lines.append(text)
|
||||
|
||||
def get_files(self, ext):
|
||||
files = glob.glob(self.prj_path + '/**/*.' + ext, recursive=True)
|
||||
|
||||
|
||||
items = []
|
||||
for file in files:
|
||||
basefile = file[len(self.prj_path) + 1 : ].replace('/', '\\')
|
||||
@ -57,8 +56,8 @@ class ProjectFixer:
|
||||
pos = basefile.rindex('\\')
|
||||
path = basefile[0 : pos + 1]
|
||||
items.append( (basefile, path) )
|
||||
return items
|
||||
|
||||
return items
|
||||
|
||||
|
||||
def write_section(self, is_includes):
|
||||
if is_includes:
|
||||
@ -94,7 +93,7 @@ class ProjectFixer:
|
||||
# - writes lines if not target section
|
||||
# - when target section found (includes or compiles), redo section's files again
|
||||
def process(self):
|
||||
|
||||
|
||||
lines_itr = iter(self.in_lines)
|
||||
for line in lines_itr:
|
||||
self.add(line)
|
||||
@ -122,7 +121,7 @@ class ProjectFixer:
|
||||
self.add(next_line)
|
||||
|
||||
#print("done", len(self.out_lines))
|
||||
|
||||
|
||||
def write(self):
|
||||
if not self.is_changed():
|
||||
print("no changes detected for %s" % (self.prj_pathname))
|
||||
|
Loading…
Reference in New Issue
Block a user