Commit 72272502 authored by Steven Fuller's avatar Steven Fuller

Forgot about wl_text...

parent 8e70f4b8
......@@ -6,7 +6,8 @@ CFLAGS = -g -DUSEVGA
#CFLAGS = -g -pg -DDEBUG
OBJS = objs.o misc.o id_ca.o id_in.o id_sd.o id_vl.o id_vh.o id_us.o \
wl_scale.o wl_draw.o wl_act1.o wl_act2.o wl_agent.o wl_game.o \
wl_inter.o wl_menu.o wl_play.o wl_state.o wl_main.o wl_debug.o
wl_inter.o wl_menu.o wl_play.o wl_state.o wl_text.o wl_main.o \
wl_debug.o
#LFLAGS = -lm -lvga -pg
LFLAGS = -lm -lvga
......
......@@ -89,14 +89,6 @@ typedef byte ScanCode;
#define key_Tab 0x09
#define key_Delete 0x7f
// Stuff for the mouse
#define MReset 0
#define MButtons 3
#define MDelta 11
#define MouseInt 0x33
#define Mouse(x) _AX = x,geninterrupt(MouseInt)
typedef enum {
ctrl_Keyboard,
ctrl_Joystick,
......
// WL_TEXT.C
/* wl_text.c */
#include "WL_DEF.H"
#pragma hdrstop
#include "wl_def.h"
/*
=============================================================================
......@@ -351,28 +350,28 @@ void HandleCtrls (void)
void HandleWord (void)
{
char word[WORDLIMIT];
int i,wordindex;
unsigned wwidth,wheight,newpos;
char words[WORDLIMIT];
int i, wordindex;
word wwidth,wheight,newpos;
//
// copy the next word into [word]
// copy the next word into words[]
//
word[0] = *text++;
words[0] = *text++;
wordindex = 1;
while (*text>32)
{
word[wordindex] = *text++;
words[wordindex] = *text++;
if (++wordindex == WORDLIMIT)
Quit ("PageLayout: Word limit exceeded");
}
word[wordindex] = 0; // stick a null at end for C
words[wordindex] = 0; // stick a null at end for C
//
// see if it fits on this line
//
VW_MeasurePropString (word,&wwidth,&wheight);
VW_MeasurePropString (words, &wwidth, &wheight);
while (px+wwidth > rightmargin[rowon])
{
......@@ -385,7 +384,7 @@ void HandleWord (void)
// print it
//
newpos = px+wwidth;
VWB_DrawPropString (word);
VWB_DrawPropString (words);
px = newpos;
//
......@@ -796,8 +795,6 @@ void EndText (void)
SETFONTCOLOR(0,15);
IN_ClearKeysDown();
if (MousePresent)
Mouse(MDelta); // Clear accumulated mouse movement
FreeMusic ();
CA_DownLevel ();
......@@ -816,8 +813,6 @@ void EndText (void)
VW_FadeOut();
SETFONTCOLOR(0,15);
IN_ClearKeysDown();
if (MousePresent)
Mouse(MDelta); // Clear accumulated mouse movement
FreeMusic ();
CA_DownLevel ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment