[Scummvm-cvs-logs] CVS: scummvm/sky compact.cpp,NONE,1.1 compact.h,NONE,1.1 debug.cpp,NONE,1.1 debug.h,NONE,1.1 logic.cpp,NONE,1.1 logic.h,NONE,1.1 module.mk,1.6,1.7 sky.cpp,1.16,1.17 sky.h,1.13,1.14 skydefs.h,1.4,1.5 struc.h,1.4,1.5 text.cpp,1.13,1.14 text.h,1.7,1.8
Oliver Kiehl
olki at users.sourceforge.net
Fri Apr 25 08:19:19 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky/compacts 0compact.h,NONE,1.1 101comp.h,NONE,1.1 102comp.h,NONE,1.1 10comp.h,NONE,1.1 11comp.h,NONE,1.1 12comp.h,NONE,1.1 13comp.h,NONE,1.1 14comp.h,NONE,1.1 15comp.h,NONE,1.1 16comp.h,NONE,1.1 17comp.h,NONE,1.1 18comp.h,NONE,1.1 19comp.h,NONE,1.1 1compact.h,NONE,1.1 20comp.h,NONE,1.1 21comp.h,NONE,1.1 22comp.h,NONE,1.1 23comp.h,NONE,1.1 24comp.h,NONE,1.1 25comp.h,NONE,1.1 26comp.h,NONE,1.1 27comp.h,NONE,1.1 28comp.h,NONE,1.1 29comp.h,NONE,1.1 2compact.h,NONE,1.1 30comp.h,NONE,1.1 31comp.h,NONE,1.1 32comp.h,NONE,1.1 33comp.h,NONE,1.1 34comp.h,NONE,1.1 36comp.h,NONE,1.1 37comp.h,NONE,1.1 38comp.h,NONE,1.1 39comp.h,NONE,1.1 3compact.h,NONE,1.1 40comp.h,NONE,1.1 41comp.h,NONE,1.1 42comp.h,NONE,1.1 44comp.h,NONE,1.1 45comp.h,NONE,1.1 46comp.h,NONE,1.1 47comp.h,NONE,1.1 48comp.h,NONE,1.1 4compact.h,NONE,1.1 5compact.h,NONE,1.1 65comp.h,NONE,1.1 66comp.h,NONE,1.1 67comp.h,NONE,1.1 68comp.h,NONE,1.1 69comp.h,NONE,1.1 70comp.h,NONE,1.1 71comp.h,NONE,1.1 72comp.h,NONE,1.1 73comp.h,NONE,1.1 74comp.h,NONE,1.1 75comp.h,NONE,1.1 76comp.h,NONE,1.1 77comp.h,NONE,1.1 78comp.h,NONE,1.1 79comp.h,NONE,1.1 80comp.h,NONE,1.1 81comp.h,NONE,1.1 82comp.h,NONE,1.1 85comp.h,NONE,1.1 90comp.h,NONE,1.1 91comp.h,NONE,1.1 92comp.h,NONE,1.1 93comp.h,NONE,1.1 94comp.h,NONE,1.1 95comp.h,NONE,1.1 96comp.h,NONE,1.1 9compact.h,NONE,1.1 linc_gen.h,NONE,1.1 lincmenu.h,NONE,1.1 objects.h,NONE,1.1 z_compac.h,NONE,1.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky compact.cpp,1.1,1.2 debug.cpp,1.1,1.2 logic.cpp,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv27732
Modified Files:
module.mk sky.cpp sky.h skydefs.h struc.h text.cpp text.h
Added Files:
compact.cpp compact.h debug.cpp debug.h logic.cpp logic.h
Log Message:
Committing my stuff under pressure from Endy ;)
please note that there are still many bugs in here. several stuff
isn't endian safe either. SkyLogic needs to get split up as well.
--- NEW FILE: compact.cpp ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2003 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/sky/compact.cpp,v 1.1 2003/04/25 15:17:44 olki Exp $
*
*/
#include "sky/compact.h"
#include "sky/compacts/0compact.h"
#include "sky/compacts/1compact.h"
#include "sky/compacts/29comp.h"
#include "sky/compacts/2compact.h"
#include "sky/compacts/30comp.h"
#include "sky/compacts/3compact.h"
#include "sky/compacts/4compact.h"
#include "sky/compacts/5compact.h"
#include "sky/compacts/66comp.h"
#include "sky/compacts/90comp.h"
#include "sky/compacts/9compact.h"
#include "sky/compacts/linc_gen.h"
#include "sky/compacts/lincmenu.h"
#include "sky/compacts/z_compac.h"
#define COMPACT_SIZE (sizeof(compactOffsets)/sizeof(uint32))
#define EXTCOMPACT_SIZE (sizeof(extCompactOffsets)/sizeof(uint32))
#define UNKNOWNSTUFF_SIZE (sizeof(unknownStuffOffsets)/sizeof(uint32))
#define OFFS(type,item) (((uint32)(&((type*)0)->item)))
#define MK32(type,item) OFFS(type, item),0,0,0
#define MK16(type,item) OFFS(type, item),0
namespace SkyCompact {
static const uint32 compactOffsets[] = {
MK16(Compact, logic),
MK16(Compact, status),
MK16(Compact, sync),
MK16(Compact, screen),
MK16(Compact, place),
MK32(Compact, getToTable),
MK16(Compact, xcood),
MK16(Compact, ycood),
MK16(Compact, frame),
MK16(Compact, cursorText),
MK16(Compact, mouseOn),
MK16(Compact, mouseOff),
MK16(Compact, mouseClick),
MK16(Compact, mouseRelX),
MK16(Compact, mouseRelY),
MK16(Compact, mouseSizeX),
MK16(Compact, mouseSizeY),
MK16(Compact, actionScript),
MK16(Compact, upFlag),
MK16(Compact, downFlag),
MK16(Compact, getToFlag),
MK16(Compact, flag),
MK16(Compact, mood),
MK32(Compact, grafixProg),
MK16(Compact, offset),
MK16(Compact, mode),
MK16(Compact, baseSub),
MK16(Compact, baseSub_off),
};
static const uint32 extCompactOffsets[] = {
MK16(ExtCompact, actionSub),
MK16(ExtCompact, actionSub_off),
MK16(ExtCompact, getToSub),
MK16(ExtCompact, getToSub_off),
MK16(ExtCompact, extraSub),
MK16(ExtCompact, extraSub_off),
MK16(ExtCompact, dir),
MK16(ExtCompact, stopScript),
MK16(ExtCompact, miniBump),
MK16(ExtCompact, leaving),
MK16(ExtCompact, atWatch),
MK16(ExtCompact, atWas),
MK16(ExtCompact, alt),
MK16(ExtCompact, request),
MK16(ExtCompact, spWidth_xx),
MK16(ExtCompact, spColour),
MK16(ExtCompact, spTextId),
MK16(ExtCompact, spTime),
MK16(ExtCompact, arAnimIndex),
MK32(ExtCompact, turnProg),
MK16(ExtCompact, waitingFor),
MK16(ExtCompact, arTargetX),
MK16(ExtCompact, arTargetY),
MK32(ExtCompact, animScratch),
MK16(ExtCompact, megaSet),
MK16(ExtCompact, gridWidth),
MK16(ExtCompact, colOffset),
MK16(ExtCompact, colWidth),
MK16(ExtCompact, lastChr),
MK32(ExtCompact, animUp),
MK32(ExtCompact, animDown),
MK32(ExtCompact, animLeft),
MK32(ExtCompact, animRight),
MK32(ExtCompact, standUp),
MK32(ExtCompact, standDown),
MK32(ExtCompact, standLeft),
MK32(ExtCompact, standRight),
MK32(ExtCompact, standTalk),
};
static const uint32 unknownStuffOffsets[] = {
MK16(UnknownStuff, unknownStuff_1_1[0]),
MK16(UnknownStuff, unknownStuff_1_1[1]),
MK16(UnknownStuff, unknownStuff_1_1[2]),
MK16(UnknownStuff, unknownStuff_1_1[3]),
MK32(UnknownStuff, unknownStuff_1_2[0]),
MK32(UnknownStuff, unknownStuff_1_2[1]),
MK32(UnknownStuff, unknownStuff_1_2[2]),
MK32(UnknownStuff, unknownStuff_1_2[3]),
MK32(UnknownStuff, unknownStuff_1_2[4]),
MK32(UnknownStuff, unknownStuff_1_2[5]),
MK32(UnknownStuff, unknownStuff_1_2[6]),
MK32(UnknownStuff, unknownStuff_1_2[7]),
MK32(UnknownStuff, unknownStuff_1_2[8]),
MK32(UnknownStuff, unknownStuff_1_2[9]),
MK32(UnknownStuff, unknownStuff_1_2[10]),
MK32(UnknownStuff, unknownStuff_1_2[11]),
MK32(UnknownStuff, unknownStuff_1_2[12]),
MK32(UnknownStuff, unknownStuff_1_2[13]),
MK32(UnknownStuff, unknownStuff_1_2[14]),
MK32(UnknownStuff, unknownStuff_1_2[15]),
MK32(UnknownStuff, unknownStuff_1_2[16]),
MK32(UnknownStuff, unknownStuff_1_2[17]),
MK32(UnknownStuff, unknownStuff_1_2[18]),
MK32(UnknownStuff, unknownStuff_1_2[19]),
MK32(UnknownStuff, unknownStuff_1_2[20]),
MK32(UnknownStuff, unknownStuff_1_2[21]),
MK32(UnknownStuff, unknownStuff_1_2[22]),
MK32(UnknownStuff, unknownStuff_1_2[23]),
MK32(UnknownStuff, unknownStuff_1_2[24]),
MK32(UnknownStuff, unknownStuff_1_2[25]),
MK32(UnknownStuff, unknownStuff_1_2[26]),
MK32(UnknownStuff, unknownStuff_1_2[27]),
MK32(UnknownStuff, unknownStuff_1_2[28]),
MK32(UnknownStuff, unknownStuff_1_2[29]),
MK32(UnknownStuff, unknownStuff_1_2[30]),
MK32(UnknownStuff, unknownStuff_1_2[31]),
MK32(UnknownStuff, unknownStuff_1_2[32]),
MK32(UnknownStuff, unknownStuff_1_2[33]),
MK16(UnknownStuff, unknownStuff_2_1[0]),
MK16(UnknownStuff, unknownStuff_2_1[1]),
MK16(UnknownStuff, unknownStuff_2_1[2]),
MK16(UnknownStuff, unknownStuff_2_1[3]),
MK32(UnknownStuff, unknownStuff_2_2[0]),
MK32(UnknownStuff, unknownStuff_2_2[1]),
MK32(UnknownStuff, unknownStuff_2_2[2]),
MK32(UnknownStuff, unknownStuff_2_2[3]),
MK32(UnknownStuff, unknownStuff_2_2[4]),
MK32(UnknownStuff, unknownStuff_2_2[5]),
MK32(UnknownStuff, unknownStuff_2_2[6]),
MK32(UnknownStuff, unknownStuff_2_2[7]),
MK32(UnknownStuff, unknownStuff_2_2[8]),
MK32(UnknownStuff, unknownStuff_2_2[9]),
MK32(UnknownStuff, unknownStuff_2_2[10]),
MK32(UnknownStuff, unknownStuff_2_2[11]),
MK32(UnknownStuff, unknownStuff_2_2[12]),
MK32(UnknownStuff, unknownStuff_2_2[13]),
MK32(UnknownStuff, unknownStuff_2_2[14]),
MK32(UnknownStuff, unknownStuff_2_2[15]),
MK32(UnknownStuff, unknownStuff_2_2[16]),
MK32(UnknownStuff, unknownStuff_2_2[17]),
MK32(UnknownStuff, unknownStuff_2_2[18]),
MK32(UnknownStuff, unknownStuff_2_2[19]),
MK32(UnknownStuff, unknownStuff_2_2[20]),
MK32(UnknownStuff, unknownStuff_2_2[21]),
MK32(UnknownStuff, unknownStuff_2_2[22]),
MK32(UnknownStuff, unknownStuff_2_2[23]),
MK32(UnknownStuff, unknownStuff_2_2[24]),
MK32(UnknownStuff, unknownStuff_2_2[25]),
MK32(UnknownStuff, unknownStuff_2_2[26]),
MK32(UnknownStuff, unknownStuff_2_2[27]),
MK32(UnknownStuff, unknownStuff_2_2[28]),
MK32(UnknownStuff, unknownStuff_2_2[29]),
MK32(UnknownStuff, unknownStuff_2_2[30]),
MK32(UnknownStuff, unknownStuff_2_2[31]),
MK32(UnknownStuff, unknownStuff_2_2[32]),
MK32(UnknownStuff, unknownStuff_2_2[33]),
MK16(UnknownStuff, unknownStuff_3_1[0]),
MK16(UnknownStuff, unknownStuff_3_1[1]),
MK16(UnknownStuff, unknownStuff_3_1[2]),
MK16(UnknownStuff, unknownStuff_3_1[3]),
MK32(UnknownStuff, unknownStuff_3_2[0]),
MK32(UnknownStuff, unknownStuff_3_2[1]),
MK32(UnknownStuff, unknownStuff_3_2[2]),
MK32(UnknownStuff, unknownStuff_3_2[3]),
MK32(UnknownStuff, unknownStuff_3_2[4]),
MK32(UnknownStuff, unknownStuff_3_2[5]),
MK32(UnknownStuff, unknownStuff_3_2[6]),
MK32(UnknownStuff, unknownStuff_3_2[7]),
MK32(UnknownStuff, unknownStuff_3_2[8]),
MK32(UnknownStuff, unknownStuff_3_2[9]),
MK32(UnknownStuff, unknownStuff_3_2[10]),
MK32(UnknownStuff, unknownStuff_3_2[11]),
MK32(UnknownStuff, unknownStuff_3_2[12]),
MK32(UnknownStuff, unknownStuff_3_2[13]),
MK32(UnknownStuff, unknownStuff_3_2[14]),
MK32(UnknownStuff, unknownStuff_3_2[15]),
MK32(UnknownStuff, unknownStuff_3_2[16]),
MK32(UnknownStuff, unknownStuff_3_2[17]),
MK32(UnknownStuff, unknownStuff_3_2[18]),
MK32(UnknownStuff, unknownStuff_3_2[19]),
MK32(UnknownStuff, unknownStuff_3_2[20]),
MK32(UnknownStuff, unknownStuff_3_2[21]),
MK32(UnknownStuff, unknownStuff_3_2[22]),
MK32(UnknownStuff, unknownStuff_3_2[23]),
MK32(UnknownStuff, unknownStuff_3_2[24]),
MK32(UnknownStuff, unknownStuff_3_2[25]),
MK32(UnknownStuff, unknownStuff_3_2[26]),
MK32(UnknownStuff, unknownStuff_3_2[27]),
MK32(UnknownStuff, unknownStuff_3_2[28]),
MK32(UnknownStuff, unknownStuff_3_2[29]),
MK32(UnknownStuff, unknownStuff_3_2[30]),
MK32(UnknownStuff, unknownStuff_3_2[31]),
MK32(UnknownStuff, unknownStuff_3_2[32]),
MK32(UnknownStuff, unknownStuff_3_2[33]),
};
void *getCompactElem(Compact *cpt, uint32 off) {
if (off < COMPACT_SIZE)
return((uint8 *)cpt + compactOffsets[off]);
off -= COMPACT_SIZE;
if (off < EXTCOMPACT_SIZE)
return((uint8 *)(cpt->extCompact) + extCompactOffsets[off]);
off -= EXTCOMPACT_SIZE;
if (off < 5*5*4)
return ((void **)(cpt->turnTable))[off/4];
off -= 5*5*4;
if (off < UNKNOWNSTUFF_SIZE)
return((uint8 *)(cpt->unknownStuff) + unknownStuffOffsets[off]);
error("Offset %X out of bounds of compact", off + COMPACT_SIZE + EXTCOMPACT_SIZE + 5*5*4);
}
};
--- NEW FILE: compact.h ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2003 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/sky/compact.h,v 1.1 2003/04/25 15:17:45 olki Exp $
*
[...3199 lines suppressed...]
extern uint16 monitor_r_to_d[];
extern uint16 monitor_r_to_l[];
extern uint16 *monitor_turnTable[5][5];
extern ExtCompact monitor_ext;
extern Compact monitor;
extern ExtCompact anita_ext;
extern Compact anita;
extern uint16 rs_r_arr_linc[];
extern uint16 s5_fast_list[];
extern uint16 but_e[];
extern uint16 but_1[];
extern uint16 but_6[];
extern uint16 fast_intro_2[];
extern uint16 fast_intro_3[];
extern uint16 retina_scan_cdt[];
extern Compact forklift_cpt;
extern void *data_0[];
};
#endif
--- NEW FILE: debug.cpp ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2003 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/sky/debug.cpp,v 1.1 2003/04/25 15:17:46 olki Exp $
*
*/
#include "sky/debug.h"
static const char *section_0_compacts[] = {
"UNDEFINED",
"joey",
"joey_park",
"foster",
"std_menu_logic",
"text_mouse",
"gallcard_menu",
"rs_mega_alive",
"citycard_menu",
"shades_menu",
"putty_menu",
"lightbulb_menu",
"low_get_seq",
"mini_shrug_seq",
"sml_up_mid_get_seq",
"new_grid",
"lamb",
"floor",
"coordinate_test",
"save_restore_mouse",
"whole_screen",
"l_talk_s2",
"r_talk_s2",
"text_1",
"text_2",
"text_3",
"text_4",
"text_5",
"text_6",
"text_7",
"text_8",
"text_9",
"text_10",
"text_11",
"wd40_menu",
"skey_menu",
"secateurs_menu",
"rope_menu",
"plaster_menu",
"new_cable_menu",
"shrug_seq",
"rad_shrug_seq",
"brick_menu",
"tongs_menu",
"talk1",
"talk2",
"menu_bar",
"left_arrow",
"right_arrow",
"dog_food_menu",
"UNDEFINED",
"blank1",
"blank2",
"blank3",
"blank4",
"blank5",
"blank6",
"blank7",
"blank8",
"blank9",
"blank10",
"blank11",
"UNDEFINED",
"crow_bar_menu",
"sarnie_menu",
"spanner_menu",
"joeyb_menu",
"low_floor",
"UNDEFINED",
"stairs",
"upstairs",
"anita_card_menu",
"rs_lamb_to_three",
"rs_lamb_start_2",
"anchor_menu",
"magazine_menu",
"tape_menu",
"glass_menu",
"rs_lamb_start_3",
"ticket_menu",
"s29_fast_list",
"s6_fast_list",
"fast_list_sc3",
"s9_fast_list",
"s10_fast_list",
"bar",
"s11_fast_list",
"fast_list_0",
"s0_fast_list",
"s7_fast_list",
"door",
"s28_fast_list",
"swing_list",
"UNDEFINED",
"UNDEFINED",
"outside_ledge",
"UNDEFINED",
"r1_door",
"UNDEFINED",
"UNDEFINED",
"UNDEFINED",
"UNDEFINED",
"fast_list_sc90",
"UNDEFINED",
"UNDEFINED",
"small_door",
"sc85_fast_list",
"sc85_chip_list",
"sc85_logic_list",
"sc85_mouse_list",
"sc85_palette",
"right_exit0",
"UNDEFINED",
"UNDEFINED",
"UNDEFINED",
"s2_floor",
"UNDEFINED",
"s101_chip_list",
"s101_pal",
"s101_mouse",
"s101_logic",
"full_screen",
"cancel_button",
"button_0",
"button_1",
"button_2",
"button_3",
"button_4",
"button_5",
"button_6",
"button_7",
"button_8",
"button_9",
"rs_left_arrow",
"rs_right_arrow",
"rs_blank",
"monitor",
"anita",
"UNDEFINED",
"UNDEFINED",
"UNDEFINED",
"baby_logic_list",
"rs_l_arr_linc",
"rs_r_arr_linc",
"rs_blanks_linc",
"s5_fast_list",
"but_e",
"but_0",
"but_1",
"but_2",
"but_3",
"but_4",
"but_5",
"but_6",
"but_7",
"but_8",
"but_9",
"UNDEFINED",
"s102_chip_list",
"s102_pal",
"s102_logic",
"s102_mouse",
"restart_butt",
"restart_seq",
"restore_butt",
"restore_seq",
"seq1_pal",
"seq2_pal",
"seq3_pal",
"fast_intro",
"chip_intro",
"fast_intro_2",
"fast_intro_3",
"retina_scan",
"retina_scan_cdt",
"exit_butt",
"exit_seq",
"forklift_cpt",
"forklift1_cdt",
"forklift2_cdt",
};
static const char *logic_table_names[] = {
"return",
"SkyLogic::script",
"SkyLogic::auto_route",
"SkyLogic::ar_anim",
"SkyLogic::ar_turn",
"SkyLogic::alt",
"SkyLogic::anim",
"SkyLogic::turn",
"SkyLogic::cursor",
"SkyLogic::talk",
"SkyLogic::listen",
"SkyLogic::stopped",
"SkyLogic::choose",
"SkyLogic::frames",
"SkyLogic::pause",
"SkyLogic::wait_sync",
"SkyLogic::simple_anim",
};
static const char opcode_par[] = {
1,
0,
1,
0,
0,
1,
1,
0,
0,
1,
0,
2,
0,
0,
1,
1,
1,
0,
1,
0,
0,
};
static const char *opcodes[] = {
"push_variable",
"less_than",
"push_number",
"not_equal",
"if_and",
"skip_zero",
"pop_var",
"minus",
"plus",
"skip_always",
"if_or",
"call_mcode",
"more_than",
"script_exit",
"switch",
"push_offset",
"pop_offset",
"is_equal",
"skip_nz",
"script_exit",
"restart_script",
};
static const char *mcodes[] = {
"fn_cache_chip",
"fn_cache_fast",
"fn_draw_screen",
"fn_ar",
"fn_ar_animate",
"fn_idle",
"fn_interact",
"fn_start_sub",
"fn_they_start_sub",
"fn_assign_base",
"fn_disk_mouse",
"fn_normal_mouse",
"fn_blank_mouse",
"fn_cross_mouse",
"fn_cursor_right",
"fn_cursor_left",
"fn_cursor_down",
"fn_open_hand",
"fn_close_hand",
"fn_get_to",
"fn_set_to_stand",
"fn_turn_to",
"fn_arrived",
"fn_leaving",
"fn_set_alternate",
"fn_alt_set_alternate",
"fn_kill_id",
"fn_no_human",
"fn_add_human",
"fn_add_buttons",
"fn_no_buttons",
"fn_set_stop",
"fn_clear_stop",
"fn_pointer_text",
"fn_quit",
"fn_speak_me",
"fn_speak_me_dir",
"fn_speak_wait",
"fn_speak_wait_dir",
"fn_chooser",
"fn_highlight",
"fn_text_kill",
"fn_stop_mode",
"fn_we_wait",
"fn_send_sync",
"fn_send_fast_sync",
"fn_send_request",
"fn_clear_request",
"fn_check_request",
"fn_start_menu",
"fn_unhighlight",
"fn_face_id",
"fn_foreground",
"fn_background",
"fn_new_background",
"fn_sort",
"fn_no_sprite_engine",
"fn_no_sprites_a6",
"fn_reset_id",
"fn_toggle_grid",
"fn_pause",
"fn_run_anim_mod",
"fn_simple_mod",
"fn_run_frames",
"fn_await_sync",
"fn_inc_mega_set",
"fn_dec_mega_set",
"fn_set_mega_set",
"fn_move_items",
"fn_new_list",
"fn_ask_this",
"fn_random",
"fn_person_here",
"fn_toggle_mouse",
"fn_mouse_on",
"fn_mouse_off",
"fn_fetch_x",
"fn_fetch_y",
"fn_test_list",
"fn_fetch_place",
"fn_custom_joey",
"fn_set_palette",
"fn_text_module",
"fn_change_name",
"fn_mini_load",
"fn_flush_buffers",
"fn_flush_chip",
"fn_save_coods",
"fn_plot_grid",
"fn_remove_grid",
"fn_eyeball",
"fn_cursor_up",
"fn_leave_section",
"fn_enter_section",
"fn_restore_game",
"fn_restart_game",
"fn_new_swing_seq",
"fn_wait_swing_end",
"fn_skip_intro_code",
"fn_blank_screen",
"fn_print_credit",
"fn_look_at",
"fn_linc_text_module",
"fn_text_kill2",
"fn_set_font",
"fn_start_fx",
"fn_stop_fx",
"fn_start_music",
"fn_stop_music",
"fn_fade_down",
"fn_fade_up",
"fn_quit_to_dos",
"fn_pause_fx",
"fn_un_pause_fx",
"fn_printf",
};
void SkyDebug::fetchCompact(uint32 a) {
uint32 sectionNum = (a & 0xf000) >> 12;
uint32 compactNum = (a & 0x0fff);
if (sectionNum == 0)
printf("Loading Compact %s from section %d\n", section_0_compacts[compactNum], sectionNum);
else
printf("Loading Compact %d from section %d\n", compactNum, sectionNum);
}
void SkyDebug::logic(uint32 logic) {
printf("LOGIC: %s\n", logic_table_names[logic]);
}
void SkyDebug::script(uint32 command, uint16 *scriptData) {
int i;
printf("SCRIPT: %s", opcodes[command]);
for (i = 0; i < opcode_par[command]; i++)
printf(" %d", *(scriptData + i));
printf("\n");
}
void SkyDebug::mcode(uint32 mcode, uint32 a, uint32 b, uint32 c) {
printf("MCODE: %s(%d, %d, %d)\n", mcodes[mcode], a, b, c);
};
--- NEW FILE: debug.h ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2003 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/sky/debug.h,v 1.1 2003/04/25 15:17:46 olki Exp $
*
*/
#include "sky/sky.h"
class SkyDebug {
public:
static void fetchCompact(uint32 a);
static void logic(uint32 logic);
static void script(uint32 command, uint16 *scriptData);
static void mcode(uint32 mcode, uint32 a, uint32 b, uint32 c);
};
--- NEW FILE: logic.cpp ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2003 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/sky/logic.cpp,v 1.1 2003/04/25 15:17:46 olki Exp $
*
[...1060 lines suppressed...]
uint32 SkyLogic::fnFadeUp(uint32 a, uint32 b, uint32 c) {
error("Stub: fnFadeUp");
}
uint32 SkyLogic::fnQuitToDos(uint32 a, uint32 b, uint32 c) {
error("Stub: fnQuitToDos");
}
uint32 SkyLogic::fnPauseFx(uint32 a, uint32 b, uint32 c) {
error("Stub: fnPauseFx");
}
uint32 SkyLogic::fnUnPauseFx(uint32 a, uint32 b, uint32 c) {
error("Stub: fnUnPauseFx");
}
uint32 SkyLogic::fnPrintf(uint32 a, uint32 b, uint32 c) {
error("Stub: fnPrintf");
}
--- NEW FILE: logic.h ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2003 The ScummVM project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: /cvsroot/scummvm/scummvm/sky/logic.h,v 1.1 2003/04/25 15:17:46 olki Exp $
*
*/
#ifndef SKYLOGIC_H
#define SKYLOGIC_H
#include "sky/sky.h"
#include "sky/disk.h"
class SkyLogic {
public:
SkyLogic(SkyDisk *skyDisk) : _skyDisk(skyDisk) { initScriptVariables(); };
void engine();
void lreturn();
void logicScript();
void autoRoute();
void arAnim();
void arTurn();
void alt();
void anim();
void turn();
void cursor();
void talk();
void listen();
void stopped();
void choose();
void frames();
void pause();
void waitSync();
void simpleAnim();
uint32 fnCacheChip(uint32 a, uint32 b, uint32 c);
uint32 fnCacheFast(uint32 a, uint32 b, uint32 c);
uint32 fnDrawScreen(uint32 a, uint32 b, uint32 c);
uint32 fnAr(uint32 a, uint32 b, uint32 c);
uint32 fnArAnimate(uint32 a, uint32 b, uint32 c);
uint32 fnIdle(uint32 a, uint32 b, uint32 c);
uint32 fnInteract(uint32 a, uint32 b, uint32 c);
uint32 fnStartSub(uint32 a, uint32 b, uint32 c);
uint32 fnTheyStartSub(uint32 a, uint32 b, uint32 c);
uint32 fnAssignBase(uint32 a, uint32 b, uint32 c);
uint32 fnDiskMouse(uint32 a, uint32 b, uint32 c);
uint32 fnNormalMouse(uint32 a, uint32 b, uint32 c);
uint32 fnBlankMouse(uint32 a, uint32 b, uint32 c);
uint32 fnCrossMouse(uint32 a, uint32 b, uint32 c);
uint32 fnCursorRight(uint32 a, uint32 b, uint32 c);
uint32 fnCursorLeft(uint32 a, uint32 b, uint32 c);
uint32 fnCursorDown(uint32 a, uint32 b, uint32 c);
uint32 fnOpenHand(uint32 a, uint32 b, uint32 c);
uint32 fnCloseHand(uint32 a, uint32 b, uint32 c);
uint32 fnGetTo(uint32 a, uint32 b, uint32 c);
uint32 fnSetToStand(uint32 a, uint32 b, uint32 c);
uint32 fnTurnTo(uint32 a, uint32 b, uint32 c);
uint32 fnArrived(uint32 a, uint32 b, uint32 c);
uint32 fnLeaving(uint32 a, uint32 b, uint32 c);
uint32 fnSetAlternate(uint32 a, uint32 b, uint32 c);
uint32 fnAltSetAlternate(uint32 a, uint32 b, uint32 c);
uint32 fnKillId(uint32 a, uint32 b, uint32 c);
uint32 fnNoHuman(uint32 a, uint32 b, uint32 c);
uint32 fnAddHuman(uint32 a, uint32 b, uint32 c);
uint32 fnAddButtons(uint32 a, uint32 b, uint32 c);
uint32 fnNoButtons(uint32 a, uint32 b, uint32 c);
uint32 fnSetStop(uint32 a, uint32 b, uint32 c);
uint32 fnClearStop(uint32 a, uint32 b, uint32 c);
uint32 fnPointerText(uint32 a, uint32 b, uint32 c);
uint32 fnQuit(uint32 a, uint32 b, uint32 c);
uint32 fnSpeakMe(uint32 a, uint32 b, uint32 c);
uint32 fnSpeakMeDir(uint32 a, uint32 b, uint32 c);
uint32 fnSpeakWait(uint32 a, uint32 b, uint32 c);
uint32 fnSpeakWaitDir(uint32 a, uint32 b, uint32 c);
uint32 fnChooser(uint32 a, uint32 b, uint32 c);
uint32 fnHighlight(uint32 a, uint32 b, uint32 c);
uint32 fnTextKill(uint32 a, uint32 b, uint32 c);
uint32 fnStopMode(uint32 a, uint32 b, uint32 c);
uint32 fnWeWait(uint32 a, uint32 b, uint32 c);
uint32 fnSendSync(uint32 a, uint32 b, uint32 c);
uint32 fnSendFastSync(uint32 a, uint32 b, uint32 c);
uint32 fnSendRequest(uint32 a, uint32 b, uint32 c);
uint32 fnClearRequest(uint32 a, uint32 b, uint32 c);
uint32 fnCheckRequest(uint32 a, uint32 b, uint32 c);
uint32 fnStartMenu(uint32 a, uint32 b, uint32 c);
uint32 fnUnhighlight(uint32 a, uint32 b, uint32 c);
uint32 fnFaceId(uint32 a, uint32 b, uint32 c);
uint32 fnForeground(uint32 a, uint32 b, uint32 c);
uint32 fnBackground(uint32 a, uint32 b, uint32 c);
uint32 fnNewBackground(uint32 a, uint32 b, uint32 c);
uint32 fnSort(uint32 a, uint32 b, uint32 c);
uint32 fnNoSpriteEngine(uint32 a, uint32 b, uint32 c);
uint32 fnNoSpritesA6(uint32 a, uint32 b, uint32 c);
uint32 fnResetId(uint32 a, uint32 b, uint32 c);
uint32 fnToggleGrid(uint32 a, uint32 b, uint32 c);
uint32 fnPause(uint32 a, uint32 b, uint32 c);
uint32 fnRunAnimMod(uint32 a, uint32 b, uint32 c);
uint32 fnSimpleMod(uint32 a, uint32 b, uint32 c);
uint32 fnRunFrames(uint32 a, uint32 b, uint32 c);
uint32 fnAwaitSync(uint32 a, uint32 b, uint32 c);
uint32 fnIncMegaSet(uint32 a, uint32 b, uint32 c);
uint32 fnDecMegaSet(uint32 a, uint32 b, uint32 c);
uint32 fnSetMegaSet(uint32 a, uint32 b, uint32 c);
uint32 fnMoveItems(uint32 a, uint32 b, uint32 c);
uint32 fnNewList(uint32 a, uint32 b, uint32 c);
uint32 fnAskThis(uint32 a, uint32 b, uint32 c);
uint32 fnRandom(uint32 a, uint32 b, uint32 c);
uint32 fnPersonHere(uint32 a, uint32 b, uint32 c);
uint32 fnToggleMouse(uint32 a, uint32 b, uint32 c);
uint32 fnMouseOn(uint32 a, uint32 b, uint32 c);
uint32 fnMouseOff(uint32 a, uint32 b, uint32 c);
uint32 fnFetchX(uint32 a, uint32 b, uint32 c);
uint32 fnFetchY(uint32 a, uint32 b, uint32 c);
uint32 fnTestList(uint32 a, uint32 b, uint32 c);
uint32 fnFetchPlace(uint32 a, uint32 b, uint32 c);
uint32 fnCustomJoey(uint32 a, uint32 b, uint32 c);
uint32 fnSetPalette(uint32 a, uint32 b, uint32 c);
uint32 fnTextModule(uint32 a, uint32 b, uint32 c);
uint32 fnChangeName(uint32 a, uint32 b, uint32 c);
uint32 fnMiniLoad(uint32 a, uint32 b, uint32 c);
uint32 fnFlushBuffers(uint32 a, uint32 b, uint32 c);
uint32 fnFlushChip(uint32 a, uint32 b, uint32 c);
uint32 fnSaveCoods(uint32 a, uint32 b, uint32 c);
uint32 fnPlotGrid(uint32 a, uint32 b, uint32 c);
uint32 fnRemoveGrid(uint32 a, uint32 b, uint32 c);
uint32 fnEyeball(uint32 a, uint32 b, uint32 c);
uint32 fnCursorUp(uint32 a, uint32 b, uint32 c);
uint32 fnLeaveSection(uint32 a, uint32 b, uint32 c);
uint32 fnEnterSection(uint32 a, uint32 b, uint32 c);
uint32 fnRestoreGame(uint32 a, uint32 b, uint32 c);
uint32 fnRestartGame(uint32 a, uint32 b, uint32 c);
uint32 fnNewSwingSeq(uint32 a, uint32 b, uint32 c);
uint32 fnWaitSwingEnd(uint32 a, uint32 b, uint32 c);
uint32 fnSkipIntroCode(uint32 a, uint32 b, uint32 c);
uint32 fnBlankScreen(uint32 a, uint32 b, uint32 c);
uint32 fnPrintCredit(uint32 a, uint32 b, uint32 c);
uint32 fnLookAt(uint32 a, uint32 b, uint32 c);
uint32 fnLincTextModule(uint32 a, uint32 b, uint32 c);
uint32 fnTextKill2(uint32 a, uint32 b, uint32 c);
uint32 fnSetFont(uint32 a, uint32 b, uint32 c);
uint32 fnStartFx(uint32 a, uint32 b, uint32 c);
uint32 fnStopFx(uint32 a, uint32 b, uint32 c);
uint32 fnStartMusic(uint32 a, uint32 b, uint32 c);
uint32 fnStopMusic(uint32 a, uint32 b, uint32 c);
uint32 fnFadeDown(uint32 a, uint32 b, uint32 c);
uint32 fnFadeUp(uint32 a, uint32 b, uint32 c);
uint32 fnQuitToDos(uint32 a, uint32 b, uint32 c);
uint32 fnPauseFx(uint32 a, uint32 b, uint32 c);
uint32 fnUnPauseFx(uint32 a, uint32 b, uint32 c);
uint32 fnPrintf(uint32 a, uint32 b, uint32 c);
protected:
void push(unsigned int);
uint32 pop();
void checkModuleLoaded(uint32 moduleNo);
uint32 script(Compact *compact, uint32 script);
void initScriptVariables();
Compact *_compact;
uint32 _scriptVariables[838];
SkyDisk *_skyDisk;
};
#endif
Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/module.mk,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- module.mk 21 Apr 2003 20:58:53 -0000 1.6
+++ module.mk 25 Apr 2003 15:17:47 -0000 1.7
@@ -2,6 +2,9 @@
MODULE_OBJS = \
sky/sky.o \
+ sky/compact.o \
+ sky/logic.o \
+ sky/debug.o \
sky/disk.o \
sky/screen.o \
sky/timer.o \
Index: sky.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sky.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- sky.cpp 21 Apr 2003 20:58:53 -0000 1.16
+++ sky.cpp 25 Apr 2003 15:17:48 -0000 1.17
@@ -22,6 +22,9 @@
#include "stdafx.h"
#include "sky/sky.h"
#include "sky/skydefs.h" //game specific defines
+#include "sky/compact.h"
+#include "sky/logic.h"
+#include "sky/debug.h"
#include "common/file.h"
#include "common/gameDetector.h"
#include <errno.h>
@@ -48,6 +51,8 @@
return new SkyState(detector, syst);
}
+void **SkyState::_itemList[300];
+
SkyState::SkyState(GameDetector *detector, OSystem *syst)
: Engine(detector, syst) {
@@ -83,12 +88,13 @@
_dump_file = stdout;
initialise();
-
- if (!isDemo(_gameVersion) || isCDVersion(_gameVersion))
- intro();
-
+
+ //if (!isDemo(_gameVersion) || isCDVersion(_gameVersion))
+ // intro();
+
while (1) {
delay(100);
+ _skyLogic->engine();
}
}
@@ -110,6 +116,8 @@
//initScript();
initialiseGrids();
//initialiseRouter();
+ _skyText = getSkyText();
+ _skyLogic = new SkyLogic(_skyDisk);
}
void SkyState::initItemList() {
@@ -117,23 +125,29 @@
//See List.asm for (cryptic) item # descriptions
for (int i = 0; i < 300; i++)
- _itemList[i] = (void*)NULL;
+ _itemList[i] = (void **)NULL;
//init the non-null items
- /*
- _itemList[119] = (void*)data_0; // Compacts - Section 0
- _itemList[120] = (void*)data_1; // Compacts - Section 1
+ _itemList[119] = (void **)SkyCompact::data_0; // Compacts - Section 0
+ _itemList[120] = (void **)SkyCompact::data_1; // Compacts - Section 1
if (isDemo(_gameVersion)) {
- _itemList[121] = _itemList[122] = _itemList[123] = _itemList[124] = _itemList[125] = (void*)data_0;
+ _itemList[121] = _itemList[122] = _itemList[123] = _itemList[124] = _itemList[125] = (void **)SkyCompact::data_0;
} else {
- _itemList[121] = (void*)data_2; // Compacts - Section 2
- _itemList[122] = (void*)data_3; // Compacts - Section 3
- _itemList[123] = (void*)data_4; // Compacts - Section 4
- _itemList[124] = (void*)data_5; // Compacts - Section 5
- _itemList[125] = (void*)data_6; // Compacts - Section 6
+ _itemList[121] = (void **)SkyCompact::data_2; // Compacts - Section 2
+ _itemList[122] = (void **)SkyCompact::data_3; // Compacts - Section 3
+ _itemList[123] = (void **)SkyCompact::data_4; // Compacts - Section 4
+ _itemList[124] = (void **)SkyCompact::data_5; // Compacts - Section 5
+ _itemList[125] = (void **)SkyCompact::data_6; // Compacts - Section 6
}
- */
+}
+
+Compact *SkyState::fetchCompact(uint32 a) {
+ SkyDebug::fetchCompact(a);
+ uint32 sectionNum = (a & 0xf000) >> 12;
+ uint32 compactNum = (a & 0x0fff);
+
+ return (Compact *)(_itemList[119 + sectionNum][compactNum]);
}
void SkyState::delay(uint amount) { //copied and mutilated from Simon.cpp
Index: sky.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sky.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- sky.h 21 Apr 2003 20:58:53 -0000 1.13
+++ sky.h 25 Apr 2003 15:17:49 -0000 1.14
@@ -30,8 +30,11 @@
#include "sky/sound.h"
#include "sky/text.h"
#include "sky/disk.h"
+#include "sky/struc.h"
#include "sky/skymusic.h"
+class SkyLogic;
+
class SkyState : public Engine {
void errorString(const char *buf_input, char *buf_output);
protected:
@@ -43,8 +46,6 @@
byte *_tseqData;
uint32 _tseqCounter;
- void *_itemList[300];
-
uint16 _debugMode;
uint16 _debugLevel;
uint16 _language;
@@ -68,6 +69,8 @@
SkySound *_sound;
SkyDisk *_skyDisk;
+ SkyText *_skyText;
+ SkyLogic *_skyLogic;
SkyMusic *_music;
byte *_workScreen;
@@ -86,8 +89,13 @@
static bool isDemo(uint32 version);
static bool isCDVersion(uint32 version);
+
+ static Compact *fetchCompact(uint32 a);
+ static void **_itemList[300];
+
protected:
+ void logic_engine();
void delay(uint amount);
void pollMouseXY();
void go();
@@ -117,7 +125,6 @@
void shutdown();
RandomSource _rnd;
- SkyText *_skyText;
};
#endif
Index: skydefs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/skydefs.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- skydefs.h 14 Apr 2003 17:26:41 -0000 1.4
+++ skydefs.h 25 Apr 2003 15:17:51 -0000 1.5
@@ -51,40 +51,4174 @@
#define MAIN_CHAR_HEIGHT 12
-#define c_base_mode 0
-#define c_base_mode56 56
-#define c_action_mode 4
-#define c_sp_colour 90
-#define c_mega_set 112
-#define c_grid_width 114
+#define C_BASE_MODE 0
+#define C_BASE_MODE56 56
[...4174 lines suppressed...]
+#define C_AT_WAS 82
+#define C_ALT 84
+#define C_REQUEST 86
-#define l_script 1
-#define l_ar 2
-#define l_ar_anim 3
-#define l_ar_turning 4
-#define l_alt 5
-#define l_mod_animate 6
-#define l_turning 7
-#define l_cursor 8
-#define l_talk 9
-#define l_listen 10
-#define l_stopped 11
-#define l_choose 12
-#define l_frames 13
-#define l_pause 14
-#define l_wait_synch 15
-#define l_simple_mod 16
Index: struc.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/struc.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- struc.h 6 Mar 2003 07:52:40 -0000 1.4
+++ struc.h 25 Apr 2003 15:17:52 -0000 1.5
@@ -19,8 +19,10 @@
*
*/
-struct dataFileHeader
-{
+#ifndef SKYSTRUC_H
+#define SKYSTRUC_H
+
+struct dataFileHeader {
uint16 flag; // bit 0: set for colour data, clear for not
// bit 1: set for compressed, clear for uncompressed
// bit 2: set for 32 colours, clear for 16 colours
@@ -36,3 +38,118 @@
uint16 s_compressed_size;
};
+#if !defined(__GNUC__)
+#pragma START_PACK_STRUCTS
+#endif
+
+struct ExtCompact {
+ uint16 actionSub;
+ uint16 actionSub_off;
+ uint16 getToSub;
+ uint16 getToSub_off;
+ uint16 extraSub;
+ uint16 extraSub_off;
+
+ uint16 dir;
+
+ uint16 stopScript;
+ uint16 miniBump;
+ uint16 leaving;
+ uint16 atWatch; // pointer to script variable
+ uint16 atWas; // pointer to script variable
+ uint16 alt; // alternate script
+ uint16 request;
+
+ uint16 spWidth_xx;
+ uint16 spColour;
+ uint16 spTextId;
+ uint16 spTime;
+
+ uint16 arAnimIndex;
+ void *turnProg;
+
+ uint16 waitingFor;
+
+ uint16 arTargetX;
+ uint16 arTargetY;
+
+ void *animScratch; // data area for AR
+
+ uint16 megaSet;
+
+ uint16 gridWidth;
+ uint16 colOffset;
+ uint16 colWidth;
+ uint16 lastChr;
+
+ uint16 *animUp;
+ uint16 *animDown;
+ uint16 *animLeft;
+ uint16 *animRight;
+
+ uint16 *standUp;
+ uint16 *standDown;
+ uint16 *standLeft;
+ uint16 *standRight;
+ uint16 *standTalk;
+} GCC_PACK;
+
+struct UnknownStuff {
+ uint16 unknownStuff_1_1[4];
+ uint16 *unknownStuff_1_2[34];
+ uint16 unknownStuff_2_1[4];
+ uint16 *unknownStuff_2_2[34];
+ uint16 unknownStuff_3_1[4];
+ uint16 *unknownStuff_3_2[34];
+} GCC_PACK;
+
+struct Compact {
+ uint16 logic; // Entry in logic table to run (byte as <256entries in logic table
+ uint16 status;
+ uint16 sync; // flag sent to compacts by other things
+
+ uint16 screen; // current screen
+ uint16 place; // so's this one
+ uint16 *getToTable; // Address of how to get to things table
+
+ uint16 xcood;
+ uint16 ycood;
+
+ uint16 frame;
+
+ uint16 cursorText;
+ uint16 mouseOn;
+ uint16 mouseOff;
+ uint16 mouseClick; // dword script
+
+ uint16 mouseRelX;
+ uint16 mouseRelY;
+ uint16 mouseSizeX;
+ uint16 mouseSizeY;
+
+ uint16 actionScript;
+
+ uint16 upFlag; // usually holds the Action Mode
+ uint16 downFlag; // used for passing back
+ uint16 getToFlag; // used by action script for get to attempts, also frame store (hence word)
+ uint16 flag; // a use any time flag
+
+ uint16 mood; // high level - stood or not
+ uint16 *grafixProg;
+ uint16 offset;
+
+ uint16 mode; // which mcode block
+
+ uint16 baseSub; // 1st mcode block relative to start of compact
+ uint16 baseSub_off;
+
+ ExtCompact *extCompact;
+ void *turnTable;
+ UnknownStuff *unknownStuff;
+} GCC_PACK;
+
+#if !defined(__GNUC__)
+#pragma END_PACK_STRUCTS
+#endif
+
+#endif
Index: text.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/text.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- text.cpp 21 Apr 2003 15:26:13 -0000 1.13
+++ text.cpp 25 Apr 2003 15:17:52 -0000 1.14
@@ -81,17 +81,17 @@
_dtCharSpacing = newCharSet->charSpacing;
}
-void SkyText::getText(uint32 textNr, void **itemList, uint16 language) { //load text #"textNr" into textBuffer
+void SkyText::getText(uint32 textNr, uint16 language) { //load text #"textNr" into textBuffer
uint32 sectionNo = (textNr & 0x0F000) >> 10;
- if (itemList[FIRST_TEXT_SEC + sectionNo] == (void*)NULL) { //check if already loaded
+ if (SkyState::_itemList[FIRST_TEXT_SEC + sectionNo] == (void **)NULL) { //check if already loaded
debug(5, "Loading Text item(s) for Section %d", (sectionNo>>2));
uint32 fileNo = (sectionNo >> 2);
fileNo += ((language * NO_OF_TEXT_SECTIONS) + 60600);
- itemList[FIRST_TEXT_SEC + sectionNo] = (void *)_skyDisk->loadFile((uint16)fileNo, NULL);
+ SkyState::_itemList[FIRST_TEXT_SEC + sectionNo] = (void **)_skyDisk->loadFile((uint16)fileNo, NULL);
}
- _textItemPtr = (uint8 *)itemList[FIRST_TEXT_SEC + sectionNo];
+ _textItemPtr = (uint8 *)SkyState::_itemList[FIRST_TEXT_SEC + sectionNo];
uint32 offset = 0;
uint32 nr32MsgBlocks = (textNr & 0x0fe0);
Index: text.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/text.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- text.h 21 Apr 2003 15:26:13 -0000 1.7
+++ text.h 25 Apr 2003 15:17:53 -0000 1.8
@@ -27,7 +27,7 @@
class SkyText {
public:
SkyText(SkyDisk *skyDisk, uint32 gameVersion);
- void getText(uint32 textNr, void **itemList, uint16 language);
+ void getText(uint32 textNr, uint16 language);
void displayText(uint8 *dest, bool centre, uint16 pixelWidth, uint8 color);
void displayText(char *textPtr, uint8 *dest, bool centre, uint16 pixelWidth, uint8 color);
void makeGameCharacter(char textChar, uint8 *charSetPtr, uint8 *&data, uint8 color);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky/compacts 0compact.h,NONE,1.1 101comp.h,NONE,1.1 102comp.h,NONE,1.1 10comp.h,NONE,1.1 11comp.h,NONE,1.1 12comp.h,NONE,1.1 13comp.h,NONE,1.1 14comp.h,NONE,1.1 15comp.h,NONE,1.1 16comp.h,NONE,1.1 17comp.h,NONE,1.1 18comp.h,NONE,1.1 19comp.h,NONE,1.1 1compact.h,NONE,1.1 20comp.h,NONE,1.1 21comp.h,NONE,1.1 22comp.h,NONE,1.1 23comp.h,NONE,1.1 24comp.h,NONE,1.1 25comp.h,NONE,1.1 26comp.h,NONE,1.1 27comp.h,NONE,1.1 28comp.h,NONE,1.1 29comp.h,NONE,1.1 2compact.h,NONE,1.1 30comp.h,NONE,1.1 31comp.h,NONE,1.1 32comp.h,NONE,1.1 33comp.h,NONE,1.1 34comp.h,NONE,1.1 36comp.h,NONE,1.1 37comp.h,NONE,1.1 38comp.h,NONE,1.1 39comp.h,NONE,1.1 3compact.h,NONE,1.1 40comp.h,NONE,1.1 41comp.h,NONE,1.1 42comp.h,NONE,1.1 44comp.h,NONE,1.1 45comp.h,NONE,1.1 46comp.h,NONE,1.1 47comp.h,NONE,1.1 48comp.h,NONE,1.1 4compact.h,NONE,1.1 5compact.h,NONE,1.1 65comp.h,NONE,1.1 66comp.h,NONE,1.1 67comp.h,NONE,1.1 68comp.h,NONE,1.1 69comp.h,NONE,1.1 70comp.h,NONE,1.1 71comp.h,NONE,1.1 72comp.h,NONE,1.1 73comp.h,NONE,1.1 74comp.h,NONE,1.1 75comp.h,NONE,1.1 76comp.h,NONE,1.1 77comp.h,NONE,1.1 78comp.h,NONE,1.1 79comp.h,NONE,1.1 80comp.h,NONE,1.1 81comp.h,NONE,1.1 82comp.h,NONE,1.1 85comp.h,NONE,1.1 90comp.h,NONE,1.1 91comp.h,NONE,1.1 92comp.h,NONE,1.1 93comp.h,NONE,1.1 94comp.h,NONE,1.1 95comp.h,NONE,1.1 96comp.h,NONE,1.1 9compact.h,NONE,1.1 linc_gen.h,NONE,1.1 lincmenu.h,NONE,1.1 objects.h,NONE,1.1 z_compac.h,NONE,1.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky compact.cpp,1.1,1.2 debug.cpp,1.1,1.2 logic.cpp,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list