Permalink
Browse files

Strip whitespace from files in repo (#553)

  • Loading branch information...
wolfy1339 authored and jacob1 committed Apr 4, 2018
1 parent 31fcb1b commit 27f6a6b297f3529000594053e13f455de0c09494
Showing with 651 additions and 650 deletions.
  1. +1 −1 .gitattributes
  2. +2 −2 TODO
  3. +1 −0 data/font.h
  4. +5 −5 font/Makefile
  5. +1 −1 font/editor.c
  6. +13 −13 generator.py
  7. +14 −14 site_scons/site_tools/mfprogram/__init__.py
  8. +1 −1 site_scons/site_tools/mfprogram/relpath.py
  9. +2 −2 src/Format.cpp
  10. +2 −2 src/PowderToyRenderer.cpp
  11. +17 −17 src/SDLMain.m
  12. +18 −18 src/client/Client.cpp
  13. +4 −4 src/client/GameSave.cpp
  14. +4 −4 src/client/GameSave.h
  15. +1 −1 src/client/requestbroker/APIRequest.cpp
  16. +1 −1 src/client/requestbroker/APIRequest.h
  17. +3 −3 src/client/requestbroker/ImageRequest.cpp
  18. +9 −9 src/client/requestbroker/RequestBroker.cpp
  19. +2 −2 src/client/requestbroker/RequestBroker.h
  20. +1 −1 src/client/requestbroker/WebRequest.cpp
  21. +1 −1 src/client/requestbroker/WebRequest.h
  22. +3 −3 src/debug/ElementPopulation.cpp
  23. +4 −4 src/graphics/OpenGLDrawMethods.inl
  24. +9 −9 src/graphics/OpenGLGraphics.cpp
  25. +2 −2 src/graphics/RasterDrawMethods.inl
  26. +7 −7 src/graphics/Renderer.cpp
  27. +3 −3 src/gui/Style.cpp
  28. +4 −4 src/gui/Style.h
  29. +1 −1 src/gui/colourpicker/ColourPickerActivity.cpp
  30. +1 −1 src/gui/dialogues/ErrorMessage.cpp
  31. +1 −1 src/gui/dialogues/InformationMessage.cpp
  32. +1 −1 src/gui/dialogues/SaveIDMessage.cpp
  33. +1 −1 src/gui/filebrowser/FileBrowserActivity.cpp
  34. +2 −2 src/gui/game/BitmapBrush.h
  35. +1 −1 src/gui/game/Brush.cpp
  36. +2 −2 src/gui/game/Brush.h
  37. +2 −2 src/gui/game/Favorite.h
  38. +1 −1 src/gui/game/GameController.cpp
  39. +4 −4 src/gui/game/GameModel.cpp
  40. +3 −3 src/gui/game/PropertyTool.cpp
  41. +5 −5 src/gui/game/QuickOptions.h
  42. +5 −5 src/gui/game/SignTool.cpp
  43. +4 −4 src/gui/game/Tool.cpp
  44. +4 −4 src/gui/interface/Appearance.cpp
  45. +8 −8 src/gui/interface/Appearance.h
  46. +1 −1 src/gui/interface/AvatarButton.h
  47. +10 −10 src/gui/interface/Border.h
  48. +6 −6 src/gui/interface/Component.cpp
  49. +1 −1 src/gui/interface/ContextMenu.h
  50. +2 −2 src/gui/interface/DropDown.cpp
  51. +4 −4 src/gui/interface/Engine.h
  52. +1 −1 src/gui/interface/Keys.h
  53. +1 −1 src/gui/interface/Mouse.h
  54. +11 −11 src/gui/interface/Panel.cpp
  55. +30 −30 src/gui/interface/Panel.h
  56. +1 −1 src/gui/interface/Point.h
  57. +1 −1 src/gui/interface/ProgressBar.h
  58. +1 −1 src/gui/interface/SaveButton.cpp
  59. +1 −1 src/gui/interface/ScrollPanel.cpp
  60. +5 −5 src/gui/interface/Window.cpp
  61. +1 −1 src/gui/localbrowser/LocalBrowserView.cpp
  62. +4 −4 src/gui/login/LoginView.cpp
  63. +2 −2 src/gui/preview/PreviewView.cpp
  64. +1 −1 src/gui/preview/PreviewView.h
  65. +1 −1 src/gui/profile/ProfileActivity.cpp
  66. +1 −1 src/gui/save/ServerSaveActivity.cpp
  67. +3 −3 src/gui/search/SearchModel.cpp
  68. +3 −3 src/gui/search/SearchView.cpp
  69. +1 −1 src/gui/tags/TagsView.cpp
  70. +7 −7 src/json/json-forwards.h
  71. +9 −9 src/json/json.h
  72. +8 −8 src/json/jsoncpp.cpp
  73. +3 −3 src/lua/LuaLuna.h
  74. +16 −16 src/lua/LuaScriptInterface.cpp
  75. +5 −5 src/lua/socket/auxiliar.c
  76. +5 −5 src/lua/socket/auxiliar.h
  77. +11 −11 src/lua/socket/buffer.c
  78. +3 −3 src/lua/socket/buffer.h
  79. +2 −2 src/lua/socket/except.c
  80. +2 −2 src/lua/socket/except.h
  81. +5 −5 src/lua/socket/inet.c
  82. +5 −5 src/lua/socket/inet.h
  83. +1 −1 src/lua/socket/io.c
  84. +13 −13 src/lua/socket/options.c
  85. +2 −2 src/lua/socket/options.h
  86. +12 −12 src/lua/socket/select.c
  87. +2 −2 src/lua/socket/select.h
  88. +11 −11 src/lua/socket/socket.h
  89. +13 −13 src/lua/socket/tcp.c
  90. +4 −4 src/lua/socket/timeout.c
  91. +13 −13 src/lua/socket/udp.c
  92. +1 −1 src/lua/socket/udp.h
  93. +19 −19 src/lua/socket/unix.c
  94. +1 −1 src/lua/socket/unix.h
  95. +25 −25 src/lua/socket/usocket.c
  96. +33 −33 src/lua/socket/wsocket.c
  97. +29 −29 src/powdertoyjava/OpenGLCanvasMacOS.mm
  98. +16 −16 src/powdertoyjava/OpenGLCanvasWin32.cpp
  99. +3 −3 src/powdertoyjava/PowderToyJava.cpp
  100. +1 −1 src/resampler/resampler.cpp
  101. +10 −10 src/resampler/resampler.h
  102. +1 −1 src/simulation/CoordStack.h
  103. +6 −6 src/simulation/Gravity.cpp
  104. +6 −6 src/simulation/SaveRenderer.cpp
  105. +1 −1 src/simulation/SaveRenderer.h
  106. +16 −16 src/simulation/Simulation.cpp
  107. +2 −2 src/simulation/Simulation.h
  108. +1 −1 src/simulation/Snapshot.h
  109. +3 −3 src/simulation/StructProperty.h
  110. +1 −1 src/simulation/elements/ANAR.cpp
  111. +3 −3 src/simulation/elements/BIZR.cpp
  112. +2 −2 src/simulation/elements/BOMB.cpp
  113. +1 −1 src/simulation/elements/BRCK.cpp
  114. +2 −2 src/simulation/elements/BREC.cpp
  115. +1 −1 src/simulation/elements/CBNW.cpp
  116. +1 −1 src/simulation/elements/COAL.cpp
  117. +1 −1 src/simulation/elements/CONV.cpp
  118. +1 −1 src/simulation/elements/DEST.cpp
  119. +1 −1 src/simulation/elements/DEUT.cpp
  120. +1 −1 src/simulation/elements/DMG.cpp
  121. +1 −1 src/simulation/elements/EXOT.cpp
  122. +2 −2 src/simulation/elements/FIGH.cpp
  123. +1 −1 src/simulation/elements/FIRE.cpp
  124. +2 −2 src/simulation/elements/FSEP.cpp
  125. +1 −1 src/simulation/elements/INVIS.cpp
  126. +1 −1 src/simulation/elements/IRON.cpp
  127. +5 −5 src/simulation/elements/LCRY.cpp
  128. +1 −1 src/simulation/elements/LIGH.cpp
  129. +1 −1 src/simulation/elements/LSNS.cpp
  130. +5 −5 src/simulation/elements/PIPE.cpp
  131. +1 −1 src/simulation/elements/POLO.cpp
  132. +1 −1 src/simulation/elements/PROT.cpp
  133. +1 −1 src/simulation/elements/PSNS.cpp
  134. +1 −1 src/simulation/elements/PSTN.cpp
  135. +2 −2 src/simulation/elements/RFRG.cpp
  136. +1 −1 src/simulation/elements/SOAP.cpp
  137. +1 −1 src/simulation/elements/SPRK.cpp
  138. +3 −3 src/simulation/elements/STKM.cpp
  139. +1 −1 src/simulation/elements/WIRE.cpp
  140. +1 −1 src/simulation/simtools/Cyclone.cpp
  141. +1 −1 src/simulation/simtools/SimTool.h
  142. +2 −2 src/tasks/Task.cpp
@@ -1,2 +1,2 @@
.gitattributes export-ignore
.gitignore export-ignore
.gitignore export-ignore
4 TODO
@@ -1,5 +1,5 @@
HTTP API:
Make it OO,
Make it OO,
Use STL (i.e std::string for url, etc)
RequestBroker:
@@ -16,4 +16,4 @@ Interface General:
Move interfaces into separate folder
Interface Elements:
Vertical Scrolling for Textbox,
Vertical Scrolling for Textbox,
@@ -300,3 +300,4 @@ extern unsigned char font_data[];
extern short font_ptrs[];
#endif
#endif
@@ -1,21 +1,21 @@
editor: editor.c
gcc -oeditor -DSCALE=1 -DFONTEDITOR editor.c -lSDL -lm -O3 -ffast-math -march=k8 -Wno-unused-result
editor.exe: editor.c
i686-w64-mingw32-gcc -oeditor.exe -DSCALE=1 -DFONTEDITOR editor.c -lmingw32 -lm -lSDLmain -lSDL -O3 -ffast-math -march=k8 -mwindows -Wno-unused-result
packer: packer.c
gcc -opacker -DFONTEDITOR packer.c -lm -O3 -ffast-math -march=k8 -Wno-unused-result
packer.exe: packer.c
i686-w64-mingw32-gcc -opacker.exe -DFONTEDITOR packer.c -lm -O3 -ffast-math -march=k8 -Wno-unused-result
unpacker: unpacker.c
gcc -ounpacker -DFONTEDITOR unpacker.c -lm -O3 -ffast-math -march=k8 -Wno-unused-result
unpacker.exe: unpacker.c
i686-w64-mingw32-gcc -ounpacker.exe -DFONTEDITOR unpacker.c -lm -O3 -ffast-math -march=k8 -Wno-unused-result
clean:
rm -f editor packer unpacker editor.exe packer.exe unpacker.exe
@@ -374,7 +374,7 @@ int main(int argc, char *argv[])
#endif
drawchar(vid_buf, 32, 192+32*CELLH, c, 255, 255, 255);
sprintf(hex, "%02X", c);
drawtext(vid_buf, 32, 192+34*CELLH, hex, 255, 255, 255);
#ifdef EXTENDED_FONT
@@ -24,7 +24,7 @@ def generateElements(elementFiles, outputCpp, outputH):
f = open(elementFile, "r")
except:
f = open("src/simulation/elements/"+elementFile, "r")
fileData = f.read()
f.close()
@@ -144,7 +144,7 @@ class {0}: public {1}
def generateTools(toolFiles, outputCpp, outputH):
toolClasses = {}
toolHeader = """#ifndef TOOLCLASSES_H
#define TOOLCLASSES_H
@@ -153,7 +153,7 @@ def generateTools(toolFiles, outputCpp, outputH):
#include "simulation/simtools/SimTool.h"
"""
directives = []
for toolFile in toolFiles:
@@ -163,14 +163,14 @@ def generateTools(toolFiles, outputCpp, outputH):
f = open("src/simulation/simtools/"+toolFile, "r")
fileData = f.read()
f.close()
directiveMatcher = '//#TPT-Directive\s+([^\r\n]+)'
matcher = re.compile(directiveMatcher)
directiveMatches = matcher.findall(fileData)
for match in directiveMatches:
directives.append(match.split(" "))
classDirectives = []
usedIDs = []
for d in directives:
@@ -182,11 +182,11 @@ def generateTools(toolFiles, outputCpp, outputH):
if d[3] in usedIDs:
print("WARNING: duplicate tool ID {} ({})".format(d[3],d[2]))
usedIDs.append(d[3])
for d in directives:
if d[0] == "ToolHeader":
toolClasses[d[1]].append(" ".join(d[2:])+";")
for className, classMembers in list(toolClasses.items()):
toolHeader += """
class {0}: public SimTool
@@ -197,24 +197,24 @@ class {0}: public SimTool
virtual int Perform(Simulation * sim, Particle * cpart, int x, int y, int brushX, int brushY, float strength);
}};
""".format(className, str.join("\n", classMembers))
toolHeader += """
std::vector<SimTool*> GetTools();
#endif
"""
toolContent = """#include "ToolClasses.h"
std::vector<SimTool*> GetTools()
{
std::vector<SimTool*> tools;
""";
toolIDs = sorted(classDirectives, key=lambda directive: directive[3])
for d in toolIDs:
toolContent += """ tools.push_back(new %s());
""" % (d[1])
toolContent += """ return tools;
}
""";
@@ -226,7 +226,7 @@ class {0}: public SimTool
f = open(outputH, "w")
f.write(toolHeader)
f.close()
f = open(outputCpp, "w")
f.write(toolContent)
f.close()
@@ -26,7 +26,7 @@
import os
import new
import sys
##
##
import SCons
if sys.version_info < (2,6,0):
@@ -98,16 +98,16 @@ def MFProgramEmitter(target, source, env):
"""Ensures that target list is complete, and does validity checking. Sets precious"""
if len(target) == 1 and len(source) > 1:
#Looks like the user specified many sources and SCons created 1 target
#targets are implicit, but the builder doesn't know how to handle
#targets are implicit, but the builder doesn't know how to handle
#suffixes for multiple target files, so we'll do it here
objdir = env.get('OBJDIR', '')
#target = [os.path.join(
# objdir,
# objdir,
# os.path.splitext(
# os.path.basename(str(i)))[0] + '.o' ) for i in source]
elif len(source) == 1 and 'OBJDIR' in env:
target = os.path.join(
env['OBJDIR'],
env['OBJDIR'],
os.path.splitext(
os.path.basename(str(source[0])))[0] + '.o' )
else:
@@ -129,25 +129,25 @@ def MFProgramEmitter(target, source, env):
return target, source
def MFProgramGenerator(source, target, env, for_signature):
#Rebuild everything if
#Rebuild everything if
# a) the number of dependencies has changed
# b) any target does not exist
# c) the build command has changed
#Else rebuild only those c files that have changed_since_last_build
#The signature of this builder should always be the same, because the
#multifile compile is always functionally equivalent to rebuilding
#everything
if for_signature:
pared_sources = source
else:
#First a sanity check
assert len(set([os.path.splitext(str(i))[1] for i in source])) == 1, \
"All source files must have the same extension."
pared_sources = []
src_names = [os.path.splitext(os.path.basename(str(i)))[0]
src_names = [os.path.splitext(os.path.basename(str(i)))[0]
for i in source]
tgt_names = [os.path.splitext(os.path.basename(str(t)))[0]
tgt_names = [os.path.splitext(os.path.basename(str(t)))[0]
for t in target]
ni = target[0].get_binfo()
oi = target[0].get_stored_info().binfo
@@ -191,7 +191,7 @@ def MFProgramGenerator(source, target, env, for_signature):
prefixed_sources = [relpath(str(i), destdir) for i in pared_sources]
prefixed_sources_str = ' '.join([str(i) for i in prefixed_sources])
lang_ext = os.path.splitext(prefixed_sources[0])[1]
tgt_names2 = [os.path.splitext(os.path.basename(str(t)))[0]
tgt_names2 = [os.path.splitext(os.path.basename(str(t)))[0]
for t in target]
_CPPPATH = []
@@ -201,7 +201,7 @@ def MFProgramGenerator(source, target, env, for_signature):
##_CPPPATH.append(relpath(i[1:], destdir))
_CPPPATH.append(i)
#else:
# _CPPPATH.append(relpath(os.path.join(sconscript_dir, i),
# _CPPPATH.append(relpath(os.path.join(sconscript_dir, i),
# destdir))
defines = ""
@@ -231,11 +231,11 @@ def MFProgramGenerator(source, target, env, for_signature):
def generate(env):
"""Adds the MFObject builder to your environment"""
MFProgramBld = env.Builder(generator = MFProgramGenerator,
MFProgramBld = env.Builder(generator = MFProgramGenerator,
emitter = MFProgramEmitter,
suffix = '.o',
suffix = '.o',
source_scanner=SCons.Tool.SourceFileScanner)
MFProgramBld.get_single_executor = new.instancemethod(MF_get_single_executor,
MFProgramBld.get_single_executor = new.instancemethod(MF_get_single_executor,
MFProgramBld, MFProgramBld.__class__)
env.Append(BUILDERS = {'MFProgram': MFProgramBld})
env.Append(BUILDERS = {'MFProgram': MFProgramBld})
@@ -70,4 +70,4 @@ def relpath(path, start=curdir):
rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
if not rel_list:
return curdir
return join(*rel_list)
return join(*rel_list)
@@ -310,7 +310,7 @@ std::vector<char> format::VideoBufferToPNG(const VideoBuffer & vidBuf)
currentRow[rowPos++] = PIXB(vidBuf.Buffer[(y*vidBuf.Width)+x]);
}
uncompressedData[dataPos++] = 2; //Up Sub(x) filter
uncompressedData[dataPos++] = 2; //Up Sub(x) filter
for(int b = 0; b < rowPos; b++)
{
int filteredByte = (currentRow[b]-previousRow[b])&0xFF;
@@ -329,7 +329,7 @@ std::vector<char> format::VideoBufferToPNG(const VideoBuffer & vidBuf)
unsigned char * compressedData = new unsigned char[compressedBufferSize];
int result;
z_stream zipStream;
z_stream zipStream;
zipStream.zalloc = Z_NULL;
zipStream.zfree = Z_NULL;
zipStream.opaque = Z_NULL;
@@ -57,7 +57,7 @@ void writeFile(std::string filename, std::vector<char> & fileData)
}
int main(int argc, char *argv[])
{
{
ui::Engine * engine;
std::string outputPrefix, inputFilename;
std::vector<char> inputFile;
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
readFile(inputFilename, inputFile);
ui::Engine::Ref().g = new Graphics();
engine = &ui::Engine::Ref();
engine->Begin(WINDOWW, WINDOWH);
Oops, something went wrong.

0 comments on commit 27f6a6b

Please sign in to comment.