[Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.20,1.21 events.cpp,1.16,1.17 gfx.h,1.7,1.8 ihnm_introproc.cpp,1.12,1.13 ite_introproc.cpp,1.16,1.17 render.cpp,1.25,1.26 saga.cpp,1.37,1.38 saga.h,1.27,1.28 scene.cpp,1.24,1.25 scene_mod.h,1.6,1.7 script.cpp,1.16,1.17 script.h,1.9,1.10 sdata.cpp,1.12,1.13 sdebug.cpp,1.12,1.13 sfuncs.cpp,1.11,1.12 sprite.cpp,1.14,1.15 sstack.cpp,1.6,1.7 sthread.cpp,1.17,1.18 text.cpp,1.6,1.7 text.h,1.2,1.3 text_mod.h,1.3,NONE

Eugene Sandulenko sev at users.sourceforge.net
Mon Aug 2 17:41:34 CEST 2004


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11581

Modified Files:
	actor.cpp events.cpp gfx.h ihnm_introproc.cpp 
	ite_introproc.cpp render.cpp saga.cpp saga.h scene.cpp 
	scene_mod.h script.cpp script.h sdata.cpp sdebug.cpp 
	sfuncs.cpp sprite.cpp sstack.cpp sthread.cpp text.cpp text.h 
Removed Files:
	text_mod.h 
Log Message:
Move TEXT_* to SagaEngine class.


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- actor.cpp	3 Aug 2004 00:06:18 -0000	1.20
+++ actor.cpp	3 Aug 2004 00:40:15 -0000	1.21
@@ -33,7 +33,7 @@
 #include "saga/sndres.h"
 #include "saga/sprite_mod.h"
 #include "saga/font.h"
-#include "saga/text_mod.h"
+#include "saga/text.h"
 #include "saga/sound.h"
 
 #include "saga/actor.h"
@@ -239,7 +239,7 @@
 					diag_x = actor->s_pt.x;
 					diag_y = actor->s_pt.y;
 					diag_y -= ACTOR_DIALOGUE_HEIGHT;
-					TEXT_Draw(MEDIUM_FONT_ID, back_buf, a_dialogue->d_string, diag_x, diag_y, actor->a_dcolor, 0,
+					_vm->textDraw(MEDIUM_FONT_ID, back_buf, a_dialogue->d_string, diag_x, diag_y, actor->a_dcolor, 0,
 								FONT_OUTLINE | FONT_CENTERED);
 				}
 			}

Index: events.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/events.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- events.cpp	2 Aug 2004 16:20:34 -0000	1.16
+++ events.cpp	3 Aug 2004 00:40:15 -0000	1.17
@@ -33,7 +33,7 @@
 #include "saga/console_mod.h"
 #include "saga/scene_mod.h"
 #include "saga/interface_mod.h"
-#include "saga/text_mod.h"
+#include "saga/text.h"
 #include "saga/palanim_mod.h"
 #include "saga/render.h"
 #include "saga/game_mod.h"
@@ -221,13 +221,13 @@
 	case R_TEXT_EVENT:
 		switch (event->op) {
 		case EVENT_DISPLAY:
-			TEXT_SetDisplay((R_TEXTLIST_ENTRY *)event->data, 1);
+			_vm->textSetDisplay((R_TEXTLIST_ENTRY *)event->data, 1);
 			break;
 		case EVENT_REMOVE:
 			{
 				R_SCENE_INFO scene_info;
 				SCENE_GetInfo(&scene_info);
-				TEXT_DeleteEntry(scene_info.text_list, (R_TEXTLIST_ENTRY *)event->data);
+				_vm->textDeleteEntry(scene_info.text_list, (R_TEXTLIST_ENTRY *)event->data);
 			}
 			break;
 		default:

Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- gfx.h	2 Aug 2004 11:27:50 -0000	1.7
+++ gfx.h	3 Aug 2004 00:40:15 -0000	1.8
@@ -28,6 +28,9 @@
 
 namespace Saga {
 
+typedef Common::Point R_POINT;
+typedef Common::Rect R_RECT;
+
 struct R_CLIPINFO {
 	// input members
 	const R_RECT *src_rect;

Index: ihnm_introproc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/ihnm_introproc.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ihnm_introproc.cpp	3 Aug 2004 00:06:18 -0000	1.12
+++ ihnm_introproc.cpp	3 Aug 2004 00:40:15 -0000	1.13
@@ -32,7 +32,6 @@
 #include "saga/events_mod.h"
 #include "saga/rscfile_mod.h"
 #include "saga/scene_mod.h"
-#include "saga/text_mod.h"
 #include "saga/palanim_mod.h"
 
 #include "saga/scene.h"

Index: ite_introproc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/ite_introproc.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- ite_introproc.cpp	3 Aug 2004 00:06:18 -0000	1.16
+++ ite_introproc.cpp	3 Aug 2004 00:40:15 -0000	1.17
@@ -36,7 +36,7 @@
 #include "saga/rscfile_mod.h"
 #include "saga/scene_mod.h"
 #include "saga/sndres.h"
-#include "saga/text_mod.h"
+#include "saga/text.h"
 #include "saga/palanim_mod.h"
 #include "saga/music.h"
 
@@ -286,7 +286,7 @@
 
 		for (i = INTRO_CAVE1_START; i < INTRO_CAVE1_END; i++) {
 			text_entry.string = IntroDiag[i].i_str;
-			entry_p = TEXT_AddEntry(scene_info->text_list, &text_entry);
+			entry_p = _vm->textAddEntry(scene_info->text_list, &text_entry);
 
 			// Display text
 			event.type = R_ONESHOT_EVENT;
@@ -383,7 +383,7 @@
 
 		for (i = INTRO_CAVE2_START; i < INTRO_CAVE2_END; i++) {
 			text_entry.string = IntroDiag[i].i_str;
-			entry_p = TEXT_AddEntry(scene_info->text_list, &text_entry);
+			entry_p = _vm->textAddEntry(scene_info->text_list, &text_entry);
 
 			// Display text
 			event.type = R_ONESHOT_EVENT;
@@ -479,7 +479,7 @@
 
 		for (i = INTRO_CAVE3_START; i < INTRO_CAVE3_END; i++) {
 			text_entry.string = IntroDiag[i].i_str;
-			entry_p = TEXT_AddEntry(scene_info->text_list, &text_entry);
+			entry_p = _vm->textAddEntry(scene_info->text_list, &text_entry);
 
 			// Display text
 			event.type = R_ONESHOT_EVENT;
@@ -576,7 +576,7 @@
 
 		for (i = INTRO_CAVE4_START; i < INTRO_CAVE4_END; i++) {
 			text_entry.string = IntroDiag[i].i_str;
-			entry_p = TEXT_AddEntry(scene_info->text_list, &text_entry);
+			entry_p = _vm->textAddEntry(scene_info->text_list, &text_entry);
 
 			// Display text
 			event.type = R_ONESHOT_EVENT;
@@ -698,7 +698,7 @@
 			text_entry.text_x = credits[i].text_x;
 			text_entry.text_y = credits[i].text_y;
 
-			entry_p = TEXT_AddEntry(scene_info->text_list, &text_entry);
+			entry_p = _vm->textAddEntry(scene_info->text_list, &text_entry);
 
 			// Display text
 			event.type = R_ONESHOT_EVENT;
@@ -804,7 +804,7 @@
 			text_entry.text_x = credits[i].text_x;
 			text_entry.text_y = credits[i].text_y;
 
-			entry_p = TEXT_AddEntry(scene_info->text_list, &text_entry);
+			entry_p = _vm->textAddEntry(scene_info->text_list, &text_entry);
 
 			// Display text
 			event.type = R_ONESHOT_EVENT;
@@ -913,7 +913,7 @@
 			text_entry.text_x = credits[i].text_x;
 			text_entry.text_y = credits[i].text_y;
 
-			entry_p = TEXT_AddEntry(scene_info->text_list, &text_entry);
+			entry_p = _vm->textAddEntry(scene_info->text_list, &text_entry);
 
 			// Display text
 			event.type = R_ONESHOT_EVENT;

Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/render.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- render.cpp	3 Aug 2004 00:06:18 -0000	1.25
+++ render.cpp	3 Aug 2004 00:40:15 -0000	1.26
@@ -33,7 +33,7 @@
 #include "saga/interface_mod.h"
 #include "saga/scene_mod.h"
 #include "saga/sprite_mod.h"
-#include "saga/text_mod.h"
+#include "saga/text.h"
 
 #include "saga/actionmap.h"
 #include "saga/objectmap.h"
@@ -147,7 +147,7 @@
 	// Draw queued text strings
 	SCENE_GetInfo(&scene_info);
 
-	TEXT_DrawList(scene_info.text_list, backbuf_surface);
+	_vm->textDrawList(scene_info.text_list, backbuf_surface);
 
 	// Handle user input
 	SYSINPUT_ProcessInput();
@@ -174,7 +174,7 @@
 
 	// Display text formatting test, if applicable
 	if (_flags & RF_TEXT_TEST) {
-		TEXT_Draw(MEDIUM_FONT_ID, backbuf_surface, test_txt, mouse_pt.x, mouse_pt.y,
+		_vm->textDraw(MEDIUM_FONT_ID, backbuf_surface, test_txt, mouse_pt.x, mouse_pt.y,
 				_gfx->getWhite(), _gfx->getBlack(), FONT_OUTLINE | FONT_CENTERED);
 	}
 

Index: saga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- saga.cpp	3 Aug 2004 00:06:18 -0000	1.37
+++ saga.cpp	3 Aug 2004 00:40:15 -0000	1.38
@@ -52,7 +52,6 @@
 #include "saga/sdata.h"
 #include "saga/sndres.h"
 #include "saga/sprite_mod.h"
-#include "saga/text_mod.h"
 #include "saga/objectmap.h"
 #include "saga/sound.h"
 #include "saga/music.h"

Index: saga.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- saga.h	3 Aug 2004 00:06:18 -0000	1.27
+++ saga.h	3 Aug 2004 00:40:15 -0000	1.28
@@ -35,6 +35,9 @@
 #include <limits.h>
 #include <stddef.h>
 
+#include "saga/text.h"
+#include "saga/gfx.h"
+
 namespace Saga {
 
 class SndRes;
@@ -59,9 +62,6 @@
 struct R_RSCFILE_CONTEXT;
 struct R_SEMAPHORE;
 
-typedef Common::Point R_POINT;
-typedef Common::Rect R_RECT;
-
 enum R_ERRORCODE {
 	R_MEM = -2,
 	R_FAILURE = -1,
@@ -116,6 +116,19 @@
 	int decodeBGImage(const byte *image_data, size_t image_size,
 						byte **output_buf, size_t *output_buf_len, int *w, int *h);
 	const byte *getImagePal(const byte *image_data, size_t image_size);
+
+public:
+	R_TEXTLIST *textCreateList();
+	void textDestroyList(R_TEXTLIST *textlist);
+	void textClearList(R_TEXTLIST *textlist);
+	int textDrawList(R_TEXTLIST *textlist, R_SURFACE *ds);
+	R_TEXTLIST_ENTRY *textAddEntry(R_TEXTLIST *textlist, R_TEXTLIST_ENTRY *entry);
+	int textDeleteEntry(R_TEXTLIST *textlist, R_TEXTLIST_ENTRY *entry);
+	int textSetDisplay(R_TEXTLIST_ENTRY *entry, int val);
+	int textDraw(int font_id, R_SURFACE *ds, const char *string, int text_x, int text_y, int color,
+				  int effect_color, int flags);
+	int textProcessList(R_TEXTLIST *textlist, long ms);
+
 };
 
 // FIXME: Global var. We use it until everything will be turned into objects

Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- scene.cpp	2 Aug 2004 16:20:35 -0000	1.24
+++ scene.cpp	3 Aug 2004 00:40:15 -0000	1.25
@@ -39,7 +39,7 @@
 #include "saga/render.h"
 #include "saga/rscfile_mod.h"
 #include "saga/script.h"
-#include "saga/text_mod.h"
+#include "saga/text.h"
 #include "saga/sound.h"
 #include "saga/music.h"
 
@@ -114,7 +114,7 @@
 	debug(0, "SCENE_Init(): LUT has %d entries.", SceneModule.scene_max);
 
 	// Create scene module text list
-	SceneModule.text_list = TEXT_CreateList();
+	SceneModule.text_list = _vm->textCreateList();
 
 	if (SceneModule.text_list == NULL) {
 		warning("Error: Couldn't create scene text list");
@@ -797,7 +797,7 @@
 	SceneModule.anim_entries = 0;
 
 	EVENT_ClearList();
-	TEXT_ClearList(SceneModule.text_list);
+	_vm->textClearList(SceneModule.text_list);
 
 	SceneModule.scene_loaded = 0;
 

Index: scene_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene_mod.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- scene_mod.h	2 Aug 2004 16:20:35 -0000	1.6
+++ scene_mod.h	3 Aug 2004 00:40:16 -0000	1.7
@@ -26,7 +26,7 @@
 #ifndef SAGA_SCENE_MOD_H__
 #define SAGA_SCENE_MOD_H__
 
-#include "saga/text_mod.h"
+#include "saga/text.h"
 
 namespace Saga {
 

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- script.cpp	2 Aug 2004 16:20:35 -0000	1.16
+++ script.cpp	3 Aug 2004 00:40:16 -0000	1.17
@@ -28,7 +28,6 @@
 #include "saga/gfx.h"
 #include "saga/rscfile_mod.h"
 #include "saga/game_mod.h"
-#include "saga/text_mod.h"
 #include "saga/console_mod.h"
 #include "saga/cvar_mod.h"
 

Index: script.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- script.h	2 Aug 2004 16:20:35 -0000	1.9
+++ script.h	3 Aug 2004 00:40:16 -0000	1.10
@@ -28,7 +28,7 @@
 
 #include "saga/sstack.h"
 #include "saga/sdata.h"
-#include "saga/text_mod.h"
+#include "saga/text.h"
 #include "saga/yslib.h"
 
 namespace Saga {

Index: sdata.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sdata.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- sdata.cpp	2 Aug 2004 16:20:35 -0000	1.12
+++ sdata.cpp	3 Aug 2004 00:40:16 -0000	1.13
@@ -24,7 +24,6 @@
 #include "saga/saga.h"
 
 #include "saga/gfx.h"
-#include "saga/text_mod.h"
 #include "saga/script_mod.h"
 #include "saga/script.h"
 #include "saga/sdata.h"

Index: sdebug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sdebug.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- sdebug.cpp	3 Aug 2004 00:06:18 -0000	1.12
+++ sdebug.cpp	3 Aug 2004 00:40:16 -0000	1.13
@@ -26,7 +26,7 @@
 
 #include "saga/gfx.h"
 #include "saga/console_mod.h"
-#include "saga/text_mod.h"
+#include "saga/text.h"
 #include "saga/scene_mod.h"
 #include "saga/font.h"
 
@@ -53,7 +53,7 @@
 	disp_buf[0] = 0;
 
 	if (_vm->_script->_dbg_txtentry != NULL) {
-		TEXT_DeleteEntry(si.text_list, _vm->_script->_dbg_txtentry);
+		_vm->textDeleteEntry(si.text_list, _vm->_script->_dbg_txtentry);
 		_vm->_script->_dbg_txtentry = NULL;
 	}
 
@@ -514,8 +514,8 @@
 		break;
 	}
 
-	_vm->_script->_dbg_txtentry = TEXT_AddEntry(si.text_list, &tl_e);
-	TEXT_SetDisplay(_vm->_script->_dbg_txtentry, 1);
+	_vm->_script->_dbg_txtentry = _vm->textAddEntry(si.text_list, &tl_e);
+	_vm->textSetDisplay(_vm->_script->_dbg_txtentry, 1);
 
 	return R_SUCCESS;
 }

Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- sfuncs.cpp	2 Aug 2004 16:20:35 -0000	1.11
+++ sfuncs.cpp	3 Aug 2004 00:40:16 -0000	1.12
@@ -30,7 +30,6 @@
 #include "saga/animation.h"
 #include "saga/console_mod.h"
 #include "saga/interface_mod.h"
-#include "saga/text_mod.h"
 
 #include "saga/script.h"
 #include "saga/sfuncs.h"

Index: sprite.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sprite.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- sprite.cpp	3 Aug 2004 00:06:18 -0000	1.14
+++ sprite.cpp	3 Aug 2004 00:40:16 -0000	1.15
@@ -29,7 +29,7 @@
 #include "saga/scene_mod.h"
 #include "saga/rscfile_mod.h"
 
-#include "saga/text_mod.h"
+#include "saga/text.h"
 #include "saga/font.h"
 
 #include "saga/sprite_mod.h"
@@ -398,7 +398,7 @@
 		char buf[1024] = { 0 };
 		sprintf( buf, "dw: %d, dh: %d.", ci.draw_w, ci.draw_h );
 
-		TEXT_Draw(2, ds, buf, spr_x - x_align, spr_y - y_align, 255, 0, FONT_OUTLINE);
+		_vm->textDraw(2, ds, buf, spr_x - x_align, spr_y - y_align, 255, 0, FONT_OUTLINE);
 	}
 */
 	return R_SUCCESS;

Index: sstack.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sstack.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- sstack.cpp	2 Aug 2004 16:20:35 -0000	1.6
+++ sstack.cpp	3 Aug 2004 00:40:16 -0000	1.7
@@ -27,7 +27,6 @@
 
 #include "saga/gfx.h"
 #include "saga/console_mod.h"
-#include "saga/text_mod.h"
 
 #include "saga/script.h"
 #include "saga/sstack.h"

Index: sthread.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sthread.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- sthread.cpp	2 Aug 2004 16:20:35 -0000	1.17
+++ sthread.cpp	3 Aug 2004 00:40:16 -0000	1.18
@@ -28,7 +28,6 @@
 #include "saga/gfx.h"
 #include "saga/actor.h"
 #include "saga/console_mod.h"
-#include "saga/text_mod.h"
 
 #include "saga/script.h"
 #include "saga/script_mod.h"

Index: text.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/text.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- text.cpp	3 Aug 2004 00:06:18 -0000	1.6
+++ text.cpp	3 Aug 2004 00:40:16 -0000	1.7
@@ -29,12 +29,11 @@
 #include "saga/gfx.h"
 #include "saga/font.h"
 
-#include "saga/text_mod.h"
 #include "saga/text.h"
 
 namespace Saga {
 
-int TEXT_Draw(int font_id, R_SURFACE *ds, const char *string, int text_x, int text_y, int color,
+int SagaEngine::textDraw(int font_id, R_SURFACE *ds, const char *string, int text_x, int text_y, int color,
 				int effect_color, int flags) {
 	int string_w;
 	int string_len;
@@ -69,7 +68,7 @@
 			return R_FAILURE;
 		}
 
-		string_w = _vm->_font->getStringWidth(font_id, string, string_len, flags);
+		string_w = _font->getStringWidth(font_id, string, string_len, flags);
 
 		if (text_x < (ds->buf_w / 2)) {
 			// Fit to right side
@@ -82,12 +81,12 @@
 		if (fit_w >= string_w) {
 			// Entire string fits, draw it
 			text_x = text_x - (string_w / 2);
-			_vm->_font->draw(font_id, ds, string, string_len, text_x, text_y, color, effect_color, flags);
+			_font->draw(font_id, ds, string, string_len, text_x, text_y, color, effect_color, flags);
 			return R_SUCCESS;
 		}
 
 		// String won't fit on one line
-		h = _vm->_font->getHeight(font_id);
+		h = _font->getHeight(font_id);
 		w_total = 0;
 		len_total = 0;
 		wc = 0;
@@ -106,7 +105,7 @@
 				len = found_p - measure_p;
 			}
 
-			w = _vm->_font->getStringWidth(font_id, measure_p, len, flags);
+			w = _font->getStringWidth(font_id, measure_p, len, flags);
 			measure_p = found_p;
 
 			if ((w_total + w) > fit_w) {
@@ -117,7 +116,7 @@
 				}
 
 				// Wrap what we've got and restart
-				_vm->_font->draw(font_id, ds, start_p, len_total, text_x - (w_total / 2), text_y, color, 
+				_font->draw(font_id, ds, start_p, len_total, text_x - (w_total / 2), text_y, color, 
 							effect_color, flags);
 				text_y += h + R_TEXT_LINESPACING;
 				w_total = 0;
@@ -132,7 +131,7 @@
 				wc++;
 				if (found_p == NULL) {
 					// Since word hit NULL but fit, we are done
-					_vm->_font->draw(font_id, ds, start_p, len_total, text_x - (w_total / 2), text_y, color,
+					_font->draw(font_id, ds, start_p, len_total, text_x - (w_total / 2), text_y, color,
 								effect_color, flags);
 					return R_SUCCESS;
 				}
@@ -141,13 +140,13 @@
 		}
 	} else {
 		// Text is not centered; No formatting required
-		_vm->_font->draw(font_id, ds, string, string_len, text_x, text_y, color, effect_color, flags);
+		_font->draw(font_id, ds, string, string_len, text_x, text_y, color, effect_color, flags);
 	}
 
 	return R_SUCCESS;
 }
 
-R_TEXTLIST *TEXT_CreateList() {
+R_TEXTLIST *SagaEngine::textCreateList() {
 	R_TEXTLIST *new_textlist;
 
 	new_textlist = (R_TEXTLIST *)malloc(sizeof *new_textlist);
@@ -166,7 +165,7 @@
 	return new_textlist;
 }
 
-void TEXT_ClearList(R_TEXTLIST *tlist) {
+void SagaEngine::textClearList(R_TEXTLIST *tlist) {
 	if (tlist != NULL) {
 		ys_dll_delete_all(tlist->list);
 	}
@@ -174,7 +173,7 @@
 	return;
 }
 
-void TEXT_DestroyList(R_TEXTLIST *tlist) {
+void SagaEngine::textDestroyList(R_TEXTLIST *tlist) {
 	if (tlist != NULL) {
 		ys_dll_destroy(tlist->list);
 	}
@@ -183,7 +182,7 @@
 	return;
 }
 
-int TEXT_DrawList(R_TEXTLIST *textlist, R_SURFACE *ds) {
+int SagaEngine::textDrawList(R_TEXTLIST *textlist, R_SURFACE *ds) {
 	R_TEXTLIST_ENTRY *entry_p;
 	YS_DL_NODE *walk_p;
 
@@ -192,7 +191,7 @@
 	for (walk_p = ys_dll_head(textlist->list); walk_p != NULL; walk_p = ys_dll_next(walk_p)) {
 		entry_p = (R_TEXTLIST_ENTRY *)ys_dll_get_data(walk_p);
 		if (entry_p->display != 0) {
-			TEXT_Draw(entry_p->font_id, ds, entry_p->string, entry_p->text_x, entry_p->text_y, entry_p->color,
+			textDraw(entry_p->font_id, ds, entry_p->string, entry_p->text_x, entry_p->text_y, entry_p->color,
 			entry_p->effect_color, entry_p->flags);
 		}
 	}
@@ -200,7 +199,7 @@
 	return R_SUCCESS;
 }
 
-int TEXT_ProcessList(R_TEXTLIST *textlist, long ms) {
+int SagaEngine::textProcessList(R_TEXTLIST *textlist, long ms) {
 	R_TEXTLIST_ENTRY *entry_p;
 	YS_DL_NODE *walk_p;
 	YS_DL_NODE *temp_p;
@@ -220,7 +219,7 @@
 
 }
 
-R_TEXTLIST_ENTRY *TEXT_AddEntry(R_TEXTLIST *textlist, R_TEXTLIST_ENTRY *entry) {
+R_TEXTLIST_ENTRY *SagaEngine::textAddEntry(R_TEXTLIST *textlist, R_TEXTLIST_ENTRY *entry) {
 	YS_DL_NODE *new_node = NULL;
 
 	if (entry != NULL) {
@@ -230,7 +229,7 @@
 	return (new_node != NULL) ? (R_TEXTLIST_ENTRY *)new_node->data : NULL;
 }
 
-int TEXT_SetDisplay(R_TEXTLIST_ENTRY *entry, int val) {
+int SagaEngine::textSetDisplay(R_TEXTLIST_ENTRY *entry, int val) {
 	if (entry != NULL) {
 		entry->display = !!val;
 		return R_SUCCESS;
@@ -239,7 +238,7 @@
 	return R_FAILURE;
 }
 
-int TEXT_DeleteEntry(R_TEXTLIST *textlist, R_TEXTLIST_ENTRY *entry) {
+int SagaEngine::textDeleteEntry(R_TEXTLIST *textlist, R_TEXTLIST_ENTRY *entry) {
 	YS_DL_NODE *walk_p;
 
 	if (entry == NULL) {

Index: text.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/text.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- text.h	1 May 2004 16:15:55 -0000	1.2
+++ text.h	3 Aug 2004 00:40:16 -0000	1.3
@@ -26,6 +26,8 @@
 #ifndef SAGA_TEXT_H__
 #define SAGA_TEXT_H__
 
+#include "saga/yslib.h"
+
 namespace Saga {
 
 #define R_TEXT_CENTERLIMIT 50
@@ -36,5 +38,27 @@
 	YS_DL_LIST *list;
 };
 
+enum R_TEXT_FLAGS {
+	TEXT_TIMEOUT = 0x01
+};
+
+struct R_TEXTLIST_ENTRY {
+	struct R_TEXTLIST_ENTRY_tag *next;
+	struct R_TEXTLIST_ENTRY_tag *prev;
+	int display;
+	int id;
+	int text_x;
+	int text_y;
+	int color;
+	int effect_color;
+	int flags;
+	int font_id;
+	long time;
+	const char *string;
+	R_TEXTLIST_ENTRY() { memset(this, 0, sizeof(*this)); }
+};
+
+typedef struct R_TEXTLIST_tag R_TEXTLIST;
+
 }				// End of namespace Saga
 #endif

--- text_mod.h DELETED ---





More information about the Scummvm-git-logs mailing list