diff options
| author | Filippos Karapetis | 2008-09-10 08:25:12 +0000 | 
|---|---|---|
| committer | Filippos Karapetis | 2008-09-10 08:25:12 +0000 | 
| commit | 3202ef4dd15f12bdd8cd648d31a9f41b5e0c3053 (patch) | |
| tree | cd16304a52bf61dccf3f9d89130b70887d2a6967 /engines/drascula/talk.cpp | |
| parent | cde2ee58b18684628b7c37d297178323ad58c73f (diff) | |
| download | scummvm-rg350-3202ef4dd15f12bdd8cd648d31a9f41b5e0c3053.tar.gz scummvm-rg350-3202ef4dd15f12bdd8cd648d31a9f41b5e0c3053.tar.bz2 scummvm-rg350-3202ef4dd15f12bdd8cd648d31a9f41b5e0c3053.zip  | |
Reduced game memory usage by about 400KB by only loading the current language strings, not all strings
svn-id: r34472
Diffstat (limited to 'engines/drascula/talk.cpp')
| -rw-r--r-- | engines/drascula/talk.cpp | 36 | 
1 files changed, 18 insertions, 18 deletions
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 5ee7f13a25..38956449c4 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -55,7 +55,7 @@ bool DrasculaEngine::isTalkFinished(int* length) {  void DrasculaEngine::talk_igor(int index, int talkerType) {  	char filename[20];  	sprintf(filename, "I%i.als", index); -	const char *said = _texti[_lang][index]; +	const char *said = _texti[index];  	int x_talk0[8] = {  56,  82, 108, 134, 160, 186, 212, 238 };  	int x_talk1[8] = {  56,  86, 116, 146, 176, 206, 236, 266 };  	int x_talk3[4] = {  80, 102, 124, 146 }; @@ -136,7 +136,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) {  // Talker type 0: talk_dr_izq, 1: talk_dr_dch  void DrasculaEngine::talk_drascula(int index, int talkerType) { -	const char *said = _textd[_lang][index]; +	const char *said = _textd[index];  	char filename[20];  	sprintf(filename, "d%i.als", index);  	int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; @@ -196,7 +196,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) {  void DrasculaEngine::talk_drascula_big(int index) {  	char filename[20];  	sprintf(filename, "d%i.als", index); -	const char *said = _textd[_lang][index]; +	const char *said = _textd[index];  	int x_talk[4] = {47, 93, 139, 185};  	int face;  	int l = 0; @@ -266,10 +266,10 @@ void DrasculaEngine::talk_bartender(int index, int talkerType) {  	// Line 82 is a special case  	if (index != 82) -		said = _textt[_lang][index]; +		said = _textt[index];  	else {  		sprintf(filename, "d%i.als", index); -		said = _textd[_lang][index]; +		said = _textd[index];  	}  	int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; @@ -321,7 +321,7 @@ void DrasculaEngine::talk_bartender(int index, int talkerType) {  void DrasculaEngine::talk_bj(int index) {  	char filename[20];  	sprintf(filename, "BJ%i.als", index); -	const char *said = _textbj[_lang][index]; +	const char *said = _textbj[index];  	int x_talk[5] = { 64, 92, 120, 148, 176 };  	int face;  	int length = strlen(said); @@ -369,7 +369,7 @@ void DrasculaEngine::talk_bj(int index) {  void DrasculaEngine::talk(int index) {  	char name[20];  	sprintf(name, "%i.als", index); -	talk(_text[_lang][index], name); +	talk(_text[index], name);  }  void DrasculaEngine::talk(const char *said, const char *filename) { @@ -491,7 +491,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {  void DrasculaEngine::talk_pianist(int index) {  	char filename[20];  	sprintf(filename, "P%i.als", index); -	const char* said = _textp[_lang][index]; +	const char* said = _textp[index];  	int x_talk[4] = { 97, 145, 193, 241 };  	int coords[7] = { 139, 228, 112, 47, 60, 221, 128 }; @@ -502,7 +502,7 @@ void DrasculaEngine::talk_pianist(int index) {  void DrasculaEngine::talk_drunk(int index) {  	char filename[20];  	sprintf(filename, "B%i.als", index); -	const char *said = _textb[_lang][index]; +	const char *said = _textb[index];  	int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 };  	int coords[7] = { 29, 177, 50, 19, 19, 181, 54 }; @@ -539,7 +539,7 @@ void DrasculaEngine::talk_drunk(int index) {  void DrasculaEngine::talk_vonBraun(int index, int talkerType) {  	char filename[20];  	sprintf(filename, "VB%i.als", index); -	const char *said = _textvb[_lang][index]; +	const char *said = _textvb[index];  	int x_talk[6] = {1, 27, 53, 79, 105, 131};  	int face;  	int length = strlen(said); @@ -591,8 +591,8 @@ void DrasculaEngine::talk_blind(int index) {  	// voice files start from 58, not 1  	char filename[20];  	sprintf(filename, "d%i.als", index + TEXTD_START - 1); -	const char *said = _textd[_lang][index + TEXTD_START - 1]; -	const char *syncChar = _textd1[_lang][index - 1]; +	const char *said = _textd[index + TEXTD_START - 1]; +	const char *syncChar = _textd1[index - 1];  	byte *faceBuffer;  	int p = 0; @@ -641,7 +641,7 @@ void DrasculaEngine::talk_blind(int index) {  void DrasculaEngine::talk_hacker(int index) {  	char filename[20];  	sprintf(filename, "d%i.als", index); -	const char *said = _textd[_lang][index]; +	const char *said = _textd[index];  	int length = strlen(said);  	copyBackground(); @@ -661,7 +661,7 @@ void DrasculaEngine::talk_hacker(int index) {  void DrasculaEngine::talk_werewolf(int index) {  	char filename[20];  	sprintf(filename, "L%i.als", index); -	const char *said = _textl[_lang][index]; +	const char *said = _textl[index];  	int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268};  	int coords[7] = { 136, 198, 81, 26, 24, 203, 78 }; @@ -672,7 +672,7 @@ void DrasculaEngine::talk_werewolf(int index) {  void DrasculaEngine::talk_mus(int index) {  	char filename[20];  	sprintf(filename, "E%i.als", index); -	const char *said = _texte[_lang][index]; +	const char *said = _texte[index];  	int x_talk[8] = { 16, 35, 54, 73, 92, 111, 130, 149};  	int coords[7] = { 156, 190, 64, 18, 24, 197, 64 }; @@ -735,7 +735,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename, int talker  void DrasculaEngine::talk_bj_bed(int index) {  	char filename[20];  	sprintf(filename, "BJ%i.als", index); -	const char *said = _textbj[_lang][index]; +	const char *said = _textbj[index];  	int x_talk[5] = {51, 101, 151, 201, 251};  	int face;  	int length = strlen(said); @@ -771,7 +771,7 @@ void DrasculaEngine::talk_bj_bed(int index) {  void DrasculaEngine::talk_htel(int index) {  	char filename[20];  	sprintf(filename, "%i.als", index); -	const char *said = _text[_lang][index]; +	const char *said = _text[index];  	char *faceBuffer;  	int x_talk[3] = {1, 94, 187};  	int face, curScreen; @@ -895,7 +895,7 @@ void DrasculaEngine::talk_sync(const char *said, const char *filename, const cha  void DrasculaEngine::talk_trunk(int index) {  	char filename[20];  	sprintf(filename, "d%i.als", index); -	const char *said = _text[_lang][index]; +	const char *said = _text[index];  	int face = 0, cara_antes;  	int length = strlen(said);  | 
