-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The first upload of my local Reggie! Next source
- Loading branch information
0 parents
commit eed1bb8
Showing
1,101 changed files
with
48,696 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
Binary file not shown.
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
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 |
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
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 |
Oops, something went wrong.