Skip to content

Instantly share code, notes, and snippets.

View FelixWolf's full-sized avatar
💭
https://youtu.be/NvVFHIr6T9Y

Kyler "Félix" Eastridge FelixWolf

💭
https://youtu.be/NvVFHIr6T9Y
View GitHub Profile
@FelixWolf
FelixWolf / dspires_convert.py
Created November 2, 2022 02:27
Convert dragonspires map format to furcadia map format
#!/usr/bin/env python3
import struct
tiles = []
items = []
width = 52
height = 100
def decode(head, tack):
return (head*95+tack)
for z in range(1, 51):
MAP <integer version> Furcadia
Key=Value (Repeat key value property until reading next element)
BODY (Specifically \nBODY\n)
unsigned short floors[width*height]
unsigned short objects[width*height]
unsigned byte walls[width*height * 2]
if version > 1.30:
unsigned short regions[width*height]
unsigned short effects[width*height]
if version >= 1.50:
@FelixWolf
FelixWolf / bramble_maze.py
Created October 25, 2022 11:06
Bramble Maze
#!/usr/bin/env python3
from PIL import Image
import struct
palette = [
0x00000000, 0x000001ff, 0xfffffeff, 0xb57b4aff, 0xf0e0c0ff, 0xa88068ff,
0x784830ff, 0x906810ff, 0xe08048ff, 0xf0e8e8ff, 0xc07800ff, 0x18a800ff,
0x502818ff, 0x604808ff, 0xb09058ff, 0x3888c8ff, 0xe06068ff, 0x108000ff,
0xd6d6ceff, 0xb53129ff, 0x940808ff, 0xb50000ff, 0xad2910ff, 0xbd4218ff,
0xe74a52ff, 0xb53910ff, 0xce4a52ff, 0xbd3918ff, 0x943110ff, 0xd67318ff,
0xa53918ff, 0xde7b42ff, 0x9c4218ff, 0xe7844aff, 0xbd5a18ff, 0xce6318ff,
@FelixWolf
FelixWolf / simple_fs.py
Last active September 22, 2022 14:03
Public Domain (Or zlib, take your pick!) implementation of a simple file system. No support for file or directories (YET), but structure is there.
#!/usr/bin/env python3
"""
Description:
Virtual file system implementation.
Currently supports blocks, block chaining, and block bitmaps.
No support for files and directories, but the structure is there.
Publishing this as-is right now in case I never get around to finishing it.
Check back for updates.
Flaws:
@FelixWolf
FelixWolf / sl_puppetry.md
Last active June 13, 2024 01:55
How to install, setup, and use the puppetry viewer and plugins

How to use LEAP on windows

Note on instructions

There are a lot of steps involved here, but that's because this is in-development. Once this is finalized, people will be developing stuff that is stand alone, without the need to install all this stuff.

Important pre-install steps

If you have python installed from the windows store, UNINSTALL IT! Windows store installs python in a virtual environment, which makes it not work

#!/usr/bin/env python3
from libfurc import fox5
LICENSE_FC_BY_SA = 0
LICENSE_FC0 = 1
LICENSE_FC_BY_NC_SA = 2
LICENSE_FC_ND_NC_SA = 3
LICENSE_FC_PRIVATE_SA = 4
LICENSE_FC_BY_X_SA = 5
LICENSE_DEP = 101
#!/usr/bin/env python3
import struct
import io
from libfurc import archive
def unpack(data):
data.seek(-10, 2)
if data.read(2) != b"FC":
print("Not a furcadia installer!")
exit(1)
@FelixWolf
FelixWolf / fox5.py
Last active June 20, 2022 10:10
Furcadia fox parser, zlib licensed
#!/usr/bin/env python3
try:
from PIL import Image, ImageDraw, ImageOps
except ModuleNotFoundError:
pass
import struct
import lzma
import io
sUInt64 = struct.Struct("<Q")
@FelixWolf
FelixWolf / shortname.py
Created June 16, 2022 22:53
Generate short names for furcadia
#!/usr/bin/env python3
import re
rEntities = re.compile(r"(?:&([#\w+]+);)")
entityList = {
'quot': '"', 'lt': '<', 'gt': '>', 'iexcl': '!', 'cent': '', 'pound': '',
'curren': '', 'yen': '', 'brvbar': '|', 'sect': '', 'uml': '', 'copy': '',
'ordf': '', 'laquo': '', 'not': '', 'shy': '', 'reg': '','macr': '',
'deg': '', 'plusmn': '', 'sup2': '', 'sup3': '', 'acute': '', 'micro': '',
'para': '', 'middot': '', 'cedil': '', 'sup1': '', 'ordm': '', 'raquo': '',
Element tags //Stuff in "<>"s
font
color
0 //255 //Color palette
#RRGGBB //RGB in hex format
Color name //Case insensitive:
RED //#ff0000
AQUA //#00ffff
BLUE //#0000ff
GRAY //#808080