#include <string.h>
#include <unistd.h>
-// font handling
-
-/*
-struct sfontstruct {
- int refcount;
- void (*destroy)(SFONT *);
- int (*height)(SFONT *);
- int (*ascent)(SFONT *);
- int (*descent)(SFONT *);
- int (*minchar)(SFONT *);
- int (*maxchar)(SFONT *);
- int (*hasglyph)(SFONT *,int,int);
- SF_glyph *(*getglyph)(SFONT *,int,int);
- };
-*/
+/* font handling */
typedef struct {
int refcount;
if (!hasenc)
ERRET(-10)
sscanf(p, "%d %d", wh, wh + 1);
-/* printf("c%d %d\n",k,((wh[0]+7)/8)*wh[1] + sizeof(SF_glyph)); */
if (k <= MAXCHAR) {
totb +=
((wh[0] + 7) / 8) * wh[1] +
hasenc = 0;
}
}
-//printf("nchars=%d minch=%d maxch=%d\n",nchars,minch,maxch);
-//printf("sizeof(SF_glyph)=%d\n",sizeof(SF_glyph));
-// printf("<%s>\n",fontname);
-// printf("<%s>\n",copyright);
-// printf("dc%d a%d d%d %d..%d exp%d read%d totb%d\n",
-// defchar,ascent,descent,minch,maxch,nchars,i,totb);
if (ascent < 0 || descent < 0 || nchars != i)
ERRET(-2)
-// errorexit(99,"??? dc%d a%d d%d %d..%d exp%d read%d\n",
-// defchar,ascent,descent,minch,maxch,nchars,k);
if (defchar < minch || defchar > maxch) {
-// printf("WARNING: defchar=%d, set to",defchar);
if (defchar < minch)
defchar = minch;
if (defchar > maxch)
defchar = maxch;
-// printf(" %d\n",defchar);
}
-// nchars = i;
totb +=
(maxch - minch + 1) * sizeof(int) + sizeof(SF_bdffont) +
strlen(fontname) + strlen(copyright) + 2;
-// printf("totb %d\n",totb);
font = calloc(1, totb);
if (!font)
- ERRET(-3) // errorexit(99,"malloc()\n");
-//printf("allocated: %p-%p\n",font,((byte *)font)+totb);
-// memmove(&(font->magic[0]),"gBDX",4);
+ ERRET(-3)
font->minchar = minch;
font->maxchar = maxch;
font->defchar = defchar;
for (;;) {
fgets(s, 1024, f);
if (feof(f))
- ERRET(-81) /* errorexit(99,"unexpected EOF c=%d\n",i); */
+ ERRET(-81)
if ((p = starts(s, "ENCODING "))) {
i = atoi(p);
i &= 0xffff;
bg->xof = wh[2];
bg->yof = wh[3];
po = (byte *) (&(bg->bitmap[0]));
-//printf("k=%d ch=%d delta=%d\n",k,i,po-(byte *)bg);
for (j = 0; j < h; j++) {
fgets(s, 1024, f);
if (feof(f))
- ERRET(-91) // errorexit(99,"unexpected EOF c=%d (B)\n",i);
+ ERRET(-91)
gethex(s, po, w);
po += w;
}
}
-//printf("used %d nextpo %p\n",po-pbeg-font->glyphs[i-minch],po);
}
*err = 0;
*size = totb;
}
-// these are the 8 fonts needed
-// PROPORTIONAL FONT
-// ROMAN
-// ROMAN BOLD
-// ITALIC
-// ITALIC BOLD
-// FIXED FONT
-// ROMAN
-// ROMAN BOLD
-// ITALIC
-// ITALIC BOLD
-
+/*
+ * these are the 8 fonts needed
+ * PROPORTIONAL FONT
+ * ROMAN
+ * ROMAN BOLD
+ * ITALIC
+ * ITALIC BOLD
+ * FIXED FONT
+ * ROMAN
+ * ROMAN BOLD
+ * ITALIC
+ * ITALIC BOLD
+ */
#define NUMFONTS 9
static SFONT *myfonts[9] =
static void setfont(int zfont)
{
int k = styleidx(zfont, current.style);
-//printf("%d.",k);
current.font = myfonts[k];
-// if (k < 4) zfont = TEXT_FONT;
-// else zfont = FIXED_WIDTH_FONT;
current.zfontnum = zfont;
current.proportional = (k < 4);
}
*/
void os_set_font(int new_font)
{
-//printf("os_set_font(%d)\n",new_font);
sf_flushtext();
setfont(new_font);
}
SF_glyph *g;
setfont(current.zfontnum);
g = current.font->getglyph(current.font, c, 1);
-//printf("{%c}%d.%p/%p",c,current.zfontnum,current.font,g);
if (g) {
-//printf("[%c]\n",c); fflush(stdout);
sf_writeglyph(g);
m_exitPause = true;
}
void os_set_cursor(int row, int col)
{
sf_flushtext();
-// theWnd->ResetOverhang();
current.cx = col - 1;
current.cy = row - 1;
}
SFONT *Norm, *Emph = NULL, *Bold = NULL, *Bemp = NULL;
norm = SF_defaultfont;
-//dumpfont(norm);
sf_VGA_SFONT = Norm = makefont(norm);
if (!Norm)
os_fatal("malloc() failure in initfonts()");
Norm->destroy = destroySFonly;
- // get size of default font
+ /* get size of default font */
size = SF_defaultfontsize;
- // copy norm to emphasized
+ /* copy norm to emphasized */
emph = malloc(size);
if (!emph)
os_fatal("malloc() failure in initfonts()");
if (!Emph)
os_fatal("malloc() failure in initfonts()");
memmove(emph, norm, size);
- // emphasize (underline)...
+ /* emphasize (underline)... */
cfont = (byte *) emph;
for (i = norm->minchar; i <= norm->maxchar; i++) {
int m = norm->glyphs[i - norm->minchar];
bmp = (byte *) (&(g->bitmap[0]));
bmp[g->h - 2] = 0xff;
}
- // make a copy for bold
+ /* make a copy for bold */
bold = malloc(size);
if (!bold)
os_fatal("malloc() failure in initfonts()");
if (!Bold)
os_fatal("malloc() failure in initfonts()");
memmove(bold, norm, size);
- // boldify...
+ /* boldify... */
cfont = (byte *) bold;
for (i = norm->minchar; i <= norm->maxchar; i++) {
int h, m = norm->glyphs[i - norm->minchar];
myfonts[3] = myfonts[7] = Bemp;
bemp->refcount = 2;
-// for (i=0;i<8;i++) myfonts[i] = SF_defaultfont;
-// SF_defaultfont->refcount = 9;
-
CLEANREG(cleanfonts);
if (!m_vga_fonts) {
else
myfonts[8] = SF_font3double;
}
-//for (i=0;i<8;i++){ SFONT *s = myfonts[i]; printf("%d %p %d %d %d %d %d\n",
-//i,s,s->minchar(s),s->maxchar(s),s->ascent(s),s->descent(s),s->height(s));}
}
plen = strlen(buf);
strncpy(buf + plen, fn, fnlen);
buf[plen + fnlen] = 0;
-//printf("try[%s]\n",buf);
if (access(buf, F_OK) == 0)
return buf;
if (p)
int ox, oy, ow, oh;
int wtext, htext;
os_font_data(0, &htext, &wtext);
-//printf("W %p [%s]\n",s,s ? s : "??");
if (!s)
return;
if (!s[0])
return;
sf_getclip(&ox, &oy, &ow, &oh);
sf_setclip(x, y, w, htext);
-//printf("1\n");
if (center) {
#ifdef USE_UTF8
int wt = wtext * utf8_len(s);
#endif
x += (w - wt) / 2;
}
-//printf("2 ts %p\n",ts); fflush(stdout); if (ts < 1000){sf_flushdisplay(); getchar();}
ts->cx = x;
ts->cy = y;
ts->fore = color;
-//printf("3\n"); fflush(stdout);
#ifndef USE_UTF8
while (*s)
sf_writeglyph(ts->font->
sf_writeglyph(ts->font->getglyph(ts->font, ch, 1));
}
#endif
-//printf("4\n");
sf_setclip(ox, oy, ow, oh);
-//printf("5\n");
}
zword c = 0;
int wtext, htext, buttw;
- // allow system-specific dialog if not fullscreen
+ /* Allow system-specific dialog if not fullscreen */
if (isfull == 0)
if (sf_sysdialog)
return sf_sysdialog(existing, def, filt, tit, res);
if (!ts)
return SF_NOTIMP;
-//printf("0 ts %p (%p)\n",ts,&ts);
-
if (!def)
def = "";
strcpy(filename, def);
X = (ew - W) / 2;
Y = (eh - H) / 2;
- // internal!!
+ /* Internal!! */
xdlg = X + SPC + 2 * BFRAME;
ydlg = Y + 2 * SPC + 4 * BFRAME + htext + htext;
if (!saved)
return SF_NOTIMP;
-//printf("saved: %p %d %d %d %d\n",saved,saved[0],saved[1],saved[2],saved[3]);
sf_pushtextsettings();
#ifndef USE_UTF8
ts->font = sf_VGA_SFONT;
ts->backTransparent = 1;
sf_fillrect(O_GRAY2, X, Y, W, H);
-// frame_upframe(X,Y,W,H);
sf_rect(FRAMECOLOR, X, Y, W, H);
sf_rect(FRAMECOLOR, X + 1, Y + 1, W - 2, H - 2);
sf_fillrect(FRAMECOLOR, X, Y + 2, W, htext);
cleanlist(curdir);
curdir = NULL;
-//printf("2saved: %p %d %d %d %d\n",saved,saved[0],saved[1],saved[2],saved[3]);
sf_restoreareaandfree(saved);
if (c == ZC_ESCAPE)
return SF_NOTIMP;
}
+
void sf_setdialog(void)
{
sf_osdialog = myosdialog;
#endif
#include <unistd.h>
#include <dirent.h>
-//#include <fnmatch.h>
#include <sys/stat.h>
struct stat fst;
int n;
-//printf("\ndodir\n");
if (!resolvedir(dirname, resdir, size))
return NULL;
resdend = resdir + strlen(resdir);
-//printf("[%s]\n",resdir);
- // MinGW opendir() does not like the final slash
#ifdef WIN32
n = strlen(resdir);
if (n > 2 && (resdir[n - 2] != ':'))
if (!dir)
return NULL;
-//printf("opened [%s]\n",resdir);
for (;;) {
d = readdir(dir);
if (!d)
if (strcmp(p, "..") == 0)
continue;
strcpy(resdend, p);
-//printf("-%s\n",resdir);
if (stat(resdir, &fst))
continue;
-//printf("--mode %x\n",fst.st_mode);
if (S_ISDIR(fst.st_mode))
addentry(p, &dirs);
else {
-//printf("--fnmatch: %d\n",fnmatch(pattern,p,0));
if (myfnmatch(pattern, p, 0) == 0)
addentry(p, &files);
}
#include <stdlib.h>
#include <string.h>
-// for access()
+/* for access() */
#include <unistd.h>
#include <stdarg.h>
zword hx_fore_colour;
zword hx_back_colour;
-// various data
-
+/* various data */
bool m_tandy = 0;
-// CRect m_wndSize;
-// CString m_propFontName;
-// CString m_fixedFontName;
-// int m_fontSize;
int m_v6scale;
int m_gfxScale = 1;
ulong m_defaultFore;
bool m_exitPause = 0;
bool m_lineInput = 0;
bool m_IsInfocomV6 = false;
-// bool m_fastScroll;
bool m_morePrompts = 1;
-// int m_leftMargin;
-// int m_rightMargin;
-// FILE* m_blorbFile;
-// bb_map_t* m_blorbMap;
-// GameInfo m_gameInfo;
bool m_localfiles = false;
char *m_fontdir = NULL;
bool m_aafonts = 0;
bb_resolution_t *reso;
reso = bb_get_resolution(bmap);
if (reso) {
-//printf("get_resolution: %dx%d\n",reso->px,reso->py);
- // ignore small resolution hints
+ /* ignore small resolution hints */
if ((reso->px) && (reso->px >= AcWidth))
AcWidth = reso->px;
if ((reso->py) && (reso->py >= AcHeight))
}
-// must be called as soon as possible (i.e. by os_process_arguments())
+/* must be called as soon as possible (i.e. by os_process_arguments()) */
static int load_resources(char *givenfn)
{
-
char buf[FILENAME_MAX + 1], *p;
int st;
FILE *f;
CLEANREG(sf_cleanup_resources);
- // first check whether file exists
+ /* first check whether file exists */
st = checkfile(givenfn, buf);
if (st)
os_fatal("File not found");
- // check whether it is a story file
+ /* check whether it is a story file */
f = fopen(buf, "rb");
if (!f)
os_fatal("File open failed");
fread(hd2, 1, 2, f);
- // blorb file ?
+ /* blorb file ? */
if (hd2[0] == 'F' && hd2[1] == 'O') {
bb_result_t result;
fclose(f);
if (tryloadblorb(buf))
os_fatal("File is neither Zcode nor Blorb");
- // Look for an executable chunk
+ /* Look for an executable chunk */
if (bb_load_resource
(bmap, bb_method_FilePos, &result, bb_ID_Exec, 0)
== bb_err_None) {
unsigned int id = bmap->chunks[result.chunknum].type;
if (id == bb_ID_ZCOD) {
- // If this is a Z-code game, set the file pointer and return
+ /* If this is a Z-code game,
+ * set the file pointer and return */
zoffset = result.data.startpos;
zsize = result.length;
zcodeinblorb = 1;
os_fatal(sf_msgstring(IDS_BLORB_GLULX));
}
}
- // we are given a blorb file with no executable chunck
- // Tell the user that there was no game in the Blorb file
+ /* we are given a blorb file with no executable chunck
+ * Tell the user that there was no game in the Blorb file */
os_fatal(sf_msgstring(IDS_BLORB_NOEXEC));
}
- // check if possibly Zcode
+ /* check if possibly Zcode */
if (hd2[0] < 1 || hd2[0] > 8)
os_fatal("Not a Zcode file (or wrong version)");
- // OK, assume a bona fide Z code file
+ /* OK, assume a bona fide Z code file */
zfile = f;
fseek(f, 0, SEEK_END);
zsize = ftell(f);
zoffset = 0;
- // See if the user explicitly provided a blorb file
+ /* See if the user explicitly provided a blorb file */
if (f_setup.blorb_file != NULL) {
tryloadblorb(f_setup.blorb_file);
} else {
- // No? Let's see if we can find one.
+ /* No? Let's see if we can find one. */
p = malloc(strlen(f_setup.story_name) +
strlen(EXT_BLORB4) * sizeof(char));
strncpy(p, f_setup.story_name, strlen(f_setup.story_name) + 1);
static void load_local_resources();
-// must be called as soon as possible (i.e. by os_process_arguments())
+/* must be called as soon as possible (i.e. by os_process_arguments()) */
int sf_load_resources(char *givenfn)
{
int st;
}
-// this routine is only used for the Z code, so we can safely
-// ignore its args
-// NOTE that there is an extra argument (as in WindowsFrotz version)
+/* this routine is only used for the Z code, so we can safely
+ * ignore its args
+ * NOTE that there is an extra argument (as in WindowsFrotz version)
+ */
FILE *os_path_open(const char *name, const char *mode, long *size)
{
-
FILE *f = NULL;
*size = zsize;
}
}
}
-
*height = 0;
*width = 0;
return 0;
* Return an appropriate random seed value in the range from 0 to
* 32767, possibly by using the current system time.
*
+ * this is a provisional workaround (time granularity is at best 1s)
*/
-// this is a provisional workaround (time granularity is at best 1s)
#include <time.h>
int os_random_seed(void)
{
-// return ::GetTickCount() & 32767;
if (m_random_seed == -1) {
return ((int)(time(NULL))) & 32767;
}
return m_random_seed;
}
-// The following assumes Unicode
-
+/* The following assumes Unicode */
/*
* os_scrollback_char
*
*/
void os_scrollback_char(zword c)
{
-// theApp.ScrollbackChar(c);
if (option_scrollback_buffer == 0)
return;
if (c == 13)
c = 10;
- if (option_scrollback_buffer == 1) // latin-1
- {
+ if (option_scrollback_buffer == 1) { /* Latin-1 */
if (c > 255)
c = '?';
putchar(c);
- } else { // UTF8
+ } else { /* UTF8 */
if (c < 0x80)
putchar(c);
else {
if (option_scrollback_buffer)
while (erase--)
putchar(8);
-// theApp.ScrollbackRemove(erase);
}
*/
void os_restart_game(int stage)
{
- // Show Beyond Zork's title screen
+ /* Show Beyond Zork's title screen */
if ((stage == RESTART_END) && (story_id == BEYOND_ZORK)) {
int w, h;
if (os_picture_data(1, &h, &w)) {
sf_setgamma(m_gamma);
- // Standard Z-Machine colours
- m_colours[0] = RGB5ToTrue(0x0000); // black
- m_colours[1] = RGB5ToTrue(0x001D); // red
- m_colours[2] = RGB5ToTrue(0x0340); // green
- m_colours[3] = RGB5ToTrue(0x03BD); // yellow
- m_colours[4] = RGB5ToTrue(0x59A0); // blue
- m_colours[5] = RGB5ToTrue(0x7C1F); // magenta
- m_colours[6] = RGB5ToTrue(0x77A0); // cyan
- m_colours[7] = RGB5ToTrue(0x7FFF); // white
- m_colours[8] = RGB5ToTrue(0x5AD6); // light grey
- m_colours[9] = RGB5ToTrue(0x4631); // medium grey
- m_colours[10] = RGB5ToTrue(0x2D6B); // dark grey
+ /* Standard Z-Machine colours */
+ m_colours[0] = RGB5ToTrue(0x0000); /* black */
+ m_colours[1] = RGB5ToTrue(0x001D); /* red */
+ m_colours[2] = RGB5ToTrue(0x0340); /* green */
+ m_colours[3] = RGB5ToTrue(0x03BD); /* yellow */
+ m_colours[4] = RGB5ToTrue(0x59A0); /* blue */
+ m_colours[5] = RGB5ToTrue(0x7C1F); /* magenta */
+ m_colours[6] = RGB5ToTrue(0x77A0); /* cyan */
+ m_colours[7] = RGB5ToTrue(0x7FFF); /* white */
+ m_colours[8] = RGB5ToTrue(0x5AD6); /* light grey */
+ m_colours[9] = RGB5ToTrue(0x4631); /* medium grey */
+ m_colours[10] = RGB5ToTrue(0x2D6B); /* dark grey */
for (i = 0; i < NON_STD_COLS; i++)
m_nonStdColours[i] = 0xFFFFFFFF;
}
-// Read in settings
+/* Read in settings */
void sf_readsettings(void)
{
char *p;
ResPict = sf_GetProfileString("Resources", "Pict", ResPict);
ResSnd = sf_GetProfileString("Resources", "Snd", ResSnd);
-//printf("sf_readsettings\n");
- if (f_setup.interpreter_number == 0)
+ if (f_setup.interpreter_number == 0) {
h_interpreter_number =
sf_GetProfileInt("Interpreter", "Number", INTERP_AMIGA);
- else
+ } else
h_interpreter_number = f_setup.interpreter_number;
f_setup.err_report_mode =
AcHeight = sf_GetProfileInt("Window", "AcHeight", AcHeight);
m_frequency = sf_GetProfileInt("Audio", "Frequency", m_frequency);
-
-// m_filename = sf_GetProfileString("Files","Initial Game","");
-// m_register = sf_GetProfileInt("Files","Register File Types",0) ? true : false;
-
-/* m_wndSize.left = sf_GetProfileInt("Window","Left",0);
- m_wndSize.top = sf_GetProfileInt("Window","Top",0);
- m_wndSize.right = sf_GetProfileInt("Window","Right",0);
- m_wndSize.bottom = sf_GetProfileInt("Window","Bottom",0);
- m_wndState = sf_GetProfileInt("Window","State",SW_SHOWNORMAL);
-
- m_toolBar = sf_GetProfileInt("Window","Toolbar",1) ? true : false;
- m_statusBar = sf_GetProfileInt("Window","Status Bar",1) ? true : false;
- m_notifyFull = sf_GetProfileInt("Window","Notify Full Screen",1) ? true : false;
-
- m_propFontName = sf_GetProfileString("Display","Proportional Font Name",
- GetDefaultFont());
- m_fixedFontName = sf_GetProfileString("Display","Fixed Font Name",
- "Courier New");
- m_fontSize = sf_GetProfileInt("Display","Font Size",10);*/
-
m_v6scale = sf_GetProfileInt("Display", "Infocom V6 Scaling", 2);
m_gfxScale = 1;
m_defaultFore = (sf_GetProfileInt("Display", "Foreground", 0xffffff));
m_defaultBack = (sf_GetProfileInt("Display", "Background", 0x800000));
-//printf("mdff%d mdfb%d\n",m_defaultFore,m_defaultBack);
-// m_fastScroll = sf_GetProfileInt("Display","Fast Scrolling",0) ? true : false;
m_morePrompts =
sf_GetProfileInt("Display", "Show More Prompts", 1) ? true : false;
-// m_leftMargin = sf_GetProfileInt("Display","Left Margin",0);
-// m_rightMargin = sf_GetProfileInt("Display","Right Margin",0);
m_gamma = sf_GetProfileDouble("Display", "Gamma", DEFAULT_GAMMA);
sf_initcolours();
sf_FinishProfile();
-
}
-// Get a colour
+/* Get a colour */
ulong sf_GetColour(int colour)
{
- // Standard colours
+ /* Standard colours */
if ((colour >= BLACK_COLOUR) && (colour <= DARKGREY_COLOUR))
return m_colours[colour - BLACK_COLOUR];
- // Default colours
+ /* Default colours */
if (colour == 16)
return m_defaultFore;
if (colour == 17)
return m_defaultBack;
- // Non standard colours
+ /* Non standard colours */
if ((colour >= 18) && (colour < 256)) {
if (m_nonStdColours[colour - 18] != 0xFFFFFFFF)
return m_nonStdColours[colour - 18];
}
-// Get a default colour
+/* Get a default colour */
ulong sf_GetDefaultColour(bool fore)
{
if (m_IsInfocomV6)
}
-// Get an index for a non-standard colour
+/* Get an index for a non-standard colour */
int sf_GetColourIndex(ulong colour)
{
int i, index = -1;
- // Is this a standard colour?
+ /* Is this a standard colour? */
for (i = 0; i < 11; i++) {
if (m_colours[i] == colour)
return i + BLACK_COLOUR;
}
- // Is this a default colour?
+ /* Is this a default colour? */
if (m_defaultFore == colour)
return 16;
if (m_defaultBack == colour)
return 17;
- // Is this colour already in the table?
+ /* Is this colour already in the table? */
for (i = 0; i < NON_STD_COLS; i++) {
if (m_nonStdColours[i] == colour)
return i + 18;
}
- // Find a free colour index
+ /* Find a free colour index */
while (index == -1) {
if (colour_in_use(m_nonStdIndex + 18) == 0) {
m_nonStdColours[m_nonStdIndex] = colour;
{
SF_textsetting *ts = sf_curtextsetting();
sf_flushtext();
-// theWnd->ResetOverhang();
-//printf("os_set_colour %d %d\n",new_foreground,new_background);
if (new_foreground == 1)
ts->fore = sf_GetDefaultColour(true);
else if (new_foreground < 256)
ts->back = sf_GetColour(new_background);
ts->backDefault = (new_background == 1);
ts->backTransparent = (new_background == 15);
-
-//printf("os_set_colour %d %d %x %x\n",new_foreground,new_background,ts->fore,ts->back);
-// theWnd->ApplyTextSettings();
}
sf_initvideo(AcWidth, AcHeight, (m_fullscreen != -1));
- // Set the graphics scaling
+ /* Set the graphics scaling */
if (sf_IsInfocomV6() || (story_id == BEYOND_ZORK))
m_gfxScale = m_v6scale;
else
m_gfxScale = 1;
- // Set the configuration
+ /* Set the configuration */
if (h_version == V3) {
h_config |= CONFIG_SPLITSCREEN;
h_config |= CONFIG_PROPORTIONAL;
os_set_font(FIXED_WIDTH_FONT);
os_set_text_style(0);
-/* theWnd->ApplyTextSettings(
- FrotzWnd::TextSettings(0,FIXED_WIDTH_FONT));*/
{
int H, W;
os_font_data(FIXED_WIDTH_FONT, &H, &W);
h_screen_cols = (zbyte) (h_screen_width / h_font_width);
h_screen_rows = (zbyte) (h_screen_height / h_font_height);
- // Check for sound
+ /* Check for sound */
if ((h_version == V3) && (h_flags & OLD_SOUND_FLAG)) {
if (((bmap == NULL) && (m_localfiles == 0))
|| (!sf_initsound()))
if (h_version == V6)
mask |= TRANSPARENT_FLAG;
- // Mask out any unsupported bits in the extended flags
+ /* Mask out any unsupported bits in the extended flags */
hx_flags &= mask;
hx_fore_colour = TrueToRGB5(sf_GetDefaultColour(true));
void os_fatal(const char *s, ...)
{
va_list m;
-// if (theWnd != NULL)
-// theWnd->FlushDisplay();
fprintf(stderr, "\n%s: ", sf_msgstring(IDS_FATAL));
va_start(m, s);
}
sf_cleanup_all();
exit(EXIT_FAILURE);
-
-// ::MessageBox(AfxGetMainWnd()->GetSafeHwnd(),s,CResString(IDS_FATAL),MB_ICONERROR|MB_OK);
-// throw FrotzApp::AbortFrotz();
}
-// If true, running one of Infocom's V6 games
+/* If true, running one of Infocom's V6 games */
bool sf_IsInfocomV6()
{
switch (story_id) {
}
-// If true, this picture has an adaptive palette
+/* If true, this picture has an adaptive palette */
bool sf_IsAdaptive(int picture)
{
bb_result_t result;
usage = bb_ID_Pict;
else
usage = bb_ID_Snd;
- //XXX Should use bb_load_resource_{pict,snd} with auxdata?
+ /* XXX Should use bb_load_resource_{pict,snd} with auxdata? */
st = bb_load_resource(bmap, method, (bb_result_t *) res, usage, num);
if (st == bb_err_None) {
res->type = bmap->chunks[res->bbres.chunknum].type;
return st;
}
-/////////////////
+/***************/
typedef struct {
void *next;