aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_bladerunner
diff options
context:
space:
mode:
authorThanasis Antoniou2019-07-23 17:46:15 +0300
committerThanasis Antoniou2019-07-23 17:46:15 +0300
commit9a81e59d663774ce35f02f6d6ff1870edffee320 (patch)
tree63ac186d982a5280ea4bf9ff3ccff636df128c52 /devtools/create_bladerunner
parent7e41916be8357ee67ae3f307f272ef300a26076c (diff)
downloadscummvm-rg350-9a81e59d663774ce35f02f6d6ff1870edffee320.tar.gz
scummvm-rg350-9a81e59d663774ce35f02f6d6ff1870edffee320.tar.bz2
scummvm-rg350-9a81e59d663774ce35f02f6d6ff1870edffee320.zip
DEVTOOLS: BLADERUNNER: More quality fixes (codacy)
Diffstat (limited to 'devtools/create_bladerunner')
-rw-r--r--devtools/create_bladerunner/subtitles/README.md90
-rw-r--r--devtools/create_bladerunner/subtitles/common/vqasTextResource.py1
-rw-r--r--devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py45
-rw-r--r--devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py6
-rw-r--r--devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py3
-rw-r--r--devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py7
-rw-r--r--devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py2
-rw-r--r--devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py1
-rw-r--r--devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py3
-rw-r--r--devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py3
10 files changed, 72 insertions, 89 deletions
diff --git a/devtools/create_bladerunner/subtitles/README.md b/devtools/create_bladerunner/subtitles/README.md
index 6df5849c1f..ed0ebd0419 100644
--- a/devtools/create_bladerunner/subtitles/README.md
+++ b/devtools/create_bladerunner/subtitles/README.md
@@ -21,28 +21,28 @@ C:\Westwood\Blade Runner\AUDIO_FRA\
```
6. Export all speech audio from the game and create an Excel file (xls) with links to the audio files.
- * You will need to have some free HDD space for this step (around 650MB).
+ * You will need to have some free HDD space for this step (around 650MB).
- * Using a command line interface (eg MSYS2) navigate to the ScummVM repository folder and issue a command like the one below, making sure you specify the correct target language code for your requirements; supported language codes are "EN\_ANY" for English, "FR\_FRA" for French, "DE\_DEU" for German, "IT\_ITA" for Italian, "ES\_ESP" for Spanish and "RU\_RUS" for Russian (version by Fargus Multimedia).
+ * Using a command line interface (eg MSYS2) navigate to the ScummVM repository folder and issue a command like the one below, making sure you specify the correct target language code for your requirements; supported language codes are "EN\_ANY" for English, "FR\_FRA" for French, "DE\_DEU" for German, "IT\_ITA" for Italian, "ES\_ESP" for Spanish and "RU\_RUS" for Russian (version by Fargus Multimedia).
- * In the following example we assume we need to export the audio from the French version of the game. This could take a few minutes to complete. Please refer to the [quotesSpreadsheetCreator](#quotesspreadsheetcreator-quotespreadsheetcreatorpy) section of this document for more command-line options for this tool.
+ * In the following example we assume we need to export the audio from the French version of the game. This could take a few minutes to complete. Please refer to the [quotesSpreadsheetCreator](#quotesspreadsheetcreator-quotespreadsheetcreatorpy) section of this document for more command-line options for this tool.
```
python2.7 devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py -op "/c/Westwood/Blade Runner/AUDIO_FRA" -ip "/c/Westwood/Blade Runner" -ian "devtools/create_bladerunner/subtitles/common/actornames.txt" -xwav -ld FR_FRA
```
7. When you've completed the above step, an Excel file should be created in your current folder, named "out-French.xls". Open this file with a spreadsheet editor app (tested with Microsoft Excel 2007 and LibreOffice Calc 6.2.4) and select the "INGQUO_#.TR#" sheet.
- * Please keep the column A ("Filename") as is. Do not modify the contents of this column.
+ * Please keep the column A ("Filename") as is. Do not modify the contents of this column.
- * Edit column B ("Quote") to put in the text for your transcript of the corresponding audio file
+ * Edit column B ("Quote") to put in the text for your transcript of the corresponding audio file
- * Use column G ("ShortHandFileName") to play the audio file for the quote to be transcribed in the same line. You should be able to double click in MS Excel or Ctrl+Click on the specific cell; an audio player will be launched automatically to play the audio file.
+ * Use column G ("ShortHandFileName") to play the audio file for the quote to be transcribed in the same line. You should be able to double click in MS Excel or Ctrl+Click on the specific cell; an audio player will be launched automatically to play the audio file.
- * Note that the columns used by the tool that will create the final subtitles file are only columns A and B.
+ * Note that the columns used by the tool that will create the final subtitles file are only columns A and B.
8. The rest of the sheets in the Excel file, excluding the "SBTLVERS.TRE" which contains versioning info) are the sheets for the video cutscenes. We don't provide links to the audio cues for those subtitles, but we do provide the timings for the English version of these scenes which you can use as a guide, along with the English transcript available online here: <https://docs.google.com/spreadsheets/d/17ew0YyhSwqcqZg6bXrIgz0GkA62dhgViHN15lOu5Hj8/edit?usp=sharing>
- * Note that the important columns used by the tool that will create the final subtitles file are in this case only columns A ("Frame Start"), B ("Frame End") and C ("Subtitle").
+ * Note that the important columns used by the tool that will create the final subtitles file are in this case only columns A ("Frame Start"), B ("Frame End") and C ("Subtitle").
- * Fill in column C with the subtitle text, and set the values in columns A and B to adjust when the subtitle should start and when it should stop being displayed respectively.
+ * Fill in column C with the subtitle text, and set the values in columns A and B to adjust when the subtitle should start and when it should stop being displayed respectively.
9. You may edit the info in the "SBTLVERS.TRE" sheet to fill in the credits and a version number for your transcript.
@@ -94,9 +94,9 @@ Syntax Notes:
3. The "-ian" optional switch is followed by the path to the actornames.txt file -- if this is omitted then the file is assumed to reside in the current working directory.
4. The "-ld" optional switch is followed by a language description for the language of the game you are exporting Text Resources from. This switch is meaningful when you also use the "-xtre" switch to export Text Resource files.
- * Valid language values are: EN\_ANY, DE\_DEU, FR\_FRA, IT\_ITA, ES\_ESP, RU\_RUS
+ * Valid language values are: EN\_ANY, DE\_DEU, FR\_FRA, IT\_ITA, ES\_ESP, RU\_RUS
- * Default language value is: EN\_ANY (English)
+ * Default language value is: EN\_ANY (English)
5. The "-xwav" optional switch will export __ALL__ game's audio files (AUD) (that are either speech or speech-related) in a WAV format. This is expected to run for a few minutes and take up quite a lot of your HDD space (around 650MB).
@@ -138,27 +138,27 @@ Syntax Notes:
3. The "-cft" optional switch is followed by the path to the text configuration file "configureFontsTranslation.txt" -- if this is omitted then the file is assumed to reside in the current working directory.
4. The "-ld" optional switch is followed by a language description for the language of the game you are exporting Text Resources from. This switch is meaningful when you also use the "-xtre" switch to export Text Resource files.
- * Valid language values are: EN\_ANY, DE\_DEU, FR\_FRA, IT\_ITA, ES\_ESP, RU\_RUS, EFIGS
+ * Valid language values are: EN\_ANY, DE\_DEU, FR\_FRA, IT\_ITA, ES\_ESP, RU\_RUS, EFIGS
- * Default language value is: EN\_ANY (English)
+ * Default language value is: EN\_ANY (English)
5. The "--trace" optional switch enables extra debug messages to be printed.
The __text configuration file "configureFontsTranslation.txt"__ is a __text file that should be saved in a UTF-8 encoding (no BOM)__, that contains the following:
-1. Multiple lines (practically one per imported Font type) with the key "fontNameAndOutOfOrderGlyphs" and a '#'-separated value that contains:
- * the name of an in-game Font "type" that will be included in the SUBTITLES.MIX resource archive. You could also have lines for Font "types" not imported in the SUBTITLES.MIX, but are already Font types used by the game (eg. KIA6PT) especially when you intend to add translated/ updated TRx files in the SUBTITLES.MIX (however even in that case, there are default settings for those fonts that the script will use if you don't specify alternative settings in this file to override them). Valid values can be: SUBTLS\_E (for all subtitles), KIA6PT, TAHOMA (for both TAHOMA18 and TAHOMA24), SYSTEM (this is basically for the ERRORMSG.TRx).
+1. Multiple lines (practically one per imported Font type) with the key "fontNameAndOutOfOrderGlyphs" and a '\#'-separated value that contains:
+ * the name of an in-game Font "type" that will be included in the SUBTITLES.MIX resource archive. You could also have lines for Font "types" not imported in the SUBTITLES.MIX, but are already Font types used by the game (eg. KIA6PT) especially when you intend to add translated/ updated TRx files in the SUBTITLES.MIX (however even in that case, there are default settings for those fonts that the script will use if you don't specify alternative settings in this file to override them). Valid values can be: SUBTLS\_E (for all subtitles), KIA6PT, TAHOMA (for both TAHOMA18 and TAHOMA24), SYSTEM (this is basically for the ERRORMSG.TRx).
- * a '#' character after the font type
+ * a '\#' character after the font type
- * the name of the 8-bit string encoding (codepage) (eg. cp437 or windows-1252) that should be used to store the texts that uses this particular font "type" in the game's TRx text resource files. Valid values can be the standard encodings listed in python's page:
+ * the name of the 8-bit string encoding (codepage) (eg. cp437 or windows-1252) that should be used to store the texts that uses this particular font "type" in the game's TRx text resource files. Valid values can be the standard encodings listed in python's page:
<https://docs.python.org/2.7/library/codecs.html#standard-encodings>
- * a '#' character after the target Encoding
+ * a '\#' character after the target Encoding
- * a list of comma separated tuples that specify the mapping of special (out of order) character to placeholder characters from the selected codepage. See fontCreator section for more details on this.
+ * a list of comma separated tuples that specify the mapping of special (out of order) character to placeholder characters from the selected codepage. See fontCreator section for more details on this.
- * For example:
+ * For example:
```
fontNameAndOutOfOrderGlyphs=SUBTLS_E#windows-1253#í:Ά,ñ:¥,â:¦,é:§,Ά:£
fontNameAndOutOfOrderGlyphs=KIA6PT#cp437#
@@ -198,35 +198,35 @@ The override encoding file is a __text file that should be saved in a UTF-8 enco
<https://docs.python.org/2.7/library/codecs.html#standard-encodings>
2. A key "asciiCharList" with value the "all-characters" string with all the printable characters that will be used in-game, from the specified codepage. Keep in mind that:
- * The first such character (typically this is the '!' character) should be repeated twice!
+ * The first such character (typically this is the '!' character) should be repeated twice!
- * All characters must belong to the specified codepage.
+ * All characters must belong to the specified codepage.
- * The order that the characters appear in the string should match their order in the ASCII table of the codepage.
+ * The order that the characters appear in the string should match their order in the ASCII table of the codepage.
- * You don't need to use all the characters of the specified codepage in your "all-characters" string.
+ * You don't need to use all the characters of the specified codepage in your "all-characters" string.
- * For any special characters that don't appear in the target codepage (eg ñ, é, í, â don't appear in the Greek codepage), you'll have to decide on an ASCII value for them (one not used by another character appearing in-game).
+ * For any special characters that don't appear in the target codepage (eg ñ, é, í, â don't appear in the Greek codepage), you'll have to decide on an ASCII value for them (one not used by another character appearing in-game).
- * In the "all-characters" string you should put as placeholders the actual characters from the specified codepage that correspond to the ASCII values you have decided above; The placeholder characters should also be in the proper order (by their ASCII value) inside the string.
+ * In the "all-characters" string you should put as placeholders the actual characters from the specified codepage that correspond to the ASCII values you have decided above; The placeholder characters should also be in the proper order (by their ASCII value) inside the string.
3. A key "explicitKerningList" with value a list of comma separated tuples where each tuple specifies a character and its manually set kerning (x-offset) in pixels. Kerning can have integer (positive or negative) values. This list is optional and may be skipped, if you put a '-' instead of a list.
- * Example: explicitKerningList=i:-1
+ * Example: explicitKerningList=i:-1
- * Don't use space(s) between the tuples!
+ * Don't use space(s) between the tuples!
4. A key "explicitWidthIncrement" with value a list of comma separated tuples where each tuple specifies a character and its manually set extended width in pixels. This should be a positive integer value. You can skip this list by not writing anything in the file after the previous (manual kerning) list.
- * Example: explicitWidthIncrement=i:0,j:1,l:1
+ * Example: explicitWidthIncrement=i:0,j:1,l:1
- * Don't use space(s) between the tuples!
+ * Don't use space(s) between the tuples!
5. A key "originalFontName" with the FON file's original name in the game (the one that it should replace). Use SUBLTS for the subtitles FON.
- * Example: originalFontName=SUBLTS
+ * Example: originalFontName=SUBLTS
6. A key "specialOutOfOrderGlyphsUTF8ToAsciiTargetEncoding" with value a list of comma separated tuples that indicates which character glyphs should replace the placeholder glyphs in your all-character string above.
- * Example: specialOutOfOrderGlyphsUTF8ToAsciiTargetEncoding=í:Ά,ñ:¥,â:¦,é:§,Ά:£
+ * Example: specialOutOfOrderGlyphsUTF8ToAsciiTargetEncoding=í:Ά,ñ:¥,â:¦,é:§,Ά:£
- * Don't use space(s) between the tuples!
+ * Don't use space(s) between the tuples!
There is a sample of such file in the source folder for the fontCreator tool.
@@ -237,13 +237,13 @@ __For the exporting of the game fonts (to PNG) mode__, the valid syntax expects
__For the creation of subtitles' font mode__, there are six (6) mandatory launch arguments for the fontCreator tool:
1. imageRowPNGFilename: is the filename of the input PNG image file which should contain a row of (preferably) tab separated glyphs. Example: "Tahoma\_18ShdwTranspThreshZero003-G5.png". Keep in mind that:
- * The first glyph should be repeated here too, as in the override encoding text file.
+ * The first glyph should be repeated here too, as in the override encoding text file.
- * Background should be transparent.
+ * Background should be transparent.
- * All colors used in the character glyphs should not have any transparency value (eg from Gimp 2, set Layer->Transparency->Threshold alpha to 0). There's no partial transparency supported by the game. A pixel will either by fully transparent or fully opaque.
+ * All colors used in the character glyphs should not have any transparency value (eg from Gimp 2, set Layer->Transparency->Threshold alpha to 0). There's no partial transparency supported by the game. A pixel will either by fully transparent or fully opaque.
- * If you use special glyphs that are not in the specified ASCII codepage (eg ñ, é, í, â don't appear in the Greek codepage), then in this image file you should use the actual special glyphs - put them at the position of the placeholder characters in your "all-characters" string that you've specified in the override encoding text file.
+ * If you use special glyphs that are not in the specified ASCII codepage (eg ñ, é, í, â don't appear in the Greek codepage), then in this image file you should use the actual special glyphs - put them at the position of the placeholder characters in your "all-characters" string that you've specified in the override encoding text file.
2. targetFONfilename: Example: "SUBTLS\_E.FON" for the subtitles.
@@ -264,21 +264,21 @@ The "--trace" optional switch enables extra debug messages to be printed.
A suggested method of creating decent looking PNG with the row of glyphs for your subtitles' font is the following:
1. Create the font row in __GIMP__
- * Start with a __new__ empty image, with transparent background. Choose a large enough canvas width (you can adjust it later)
+ * Start with a __new__ empty image, with transparent background. Choose a large enough canvas width (you can adjust it later)
- * Paste as a new layer a tab separated alphanumeric sequence with all your glyphs (as specified above). Choose white as the font's color.
+ * Paste as a new layer a tab separated alphanumeric sequence with all your glyphs (as specified above). Choose white as the font's color.
- * Adjust your canvas' width and height to make sure all the glyphs are within its borders.
+ * Adjust your canvas' width and height to make sure all the glyphs are within its borders.
2. Add layers for shadows if necessary (recommended) by duplicating the original layer with the (white colored) glyphs to create layers that would be used for the shadow effect. Those layers should be __colorified__ as black and placed behind the original layer, displaced by one (1) pixel from eg. the top, right, left, and bottom (it's recommended to do this for all of those four).
3. __Merge all visible__ layers (maintaining an alpha channel for the background)
4. __Select all__ and __float the selection__, which should create a floating selection with all the letter glyphs.
- * __Promote that selection to a layer__ and __duplicate__ it.
+ * __Promote that selection to a layer__ and __duplicate__ it.
5. Choose one of the duplicated layers and __COLORIFY__ it to pitch black.
- * __Set the transparency threshold__ of this black layer to 0.
+ * __Set the transparency threshold__ of this black layer to 0.
6. Finally, place this completely black colored layer underneath the other one and __merge the visible__ layers.
@@ -289,8 +289,8 @@ There could be a better way but this should work ok.
# Credits and Special Thanks
-- All the developer guys from the ScummVM (https://github.com/scummvm/scummvm) team, and especially the ones involved in the implementation of the BladeRunner engine for ScummVM (madmoose, peterkohaut, sev and everyone else).
+* All the developer guys from the ScummVM (https://github.com/scummvm/scummvm) team, and especially the ones involved in the implementation of the BladeRunner engine for ScummVM (madmoose, peterkohaut, sev and everyone else).
-- The information provided in this blog (http://westwoodbladerunner.blogspot.ca) by Michael Liebscher.
+* The information provided in this blog (http://westwoodbladerunner.blogspot.ca) by Michael Liebscher.
-- The creator of br-mixer (https://github.com/bdamer/br-mixer), Ben Damer, who also has a blog entry about the game resource file formats (http://afqa123.com/2015/03/07/deciphering-blade-runner/)
+* The creator of br-mixer (https://github.com/bdamer/br-mixer), Ben Damer, who also has a blog entry about the game resource file formats (http://afqa123.com/2015/03/07/deciphering-blade-runner/)
diff --git a/devtools/create_bladerunner/subtitles/common/vqasTextResource.py b/devtools/create_bladerunner/subtitles/common/vqasTextResource.py
index f9b909be7c..77f5292d88 100644
--- a/devtools/create_bladerunner/subtitles/common/vqasTextResource.py
+++ b/devtools/create_bladerunner/subtitles/common/vqasTextResource.py
@@ -490,7 +490,6 @@ if __name__ == '__main__':
traceModeEnabled = False
vqaTRInstance = vqasTextResource(traceModeEnabled)
vqaTRInstance.printAllVqasTextResource()
-
else:
#debug
#print "[Debug] Running %s imported from another module" % (my_module_name)
diff --git a/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py b/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
index e998c597c5..9e3c7472a4 100644
--- a/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
+++ b/devtools/create_bladerunner/subtitles/fontCreator/fonFileLib.py
@@ -22,13 +22,6 @@ else:
sysLibFound = True
try:
- import shutil
-except ImportError:
- print "[Error] Shutil python library is required to be installed!"
-else:
- shutilLibFound = True
-
-try:
import struct
except ImportError:
print "[Error] struct python library is required to be installed!"
@@ -44,7 +37,6 @@ else:
if (not osLibFound) \
or (not sysLibFound) \
- or (not shutilLibFound) \
or (not structLibFound) \
or (not imagePilLibFound):
sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
@@ -53,13 +45,13 @@ if (not osLibFound) \
from struct import *
MY_MODULE_VERSION = "0.80"
-MY_MODULE_NAME = "fonFileLib"
+MY_MODULE_NAME = "fonFileLib"
class FonHeader(object):
- maxEntriesInTableOfDetails = -1 # this is probably always the number of entries in table of details, but it won't work for the corrupted TAHOMA18.FON file
- maxGlyphWidth = -1 # in pixels
- maxGlyphHeight = -1 # in pixels
- graphicSegmentByteSize = -1 # Graphic segment byte size
+ maxEntriesInTableOfDetails = -1 # this is probably always the number of entries in table of details, but it won't work for the corrupted TAHOMA18.FON file
+ maxGlyphWidth = -1 # in pixels
+ maxGlyphHeight = -1 # in pixels
+ graphicSegmentByteSize = -1 # Graphic segment byte size
def __init__(self):
return
@@ -80,9 +72,9 @@ class fonFile(object):
# traceModeEnabled is bool to enable more printed debug messages
def __init__(self, traceModeEnabled = True):
del self.glyphDetailEntriesLst[:]
- self.glyphPixelData = None # buffer of pixel data for glyphs
+ self.glyphPixelData = None # buffer of pixel data for glyphs
self.simpleFontFileName = 'GENERIC.FON'
- self.realNumOfCharactersInImageSegment = 0 # this is used for the workaround for the corrupted TAHOME18.FON
+ self.realNumOfCharactersInImageSegment = 0 # this is used for the workaround for the corrupted TAHOME18.FON
self.nonEmptyCharacters = 0
self.m_traceModeEnabled = traceModeEnabled
@@ -98,7 +90,7 @@ class fonFile(object):
# parse FON file fields for header
#
try:
- tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
+ tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
self.header().maxEntriesInTableOfDetails = tmpTuple[0]
offsInFonFile += 4
@@ -109,15 +101,15 @@ class fonFile(object):
else:
self.realNumOfCharactersInImageSegment = self.header().maxEntriesInTableOfDetails
- tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
+ tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
self.header().maxGlyphWidth = tmpTuple[0]
offsInFonFile += 4
- tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
+ tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
self.header().maxGlyphHeight = tmpTuple[0]
offsInFonFile += 4
- tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
+ tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
self.header().graphicSegmentByteSize = tmpTuple[0]
offsInFonFile += 4
@@ -132,23 +124,23 @@ class fonFile(object):
if self.m_traceModeEnabled:
print "[Debug] Font file (FON) glyph details table: "
for idx in range(0, self.realNumOfCharactersInImageSegment):
- tmpTuple = struct.unpack_from('i', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
+ tmpTuple = struct.unpack_from('i', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
tmpXOffset = tmpTuple[0]
offsInFonFile += 4
- tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
+ tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
tmpYOffset = tmpTuple[0]
offsInFonFile += 4
- tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
+ tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
tmpWidth = tmpTuple[0]
offsInFonFile += 4
- tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
+ tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
tmpHeight = tmpTuple[0]
offsInFonFile += 4
- tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
+ tmpTuple = struct.unpack_from('I', fonBytesBuff, offsInFonFile) # unsigned integer 4 bytes
tmpDataOffset = tmpTuple[0]
offsInFonFile += 4
@@ -236,7 +228,7 @@ class fonFile(object):
tmp8bitR1 = ( (pixelColor >> 10) ) << 3
tmp8bitG1 = ( (pixelColor & 0x3ff) >> 5 ) << 3
tmp8bitB1 = ( (pixelColor & 0x1f) ) << 3
- rgbacolour = (tmp8bitR1,tmp8bitG1,tmp8bitB1, 255) # alpha: 1.0 fully opaque
+ rgbacolour = (tmp8bitR1,tmp8bitG1,tmp8bitB1, 255) # alpha: 1.0 fully opaque
#rgbacolour = (255,255,255, 255) # alpha: 1.0 fully opaque
if currX == glyphWidth:
@@ -279,7 +271,7 @@ if __name__ == '__main__':
else:
print "[Error] No valid input file argument was specified and default input file %s is missing." % (inFONFileName)
errorFound = True
-
+
if not errorFound:
try:
print "[Info] Opening %s" % (inFONFileName)
@@ -303,4 +295,3 @@ else:
#debug
#print "[Debug] Running %s imported from another module" % (MY_MODULE_NAME)
pass
- \ No newline at end of file
diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
index bcfd4e596a..8a7930053f 100644
--- a/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
+++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/mixResourceCreator.py
@@ -2,7 +2,7 @@
# -*- coding: UTF-8 -*-
sysLibFound = False
try:
- import sys
+ import sys
except ImportError:
print ("[Error] sys python library is required to be installed!")
else:
@@ -10,7 +10,7 @@ else:
if (not sysLibFound):
sys.stdout.write("[Error] Errors were found when trying to import required python libraries\n")
- sys.exit(1)
+ sys.exit(1)
if not (sys.version_info[0] == 2 and sys.version_info[1] == 7):
sys.stdout.write("[Error] Blade Runner MIX Resource Creator script requires Python 2.7\n")
@@ -18,4 +18,4 @@ if not (sys.version_info[0] == 2 and sys.version_info[1] == 7):
import packBladeRunnerMIXFromPCTLKXLS04
if __name__ == "__main__":
- packBladeRunnerMIXFromPCTLKXLS04.main(sys.argv[0:]) \ No newline at end of file
+ packBladeRunnerMIXFromPCTLKXLS04.main(sys.argv[0:])
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py
index febd0c59f0..06e6925b60 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileDecode.py
@@ -153,7 +153,7 @@ def aud_decode_ws_chunk(inputChunkBuffer, cb_s, cb_d):
outChBuffIter += 1
elif switchKey == 1:
count += 1
- for iter in range (count, 0, -1):
+ for iter0 in range (count, 0, -1):
inpChBuffIter += 1
code = inputChunkBuffer[inpChBuffIter] # int code
sample += aud_ws_step_table4[code & 0xf]
@@ -225,4 +225,3 @@ else:
#debug
#print "[Debug] Running %s (%s) imported from another module" % (MY_MODULE_NAME, MY_MODULE_VERSION)
pass
- \ No newline at end of file
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py
index 7cb4f455df..232ebd6766 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/audFileLib.py
@@ -16,7 +16,7 @@ else:
osLibFound = True
try:
- import sys
+ import sys
except ImportError:
print "[Error] sys python library is required to be installed!"
else:
@@ -201,7 +201,7 @@ class audFile(object):
self.header().m_populated = True
return True
- # int AudFile::get_chunk_header(int i, std::fstream& fs, AudFileNS::pos_type startAudFilepos, AudFileNS::pos_type endAudFilepos, AudChunkHeader& outAudChunkHeader)
+ # int AudFile::get_chunk_header(int i, std::fstream& fs, AudFileNS::pos_type startAudFilepos, AudFileNS::pos_type endAudFilepos, AudChunkHeader& outAudChunkHeader)
def get_chunk_header(self, chunkIdx, inAudFileBytesBuffer, inAudFileSize):
#fs.seekg(int(startAudFilepos) + int(SIZE_OF_AUD_HEADER_IN_BYTES), fs.beg);
#AudFileNS::pos_type rAudPos;
@@ -386,7 +386,7 @@ if __name__ == '__main__':
else:
print "[Error] No valid input file argument was specified and default input file %s is missing." % (inAUDFileName)
errorFound = True
-
+
if not errorFound:
try:
print "[Info] Opening %s" % (inAUDFileName)
@@ -410,4 +410,3 @@ else:
#debug
#print "[Debug] Running %s (%s) imported from another module" % (MY_MODULE_NAME, MY_MODULE_VERSION)
pass
- \ No newline at end of file
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py
index 2bf04f1d3b..4d4e1a98c3 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/devCommentaryText.py
@@ -98,9 +98,7 @@ if __name__ == '__main__':
traceModeEnabled = False
devCommentaryTextInstance = devCommentaryText(traceModeEnabled)
devCommentaryTextInstance.printTexts()
-
else:
#debug
#print "[Debug] Running %s imported from another module" % (my_module_name)
pass
- \ No newline at end of file
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py
index 0130cc0d92..3d306e3b21 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/pogoTextResource.py
@@ -197,7 +197,6 @@ if __name__ == '__main__':
traceModeEnabled = False
pogoTRInstance = pogoTextResource(traceModeEnabled)
pogoTRInstance.printPogo()
-
else:
#debug
#print "[Debug] Running %s imported from another module" % (my_module_name)
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py
index 2db0228479..ea3069f6a9 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/quoteSpreadsheetCreator.py
@@ -15,9 +15,8 @@ if (not sysLibFound):
if not (sys.version_info[0] == 2 and sys.version_info[1] == 7):
sys.stdout.write("[Error] Blade Runner Quotes Spreadsheet Creator script requires Python 2.7\n")
sys.exit(1)
-
+
import sortBladeRunnerWavs02
if __name__ == "__main__":
sortBladeRunnerWavs02.main(sys.argv[0:])
- \ No newline at end of file
diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py
index b83a34b975..a8c787c4f4 100644
--- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py
+++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/treFileLib.py
@@ -139,7 +139,7 @@ if __name__ == '__main__':
else:
print "[Error] No valid input file argument was specified and default input file %s is missing." % (inTREFileName)
errorFound = True
-
+
if not errorFound:
try:
print "[Info] Opening %s" % (inTREFileName)
@@ -162,4 +162,3 @@ else:
#debug
#print "[Debug] Running %s (%s) imported from another module" % (MY_MODULE_NAME, MY_MODULE_VERSION)
pass
- \ No newline at end of file