Skip to content

Commit

Permalink
XEEN: RU_T Moving translated hotkeys to resources.
Browse files Browse the repository at this point in the history
Hotkeys changed in char_info, control_panel, create_char, difficulty dialogs.
  • Loading branch information
Ardash committed May 25, 2021
1 parent d8c0d2f commit 7a80ba7
Show file tree
Hide file tree
Showing 13 changed files with 570 additions and 738 deletions.
24 changes: 24 additions & 0 deletions devtools/create_xeen/constants.cpp
Expand Up @@ -488,6 +488,30 @@ void LangConstants::writeConstants(Common::String num, CCArchive &cc) {
file.syncString(PHAROAH_ENDING_TEXT2());

cc.add("CONSTANTS" + num, file);

Common::MemFile keys;
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CHAR_INFO()->KEY_ITEM());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CHAR_INFO()->KEY_QUICK());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CHAR_INFO()->KEY_EXCHANGE());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CONTROL_PANEL()->KEY_FXON());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CONTROL_PANEL()->KEY_MUSICON());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CONTROL_PANEL()->KEY_LOAD());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CONTROL_PANEL()->KEY_SAVE());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CONTROL_PANEL()->KEY_QUIT());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CONTROL_PANEL()->KEY_MRWIZARD());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CREATE_CHAR()->KEY_ROLL());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CREATE_CHAR()->KEY_CREATE());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CREATE_CHAR()->KEY_MGT());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CREATE_CHAR()->KEY_INT());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CREATE_CHAR()->KEY_PER());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CREATE_CHAR()->KEY_END());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CREATE_CHAR()->KEY_SPD());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CREATE_CHAR()->KEY_ACY());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_CREATE_CHAR()->KEY_LCK());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_DIFFICULTY()->KEY_ADVENTURER());
keys.syncNumber(KEY_CONSTANTS()->DIALOGS_DIFFICULTY()->KEY_WARRIOR());

cc.add("CONSTKEYS" + num, keys);
}

void writeConstants(CCArchive &cc) {
Expand Down
44 changes: 44 additions & 0 deletions devtools/create_xeen/constants.h
Expand Up @@ -1245,6 +1245,50 @@ class LangConstants {
virtual const char *PHAROAH_ENDING_TEXT2() = 0;

void writeConstants(Common::String num, CCArchive &cc);

class KeyConstants {
public:
class DialogsCharInfo {
public:
virtual const int KEY_ITEM() = 0;
virtual const int KEY_QUICK() = 0;
virtual const int KEY_EXCHANGE() = 0;
};
virtual DialogsCharInfo *DIALOGS_CHAR_INFO() = 0;

class DialogsControlPanel {
public:
virtual const int KEY_FXON() = 0;
virtual const int KEY_MUSICON() = 0;
virtual const int KEY_LOAD() = 0;
virtual const int KEY_SAVE() = 0;
virtual const int KEY_QUIT() = 0;
virtual const int KEY_MRWIZARD() = 0;
};
virtual DialogsControlPanel *DIALOGS_CONTROL_PANEL() = 0;

class DialogsCreateChar {
public:
virtual const int KEY_ROLL() = 0;
virtual const int KEY_CREATE() = 0;
virtual const int KEY_MGT() = 0;
virtual const int KEY_INT() = 0;
virtual const int KEY_PER() = 0;
virtual const int KEY_END() = 0;
virtual const int KEY_SPD() = 0;
virtual const int KEY_ACY() = 0;
virtual const int KEY_LCK() = 0;
};
virtual DialogsCreateChar *DIALOGS_CREATE_CHAR() = 0;

class DialogsDifficulty {
public:
virtual const int KEY_ADVENTURER() = 0;
virtual const int KEY_WARRIOR() = 0;
};
virtual DialogsDifficulty *DIALOGS_DIFFICULTY() = 0;
};
virtual KeyConstants *KEY_CONSTANTS() = 0;
};

extern void writeConstants(CCArchive &cc);
Expand Down
73 changes: 73 additions & 0 deletions devtools/create_xeen/en_constants.h
Expand Up @@ -23,6 +23,7 @@
#pragma once

#include "constants.h"
#include "../scummvm/common/keyboard.h"

class EN : public LangConstants {
public:
Expand Down Expand Up @@ -1987,4 +1988,76 @@ class EN : public LangConstants {
"c\t000\v180Press a Key!\x3"
"l\fd";
}

class EN_KeyConstants : public KeyConstants {
public:
class EN_DialogsCharInfo : public DialogsCharInfo {
public:
const int KEY_ITEM() { return Common::KEYCODE_i; }
const int KEY_QUICK() { return Common::KEYCODE_q; }
const int KEY_EXCHANGE() { return Common::KEYCODE_e; }
};
EN_DialogsCharInfo *DIALOGS_CHAR_INFO() {
if (!_dci)_dci = new EN_DialogsCharInfo();
return _dci;
}

class EN_DialogsControlPanel : public DialogsControlPanel {
public:
const int KEY_FXON() { return Common::KEYCODE_e; }
const int KEY_MUSICON() { return Common::KEYCODE_m; }
const int KEY_LOAD() { return Common::KEYCODE_l; }
const int KEY_SAVE() { return Common::KEYCODE_s; }
const int KEY_QUIT() { return Common::KEYCODE_q; }
const int KEY_MRWIZARD() { return Common::KEYCODE_w; }
};
EN_DialogsControlPanel *DIALOGS_CONTROL_PANEL() {
if (!_dcp) _dcp = new EN_DialogsControlPanel();
return _dcp;
}

class EN_DialogsCreateChar : public DialogsCreateChar {
public:
const int KEY_ROLL() { return Common::KEYCODE_r; }
const int KEY_CREATE() { return Common::KEYCODE_c; }
const int KEY_MGT() { return Common::KEYCODE_m; }
const int KEY_INT() { return Common::KEYCODE_i; }
const int KEY_PER() { return Common::KEYCODE_p; }
const int KEY_END() { return Common::KEYCODE_e; }
const int KEY_SPD() { return Common::KEYCODE_s; }
const int KEY_ACY() { return Common::KEYCODE_a; }
const int KEY_LCK() { return Common::KEYCODE_l; }
};
EN_DialogsCreateChar *DIALOGS_CREATE_CHAR() {
if (!_dcc) _dcc = new EN_DialogsCreateChar();
return _dcc;
}

class EN_DialogsDifficulty : public DialogsDifficulty {
public:
const int KEY_ADVENTURER() { return Common::KEYCODE_a; }
const int KEY_WARRIOR() { return Common::KEYCODE_w; }
};
EN_DialogsDifficulty *DIALOGS_DIFFICULTY() {
if (!_dd)
_dd = new EN_DialogsDifficulty();
return _dd;
}

private:
EN_DialogsCharInfo *_dci = NULL;
EN_DialogsControlPanel *_dcp = NULL;
EN_DialogsCreateChar *_dcc = NULL;
EN_DialogsDifficulty *_dd = NULL;
};

EN_KeyConstants *KEY_CONSTANTS() {
if (!_kc)_kc = new EN_KeyConstants();
return _kc;
}

private:
EN_KeyConstants *_kc = NULL;
};


70 changes: 70 additions & 0 deletions devtools/create_xeen/ru_constants.h
Expand Up @@ -1994,4 +1994,74 @@ class RU : public LangConstants {
"c\t000\v180Press a Key!\x3"
"l\fd";
}

class RU_KeyConstants : public KeyConstants {
public:
class RU_DialogsCharInfo : public DialogsCharInfo {
public:
const int KEY_ITEM() { return Common::KEYCODE_d; }
const int KEY_QUICK() { return Common::KEYCODE_COMMA; }
const int KEY_EXCHANGE() { return Common::KEYCODE_c; }
};
RU_DialogsCharInfo *DIALOGS_CHAR_INFO() {
if (!_dci) _dci = new RU_DialogsCharInfo();
return _dci;
}

class RU_DialogsControlPanel : public DialogsControlPanel {
public:
const int KEY_FXON() { return Common::KEYCODE_e; }
const int KEY_MUSICON() { return Common::KEYCODE_v; }
const int KEY_LOAD() { return Common::KEYCODE_p; }
const int KEY_SAVE() { return Common::KEYCODE_c; }
const int KEY_QUIT() { return Common::KEYCODE_d; }
const int KEY_MRWIZARD() { return Common::KEYCODE_g; }
};
RU_DialogsControlPanel *DIALOGS_CONTROL_PANEL() {
if (!_dcp) _dcp = new RU_DialogsControlPanel();
return _dcp;
}

class RU_DialogsCreateChar : public DialogsCreateChar {
public:
const int KEY_ROLL() { return Common::KEYCODE_COMMA; }
const int KEY_CREATE() { return Common::KEYCODE_c; }
const int KEY_MGT() { return Common::KEYCODE_k; }
const int KEY_INT() { return Common::KEYCODE_b; }
const int KEY_PER() { return Common::KEYCODE_l; }
const int KEY_END() { return Common::KEYCODE_SEMICOLON; }
const int KEY_SPD() { return Common::KEYCODE_r; }
const int KEY_ACY() { return Common::KEYCODE_v; }
const int KEY_LCK() { return Common::KEYCODE_e; }
};
RU_DialogsCreateChar *DIALOGS_CREATE_CHAR() {
if (!_dcc) _dcc = new RU_DialogsCreateChar();
return _dcc;
}

class RU_DialogsDifficulty : public DialogsDifficulty {
public:
const int KEY_ADVENTURER() { return Common::KEYCODE_f; }
const int KEY_WARRIOR() { return Common::KEYCODE_d; }
};
RU_DialogsDifficulty *DIALOGS_DIFFICULTY() {
if (!_dd) _dd = new RU_DialogsDifficulty();
return _dd;
}

private:
RU_DialogsCharInfo *_dci = NULL;
RU_DialogsControlPanel *_dcp = NULL;
RU_DialogsCreateChar *_dcc = NULL;
RU_DialogsDifficulty *_dd = NULL;

};

RU_KeyConstants *KEY_CONSTANTS() {
if (!_kc) _kc = new RU_KeyConstants();
return _kc;
}

private:
RU_KeyConstants *_kc = NULL;
};
Binary file modified dists/engine-data/xeen.ccs
Binary file not shown.

0 comments on commit 7a80ba7

Please sign in to comment.