[Scummvm-git-logs] scummvm master -> 11bfabdfa3dd5aa23b2f8cf0388d2f59c396a0ca
antoniou79
noreply at scummvm.org
Wed Jul 6 11:46:15 UTC 2022
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0ba6bacfa3 DEVTOOLS: BLADERUNNER: Support additional info sheet
66988edf3f BLADERUNNER: Clarification comment for a case in UG18
cb62a020d7 BLADERUNNER: Clear maze score when exiting maze
11bfabdfa3 BLADERUNNER: Fix Visual Studio complaining about SWAP
Commit: 0ba6bacfa31df23e1185106c0bb0c4b6bbf5f5d2
https://github.com/scummvm/scummvm/commit/0ba6bacfa31df23e1185106c0bb0c4b6bbf5f5d2
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2022-07-06T11:29:16+03:00
Commit Message:
DEVTOOLS: BLADERUNNER: Support additional info sheet
And hd font
Changed paths:
A devtools/create_bladerunner/subtitles/common/extracsTextResource.py
devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
diff --git a/devtools/create_bladerunner/subtitles/common/extracsTextResource.py b/devtools/create_bladerunner/subtitles/common/extracsTextResource.py
new file mode 100644
index 00000000000..f3ee0d4118d
--- /dev/null
+++ b/devtools/create_bladerunner/subtitles/common/extracsTextResource.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+#
+
+my_module_version = "1.60"
+my_module_name = "extracTextResource"
+
+# Template for EXTRA.TRE sheet's values ((row 2 and below)
+EXTRAC_TEXT_RESOURCE_TUPLE_LIST = [
+ (0, "Thomas Fach-Pedersen", ""),
+ (1, "Peter Kohaut", ""),
+ (2, "Eugene Sandulenko", ""),
+ (3, "Thanasis Antoniou", ""),
+ (4, "Xavier Mohedano", ""),
+ (5, "VÃctor González Fraile", ""),
+ (6, "Sergio Carmona", ""),
+ (7, "Mark Benninghofen", ""),
+ (8, "Frank Klepacki", ""),
+ (9, "ScummVM", ""),
+ (10, "Westwood Studios", ""),
+ (11, "ix", ""),
+ (12, "jakejakejake1234", ""),
+ (13, "Sean Leong (JakeSteven1980)", ""),
+ (14, ":...:", "REQUIRED")
+ ]
+#
+#
+#
+class extracTextResource:
+ m_traceModeEnabled = True
+ # traceModeEnabled is bool to enable more printed debug messages
+ def __init__(self, traceModeEnabled = True):
+ self.m_traceModeEnabled = traceModeEnabled
+ return
+
+ def printExtracTemplate(self):
+ for (idTre, textTre) in EXTRAC_TEXT_RESOURCE_TUPLE_LIST:
+ print "%s\t%s" % (idTre, textTre)
+ return
+
+ def getExtracEntriesList(self):
+ return EXTRAC_TEXT_RESOURCE_TUPLE_LIST
+
+if __name__ == '__main__':
+ # main()
+ print "[Debug] Running %s as main module" % (my_module_name)
+ traceModeEnabled = False
+ excrTRInstance = extracTextResource(traceModeEnabled)
+ excrTRInstance.printExtracTemplate()
+
+else:
+ #debug
+ #print "[Debug] Running %s imported from another module" % (my_module_name)
+ pass
diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
index c883d3a5ec3..ef71aaa9d83 100644
--- a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
+++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py
@@ -123,9 +123,10 @@ from xlrd import *
# for pack
from struct import *
from subtlsVersTextResource import *
+from extracsTextResource import *
COMPANY_EMAIL = "classic.adventures.in.greek at gmail.com"
-APP_VERSION = "1.80"
+APP_VERSION = "1.95"
APP_NAME = "packBladeRunnerMIXFromPCTLKXLS"
APP_WRAPPER_NAME = "mixResourceCreator.py"
APP_NAME_SPACED = "Blade Runner MIX Resource Creator"
@@ -139,6 +140,7 @@ DEFAULT_SUBTITLES_FONT_NAME = SUBTITLES_FONT_NAME_CATEGORY + '.FON'
DEFAULT_SUBTITLES_MIX_OUTPUT_NAME = u'SUBTITLES.MIX'
SUPPORTED_DIALOGUE_VERSION_SHEET = 'SBTLVERS.TRE'
+SUPPORTED_EX_CR_SHEET = 'EXTRA.TRE'
# all dialogue sheets get the SUBTLS_E.FON for translation to a Text Resource (TRx)
# In-game dialogue sheet
# TODO- maybe the '_E' part is not needed, since we use the suffix (x) of the extension (TRx) to signify the language
@@ -170,12 +172,13 @@ SUPPORTED_TRANSLATION_SHEETS = [('OPTIONS.TR', 'KIA6PT'),
('CLUETYPE.TR', 'KIA6PT'),
('ENDCRED.TR', 'TAHOMA'),
('POGO.TR', 'KIA6PT'),
- (SUPPORTED_DIALOGUE_VERSION_SHEET[:-1], SUBTITLES_FONT_NAME_CATEGORY)]
+ (SUPPORTED_DIALOGUE_VERSION_SHEET[:-1], SUBTITLES_FONT_NAME_CATEGORY),
+ (SUPPORTED_EX_CR_SHEET[:-1], 'KIA6PT')]
# The FON files that are identically named to the originals are supposed to override them (needs ScummVM compatible functionality for that)
# We don't deal with 10PT.FON since it's not used.
# Also we don't deal with the SYSTEM (external OS font) that ERRORMSG.TRx uses!
# TODO we probably could skip importing ERRORMSG.TRx (to SUBTITLES.MIX) altogether, since translating that has no point! In that case SYSTEM.FON should be removed from here since it's currently of no use otherwise and support for it is not really required.
-SUPPORTED_OTHER_FILES_FOR_MIX = [DEFAULT_SUBTITLES_FONT_NAME, 'KIA6PT.FON', 'TAHOMA18.FON', 'TAHOMA24.FON', 'SYSTEM.FON']
+SUPPORTED_OTHER_FILES_FOR_MIX = [DEFAULT_SUBTITLES_FONT_NAME, 'KIA6PT.FON', 'TAHOMA18.FON', 'TAHOMA24.FON', 'SYSTEM.FON', 'SUBTLSHD.FON']
# v1.10: Russian code (RU_RUS) now corresponds to 'E' suffix instead of 'R' since the unofficial Russian version supported uses the English resources without renaming them, and this is how the ScummVM engine handles that version currently.
SUPPORTED_LANGUAGES_DESCRIPTION_CODE_TLIST = [('EN_ANY', 'E', 'English'), ('DE_DEU', 'G', 'German'), ('FR_FRA', 'F', 'French'), ('IT_ITA', 'I', 'Italian'), ('ES_ESP', 'S', 'Spanish'), ('RU_RUS', 'E', 'Russian'), ('EFIGS', '#', 'EFIGS')]
@@ -471,17 +474,20 @@ def getSupportedSubtitleSheetsList():
def getSupportedTranslatedTrxFilenamesList():
listOfSupportedTranslatedTrxFilenames = []
+
+ # First handle cases of the sheets we only have few or one version of:
+ tmpActiveLanguageDescriptionCodeTuple = ('EN_ANY', 'E', 'English')
+ for translatedTRxFileName in [ (x[0] + '%s' % (tmpActiveLanguageDescriptionCodeTuple[1])) for x in SUPPORTED_TRANSLATION_SHEETS]:
+ if (translatedTRxFileName[:-1] == SUPPORTED_DIALOGUE_VERSION_SHEET[:-1] or translatedTRxFileName[:-1] == SUPPORTED_EX_CR_SHEET[:-1]):
+ listOfSupportedTranslatedTrxFilenames.append(translatedTRxFileName)
+
for tmpActiveLanguageDescriptionCodeTuple in SUPPORTED_LANGUAGES_DESCRIPTION_CODE_TLIST:
if (gActiveLanguageDescriptionCodeTuple[1] != '#' and tmpActiveLanguageDescriptionCodeTuple[1] == gActiveLanguageDescriptionCodeTuple[1]) \
or (gActiveLanguageDescriptionCodeTuple[1] == '#' and tmpActiveLanguageDescriptionCodeTuple[1] != '#' and tmpActiveLanguageDescriptionCodeTuple[0] != 'RU_RUS'):
- for translatedTRxFileName in [ (x[0] + '%s' % (tmpActiveLanguageDescriptionCodeTuple[1])) for x in SUPPORTED_TRANSLATION_SHEETS] :
- if translatedTRxFileName[:-1] != SUPPORTED_DIALOGUE_VERSION_SHEET[:-1] \
- or (gActiveLanguageDescriptionCodeTuple[1] == '#' and tmpActiveLanguageDescriptionCodeTuple[1] == 'E') \
+ for translatedTRxFileName in [ (x[0] + '%s' % (tmpActiveLanguageDescriptionCodeTuple[1])) for x in SUPPORTED_TRANSLATION_SHEETS[:-2]]:
+ if (gActiveLanguageDescriptionCodeTuple[1] == '#' and tmpActiveLanguageDescriptionCodeTuple[1] == 'E') \
or (gActiveLanguageDescriptionCodeTuple[1] != '#'):
- if translatedTRxFileName[:-1] == SUPPORTED_DIALOGUE_VERSION_SHEET[:-1]:
- listOfSupportedTranslatedTrxFilenames.append(SUPPORTED_DIALOGUE_VERSION_SHEET)
- else:
- listOfSupportedTranslatedTrxFilenames.append(translatedTRxFileName)
+ listOfSupportedTranslatedTrxFilenames.append(translatedTRxFileName)
return listOfSupportedTranslatedTrxFilenames
#
def outputMIX():
@@ -751,6 +757,8 @@ def inputXLS(pathtoInputExcelFilename):
mergedListOfSupportedSubtitleSheets = getSupportedSubtitleSheetsList()
supportedTranslatedTrxFilenamesList = getSupportedTranslatedTrxFilenamesList()
+ #print '[Debug] mergedListOfSupportedSubtitleSheets: ', mergedListOfSupportedSubtitleSheets
+ #print '[Debug] supportedTranslatedTrxFilenamesList: ', supportedTranslatedTrxFilenamesList
mergedListOfSupportedSubtitleSheetsAndTranslatedTREs = mergedListOfSupportedSubtitleSheets + supportedTranslatedTrxFilenamesList
# Check for a version info sheet and create one if it does not exist
@@ -806,6 +814,59 @@ def inputXLS(pathtoInputExcelFilename):
return
# end of check for a version info sheet
+ # Check for an extra info sheet and create one if it does not exist
+ xl_sheet = None
+ try:
+ if gTraceModeEnabled:
+ print '[Debug] Checking for existence of sheet: ' + SUPPORTED_EX_CR_SHEET
+ xl_sheet = xl_workbook.sheet_by_name(SUPPORTED_EX_CR_SHEET)
+ except Exception as e:
+ if gTraceModeEnabled:
+ print '[Debug] Could not open requested sheet: ' + SUPPORTED_EX_CR_SHEET + ' in Excel::' + str(e)
+
+ if xl_sheet is None:
+ # we didn't find a sheet for extra info, so we should auto-create a Sheet for it
+ if gTraceModeEnabled:
+ print '[Debug] Sheet: %s was not found. Creating a temporary sheet for version info...' % (SUPPORTED_EX_CR_SHEET)
+ excrTRInstance = extracTextResource(gTraceModeEnabled)
+ bookCopy = copy(xl_workbook)
+ xl_sheet = bookCopy.add_sheet(SUPPORTED_EX_CR_SHEET)
+ n = 0
+ col1_name = 'Extra Info'
+ xl_sheet.write(n, 0, col1_name)
+ # Second Row
+ n = 1
+ col1_name = 'ID'
+ col2_name = 'Value'
+ col3_name = 'Notes'
+ xl_sheet.write(n, 0, col1_name)
+ xl_sheet.write(n, 1, col2_name)
+ xl_sheet.write(n, 2, col3_name)
+ n += 1
+ objUTF8Unicode = None
+ for m, e1 in enumerate(excrTRInstance.getExtracEntriesList(), n):
+ xl_sheet.write(m, 0, e1[0])
+ for i1 in range(1,3):
+ objStr = e1[i1]
+ try:
+ # We assume utf-8 charset (since we get the text from a python script)
+ objUTF8Unicode = unicode(objStr, 'utf-8')
+ except Exception as e:
+ print '[Error] Failed to create unicode string: ' + str(e)
+ objUTF8Unicode = unicode("???", 'utf-8')
+ xl_sheet.write(m, i1, objUTF8Unicode)
+ try:
+ bookCopy.save(pathtoInputExcelFilename)
+ except Exception as e:
+ print "[Error] Giving up: Could not save to output Excel file:: " + str(e)
+ sys.exit(1) # Terminate if we couldn't write to output Excel file
+
+ if gTraceModeEnabled:
+ print '[Debug] Sheet: %s was created successfully.' % (SUPPORTED_EX_CR_SHEET)
+ inputXLS(pathtoInputExcelFilename)
+ return
+ # end of check for a extra info sheet
+
if gTraceModeEnabled:
print '[Debug] mergedListOfSupportedSubtitleSheetsAndTranslatedTREs: ', mergedListOfSupportedSubtitleSheetsAndTranslatedTREs
for sheetDialogueName in mergedListOfSupportedSubtitleSheetsAndTranslatedTREs:
Commit: 66988edf3f9c19c1177827bc2f4c2cc8c8da2bda
https://github.com/scummvm/scummvm/commit/66988edf3f9c19c1177827bc2f4c2cc8c8da2bda
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2022-07-06T13:34:51+03:00
Commit Message:
BLADERUNNER: Clarification comment for a case in UG18
Changed paths:
engines/bladerunner/script/scene/ug18.cpp
diff --git a/engines/bladerunner/script/scene/ug18.cpp b/engines/bladerunner/script/scene/ug18.cpp
index 353752f9ede..0036f5ebe95 100644
--- a/engines/bladerunner/script/scene/ug18.cpp
+++ b/engines/bladerunner/script/scene/ug18.cpp
@@ -573,7 +573,7 @@ void SceneScriptUG18::talkWithGuzza() {
Actor_Says(kActorGuzza, 1030, 14);
} else if (Global_Variable_Query(kVariableAffectionTowards) > 1
|| Player_Query_Agenda() == kPlayerAgendaSurly
- ) {
+ ) { // Affection towards Lucy or Dektora, or Surly Agenda
Actor_Modify_Friendliness_To_Other(kActorClovis, kActorMcCoy, 20);
Actor_Modify_Friendliness_To_Other(kActorSadik, kActorMcCoy, 10);
Loop_Actor_Walk_To_XYZ(kActorMcCoy, -117.13f, 0.0f, -284.47f, 0, false, false, false);
Commit: cb62a020d7e58451fc765aea7d73554fc7f092d5
https://github.com/scummvm/scummvm/commit/cb62a020d7e58451fc765aea7d73554fc7f092d5
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2022-07-06T13:38:04+03:00
Commit Message:
BLADERUNNER: Clear maze score when exiting maze
Changed paths:
engines/bladerunner/script/script.cpp
diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp
index c8a9a5afa7e..f8314e880da 100644
--- a/engines/bladerunner/script/script.cpp
+++ b/engines/bladerunner/script/script.cpp
@@ -28,6 +28,7 @@
#include "bladerunner/audio_player.h"
#include "bladerunner/audio_speech.h"
#include "bladerunner/bladerunner.h"
+#include "bladerunner/debugger.h"
#include "bladerunner/crimes_database.h"
#include "bladerunner/combat.h"
#include "bladerunner/dialogue_menu.h"
@@ -1442,6 +1443,11 @@ int ScriptBase::Police_Maze_Query_Score() {
void ScriptBase::Police_Maze_Zero_Score() {
debugC(kDebugScript, "Police_Maze_Zero_Score()");
Global_Variable_Reset(kVariablePoliceMazeScore);
+ // Police_Maze_Zero_Score is called when exiting from the maze
+ if (_vm->_debugger->_showMazeScore) {
+ _vm->_subtitles->setGameSubsText(BladeRunner::Subtitles::kSubtitlesSecondary, "", false);
+ _vm->_subtitles->hide(BladeRunner::Subtitles::kSubtitlesSecondary);
+ }
}
void ScriptBase::Police_Maze_Increment_Score(int delta) {
Commit: 11bfabdfa3dd5aa23b2f8cf0388d2f59c396a0ca
https://github.com/scummvm/scummvm/commit/11bfabdfa3dd5aa23b2f8cf0388d2f59c396a0ca
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2022-07-06T13:53:32+03:00
Commit Message:
BLADERUNNER: Fix Visual Studio complaining about SWAP
Changed paths:
engines/bladerunner/ui/kia_section_pogo.cpp
diff --git a/engines/bladerunner/ui/kia_section_pogo.cpp b/engines/bladerunner/ui/kia_section_pogo.cpp
index 6af5aec4426..6ea705c11c2 100644
--- a/engines/bladerunner/ui/kia_section_pogo.cpp
+++ b/engines/bladerunner/ui/kia_section_pogo.cpp
@@ -234,7 +234,7 @@ void KIASectionPogo::open() {
for (int i = 0; i < kStringCount; ++i) {
int j = _vm->_rnd.getRandomNumberRng(i, kStringCount - 1);
- SWAP(_strings[i], kStrings[j]);
+ SWAP<const char *>(_strings[i], kStrings[j]);
}
for (int i = 0; i < kLineCount; ++i) {
More information about the Scummvm-git-logs
mailing list