[Scummvm-cvs-logs] CVS: scummvm/bs2 maketext.cpp,1.8,1.9 maketext.h,1.1,1.2
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Fri Sep 19 14:37:42 CEST 2003
Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv26743
Modified Files:
maketext.cpp maketext.h
Log Message:
cleanup
Index: maketext.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/maketext.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- maketext.cpp 13 Sep 2003 10:31:46 -0000 1.8
+++ maketext.cpp 19 Sep 2003 06:42:03 -0000 1.9
@@ -17,493 +17,505 @@
* $Header$
*/
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// MAKETEXT - Constructs a single-frame text sprite: returns a handle to a
-// FLOATING memory block containing the sprite, given a
-// null-terminated string, max width allowed, pen colour and
-// pointer to required character set.
+// MAKETEXT - Constructs a single-frame text sprite: returns a handle to a
+// FLOATING memory block containing the sprite, given a
[...1028 lines suppressed...]
- {
- speech_font_id = ENGLISH_SPEECH_FONT_ID;
- controls_font_id = ENGLISH_CONTROLS_FONT_ID;
- red_font_id = ENGLISH_RED_FONT_ID;
+ default: // DEFAULT_TEXT - regular fonts
+ speech_font_id = ENGLISH_SPEECH_FONT_ID;
+ controls_font_id = ENGLISH_CONTROLS_FONT_ID;
+ red_font_id = ENGLISH_RED_FONT_ID;
break;
- }
}
}
-//------------------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-
-
-
-
-
Index: maketext.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/maketext.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- maketext.h 28 Jul 2003 01:44:37 -0000 1.1
+++ maketext.h 19 Sep 2003 06:42:03 -0000 1.2
@@ -18,48 +18,51 @@
*/
/****************************************************************************
- * MAKETEXT.H Function prototype for text sprite builder routine JEL Oct96
+ * MAKETEXT.H - Function prototype for text sprite builder routine JEL Oct96
*
- * The routine returns a memory handle to a movable memory block containing
- * the required sprite, which must be locked before use.
- * ie. lock, draw sprite, unlock/free.
- * The sprite data contains a frameHeader, but not a standard file header.
+ * The routine returns a memory handle to a movable memory block containing
+ * the required sprite, which must be locked before use. ie. lock, draw
+ * sprite, unlock/free.
+ *
+ * The sprite data contains a frameHeader, but not a standard file header.
*
- * Debugger will trap error when word too big for line (maxWidth)
- * or when more lines needed than max expected (MAX_LINES)
+ * Debugger will trap error when word too big for line (maxWidth) or when
+ * more lines needed than max expected (MAX_LINES)
*
- * PARAMETERS:
+ * PARAMETERS:
*
- * 'sentence' points to a NULL-TERMINATED STRING
- * - string must contain no leading/tailing/extra spaces
- * - out-of-range characters in the string are forced to the output as a
- * special error-signal character (chequered flag)
+ * 'sentence' points to a NULL-TERMINATED STRING
+ * - string must contain no leading/tailing/extra spaces
+ * - out-of-range characters in the string are forced to the output as
+ * a special error-signal character (chequered flag)
*
- * 'maxWidth' is the maximum allowed text sprite width, in PIXELS
+ * 'maxWidth' is the maximum allowed text sprite width, in PIXELS
*
- * 'pen' is the desired colour (0-255) for the main body of each character
- * NB. Border colour is #DEFINEd in textsprt.c (to a colour value for BLACK)
- * if 'pen' is zero, the characters are copied directly and NOT remapped.
+ * 'pen' is the desired colour (0-255) for the main body of each character
+ *
+ * NB. Border colour is #DEFINEd in textsprt.c (to a colour value for BLACK)
+ * if 'pen' is zero, the characters are copied directly and NOT remapped.
*
- * 'charSet' points to the beginning of the standard file header for the
- * desired character set
- * NB. The first and last characters in the set are #DEFINEd in textsprt.c
- *
+ * 'charSet' points to the beginning of the standard file header for the
+ * desired character set
*
- * RETURNS:
+ * NB. The first and last characters in the set are #DEFINEd in textsprt.c
*
- * 'textSprite' points to the handle to be used for the text sprite
+ * RETURNS:
+ *
+ * 'textSprite' points to the handle to be used for the text sprite
*
****************************************************************************/
#ifndef _MAKETEXT_H
#define _MAKETEXT_H
-//#include "src\driver96.h"
#include "memory.h"
-#define NO_JUSTIFICATION 0 // only for debug text, since it doesn't keep text inside the screen margin!
-#define POSITION_AT_CENTRE_OF_BASE 1 // these all force text inside the screen edge margin when necessary
+// only for debug text, since it doesn't keep text inside the screen margin!
+#define NO_JUSTIFICATION 0
+// these all force text inside the screen edge margin when necessary
+#define POSITION_AT_CENTRE_OF_BASE 1
#define POSITION_AT_CENTRE_OF_TOP 2
#define POSITION_AT_LEFT_OF_TOP 3
#define POSITION_AT_RIGHT_OF_TOP 4
@@ -68,27 +71,25 @@
#define POSITION_AT_LEFT_OF_CENTRE 7
#define POSITION_AT_RIGHT_OF_CENTRE 8
-mem* MakeTextSprite( uint8 *sentence, uint16 maxWidth, uint8 pen, uint32 fontRes );
-void Init_text_bloc_system(void);
+mem* MakeTextSprite(uint8 *sentence, uint16 maxWidth, uint8 pen, uint32 fontRes);
+void Init_text_bloc_system(void);
-void Kill_text_bloc(uint32 bloc_number);
-void Print_text_blocs(void); //Tony16Oct96
+void Kill_text_bloc(uint32 bloc_number);
+void Print_text_blocs(void); // Tony16Oct96
uint32 Build_new_block(uint8 *ascii, int16 x, int16 y, uint16 width, uint8 pen, uint32 type, uint32 fontRes, uint8 justification);
-//-----------------------------------------------------------------------------
-
#define DEFAULT_TEXT 0
#define FINNISH_TEXT 1
-#define POLISH_TEXT 2
+#define POLISH_TEXT 2
-void InitialiseFontResourceFlags(void); // this one works out the language from the text cluster (James31july97)
-void InitialiseFontResourceFlags(uint8 language); // this one allow you to select the fonts yourself (James31july97)
+// this one works out the language from the text cluster (James31july97)
+void InitialiseFontResourceFlags(void);
+// this one allow you to select the fonts yourself (James31july97)
+void InitialiseFontResourceFlags(uint8 language);
extern uint32 speech_font_id;
extern uint32 controls_font_id;
extern uint32 red_font_id;
-
-//-----------------------------------------------------------------------------
#endif
More information about the Scummvm-git-logs
mailing list