Skip to content

Commit

Permalink
Initial upload
Browse files Browse the repository at this point in the history
The first upload of my local Reggie! Next source
  • Loading branch information
RoadrunnerWMC committed Jul 9, 2014
0 parents commit eed1bb8
Show file tree
Hide file tree
Showing 1,101 changed files with 48,696 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Icon must ends with two \r.
Icon

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes
Expand Down
Binary file added LHDecompressor.exe
Binary file not shown.
47 changes: 47 additions & 0 deletions LHdec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/python
# -*- coding: latin-1 -*-

# Reggie! - New Super Mario Bros. Wii Level Editor
# Version Next Milestone 2 Alpha 0
# Copyright (C) 2009-2014 Treeki, Tempus, angelsl, JasonP27, Kamek64,
# MalStar1000, RoadrunnerWMC

# This file is part of Reggie!.

# Reggie! is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# Reggie! is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with Reggie!. If not, see <http://www.gnu.org/licenses/>.



# LHdec.py
# Provides an API to access LHDecompressor


################################################################
################################################################

# Imports
import subprocess

startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW

def getLH(fn):

output = subprocess.Popen("LHDecompressor "+fn,stdout=subprocess.PIPE,startupinfo=startupinfo).communicate()[0].split(',')

fcontent = ''
for i in output[:len(output)-1]:
fcontent+=chr(int(i))

return fcontent
58 changes: 58 additions & 0 deletions TPL.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
try:
raise ImportError('')
print('a')
import pyximport
print('b')
pyximport.install()
print('c')
import TPLcy
print('d')
except ImportError:
print('e')
from TPLpy import *
print('f')
print('g')

# Enums
I4 = 0
I8 = 1
IA4 = 2
IA8 = 3
RGB565 = 4
RGB4A3 = 5
RGBA8 = 6
CI4 = 8
CI8 = 9
CI14x2 = 10
CMPR = 14

def algorithm(type):
"""Returns the appropriate algorithm based on the type specified"""
if not isinstance(type, int):
raise TypeError('Type is not an int')

if type == CI4:
raise ValueError('CI4 is not supported')
elif type == CI8:
raise ValueError('CI8 is not supported')
elif type == CI14x2:
raise ValueError('CI14x2 is not supported')
elif type == CMPR:
raise ValueError('CMPR is not supported')
elif type < 0 or type in (7, 11, 12, 13) or type > 14:
raise ValueError('Unrecognized type')

if type == I4:
return I4Decoder
elif type == I8:
return I8Decoder
elif type == IA4:
return IA4Decoder
elif type == IA8:
return IA8Decoder
elif type == RGB565:
return RGB565Decoder
elif type == RGB4A3:
return RGB4A3Decoder
elif type == RGBA8:
return RGBA8Decoder
Loading

0 comments on commit eed1bb8

Please sign in to comment.