View extract-texture-names.py
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
import os | |
for f in sorted(os.listdir("AllModel")): | |
if f.endswith(".mtl"): | |
with open(f"AllModel/{f}", "rt") as file: | |
for line in file: | |
if line.startswith("\tmap_Kd "): | |
texture = line.rstrip()[-6:] | |
print(f"INSERT INTO \"model_texture\" VALUES('Stalker','{f.replace('mtl', 'mbac')}','{texture}');") | |
break |
View build-packages-list.py
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
#!/usr/bin/env python | |
#usage: build-package-list.py <directory> | |
from __future__ import print_function | |
import os | |
import sys | |
DIR = sys.argv[1] |
View ShaderGlobal.cpp
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
// Renderer.hpp | |
class ShaderGlobal { | |
public: | |
ShaderGlobal(const char* name) { | |
this->handle = Rend::CreateShaderGlobal(name); | |
} | |
template <typename T> | |
void operator = (const T& value) { |
View fixheader.py
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
# usage: fixheader.py <valid_bmp> <file_to_fix> | |
HEADER_SIZE = 54 | |
import sys | |
header = sys.argv[1] | |
fileName = sys.argv[2] | |
with open(header, 'rb') as input, open(fileName, 'rb+') as output: |