mirror of
https://github.com/libretro/scummvm.git
synced 2025-05-13 09:36:21 +00:00
AVALANCHE: Add Enhanced.
This commit is contained in:
parent
a267dc3025
commit
11efe29da8
59
engines/avalanche/enhanced2.cpp
Normal file
59
engines/avalanche/enhanced2.cpp
Normal file
@ -0,0 +1,59 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
|
||||
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
|
||||
*/
|
||||
|
||||
#include "avalanche/enhanced2.h"
|
||||
#include "common/system.h"
|
||||
#include "common/textconsole.h"
|
||||
|
||||
namespace Avalanche {
|
||||
|
||||
namespace Enhanced {
|
||||
|
||||
bool isenh() {
|
||||
warning("STUB: Enhanced::isenh()");
|
||||
}
|
||||
|
||||
void readkeye() {
|
||||
warning("STUB: Enhanced::readkeye()");
|
||||
}
|
||||
|
||||
bool keypressede() {
|
||||
/*
|
||||
function fancystuff:boolean;
|
||||
inline( $B4/ $11/ { MOV AH,11 }
|
||||
$CD/ $16/ { INT 16 }
|
||||
$B8/ $00/ $00/ { MOV AX, 0000 }
|
||||
$74/ $01/ { JZ 0112 (or wherever- the next byte after $40, anyway) }
|
||||
$40); { INC AX }
|
||||
*/
|
||||
|
||||
warning("STUB: Enhanced::keypressede()");
|
||||
}
|
||||
|
||||
} // End of namespace Enhanced
|
||||
|
||||
} // End of namespace Avalanche
|
53
engines/avalanche/enhanced2.h
Normal file
53
engines/avalanche/enhanced2.h
Normal file
@ -0,0 +1,53 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
|
||||
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// Not sure if this unit will be used at all in the end...
|
||||
|
||||
#ifndef ENHANCED2_H
|
||||
#define ENHANCED2_H
|
||||
|
||||
#include "common/system.h"
|
||||
|
||||
namespace Avalanche {
|
||||
|
||||
namespace Enhanced {
|
||||
|
||||
byte shiftstate; /*ABSOLUTE $40:$17;*/
|
||||
bool atbios;
|
||||
char inchar, extd;
|
||||
|
||||
void readkeye();
|
||||
|
||||
bool keypressede();
|
||||
|
||||
} // End of namespace Enhanced
|
||||
|
||||
} // End of namespace Avalanche
|
||||
|
||||
#endif // ENHANCED2_H
|
@ -324,8 +324,6 @@ namespace Avalanche {
|
||||
else on();
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // End of namespace Gyro
|
||||
|
||||
} // End of namespace Avalanche
|
||||
|
@ -27,10 +27,10 @@
|
||||
|
||||
#include "avalanche/scrolls2.h"
|
||||
#include "avalanche/gyro2.h"
|
||||
#include "avalanche/logger2.h"
|
||||
//#include "lucerna.h"
|
||||
//#include "trip5.h"
|
||||
//#include "enhanced.h"
|
||||
//#include "logger.h"
|
||||
//#include "Acci.h"
|
||||
//#include "basher.h"
|
||||
//#include "visa.h"
|
||||
@ -126,12 +126,130 @@ namespace Avalanche {
|
||||
x = x / 8;
|
||||
lz = z.size();
|
||||
ox = 0;
|
||||
// log_scrollline(); Needs Logger to work.
|
||||
Logger::log_scrollline();
|
||||
|
||||
warning("STUB: Scrolls::say()");
|
||||
for (xx = 1; xx <= lz; xx ++) {
|
||||
switch (z[xx]) {
|
||||
case '\22': {
|
||||
cfont = roman;
|
||||
Logger::log_roman();
|
||||
}
|
||||
break;
|
||||
case '\6': {
|
||||
cfont = italic;
|
||||
Logger::log_italic();
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
ox += 1;
|
||||
for (yy = 1; yy <= 12; yy ++) itw[yy][ox] = ~ ch[cfont][z[xx]][yy + 1];
|
||||
Logger::log_scrollchar(z[xx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lz = ox;
|
||||
if (offset) {
|
||||
/* offsetting routine */
|
||||
lz += 1;
|
||||
for (yy = 1; yy <= 12; yy ++) {
|
||||
bit = 240;
|
||||
itw[yy][lz] = 255;
|
||||
for (xx = 1; xx <= lz; xx ++) {
|
||||
t = itw[yy][xx];
|
||||
itw[yy][xx] = bit + t / 16;
|
||||
bit = t << 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
yp = x + y * 80 + (1 - Gyro::cp) * Gyro::pagetop;
|
||||
for (yy = 1; yy <= 12; yy ++) {
|
||||
yp += 80;
|
||||
for (bit = 0; bit <= locol; bit ++) {
|
||||
/*port[0x3c4] = 2;
|
||||
port[0x3ce] = 4;
|
||||
port[0x3c5] = 1 << bit;
|
||||
port[0x3cf] = bit;
|
||||
move(itw[yy], mem[0xa000 * yp], lz);
|
||||
|
||||
Some old Pascal-ish. To be removed. */
|
||||
|
||||
warning("STUB: Scrolls::say()");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Here are the procedures that Scroll calls */ /* So they must be... */ /*$F+*/
|
||||
|
||||
void normscroll() {
|
||||
warning("STUB: Scrolls::normscroll()");
|
||||
}
|
||||
|
||||
void dialogue() {
|
||||
warning("STUB: Scrolls::dialogue()");
|
||||
}
|
||||
|
||||
void music_scroll();
|
||||
|
||||
|
||||
static void store_(byte what, Gyro::tunetype &played) {
|
||||
memcpy(played, played+1, sizeof(played) - 1);
|
||||
played[30] = what;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static bool they_match(Gyro::tunetype &played) {
|
||||
byte fv, mistakes;
|
||||
|
||||
bool they_match_result;
|
||||
mistakes = 0;
|
||||
|
||||
for (fv = 1; fv <= sizeof(played); fv ++)
|
||||
if (played[fv] != Gyro::tune[fv]) {
|
||||
mistakes++;
|
||||
}
|
||||
|
||||
they_match_result = mistakes < 5;
|
||||
return they_match_result;
|
||||
}
|
||||
|
||||
void music_scroll() {
|
||||
char r;
|
||||
byte value;
|
||||
|
||||
byte last_one, this_one;
|
||||
|
||||
Gyro::tunetype played;
|
||||
|
||||
|
||||
state(3);
|
||||
Gyro::seescroll = true;
|
||||
Gyro::on();
|
||||
Gyro::newpointer(4);
|
||||
//do {
|
||||
// do {
|
||||
// Gyro::check(); /* was "checkclick;" */
|
||||
// if (keypressede()) break;
|
||||
// } while (!(mpress > 0) || buttona1() || buttonb1());
|
||||
//
|
||||
// Needs Enhanced (conatins keypressede()) to proceed.
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user