Skip to content

Commit 3655663

Browse files
committed
Added .gitattributes
1 parent ececc9b commit 3655663

20 files changed

+1196
-1183
lines changed

.gitattributes

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain
18+
19+
# Custom for this project
20+
*.bat eol=crlf
21+
*.txt eol=crlf

LICENSE.txt

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
Copyright (c) 2012-2014, Kyle Stewart
2-
All rights reserved.
3-
4-
Redistribution and use in source and binary forms, with or without
5-
modification, are permitted provided that the following conditions are met:
6-
7-
1. Redistributions of source code must retain the above copyright notice, this
8-
list of conditions and the following disclaimer.
9-
2. Redistributions in binary form must reproduce the above copyright notice,
10-
this list of conditions and the following disclaimer in the documentation
11-
and/or other materials provided with the distribution.
12-
13-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
17-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23-
24-
The views and conclusions contained in the software and documentation are those
25-
of the authors and should not be interpreted as representing official policies,
1+
Copyright (c) 2012-2014, Kyle Stewart
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
1. Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
2. Redistributions in binary form must reproduce the above copyright notice,
10+
this list of conditions and the following disclaimer in the documentation
11+
and/or other materials provided with the distribution.
12+
13+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
17+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23+
24+
The views and conclusions contained in the software and documentation are those
25+
of the authors and should not be interpreted as representing official policies,
2626
either expressed or implied, of the FreeBSD Project.

MANIFEST.in

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
include *.txt
2-
include tdl/*.bmp
3-
include tdl/*.png
4-
include tdl/*.txt
5-
include tdl/VERSION
6-
include tdl/lib/*.txt
7-
include tdl/lib/linux*/*.so
8-
include tdl/lib/win32/*.dll
9-
include tdl/lib/darwin/*
10-
include tdl/lib/darwin/SDL.framework/Versions/A/SDL
11-
include fonts/*.png
12-
include fonts/*.txt
13-
include fonts/*/*.png
14-
include fonts/*/*.txt
15-
include Frameworks/*.framework.tar
16-
include Frameworks/*.dmg
17-
include examples/*.py
18-
include docs/*
19-
exclude docs/*.bat
20-
include ez_setup.py
21-
exclude build/*
1+
include *.txt
2+
include tdl/*.bmp
3+
include tdl/*.png
4+
include tdl/*.txt
5+
include tdl/VERSION
6+
include tdl/lib/*.txt
7+
include tdl/lib/linux*/*.so
8+
include tdl/lib/win32/*.dll
9+
include tdl/lib/darwin/*
10+
include tdl/lib/darwin/SDL.framework/Versions/A/SDL
11+
include fonts/*.png
12+
include fonts/*.txt
13+
include fonts/*/*.png
14+
include fonts/*/*.txt
15+
include Frameworks/*.framework.tar
16+
include Frameworks/*.dmg
17+
include examples/*.py
18+
include docs/*
19+
exclude docs/*.bat
20+
include ez_setup.py
21+
exclude build/*
2222
exclude dist/*

README.rst

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
==============
2-
Installation
3-
==============
4-
The latest Windows installer can be found on PyPI: https://pypi.python.org/pypi/tdl
5-
6-
If it's available you can use pip instead by running the command:
7-
8-
pip install tdl
9-
10-
This module can also be manually installed by going into the "setup.py" directory and running the command:
11-
12-
python setup.py install
13-
14-
Already compiled libtcod libraries are included as part of the package data. They won't need to be compiled as part of the installation, but can be replaced with newer versions if necessary.
15-
16-
=======
17-
About
18-
=======
19-
TDL is a port of the C library libtcod in an attempt to make it more "Pythonic"
20-
21-
The library can be used for displaying tilesets (ANSI, Unicode, or graphical) in true color.
22-
23-
It also provides functionality to compute path-finding and field of view.
24-
25-
python-tdl is hosted on GitHub: https://github.com/HexDecimal/python-tdl
26-
27-
Online Documentation: http://pythonhosted.org/tdl/
28-
29-
Issue Tracker: https://github.com/HexDecimal/python-tdl/issues
30-
31-
python-tdl is a ctypes port of "libtcod". You can find more about libtcod at http://roguecentral.org/doryen/libtcod/
32-
33-
==============
34-
Requirements
35-
==============
36-
* Python 2.6+ or 3.x
37-
* 32 bit Windows, 32/64 bit Linux, or Mac OS/X (64 bit architecture)
38-
39-
=========
40-
License
41-
=========
42-
python-tdl is distributed under the FreeBSD license, same as libtcod. Read LICENSE.txt for more details.
1+
==============
2+
Installation
3+
==============
4+
The latest Windows installer can be found on PyPI: https://pypi.python.org/pypi/tdl
5+
6+
If it's available you can use pip instead by running the command:
7+
8+
pip install tdl
9+
10+
This module can also be manually installed by going into the "setup.py" directory and running the command:
11+
12+
python setup.py install
13+
14+
Already compiled libtcod libraries are included as part of the package data. They won't need to be compiled as part of the installation, but can be replaced with newer versions if necessary.
15+
16+
=======
17+
About
18+
=======
19+
TDL is a port of the C library libtcod in an attempt to make it more "Pythonic"
20+
21+
The library can be used for displaying tilesets (ANSI, Unicode, or graphical) in true color.
22+
23+
It also provides functionality to compute path-finding and field of view.
24+
25+
python-tdl is hosted on GitHub: https://github.com/HexDecimal/python-tdl
26+
27+
Online Documentation: http://pythonhosted.org/tdl/
28+
29+
Issue Tracker: https://github.com/HexDecimal/python-tdl/issues
30+
31+
python-tdl is a ctypes port of "libtcod". You can find more about libtcod at http://roguecentral.org/doryen/libtcod/
32+
33+
==============
34+
Requirements
35+
==============
36+
* Python 2.6+ or 3.x
37+
* 32 bit Windows, 32/64 bit Linux, or Mac OS/X (64 bit architecture)
38+
39+
=========
40+
License
41+
=========
42+
python-tdl is distributed under the FreeBSD license, same as libtcod. Read LICENSE.txt for more details.

dev/noiseGen.py

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
#!/usr/bin/env python
2-
3-
# allow a noise test
4-
# give a directory and this will save simple bitmaps of each noise example
5-
import sys, os
6-
7-
sys.path.insert(0, '..')
8-
from tdl.noise import Noise
9-
10-
IMGSIZE = 128 # width and height of the saved image
11-
NOISE_SCALE = 1 / 12
12-
saveDir = ''
13-
kargs = {}
14-
if len(sys.argv) >= 2:
15-
saveDir = sys.argv[1] # get save directory
16-
kargs = dict((param.split('=') for param in sys.argv[2:])) # get parameters
17-
if not saveDir:
18-
raise SystemExit('Provide a directory to save the noise examples.')
19-
for algo in ['PERLIN', 'SIMPLEX', 'WAVELET']:
20-
for mode in ['FLAT', 'FBM', 'TURBULENCE']:
21-
noise = Noise(algo, mode)
22-
noiseFile = open(os.path.join(saveDir, '%s_%s.pgm' % (algo, mode)), 'wb')
23-
print('Generating %s' % noiseFile.name)
24-
# make a greyscale Netpbm file
25-
noiseFile.write(b'P5\n')
26-
noiseFile.write(('%i %i\n' % (IMGSIZE, IMGSIZE)).encode('ascii'))
27-
noiseFile.write(b'255\n')
28-
for y in range(IMGSIZE):
29-
noiseY = y * NOISE_SCALE
30-
for x in range(IMGSIZE):
31-
noiseX = x * NOISE_SCALE
32-
if x == 0 or x == IMGSIZE - 1 or y == 0 or y == IMGSIZE - 1:
33-
val = 0 # use black border
34-
else:
35-
val = int(noise.getPoint(noiseX, noiseY) * 255)
36-
noiseFile.write(bytes((val,)))
1+
#!/usr/bin/env python
2+
3+
# allow a noise test
4+
# give a directory and this will save simple bitmaps of each noise example
5+
import sys, os
6+
7+
sys.path.insert(0, '..')
8+
from tdl.noise import Noise
9+
10+
IMGSIZE = 128 # width and height of the saved image
11+
NOISE_SCALE = 1 / 12
12+
saveDir = ''
13+
kargs = {}
14+
if len(sys.argv) >= 2:
15+
saveDir = sys.argv[1] # get save directory
16+
kargs = dict((param.split('=') for param in sys.argv[2:])) # get parameters
17+
if not saveDir:
18+
raise SystemExit('Provide a directory to save the noise examples.')
19+
for algo in ['PERLIN', 'SIMPLEX', 'WAVELET']:
20+
for mode in ['FLAT', 'FBM', 'TURBULENCE']:
21+
noise = Noise(algo, mode)
22+
noiseFile = open(os.path.join(saveDir, '%s_%s.pgm' % (algo, mode)), 'wb')
23+
print('Generating %s' % noiseFile.name)
24+
# make a greyscale Netpbm file
25+
noiseFile.write(b'P5\n')
26+
noiseFile.write(('%i %i\n' % (IMGSIZE, IMGSIZE)).encode('ascii'))
27+
noiseFile.write(b'255\n')
28+
for y in range(IMGSIZE):
29+
noiseY = y * NOISE_SCALE
30+
for x in range(IMGSIZE):
31+
noiseX = x * NOISE_SCALE
32+
if x == 0 or x == IMGSIZE - 1 or y == 0 or y == IMGSIZE - 1:
33+
val = 0 # use black border
34+
else:
35+
val = int(noise.getPoint(noiseX, noiseY) * 255)
36+
noiseFile.write(bytes((val,)))
3737

dev/runRegressionTest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def setUp(self):
3737

3838
@classmethod
3939
def tearDownClass(cls):
40-
time.sleep(2)
4140
del cls.console
4241
gc.collect() # make sure console.__del__ is called quickly
4342

dev/stressTest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def updateTest(self, deltaTime):
149149
for x in range(self.width):
150150
bgcolor = (random.getrandbits(6), random.getrandbits(6), random.getrandbits(6))
151151
ch = random.getrandbits(8)
152-
self.console.draw_char(x, 0, ch, bgcolor=bgcolor)
152+
self.console.draw_char(x, 0, ch, bg=bgcolor)
153153

154154
# match libtcod sample screen
155155
WIDTH = 46

0 commit comments

Comments
 (0)