CHEWY: Move main.cpp globals to Globals
This commit is contained in:
parent
b220b5cd37
commit
c5d0e15fd8
56 changed files with 880 additions and 912 deletions
|
@ -93,7 +93,7 @@ atdsys::atdsys() {
|
|||
_ssi[i] = init_ssi;
|
||||
_invBlockNr = -1;
|
||||
_invUseMem = nullptr;
|
||||
_inzeig = in->get_in_zeiger();
|
||||
_inzeig = _G(in)->get_in_zeiger();
|
||||
}
|
||||
|
||||
atdsys::~atdsys() {
|
||||
|
@ -313,14 +313,14 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
|
|||
Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(handle);
|
||||
ChunkHead Ch;
|
||||
char *tmp_adr = atds_adr(fname_, chunk_start, chunk_anz);
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
if (rs) {
|
||||
_atdshandle[mode] = rs;
|
||||
_atdsmem[mode] = tmp_adr;
|
||||
_atdspooloff[mode] = chunk_start;
|
||||
switch (mode) {
|
||||
case INV_USE_DATEI:
|
||||
mem->file->select_pool_item(rs, _atdspooloff[mode]);
|
||||
_G(mem)->file->select_pool_item(rs, _atdspooloff[mode]);
|
||||
rs->seek(-ChunkHead::SIZE(), SEEK_CUR);
|
||||
|
||||
if (!Ch.load(rs)) {
|
||||
|
@ -329,7 +329,7 @@ void atdsys::set_handle(const char *fname_, int16 mode, Stream *handle, int16 ch
|
|||
free(_invUseMem);
|
||||
_invUseMem = (char *)MALLOC(Ch.size + 3l);
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
if (Ch.size) {
|
||||
if (!rs->read(_invUseMem, Ch.size)) {
|
||||
error("Error reading from %s", fname_);
|
||||
|
@ -354,7 +354,7 @@ void atdsys::open_handle(const char *fname_, const char *fmode, int16 mode) {
|
|||
|
||||
if (mode != INV_IDX_DATEI)
|
||||
tmp_adr = atds_adr(fname_, 0, 20000);
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
Stream *stream = chewy_fopen(fname_, fmode);
|
||||
if (stream) {
|
||||
close_handle(mode);
|
||||
|
@ -397,7 +397,7 @@ void atdsys::close_handle(int16 mode) {
|
|||
|
||||
char *atdsys::atds_adr(const char *fname_, int16 chunk_start, int16 chunk_anz) {
|
||||
char *tmp_adr = nullptr;
|
||||
uint32 size = mem->file->get_poolsize(fname_, chunk_start, chunk_anz);
|
||||
uint32 size = _G(mem)->file->get_poolsize(fname_, chunk_start, chunk_anz);
|
||||
if (size) {
|
||||
tmp_adr = (char *)MALLOC(size + 3l);
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
|
|||
Common::SeekableReadStream *stream = dynamic_cast<Common::SeekableReadStream *>(_atdshandle[mode]);
|
||||
|
||||
if (stream && txt_adr) {
|
||||
mem->file->select_pool_item(stream, chunk_nr + _atdspooloff[mode]);
|
||||
_G(mem)->file->select_pool_item(stream, chunk_nr + _atdspooloff[mode]);
|
||||
stream->seek(-ChunkHead::SIZE(), SEEK_CUR);
|
||||
if (!Ch.load(stream)) {
|
||||
error("load_atds error");
|
||||
|
@ -434,7 +434,7 @@ void atdsys::load_atds(int16 chunk_nr, int16 mode) {
|
|||
void atdsys::save_ads_header(int16 dia_nr) {
|
||||
ChunkHead Ch;
|
||||
if (_atdshandle[ADH_HANDLE]) {
|
||||
mem->file->select_pool_item(_atdshandle[ADH_HANDLE], dia_nr);
|
||||
_G(mem)->file->select_pool_item(_atdshandle[ADH_HANDLE], dia_nr);
|
||||
Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(
|
||||
_atdshandle[ADH_HANDLE]);
|
||||
|
||||
|
@ -563,7 +563,7 @@ int16 atdsys::ats_get_status() {
|
|||
void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
|
||||
if (_atsv.Display) {
|
||||
if (_atdsv._eventsEnabled) {
|
||||
switch (in->get_switch_code()) {
|
||||
switch (_G(in)->get_switch_code()) {
|
||||
case ESC:
|
||||
case ENTER:
|
||||
case MAUS_LINKS:
|
||||
|
@ -587,8 +587,8 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
|
|||
|
||||
if (_atsv.SilentCount <= 0) {
|
||||
char *tmp_ptr = _atsv.Ptr;
|
||||
out->set_fontadr(_atdsv.Font);
|
||||
out->set_vorschub(_atdsv.Fvorx, 0);
|
||||
_G(out)->set_fontadr(_atdsv.Font);
|
||||
_G(out)->set_vorschub(_atdsv.Fvorx, 0);
|
||||
_atsSsi = _ssi[0];
|
||||
_atsSsi.Str = tmp_ptr;
|
||||
_atsSsi.Fvorx = _atdsv.Fvorx;
|
||||
|
@ -601,19 +601,19 @@ void atdsys::print_ats(int16 x, int16 y, int16 scrx, int16 scry) {
|
|||
_ssr = split_string(&tmp_ssi);
|
||||
|
||||
for (int16 i = 0; i < _ssr->Anz; i++) {
|
||||
out->printxy(_ssr->X[i],
|
||||
_G(out)->printxy(_ssr->X[i],
|
||||
_ssr->Y + (i * _atsSsi.FHoehe) + 1,
|
||||
0, 300, 0, _ssr->StrPtr[i]);
|
||||
out->printxy(_ssr->X[i],
|
||||
_G(out)->printxy(_ssr->X[i],
|
||||
_ssr->Y + (i * _atsSsi.FHoehe) - 1,
|
||||
0, 300, 0, _ssr->StrPtr[i]);
|
||||
out->printxy(_ssr->X[i] + 1,
|
||||
_G(out)->printxy(_ssr->X[i] + 1,
|
||||
_ssr->Y + (i * _atsSsi.FHoehe),
|
||||
0, 300, 0, _ssr->StrPtr[i]);
|
||||
out->printxy(_ssr->X[i] - 1,
|
||||
_G(out)->printxy(_ssr->X[i] - 1,
|
||||
_ssr->Y + (i * _atsSsi.FHoehe),
|
||||
0, 300, 0, _ssr->StrPtr[i]);
|
||||
out->printxy(_ssr->X[i],
|
||||
_G(out)->printxy(_ssr->X[i],
|
||||
_ssr->Y + (i * _atsSsi.FHoehe),
|
||||
_atsv.Color,
|
||||
300, 0, _ssr->StrPtr[i]);
|
||||
|
@ -904,7 +904,7 @@ void atdsys::stop_aad() {
|
|||
void atdsys::print_aad(int16 scrx, int16 scry) {
|
||||
if (_aadv.Dialog) {
|
||||
if (_atdsv._eventsEnabled) {
|
||||
switch (in->get_switch_code()) {
|
||||
switch (_G(in)->get_switch_code()) {
|
||||
case ESC:
|
||||
case ENTER:
|
||||
case MAUS_LINKS:
|
||||
|
@ -928,8 +928,8 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
|
|||
|
||||
if (_aadv.SilentCount <= 0) {
|
||||
char *tmp_ptr = _aadv.Ptr;
|
||||
out->set_fontadr(_atdsv.Font);
|
||||
out->set_vorschub(_atdsv.Fvorx, 0);
|
||||
_G(out)->set_fontadr(_atdsv.Font);
|
||||
_G(out)->set_vorschub(_atdsv.Fvorx, 0);
|
||||
_ssi[_aadv.StrHeader->AkPerson].Str = tmp_ptr;
|
||||
if (_aadv.Person[_aadv.StrHeader->AkPerson].X != -1) {
|
||||
_ssi[_aadv.StrHeader->AkPerson].X = _aadv.Person[_aadv.StrHeader->AkPerson].X - scrx;
|
||||
|
@ -949,19 +949,19 @@ void atdsys::print_aad(int16 scrx, int16 scry) {
|
|||
if (_atdsv.Display == DISPLAY_TXT ||
|
||||
(_aadv.StrHeader->VocNr - ATDS_VOC_OFFSET) == -1) {
|
||||
for (int16 i = 0; i < _ssr->Anz; i++) {
|
||||
out->printxy(_ssr->X[i] + 1,
|
||||
_G(out)->printxy(_ssr->X[i] + 1,
|
||||
_ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe),
|
||||
0, 300, 0, _ssr->StrPtr[i]);
|
||||
out->printxy(_ssr->X[i] - 1,
|
||||
_G(out)->printxy(_ssr->X[i] - 1,
|
||||
_ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe),
|
||||
0, 300, 0, _ssr->StrPtr[i]);
|
||||
out->printxy(_ssr->X[i],
|
||||
_G(out)->printxy(_ssr->X[i],
|
||||
_ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe) + 1,
|
||||
0, 300, 0, _ssr->StrPtr[i]);
|
||||
out->printxy(_ssr->X[i],
|
||||
_G(out)->printxy(_ssr->X[i],
|
||||
_ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe) - 1,
|
||||
0, 300, 0, _ssr->StrPtr[i]);
|
||||
out->printxy(_ssr->X[i],
|
||||
_G(out)->printxy(_ssr->X[i],
|
||||
_ssr->Y + (i * _ssi[_aadv.StrHeader->AkPerson].FHoehe),
|
||||
_aadv.Person[_aadv.StrHeader->AkPerson].Color,
|
||||
300, 0, _ssr->StrPtr[i]);
|
||||
|
@ -1096,7 +1096,7 @@ bool atdsys::ads_start(int16 dia_nr) {
|
|||
bool ret = false;
|
||||
|
||||
load_atds(dia_nr, ADS_DATEI);
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
bool ende = false;
|
||||
if (_atdsmem[ADS_HANDLE][0] == (char)BLOCKENDE &&
|
||||
_atdsmem[ADS_HANDLE][1] == (char)BLOCKENDE &&
|
||||
|
|
|
@ -191,7 +191,7 @@ void ChewyEngine::playVideo(uint num) {
|
|||
|
||||
g_system->getPaletteManager()->grabPalette(curPalette, 0, 256);
|
||||
//save_palette(curPalette);
|
||||
cur->hide_cur();
|
||||
_G(cur)->hide_cur();
|
||||
|
||||
cfoDecoder->start();
|
||||
|
||||
|
@ -222,7 +222,7 @@ void ChewyEngine::playVideo(uint num) {
|
|||
|
||||
g_system->getPaletteManager()->setPalette(curPalette, 0, 256);
|
||||
//setScummVMPalette(curPalette, 0, 256);
|
||||
cur->show_cur();
|
||||
_G(cur)->show_cur();
|
||||
|
||||
delete videoResource;
|
||||
delete cfoDecoder;
|
||||
|
|
|
@ -25,12 +25,10 @@
|
|||
#include "chewy/chewy.h"
|
||||
#include "chewy/defines.h"
|
||||
#include "chewy/file.h"
|
||||
#include "chewy/global.h"
|
||||
|
||||
namespace Chewy {
|
||||
|
||||
extern int16 modul;
|
||||
extern int16 fcode;
|
||||
|
||||
Data::Data() {
|
||||
}
|
||||
|
||||
|
@ -220,7 +218,7 @@ uint32 Data::get_poolsize(const char *fname, int16 chunk_start, int16 chunk_anz)
|
|||
select_pool_item(&f, chunk_start);
|
||||
f.seek(-ChunkHead::SIZE(), SEEK_CUR);
|
||||
|
||||
for (int16 i = chunk_start; (i < Nph.PoolAnz) && (!modul) && i < (chunk_start + chunk_anz); i++) {
|
||||
for (int16 i = chunk_start; (i < Nph.PoolAnz) && (!_G(modul)) && i < (chunk_start + chunk_anz); i++) {
|
||||
ChunkHead ch;
|
||||
if (!ch.load(&f)) {
|
||||
error("get_poolsize error");
|
||||
|
|
|
@ -585,7 +585,7 @@ enum SetupScreenMode {
|
|||
#define AUSGANG_RECHTS 2
|
||||
#define AUSGANG_OBEN 3
|
||||
#define AUSGANG_UNTEN 4
|
||||
#define WAIT_TASTE_LOS while (in->get_switch_code() != 0 \
|
||||
#define WAIT_TASTE_LOS while (_G(in)->get_switch_code() != 0 \
|
||||
&& !SHOULD_QUIT) { g_events->update(); }
|
||||
|
||||
#define FILEMENUE 1
|
||||
|
|
|
@ -206,10 +206,10 @@ void detail::load_rdi_taf(const char *fname_, int16 load_flag) {
|
|||
strcpy(_tafName, fname_);
|
||||
if (!load_flag) {
|
||||
_rdi.dptr = init_taf_tbl(fname_);
|
||||
if (!modul)
|
||||
if (!_G(modul))
|
||||
load_taf_tbl(_rdi.dptr);
|
||||
} else {
|
||||
_rdi.dptr = mem->taf_adr(fname_);
|
||||
_rdi.dptr = _G(mem)->taf_adr(fname_);
|
||||
_fullTaf = true;
|
||||
}
|
||||
} else {
|
||||
|
@ -413,7 +413,7 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
|
|||
if (end > MAXDETAILS)
|
||||
end = MAXDETAILS - 1;
|
||||
|
||||
for (int16 i = start; (i <= end) && (!modul); i++) {
|
||||
for (int16 i = start; (i <= end) && (!_G(modul)); i++) {
|
||||
ani_detail_info *adiptr = &_rdi.Ainfo[i];
|
||||
if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
|
||||
int16 sprnr = adiptr->ani_count;
|
||||
|
@ -426,10 +426,10 @@ void detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
|
|||
int16 y = adiptr->y + ky - scry;
|
||||
if (adiptr->load_flag == 1) {
|
||||
load_taf_ani_sprite(sprnr);
|
||||
if (!modul)
|
||||
out->scale_set(_tafLoadBuffer, x, y, zoomx, zoomy, 0);
|
||||
if (!_G(modul))
|
||||
_G(out)->scale_set(_tafLoadBuffer, x, y, zoomx, zoomy, 0);
|
||||
} else
|
||||
out->scale_set(_rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
|
||||
_G(out)->scale_set(_rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
|
||||
|
||||
Sound *sound = g_engine->_sound;
|
||||
|
||||
|
@ -505,7 +505,7 @@ void detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
|
|||
int16 x = _rdi.Sinfo[i].x - scrx;
|
||||
int16 y = _rdi.Sinfo[i].y - scry;
|
||||
byte *simage = _rdi.dptr->image[_rdi.Sinfo[i].SprNr];
|
||||
out->sprite_set(simage, x, y, 0);
|
||||
_G(out)->sprite_set(simage, x, y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -588,7 +588,7 @@ SprInfo detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
|
|||
_sprInfo.X1 = _sprInfo.X + Xy[0];
|
||||
_sprInfo.Y1 = _sprInfo.Y + Xy[1];
|
||||
if (mode)
|
||||
out->sprite_set(_sprInfo.Image, _sprInfo.X, _sprInfo.Y, 0);
|
||||
_G(out)->sprite_set(_sprInfo.Image, _sprInfo.X, _sprInfo.Y, 0);
|
||||
|
||||
Sound *sound = g_engine->_sound;
|
||||
|
||||
|
@ -675,7 +675,7 @@ void detail::clear_detail_sound(int16 nr) {
|
|||
void detail::disable_room_sound() {
|
||||
for (int16 i = 0; i < MAXDETAILS; i++)
|
||||
disable_detail_sound(i);
|
||||
sndPlayer->endSound();
|
||||
_G(sndPlayer)->endSound();
|
||||
}
|
||||
|
||||
void detail::enable_room_sound() {
|
||||
|
|
|
@ -51,8 +51,8 @@ void Cinema::execute() {
|
|||
Common::Array<int> cutscenes;
|
||||
getCutscenes(cutscenes);
|
||||
|
||||
out->set_fontadr(font6x8);
|
||||
out->set_vorschub(fvorx6x8, fvory6x8);
|
||||
_G(out)->set_fontadr(font6x8);
|
||||
_G(out)->set_vorschub(fvorx6x8, fvory6x8);
|
||||
atds->load_atds(98, 1);
|
||||
|
||||
room->open_handle(GBOOK, "rb", 0);
|
||||
|
@ -63,8 +63,8 @@ void Cinema::execute() {
|
|||
|
||||
for (bool endLoop = false; !endLoop;) {
|
||||
timer_nr = 0;
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
|
||||
if (!cutscenes.empty()) {
|
||||
// Render cutscene list
|
||||
|
@ -74,18 +74,18 @@ void Cinema::execute() {
|
|||
int yp = i * 10 + 68;
|
||||
|
||||
if (i == selected)
|
||||
out->box_fill(37, yp, 308, yp + 10, 42);
|
||||
out->printxy(40, yp, 14, 300, 0, "%s", csName);
|
||||
_G(out)->box_fill(37, yp, 308, yp + 10, 42);
|
||||
_G(out)->printxy(40, yp, 14, 300, 0, "%s", csName);
|
||||
}
|
||||
} else {
|
||||
// No cutscenes seen yet
|
||||
char *none = atds->ats_get_txt(545, 0, &txt_anz, 1);
|
||||
out->printxy(40, 68, 14, 300, scr_width, none);
|
||||
_G(out)->printxy(40, 68, 14, 300, scr_width, none);
|
||||
}
|
||||
|
||||
if (minfo.button == 1 && !flag) {
|
||||
flag = true;
|
||||
switch (in->maus_vector(minfo.x, minfo.y, CINEMA_TBL, 3)) {
|
||||
switch (_G(in)->maus_vector(minfo.x, minfo.y, CINEMA_TBL, 3)) {
|
||||
case 0:
|
||||
kbinfo.scan_code = Common::KEYCODE_UP;
|
||||
if (!endLoop) {
|
||||
|
@ -160,16 +160,16 @@ void Cinema::execute() {
|
|||
|
||||
case Common::KEYCODE_RETURN:
|
||||
hide_cur();
|
||||
out->cls();
|
||||
out->setze_zeiger(screen0);
|
||||
_G(out)->cls();
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
print_rows(546 + topIndex);
|
||||
|
||||
flc->set_custom_user_function(cut_serv);
|
||||
flic_cut(CINEMA_FLICS[topIndex + selected], CFO_MODE);
|
||||
flc->remove_custom_user_function();
|
||||
out->set_fontadr(font6x8);
|
||||
out->set_vorschub(fvorx6x8, fvory6x8);
|
||||
_G(out)->set_fontadr(font6x8);
|
||||
_G(out)->set_vorschub(fvorx6x8, fvory6x8);
|
||||
show_cur();
|
||||
delay = 0;
|
||||
flag = false;
|
||||
|
@ -185,15 +185,15 @@ void Cinema::execute() {
|
|||
txt_anz = 0;
|
||||
|
||||
if (!txt_anz) {
|
||||
cur->plot_cur();
|
||||
_G(cur)->plot_cur();
|
||||
|
||||
if (flag) {
|
||||
flag = false;
|
||||
out->setze_zeiger(screen0);
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
room->set_ak_pal(&room_blk);
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
} else {
|
||||
out->back2screen(workpage);
|
||||
_G(out)->back2screen(workpage);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,9 +208,9 @@ void Cinema::execute() {
|
|||
}
|
||||
|
||||
int16 Cinema::cut_serv(int16 frame) {
|
||||
if (in->get_switch_code() == ESC) {
|
||||
sndPlayer->stopMod();
|
||||
sndPlayer->endSound();
|
||||
if (_G(in)->get_switch_code() == ESC) {
|
||||
_G(sndPlayer)->stopMod();
|
||||
_G(sndPlayer)->endSound();
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
|
|
|
@ -129,37 +129,37 @@ void Credits::execute() {
|
|||
room->load_tgp(5, &room_blk, 1, 0, GBOOK);
|
||||
_G(spieler).scrollx = 0;
|
||||
_G(spieler).scrolly = 0;
|
||||
out->setze_zeiger(screen0);
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
room->set_ak_pal(&room_blk);
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
int color = 63 - (6 * i);
|
||||
|
||||
out->raster_col(6 - i, color, 0, 0);
|
||||
out->raster_col(7 + i, color, 0, 0);
|
||||
_G(out)->raster_col(6 - i, color, 0, 0);
|
||||
_G(out)->raster_col(7 + i, color, 0, 0);
|
||||
|
||||
color = 63 - (4 * i);
|
||||
out->raster_col(37 - i, color, color, color);
|
||||
out->raster_col(38 + i, color, color, color);
|
||||
_G(out)->raster_col(37 - i, color, color, color);
|
||||
_G(out)->raster_col(38 + i, color, color, color);
|
||||
}
|
||||
|
||||
_G(spieler).DelaySpeed = 2;
|
||||
|
||||
for (;;) {
|
||||
if (in->get_switch_code() == ESC || SHOULD_QUIT)
|
||||
if (_G(in)->get_switch_code() == ESC || SHOULD_QUIT)
|
||||
break;
|
||||
|
||||
// Display the starfield background
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage],
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage],
|
||||
_G(spieler).scrollx, _G(spieler).scrolly);
|
||||
|
||||
// Animate moving the background
|
||||
if (++_G(spieler).scrollx >= 320)
|
||||
_G(spieler).scrollx = 0;
|
||||
|
||||
if (in->get_switch_code() == ESC)
|
||||
if (_G(in)->get_switch_code() == ESC)
|
||||
break;
|
||||
|
||||
++lineScrolled;
|
||||
|
@ -173,28 +173,28 @@ void Credits::execute() {
|
|||
|
||||
if (CREDITS_TYPE[i]) {
|
||||
fontCol = 32;
|
||||
out->set_fontadr(font6x8);
|
||||
out->set_vorschub(fvorx6x8, fvory6x8);
|
||||
_G(out)->set_fontadr(font6x8);
|
||||
_G(out)->set_vorschub(fvorx6x8, fvory6x8);
|
||||
} else {
|
||||
fontCol = 1;
|
||||
out->set_fontadr(font8x8);
|
||||
out->set_vorschub(fvorx8x8, fvory8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
_G(out)->set_vorschub(fvorx8x8, fvory8x8);
|
||||
}
|
||||
stillScrolling = true;
|
||||
|
||||
int fgCol = fontCol + (160 - destY) / 10;
|
||||
out->printxy(CREDITS_POS[i][0], destY, fgCol, 300, scr_width, CREDITS_TEXT[i]);
|
||||
_G(out)->printxy(CREDITS_POS[i][0], destY, fgCol, 300, scr_width, CREDITS_TEXT[i]);
|
||||
}
|
||||
|
||||
if (!stillScrolling)
|
||||
break;
|
||||
|
||||
out->setze_zeiger(nullptr);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->back2screen(workpage);
|
||||
}
|
||||
|
||||
out->set_fontadr(font8x8);
|
||||
out->set_vorschub(fvorx8x8, fvorx8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
_G(out)->set_vorschub(fvorx8x8, fvorx8x8);
|
||||
room->open_handle("back/episode1.tgp", "rb", 0);
|
||||
|
||||
room->set_ak_pal(&room_blk);
|
||||
|
|
|
@ -66,23 +66,23 @@ int16 Files::execute(bool isInGame) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
taf_info *ti = mem->taf_adr(OPTION_TAF);
|
||||
taf_info *ti = _G(mem)->taf_adr(OPTION_TAF);
|
||||
g_events->clearEvents();
|
||||
|
||||
room->open_handle(GBOOK, "rb", 0);
|
||||
room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
out->setze_zeiger(screen0);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
room->set_ak_pal(&room_blk);
|
||||
fnames = iog->io_init(&ioptr);
|
||||
fnames = _G(iog)->io_init(&ioptr);
|
||||
fnames += 1;
|
||||
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
out->setze_zeiger(workptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
show_cur();
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
pt[SCROLL_UP] = pt[SCROLL_DOWN] = Common::Point(1, 0);
|
||||
for (i = SAVE; i <= W7; i++)
|
||||
pt[i] = Common::Point(5, 5);
|
||||
|
@ -103,19 +103,19 @@ int16 Files::execute(bool isInGame) {
|
|||
|
||||
while (key != ESC && !SHOULD_QUIT) {
|
||||
// Draw the dialog background
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
|
||||
// Draw the buttons at the bottom
|
||||
for (i = 28, j = SCROLL_UP; j <= OPTIONS; i++, j++) {
|
||||
if (visibility[j]) {
|
||||
if (!mode[j])
|
||||
// Not pressed
|
||||
out->sprite_set(
|
||||
_G(out)->sprite_set(
|
||||
ti->image[i], 16 + ti->korrektur[i << 1] + pt[j].x,
|
||||
76 + ti->korrektur[(i << 1) + 1] + pt[j].y, 0);
|
||||
else
|
||||
// Pressed
|
||||
out->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
|
||||
_G(out)->sprite_set(ti->image[i], 16 + ti->korrektur[i << 1],
|
||||
76 + ti->korrektur[(i << 1) + 1], 0);
|
||||
}
|
||||
}
|
||||
|
@ -124,16 +124,16 @@ int16 Files::execute(bool isInGame) {
|
|||
tmp = fnames + (text_off * 40);
|
||||
for (i = 0; i < NUM_VISIBLE_SLOTS; i++, tmp += 40) {
|
||||
if (i != active_slot) {
|
||||
out->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
|
||||
out->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
|
||||
_G(out)->printxy(40, 68 + (i * 10), 14, 300, 0, "%2d.", text_off + i);
|
||||
_G(out)->printxy(70, 68 + (i * 10), 14, 300, 0, tmp);
|
||||
} else {
|
||||
out->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
|
||||
out->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
|
||||
out->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
|
||||
_G(out)->box_fill(40, 68 + (i * 10), 308, 68 + 8 + (i * 10), 42);
|
||||
_G(out)->printxy(40, 68 + (i * 10), 255, 300, 0, "%2d.", text_off + i);
|
||||
_G(out)->printxy(70, 68 + (i * 10), 255, 300, 0, tmp);
|
||||
}
|
||||
}
|
||||
|
||||
key = in->get_switch_code();
|
||||
key = _G(in)->get_switch_code();
|
||||
|
||||
if (mode[SCROLL_UP])
|
||||
--mode[SCROLL_UP];
|
||||
|
@ -148,9 +148,9 @@ int16 Files::execute(bool isInGame) {
|
|||
if (mode[QUIT])
|
||||
--mode[QUIT];
|
||||
if (mode[QUIT] == 1) {
|
||||
out->printxy(120, 138, 255, 300, 0, QUIT_MSG);
|
||||
out->back2screen(workpage);
|
||||
in->alter_kb_handler();
|
||||
_G(out)->printxy(120, 138, 255, 300, 0, QUIT_MSG);
|
||||
_G(out)->back2screen(workpage);
|
||||
_G(in)->alter_kb_handler();
|
||||
|
||||
key = getch();
|
||||
if (key == 'j' || key == 'J' || key == 'y' || key == 'Y' || key == 'z' || key == 'Z') {
|
||||
|
@ -160,7 +160,7 @@ int16 Files::execute(bool isInGame) {
|
|||
key = 0;
|
||||
}
|
||||
|
||||
in->neuer_kb_handler(&kbinfo);
|
||||
_G(in)->neuer_kb_handler(&kbinfo);
|
||||
}
|
||||
|
||||
if (mode[OPTIONS])
|
||||
|
@ -170,7 +170,7 @@ int16 Files::execute(bool isInGame) {
|
|||
}
|
||||
|
||||
if (!flag && minfo.button == 1) {
|
||||
rect = in->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
|
||||
rect = _G(in)->maus_vector(minfo.x, minfo.y, FILE_ICONS, 8);
|
||||
flag = true;
|
||||
key = 0;
|
||||
|
||||
|
@ -267,20 +267,20 @@ enter:
|
|||
tmp = fnames + ((text_off + active_slot) * 40);
|
||||
if (tmp[0]) {
|
||||
CurrentSong = -1;
|
||||
iog->load(text_off + active_slot, ioptr.save_path);
|
||||
_G(iog)->load(text_off + active_slot, ioptr.save_path);
|
||||
key = ESC;
|
||||
}
|
||||
} else if (mode[SAVE]) {
|
||||
out->back2screen(workpage);
|
||||
out->setze_zeiger(screen0);
|
||||
in->alter_kb_handler();
|
||||
_G(out)->back2screen(workpage);
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
_G(in)->alter_kb_handler();
|
||||
tmp = fnames + ((text_off + active_slot) * 40);
|
||||
key = out->scanxy(70, 68 + (active_slot * 10),
|
||||
key = _G(out)->scanxy(70, 68 + (active_slot * 10),
|
||||
255, 42, 14, 0, "%36s36", tmp);
|
||||
in->neuer_kb_handler(&kbinfo);
|
||||
out->setze_zeiger(workptr);
|
||||
_G(in)->neuer_kb_handler(&kbinfo);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
if (key != Common::KEYCODE_ESCAPE) {
|
||||
iog->save_entry(text_off + active_slot,
|
||||
_G(iog)->save_entry(text_off + active_slot,
|
||||
ioptr.save_path);
|
||||
}
|
||||
key = ESC;
|
||||
|
@ -291,8 +291,8 @@ enter:
|
|||
break;
|
||||
}
|
||||
|
||||
cur->plot_cur();
|
||||
out->back2screen(workpage);
|
||||
_G(cur)->plot_cur();
|
||||
_G(out)->back2screen(workpage);
|
||||
|
||||
EVENTS_UPDATE;
|
||||
}
|
||||
|
|
|
@ -51,19 +51,19 @@ void Inventory::plot_menu() {
|
|||
int16 *xy;
|
||||
int16 x, y;
|
||||
int16 x1, y1;
|
||||
out->setze_zeiger(workptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
build_menu(WIN_INVENTAR);
|
||||
|
||||
for (j = 0; j < 3; j++) {
|
||||
for (i = 0; i < 5; i++)
|
||||
out->box_fill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
|
||||
_G(out)->box_fill(WIN_INF_X + 14 + i * 54, WIN_INF_Y + 6 + 30 + j * 32,
|
||||
WIN_INF_X + 14 + i * 54 + 40, WIN_INF_Y + 6 + 30 + j * 32 + 24, 12);
|
||||
}
|
||||
|
||||
k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
|
||||
k = _G(in)->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
|
||||
if (k != -1) {
|
||||
if (k < 5)
|
||||
out->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
|
||||
_G(out)->box_fill(INVENTORY_HOTSPOTS[k][0], INVENTORY_HOTSPOTS[k][1],
|
||||
INVENTORY_HOTSPOTS[k][2] + 1, INVENTORY_HOTSPOTS[k][3] + 5, 41);
|
||||
else {
|
||||
x = (minfo.x - (WIN_INF_X)) / 54;
|
||||
|
@ -71,15 +71,15 @@ void Inventory::plot_menu() {
|
|||
k = x + (y * 5);
|
||||
k += _G(spieler).InventY * 5;
|
||||
if (k < (_G(spieler).InventY + 3) * 5)
|
||||
out->box_fill(WIN_INF_X + 14 + x * 54, WIN_INF_Y + 6 + 30 + y * 32,
|
||||
_G(out)->box_fill(WIN_INF_X + 14 + x * 54, WIN_INF_Y + 6 + 30 + y * 32,
|
||||
WIN_INF_X + 14 + x * 54 + 40, WIN_INF_Y + 6 + 30 + y * 32 + 24, 41);
|
||||
}
|
||||
}
|
||||
|
||||
if (inv_rand_x != -1) {
|
||||
out->box_fill(WIN_INF_X + 14 + inv_rand_x * 54, WIN_INF_Y + 6 + 30 + inv_rand_y * 32,
|
||||
_G(out)->box_fill(WIN_INF_X + 14 + inv_rand_x * 54, WIN_INF_Y + 6 + 30 + inv_rand_y * 32,
|
||||
WIN_INF_X + 14 + inv_rand_x * 54 + 40, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24, 41);
|
||||
out->box(WIN_INF_X + 14 + inv_rand_x * 54 - 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 - 1,
|
||||
_G(out)->box(WIN_INF_X + 14 + inv_rand_x * 54 - 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 - 1,
|
||||
WIN_INF_X + 14 + inv_rand_x * 54 + 40 + 1, WIN_INF_Y + 6 + 30 + inv_rand_y * 32 + 24 + 1, 14);
|
||||
}
|
||||
|
||||
|
@ -97,12 +97,12 @@ void Inventory::plot_menu() {
|
|||
y = 3;
|
||||
else
|
||||
y = 0;
|
||||
out->sprite_set(curtaf->image[_G(ani_count)[i]],
|
||||
_G(out)->sprite_set(curtaf->image[_G(ani_count)[i]],
|
||||
WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, scr_width);
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
out->sprite_set(menutaf->image[PFEIL_UP + i],
|
||||
_G(out)->sprite_set(menutaf->image[PFEIL_UP + i],
|
||||
WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, scr_width);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ void Inventory::plot_menu() {
|
|||
x1 /= 2;
|
||||
y1 = 24 - xy[1];
|
||||
y1 /= 2;
|
||||
out->sprite_set(inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
|
||||
_G(out)->sprite_set(inv_spr[_G(spieler).InventSlot[(_G(spieler).InventY + j) * 5 + i]],
|
||||
x1 + WIN_INF_X + 14 + i * 54,
|
||||
y1 + y + 32 * j, scr_width);
|
||||
}
|
||||
|
@ -148,8 +148,8 @@ void Inventory::menu() {
|
|||
tmp1 = tmp - 2;
|
||||
} else
|
||||
tmp1 = tmp;
|
||||
in->speed(tmp1, tmp1 * 2);
|
||||
cur->move(152, 92);
|
||||
_G(in)->speed(tmp1, tmp1 * 2);
|
||||
_G(cur)->move(152, 92);
|
||||
minfo.x = 152;
|
||||
minfo.y = 92;
|
||||
|
||||
|
@ -184,7 +184,7 @@ void Inventory::menu() {
|
|||
maus_flag = 1;
|
||||
kbinfo.key_code = '\0';
|
||||
|
||||
k = in->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
|
||||
k = _G(in)->maus_vector(minfo.x, minfo.y, &INVENTORY_HOTSPOTS[0][0], INVENTORY_HOTSPOTS_COUNT);
|
||||
if (keyVal == F1_KEY)
|
||||
k = 0;
|
||||
else if (keyVal == F2_KEY)
|
||||
|
@ -220,11 +220,11 @@ void Inventory::menu() {
|
|||
break;
|
||||
|
||||
case 3:
|
||||
in->_hotkey = PAGE_UP;
|
||||
_G(in)->_hotkey = PAGE_UP;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
in->_hotkey = PAGE_DOWN;
|
||||
_G(in)->_hotkey = PAGE_DOWN;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
@ -272,7 +272,7 @@ void Inventory::menu() {
|
|||
}
|
||||
} else if (minfo.button == 2 || kbinfo.key_code == ESC) {
|
||||
if (!maus_flag) {
|
||||
in->_hotkey = ESC;
|
||||
_G(in)->_hotkey = ESC;
|
||||
maus_flag = 1;
|
||||
}
|
||||
}
|
||||
|
@ -292,8 +292,8 @@ void Inventory::menu() {
|
|||
}
|
||||
|
||||
ret_look = -1;
|
||||
abfrage = in->get_switch_code();
|
||||
cur->hide_cur();
|
||||
abfrage = _G(in)->get_switch_code();
|
||||
_G(cur)->hide_cur();
|
||||
|
||||
if (taste_flag) {
|
||||
if (abfrage != taste_flag)
|
||||
|
@ -311,14 +311,14 @@ void Inventory::menu() {
|
|||
case ESC:
|
||||
if (!menu_first) {
|
||||
menu_first = true;
|
||||
cur->show_cur();
|
||||
while (in->get_switch_code() == ESC) {
|
||||
_G(cur)->show_cur();
|
||||
while (_G(in)->get_switch_code() == ESC) {
|
||||
set_up_screen(NO_SETUP);
|
||||
inv_rand_x = -1;
|
||||
inv_rand_y = -1;
|
||||
Dialogs::Inventory::plot_menu();
|
||||
cur->plot_cur();
|
||||
out->back2screen(workpage);
|
||||
_G(cur)->plot_cur();
|
||||
_G(out)->back2screen(workpage);
|
||||
}
|
||||
} else {
|
||||
if (menu_flag1 != MENU_EINBLENDEN) {
|
||||
|
@ -368,38 +368,38 @@ void Inventory::menu() {
|
|||
|
||||
if (show_invent_menu != 2) {
|
||||
set_up_screen(NO_SETUP);
|
||||
cur->move(minfo.x, minfo.y);
|
||||
cur->show_cur();
|
||||
_G(cur)->move(minfo.x, minfo.y);
|
||||
_G(cur)->show_cur();
|
||||
if (menu_flag1 != MENU_AUSBLENDEN) {
|
||||
inv_rand_x = -1;
|
||||
inv_rand_y = -1;
|
||||
Dialogs::Inventory::plot_menu();
|
||||
}
|
||||
if (menu_flag1 == false)
|
||||
cur->plot_cur();
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(cur)->plot_cur();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
if (menu_flag1 == MENU_EINBLENDEN) {
|
||||
fx->blende1(workptr, screen0, 0, 200, 0, 300);
|
||||
} else if (menu_flag1 == MENU_AUSBLENDEN)
|
||||
fx->blende1(workptr, screen0, 0, 200, 1, 300);
|
||||
menu_flag1 = false;
|
||||
out->set_clip(0, 0, 320, 200);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->set_clip(0, 0, 320, 200);
|
||||
_G(out)->back2screen(workpage);
|
||||
} else {
|
||||
show_cur();
|
||||
}
|
||||
}
|
||||
|
||||
cur->move(maus_old_x, maus_old_y);
|
||||
_G(cur)->move(maus_old_x, maus_old_y);
|
||||
minfo.x = maus_old_x;
|
||||
minfo.y = maus_old_y;
|
||||
while (in->get_switch_code() == ESC && !SHOULD_QUIT) {
|
||||
while (_G(in)->get_switch_code() == ESC && !SHOULD_QUIT) {
|
||||
set_up_screen(NO_SETUP);
|
||||
cur->plot_cur();
|
||||
out->back2screen(workpage);
|
||||
_G(cur)->plot_cur();
|
||||
_G(out)->back2screen(workpage);
|
||||
}
|
||||
|
||||
in->speed(tmp, tmp * 2);
|
||||
_G(in)->speed(tmp, tmp * 2);
|
||||
flags.InventMenu = false;
|
||||
flags.AutoAniPlay = ani_tmp;
|
||||
_G(spieler).DispFlag = disp_tmp;
|
||||
|
@ -453,7 +453,7 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
|
|||
}
|
||||
|
||||
while (!ende) {
|
||||
rect = in->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
|
||||
rect = _G(in)->maus_vector(minfo.x, minfo.y, (const int16 *)INVENTORY_HOTSPOTS, INVENTORY_HOTSPOTS_COUNT);
|
||||
|
||||
if (minfo.button) {
|
||||
if (minfo.button == 2) {
|
||||
|
@ -500,11 +500,11 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
|
|||
|
||||
switch (kbinfo.scan_code) {
|
||||
case F1_KEY:
|
||||
in->_hotkey = F1_KEY;
|
||||
_G(in)->_hotkey = F1_KEY;
|
||||
break;
|
||||
|
||||
case F2_KEY:
|
||||
in->_hotkey = F2_KEY;
|
||||
_G(in)->_hotkey = F2_KEY;
|
||||
break;
|
||||
|
||||
case ESC:
|
||||
|
@ -528,52 +528,52 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
|
|||
kbinfo.scan_code = Common::KEYCODE_INVALID;
|
||||
set_up_screen(NO_SETUP);
|
||||
Dialogs::Inventory::plot_menu();
|
||||
out->set_fontadr(font8x8);
|
||||
out->set_vorschub(fvorx8x8, fvory8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
_G(out)->set_vorschub(fvorx8x8, fvory8x8);
|
||||
|
||||
if (mode == INV_ATS_MODE)
|
||||
out->printxy(WIN_LOOK_X + xoff, WIN_LOOK_Y, 255, 300,
|
||||
_G(out)->printxy(WIN_LOOK_X + xoff, WIN_LOOK_Y, 255, 300,
|
||||
scr_width, txt_name_adr);
|
||||
|
||||
out->set_fontadr(font6x8);
|
||||
out->set_vorschub(fvorx6x8, fvory6x8);
|
||||
_G(out)->set_fontadr(font6x8);
|
||||
_G(out)->set_vorschub(fvorx6x8, fvory6x8);
|
||||
|
||||
if (txt_anz > txt_zeilen) {
|
||||
if (txt_start > 0) {
|
||||
if (rect == 6)
|
||||
out->box_fill(WIN_INF_X + 262, WIN_INF_Y + 136, WIN_INF_X + 272,
|
||||
_G(out)->box_fill(WIN_INF_X + 262, WIN_INF_Y + 136, WIN_INF_X + 272,
|
||||
WIN_INF_Y + 136 + 14, 41);
|
||||
c[0] = 24;
|
||||
out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 4, 14, 300,
|
||||
_G(out)->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 4, 14, 300,
|
||||
scr_width, c);
|
||||
}
|
||||
|
||||
if (txt_start < txt_anz - txt_zeilen) {
|
||||
if (rect == 7)
|
||||
out->box_fill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
|
||||
_G(out)->box_fill(WIN_INF_X + 262, WIN_INF_Y + 156, WIN_INF_X + 272,
|
||||
WIN_INF_Y + 156 + 14, 41);
|
||||
c[0] = 25;
|
||||
out->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, scr_width, c);
|
||||
_G(out)->printxy(WIN_LOOK_X + 250, WIN_LOOK_Y + 24, 14, 300, scr_width, c);
|
||||
}
|
||||
}
|
||||
|
||||
k = 0;
|
||||
for (i = txt_start; i < txt_anz && i < txt_start + txt_zeilen; i++) {
|
||||
out->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
|
||||
_G(out)->printxy(WIN_LOOK_X, WIN_LOOK_Y + yoff + k * 10, 14, 300,
|
||||
scr_width, "%s", txt->str_pos(txt_adr, i));
|
||||
++k;
|
||||
}
|
||||
|
||||
cur->plot_cur();
|
||||
out->back2screen(workpage);
|
||||
_G(cur)->plot_cur();
|
||||
_G(out)->back2screen(workpage);
|
||||
SHOULD_QUIT_RETURN0;
|
||||
}
|
||||
|
||||
while (in->get_switch_code() == ESC) {
|
||||
while (_G(in)->get_switch_code() == ESC) {
|
||||
set_up_screen(NO_SETUP);
|
||||
Dialogs::Inventory::plot_menu();
|
||||
cur->plot_cur();
|
||||
out->back2screen(workpage);
|
||||
_G(cur)->plot_cur();
|
||||
_G(out)->back2screen(workpage);
|
||||
SHOULD_QUIT_RETURN0;
|
||||
}
|
||||
|
||||
|
@ -690,18 +690,18 @@ void Inventory::showDiary() {
|
|||
_G(spieler).scrolly = 0;
|
||||
|
||||
room->load_tgp(DIARY_START, &room_blk, GBOOK_TGP, 0, GBOOK);
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
|
||||
_G(out)->back2screen(workpage);
|
||||
room->set_ak_pal(&room_blk);
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
|
||||
while (in->get_switch_code() != ESC) {
|
||||
while (_G(in)->get_switch_code() != ESC) {
|
||||
g_events->update();
|
||||
SHOULD_QUIT_RETURN;
|
||||
}
|
||||
while (in->get_switch_code() != 0) {
|
||||
while (_G(in)->get_switch_code() != 0) {
|
||||
g_events->update();
|
||||
SHOULD_QUIT_RETURN;
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ void Inventory::showDiary() {
|
|||
_G(spieler).scrolly = scrolly;
|
||||
set_up_screen(NO_SETUP);
|
||||
Dialogs::Inventory::plot_menu();
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
room->set_ak_pal(&room_blk);
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
}
|
||||
|
|
|
@ -39,18 +39,18 @@ int MainMenu::_personAni[3];
|
|||
void MainMenu::execute() {
|
||||
// Convenience during testing to not keep showing title sequence
|
||||
if (!ConfMan.getBool("skip_title")) {
|
||||
mem->file->select_pool_item(music_handle, EndOfPool - 17);
|
||||
mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
|
||||
if (!modul)
|
||||
sndPlayer->playMod((tmf_header *)Ci.MusicSlot);
|
||||
_G(mem)->file->select_pool_item(music_handle, EndOfPool - 17);
|
||||
_G(mem)->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
|
||||
if (!_G(modul))
|
||||
_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
|
||||
|
||||
flic_cut(200, 0);
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
}
|
||||
|
||||
show_intro();
|
||||
|
||||
cur->move(152, 92);
|
||||
_G(cur)->move(152, 92);
|
||||
minfo.x = 152;
|
||||
minfo.y = 92;
|
||||
_G(spieler).inv_cur = false;
|
||||
|
@ -59,8 +59,8 @@ void MainMenu::execute() {
|
|||
|
||||
bool done = false;
|
||||
while (!done && !SHOULD_QUIT) {
|
||||
sndPlayer->stopMod();
|
||||
sndPlayer->endSound();
|
||||
_G(sndPlayer)->stopMod();
|
||||
_G(sndPlayer)->endSound();
|
||||
SetUpScreenFunc = screenFunc;
|
||||
|
||||
cursor_wahl(CUR_ZEIGE);
|
||||
|
@ -73,7 +73,7 @@ void MainMenu::execute() {
|
|||
load_room_music(98);
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
|
||||
out->set_palette(pal);
|
||||
_G(out)->set_palette(pal);
|
||||
_G(spieler).PersonHide[P_CHEWY] = true;
|
||||
show_cur();
|
||||
|
||||
|
@ -93,7 +93,7 @@ void MainMenu::execute() {
|
|||
|
||||
case MM_VIEW_INTRO:
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
out->setze_zeiger(workptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(135, CFO_MODE);
|
||||
break;
|
||||
|
@ -105,15 +105,15 @@ void MainMenu::execute() {
|
|||
|
||||
case MM_CINEMA:
|
||||
cursor_wahl(CUR_SAVE);
|
||||
cur->move(152, 92);
|
||||
_G(cur)->move(152, 92);
|
||||
minfo.x = 152;
|
||||
minfo.y = 92;
|
||||
Dialogs::Cinema::execute();
|
||||
break;
|
||||
|
||||
case MM_QUIT:
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
done = true;
|
||||
break;
|
||||
|
||||
|
@ -136,7 +136,7 @@ void MainMenu::execute() {
|
|||
void MainMenu::screenFunc() {
|
||||
int vec = det->maus_vector(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
|
||||
|
||||
if (in->get_switch_code() == 28 || minfo.button == 1) {
|
||||
if (_G(in)->get_switch_code() == 28 || minfo.button == 1) {
|
||||
_selection = vec;
|
||||
}
|
||||
}
|
||||
|
@ -151,23 +151,23 @@ void MainMenu::animate() {
|
|||
}
|
||||
|
||||
++FrameSpeed;
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage],
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage],
|
||||
_G(spieler).scrollx, _G(spieler).scrolly);
|
||||
|
||||
if (SetUpScreenFunc && !menu_display && !flags.InventMenu) {
|
||||
SetUpScreenFunc();
|
||||
out->setze_zeiger(workptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
}
|
||||
|
||||
sprite_engine();
|
||||
kb_mov(1);
|
||||
calc_maus_txt(minfo.x, minfo.y, 1);
|
||||
cur->plot_cur();
|
||||
_G(cur)->plot_cur();
|
||||
_G(maus_links_click) = false;
|
||||
menu_flag = 0;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->back2screen(workpage);
|
||||
_G(menu_flag) = 0;
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->back2screen(workpage);
|
||||
|
||||
g_screen->update();
|
||||
g_events->update();
|
||||
|
@ -178,14 +178,14 @@ int16 MainMenu::creditsFn(int16 key) {
|
|||
key == 128 || key == 165 || key == 185 ||
|
||||
key == 211 || key == 248 || key == 266) {
|
||||
for (int idx = 0; idx < 2000; ++idx) {
|
||||
if (in->get_switch_code() == ESC)
|
||||
if (_G(in)->get_switch_code() == ESC)
|
||||
return -1;
|
||||
g_events->update();
|
||||
}
|
||||
return 0;
|
||||
|
||||
} else {
|
||||
return in->get_switch_code() == ESC ? -1 : 0;
|
||||
return _G(in)->get_switch_code() == ESC ? -1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,11 +231,11 @@ void MainMenu::startGame() {
|
|||
bool MainMenu::loadGame() {
|
||||
flags.SaveMenu = true;
|
||||
savePersonAni();
|
||||
out->setze_zeiger(screen0);
|
||||
out->set_fontadr(font6x8);
|
||||
out->set_vorschub(fvorx6x8, fvory6x8);
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
_G(out)->set_fontadr(font6x8);
|
||||
_G(out)->set_vorschub(fvorx6x8, fvory6x8);
|
||||
cursor_wahl(CUR_SAVE);
|
||||
cur->move(152, 92);
|
||||
_G(cur)->move(152, 92);
|
||||
minfo.x = 152;
|
||||
minfo.y = 92;
|
||||
savegameFlag = true;
|
||||
|
@ -257,19 +257,19 @@ bool MainMenu::loadGame() {
|
|||
|
||||
void MainMenu::playGame() {
|
||||
// unused1 = 0;
|
||||
inv_disp_ok = false;
|
||||
_G(inv_disp_ok) = false;
|
||||
_G(cur_display) = true;
|
||||
tmp_menu_item = 0;
|
||||
_G(tmp_menu_item) = 0;
|
||||
_G(maus_links_click) = false;
|
||||
kbinfo.scan_code = Common::KEYCODE_INVALID;
|
||||
|
||||
flags.main_maus_flag = false;
|
||||
flags.MainInput = true;
|
||||
flags.ShowAtsInvTxt = true;
|
||||
cur->show_cur();
|
||||
_G(cur)->show_cur();
|
||||
spieler_vector[P_CHEWY].Count = 0;
|
||||
uhr->reset_timer(0, 0);
|
||||
sndPlayer->setLoopMode(_G(spieler).soundLoopMode);
|
||||
_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
|
||||
|
||||
while (!SHOULD_QUIT && !main_loop(1)) {
|
||||
}
|
||||
|
|
|
@ -58,13 +58,13 @@ static const int16 OPTION_ICONS[9 * 4] = {
|
|||
void Options::execute(taf_info *ti) {
|
||||
long akt_clock = 0, stop_clock = 0;
|
||||
room->load_tgp(0, &room_blk, GBOOK_TGP, 0, GBOOK);
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
out->setze_zeiger(screen0);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
|
||||
room->set_ak_pal(&room_blk);
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
out->setze_zeiger(workptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
int16 key = 0;
|
||||
int16 surimy_ani = SURIMY_START;
|
||||
int16 mund_ani = MUND_START;
|
||||
|
@ -77,7 +77,7 @@ void Options::execute(taf_info *ti) {
|
|||
int16 delay_count = _G(spieler).DelaySpeed;
|
||||
warning("stop_clock = (clock() / CLK_TCK) + 1;");
|
||||
while (key != ESC) {
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
++FrameSpeed;
|
||||
warning("akt_clock = clock() / CLK_TCK;");
|
||||
if (akt_clock >= stop_clock) {
|
||||
|
@ -88,66 +88,66 @@ void Options::execute(taf_info *ti) {
|
|||
warning("stop_clock = (clock() / CLK_TCK) + 1;");
|
||||
}
|
||||
|
||||
out->sprite_set(ti->image[surimy_ani], 18 + ti->korrektur[surimy_ani << 1],
|
||||
_G(out)->sprite_set(ti->image[surimy_ani], 18 + ti->korrektur[surimy_ani << 1],
|
||||
8 + ti->korrektur[(surimy_ani << 1) + 1], 0);
|
||||
short bar_off = (_G(spieler).FramesPerSecond - 6) * 16;
|
||||
out->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
|
||||
out->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
|
||||
_G(out)->box_fill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
|
||||
_G(out)->printxy(36 + bar_off, 65, 255, 300, 0, "%d", _G(spieler).FramesPerSecond << 1);
|
||||
|
||||
if (_G(spieler).SoundSwitch) {
|
||||
out->sprite_set(ti->image[mund_ani],
|
||||
_G(out)->sprite_set(ti->image[mund_ani],
|
||||
18 + ti->korrektur[mund_ani << 1],
|
||||
8 + ti->korrektur[(mund_ani << 1) + 1], 0);
|
||||
out->sprite_set(ti->image[SCHNULL_OFF],
|
||||
_G(out)->sprite_set(ti->image[SCHNULL_OFF],
|
||||
18 + ti->korrektur[SCHNULL_OFF << 1],
|
||||
8 + ti->korrektur[(SCHNULL_OFF << 1) + 1], 0);
|
||||
} else {
|
||||
out->sprite_set(ti->image[SCHNULLER],
|
||||
_G(out)->sprite_set(ti->image[SCHNULLER],
|
||||
18 + ti->korrektur[SCHNULLER << 1],
|
||||
8 + ti->korrektur[(SCHNULLER << 1) + 1], 0);
|
||||
out->sprite_set(ti->image[SCHNULL_BAND],
|
||||
_G(out)->sprite_set(ti->image[SCHNULL_BAND],
|
||||
18 + ti->korrektur[SCHNULL_BAND << 1],
|
||||
8 + ti->korrektur[(SCHNULL_BAND << 1) + 1], 0);
|
||||
}
|
||||
out->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
|
||||
out->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
|
||||
out->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
|
||||
_G(out)->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
|
||||
_G(out)->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
|
||||
_G(out)->box_fill(33, 136 - (_G(spieler).SoundVol >> 1), 42, 136, 15);
|
||||
|
||||
out->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
|
||||
out->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
|
||||
out->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
|
||||
_G(out)->pop_box(52 - 2, 104 - 12, 62 + 4, 136 + 2, 192, 183, 182);
|
||||
_G(out)->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
|
||||
_G(out)->box_fill(53, 136 - (_G(spieler).MusicVol >> 1), 62, 136, 31);
|
||||
if (_G(spieler).MusicSwitch) {
|
||||
out->sprite_set(ti->image[MUSIC_ON1],
|
||||
_G(out)->sprite_set(ti->image[MUSIC_ON1],
|
||||
18 + ti->korrektur[MUSIC_ON1 << 1],
|
||||
8 + ti->korrektur[(MUSIC_ON1 << 1) + 1], 0);
|
||||
out->sprite_set(ti->image[MUSIC_ON2],
|
||||
_G(out)->sprite_set(ti->image[MUSIC_ON2],
|
||||
18 + ti->korrektur[MUSIC_ON2 << 1],
|
||||
8 + ti->korrektur[(MUSIC_ON2 << 1) + 1], 0);
|
||||
} else
|
||||
out->sprite_set(ti->image[MUSIC_OFF],
|
||||
_G(out)->sprite_set(ti->image[MUSIC_OFF],
|
||||
18 + ti->korrektur[MUSIC_OFF << 1],
|
||||
8 + ti->korrektur[(MUSIC_OFF << 1) + 1], 0);
|
||||
|
||||
if (_G(spieler).DisplayText) {
|
||||
out->sprite_set(ti->image[tdisp_ani],
|
||||
_G(out)->sprite_set(ti->image[tdisp_ani],
|
||||
18 + ti->korrektur[tdisp_ani << 1],
|
||||
8 + ti->korrektur[(tdisp_ani << 1) + 1], 0);
|
||||
out->sprite_set(ti->image[TDISP_EIN],
|
||||
_G(out)->sprite_set(ti->image[TDISP_EIN],
|
||||
18 + ti->korrektur[TDISP_EIN << 1],
|
||||
8 + ti->korrektur[(TDISP_EIN << 1) + 1], 0);
|
||||
} else
|
||||
out->sprite_set(ti->image[TDISP_AUS],
|
||||
_G(out)->sprite_set(ti->image[TDISP_AUS],
|
||||
18 + ti->korrektur[TDISP_AUS << 1],
|
||||
8 + ti->korrektur[(TDISP_AUS << 1) + 1], 0);
|
||||
|
||||
out->sprite_set(ti->image[EXIT],
|
||||
_G(out)->sprite_set(ti->image[EXIT],
|
||||
18 + ti->korrektur[EXIT << 1],
|
||||
8 + ti->korrektur[(EXIT << 1) + 1], 0);
|
||||
|
||||
key = in->get_switch_code();
|
||||
key = _G(in)->get_switch_code();
|
||||
if ((minfo.button == 1) || (key == ENTER)) {
|
||||
WAIT_TASTE_LOS
|
||||
int16 rect = in->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
|
||||
int16 rect = _G(in)->maus_vector(minfo.x, minfo.y, OPTION_ICONS, 9);
|
||||
switch (rect) {
|
||||
case 0:
|
||||
if (_G(spieler).FramesPerSecond > 6)
|
||||
|
@ -181,7 +181,7 @@ void Options::execute(taf_info *ti) {
|
|||
case 5:
|
||||
if (_G(spieler).MusicSwitch) {
|
||||
_G(spieler).MusicSwitch = false;
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
} else {
|
||||
_G(spieler).MusicSwitch = true;
|
||||
CurrentSong = -1;
|
||||
|
@ -193,11 +193,11 @@ void Options::execute(taf_info *ti) {
|
|||
break;
|
||||
case 7:
|
||||
_G(spieler).SoundVol = (136 - minfo.y) << 1;
|
||||
sndPlayer->setSoundMasterVol(_G(spieler).SoundVol);
|
||||
_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
|
||||
break;
|
||||
case 8:
|
||||
_G(spieler).MusicVol = (136 - minfo.y) << 1;
|
||||
sndPlayer->setMusicMasterVol(_G(spieler).MusicVol);
|
||||
_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
|
||||
break;
|
||||
}
|
||||
minfo.button = 0;
|
||||
|
@ -205,24 +205,24 @@ void Options::execute(taf_info *ti) {
|
|||
switch (key) {
|
||||
|
||||
case CURSOR_UP:
|
||||
cur->move(minfo.x, --minfo.y);
|
||||
_G(cur)->move(minfo.x, --minfo.y);
|
||||
break;
|
||||
|
||||
case CURSOR_DOWN:
|
||||
cur->move(minfo.x, ++minfo.y);
|
||||
_G(cur)->move(minfo.x, ++minfo.y);
|
||||
break;
|
||||
|
||||
case CURSOR_LEFT:
|
||||
cur->move(--minfo.x, minfo.y);
|
||||
_G(cur)->move(--minfo.x, minfo.y);
|
||||
break;
|
||||
|
||||
case CURSOR_RIGHT:
|
||||
cur->move(++minfo.x, minfo.y);
|
||||
_G(cur)->move(++minfo.x, minfo.y);
|
||||
break;
|
||||
}
|
||||
|
||||
cur->plot_cur();
|
||||
out->back2screen(workpage);
|
||||
_G(cur)->plot_cur();
|
||||
_G(out)->back2screen(workpage);
|
||||
EVENTS_UPDATE;
|
||||
SHOULD_QUIT_RETURN;
|
||||
|
||||
|
@ -255,12 +255,12 @@ void Options::execute(taf_info *ti) {
|
|||
}
|
||||
|
||||
room->load_tgp(1, &room_blk, GBOOK_TGP, 0, GBOOK);
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
out->setze_zeiger(screen0);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], 0, 0);
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
room->set_ak_pal(&room_blk);
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
out->setze_zeiger(workptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
}
|
||||
|
||||
} // namespace Dialogs
|
||||
|
|
|
@ -32,7 +32,7 @@ effect::~effect() {
|
|||
|
||||
void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, byte *palette, int16 col, int16 skip_line) {
|
||||
byte *sp = (byte *)MALLOC(8 * 8 + 4);
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
int16 *rnd_zeiger = (int16 *)rnd_speicher;
|
||||
if (col < 256) {
|
||||
for (int16 i = 0; i < 1002; i++) {
|
||||
|
@ -42,9 +42,9 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
|
|||
x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
|
||||
else
|
||||
x = rnd_zeiger[i] * 8;
|
||||
out->box_fill(x, y, x + 8, y + 8, col);
|
||||
_G(out)->box_fill(x, y, x + 8, y + 8, col);
|
||||
}
|
||||
out->set_palette(palette);
|
||||
_G(out)->set_palette(palette);
|
||||
}
|
||||
for (int16 i = 0; i < 1000; i++) {
|
||||
int16 x;
|
||||
|
@ -53,10 +53,10 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
|
|||
x = (rnd_zeiger[i] - (40 * (y / 8))) * 8;
|
||||
else
|
||||
x = rnd_zeiger[i] * 8;
|
||||
out->setze_zeiger(sram_speicher);
|
||||
out->sprite_save(sp, x, y, 8, 8, 0);
|
||||
out->setze_zeiger(screen);
|
||||
out->sprite_set(sp, x, y, 0);
|
||||
_G(out)->setze_zeiger(sram_speicher);
|
||||
_G(out)->sprite_save(sp, x, y, 8, 8, 0);
|
||||
_G(out)->setze_zeiger(screen);
|
||||
_G(out)->sprite_set(sp, x, y, 0);
|
||||
}
|
||||
free(sp);
|
||||
}
|
||||
|
@ -64,49 +64,49 @@ void effect::rnd_blende(byte *rnd_speicher, byte *sram_speicher, byte *screen, b
|
|||
|
||||
void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 frames, uint8 mode, int16 col) {
|
||||
byte *sp = (byte *)MALLOC(8 * 8 + 4);
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
int16 i = 0;
|
||||
if (col < 256) {
|
||||
for (i = 0; i < 13; i++) {
|
||||
int16 x, y, x1;
|
||||
for (x = i; x < 39 - i; x++)
|
||||
out->box_fill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
|
||||
_G(out)->box_fill(x * 8, i * 8, x * 8 + 8, i * 8 + 8, col);
|
||||
for (y = i; y < 24 - i; y++)
|
||||
out->box_fill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
|
||||
_G(out)->box_fill(x * 8, y * 8, x * 8 + 8, y * 8 + 8, col);
|
||||
for (x1 = 39 - i; x1 > i; x1--)
|
||||
out->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
|
||||
_G(out)->box_fill(x1 * 8, y * 8, x1 * 8 + 8, y * 8 + 8, col);
|
||||
for (int16 y1 = 24 - i; y1 >= i; y1--)
|
||||
out->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
|
||||
_G(out)->box_fill(x1 * 8, y1 * 8, x1 * 8 + 8, y1 * 8 + 8, col);
|
||||
}
|
||||
out->set_palette(palette);
|
||||
_G(out)->set_palette(palette);
|
||||
}
|
||||
switch (mode) {
|
||||
case 0:
|
||||
for (i = 13; i >= 0; i--) {
|
||||
int16 x, y, x1;
|
||||
for (x = i; x < 39 - i; x++) {
|
||||
out->setze_zeiger(sram_speicher);
|
||||
out->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
|
||||
out->setze_zeiger(screen);
|
||||
out->sprite_set(sp, x * 8, i * 8, 0);
|
||||
_G(out)->setze_zeiger(sram_speicher);
|
||||
_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
|
||||
_G(out)->setze_zeiger(screen);
|
||||
_G(out)->sprite_set(sp, x * 8, i * 8, 0);
|
||||
}
|
||||
for (y = i; y < 24 - i; y++) {
|
||||
out->setze_zeiger(sram_speicher);
|
||||
out->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
|
||||
out->setze_zeiger(screen);
|
||||
out->sprite_set(sp, x * 8, y * 8, 0);
|
||||
_G(out)->setze_zeiger(sram_speicher);
|
||||
_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
|
||||
_G(out)->setze_zeiger(screen);
|
||||
_G(out)->sprite_set(sp, x * 8, y * 8, 0);
|
||||
}
|
||||
for (x1 = 39 - i; x1 > i; x1--) {
|
||||
out->setze_zeiger(sram_speicher);
|
||||
out->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
|
||||
out->setze_zeiger(screen);
|
||||
out->sprite_set(sp, x1 * 8, y * 8, 0);
|
||||
_G(out)->setze_zeiger(sram_speicher);
|
||||
_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
|
||||
_G(out)->setze_zeiger(screen);
|
||||
_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
|
||||
}
|
||||
for (int16 y1 = 24 - i; y1 > i; y1--) {
|
||||
out->setze_zeiger(sram_speicher);
|
||||
out->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
|
||||
out->setze_zeiger(screen);
|
||||
out->sprite_set(sp, x1 * 8, y1 * 8, 0);
|
||||
_G(out)->setze_zeiger(sram_speicher);
|
||||
_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
|
||||
_G(out)->setze_zeiger(screen);
|
||||
_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -115,28 +115,28 @@ void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
|
|||
for (i = 0; i < 13; i++) {
|
||||
int16 x, y, x1;
|
||||
for (x = i; x < 39 - i; x++) {
|
||||
out->setze_zeiger(sram_speicher);
|
||||
out->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
|
||||
out->setze_zeiger(screen);
|
||||
out->sprite_set(sp, x * 8, i * 8, 0);
|
||||
_G(out)->setze_zeiger(sram_speicher);
|
||||
_G(out)->sprite_save(sp, x * 8, i * 8, 8, 8, 0);
|
||||
_G(out)->setze_zeiger(screen);
|
||||
_G(out)->sprite_set(sp, x * 8, i * 8, 0);
|
||||
}
|
||||
for (y = i; y < 24 - i; y++) {
|
||||
out->setze_zeiger(sram_speicher);
|
||||
out->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
|
||||
out->setze_zeiger(screen);
|
||||
out->sprite_set(sp, x * 8, y * 8, 0);
|
||||
_G(out)->setze_zeiger(sram_speicher);
|
||||
_G(out)->sprite_save(sp, x * 8, y * 8, 8, 8, 0);
|
||||
_G(out)->setze_zeiger(screen);
|
||||
_G(out)->sprite_set(sp, x * 8, y * 8, 0);
|
||||
}
|
||||
for (x1 = 39 - i; x1 > i; x1--) {
|
||||
out->setze_zeiger(sram_speicher);
|
||||
out->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
|
||||
out->setze_zeiger(screen);
|
||||
out->sprite_set(sp, x1 * 8, y * 8, 0);
|
||||
_G(out)->setze_zeiger(sram_speicher);
|
||||
_G(out)->sprite_save(sp, x1 * 8, y * 8, 8, 8, 0);
|
||||
_G(out)->setze_zeiger(screen);
|
||||
_G(out)->sprite_set(sp, x1 * 8, y * 8, 0);
|
||||
}
|
||||
for (int16 y1 = 24 - i; y1 > i; y1--) {
|
||||
out->setze_zeiger(sram_speicher);
|
||||
out->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
|
||||
out->setze_zeiger(screen);
|
||||
out->sprite_set(sp, x1 * 8, y1 * 8, 0);
|
||||
_G(out)->setze_zeiger(sram_speicher);
|
||||
_G(out)->sprite_save(sp, x1 * 8, y1 * 8, 8, 8, 0);
|
||||
_G(out)->setze_zeiger(screen);
|
||||
_G(out)->sprite_set(sp, x1 * 8, y1 * 8, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -151,17 +151,17 @@ void effect::blende1(byte *sram_speicher, byte *screen, byte *palette, int16 fra
|
|||
void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
|
||||
if (mode) {
|
||||
for (int i = 0, x = 0; i < 20; ++i, x += 8) {
|
||||
out->setze_zeiger(workpage_ + 4);
|
||||
out->box_fill(152 - x, 0, 152 - x + 8, 200, farbe);
|
||||
out->box_fill(x + 160, 0, x + 168, 200, farbe);
|
||||
out->back2screen(workpage_);
|
||||
_G(out)->setze_zeiger(workpage_ + 4);
|
||||
_G(out)->box_fill(152 - x, 0, 152 - x + 8, 200, farbe);
|
||||
_G(out)->box_fill(x + 160, 0, x + 168, 200, farbe);
|
||||
_G(out)->back2screen(workpage_);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0, x = 0; i < 20; ++i, x += 8) {
|
||||
out->setze_zeiger(workpage_ + 4);
|
||||
out->box_fill(x, 0, x + 8, 200, farbe);
|
||||
out->box_fill(312 - x, 0, 31 - x + 8, 200, farbe);
|
||||
out->back2screen(workpage_);
|
||||
_G(out)->setze_zeiger(workpage_ + 4);
|
||||
_G(out)->box_fill(x, 0, x + 8, 200, farbe);
|
||||
_G(out)->box_fill(312 - x, 0, 31 - x + 8, 200, farbe);
|
||||
_G(out)->back2screen(workpage_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -169,17 +169,17 @@ void effect::border(byte *workpage_, int16 lines, uint8 mode, int16 farbe) {
|
|||
void effect::spr_blende(byte *workpage_, int16 lines, bool mode, int16 col) {
|
||||
if (mode) {
|
||||
for (int i = 0, y = 0; i < 20; ++i, y += 8) {
|
||||
out->setze_zeiger(workpage_ + 4);
|
||||
out->box_fill(0, 92 - y, 320, 92 - y + 8, col);
|
||||
out->box_fill(0, 100 + y, 320, 108 + y, col);
|
||||
out->back2screen(workpage_);
|
||||
_G(out)->setze_zeiger(workpage_ + 4);
|
||||
_G(out)->box_fill(0, 92 - y, 320, 92 - y + 8, col);
|
||||
_G(out)->box_fill(0, 100 + y, 320, 108 + y, col);
|
||||
_G(out)->back2screen(workpage_);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
out->setze_zeiger(workpage_ + 4);
|
||||
out->box_fill(0, i, 320, i + 8, col);
|
||||
out->box_fill(0, 192 - i, 320, 200 - i, col);
|
||||
out->back2screen(workpage_);
|
||||
_G(out)->setze_zeiger(workpage_ + 4);
|
||||
_G(out)->box_fill(0, i, 320, i + 8, col);
|
||||
_G(out)->box_fill(0, 192 - i, 320, 200 - i, col);
|
||||
_G(out)->back2screen(workpage_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,14 +89,14 @@ int16 call_fileio(int16 palette, int16 mode) {
|
|||
}
|
||||
curblk.no_back = false;
|
||||
cursor_wahl(CUR_SAVE);
|
||||
out->sprite_save(cur_back, minfo.x + curblk.page_off_x,
|
||||
_G(out)->sprite_save(cur_back, minfo.x + curblk.page_off_x,
|
||||
minfo.y + curblk.page_off_y, 16,
|
||||
16, scr_width);
|
||||
cur->hide_cur();
|
||||
cur->show_cur();
|
||||
cur->hide_cur();
|
||||
ret = iog->io_menu(&ioptr);
|
||||
cur->show_cur();
|
||||
_G(cur)->hide_cur();
|
||||
_G(cur)->show_cur();
|
||||
_G(cur)->hide_cur();
|
||||
ret = _G(iog)->io_menu(&ioptr);
|
||||
_G(cur)->show_cur();
|
||||
curblk.no_back = true;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "chewy/events.h"
|
||||
#include "chewy/file.h"
|
||||
#include "chewy/flic.h"
|
||||
#include "chewy/global.h"
|
||||
#include "chewy/sound.h"
|
||||
|
||||
namespace Chewy {
|
||||
|
@ -130,7 +131,7 @@ int16 flic::play(Common::Stream *handle, byte *vscreen, byte *load_p) {
|
|||
_fadeDelay = 0;
|
||||
_clsFlag = false;
|
||||
_currentFrame = 0;
|
||||
for (uint16 i = 0; (i < _flicHeader.frames) && (!modul) && (ret >= 0); i++) {
|
||||
for (uint16 i = 0; (i < _flicHeader.frames) && (!_G(modul)) && (ret >= 0); i++) {
|
||||
if (!_frameHeader.load(rs)) {
|
||||
error("flic error");
|
||||
} else {
|
||||
|
@ -206,15 +207,15 @@ int16 flic::decode_frame() {
|
|||
break;
|
||||
|
||||
case CLS:
|
||||
out->setze_zeiger(_virtScreen);
|
||||
out->cls();
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(_virtScreen);
|
||||
_G(out)->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
|
||||
update_flag = true;
|
||||
break;
|
||||
|
||||
case UNPRESSED:
|
||||
out->back2back(_loadBuffer, _virtScreen);
|
||||
_G(out)->back2back(_loadBuffer, _virtScreen);
|
||||
|
||||
update_flag = true;
|
||||
break;
|
||||
|
@ -231,13 +232,13 @@ int16 flic::decode_frame() {
|
|||
}
|
||||
if (update_flag != false) {
|
||||
if (_flicUser) {
|
||||
out->setze_zeiger(_virtScreen);
|
||||
_G(out)->setze_zeiger(_virtScreen);
|
||||
action_ret = _flicUser(_currentFrame);
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
}
|
||||
out->back2screen(_virtScreen - 4);
|
||||
_G(out)->back2screen(_virtScreen - 4);
|
||||
if (_fadeFlag != false) {
|
||||
out->einblenden(_fadePal, _fadeDelay);
|
||||
_G(out)->einblenden(_fadePal, _fadeDelay);
|
||||
_fadeFlag = false;
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +252,7 @@ void flic::col256_chunk(byte *tmp) {
|
|||
tmp += 2;
|
||||
|
||||
if (_clsFlag == true)
|
||||
out->cls();
|
||||
_G(out)->cls();
|
||||
else
|
||||
_clsFlag = true;
|
||||
|
||||
|
@ -260,10 +261,10 @@ void flic::col256_chunk(byte *tmp) {
|
|||
for (int i = 0; i < PALETTE_SIZE; i++)
|
||||
tmp[i] >>= 2;
|
||||
if (_fadeFlag == false)
|
||||
out->set_palette(tmp);
|
||||
_G(out)->set_palette(tmp);
|
||||
else {
|
||||
memset(_fadePal, 0, PALETTE_SIZE);
|
||||
out->set_palette(_fadePal);
|
||||
_G(out)->set_palette(_fadePal);
|
||||
memcpy(_fadePal, tmp, PALETTE_SIZE);
|
||||
}
|
||||
} else {
|
||||
|
@ -275,7 +276,7 @@ void flic::col256_chunk(byte *tmp) {
|
|||
byte r = *tmp++ >> 2;
|
||||
byte g = *tmp++ >> 2;
|
||||
byte b = *tmp++ >> 2;
|
||||
out->raster_col(col, r, g, b);
|
||||
_G(out)->raster_col(col, r, g, b);
|
||||
++col;
|
||||
}
|
||||
}
|
||||
|
@ -287,16 +288,16 @@ void flic::col64_chunk(byte *tmp) {
|
|||
tmp += 2;
|
||||
|
||||
if (_clsFlag == true)
|
||||
out->cls();
|
||||
_G(out)->cls();
|
||||
else
|
||||
_clsFlag = true;
|
||||
|
||||
if (!tmp[1]) {
|
||||
if (_fadeFlag == false)
|
||||
out->set_palette(tmp + 2);
|
||||
_G(out)->set_palette(tmp + 2);
|
||||
else {
|
||||
memset(_fadePal, 0, PALETTE_SIZE);
|
||||
out->set_palette(_fadePal);
|
||||
_G(out)->set_palette(_fadePal);
|
||||
memcpy(_fadePal, tmp + 2, PALETTE_SIZE);
|
||||
}
|
||||
} else {
|
||||
|
@ -308,7 +309,7 @@ void flic::col64_chunk(byte *tmp) {
|
|||
byte r = *tmp++ >> 2;
|
||||
byte g = *tmp++ >> 2;
|
||||
byte b = *tmp++ >> 2;
|
||||
out->raster_col(col, r, g, b);
|
||||
_G(out)->raster_col(col, r, g, b);
|
||||
++col;
|
||||
}
|
||||
}
|
||||
|
@ -390,7 +391,7 @@ int16 flic::custom_play(CustomInfo *ci) {
|
|||
_fadeDelay = 0;
|
||||
_currentFrame = 0;
|
||||
|
||||
for (uint16 i = 0; (i < _customHeader.frames) && (!modul) && (ret >= 0); i++) {
|
||||
for (uint16 i = 0; (i < _customHeader.frames) && (!_G(modul)) && (ret >= 0); i++) {
|
||||
if (!_customFrame.load(rs)) {
|
||||
error("flic error");
|
||||
} else {
|
||||
|
@ -421,8 +422,8 @@ int16 flic::custom_play(CustomInfo *ci) {
|
|||
dynamic_cast<Common::SeekableReadStream *>(ci->Handle));
|
||||
|
||||
} else {
|
||||
out->raster_col(255, 63, 63, 63);
|
||||
out->printxy(0, 0, 255, 0, 0, "Unknown Frame Type");
|
||||
_G(out)->raster_col(255, 63, 63, 63);
|
||||
_G(out)->printxy(0, 0, 255, 0, 0, "Unknown Frame Type");
|
||||
taste;
|
||||
}
|
||||
}
|
||||
|
@ -440,7 +441,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
|
|||
uint16 para[10];
|
||||
tmf_header *th = (tmf_header *)_music;
|
||||
|
||||
for (uint16 i = 0; (i < _customFrame.chunks) && (!modul); i++) {
|
||||
for (uint16 i = 0; (i < _customFrame.chunks) && (!_G(modul)); i++) {
|
||||
ChunkHead chead;
|
||||
if (!chead.load(handle)) {
|
||||
error("flic error");
|
||||
|
@ -455,7 +456,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
|
|||
if (!File::readArray(handle, ¶[0], chead.size / 2)) {
|
||||
error("flic error");
|
||||
} else
|
||||
out->ausblenden(para[0]);
|
||||
_G(out)->ausblenden(para[0]);
|
||||
break;
|
||||
|
||||
case LOAD_MUSIC:
|
||||
|
@ -495,7 +496,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
|
|||
#ifndef AIL
|
||||
snd->playMod(th);
|
||||
#else
|
||||
sndPlayer->playMod(th);
|
||||
_G(sndPlayer)->playMod(th);
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
@ -512,7 +513,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
|
|||
#ifndef AIL
|
||||
snd->stopMod();
|
||||
#else
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
@ -522,7 +523,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
|
|||
#ifndef AIL
|
||||
snd->getMusicInfo(&mi);
|
||||
#else
|
||||
sndPlayer->getMusicInfo(&mi);
|
||||
_G(sndPlayer)->getMusicInfo(&mi);
|
||||
#endif
|
||||
} while (mi.musik_playing != 0);
|
||||
}
|
||||
|
@ -535,7 +536,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
|
|||
#ifndef AIL
|
||||
snd->setMusicMasterVol(para[0]);
|
||||
#else
|
||||
sndPlayer->setMusicMasterVol(para[0]);
|
||||
_G(sndPlayer)->setMusicMasterVol(para[0]);
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
@ -595,7 +596,7 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
|
|||
#ifndef AIL
|
||||
snd->fadeOut(para[0]);
|
||||
#else
|
||||
sndPlayer->fadeOut(para[0]);
|
||||
_G(sndPlayer)->fadeOut(para[0]);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
@ -611,14 +612,14 @@ void flic::decode_custom_frame(Common::SeekableReadStream *handle) {
|
|||
break;
|
||||
|
||||
case CLEAR_SCREEN:
|
||||
out->setze_zeiger(_virtScreen);
|
||||
out->cls();
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(_virtScreen);
|
||||
_G(out)->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
break;
|
||||
|
||||
default:
|
||||
out->printxy(0, 10, 255, 0, 0, "Unknown Chunk %d ", chead.type);
|
||||
_G(out)->printxy(0, 10, 255, 0, 0, "Unknown Chunk %d ", chead.type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -661,15 +662,15 @@ int16 flic::decode_cframe() {
|
|||
break;
|
||||
|
||||
case CLS:
|
||||
out->setze_zeiger(_virtScreen);
|
||||
out->cls();
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(_virtScreen);
|
||||
_G(out)->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
|
||||
update_flag = true;
|
||||
break;
|
||||
|
||||
case UNPRESSED:
|
||||
out->back2back(_loadBuffer, _virtScreen);
|
||||
_G(out)->back2back(_loadBuffer, _virtScreen);
|
||||
|
||||
update_flag = true;
|
||||
break;
|
||||
|
@ -678,8 +679,8 @@ int16 flic::decode_cframe() {
|
|||
break;
|
||||
|
||||
default:
|
||||
out->raster_col(255, 63, 63, 63);
|
||||
out->printxy(0, 0, 255, 0, 0, "Unknown CHUNK");
|
||||
_G(out)->raster_col(255, 63, 63, 63);
|
||||
_G(out)->printxy(0, 0, 255, 0, 0, "Unknown CHUNK");
|
||||
|
||||
update_flag = true;
|
||||
break;
|
||||
|
@ -690,16 +691,16 @@ int16 flic::decode_cframe() {
|
|||
|
||||
if (update_flag != false) {
|
||||
if (_customUser) {
|
||||
out->back2back(_virtScreen, _loadBuffer);
|
||||
out->setze_zeiger(_virtScreen);
|
||||
_G(out)->back2back(_virtScreen, _loadBuffer);
|
||||
_G(out)->setze_zeiger(_virtScreen);
|
||||
action_ret = _customUser(_currentFrame);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->back2screen(_virtScreen - 4);
|
||||
out->back2back(_loadBuffer, _virtScreen);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->back2screen(_virtScreen - 4);
|
||||
_G(out)->back2back(_loadBuffer, _virtScreen);
|
||||
} else
|
||||
out->back2screen(_virtScreen - 4);
|
||||
_G(out)->back2screen(_virtScreen - 4);
|
||||
if (_fadeFlag != false) {
|
||||
out->einblenden(_fadePal, _fadeDelay);
|
||||
_G(out)->einblenden(_fadePal, _fadeDelay);
|
||||
_fadeFlag = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "common/file.h"
|
||||
#include "chewy/chewy.h"
|
||||
#include "chewy/global.h"
|
||||
#include "chewy/gedclass.h"
|
||||
#include "chewy/ngshext.h"
|
||||
|
||||
|
@ -52,18 +53,18 @@ void gedclass::load_ged_chunk(GedChunkHeader *Gh, Common::SeekableReadStream *st
|
|||
int i = 0;
|
||||
do {
|
||||
if (!Gh->load(stream)) {
|
||||
modul = 3;
|
||||
fcode = 1;
|
||||
_G(modul) = 3;
|
||||
_G(fcode) = 1;
|
||||
} else if (i != nr) {
|
||||
// Skip over the entry's data
|
||||
stream->seek(Gh->Len, SEEK_CUR);
|
||||
}
|
||||
} while (!modul && ++i <= nr);
|
||||
} while (!_G(modul) && ++i <= nr);
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
if (stream->read(speicher, Gh->Len) != Gh->Len) {
|
||||
modul = 3;
|
||||
fcode = 1;
|
||||
_G(modul) = 3;
|
||||
_G(fcode) = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -45,6 +45,14 @@ extern const uint8 RAND_NO_USE[MAX_RAND_NO_USE];
|
|||
extern const int16 ANI_INVENT_END[3];
|
||||
extern const int16 SPZ_ANI_PH[][2];
|
||||
|
||||
class ChewyFont;
|
||||
class cursor;
|
||||
class FontMgr;
|
||||
class InputMgr;
|
||||
class io_game;
|
||||
class McgaGraphics;
|
||||
class memory;
|
||||
class SoundPlayer;
|
||||
|
||||
class Globals {
|
||||
class CurrentScreen : public Graphics::Surface {
|
||||
|
@ -111,6 +119,27 @@ public:
|
|||
int16 _r65tmp_ho_y = 0;
|
||||
int16 _r68HohesC = 0;
|
||||
|
||||
// main.cpp
|
||||
int16 _menu_flag = 0;
|
||||
bool _inv_disp_ok = 0;
|
||||
int16 _txt_aus_click = 0;
|
||||
int16 _txt_nummer = 0;
|
||||
int16 _tmp_menu_item = 0;
|
||||
int16 _cur_ausgang_flag = 0;
|
||||
int16 _room_start_nr = 0;
|
||||
int16 _TmpFrameSpeed = 0;
|
||||
InputMgr *_in = nullptr;
|
||||
memory *_mem = nullptr;
|
||||
io_game *_iog = nullptr;
|
||||
McgaGraphics *_out = nullptr;
|
||||
cursor *_cur = nullptr;
|
||||
SoundPlayer *_sndPlayer = nullptr;
|
||||
ChewyFont *_font6 = nullptr;
|
||||
ChewyFont *_font8 = nullptr;
|
||||
FontMgr *_fontMgr = nullptr;
|
||||
int16 _modul = 0;
|
||||
int16 _fcode = 0;
|
||||
|
||||
// mcga_graphics.cpp
|
||||
int16 _clipx1 = 0, _clipx2 = 0, _clipy1 = 0, _clipy2 = 0;
|
||||
int16 _gcurx = 0, _gcury = 0, _fvorx = 0, _fvory = 0;
|
||||
|
@ -237,7 +266,6 @@ extern effect *fx;
|
|||
extern atdsys *atds;
|
||||
extern flic *flc;
|
||||
extern movclass *mov;
|
||||
extern SoundPlayer *sndPlayer;
|
||||
|
||||
extern char backged[];
|
||||
extern AutoMov auto_mov[MAX_AUTO_MOV];
|
||||
|
|
|
@ -28,13 +28,12 @@
|
|||
|
||||
namespace Chewy {
|
||||
|
||||
extern int16 room_start_nr;
|
||||
static void font_load();
|
||||
|
||||
void standard_init() {
|
||||
mem = new memory();
|
||||
out = new McgaGraphics();
|
||||
in = new InputMgr();
|
||||
_G(mem) = new memory();
|
||||
_G(out) = new McgaGraphics();
|
||||
_G(in) = new InputMgr();
|
||||
fx = new effect();
|
||||
txt = new text();
|
||||
bit = new bitclass();
|
||||
|
@ -44,22 +43,22 @@ void standard_init() {
|
|||
uhr = new timer(MAX_TIMER_OBJ, ani_timer);
|
||||
det = new detail();
|
||||
atds = new atdsys();
|
||||
sndPlayer = new SoundPlayer();
|
||||
_G(sndPlayer) = new SoundPlayer();
|
||||
flc = new flic();
|
||||
mov = new movclass();
|
||||
|
||||
out->init();
|
||||
out->cls();
|
||||
out->palette_save();
|
||||
out->set_clip(0, 0, 320, 200);
|
||||
out->set_writemode(0);
|
||||
_G(out)->init();
|
||||
_G(out)->cls();
|
||||
_G(out)->palette_save();
|
||||
_G(out)->set_clip(0, 0, 320, 200);
|
||||
_G(out)->set_writemode(0);
|
||||
scr_width = 0;
|
||||
screen0 = (byte *)g_screen->getPixels();
|
||||
in->neuer_kb_handler(&kbinfo);
|
||||
_G(in)->neuer_kb_handler(&kbinfo);
|
||||
|
||||
in->rectangle(0, 0, 320, 210);
|
||||
in->neuer_maushandler(&minfo);
|
||||
out->init_mausmode(&minfo);
|
||||
_G(in)->rectangle(0, 0, 320, 210);
|
||||
_G(in)->neuer_maushandler(&minfo);
|
||||
_G(out)->init_mausmode(&minfo);
|
||||
curblk.page_off_x = 0;
|
||||
curblk.page_off_y = 0;
|
||||
curblk.xsize = 16;
|
||||
|
@ -67,7 +66,7 @@ void standard_init() {
|
|||
|
||||
// WORKAROUND: Moved from init_load because the original
|
||||
// uses curtaf->image below before curtaf was initialized
|
||||
curtaf = mem->taf_adr(CURSOR);
|
||||
curtaf = _G(mem)->taf_adr(CURSOR);
|
||||
|
||||
curblk.sprite = curtaf->image;
|
||||
curblk.cur_back = cur_back;
|
||||
|
@ -76,10 +75,10 @@ void standard_init() {
|
|||
curani.ani_end = 0;
|
||||
curani.delay = 0;
|
||||
|
||||
cur = new cursor(out, in, &curblk);
|
||||
cur->set_cur_ani(&curani);
|
||||
_G(cur) = new cursor(_G(out), _G(in), &curblk);
|
||||
_G(cur)->set_cur_ani(&curani);
|
||||
|
||||
iog = new io_game(out, in, cur);
|
||||
_G(iog) = new io_game(_G(out), _G(in), _G(cur));
|
||||
strcpy(ioptr.id, "CHE");
|
||||
strcpy(ioptr.save_path, SAVEDIR);
|
||||
ioptr.delay = 8;
|
||||
|
@ -87,12 +86,12 @@ void standard_init() {
|
|||
pal[765] = 63;
|
||||
pal[766] = 63;
|
||||
pal[767] = 63;
|
||||
out->einblenden(pal, 0);
|
||||
_G(out)->einblenden(pal, 0);
|
||||
room->set_timer_start(1);
|
||||
font_load();
|
||||
|
||||
out->cls();
|
||||
in->neuer_kb_handler(&kbinfo);
|
||||
_G(out)->cls();
|
||||
_G(in)->neuer_kb_handler(&kbinfo);
|
||||
|
||||
var_init();
|
||||
ablage = room->get_ablage();
|
||||
|
@ -102,8 +101,8 @@ void standard_init() {
|
|||
pal[765] = 63;
|
||||
pal[766] = 63;
|
||||
pal[767] = 63;
|
||||
out->einblenden(pal, 0);
|
||||
out->cls();
|
||||
_G(out)->einblenden(pal, 0);
|
||||
_G(out)->cls();
|
||||
uhr->set_new_timer(0, 5, SEC_10_MODE);
|
||||
|
||||
curblk.cur_back = cur_back;
|
||||
|
@ -162,7 +161,7 @@ void var_init() {
|
|||
_G(spieler).PersonRoomNr[i] = -1;
|
||||
_G(spieler).PersonDia[i] = -1;
|
||||
}
|
||||
_G(spieler).PersonRoomNr[P_CHEWY] = room_start_nr;
|
||||
_G(spieler).PersonRoomNr[P_CHEWY] = _G(room_start_nr);
|
||||
|
||||
gpkt.Vorschub = spieler_mi[P_CHEWY].Vorschub;
|
||||
init_room();
|
||||
|
@ -214,7 +213,7 @@ void init_atds() {
|
|||
atds->init_ats_mode(INV_USE_DATEI, _G(spieler).InvUse);
|
||||
atds->init_ats_mode(INV_USE_DEF, _G(spieler).InvUseDef);
|
||||
atds->open_handle(INV_USE_IDX, "rb", INV_IDX_DATEI);
|
||||
mem->file->fcopy(ADSH_TMP, "txt/diah.adh");
|
||||
_G(mem)->file->fcopy(ADSH_TMP, "txt/diah.adh");
|
||||
atds->open_handle(ADSH_TMP, "rb", 3);
|
||||
_G(spieler).AadSilent = 10;
|
||||
_G(spieler).DelaySpeed = 5;
|
||||
|
@ -284,24 +283,24 @@ void new_game() {
|
|||
static void font_load() {
|
||||
|
||||
// Load the 8x8 font
|
||||
mem->tff_adr(FONT8x8, &font8x8);
|
||||
out->set_fontadr(font8x8);
|
||||
_G(mem)->tff_adr(FONT8x8, &font8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
|
||||
int16 vorx;
|
||||
int16 vory;
|
||||
int16 fntbr;
|
||||
int16 fnth;
|
||||
out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
|
||||
_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
|
||||
fvorx8x8 = vorx;
|
||||
fvory8x8 = vory;
|
||||
|
||||
// Load the 6x8 font
|
||||
mem->tff_adr(FONT6x8, &font6x8);
|
||||
out->set_fontadr(font6x8);
|
||||
out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
|
||||
_G(mem)->tff_adr(FONT6x8, &font6x8);
|
||||
_G(out)->set_fontadr(font6x8);
|
||||
_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
|
||||
fvorx6x8 = vorx - 2;
|
||||
fvory6x8 = vory;
|
||||
out->set_vorschub(fvorx6x8, vory);
|
||||
_G(out)->set_vorschub(fvorx6x8, vory);
|
||||
atds->set_font(font8x8, fvorx8x8, 10);
|
||||
}
|
||||
|
||||
|
@ -313,24 +312,24 @@ void init_load() {
|
|||
spz_tinfo = nullptr;
|
||||
set_spz_delay(3);
|
||||
|
||||
menutaf = mem->taf_adr(MENUTAF);
|
||||
spblende = mem->void_adr("cut/blende.rnd");
|
||||
room->load_room(&room_blk, room_start_nr, &_G(spieler));
|
||||
out->set_palette(pal);
|
||||
menutaf = _G(mem)->taf_adr(MENUTAF);
|
||||
spblende = _G(mem)->void_adr("cut/blende.rnd");
|
||||
room->load_room(&room_blk, _G(room_start_nr), &_G(spieler));
|
||||
_G(out)->set_palette(pal);
|
||||
}
|
||||
|
||||
void tidy() {
|
||||
sound_exit();
|
||||
in->alter_kb_handler();
|
||||
in->init();
|
||||
_G(in)->alter_kb_handler();
|
||||
_G(in)->init();
|
||||
free_buffers();
|
||||
obj->free_inv_spr(&inv_spr[0]);
|
||||
|
||||
delete iog;
|
||||
delete cur;
|
||||
delete _G(iog);
|
||||
delete _G(cur);
|
||||
delete mov;
|
||||
delete flc;
|
||||
delete sndPlayer;
|
||||
delete _G(sndPlayer);
|
||||
delete atds;
|
||||
delete det;
|
||||
delete uhr;
|
||||
|
@ -340,15 +339,15 @@ void tidy() {
|
|||
delete bit;
|
||||
delete txt;
|
||||
delete fx;
|
||||
delete in;
|
||||
delete out;
|
||||
delete mem;
|
||||
delete _G(in);
|
||||
delete _G(out);
|
||||
delete _G(mem);
|
||||
|
||||
iog = nullptr;
|
||||
cur = nullptr;
|
||||
_G(iog) = nullptr;
|
||||
_G(cur) = nullptr;
|
||||
mov = nullptr;
|
||||
flc = nullptr;
|
||||
sndPlayer = nullptr;
|
||||
_G(sndPlayer) = nullptr;
|
||||
atds = nullptr;
|
||||
det = nullptr;
|
||||
uhr = nullptr;
|
||||
|
@ -358,13 +357,13 @@ void tidy() {
|
|||
bit = nullptr;
|
||||
txt = nullptr;
|
||||
fx = nullptr;
|
||||
in = nullptr;
|
||||
out = nullptr;
|
||||
mem = nullptr;
|
||||
_G(in) = nullptr;
|
||||
_G(out) = nullptr;
|
||||
_G(mem) = nullptr;
|
||||
}
|
||||
|
||||
void set_speed() {
|
||||
in->speed(_G(spieler).MausSpeed, _G(spieler).MausSpeed * 2);
|
||||
_G(in)->speed(_G(spieler).MausSpeed, _G(spieler).MausSpeed * 2);
|
||||
}
|
||||
|
||||
#define GRAVIS 8
|
||||
|
@ -375,11 +374,11 @@ void sound_init() {
|
|||
_G(spieler).MusicSwitch = false;
|
||||
frequenz = 22050;
|
||||
|
||||
sndPlayer->initMixMode();
|
||||
_G(sndPlayer)->initMixMode();
|
||||
_G(spieler).MusicVol = 63;
|
||||
_G(spieler).SoundVol = 63;
|
||||
sndPlayer->setMusicMasterVol(_G(spieler).MusicVol);
|
||||
sndPlayer->setSoundMasterVol(_G(spieler).SoundVol);
|
||||
_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
|
||||
_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
|
||||
|
||||
music_handle = room->open_handle(DETAIL_TVP, "rb", R_VOCDATEI);
|
||||
|
||||
|
@ -403,7 +402,7 @@ void sound_init() {
|
|||
}
|
||||
|
||||
void sound_exit() {
|
||||
sndPlayer->exitMixMode();
|
||||
_G(sndPlayer)->exitMixMode();
|
||||
}
|
||||
|
||||
void show_intro() {
|
||||
|
|
|
@ -177,7 +177,7 @@ void load_room_music(int16 room_nr) {
|
|||
default:
|
||||
ttp_index = -1;
|
||||
CurrentSong = -1;
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
break;
|
||||
}
|
||||
if (ttp_index != -1) {
|
||||
|
@ -185,25 +185,25 @@ void load_room_music(int16 room_nr) {
|
|||
volume = 0;
|
||||
else if (volume > _G(spieler).MusicVol)
|
||||
volume = _G(spieler).MusicVol;
|
||||
sndPlayer->setMusicMasterVol(volume);
|
||||
sndPlayer->setLoopMode(lp_mode);
|
||||
_G(sndPlayer)->setMusicMasterVol(volume);
|
||||
_G(sndPlayer)->setLoopMode(lp_mode);
|
||||
if (ttp_index != CurrentSong) {
|
||||
sndPlayer->stopMod();
|
||||
while (sndPlayer->musicPlaying());
|
||||
_G(sndPlayer)->stopMod();
|
||||
while (_G(sndPlayer)->musicPlaying());
|
||||
memset(Ci.MusicSlot, 0, MUSIC_SLOT_SIZE);
|
||||
mem->file->select_pool_item(music_handle, EndOfPool - ttp_index);
|
||||
mem->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
|
||||
_G(mem)->file->select_pool_item(music_handle, EndOfPool - ttp_index);
|
||||
_G(mem)->file->load_tmf(music_handle, (tmf_header *)Ci.MusicSlot);
|
||||
CurrentSong = ttp_index;
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
if (play_mode == NORMAL_PLAY)
|
||||
sndPlayer->playMod((tmf_header *)Ci.MusicSlot);
|
||||
_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
|
||||
else {
|
||||
sndPlayer->playMod((tmf_header *)Ci.MusicSlot);
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->playMod((tmf_header *)Ci.MusicSlot);
|
||||
_G(sndPlayer)->stopMod();
|
||||
if (play_mode == SEQUENCE_PLAY)
|
||||
sndPlayer->playSequence(seq_start, seq_end);
|
||||
_G(sndPlayer)->playSequence(seq_start, seq_end);
|
||||
else if (play_mode == PATTERN_PLAY)
|
||||
sndPlayer->playPattern(pattern);
|
||||
_G(sndPlayer)->playPattern(pattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,52 +33,23 @@ namespace Chewy {
|
|||
|
||||
#define AUSGANG_CHECK_PIX 8
|
||||
|
||||
int16 menu_flag;
|
||||
char cur_no_flag;
|
||||
bool inv_disp_ok;
|
||||
int16 txt_aus_click;
|
||||
int16 txt_nummer;
|
||||
int16 tmp_menu_item;
|
||||
int16 cur_ausgang_flag;
|
||||
int16 room_start_nr;
|
||||
int16 TmpFrameSpeed;
|
||||
static const int16 invent_display[4][2] = {
|
||||
{5, 0}, { 265, 0 }, { 265, 149 }, { 5, 149 }
|
||||
};
|
||||
|
||||
#if 0
|
||||
fehler *err;
|
||||
sblaster *snd;
|
||||
loudness *music;
|
||||
|
||||
#endif
|
||||
|
||||
InputMgr *in;
|
||||
memory *mem;
|
||||
io_game *iog;
|
||||
McgaGraphics *out;
|
||||
cursor *cur;
|
||||
#ifdef AIL
|
||||
SoundPlayer *sndPlayer;
|
||||
#endif
|
||||
|
||||
int16 modul = 0;
|
||||
int16 fcode = 0;
|
||||
|
||||
ChewyFont *_font6;
|
||||
ChewyFont *_font8;
|
||||
FontMgr *_fontMgr;
|
||||
|
||||
void switch_room(int16 nr);
|
||||
extern void switch_room(int16 nr);
|
||||
|
||||
void game_main() {
|
||||
_fontMgr = new FontMgr();
|
||||
_G(fontMgr) = new FontMgr();
|
||||
|
||||
_font8 = new ChewyFont("TXT/8X8.TFF");
|
||||
_font6 = new ChewyFont("TXT/6X8.TFF");
|
||||
_font6->setDisplaySize(_font6->getDataWidth() - 2, _font6->getDataHeight());
|
||||
_font8->setDeltaX(10);
|
||||
_G(font8) = new ChewyFont("TXT/8X8.TFF");
|
||||
_G(font6) = new ChewyFont("TXT/6X8.TFF");
|
||||
_G(font6)->setDisplaySize(_G(font6)->getDataWidth() - 2, _G(font6)->getDataHeight());
|
||||
_G(font8)->setDeltaX(10);
|
||||
|
||||
room_start_nr = 0;
|
||||
_G(room_start_nr) = 0;
|
||||
standard_init();
|
||||
out->cls();
|
||||
_G(out)->cls();
|
||||
cursor_wahl(CUR_WALK);
|
||||
workptr = workpage + 4l;
|
||||
|
||||
|
@ -93,7 +64,7 @@ void game_main() {
|
|||
|
||||
remove(ADSH_TMP);
|
||||
tidy();
|
||||
out->rest_palette();
|
||||
_G(out)->rest_palette();
|
||||
}
|
||||
|
||||
void alloc_buffers() {
|
||||
|
@ -245,11 +216,11 @@ void cursor_wahl(int16 nr) {
|
|||
|
||||
if (ok) {
|
||||
cur_move = true;
|
||||
cur->set_cur_ani(&curani);
|
||||
_G(cur)->set_cur_ani(&curani);
|
||||
int16 *xy = (int16 *)curblk.sprite[curani.ani_anf];
|
||||
_G(spieler).CurBreite = xy[0];
|
||||
_G(spieler).CurHoehe = xy[1];
|
||||
in->rectangle(0, 0, 320 - xy[0], 210 - xy[1]);
|
||||
_G(in)->rectangle(0, 0, 320 - xy[0], 210 - xy[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,31 +228,25 @@ void hide_cur() {
|
|||
if (!_G(cur_hide_flag)) {
|
||||
_G(cur_hide_flag) = true;
|
||||
flags.ShowAtsInvTxt = false;
|
||||
cur->hide_cur();
|
||||
_G(cur)->hide_cur();
|
||||
flags.CursorStatus = false;
|
||||
}
|
||||
}
|
||||
|
||||
void show_cur() {
|
||||
flags.ShowAtsInvTxt = true;
|
||||
cur->show_cur();
|
||||
_G(cur)->show_cur();
|
||||
flags.CursorStatus = true;
|
||||
}
|
||||
|
||||
int16 invent_display[4][2] = { {5, 0},
|
||||
{265, 0},
|
||||
{265, 149},
|
||||
{5, 149}
|
||||
};
|
||||
|
||||
void test_menu() {
|
||||
int16 ende;
|
||||
menu_lauflicht = 0;
|
||||
inv_disp_ok = false;
|
||||
_G(inv_disp_ok) = false;
|
||||
_G(spieler).inv_cur = false;
|
||||
menu_display = 0;
|
||||
_G(cur_display) = true;
|
||||
cur->show_cur();
|
||||
_G(cur)->show_cur();
|
||||
spieler_vector[P_CHEWY].Phase = 6;
|
||||
spieler_vector[P_CHEWY].PhAnz = chewy_ph_anz[spieler_vector[P_CHEWY].Phase];
|
||||
set_person_pos(160, 80, P_CHEWY, P_RIGHT);
|
||||
|
@ -289,10 +254,10 @@ void test_menu() {
|
|||
ende = false;
|
||||
kbinfo.scan_code = Common::KEYCODE_INVALID;
|
||||
flags.main_maus_flag = false;
|
||||
tmp_menu_item = false;
|
||||
_G(tmp_menu_item) = false;
|
||||
_G(maus_links_click) = false;
|
||||
_G(spieler).PersonHide[P_CHEWY] = false;
|
||||
txt_aus_click = false;
|
||||
_G(txt_aus_click) = false;
|
||||
fx_blend = BLEND3;
|
||||
_G(auto_obj) = 0;
|
||||
flags.MainInput = true;
|
||||
|
@ -356,18 +321,18 @@ int16 main_loop(int16 mode) {
|
|||
|
||||
case F5_KEY:
|
||||
case SPACE:
|
||||
tmp_menu_item = menu_item;
|
||||
_G(tmp_menu_item) = menu_item;
|
||||
maus_old_x = minfo.x;
|
||||
maus_old_y = minfo.y;
|
||||
menu_item = CUR_USE;
|
||||
menu_entry();
|
||||
Dialogs::Inventory::menu();
|
||||
menu_exit();
|
||||
menu_flag = MENU_AUSBLENDEN;
|
||||
_G(menu_flag) = MENU_AUSBLENDEN;
|
||||
menu_display = 0;
|
||||
_G(cur_display) = true;
|
||||
if (_G(spieler).AkInvent == -1) {
|
||||
menu_item = tmp_menu_item;
|
||||
menu_item = _G(tmp_menu_item);
|
||||
cursor_wahl(menu_item);
|
||||
_G(spieler).inv_cur = false;
|
||||
} else {
|
||||
|
@ -383,9 +348,9 @@ int16 main_loop(int16 mode) {
|
|||
case F6_KEY:
|
||||
flags.SaveMenu = true;
|
||||
|
||||
out->setze_zeiger(screen0);
|
||||
out->set_fontadr(font6x8);
|
||||
out->set_vorschub(fvorx6x8, fvory6x8);
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
_G(out)->set_fontadr(font6x8);
|
||||
_G(out)->set_vorschub(fvorx6x8, fvory6x8);
|
||||
cursor_wahl(CUR_SAVE);
|
||||
if (Dialogs::Files::execute(true) == 1) {
|
||||
ende = 1;
|
||||
|
@ -397,23 +362,23 @@ int16 main_loop(int16 mode) {
|
|||
cursor_wahl(menu_item);
|
||||
_G(cur_display) = true;
|
||||
flags.SaveMenu = false;
|
||||
cur->show_cur();
|
||||
out->setze_zeiger(workptr);
|
||||
_G(cur)->show_cur();
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
break;
|
||||
|
||||
case ESC:
|
||||
if (menu_display == 0) {
|
||||
menu_entry();
|
||||
tmp_menu_item = menu_item;
|
||||
_G(tmp_menu_item) = menu_item;
|
||||
maus_old_x = minfo.x;
|
||||
maus_old_y = minfo.y;
|
||||
menu_display = MENU_EINBLENDEN;
|
||||
maus_menu_x = (MAUS_MENU_MAX_X / 5) * (menu_item);
|
||||
_G(cur_display) = false;
|
||||
cur->move(maus_menu_x, 100);
|
||||
_G(cur)->move(maus_menu_x, 100);
|
||||
} else {
|
||||
menu_exit();
|
||||
menu_item = tmp_menu_item;
|
||||
menu_item = _G(tmp_menu_item);
|
||||
menu_display = MENU_AUSBLENDEN;
|
||||
if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
|
||||
cursor_wahl(CUR_AK_INVENT);
|
||||
|
@ -430,11 +395,11 @@ int16 main_loop(int16 mode) {
|
|||
menu_entry();
|
||||
Dialogs::Inventory::menu();
|
||||
menu_exit();
|
||||
menu_flag = MENU_AUSBLENDEN;
|
||||
_G(menu_flag) = MENU_AUSBLENDEN;
|
||||
menu_display = 0;
|
||||
_G(cur_display) = true;
|
||||
if (_G(spieler).AkInvent == -1) {
|
||||
menu_item = tmp_menu_item;
|
||||
menu_item = _G(tmp_menu_item);
|
||||
cursor_wahl(menu_item);
|
||||
_G(spieler).inv_cur = false;
|
||||
} else {
|
||||
|
@ -447,13 +412,13 @@ int16 main_loop(int16 mode) {
|
|||
case CUR_SAVE:
|
||||
flags.SaveMenu = true;
|
||||
menu_display = MENU_EINBLENDEN;
|
||||
cur->move(152, 92);
|
||||
_G(cur)->move(152, 92);
|
||||
minfo.x = 152;
|
||||
minfo.y = 92;
|
||||
out->set_fontadr(font6x8);
|
||||
out->set_vorschub(fvorx6x8, fvory6x8);
|
||||
_G(out)->set_fontadr(font6x8);
|
||||
_G(out)->set_vorschub(fvorx6x8, fvory6x8);
|
||||
|
||||
out->setze_zeiger(screen0);
|
||||
_G(out)->setze_zeiger(screen0);
|
||||
cursor_wahl(CUR_SAVE);
|
||||
ret = Dialogs::Files::execute(true);
|
||||
if (ret == IOG_END) {
|
||||
|
@ -461,27 +426,27 @@ int16 main_loop(int16 mode) {
|
|||
fx_blend = BLEND4;
|
||||
}
|
||||
|
||||
out->setze_zeiger(workptr);
|
||||
menu_item = tmp_menu_item;
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
menu_item = _G(tmp_menu_item);
|
||||
menu_display = MENU_AUSBLENDEN;
|
||||
|
||||
if (_G(spieler).inv_cur && _G(spieler).AkInvent != -1 && menu_item == CUR_USE) {
|
||||
cursor_wahl(CUR_AK_INVENT);
|
||||
} else
|
||||
cursor_wahl(tmp_menu_item);
|
||||
cursor_wahl(_G(tmp_menu_item));
|
||||
_G(cur_display) = true;
|
||||
|
||||
flags.SaveMenu = false;
|
||||
cur->show_cur();
|
||||
_G(cur)->show_cur();
|
||||
break;
|
||||
|
||||
default:
|
||||
if (menu_display != 0) {
|
||||
menu_exit();
|
||||
menu_flag = MENU_AUSBLENDEN;
|
||||
_G(menu_flag) = MENU_AUSBLENDEN;
|
||||
menu_display = 0;
|
||||
_G(cur_display) = true;
|
||||
cur->move(maus_old_x, maus_old_y);
|
||||
_G(cur)->move(maus_old_x, maus_old_y);
|
||||
minfo.x = maus_old_x;
|
||||
minfo.y = maus_old_y;
|
||||
_G(spieler).inv_cur = false;
|
||||
|
@ -519,10 +484,10 @@ int16 main_loop(int16 mode) {
|
|||
|
||||
if (menu_display == MENU_AUSBLENDEN) {
|
||||
menu_exit();
|
||||
menu_flag = MENU_AUSBLENDEN;
|
||||
_G(menu_flag) = MENU_AUSBLENDEN;
|
||||
menu_display = 0;
|
||||
_G(cur_display) = true;
|
||||
cur->move(maus_old_x, maus_old_y);
|
||||
_G(cur)->move(maus_old_x, maus_old_y);
|
||||
minfo.x = maus_old_x;
|
||||
minfo.y = maus_old_y;
|
||||
}
|
||||
|
@ -577,15 +542,15 @@ void set_up_screen(SetupScreenMode mode) {
|
|||
det->set_global_delay(_G(spieler).DelaySpeed);
|
||||
}
|
||||
++FrameSpeed;
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
|
||||
|
||||
for (i = 0; i < MAX_PERSON; i++)
|
||||
zoom_mov_anpass(&spieler_vector[i], &spieler_mi[i]);
|
||||
|
||||
if (SetUpScreenFunc && menu_display == 0 && !flags.InventMenu) {
|
||||
SetUpScreenFunc();
|
||||
out->setze_zeiger(workptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
}
|
||||
|
||||
sprite_engine();
|
||||
|
@ -603,7 +568,7 @@ void set_up_screen(SetupScreenMode mode) {
|
|||
if (_G(spieler).AkInvent != -1 && _G(spieler).DispFlag) {
|
||||
build_menu(invent_display[_G(spieler).InvDisp][0],
|
||||
invent_display[_G(spieler).InvDisp][1], 3, 3, 60, 0);
|
||||
out->sprite_set(inv_spr[_G(spieler).AkInvent],
|
||||
_G(out)->sprite_set(inv_spr[_G(spieler).AkInvent],
|
||||
invent_display[_G(spieler).InvDisp][0] + 1 + _G(spieler).DispZx,
|
||||
invent_display[_G(spieler).InvDisp][1] + 1 + _G(spieler).DispZy
|
||||
, scr_width);
|
||||
|
@ -613,7 +578,7 @@ void set_up_screen(SetupScreenMode mode) {
|
|||
ads_menu();
|
||||
if (_G(maus_links_click)) {
|
||||
if (menu_item == CUR_WALK) {
|
||||
if (cur_ausgang_flag) {
|
||||
if (_G(cur_ausgang_flag)) {
|
||||
calc_ausgang(minfo.x + _G(spieler).scrollx, minfo.y + _G(spieler).scrolly);
|
||||
} else {
|
||||
if (!flags.ChewyDontGo) {
|
||||
|
@ -681,10 +646,10 @@ void set_up_screen(SetupScreenMode mode) {
|
|||
}
|
||||
}
|
||||
if (_G(cur_display) == true && mode == DO_SETUP) {
|
||||
cur->plot_cur();
|
||||
_G(cur)->plot_cur();
|
||||
|
||||
if ((_G(spieler).inv_cur) && (flags.CursorStatus == true))
|
||||
out->sprite_set(curtaf->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
|
||||
_G(out)->sprite_set(curtaf->image[_G(pfeil_ani) + 32], minfo.x, minfo.y,
|
||||
scr_width);
|
||||
if (_G(pfeil_delay) == 0) {
|
||||
_G(pfeil_delay) = _G(spieler).DelaySpeed;
|
||||
|
@ -702,9 +667,9 @@ void set_up_screen(SetupScreenMode mode) {
|
|||
atds->print_ats(spieler_vector[P_CHEWY].Xypos[0] + CH_HOT_X,
|
||||
spieler_vector[P_CHEWY].Xypos[1], _G(spieler).scrollx, _G(spieler).scrolly);
|
||||
_G(maus_links_click) = false;
|
||||
menu_flag = false;
|
||||
_G(menu_flag) = false;
|
||||
if (mode == DO_SETUP) {
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
switch (fx_blend) {
|
||||
case BLEND1:
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
|
@ -719,14 +684,14 @@ void set_up_screen(SetupScreenMode mode) {
|
|||
break;
|
||||
|
||||
case BLEND4:
|
||||
out->setze_zeiger(workptr);
|
||||
out->cls();
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
out->back2screen(workpage);
|
||||
_G(out)->back2screen(workpage);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -771,8 +736,8 @@ void mous_obj_action(int16 nr, int16 mode, int16 txt_mode, int16 txt_nr) {
|
|||
|
||||
}
|
||||
if (str_adr) {
|
||||
out->set_fontadr(font8x8);
|
||||
out->set_vorschub(fvorx8x8, fvory8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
_G(out)->set_vorschub(fvorx8x8, fvory8x8);
|
||||
x = minfo.x;
|
||||
y = minfo.y;
|
||||
calc_txt_xy(&x, &y, str_adr, anz);
|
||||
|
@ -828,7 +793,7 @@ void kb_mov(int16 mode) {
|
|||
int16 ende;
|
||||
ende = 0;
|
||||
while (!ende) {
|
||||
switch (in->get_switch_code()) {
|
||||
switch (_G(in)->get_switch_code()) {
|
||||
case CURSOR_RIGHT:
|
||||
if (minfo.x < 320 - _G(spieler).CurBreite)
|
||||
minfo.x += 2;
|
||||
|
@ -854,7 +819,7 @@ void kb_mov(int16 mode) {
|
|||
break;
|
||||
|
||||
}
|
||||
cur->move(minfo.x, minfo.y);
|
||||
_G(cur)->move(minfo.x, minfo.y);
|
||||
if (mode)
|
||||
ende = 1;
|
||||
else
|
||||
|
@ -872,7 +837,7 @@ void kb_cur_action(int16 key, int16 mode) {
|
|||
else
|
||||
menu_item = CUR_WALK;
|
||||
maus_menu_x = (menu_item) * (MAUS_MENU_MAX_X / 5);
|
||||
cur->move(maus_menu_x, 100);
|
||||
_G(cur)->move(maus_menu_x, 100);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -883,7 +848,7 @@ void kb_cur_action(int16 key, int16 mode) {
|
|||
else
|
||||
menu_item = CUR_INVENT;
|
||||
maus_menu_x = (menu_item) * (MAUS_MENU_MAX_X / 5);
|
||||
cur->move(maus_menu_x, 100);
|
||||
_G(cur)->move(maus_menu_x, 100);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -913,15 +878,15 @@ void maus_action() {
|
|||
x < invent_display[_G(spieler).InvDisp][0] + 48 &&
|
||||
y > invent_display[_G(spieler).InvDisp][1] &&
|
||||
y < invent_display[_G(spieler).InvDisp][1] + 48) {
|
||||
if (!_G(spieler).inv_cur && !inv_disp_ok && _G(spieler).AkInvent != -1) {
|
||||
if (!_G(spieler).inv_cur && !_G(inv_disp_ok) && _G(spieler).AkInvent != -1) {
|
||||
cursor_wahl(CUR_USE);
|
||||
}
|
||||
inv_disp_ok = true;
|
||||
_G(inv_disp_ok) = true;
|
||||
} else {
|
||||
if (!_G(spieler).inv_cur && inv_disp_ok) {
|
||||
if (!_G(spieler).inv_cur && _G(inv_disp_ok)) {
|
||||
cursor_wahl(menu_item);
|
||||
}
|
||||
inv_disp_ok = false;
|
||||
_G(inv_disp_ok) = false;
|
||||
}
|
||||
if (atds->aad_get_status() == -1) {
|
||||
if (minfo.button || kbinfo.key_code == ESC || kbinfo.key_code == ENTER) {
|
||||
|
@ -935,7 +900,7 @@ void maus_action() {
|
|||
if (menu_display == MENU_EINBLENDEN)
|
||||
kbinfo.scan_code = ENTER;
|
||||
else if (_G(spieler).AkInvent != -1) {
|
||||
if (inv_disp_ok) {
|
||||
if (_G(inv_disp_ok)) {
|
||||
if (_G(spieler).inv_cur) {
|
||||
menu_item = CUR_USE;
|
||||
cursor_wahl(menu_item);
|
||||
|
@ -1233,8 +1198,8 @@ void check_shad(int16 g_idx, int16 mode) {
|
|||
}
|
||||
|
||||
void print_shad(int16 x, int16 y, int16 fcol, int16 bcol, int16 scol, int16 scr_w, char *txtptr) {
|
||||
out->printxy(x + 1, y + 1, scol, bcol, scr_w, txtptr);
|
||||
out->printxy(x, y, fcol, bcol, scr_w, txtptr);
|
||||
_G(out)->printxy(x + 1, y + 1, scol, bcol, scr_w, txtptr);
|
||||
_G(out)->printxy(x, y, fcol, bcol, scr_w, txtptr);
|
||||
}
|
||||
|
||||
bool auto_move(int16 mov_nr, int16 p_nr) {
|
||||
|
@ -1276,7 +1241,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
|
|||
while (mov->auto_go_status()) {
|
||||
if (SHOULD_QUIT)
|
||||
return 0;
|
||||
if (in->get_switch_code() == ESC) {
|
||||
if (_G(in)->get_switch_code() == ESC) {
|
||||
if (flags.ExitMov || flags.BreakAMov) {
|
||||
key = ESC;
|
||||
mov->stop_auto_go();
|
||||
|
@ -1295,7 +1260,7 @@ bool auto_move(int16 mov_nr, int16 p_nr) {
|
|||
mov->get_mov_vector((int16 *)spieler_mi[p_nr].XyzStart, spieler_mi[p_nr].Vorschub, &spieler_vector[p_nr]);
|
||||
get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
|
||||
while (!ende) {
|
||||
if (in->get_switch_code() == ESC || key == ESC) {
|
||||
if (_G(in)->get_switch_code() == ESC || key == ESC) {
|
||||
if (flags.ExitMov || flags.BreakAMov) {
|
||||
spieler_vector[p_nr].Count = 0;
|
||||
move_status = false;
|
||||
|
@ -1348,7 +1313,7 @@ void go_auto_xy(int16 x, int16 y, int16 p_nr, int16 mode) {
|
|||
get_phase(&spieler_vector[p_nr], &spieler_mi[p_nr]);
|
||||
if (mode == ANI_WAIT) {
|
||||
while (!ende) {
|
||||
if (in->get_switch_code() == ESC) {
|
||||
if (_G(in)->get_switch_code() == ESC) {
|
||||
if (flags.ExitMov || flags.BreakAMov) {
|
||||
spieler_vector[p_nr].Count = 0;
|
||||
move_status = false;
|
||||
|
@ -1504,8 +1469,8 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) {
|
|||
char *str_ = atds->ats_get_txt(txt_nr, TXT_MARK_NAME, &anz, ATS_DATEI);
|
||||
if (str_ != 0) {
|
||||
ret = txt_nr;
|
||||
out->set_fontadr(font8x8);
|
||||
out->set_vorschub(fvorx8x8, fvory8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
_G(out)->set_vorschub(fvorx8x8, fvory8x8);
|
||||
calc_txt_xy(&x, &y, str_, anz);
|
||||
for (i = 0; i < anz; i++)
|
||||
print_shad(x, y + i * 10, 255, 300, 0, scr_width, txt->str_pos((char *)str_, i));
|
||||
|
@ -1578,8 +1543,8 @@ void calc_mouse_person(int16 x, int16 y) {
|
|||
p_nr = is_mouse_person(x, y);
|
||||
if (p_nr != -1) {
|
||||
if (!_G(spieler).PersonHide[p_nr]) {
|
||||
out->set_fontadr(font8x8);
|
||||
out->set_vorschub(fvorx8x8, fvory8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
_G(out)->set_vorschub(fvorx8x8, fvory8x8);
|
||||
char *str_ = ch_txt[p_nr];
|
||||
calc_txt_xy(&x, &y, str_, 1);
|
||||
print_shad(x, y, 255, 300, 0, scr_width, str_);
|
||||
|
@ -1706,22 +1671,22 @@ void get_user_key(int16 mode) {
|
|||
maus_action();
|
||||
_G(maus_links_click) = false;
|
||||
|
||||
if (!inv_disp_ok) {
|
||||
switch (in->get_switch_code()) {
|
||||
if (!_G(inv_disp_ok)) {
|
||||
switch (_G(in)->get_switch_code()) {
|
||||
case F5_KEY:
|
||||
case SPACE:
|
||||
case ESC:
|
||||
maus_old_x = minfo.x;
|
||||
maus_old_y = minfo.y;
|
||||
|
||||
tmp_menu_item = menu_item;
|
||||
_G(tmp_menu_item) = menu_item;
|
||||
menu_item = CUR_USE;
|
||||
Dialogs::Inventory::menu();
|
||||
menu_flag = MENU_AUSBLENDEN;
|
||||
_G(menu_flag) = MENU_AUSBLENDEN;
|
||||
menu_display = 0;
|
||||
_G(cur_display) = true;
|
||||
if (_G(spieler).AkInvent == -1) {
|
||||
menu_item = tmp_menu_item;
|
||||
menu_item = _G(tmp_menu_item);
|
||||
cursor_wahl(menu_item);
|
||||
_G(spieler).inv_cur = false;
|
||||
} else {
|
||||
|
@ -1786,22 +1751,22 @@ void check_mouse_ausgang(int16 x, int16 y) {
|
|||
|
||||
switch (attr) {
|
||||
case AUSGANG_LINKS:
|
||||
cur_ausgang_flag = AUSGANG_LINKS;
|
||||
_G(cur_ausgang_flag) = AUSGANG_LINKS;
|
||||
cursor_wahl(CUR_AUSGANG_LINKS);
|
||||
break;
|
||||
|
||||
case AUSGANG_RECHTS:
|
||||
cur_ausgang_flag = AUSGANG_RECHTS;
|
||||
_G(cur_ausgang_flag) = AUSGANG_RECHTS;
|
||||
cursor_wahl(CUR_AUSGANG_RECHTS);
|
||||
break;
|
||||
|
||||
case AUSGANG_OBEN:
|
||||
cur_ausgang_flag = AUSGANG_OBEN;
|
||||
_G(cur_ausgang_flag) = AUSGANG_OBEN;
|
||||
cursor_wahl(CUR_AUSGANG_OBEN);
|
||||
break;
|
||||
|
||||
case AUSGANG_UNTEN:
|
||||
cur_ausgang_flag = AUSGANG_UNTEN;
|
||||
_G(cur_ausgang_flag) = AUSGANG_UNTEN;
|
||||
cursor_wahl(CUR_AUSGANG_UNTEN);
|
||||
break;
|
||||
|
||||
|
@ -1810,9 +1775,9 @@ void check_mouse_ausgang(int16 x, int16 y) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (cur_ausgang_flag && !found) {
|
||||
if (_G(cur_ausgang_flag) && !found) {
|
||||
cursor_wahl(menu_item);
|
||||
cur_ausgang_flag = false;
|
||||
_G(cur_ausgang_flag) = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,15 +29,10 @@
|
|||
|
||||
namespace Chewy {
|
||||
|
||||
extern int16 menu_flag;
|
||||
extern bool inv_disp_ok;
|
||||
extern int16 tmp_menu_item;
|
||||
|
||||
void game_main();
|
||||
void free_buffers();
|
||||
void plot_main_menu();
|
||||
void test_menu();
|
||||
void shading(int16 new_shad_nr);
|
||||
void palcopy(byte *dipal, const byte *sipal, int16 distart,
|
||||
int16 sistart, int16 anz);
|
||||
short calc_maus_txt(int16 x, int16 y, int16 mode);
|
||||
|
@ -83,10 +78,6 @@ public:
|
|||
ChewyFont *getFont() { return _font; }
|
||||
};
|
||||
|
||||
extern ChewyFont *_font6;
|
||||
extern ChewyFont *_font8;
|
||||
extern FontMgr *_fontMgr;
|
||||
|
||||
} // namespace Chewy
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,14 +21,12 @@
|
|||
|
||||
#include "common/memstream.h"
|
||||
#include "chewy/memory.h"
|
||||
#include "chewy/global.h"
|
||||
#include "chewy/types.h"
|
||||
#include "chewy/resource.h"
|
||||
|
||||
namespace Chewy {
|
||||
|
||||
extern int16 modul;
|
||||
extern int16 fcode;
|
||||
|
||||
memory::memory() {
|
||||
file = new Data();
|
||||
}
|
||||
|
@ -90,7 +88,7 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
|
|||
|
||||
rs->seek(ptr, SEEK_SET);
|
||||
size = 0;
|
||||
for (i = 0; i < image_anz && !modul; i++) {
|
||||
for (i = 0; i < image_anz && !_G(modul); i++) {
|
||||
if (iheader.load(rs)) {
|
||||
size += iheader.width * iheader.height;
|
||||
rs->seek(iheader.next, SEEK_SET);
|
||||
|
@ -99,13 +97,13 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
|
|||
error("taf_seq_adr error");
|
||||
}
|
||||
}
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
size += image_anz * sizeof(byte *);
|
||||
size += image_anz * sizeof(char *);
|
||||
size += ((uint32)sizeof(taf_seq_info));
|
||||
tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
ts_info = (taf_seq_info *)tmp1;
|
||||
ts_info->anzahl = image_anz;
|
||||
ts_info->image = (byte **)(tmp1 + sizeof(taf_seq_info));
|
||||
|
@ -114,7 +112,7 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
|
|||
sp_ptr = tmp1 + (((uint32)sizeof(taf_seq_info))
|
||||
+ (image_anz * sizeof(char *)));
|
||||
|
||||
for (i = 0; i < image_anz && !modul; i++) {
|
||||
for (i = 0; i < image_anz && !_G(modul); i++) {
|
||||
if (iheader.load(rs)) {
|
||||
ts_info->image[i] = sp_ptr;
|
||||
abmess = (int16 *)sp_ptr;
|
||||
|
@ -132,7 +130,7 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
|
|||
error("taf_seq_adr error");
|
||||
}
|
||||
}
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
rs->seek((-(int)(((header.count * 2) - image_start) * sizeof(uint32))), SEEK_END);
|
||||
|
||||
if ((rs->size() - rs->pos()) < (int)image_anz * 4) {
|
||||
|
@ -143,7 +141,7 @@ taf_seq_info *memory::taf_seq_adr(int16 image_start, int16 image_anz) {
|
|||
*p = rs->readSint16LE();
|
||||
}
|
||||
}
|
||||
if (modul)
|
||||
if (_G(modul))
|
||||
free(tmp1);
|
||||
}
|
||||
}
|
||||
|
@ -166,17 +164,17 @@ void memory::tff_adr(const char *filename, byte **speicher) {
|
|||
uint32 size;
|
||||
size = file->size(filename, TFFDATEI);
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
*speicher = (byte *)MALLOC(size);
|
||||
if (*speicher) {
|
||||
file->load_tff(filename, *speicher);
|
||||
if (modul) {
|
||||
if (_G(modul)) {
|
||||
free(*speicher);
|
||||
*speicher = 0;
|
||||
}
|
||||
} else {
|
||||
fcode = NOSPEICHER;
|
||||
modul = SPEICHER;
|
||||
_G(fcode) = NOSPEICHER;
|
||||
_G(modul) = SPEICHER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -187,12 +185,12 @@ byte *memory::void_adr(const char *filename) {
|
|||
byte *ptr = 0;
|
||||
size = file->size(filename, 200);
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
ptr = (byte *)MALLOC(size * sizeof(uint32));
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
*(uint32 *)ptr = size;
|
||||
file->void_load(filename, ptr + sizeof(uint32), size);
|
||||
if (modul)
|
||||
if (_G(modul))
|
||||
free(ptr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ void plot_main_menu() {
|
|||
deltaX = -40;
|
||||
}
|
||||
|
||||
out->scale_set(menutaf->image[i],
|
||||
_G(out)->scale_set(menutaf->image[i],
|
||||
MENU_X + deltaX + korrektur[i * 2],
|
||||
_G(spieler).MainMenuY + korrektur[i * 2 + 1],
|
||||
zoomx, zoomy, 0);
|
||||
|
@ -80,7 +80,7 @@ void plot_main_menu() {
|
|||
deltaX = 40;
|
||||
|
||||
int img = IMAGES[menu_item];
|
||||
out->scale_set(menutaf->image[img],
|
||||
_G(out)->scale_set(menutaf->image[img],
|
||||
MENU_X + deltaX + korrektur[img * 2] - 5,
|
||||
_G(spieler).MainMenuY + korrektur[img * 2 + 1] - 10,
|
||||
zoomx, zoomy, 0);
|
||||
|
@ -106,7 +106,7 @@ void calc_txt_xy(int16 *x, int16 *y, char *txt_adr, int16 txt_anz) {
|
|||
int16 pix_len;
|
||||
int16 tmp_len;
|
||||
int16 i;
|
||||
out->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
|
||||
_G(out)->get_fontinfo(&vorx, &vory, &fntbr, &fnth);
|
||||
len = 0;
|
||||
for (i = 0; i < txt_anz; i++) {
|
||||
|
||||
|
@ -169,14 +169,14 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
|
|||
xy[3][1] = y + 16 * (yanz - 1);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
out->sprite_set(menutaf->image[(int16)sprite_eckenr[i]],
|
||||
_G(out)->sprite_set(menutaf->image[(int16)sprite_eckenr[i]],
|
||||
xy[i][0], xy[i][1], scr_width);
|
||||
|
||||
s_nr = BAU_MENU_SEITE_L;
|
||||
for (j = 0; j < 2; j++) {
|
||||
y = xy[j][1] + 16;
|
||||
for (i = 0; i < yanz - 2; i++) {
|
||||
out->sprite_set(menutaf->image[s_nr], xy[j][0], y + i * 16, scr_width);
|
||||
_G(out)->sprite_set(menutaf->image[s_nr], xy[j][0], y + i * 16, scr_width);
|
||||
}
|
||||
++s_nr;
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
|
|||
x = xy[j * 2][0] + 16;
|
||||
if ((!mode) || (mode == 1 && j == 1)) {
|
||||
for (i = 0; i < xanz - 2; i++) {
|
||||
out->sprite_set(menutaf->image[s_nr],
|
||||
_G(out)->sprite_set(menutaf->image[s_nr],
|
||||
xy[2][0] + 16 + i * 16, xy[j * 2][1], scr_width);
|
||||
}
|
||||
}
|
||||
|
@ -212,22 +212,22 @@ void build_menu(int16 x, int16 y, int16 xanz, int16 yanz, int16 col, int16 mode)
|
|||
x = xy[0][0] + 16;
|
||||
for (j = 0; j < 2; j++) {
|
||||
for (i = 0; i < leer; i++)
|
||||
out->sprite_set(menutaf->image[BAU_MENU_OBEN],
|
||||
_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN],
|
||||
x + i * 16, xy[0][1], scr_width);
|
||||
x = xy[1][0] - leer * 16;
|
||||
}
|
||||
out->sprite_set(menutaf->image[BAU_MENU_OBEN_L],
|
||||
_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_L],
|
||||
xy[0][0] + 16 + leer * 16, xy[0][1], scr_width);
|
||||
|
||||
x = xy[0][0] + 16 + leer * 16 + 32;
|
||||
for (i = 0; i < mitte; i++)
|
||||
out->sprite_set(menutaf->image[BAU_MENU_OBEN_M],
|
||||
_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_M],
|
||||
x + i * 16, xy[0][1], scr_width);
|
||||
out->sprite_set(menutaf->image[BAU_MENU_OBEN_R],
|
||||
_G(out)->sprite_set(menutaf->image[BAU_MENU_OBEN_R],
|
||||
x + i * 16, xy[0][1], scr_width);
|
||||
}
|
||||
|
||||
out->box_fill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xanz - 2) * 16,
|
||||
_G(out)->box_fill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xanz - 2) * 16,
|
||||
xy[0][1] + 16 + (yanz - 2) * 16, col);
|
||||
}
|
||||
|
||||
|
@ -285,8 +285,8 @@ void ads_menu() {
|
|||
_G(cur_display) = true;
|
||||
|
||||
build_menu(ADS_WIN);
|
||||
out->set_fontadr(font6x8);
|
||||
out->set_vorschub(fvorx6x8, fvory6x8);
|
||||
_G(out)->set_fontadr(font6x8);
|
||||
_G(out)->set_vorschub(fvorx6x8, fvory6x8);
|
||||
if (ads_item_anz > 4)
|
||||
cur_y_start = 190;
|
||||
else
|
||||
|
@ -296,11 +296,11 @@ void ads_menu() {
|
|||
col = 255;
|
||||
else
|
||||
col = 14;
|
||||
out->printxy(4, cur_y_start - i * 10, col, 300, 0, ads_item_ptr[i]);
|
||||
_G(out)->printxy(4, cur_y_start - i * 10, col, 300, 0, ads_item_ptr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
switch (in->get_switch_code()) {
|
||||
switch (_G(in)->get_switch_code()) {
|
||||
case 255:
|
||||
case ENTER:
|
||||
if (cur_y < ads_item_anz && cur_y >= 0 && ads_push == false) {
|
||||
|
|
|
@ -35,9 +35,6 @@ extern bool mouse_links_los;
|
|||
extern bool mouse_active;
|
||||
extern bool cur_move;
|
||||
|
||||
extern int16 modul;
|
||||
extern int16 fcode;
|
||||
|
||||
class InputMgr {
|
||||
public:
|
||||
InputMgr();
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace Chewy {
|
|||
#define ODER 2
|
||||
#define XODER 3
|
||||
|
||||
#define COPY_PAGE out->screen2screen
|
||||
#define COPY_PAGE _G(out)->screen2screen
|
||||
|
||||
#define END_POOL 32767
|
||||
|
||||
|
|
|
@ -39,19 +39,9 @@ namespace Chewy {
|
|||
|
||||
class sblaster;
|
||||
|
||||
extern McgaGraphics *out;
|
||||
extern memory *mem;
|
||||
extern InputMgr *in;
|
||||
extern sblaster *snd;
|
||||
extern io_game *iog;
|
||||
extern cursor *cur;
|
||||
#ifdef AIL
|
||||
extern SoundPlayer *sndPlayer;
|
||||
#endif
|
||||
|
||||
extern uint16 _stklen;
|
||||
extern int16 modul;
|
||||
extern int16 fcode;
|
||||
|
||||
} // namespace Chewy
|
||||
|
||||
|
|
|
@ -308,7 +308,7 @@ int16 ged_user_func(int16 idx_nr) {
|
|||
void enter_room(int16 eib_nr) {
|
||||
int16 i;
|
||||
|
||||
if (!modul)
|
||||
if (!_G(modul))
|
||||
load_room_music(_G(spieler).PersonRoomNr[P_CHEWY]);
|
||||
load_chewy_taf(_G(spieler).ChewyAni);
|
||||
atds->stop_aad();
|
||||
|
@ -780,16 +780,16 @@ void print_rows(int16 id) {
|
|||
int16 txt_anz, len;
|
||||
char *txtStr, *s;
|
||||
|
||||
out->set_fontadr(font8x8);
|
||||
out->set_vorschub(fvorx8x8, fvory8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
_G(out)->set_vorschub(fvorx8x8, fvory8x8);
|
||||
txtStr = atds->ats_get_txt(id, TXT_MARK_NAME, &txt_anz, ATS_DATEI);
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
|
||||
for (int i = 0; i < txt_anz; ++i) {
|
||||
s = txt->str_pos(txtStr, i);
|
||||
len = (strlen(s) * fvorx8x8) / 2;
|
||||
|
||||
out->printxy(160 - len, 50 + i * 10, 14, 300, 0, "%s", s);
|
||||
_G(out)->printxy(160 - len, 50 + i * 10, 14, 300, 0, "%s", s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -802,7 +802,7 @@ int16 flic_user_function(int16 keys) {
|
|||
case 584:
|
||||
case 588:
|
||||
case 591:
|
||||
out->raster_col(254, 63, 12, 46);
|
||||
_G(out)->raster_col(254, 63, 12, 46);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -815,7 +815,7 @@ int16 flic_user_function(int16 keys) {
|
|||
if (flic_val1 == 594 && keys == 18)
|
||||
atds->stop_aad();
|
||||
|
||||
ret = in->get_switch_code() == ESC ? -1 : 0;
|
||||
ret = _G(in)->get_switch_code() == ESC ? -1 : 0;
|
||||
if (flic_val2 == 140 && keys == 15)
|
||||
ret = -2;
|
||||
if (flic_val2 == 144 && keys == 7)
|
||||
|
@ -862,8 +862,8 @@ static void flic_proc1() {
|
|||
else if (VALS1[i] == 143)
|
||||
load_room_music(260);
|
||||
if (VALS2[i]) {
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
}
|
||||
|
||||
flic_val1 = 0;
|
||||
|
@ -876,7 +876,7 @@ static void flic_proc1() {
|
|||
do {
|
||||
flic_val2 = VALS1[i];
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, flic_val2);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, flic_val2);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
g_engine->playVideo(flic_val2);
|
||||
|
@ -889,9 +889,9 @@ static void flic_proc1() {
|
|||
|
||||
flc->remove_custom_user_function();
|
||||
if (ret == -1) {
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
out->raster_col(254, 62, 35, 7);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->raster_col(254, 62, 35, 7);
|
||||
start_aad(595);
|
||||
atds->print_aad(254, 0);
|
||||
|
||||
|
@ -902,8 +902,8 @@ static void flic_proc1() {
|
|||
}
|
||||
}
|
||||
|
||||
out->setze_zeiger(workptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->cls();
|
||||
}
|
||||
|
||||
void flic_cut(int16 nr, int16 mode) {
|
||||
|
@ -923,9 +923,9 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
static const int16 FLIC_CUT_1113[] = { 113, 106, 103, 118, 120 };
|
||||
int16 i, ret = 0;
|
||||
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
det->disable_room_sound();
|
||||
sndPlayer->endSound();
|
||||
_G(sndPlayer)->endSound();
|
||||
g_events->delay(50);
|
||||
//#ifndef NEW_VIDEO_CODE
|
||||
Common::File *f = File::open("cut/cut.tap");
|
||||
|
@ -936,7 +936,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
switch (nr) {
|
||||
case FCUT_001:
|
||||
case 1000:
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
CurrentSong = -1;
|
||||
g_engine->playVideo(nr);
|
||||
break;
|
||||
|
@ -952,21 +952,21 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
case FCUT_019_09:
|
||||
case FCUT_019_10:
|
||||
case FCUT_019_11:
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
CurrentSong = -1;
|
||||
nr = FCUT_019_01;
|
||||
sndPlayer->setLoopMode(1);
|
||||
_G(sndPlayer)->setLoopMode(1);
|
||||
|
||||
for (i = 0; i < 11; i++) {
|
||||
g_engine->playVideo(FCUT_019_01 + i);
|
||||
SHOULD_QUIT_RETURN;
|
||||
}
|
||||
|
||||
sndPlayer->fadeOut(0);
|
||||
out->ausblenden(1);
|
||||
out->cls();
|
||||
while (sndPlayer->musicPlaying());
|
||||
sndPlayer->setLoopMode(_G(spieler).soundLoopMode);
|
||||
_G(sndPlayer)->fadeOut(0);
|
||||
_G(out)->ausblenden(1);
|
||||
_G(out)->cls();
|
||||
while (_G(sndPlayer)->musicPlaying());
|
||||
_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
|
||||
break;
|
||||
|
||||
case FCUT_032:
|
||||
|
@ -976,7 +976,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
case FCUT_040:
|
||||
do {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, nr);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, nr);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -986,12 +986,12 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
break;
|
||||
|
||||
case FCUT_034:
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
CurrentSong = -1;
|
||||
|
||||
do {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, nr);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, nr);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1016,18 +1016,18 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
load_room_music(255);
|
||||
g_engine->playVideo(FCUT_058);
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
g_engine->playVideo(FCUT_059);
|
||||
}
|
||||
if (!_G(spieler).R43GetPgLady) {
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
g_engine->playVideo(FCUT_060);
|
||||
}
|
||||
} else {
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
start_aad(623, -1);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, FCUT_061);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FCUT_061);
|
||||
flc->set_custom_user_function(Room43::setup_func);
|
||||
flc->custom_play(&Ci);
|
||||
flc->remove_custom_user_function();
|
||||
|
@ -1035,28 +1035,28 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
g_engine->playVideo(FCUT_061);
|
||||
#endif
|
||||
}
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
g_engine->playVideo(FCUT_062);
|
||||
}
|
||||
}
|
||||
sndPlayer->fadeOut(0);
|
||||
out->ausblenden(1);
|
||||
out->cls();
|
||||
while (sndPlayer->musicPlaying() && !SHOULD_QUIT);
|
||||
_G(sndPlayer)->fadeOut(0);
|
||||
_G(out)->ausblenden(1);
|
||||
_G(out)->cls();
|
||||
while (_G(sndPlayer)->musicPlaying() && !SHOULD_QUIT);
|
||||
break;
|
||||
|
||||
case FCUT_065:
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
CurrentSong = -1;
|
||||
load_room_music(256);
|
||||
sndPlayer->setLoopMode(1);
|
||||
_G(sndPlayer)->setLoopMode(1);
|
||||
Room46::kloppe();
|
||||
sndPlayer->setLoopMode(_G(spieler).soundLoopMode);
|
||||
_G(sndPlayer)->setLoopMode(_G(spieler).soundLoopMode);
|
||||
CurrentSong = -1;
|
||||
break;
|
||||
|
||||
case FCUT_071:
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
CurrentSong = -1;
|
||||
g_engine->playVideo(FCUT_071);
|
||||
break;
|
||||
|
@ -1071,7 +1071,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
case FCUT_095:
|
||||
while (atds->aad_get_status() != -1 && !SHOULD_QUIT) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, nr);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, nr);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(nr);
|
||||
|
@ -1080,17 +1080,17 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
break;
|
||||
|
||||
case FCUT_112:
|
||||
sndPlayer->setMusicMasterVol(32);
|
||||
_G(sndPlayer)->setMusicMasterVol(32);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, nr);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, nr);
|
||||
ret = flc->custom_play(&Ci);
|
||||
mem->file->select_pool_item(Ci.Handle, nr);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, nr);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(nr);
|
||||
playVideo(nr);
|
||||
#endif
|
||||
sndPlayer->setMusicMasterVol(5);
|
||||
_G(sndPlayer)->setMusicMasterVol(5);
|
||||
break;
|
||||
|
||||
case FCUT_116:
|
||||
|
@ -1102,17 +1102,17 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
case FCUT_133:
|
||||
case 1123:
|
||||
for (i = 0; i < 13 && i != -1 && !modul; ++i) {
|
||||
for (i = 0; i < 13 && i != -1 && !_G(modul); ++i) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_133[i]);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
playVideo(FLIC_CUT_133[i]);
|
||||
#endif
|
||||
if (i == 0 || i == 1) {
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1125,7 +1125,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
fx->border(workpage, 100, 0, 0);
|
||||
print_rows(590);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 1);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 1);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
g_engine->playVideo(FCUT_001);
|
||||
|
@ -1136,7 +1136,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
fx->border(workpage, 100, 0, 0);
|
||||
print_rows(591);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + 3);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + 3);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1150,7 +1150,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
for (i = 0; i < 3 && ret != -1; ++i) {
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + 6);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + 6);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1162,7 +1162,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
case 1009:
|
||||
for (i = 0; i < 2 && ret != -1; ++i) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + 9);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + 9);
|
||||
flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1176,7 +1176,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
fx->border(workpage, 100, 0, 0);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + 12);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + 12);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(i + 12);
|
||||
|
@ -1185,12 +1185,12 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
if (ret != -1) {
|
||||
out->cls();
|
||||
mem->file->select_pool_item(Ci.Handle, FCUT_017);
|
||||
_G(out)->cls();
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FCUT_017);
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
}
|
||||
#else
|
||||
out->cls();
|
||||
_G(out)->cls();
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#endif
|
||||
break;
|
||||
|
@ -1199,7 +1199,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
for (i = 0; i < 2 && ret != -1; ++i) {
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + 15);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + 15);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1213,13 +1213,13 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
fx->border(workpage, 100, 0, 0);
|
||||
print_rows(594);
|
||||
if (FLIC_CUT_1045[i] == 53) {
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
CurrentSong = -1;
|
||||
load_room_music(256);
|
||||
}
|
||||
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1045[i]);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1227,7 +1227,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
#endif
|
||||
|
||||
if (FLIC_CUT_1045[i] == 53) {
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1238,7 +1238,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
if (ret != -1) {
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 43);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 43);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(43);
|
||||
|
@ -1248,7 +1248,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
case 1048:
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 50);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 50);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(50);
|
||||
|
@ -1258,7 +1258,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
fx->spr_blende(workpage, 100, false, 0);
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 48);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 48);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(48);
|
||||
|
@ -1266,7 +1266,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
}
|
||||
if (ret != -1) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 49);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 49);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(49);
|
||||
|
@ -1280,7 +1280,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
}
|
||||
if (ret != -1) {
|
||||
fx->spr_blende(workpage, 100, false, 0);
|
||||
mem->file->select_pool_item(Ci.Handle, 54);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 54);
|
||||
}
|
||||
#else
|
||||
fx->spr_blende(workpage, 100, false, 0);
|
||||
|
@ -1292,7 +1292,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
for (i = 0; i < 2 && ret != -1; ++i) {
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + 55);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + 55);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1302,18 +1302,18 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
if (ret != -1) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 46);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 46);
|
||||
#endif
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case 1058:
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
CurrentSong = -1;
|
||||
load_room_music(255);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 58);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 58);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(58);
|
||||
|
@ -1321,7 +1321,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
if (ret != -1) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 59);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 59);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(59);
|
||||
|
@ -1329,7 +1329,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
}
|
||||
if (ret != -1) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 60);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 60);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(60);
|
||||
|
@ -1338,7 +1338,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
if (ret != -1) {
|
||||
fx->spr_blende(workpage, 100, false, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 61);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 61);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(61);
|
||||
|
@ -1347,7 +1347,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
if (ret != -1) {
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 62);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 62);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(62);
|
||||
|
@ -1356,13 +1356,13 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
break;
|
||||
|
||||
case 1065:
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
CurrentSong = -1;
|
||||
load_room_music(256);
|
||||
|
||||
for (i = 0; i < 2 && ret != -1; ++i) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + 65);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + 65);
|
||||
flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1373,7 +1373,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
case 1068:
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 68);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 68);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(68);
|
||||
|
@ -1382,7 +1382,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
if (ret != -1) {
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 70);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 70);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1393,7 +1393,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
case 1069:
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 69);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 69);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(69);
|
||||
|
@ -1402,7 +1402,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
for (i = 0; i < 2 && ret != -1 && !SHOULD_QUIT; ++i) {
|
||||
fx->spr_blende(workpage, 100, false, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + 71);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + 71);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(i + 71);
|
||||
|
@ -1416,7 +1416,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
print_rows(605);
|
||||
fx->spr_blende(workpage, 100, false, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + FLIC_CUT_1074[i]);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1429,7 +1429,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
for (i = 0; i < 8 && ret != -1; ++i) {
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1080[i]);
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1440,7 +1440,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
case 1087:
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 87);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 87);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(87);
|
||||
|
@ -1449,7 +1449,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
for (i = 0; i < 2 && ret != -1; ++i) {
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, i + 102);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, i + 102);
|
||||
flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1460,7 +1460,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
case 1088:
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 88);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 88);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(88);
|
||||
|
@ -1469,23 +1469,23 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
if (ret != -1) {
|
||||
fx->spr_blende(workpage, 100, false, 0);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 86);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 86);
|
||||
flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(86);
|
||||
#endif
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
}
|
||||
break;
|
||||
|
||||
case 1093:
|
||||
for (i = 0; i < 12 && ret != -1; ++i) {
|
||||
mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1093[i]);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1093[i]);
|
||||
switch (FLIC_CUT_1093[i]) {
|
||||
case 90:
|
||||
case 91:
|
||||
case 92:
|
||||
out->cls();
|
||||
_G(out)->cls();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1499,8 +1499,8 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
case 1106:
|
||||
for (i = 0; i < 3 && ret == -1; ++i) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
|
||||
out->cls();
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1106[i]);
|
||||
_G(out)->cls();
|
||||
flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1511,7 +1511,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
case 1107:
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, FCUT_107);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FCUT_107);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(107);
|
||||
|
@ -1519,7 +1519,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
if (ret != -1) {
|
||||
mem->file->select_pool_item(Ci.Handle, 109);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 109);
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
}
|
||||
#else
|
||||
|
@ -1530,7 +1530,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
case 1108:
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 108);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 108);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(108);
|
||||
|
@ -1538,7 +1538,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
if (ret != -1) {
|
||||
mem->file->select_pool_item(Ci.Handle, 115);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 115);
|
||||
fx->spr_blende(workpage, 100, false, 0);
|
||||
flc->custom_play(&Ci);
|
||||
}
|
||||
|
@ -1549,12 +1549,12 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
break;
|
||||
|
||||
case 1110:
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
CurrentSong = -1;
|
||||
load_room_music(257);
|
||||
sndPlayer->setMusicMasterVol(20);
|
||||
_G(sndPlayer)->setMusicMasterVol(20);
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, 110);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 110);
|
||||
ret = flc->custom_play(&Ci);
|
||||
#else
|
||||
playVideo(110);
|
||||
|
@ -1562,9 +1562,9 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
if (ret != -1) {
|
||||
sndPlayer->setMusicMasterVol(63);
|
||||
_G(sndPlayer)->setMusicMasterVol(63);
|
||||
fx->spr_blende(workpage, 100, false, 0);
|
||||
mem->file->select_pool_item(Ci.Handle, 112);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 112);
|
||||
flc->custom_play(&Ci);
|
||||
}
|
||||
#else
|
||||
|
@ -1572,14 +1572,14 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
fx->spr_blende(workpage, 100, false, 0);
|
||||
playVideo(112);
|
||||
#endif
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
break;
|
||||
|
||||
case 1113:
|
||||
for (i = 0; i < 5 && ret != -1; ++i) {
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
|
||||
out->cls();
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FLIC_CUT_1113[i]);
|
||||
_G(out)->cls();
|
||||
ret = flc->custom_play(&Ci);
|
||||
SHOULD_QUIT_RETURN;
|
||||
#else
|
||||
|
@ -1590,9 +1590,9 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
case 1117:
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
if (mem->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
|
||||
if (_G(mem)->file->select_pool_item(Ci.Handle, 117) != (uint16)-1) {
|
||||
fx->border(workpage, 100, 0, 0);
|
||||
mem->file->select_pool_item(Ci.Handle, 119);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 119);
|
||||
flc->custom_play(&Ci);
|
||||
}
|
||||
#else
|
||||
|
@ -1603,7 +1603,7 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
default:
|
||||
#ifndef NEW_VIDEO_CODE
|
||||
mem->file->select_pool_item(Ci.Handle,
|
||||
_G(mem)->file->select_pool_item(Ci.Handle,
|
||||
(nr < 1000) ? nr : nr - 1000);
|
||||
|
||||
switch (mode) {
|
||||
|
@ -1631,8 +1631,8 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
|
||||
g_engine->_sound->stopSound();
|
||||
g_events->delay(50);
|
||||
sndPlayer->setSoundMasterVol(_G(spieler).SoundVol);
|
||||
sndPlayer->setMusicMasterVol(_G(spieler).MusicVol);
|
||||
_G(sndPlayer)->setSoundMasterVol(_G(spieler).SoundVol);
|
||||
_G(sndPlayer)->setMusicMasterVol(_G(spieler).MusicVol);
|
||||
|
||||
if (nr < 1000 && nr != 135) {
|
||||
load_room_music(_G(spieler).PersonRoomNr[0]);
|
||||
|
@ -1644,11 +1644,11 @@ void flic_cut(int16 nr, int16 mode) {
|
|||
}
|
||||
|
||||
if (!flags.NoPalAfterFlc)
|
||||
out->set_palette(pal);
|
||||
_G(out)->set_palette(pal);
|
||||
|
||||
atds->stop_aad();
|
||||
atds->stop_ats();
|
||||
out->setze_zeiger(workptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
flags.NoPalAfterFlc = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -114,15 +114,15 @@ void Room::close_handle(int16 mode) {
|
|||
}
|
||||
|
||||
void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
|
||||
modul = 0;
|
||||
fcode = 0;
|
||||
_G(modul) = 0;
|
||||
_G(fcode) = 0;
|
||||
|
||||
clear_prog_ani();
|
||||
det->load_rdi(Rb->DetFile, room_nr);
|
||||
|
||||
if (player->SoundSwitch == false)
|
||||
det->disable_room_sound();
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
room_detail_info *Rdi_ = det->get_room_detail_info();
|
||||
_roomInfo = &Rdi_->Ri;
|
||||
if (_roomInfo->TafLoad != 255) {
|
||||
|
@ -134,23 +134,23 @@ void Room::load_room(RaumBlk *Rb, int16 room_nr, Spieler *player) {
|
|||
Rb->DetImage = Rb->Fti->image;
|
||||
Rb->DetKorrekt = Rb->Fti->korrektur;
|
||||
}
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
obj->calc_all_static_detail();
|
||||
load_tgp(_roomInfo->BildNr, Rb, EPISODE1_TGP, GED_LOAD, "back/episode1.tgp");
|
||||
set_pal(_ablagePal[Rb->AkAblage], Rb->LowPalMem);
|
||||
calc_invent(Rb, player);
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
del_timer_old_room();
|
||||
add_timer_new_room();
|
||||
}
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
if (Rb->AtsLoad)
|
||||
atds->load_atds(_roomInfo->RoomNr, ATS_DATEI);
|
||||
}
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
if (Rb->AadLoad)
|
||||
atds->load_atds(_roomInfo->RoomNr, AAD_DATEI);
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ void Room::set_ak_pal(RaumBlk *Rb) {
|
|||
void Room::calc_invent(RaumBlk *Rb, Spieler *player) {
|
||||
byte *tmp_inv_spr[MAX_MOV_OBJ];
|
||||
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
obj->sort();
|
||||
memcpy(tmp_inv_spr, Rb->InvSprAdr, MAX_MOV_OBJ * sizeof(char *));
|
||||
memset(Rb->InvSprAdr, 0, MAX_MOV_OBJ * sizeof(char *));
|
||||
|
@ -305,7 +305,7 @@ void Room::init_ablage() {
|
|||
_ablage[0] = (byte *)MALLOC(MAX_ABLAGE * (ABLAGE_BLOCK_SIZE + 4l));
|
||||
_ablagePal[0] = (byte *)MALLOC(MAX_ABLAGE * 768l);
|
||||
_gedMem[0] = (byte *)MALLOC(MAX_ABLAGE * GED_BLOCK_SIZE);
|
||||
if (!modul) {
|
||||
if (!_G(modul)) {
|
||||
_akAblage = 0;
|
||||
for (int16 i = 0; i < MAX_ABLAGE; i++) {
|
||||
_ablage[i] = _ablage[0] + (ABLAGE_BLOCK_SIZE + 4l) * i;
|
||||
|
@ -498,7 +498,7 @@ void load_chewy_taf(int16 taf_nr) {
|
|||
if (fname_ != NULL) {
|
||||
_G(spieler).ChewyAni = taf_nr;
|
||||
AkChewyTaf = taf_nr;
|
||||
chewy = mem->taf_adr(fname_);
|
||||
chewy = _G(mem)->taf_adr(fname_);
|
||||
chewy_kor = chewy->korrektur;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -236,9 +236,9 @@ void Room0::eyeStart(EyeMode mode) {
|
|||
set_up_screen(NO_SETUP);
|
||||
SHOULD_QUIT_RETURN;
|
||||
|
||||
cur->plot_cur();
|
||||
_G(cur)->plot_cur();
|
||||
calcEyeClick(3);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->back2screen(workpage);
|
||||
|
||||
if (adi->delay_count > 0)
|
||||
--adi->delay_count;
|
||||
|
@ -283,9 +283,9 @@ void Room0::eyeWait() {
|
|||
spr_info[2].ZEbene = 192;
|
||||
get_user_key(NO_SETUP);
|
||||
set_up_screen(NO_SETUP);
|
||||
cur->plot_cur();
|
||||
_G(cur)->plot_cur();
|
||||
calcEyeClick(2);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->back2screen(workpage);
|
||||
|
||||
if (adi->delay_count > 0) {
|
||||
--adi->delay_count;
|
||||
|
@ -311,8 +311,8 @@ void Room0::calcEyeClick(int16 ani_nr) {
|
|||
if (minfo.button != 1 && kbinfo.key_code != ENTER) {
|
||||
char *str_ = atds->ats_get_txt(172, TXT_MARK_NAME, &anz, ATS_DATEI);
|
||||
if (str_ != 0) {
|
||||
out->set_fontadr(font8x8);
|
||||
out->set_vorschub(fvorx8x8, fvory8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
_G(out)->set_vorschub(fvorx8x8, fvory8x8);
|
||||
x = minfo.x;
|
||||
y = minfo.y;
|
||||
calc_txt_xy(&x, &y, str_, anz);
|
||||
|
@ -506,11 +506,11 @@ void Room0::feederStart(int16 mode) {
|
|||
SHOULD_QUIT_RETURN;
|
||||
|
||||
set_up_screen(NO_SETUP);
|
||||
cur->plot_cur();
|
||||
_G(cur)->plot_cur();
|
||||
if (!mode)
|
||||
calcPillowClick(1);
|
||||
|
||||
out->back2screen(workpage);
|
||||
_G(out)->back2screen(workpage);
|
||||
if (adi->delay_count > 0)
|
||||
--adi->delay_count;
|
||||
else {
|
||||
|
@ -547,9 +547,9 @@ void Room0::feederExtend() {
|
|||
spr_info[1].ZEbene = 191;
|
||||
get_user_key(NO_SETUP);
|
||||
set_up_screen(NO_SETUP);
|
||||
cur->plot_cur();
|
||||
_G(cur)->plot_cur();
|
||||
calcPillowClick(1);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->back2screen(workpage);
|
||||
}
|
||||
|
||||
clear_prog_ani();
|
||||
|
@ -564,8 +564,8 @@ void Room0::calcPillowClick(int16 ani_nr) {
|
|||
if (minfo.button != 1 && kbinfo.key_code != ENTER) {
|
||||
char *str_ = atds->ats_get_txt(173, TXT_MARK_NAME, &anz, ATS_DATEI);
|
||||
if (str_ != 0) {
|
||||
out->set_fontadr(font8x8);
|
||||
out->set_vorschub(fvorx8x8, fvory8x8);
|
||||
_G(out)->set_fontadr(font8x8);
|
||||
_G(out)->set_vorschub(fvorx8x8, fvory8x8);
|
||||
x = minfo.x;
|
||||
y = minfo.y;
|
||||
calc_txt_xy(&x, &y, str_, anz);
|
||||
|
@ -764,7 +764,7 @@ void Room0::feederAni() {
|
|||
feederStart(1);
|
||||
auto_move(VERSTECK_POS, P_CHEWY);
|
||||
set_up_screen(DO_SETUP);
|
||||
out->cls();
|
||||
_G(out)->cls();
|
||||
flic_cut(FCUT_001, CFO_MODE);
|
||||
|
||||
register_cutscene(1);
|
||||
|
|
|
@ -31,9 +31,9 @@ namespace Rooms {
|
|||
|
||||
void Room10::entry() {
|
||||
if (!_G(spieler).R10Surimy) {
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
|
||||
out->setze_zeiger(nullptr);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
fx->blende1(workptr, screen0, pal, 150, 0, 0);
|
||||
_G(spieler).R10Surimy = true;
|
||||
fx_blend = BLEND_NONE;
|
||||
|
|
|
@ -46,7 +46,7 @@ static const MovLine R13_BORK_MPKT[3] = {
|
|||
|
||||
void Room13::entry() {
|
||||
if (!_G(spieler).R12ChewyBork && !_G(spieler).R13BorkOk) {
|
||||
out->cls();
|
||||
_G(out)->cls();
|
||||
flic_cut(FCUT_013, CFO_MODE);
|
||||
set_person_pos(106, 65, P_CHEWY, P_RIGHT);
|
||||
switch_room(11);
|
||||
|
|
|
@ -85,12 +85,12 @@ int16 Room23::start_gleiter() {
|
|||
det->stop_detail(i);
|
||||
|
||||
if (_G(spieler).R23GleiterExit == 14) {
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(FCUT_012, CFO_MODE);
|
||||
register_cutscene(7);
|
||||
out->cls();
|
||||
_G(out)->cls();
|
||||
_G(spieler).R23GleiterExit = 16;
|
||||
set_person_pos(126, 110, P_CHEWY, P_RIGHT);
|
||||
|
||||
|
@ -104,8 +104,8 @@ int16 Room23::start_gleiter() {
|
|||
_G(maus_links_click) = false;
|
||||
|
||||
} else if (_G(spieler).R23GleiterExit == 16) {
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flic_cut(FCUT_019_01, CFO_MODE);
|
||||
_G(spieler).R23GleiterExit = 25;
|
||||
register_cutscene(9);
|
||||
|
|
|
@ -82,8 +82,8 @@ void Room28::entry(int16 eib_nr) {
|
|||
det->show_static_spr(6);
|
||||
|
||||
if (!_G(spieler).R40TeilKarte) {
|
||||
out->ausblenden(0);
|
||||
out->set_teilpalette(pal, 255, 1);
|
||||
_G(out)->ausblenden(0);
|
||||
_G(out)->set_teilpalette(pal, 255, 1);
|
||||
start_aad_wait(607, -1);
|
||||
fx_blend = BLEND3;
|
||||
}
|
||||
|
@ -105,8 +105,8 @@ void Room28::entry(int16 eib_nr) {
|
|||
case 77:
|
||||
if (_G(spieler).R28PostCar) {
|
||||
_G(spieler).R28PostCar = false;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flic_cut(FCUT_063, CFO_MODE);
|
||||
_G(spieler).R28ChewyPump = false;
|
||||
invent_2_slot(K_MASKE_INV);
|
||||
|
|
|
@ -182,8 +182,8 @@ int16 Room39::use_tv() {
|
|||
_G(spieler).R39TvKanal = -1;
|
||||
|
||||
flags.NoPalAfterFlc = true;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flic_cut(FCUT_042, CFO_MODE);
|
||||
++_G(spieler).R39TvKanal;
|
||||
flags.NoPalAfterFlc = true;
|
||||
|
@ -222,16 +222,16 @@ int16 Room39::use_tv() {
|
|||
flic_cut(FCUT_041, CFO_MODE);
|
||||
_G(spieler).R39TvKanal = 0;
|
||||
_G(spieler).R39ClintNews = 0;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
out->set_palette(pal);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->set_palette(pal);
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(TV_FLIC[0], CFO_MODE);
|
||||
|
||||
out->cls();
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
out->set_palette(pal);
|
||||
_G(out)->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->set_palette(pal);
|
||||
set_tv();
|
||||
start_spz(CH_TRANS, 255, ANI_VOR, P_CHEWY);
|
||||
start_aad_wait(80, -1);
|
||||
|
@ -269,10 +269,10 @@ int16 Room39::use_tv() {
|
|||
}
|
||||
|
||||
if (cls_flag) {
|
||||
out->cls();
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
out->set_palette(pal);
|
||||
_G(out)->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->set_palette(pal);
|
||||
flags.NoPalAfterFlc = false;
|
||||
}
|
||||
|
||||
|
@ -307,9 +307,9 @@ void Room39::look_tv(bool cls_mode) {
|
|||
}
|
||||
|
||||
if (cls_mode) {
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
out->set_palette(pal);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->set_palette(pal);
|
||||
flags.NoPalAfterFlc = true;
|
||||
}
|
||||
|
||||
|
@ -325,10 +325,10 @@ void Room39::look_tv(bool cls_mode) {
|
|||
flc->remove_custom_user_function();
|
||||
|
||||
if (cls_mode) {
|
||||
out->cls();
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
out->set_palette(pal);
|
||||
_G(out)->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->set_palette(pal);
|
||||
flags.NoPalAfterFlc = false;
|
||||
|
||||
if (_G(spieler).R39TransMensch && dia_nr == 85)
|
||||
|
@ -362,7 +362,7 @@ void Room39::set_tv() {
|
|||
}
|
||||
|
||||
int16 Room39::setup_func(int16 frame) {
|
||||
int16 action_ret = in->get_switch_code() == ESC ? -1 : 0;
|
||||
int16 action_ret = _G(in)->get_switch_code() == ESC ? -1 : 0;
|
||||
|
||||
if (_flag) {
|
||||
if (frame == 121)
|
||||
|
@ -376,7 +376,7 @@ int16 Room39::setup_func(int16 frame) {
|
|||
start_aad(601, 0);
|
||||
break;
|
||||
case 297:
|
||||
in->_hotkey = 1;
|
||||
_G(in)->_hotkey = 1;
|
||||
break;
|
||||
case 171:
|
||||
case 266:
|
||||
|
|
|
@ -55,13 +55,13 @@ int16 Room4::sonde_comp() {
|
|||
curblk.sprite = room_blk.DetImage;
|
||||
int16 cur_x = 1;
|
||||
int16 spr_nr = RAHMEN_ROT;
|
||||
cur->move(160, 160);
|
||||
_G(cur)->move(160, 160);
|
||||
|
||||
start_aad(46);
|
||||
while (!ende) {
|
||||
maus_action();
|
||||
if (_G(maus_links_click)) {
|
||||
switch (in->maus_vector(minfo.x + 17, minfo.y + 7, &CONSOLE[0][0], 3)) {
|
||||
switch (_G(in)->maus_vector(minfo.x + 17, minfo.y + 7, &CONSOLE[0][0], 3)) {
|
||||
case 0:
|
||||
if (cur_x > 0)
|
||||
--cur_x;
|
||||
|
@ -102,7 +102,7 @@ int16 Room4::sonde_comp() {
|
|||
}
|
||||
cursor_wahl(CUR_USER);
|
||||
_G(spieler).CurHoehe = 16;
|
||||
in->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
|
||||
_G(in)->rectangle(0, 123, 320 - _G(spieler).CurBreite, 194);
|
||||
if (minfo.y < 124) {
|
||||
minfo.y = 123;
|
||||
}
|
||||
|
|
|
@ -115,10 +115,10 @@ void Room40::xit(int16 eib_nr) {
|
|||
obj->hide_sib(SIB_MUENZE_R40);
|
||||
|
||||
uhr->disable_timer();
|
||||
out->ausblenden(0);
|
||||
_G(out)->ausblenden(0);
|
||||
hide_person();
|
||||
set_up_screen(DO_SETUP);
|
||||
out->einblenden(pal, 0);
|
||||
_G(out)->einblenden(pal, 0);
|
||||
uhr->enable_timer();
|
||||
|
||||
_G(maus_links_click) = false;
|
||||
|
@ -341,7 +341,7 @@ int16 Room40::use_mr_pumpkin() {
|
|||
auto_move(8, P_CHEWY);
|
||||
start_spz_wait(CH_PUMP_GET1, 1, false, P_CHEWY);
|
||||
del_inventar(_G(spieler).AkInvent);
|
||||
out->ausblenden(1);
|
||||
_G(out)->ausblenden(1);
|
||||
Room43::catch_pg();
|
||||
remove_inventory(LIKOER_INV);
|
||||
obj->add_inventar(LIKOER2_INV, &room_blk);
|
||||
|
@ -474,15 +474,15 @@ int16 Room40::use_haendler() {
|
|||
det->del_static_ani(5);
|
||||
det->set_static_ani(3, -1);
|
||||
start_aad_wait(211, -1);
|
||||
out->ausblenden(0);
|
||||
out->set_teilpalette(pal, 255, 1);
|
||||
_G(out)->ausblenden(0);
|
||||
_G(out)->set_teilpalette(pal, 255, 1);
|
||||
start_aad_wait(212, -1);
|
||||
out->ausblenden(0);
|
||||
_G(out)->ausblenden(0);
|
||||
_G(spieler).R40Wettbewerb = true;
|
||||
_G(spieler).PersonRoomNr[P_HOWARD] = 28;
|
||||
flags.NoScroll = false;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
switch_room(28);
|
||||
SetUpScreenFunc = setup_func;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ void Room43::night_small() {
|
|||
_G(spieler).scrollx = 0;
|
||||
_G(spieler).scrolly = 0;
|
||||
switch_room(43);
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
g_engine->_sound->playSound(0);
|
||||
hide_cur();
|
||||
flags.NoScroll = true;
|
||||
|
@ -71,7 +71,7 @@ void Room43::catch_pg() {
|
|||
_G(spieler).scrollx = 0;
|
||||
_G(spieler).scrolly = 0;
|
||||
switch_room(43);
|
||||
sndPlayer->stopMod();
|
||||
_G(sndPlayer)->stopMod();
|
||||
g_engine->_sound->playSound(0);
|
||||
hide_cur();
|
||||
flags.NoScroll = true;
|
||||
|
|
|
@ -131,8 +131,8 @@ void Room46::bodo() {
|
|||
_G(spieler).PersonHide[P_CHEWY] = true;
|
||||
start_detail_wait(1, 1, ANI_VOR);
|
||||
flic_cut(FCUT_065, CFO_MODE);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
register_cutscene(16);
|
||||
|
||||
_G(spieler).PersonHide[P_CHEWY] = false;
|
||||
|
@ -151,12 +151,12 @@ void Room46::bodo() {
|
|||
|
||||
void Room46::kloppe() {
|
||||
for (int16 i = 0; i < 4; i++) {
|
||||
mem->file->select_pool_item(Ci.Handle, FCUT_065);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, FCUT_065);
|
||||
|
||||
flc->custom_play(&Ci);
|
||||
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
start_aad(244 + i, -1);
|
||||
int16 delay = _G(spieler).DelaySpeed * 50;
|
||||
atds->print_aad(0, 0);
|
||||
|
@ -166,18 +166,18 @@ void Room46::kloppe() {
|
|||
continue;
|
||||
}
|
||||
|
||||
while (in->get_switch_code() == 0 && delay) {
|
||||
while (_G(in)->get_switch_code() == 0 && delay) {
|
||||
--delay;
|
||||
SHOULD_QUIT_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
mem->file->select_pool_item(Ci.Handle, 66);
|
||||
_G(mem)->file->select_pool_item(Ci.Handle, 66);
|
||||
flc->custom_play(&Ci);
|
||||
sndPlayer->fadeOut(0);
|
||||
out->cls();
|
||||
_G(sndPlayer)->fadeOut(0);
|
||||
_G(out)->cls();
|
||||
|
||||
while (sndPlayer->musicPlaying() && !SHOULD_QUIT) {
|
||||
while (_G(sndPlayer)->musicPlaying() && !SHOULD_QUIT) {
|
||||
EVENTS_UPDATE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,8 +46,8 @@ void Room50::entry(int16 eib_nr) {
|
|||
set_person_pos(1, 64, P_HOWARD, P_RIGHT);
|
||||
set_person_pos(92, 123, P_CHEWY, P_LEFT);
|
||||
start_aad_wait(510, -1);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(108, 0);
|
||||
show_cur();
|
||||
|
|
|
@ -143,7 +143,7 @@ void Room51::setup_func() {
|
|||
|
||||
det->set_static_pos(17, _tmpx, _tmpy, false, false);
|
||||
|
||||
if ((minfo.button == 1 || in->get_switch_code() == 28) && !_flag) {
|
||||
if ((minfo.button == 1 || _G(in)->get_switch_code() == 28) && !_flag) {
|
||||
_flag = true;
|
||||
det->set_detail_pos(8, _tmpx - 20, _tmpy + 41);
|
||||
start_detail_wait(8, 1, ANI_VOR);
|
||||
|
@ -170,8 +170,8 @@ void Room51::setup_func() {
|
|||
start_aad_wait(514, -1);
|
||||
wait_show_screen(5);
|
||||
flags.NoPalAfterFlc = true;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flic_cut(115, 0);
|
||||
register_cutscene(28);
|
||||
|
||||
|
@ -255,10 +255,10 @@ int16 Room51::use_door(int16 txt_nr) {
|
|||
_G(spieler).R51KillerWeg = true;
|
||||
start_aad_wait(290, -1);
|
||||
g_engine->_sound->stopSound(0);
|
||||
out->ausblenden(1);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
out->einblenden(pal, 0);
|
||||
_G(out)->ausblenden(1);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->einblenden(pal, 0);
|
||||
flags.NoPalAfterFlc = true;
|
||||
flc->set_flic_user_function(cut_serv);
|
||||
det->show_static_spr(16);
|
||||
|
@ -284,8 +284,8 @@ int16 Room51::use_door(int16 txt_nr) {
|
|||
case 331:
|
||||
case 334:
|
||||
auto_move((txt_nr == 331) ? 10 : 7, P_CHEWY);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(114, 0);
|
||||
set_person_pos(115, 144, P_CHEWY, P_LEFT);
|
||||
|
|
|
@ -120,8 +120,8 @@ void Room56::entry() {
|
|||
atds->set_steuer_bit(366, ATS_AKTIV_BIT, ATS_DATEI);
|
||||
_G(spieler).room_e_obj[137].Attribut = 3;
|
||||
if (_G(spieler).flags33_80) {
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flic_cut(113, CFO_MODE);
|
||||
_G(spieler).PersonRoomNr[P_HOWARD] = 89;
|
||||
load_chewy_taf(CHEWY_NORMAL);
|
||||
|
@ -160,20 +160,20 @@ void Room56::entry() {
|
|||
_G(spieler).PersonRoomNr[P_HOWARD] = 66;
|
||||
_G(spieler).PersonRoomNr[P_NICHELLE] = 66;
|
||||
_G(spieler).r88DestRoom = 82;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(116, CFO_MODE);
|
||||
register_cutscene(21);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(spieler).PersonGlobalDia[P_HOWARD] = 10025;
|
||||
_G(spieler).PersonDiaRoom[P_HOWARD] = 1;
|
||||
switch_room(66);
|
||||
break;
|
||||
case 2:
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flic_cut(110, CFO_MODE);
|
||||
_G(spieler).flags34_20 = true;
|
||||
_G(spieler).PersonRoomNr[P_HOWARD] = 90;
|
||||
|
@ -306,7 +306,7 @@ int16 Room56::use_kneipe() {
|
|||
start_aad_wait(307, -1);
|
||||
det->stop_detail(10);
|
||||
g_engine->_sound->playSound(10, 0);
|
||||
out->ausblenden(0);
|
||||
_G(out)->ausblenden(0);
|
||||
set_up_screen(DO_SETUP);
|
||||
_G(spieler).PersonHide[P_CHEWY] = false;
|
||||
_G(spieler).PersonHide[P_HOWARD] = false;
|
||||
|
@ -350,8 +350,8 @@ int16 Room56::use_kneipe() {
|
|||
_G(maus_links_click) = false;
|
||||
auto_move(4, P_CHEWY);
|
||||
start_aad_wait(521, -1);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flc->set_custom_user_function(proc1);
|
||||
flic_cut(112, CFO_MODE);
|
||||
|
@ -370,7 +370,7 @@ int16 Room56::use_kneipe() {
|
|||
int16 Room56::proc1(int16 key) {
|
||||
int16 retVal = 0;
|
||||
|
||||
if (in->get_switch_code() == 1)
|
||||
if (_G(in)->get_switch_code() == 1)
|
||||
retVal = -1;
|
||||
|
||||
return retVal;
|
||||
|
|
|
@ -144,7 +144,7 @@ void Room63::bork_platt() {
|
|||
start_detail_wait(4, 1, ANI_VOR);
|
||||
det->show_static_spr(13);
|
||||
start_aad_wait(361, -1);
|
||||
out->cls();
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(FCUT_079, CFO_MODE);
|
||||
fx_blend = BLEND3;
|
||||
|
|
|
@ -64,7 +64,7 @@ int16 Room64::cut_sev(int16 frame) {
|
|||
const int16 y = spieler_mi[P_CHEWY].XyzStart[1] + chewy_kor[spr_nr * 2 + 1] - _G(spieler).scrolly;
|
||||
|
||||
calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->_roomInfo->ZoomFak, (int16)room->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
|
||||
out->scale_set(chewy->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, scr_width);
|
||||
_G(out)->scale_set(chewy->image[spr_nr], x, y, spieler_vector[P_CHEWY].Xzoom, spieler_vector[P_CHEWY].Yzoom, scr_width);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ void Room68::setup_func() {
|
|||
g_engine->_sound->playSound(_G(r68HohesC));
|
||||
det->start_detail(_G(r68HohesC), 255, ANI_VOR);
|
||||
|
||||
while (sndPlayer->getSampleStatus(1) == 4)
|
||||
while (_G(sndPlayer)->getSampleStatus(1) == 4)
|
||||
set_up_screen(DO_SETUP);
|
||||
det->stop_detail(_G(r68HohesC));
|
||||
} else {
|
||||
|
@ -347,7 +347,7 @@ void Room68::kostuem_aad(int16 aad_nr) {
|
|||
start_aad_wait(389, -1);
|
||||
else {
|
||||
if (_G(spieler).DisplayText == 0)
|
||||
sndPlayer->fadeOut(5);
|
||||
_G(sndPlayer)->fadeOut(5);
|
||||
|
||||
SetUpScreenFunc = nullptr;
|
||||
del_inventar(_G(spieler).AkInvent);
|
||||
|
|
|
@ -191,13 +191,13 @@ int Room76::proc7() {
|
|||
invent_2_slot(106);
|
||||
invent_2_slot(105);
|
||||
start_aad_wait(444, -1);
|
||||
out->ausblenden(0);
|
||||
out->set_teilpalette(pal, 255, 1);
|
||||
_G(out)->ausblenden(0);
|
||||
_G(out)->set_teilpalette(pal, 255, 1);
|
||||
start_aad_wait(443, -1);
|
||||
_G(spieler).scrollx = 0;
|
||||
fx_blend = BLEND3;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
set_person_pos(128, 135, P_CHEWY, P_RIGHT);
|
||||
det->set_static_ani(2, -1);
|
||||
|
||||
|
|
|
@ -196,8 +196,8 @@ int Room82::proc6() {
|
|||
|
||||
if (_G(spieler).flags30_10) {
|
||||
start_aad_wait(450, -1);
|
||||
out->ausblenden(0);
|
||||
out->set_teilpalette(pal, 255, 1);
|
||||
_G(out)->ausblenden(0);
|
||||
_G(out)->set_teilpalette(pal, 255, 1);
|
||||
atds->enableEvents(false);
|
||||
start_aad_wait(598, -1);
|
||||
atds->enableEvents(true);
|
||||
|
|
|
@ -85,8 +85,8 @@ void Room85::entry(int16 eib_nr) {
|
|||
det->show_static_spr(6);
|
||||
start_aad_wait(474, -1);
|
||||
flic_cut(90, CFO_MODE);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(91, CFO_MODE);
|
||||
det->hide_static_spr(6);
|
||||
|
|
|
@ -191,8 +191,8 @@ void Room86::proc3(bool cond) {
|
|||
set_up_screen(NO_SETUP);
|
||||
det->set_static_pos(0, 352, destY, false, false);
|
||||
destY += deltaY;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->back2screen(workpage);
|
||||
}
|
||||
|
||||
g_engine->_sound->stopSound(1);
|
||||
|
|
|
@ -98,12 +98,12 @@ int Room88::proc3() {
|
|||
hide_cur();
|
||||
if (_G(spieler).flags32_10) {
|
||||
start_aad_wait(480, -1);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(87, CFO_MODE);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(spieler).flags32_40 = true;
|
||||
switch_room(84);
|
||||
} else {
|
||||
|
@ -120,18 +120,18 @@ int Room88::proc3() {
|
|||
start_detail_wait(aniNr, 1, ANI_GO);
|
||||
}
|
||||
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(88, CFO_MODE);
|
||||
_G(spieler).PersonHide[P_CHEWY] = true;
|
||||
_G(spieler).flags32_1 = true;
|
||||
out->raster_col(0, 0, 0, 0);
|
||||
_G(out)->raster_col(0, 0, 0, 0);
|
||||
switch_room(80);
|
||||
hide_cur();
|
||||
start_detail_wait(1, 1, ANI_VOR);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(86, CFO_MODE);
|
||||
register_cutscene(24);
|
||||
|
|
|
@ -59,12 +59,12 @@ void Room89::entry() {
|
|||
_G(spieler).SVal2 = 537;
|
||||
switch_room(92);
|
||||
start_aad_wait(490, -1);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(103, CFO_MODE);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(118, CFO_MODE);
|
||||
_G(spieler).SVal1 = 89;
|
||||
|
@ -78,69 +78,69 @@ void Room89::entry() {
|
|||
set_person_pos(116, 114, P_HOWARD, P_RIGHT);
|
||||
set_person_pos(260, 57, P_NICHELLE, P_LEFT);
|
||||
_G(spieler).ZoomXy[P_NICHELLE][0] = _G(spieler).ZoomXy[P_NICHELLE][1] = 10;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(117, CFO_MODE);
|
||||
register_cutscene(35);
|
||||
|
||||
fx_blend = BLEND3;
|
||||
Room66::proc8(-1, 2, 3, 563);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(119, CFO_MODE);
|
||||
|
||||
// Squash screen into a single point at the center
|
||||
int edi = -20;
|
||||
int var24 = 0;
|
||||
out->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
|
||||
_G(out)->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
|
||||
for (int esi = 0; esi < 100; ++esi) {
|
||||
edi -= 3;
|
||||
var24 -= 2;
|
||||
out->setze_zeiger(workptr);
|
||||
out->cls();
|
||||
out->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, scr_width);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, scr_width);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->back2screen(workpage);
|
||||
g_events->delay(30);
|
||||
SHOULD_QUIT_RETURN;
|
||||
}
|
||||
|
||||
// Unsquish out thanks for playing screen
|
||||
out->setze_zeiger(workptr);
|
||||
out->cls();
|
||||
out->printxy(70, 80, 15, 0, 0, "Thank you for playing");
|
||||
out->printxy(70, 100, 15, 0, 0, " CHEWY ESC from F5");
|
||||
out->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
|
||||
_G(out)->printxy(70, 100, 15, 0, 0, " CHEWY ESC from F5");
|
||||
_G(out)->sprite_save(Ci.TempArea, 0, 0, 320, 200, 320);
|
||||
edi = -300;
|
||||
int var30 = -200;
|
||||
|
||||
for (int esi = 0; esi < 100; ++esi) {
|
||||
edi += 3;
|
||||
var30 += 2;
|
||||
out->setze_zeiger(workptr);
|
||||
out->cls();
|
||||
out->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, scr_width);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->scale_set(Ci.TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, scr_width);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->back2screen(workpage);
|
||||
g_events->delay(30);
|
||||
SHOULD_QUIT_RETURN;
|
||||
}
|
||||
|
||||
g_events->delay(3000);
|
||||
out->ausblenden(2);
|
||||
out->setze_zeiger(workptr);
|
||||
out->cls();
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->ausblenden(2);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
|
||||
Dialogs::Credits::execute();
|
||||
|
||||
_G(spieler).SVal4 = 1;
|
||||
out->ausblenden(2);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->ausblenden(2);
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
}
|
||||
|
||||
_G(spieler).SVal2 = 0;
|
||||
|
@ -176,8 +176,8 @@ int Room89::proc2() {
|
|||
_G(spieler).SVal2 = 489;
|
||||
switch_room(92);
|
||||
start_aad_wait(490, -1);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(102, CFO_MODE);
|
||||
register_cutscene(26);
|
||||
|
|
|
@ -332,8 +332,8 @@ int Room90::useSurimyOnWreck() {
|
|||
cur_2_inventory();
|
||||
auto_move(6, P_CHEWY);
|
||||
_G(maus_links_click) = false;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flic_cut(109, CFO_MODE);
|
||||
register_cutscene(29);
|
||||
|
||||
|
|
|
@ -37,12 +37,12 @@ void Room92::entry() {
|
|||
start_aad_wait(_G(spieler).SVal2, -1);
|
||||
switch (_G(spieler).SVal2) {
|
||||
case 487:
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(103, CFO_MODE);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(spieler).scrollx = oldScrollX;
|
||||
show_person();
|
||||
switch_room(_G(spieler).SVal1);
|
||||
|
@ -50,21 +50,21 @@ void Room92::entry() {
|
|||
case 488:
|
||||
flags.StaticUseTxt = true;
|
||||
flic_cut(106, CFO_MODE);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(105, CFO_MODE);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(104, CFO_MODE);
|
||||
register_cutscene(27);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(103, CFO_MODE);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
_G(spieler).PersonRoomNr[P_HOWARD] = 46;
|
||||
_G(spieler).flags33_8 = true;
|
||||
show_person();
|
||||
|
|
|
@ -53,8 +53,8 @@ void Room94::entry() {
|
|||
_G(spieler).scrollx = 0;
|
||||
set_person_pos(156, 149, P_CHEWY, P_RIGHT);
|
||||
set_person_pos(153, 122, P_HOWARD, P_RIGHT);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flic_cut(120, CFO_MODE);
|
||||
register_cutscene(30);
|
||||
fx_blend = BLEND_NONE;
|
||||
|
@ -72,8 +72,8 @@ void Room94::entry() {
|
|||
if (_G(spieler).flags37_40) {
|
||||
_G(spieler).flags37_40 = true;
|
||||
flags.NoScroll = true;
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flic_cut(121, CFO_MODE);
|
||||
register_cutscene(32);
|
||||
|
||||
|
@ -133,8 +133,8 @@ int Room94::giveGhostBottle() {
|
|||
auto_move(2, P_CHEWY);
|
||||
auto_scroll(216, 0);
|
||||
del_inventar(_G(spieler).AkInvent);
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(62, CFO_MODE);
|
||||
fx_blend = BLEND3;
|
||||
|
|
|
@ -107,8 +107,8 @@ int Room95::proc2() {
|
|||
}
|
||||
|
||||
if (_G(spieler).flags35_20) {
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
flags.NoPalAfterFlc = true;
|
||||
flic_cut(133, CFO_MODE);
|
||||
register_cutscene(33);
|
||||
|
|
|
@ -106,8 +106,8 @@ void Room97::entry() {
|
|||
|
||||
if (_G(spieler).flags37_8) {
|
||||
hide_cur();
|
||||
out->setze_zeiger(nullptr);
|
||||
out->cls();
|
||||
_G(out)->setze_zeiger(nullptr);
|
||||
_G(out)->cls();
|
||||
|
||||
_G(spieler).PersonRoomNr[P_HOWARD] = _G(spieler).PersonRoomNr[P_NICHELLE] = 89;
|
||||
_G(spieler).SVal2 = 0;
|
||||
|
@ -684,7 +684,7 @@ void Room97::sensorAnim() {
|
|||
|
||||
while (det->get_ani_status(16)) {
|
||||
get_user_key(NO_SETUP);
|
||||
if (minfo.button == 1 || in->get_switch_code() == 28) {
|
||||
if (minfo.button == 1 || _G(in)->get_switch_code() == 28) {
|
||||
if (_G(spieler).inv_cur)
|
||||
_G(maus_links_click) = true;
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ void sprite_engine() {
|
|||
break;
|
||||
|
||||
case ZOBJ_INVENTAR:
|
||||
out->sprite_set(inv_spr[nr],
|
||||
_G(out)->sprite_set(inv_spr[nr],
|
||||
_G(spieler).room_m_obj[nr].X - _G(spieler).scrollx,
|
||||
_G(spieler).room_m_obj[nr].Y - _G(spieler).scrolly, 0);
|
||||
break;
|
||||
|
@ -104,7 +104,7 @@ void sprite_engine() {
|
|||
calc_zoom(spieler_mi[P_CHEWY].XyzStart[1], (int16)room->_roomInfo->ZoomFak,
|
||||
(int16)room->_roomInfo->ZoomFak, &spieler_vector[P_CHEWY]);
|
||||
|
||||
out->scale_set(chewy->image[spr_nr], x, y,
|
||||
_G(out)->scale_set(chewy->image[spr_nr], x, y,
|
||||
spieler_vector[P_CHEWY].Xzoom,
|
||||
spieler_vector[P_CHEWY].Yzoom,
|
||||
scr_width);
|
||||
|
@ -119,7 +119,7 @@ void sprite_engine() {
|
|||
(int16)room->_roomInfo->ZoomFak,
|
||||
&spieler_vector[P_CHEWY]);
|
||||
|
||||
out->scale_set(spz_tinfo->image[spr_nr], x, y,
|
||||
_G(out)->scale_set(spz_tinfo->image[spr_nr], x, y,
|
||||
spieler_vector[P_CHEWY].Xzoom,
|
||||
spieler_vector[P_CHEWY].Yzoom,
|
||||
scr_width);
|
||||
|
@ -149,14 +149,14 @@ void sprite_engine() {
|
|||
_G(spieler).ZoomXy[p_nr][0],
|
||||
_G(spieler).ZoomXy[p_nr][1],
|
||||
&spieler_vector[p_nr]);
|
||||
out->scale_set(ts_info->image[spr_nr], x, y,
|
||||
_G(out)->scale_set(ts_info->image[spr_nr], x, y,
|
||||
spieler_vector[p_nr].Xzoom,
|
||||
spieler_vector[p_nr].Yzoom,
|
||||
scr_width);
|
||||
}
|
||||
break;
|
||||
case ZOBJ_PROGANI:
|
||||
out->sprite_set(spr_info[nr].Image,
|
||||
_G(out)->sprite_set(spr_info[nr].Image,
|
||||
spr_info[nr].X - _G(spieler).scrollx,
|
||||
spr_info[nr].Y - _G(spieler).scrolly, 0);
|
||||
break;
|
||||
|
@ -169,7 +169,7 @@ void sprite_engine() {
|
|||
mov_phasen[nr].ZoomFak,
|
||||
mov_phasen[nr].ZoomFak,
|
||||
&auto_mov_vector[nr]);
|
||||
out->scale_set(room_blk.DetImage[spr_nr],
|
||||
_G(out)->scale_set(room_blk.DetImage[spr_nr],
|
||||
auto_mov_vector[nr].Xypos[0] + Cxy[0] - _G(spieler).scrollx,
|
||||
auto_mov_vector[nr].Xypos[1] + Cxy[1] - _G(spieler).scrolly,
|
||||
auto_mov_vector[nr].Xzoom,
|
||||
|
@ -1025,7 +1025,7 @@ bool start_spz(int16 ani_id, int16 count, bool reverse, int16 p_nr) {
|
|||
if (spz_tinfo)
|
||||
free((char *)spz_tinfo);
|
||||
spz_akt_id = ani_id;
|
||||
spz_tinfo = mem->taf_seq_adr(spr_start, spr_anz);
|
||||
spz_tinfo = _G(mem)->taf_seq_adr(spr_start, spr_anz);
|
||||
}
|
||||
|
||||
for (i = 0; i < spr_anz; i++) {
|
||||
|
@ -1089,7 +1089,7 @@ void load_person_ani(int16 ani_id, int16 p_nr) {
|
|||
PersonAni[p_nr] = ani_id;
|
||||
if (PersonTaf[p_nr])
|
||||
free((char *)PersonTaf[p_nr]);
|
||||
PersonTaf[p_nr] = mem->taf_seq_adr(ani_start, ani_anz);
|
||||
PersonTaf[p_nr] = _G(mem)->taf_seq_adr(ani_start, ani_anz);
|
||||
spieler_vector[p_nr].PhNr = 0;
|
||||
spieler_vector[p_nr].PhAnz = ani_anz;
|
||||
}
|
||||
|
|
|
@ -2179,15 +2179,15 @@ void calc_inv_use_txt(int16 test_nr) {
|
|||
_G(spieler).scrolly = 0;
|
||||
|
||||
room->load_tgp(BUCH_START, &room_blk, GBOOK_TGP, 0, GBOOK);
|
||||
out->setze_zeiger(workptr);
|
||||
out->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
|
||||
out->back2screen(workpage);
|
||||
_G(out)->setze_zeiger(workptr);
|
||||
_G(out)->map_spr2screen(ablage[room_blk.AkAblage], _G(spieler).scrollx, _G(spieler).scrolly);
|
||||
_G(out)->back2screen(workpage);
|
||||
|
||||
while (in->get_switch_code() != ESC) {
|
||||
while (_G(in)->get_switch_code() != ESC) {
|
||||
g_events->update();
|
||||
SHOULD_QUIT_RETURN;
|
||||
}
|
||||
while (in->get_switch_code() != 0) {
|
||||
while (_G(in)->get_switch_code() != 0) {
|
||||
g_events->update();
|
||||
SHOULD_QUIT_RETURN;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue