Skip to content

Instantly share code, notes, and snippets.

View Ithamar's full-sized avatar

Ithamar R. Adema Ithamar

View GitHub Profile
@Ithamar
Ithamar / WAVLoader.gd
Created August 23, 2024 18:59
WAV file loader for Godot 4 in GDScript
extends RefCounted
class_name WAVLoader
static func load_from_file(filename: String) -> AudioStreamWAV:
return load_from_buffer(FileAccess.get_file_as_bytes(filename))
static func load_from_buffer(buf: PackedByteArray) -> AudioStreamWAV:
var stream := StreamPeerBuffer.new()
stream.data_array = buf
return load_from_stream(stream)
@Ithamar
Ithamar / unsar.py
Created May 28, 2024 19:37
unpacker for SAR archive format as used in Mofa Racer / Traktor Racer by media Verlagsgesellschaft mbH
#!/usr/bin/env python
# -*- utf-8 -*-
import sys
import struct
# SAR parser, reads the SAR archive format as used in Mofa Racer / Traktor Racer
# by media Verlagsgesellschaft mbH
#
# Only passing a SAR file will list its content, passing a filename from the archive
# dumps the content of that file to stdout.
@Ithamar
Ithamar / unapk.py
Created May 27, 2024 18:54
Unpacker for APK format from DivoGames Ltd, used in Airstrike (3D) games
#!/usr/bin/env python
# -*- utf-8 -*-
import sys
import struct
# APK parser, reads the APK archive format as used in Airstrike3D from DivoGames Ltd.
#
# Only passing a APK file will list its content, passing a filename from the archive
# dumps the content of that file to stdout.
@Ithamar
Ithamar / unpak.py
Created May 27, 2024 18:40
Unpacker for PAK format from DivoGames Ltd, Kenny's Adventure
#!/usr/bin/env python
# -*- utf-8 -*-
import sys
import struct
import os
# PAK parser, reads the PAK archive format as used in Kenny’s Adventure
# from DivoGames Ltd.
#
# Only passing a PAK file will list its content, passing a filename from the archive