mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 03:35:12 -06:00
Rest of nirai shit.
This commit is contained in:
parent
e5dc72f9ce
commit
ec6ed0a35d
3 changed files with 22 additions and 14 deletions
|
@ -30,19 +30,28 @@ del dc
|
|||
del iv
|
||||
del key
|
||||
|
||||
# The VirtualFileSystem, which has already initialized, doesn't see the mount
|
||||
# directives in the config(s) yet. We have to force it to load those manually:
|
||||
#from panda3d.core import VirtualFileSystem, ConfigVariableList, Filename
|
||||
vfs = VirtualFileSystem.getGlobalPtr()
|
||||
mounts = ConfigVariableList('vfs-mount')
|
||||
for mount in mounts:
|
||||
mountfile, mountpoint = (mount.split(' ', 2) + [None, None, None])[:2]
|
||||
vfs.mount(Filename(mountfile), Filename(mountpoint), 0)
|
||||
|
||||
# Resources
|
||||
# TO DO: Sign and verify the phases to prevent edition
|
||||
# TO DO: Sign and verify the phases to prevent editing.
|
||||
|
||||
vfs = VirtualFileSystem.getGlobalPtr()
|
||||
mfs = [3, 3.5, 4, 5, 5.5, 6, 7, 8, 9, 10, 11, 12, 13]
|
||||
abort = False
|
||||
|
||||
for mf in mfs:
|
||||
filename = 'resources/default/phase_%s.mf' % mf
|
||||
if not os.path.isfile(filename):
|
||||
print 'Phase %s not found' % filename
|
||||
abort = True
|
||||
break
|
||||
|
||||
mf = Multifile()
|
||||
mf.openRead(filename)
|
||||
|
||||
if not vfs.mount(mf, '/', 0):
|
||||
print 'Unable to mount %s' % filename
|
||||
abort = True
|
||||
break
|
||||
|
||||
# Packs
|
||||
pack = os.environ.get('TT_STRIDE_CONTENT_PACK')
|
||||
import glob
|
||||
|
|
|
@ -71,7 +71,8 @@ class StridePackager(NiraiPackager):
|
|||
def generate_niraidata(self):
|
||||
print 'Generating niraidata'
|
||||
# Config
|
||||
config = self.get_file_contents('../deployment/public_client.prc')
|
||||
config = self.get_file_contents('../dependencies/config/general.prc')
|
||||
config += '\n\n' + self.get_file_contents('../dependencies/config/release/dev.prc')
|
||||
|
||||
config_iv = self.generate_key(16)
|
||||
config_key = self.generate_key(16)
|
||||
|
@ -104,7 +105,7 @@ class StridePackager(NiraiPackager):
|
|||
|
||||
# Compile the engine
|
||||
if args.compile_cxx:
|
||||
compiler = NiraiCompiler('stride.exe', libs=set(glob.glob('c:/repos/libpandadna/libpandadna.dir/Release/*.obj')))
|
||||
compiler = NiraiCompiler('stride.exe', libs=set(glob.glob('libpandadna/libpandadna.dir/Release/*.obj')))
|
||||
|
||||
compiler.add_nirai_files()
|
||||
compiler.add_source('src/stride.cxx')
|
||||
|
|
|
@ -136,8 +136,6 @@ int niraicall_onLoadGameData()
|
|||
memset(&fzns[num_modules], 0, sizeof(_frozen));
|
||||
PyImport_FrozenModules = fzns;
|
||||
|
||||
delete[] &fzns;
|
||||
|
||||
// libpandadna
|
||||
init_libpandadna();
|
||||
initlibpandadna();
|
||||
|
|
Loading…
Reference in a new issue