diff --git a/l9dev/LICENSE b/l9dev/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/l9dev/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/l9dev/License.txt b/l9dev/License.txt new file mode 100644 index 0000000..f0c2c3d --- /dev/null +++ b/l9dev/License.txt @@ -0,0 +1,25 @@ +Copyright 2025 Level 9 Computing +Level 9 Computing is a partnership of Michael Austin and Peter Austin. + +This license applies to the specific implementation of the Level 9 Games, text +and code. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +This license does not apply to the game designs and any future +implementations of any of those designs, including but not limited to implementations for other media, +web, mobile app, TV, Film or Book. All rights in the game designs and such future implementations of those designs are reserved by Level 9 Computing. + + + + diff --git a/l9dev/Makefile b/l9dev/Makefile new file mode 100644 index 0000000..42e482e --- /dev/null +++ b/l9dev/Makefile @@ -0,0 +1,29 @@ +# 68000 Acode compiler, finish and squasher program (for Linux) +# common Makefile for l9comp, l9finish and l9squash +# Copyright (C) 1986-1988 Level 9 Computing + +CC=gcc +CFLAGS=-Wall + +execs = l9comp l9finish l9squash +scripts = l9gamegen l9tablegen l9asm2bin l9bin2tos + +all: $(execs) +debug: CFLAGS+=-g +debug: clean all +nodebug: clean all +clean: + rm -f $(execs) +install: $(execs) $(scripts) + cp $^ /usr/local/bin + +l9comp: CFLAGS+=-DEMBEDFINISH +l9comp: comp.c code.c stcode.c pccode.c finish.c driver.c +l9comp: comp.h code.h common.h finish.h driver.h +l9finish: finish.c driver.c +l9finish: finish.h driver.h common.h +l9squash: squash.c driver.c +l9squash: squash.h driver.h common.h + +$(execs): + $(CC) $(CFLAGS) -o $@ $(filter %.c,$^) diff --git a/l9dev/README.md b/l9dev/README.md new file mode 100644 index 0000000..1dd2490 --- /dev/null +++ b/l9dev/README.md @@ -0,0 +1,171 @@ +# l9dev +Level 9 dev tools recoded in C from Atari ST 68000 assembler + +Installation +============ +- make +- sudo make install + +Game Generation +=============== +Usage: l9gamegen [options] + +Options: +``` +--help: this usage message +--old: for strict binary compatibility with older games +--no-table: do not assemble table.txt into table.dat +--no-message: do not squash message.txt into squash.dat +--bugcomp: enable bugwards compatibility (e.g. for conditional compilation) +--oddacode: do not align acode in gamedata.dat +--i8086: generate MC code for PC +--splitdata: generate split acode and gamedata +``` + +- overall game generation script +- calls various components as described below + +Compiler +======== +Usage: l9comp [options] + +Options: +``` +--help: print this usage message +--bugcomp: enable bugwards compatibility (e.g. for conditional compilation) +--oddacode: do not align acode in gamedata.dat +--testcomp: limit sizes to test overflow errors +--i8086: generate MC code for i8086 +--splitdata: generate split acode and gamedata +``` + +Usage: l9finish [options] + +Options: +``` +--help: print this usage message +--oddacode: do not align acode in gamedata.dat +--splitdata: generate split acode and gamedata +``` + +- as before finish is the standalone finisher also incorporated in comp +- it can be used once the acode.acd is compiled to generate gamedata.dat for various platforms +- both stay close to the original with certain minor improvements and changes due to compiling on Linux +- the order of things has not been changed or split up drastically, hence the need for forward declarations in header files +- effort has been put into making error handling robust (see also regression) +- still some things will cause trouble (e.g. truncated statements, especially prs, but also game data overflow) +- as before, the compiler is driven by a menu or compile.bat file, but two cmdline options can be provided for backward compatibility +- menu option A (printer) can be used to append output to compile.log +- menu option 5 (run game) is not implemented +- all files and directories should be lower case but can have any line terminations (combinations of CR/LF) +- the finish executable can be compiled separately +- simply invoke make to compile for your Linux system (Ubuntu 24.04 executables are provided) +- some version 1.5 features have been integrated (mostly based on observed behaviour) +- this was needed to support games which split acode from gamedata (menu option B) +- this also makes it possible to compile the acode and gamedata of the unpublished last games +- Grange Murders and Billy the Kid acode and gamedata can be compiled in this way (--splitdata) +- MC is modularized so that in principle it should be possible to add another architecture + +Squasher +======== +Usage: l9squash [options] + +Options: +``` +--help: print this usage message +--oldgame: squash for old games e.g. Adrian Mole/Archers +--noisy: enable noisy messages +--debug: enable debug messages +``` + +- stays close to the original but streamlined to remove the Z80/M86k boilerplate +- again the need for forward declarations in header files +- code for driver and common declarations is shared with the compiler +- extra comments have been added to document some squasher behaviour +- all files and directories should be lower case but can have any line terminations (combinations of CR/LF) +- simply invoke make to compile for your Linux system (Ubuntu 24.04 executables are provided) + +l9tablegen +========== +Usage: l9tablegen [options] + +Options: +``` +--help: this usage message +--bin: use a binary table.bin as input iso table.txt +--old: for strict binary compatibility with older games +``` + +- generates table.dat from table.txt (or table.bin) +- older games (upto Knight Orc) need a slightly different result +- hence the --old option above +- if a binary table.bin is generated by other means, --bin can be used +- calls components below +- uses binutils-m68k-linux-gnu +- the assembler is not perfect: + - ORG directive is not supported + - case insensitive lables are not allowed + - spaces after comma's are not allowed + - the rep statement wants the repeated instructions word-aligned + - this last one only occurs once - don't use it for new work + - for all these limitations a workaround is in place + +l9asm2bin +========= +Usage: l9asm2bin [options] + +Options: +``` +--help: this usage message +``` + +- tablegen generates a table.s which can be assembled by l9asm2bin +- basically comes down to: + - m68k-linux-gnu-as -M -o .o .s + - m68k-linux-gnu-objcopy -O binary .o .bin + +l9bin2tos +========= +Usage: l9bin2tos [options] + +``` +Options: +--help: this usage message +--old: for strict binary compatibility with older games +``` + +- use the table.bin output from l9asm2bin +- generates Atari exec header and footer around the binary +- which results in .prg +- tablegen finally renames this result to table.dat + +Regression +========== +regress/compileall +- should give no reports of differences with the reference (and no git diffs) +- generates table.dat for all salvaged v3/v4 games to date (no v2 games available yet to test) +- squashes all salvaged v3/v4 games to date (no v2 games available yet to test) +- compiles all salvaged v3/v4 games to date (no v2 games available yet to test) +- have a look at the script to see which games need which compiler options +- some input files are missing: + - most of Jewels of Darkness' Dungeon Adventure and Adventure Quest (not included here) + - table.txt for The Price of Magik + - exit.txt and table.txt/dat for Lancelot part 2 (compiles without those) + - message.txt for Colossal Adventure (not needed for compilation as squash.dat is used as provided) + - message.txt for Snowball (not needed for compilation as squash.dat is used as provided) + - message.txt for Return to Eden (not needed for compilation as squash.dat is used as provided) + - Gnome Ranger is badly corrupted (not included here) +- the naming of the platform subdirs is not accurate, as some patchwork went into selecting uncorrupted files + +regress/compileerrors +- should give no report of differences with the reference (and no git diff) +- compiles a modified test.txt as errors.txt which triggers all compiler errors +- for this to succeed for all errors (e.g. including overflow errors) the --testcomp option is used +- is called from compileall + +TODO +==== +- support for pictures +- support for v2 games +- convert interpreter +- support for packaging (including loaders and interpreters for various platforms) diff --git a/l9dev/acode.acd b/l9dev/acode.acd new file mode 100644 index 0000000..8a88218 Binary files /dev/null and b/l9dev/acode.acd differ diff --git a/l9dev/code.c b/l9dev/code.c new file mode 100644 index 0000000..aeccebc --- /dev/null +++ b/l9dev/code.c @@ -0,0 +1,698 @@ +// Generic code generation section +// (adapted for Linux) +// +// based on 68000 version. M.J.Austin 2/6/88 +// modified to support 8086 version +// +// Copyright (C) 1988-1989 Level 9 Computing +// +// last change 13/6/88 +// +// started Linux version on 23/01/26 +// first presentable Linux version: 26/01/26 +// + +#include "code.h" + +// m68k code data tables +extern uint8_t *m68kMCIfVVTable[8]; +extern uint8_t *m68kMCIfVCTable[8]; +extern struct _datatable m68kDataTable; + +// i8086 code data tables +extern uint8_t *i8086MCIfVVTable[8]; +extern uint8_t *i8086MCIfVCTable[8]; +extern struct _datatable i8086DataTable; + +// code data table pointers (initialized to the default m68k) +uint8_t **MCIfVVTable = m68kMCIfVVTable; +uint8_t **MCIfVCTable = m68kMCIfVCTable; +struct _datatable *Data = &m68kDataTable; + +// set code data table pointers to i8086 +void Mc8086() { + MCIfVVTable = i8086MCIfVVTable; + MCIfVCTable = i8086MCIfVCTable; + Data = &i8086DataTable; +} + +// deal with endianness +uint8_t first(uint16_t val) { + if (i8086) return val & 0xff; + else return val >> 8; +} + +uint8_t second(uint16_t val) { + if (i8086) return val >> 8; + else return val & 0xff; +} + +// +// Code generation for ALL instructions +// + +uint16_t TableNumberInReg = 0; // 1.5 optimization + +void MCPush() { + if (testcomp) { + compnotimp(); + return; + } + int var = compgetvar(); + if (!var) return; + MCPushPop(Data->Push, var); +} + +void MCPop() { + int var = compgetvar(); + if (!var) return; + MCPushPop(Data->Pop, var); +} + +void MCPushPop(uint8_t *data, int var) { + compsearch(); + + int arg1 = var * 2; + if (i8086) arg1 += PCvarsoffset; + Generate(data, arg1, 0, 0); // double var number +} + +void MCASR() { + int var = compgetvar(); + if (!var) return; + compsearch(); + + int arg1 = var * 2; + if (i8086) arg1 += PCvarsoffset; + Generate(Data->ASR, arg1, 0, 0); // double var number +} + +void MCAnd() { + MCAddSub(Data->AndVV); +} + +void MCOr() { + MCAddSub(Data->OrVV); +} + +void MCXor() { + MCAddSub(Data->XorVV); +} + +void MCData() { + char c = 0; + do { + opcodeaddress = jumpdummyopcode; + c = compsearch(); + if (c == '@') ptr++; // skip @ + if (!MCDataEntry()) return; + c = compsearch(); + ptr++; // skip over comma + } while (c == ','); + if (c == ';') compssskiptoeol(); +} + +bool MCDataEntry() { + if (!i8086) opcodeaddress = dummylongopcode; // In 1.5 + struct _symbol *sym = NULL; + int label = getlabel(&sym); + if (label < 0) return false; + if (!sym) return false; + + // try to ignore code state for data statements + if (false && sym->codestate && sym->codestate != CodeState) { + WrongCodeState(); + return false; + } + + // label is value of label relative to start of acode + code(first(label)); + code(second(label)); + + return true; +} + +void MCToAcode() { + // generate code to switch execution from machine code to ACODE + int var1 = 0; + int var2 = 0; + + // arg1 is acode pointer relative to start of acode + // allow for code generated: i.e. add 12 bytes for ST + // or add 9 bytes for PC + var1 = compacodeptr - startacode + (i8086 ? 9 : 12); + + // and second argument gives offset of the first + // byte of acode - i.e. the initial jump + // arg2 is offset of start of acode from current. + // subtract 2 to allow for it being relative to offset word + // not used for PC + var2 = i8086 ? 0 : (startacode - compacodeptr - 2); + + // to the start of the first acode instruction to be executed + Generate(Data->ToAcode, var1, var2, 0); +} + +void MCReturn() { + Generate(Data->Return, 0, 0, 0); +} + +void MCLetVC(int var, int con) { + int arg1 = var * 2; + if (i8086) arg1 += PCvarsoffset; + Generate(Data->LetVC, arg1, con, 0); // double var number +} + +void MCLetVV(int var1, int var2) { + int arg1 = var1 * 2; + int arg2 = var2 * 2; + if (i8086) arg1 += PCvarsoffset; + if (i8086) arg2 += PCvarsoffset; + Generate(Data->LetVV, arg1, arg2, 0); // double var numbers +} + +void MCAdd() { + MCAddSub(Data->AddVV); +} + +void MCSub() { + MCAddSub(Data->SubVV); +} + +void MCAddSub(uint8_t *data) { + // first var - operand + int var1 = compgetvar(); + if (!var1) return; + if (compsearch() != ',') { + commaexpected(); + return; + } + ptr++; // skip over comma + // second var - result of add + int var2 = compgetvar(); + if (!var2) return; + + int arg1 = var1 * 2; + int arg2 = var2 * 2; + if (i8086) arg1 += PCvarsoffset; + if (i8086) arg2 += PCvarsoffset; + Generate(data, arg1, arg2, 0); // double var numbers +} + +void MCAttVar(int table, int index) { + if (compsearch() != ')') { + bracketsexpected(); + return; + } + ptr++; // skip bracket + + if (compsearch() != '=') { + equalsexpected(); + return; + } + ptr++; // skip equals + + // and finally the var not inside the brackets + int var = compgetvar(); + if (!var) return; + + // quadruple table number to give ptr table offset + // double var numbers to give vartble offsets + int arg1 = table * 4; + int arg2 = index * 2; + int arg3 = var * 2; + if (i8086) arg1 += PCListVector; + if (i8086) arg2 += PCvarsoffset; + if (i8086) arg3 += PCvarsoffset; + TableGenerate(Data->AttVV, Data->AttVV16, arg1, arg2, arg3); +} + +void MCAttConst(int table, int index) { + if (compsearch() != ')') { + bracketsexpected(); + return; + } + ptr++; // skip bracket + + if (compsearch() != '=') { + equalsexpected(); + return; + } + ptr++; // skip equals + + // and finally the var not inside the brackets + int var = compgetvar(); + if (!var) return; + + // index - constant - no change + // double var to give vartbl offset + // quadruple table number to give ptr table offset + int arg1 = table * 4; + int arg2 = index; + int arg3 = var * 2; + if (i8086) arg1 += PCListVector; + if (i8086) arg3 += PCvarsoffset; + TableGenerate(Data->AttCV, Data->AttCV16, arg1, arg2, arg3); +} + +void MCAft(int var, int table) { // ttVar + // called as soon as the table reference has been parsed + int index = 0; + int arg1 = 0; + int arg2 = 0; + int arg3 = 0; + + if (compsearch() != '(') { + bracketsexpected(); + return; + } + ptr++; // skip bracket + + struct _symbol *sym3 = NULL; + bool found = findsymbol(&sym3); + if (!sym3) return; + if (found) { + int type = sym3->type & 0x7f; + sym3->type |= 0x80; + if (type == vartype) { + // a variable + index = sym3->value; // value of var + + if (compsearch() != ')') { + bracketsexpected(); + return; + } + ptr++; // skip bracket + + // now generate the code + arg1 = index * 2; // index - first arg + arg2 = table * 4; // table number - second arg + arg3 = var * 2; // var to assign to - third arg + if (i8086) arg1 += PCvarsoffset; + if (i8086) arg2 += PCListVector; + if (i8086) arg3 += PCvarsoffset; + TableGenerate(Data->AftVV, Data->AftVV16, arg1, arg2, arg3); + return; + } else if (type != constanttype) { + badindex(); + return; + } else { + // a manifest constant + index = sym3->value; // value of constant + } + } else { + // a numeric value? + index = getnumberconstant(); // will print an error message if not + if (index < 0) return; + } + + if (compsearch() != ')') { + bracketsexpected(); + return; + } + ptr++; // skip bracket + + // now generate the code + arg1 = var * 2; // double v1 + arg2 = table * 4; // quadruple table number + arg3 = index; // index + if (i8086) arg1 += PCvarsoffset; + if (i8086) arg2 += PCListVector; + TableGenerate(Data->AftVC, Data->AftVC16, arg1, arg2, arg3); +} + +void TableGenerate(uint8_t *data8, uint8_t *data16, int arg1, int arg2, int arg3) { + // avoid maintaining address register across call. + // this seems to be a way to disable the optimization + // however BTK uses list0 which still matches but + // if the register in the interpreter is actually kept zero + // then this should not be a problem as the occurrence + // is one that indeed has the table in arg1 + // also it is only in demo.txt which is not used by GM + // in this case Data->AttVV16 is used + TableNumberInReg = 0; // 1.5 optimization (partially disabled) + + // use data as generation table pointer in 8 bit table mode, + // or data16 in 16 bit mode + uint8_t *data = (SixteenFlag) ? data16 : data8; + + // table is not always linked to arg1 !? + // so this is a potential bug, but GM and BTK do not seem to need it + // to solve this issue, better name the arguments by role, e.g. + // TableGenerate(data8, data16, table, index, arg) + uint16_t table = arg1; // table is not always linked to arg1 !? + if (!i8086 && table == TableNumberInReg) { // not used for PC + // Don't load first part of table + uint8_t len = *data++; + data += 8; + len -= 4; + GenerateLen(data, len, arg1, arg2, arg3); + } else { + // Load full table but store (double of) tablenumber + TableNumberInReg = table; + Generate(data, arg1, arg2, arg3); + } +} + +void MCgoto() { + if (compsearch() != '@') + MCShortGoto(); + else { + ptr++; + MCLongGoto(); + } +} + +void MCLongGoto() { + Generate(Data->LongGoto, 0, 0, 0); + MCLongJump(); +} + +void MCShortGoto() { + if (forcedlongjumps) + MCLongGoto(); + else { + Generate(Data->ShortGoto, 0, 0, 0); + MCShortJump(); + } +} + +void MCgosub() { + // avoid maintaining address register across call. + // should be 0xffff (-1) to avoid matching list0 + // yet more cases need the reset? + // like goto, labels, etc, anything which is not atomic + TableNumberInReg = 0; // 1.5 optimization + + if (compsearch() != '@') + if (i8086) MCLongGosub(); + else MCShortGosub(); // PC does not have short gosub + else { + ptr++; + MCLongGosub(); + } +} + +void MCLongGosub() { + Generate(Data->LongGosub, 0, 0, 0); + MCLongJump(); +} + +void MCShortGosub() { + if (forcedlongjumps) + MCLongGosub(); + else { + Generate(Data->ShortGosub, 0, 0, 0); + MCShortJump(); + } +} + +void MCLongJump() { + opcodeaddress = dummylongopcode; + struct _symbol *sym = NULL; + int label = getlabel(&sym); + if (label < 0) return; + if (!sym) return; + + if (sym->codestate && sym->codestate != CodeState) { + WrongCodeState(); + return; + } + + // label is value of label relative to start of acode + // find current address relative to start + int delta = label - (compacodeptr - startacode); + // for PC: relative to instruction AFTER the current one + if (i8086) delta -= 2; // In 1.5 + if (i8086 || (delta < 32768 && delta >= -32768)) { + code(first(delta)); + code(second(delta)); + } else { + MCTooFar(); + return; + } +} + +void MCShortJump() { + if (forcedlongjumps) + MCLongJump(); + else { + opcodeaddress = dummyshortopcode; + struct _symbol *sym = NULL; + int label = getlabel(&sym); + if (label < 0) return; + if (!sym) return; + + if (sym->codestate && sym->codestate != CodeState) { + WrongCodeState(); + return; + } + + // label is value of label relative to start of acode + // find current address relative to start + // short relative is relative to start of next instruction + // how close are current and destination? + int delta = label - (compacodeptr - startacode + 1); + if (delta < 128 && delta >= -128) code(delta); + else { + reljumpoutofrange(); + return; + } + } +} + +void MCrfr(struct _symbol *sym, struct _forwardentry *entry) { + int label = compacodeptr - startacode; + char *ref = (char *)(startacode + entry->ref); + void *address = startacode + entry->opcode; + char opcode = *(char *)address; + bool longjump = false; + if (i8086) { + // for PC, DATA is relative to acode start, unlike everything else + // and counteract the correction (2) for instruction relativity + if (address == jumpdummyopcode) label += entry->ref + 2; + // is this PC specific, or can we do this in general? + if (address != dummyshortopcode) longjump = true; + } else longjump = !(opcode & relmask); + if (longjump) { // is this a long jump? + // poke back in address for a long jump + // make it relative to address of reference + int delta = label - entry->ref; + // for PC: relative to instruction AFTER the current one + if (i8086) delta -= 2; // In 1.5 + if (delta >= 32768) { + forwardoutofrange(sym, entry); // note special line number treatment + return; + } + // poke back two-byte reference + *ref++ = first(delta); // high byte + *ref = second(delta); // low byte + } else { // no! + // poke back in address for short jump + // make it relative to address of reference + // relative to start of next instruction after Bra.s + int delta = label - (entry->ref + 1); + if (delta >= 128) { // was 0x100! + forwardoutofrange(sym, entry); // note special line number treatment + return; + } + *ref = delta; // poke in single byte reference + } +} + +void MCIF() { + // handle if v = <> < > then label + opcodeaddress = compacodeptr; + int value = 0; + int arg1 = 0; + int arg2 = 0; + uint8_t **table = NULL; + + int v1 = compgetvar(); + if (!v1) return; + int op = evaloperator(); // op = operator type + if (op < 0) return; + struct _symbol *sym = NULL; + bool found = findsymbol(&sym); + if (!sym) return; + if (!found) { + // only other possibility is a number + value = getnumberconstant(); + if (value < 0) return; + arg1 = v1 * 2; + arg2 = value; + if (i8086) arg1 += PCvarsoffset; + table = MCIfVCTable; + } else { + int type = sym->type & 0x7f; + sym->type |= 0x80; // set "USED" bit + if (type == vartype) { + arg1 = v1 * 2; + arg2 = sym->value * 2; + if (i8086) arg1 += PCvarsoffset; + if (i8086) arg2 += PCvarsoffset; + table = MCIfVVTable; + } else if (type != constanttype) { + badtype(); + return; + } else { + arg1 = v1 * 2; + arg2 = sym->value; + if (i8086) arg1 += PCvarsoffset; + table = MCIfVCTable; + } + } + + // given arg1, arg2 as two args for the comparison stage, + // and table as basic IF V C/V Table + // and op as the comparator type, generate the code: + table = table + (op & 0xff); + + // skip over "THEN" if present, then evaluate jump address + compsearch(); + stringcompare("THEN"); + // stringcompare automatically skips string if matched + + // is this a short or a long jump? + char c = compsearch(); + if (c == '@') ptr++; // skip over '@' + if (c == '@' || forcedlongjumps) { + table += 4; // move to long if table section + Generate(*table, arg1, arg2, 0); + MCLongJump(); + } else { + Generate(*table, arg1, arg2, 0); + MCShortJump(); + } +} + +void MCPrint() { + NotAllowedInMC(); +} + +void MCMessage() { + // MCMessageC + NotAllowedInMC(); +} + +// void MCFunction() { +// NotAllowedInMC(); +// } + +void MCInput() { + NotAllowedInMC(); +} + +// void MCCHangeCode() { +// NotAllowedInMC(); +// } + +// void MCCall() { +// NotAllowedInMC(); +// } + +void MCExit() { + NotAllowedInMC(); +} + +void MCScreen() { + NotAllowedInMC(); +} + +void MCPicture() { + NotAllowedInMC(); +} + +void MCGetNext() { + NotAllowedInMC(); +} + +void MCPrintInput() { + NotAllowedInMC(); +} + +void MCDriverOpcode() { + NotAllowedInMC(); +} + +void MCRandom() { + NotAllowedInMC(); +} + +void MCSave() { + NotAllowedInMC(); +} + +void MCRestore() { + NotAllowedInMC(); +} + +void MCClear() { + NotAllowedInMC(); +} + +void MCStack() { + NotAllowedInMC(); +} + +// void MCPrs() { +// NotAllowedInMC(); +// } + +void MCCLS() { + NotAllowedInMC(); +} + +void MCJump() { + NotAllowedInMC(); +} + +void MCAcodePrs() { + NotAllowedInMC(); +} + +void MCBreakPt() { + Generate(Data->BreakPt, 0, 0, 0); +} + +void GenerateLen(uint8_t *data, uint8_t len, int arg1, int arg2, int arg3) { + // given data as the code data for the current instruction + // arg1 is first argument, arg2 is second argument, arg3 is third argument + + // check that code ptr is even. + if (!i8086 && (compacodeptr - startacode) & 1) { + EvenError(); // not done for PC in 1.5 + return; + } + + // 1.5 optimization where table number might be kept in register + // In that case the first part of the table is skipped + // And hence the length must be a parameter rather than *data + while (len--) { // end of code? + // fetch instruction + uint16_t ins = *data++ << 8; + ins |= *data++; + + // which argument do we want? + uint16_t val = 0; + if (ins & 0x4000) val = arg1; + else if (ins & 0x2000) val = arg2; + else if (ins & 0x1000) val = arg3; + // else don't use argument - use ins instead (i.e. low byte from table) + + // add anything to argument? + val += ins & 0xff; // low byte of ins is 8-bit offset + // use high/low byte of argument? + if (ins & 0x8000) val >>= 8; + + // write code + code(val); + } +} + +void Generate(uint8_t *data, int arg1, int arg2, int arg3) { + // 1.5 optimization where table number might be kept in a register + // This is the original call with the full table + uint8_t len = *data++; // length of this code fragment + GenerateLen(data, len, arg1, arg2, arg3); +} diff --git a/l9dev/code.h b/l9dev/code.h new file mode 100644 index 0000000..5e7d19f --- /dev/null +++ b/l9dev/code.h @@ -0,0 +1,108 @@ +// Code generation section specific to particular processors +// +// 68000 version (adapted for Linux). +// +// Copyright (C) 1988 Level 9 Computing + +#include "common.h" + +// For PC code generation (1.5 feature) +// See gamedata segment layout in pccode.c +#define PCListVector 4 +#define PCvarsoffset 144 + +// function declarations needed for forward references in code.c +void MCPushPop(uint8_t *, int); +void MCAddSub(uint8_t *); +bool MCDataEntry(); +void MCShortGoto(); +void MCLongGoto(); +void MCShortGosub(); +void MCLongGosub(); +void MCShortJump(); +void MCLongJump(); +void Generate(uint8_t *, int, int, int); +void GenerateLen(uint8_t *, uint8_t, int, int, int); +void TableGenerate(uint8_t *, uint8_t *, int, int, int); + +// defined in comp.c +extern bool testcomp; +extern bool i8086; +extern char *ptr; +extern void *compacodeptr; +extern void *startacode; +extern struct _forwardentry *startforward; +extern void *opcodeaddress; +extern void *jumpdummyopcode; +extern void *dummyshortopcode; +extern void *dummylongopcode; +extern bool forcedlongjumps; +extern bool SixteenFlag; +extern char CodeState; +extern void codew(uint16_t); +extern void code(uint8_t); +extern int compgetvar(); +extern int getlabel(struct _symbol **); +extern int evaloperator(); +extern bool findsymbol(struct _symbol **); +extern int getnumberconstant(); +extern int stringcompare(); +extern int compsearch(); +extern void compssskiptoeol(); +extern void EvenError(); +extern void commaexpected(); +extern void NotAllowedInMC(); +extern void WrongCodeState(); +extern void MCTooFar(); +extern void reljumpoutofrange(); +extern void badtype(); +extern void bracketsexpected(); +extern void badindex(); +extern void equalsexpected(); +extern void compnotimp(); +extern void forwardoutofrange(struct _symbol *, struct _forwardentry *); + +// code data table structure +struct _datatable { + uint8_t *ShortGoto; + uint8_t *LongGoto; + uint8_t *ShortGosub; + uint8_t *LongGosub; + uint8_t *Return; + uint8_t *ToAcode; + uint8_t *LetVC; + uint8_t *LetVV; + uint8_t *AddVV; + uint8_t *SubVV; + uint8_t *IfNEVCShort; + uint8_t *IfNEVCLong; + uint8_t *IfEQVCShort; + uint8_t *IfEQVCLong; + uint8_t *IfLTVCShort; + uint8_t *IfLTVCLong; + uint8_t *IfGTVCShort; + uint8_t *IfGTVCLong; + uint8_t *IfNEVVShort; + uint8_t *IfNEVVLong; + uint8_t *IfEQVVShort; + uint8_t *IfEQVVLong; + uint8_t *IfLTVVShort; + uint8_t *IfLTVVLong; + uint8_t *IfGTVVShort; + uint8_t *IfGTVVLong; + uint8_t *AttVV; + uint8_t *AttCV; + uint8_t *AftVV; + uint8_t *AftVC; + uint8_t *AttVV16; + uint8_t *AttCV16; + uint8_t *AftVV16; + uint8_t *AftVC16; + uint8_t *BreakPt; + uint8_t *Push; + uint8_t *Pop; + uint8_t *AndVV; + uint8_t *OrVV; + uint8_t *XorVV; + uint8_t *ASR; +}; diff --git a/l9dev/common.h b/l9dev/common.h new file mode 100644 index 0000000..38bd1ad --- /dev/null +++ b/l9dev/common.h @@ -0,0 +1,114 @@ +// 68000 Acode compiler, finish and squasher program (for Linux) +// common declarations needed for comp.c, finish.c and squash.c +// Copyright (C) 1986-1988 Level 9 Computing + +// finish version string +#define finish_version \ + "Acode finish 1.1 (for Linux)\n" \ + "Copyright (C) 1986-1988 Level 9 Computing\n\n" + +// all includes +#include +#include +#include +#include +#include +#include +#include +#include + +// useful characters +#define cr 13 +#define lf 10 +#define eof 26 + +// driver function codes +#define initdcode 0 +#define checksumdcode 1 +#define oswrchdcode 2 +#define osrdchdcode 3 +#define inputlinedcode 4 +#define savedcode 5 +#define loaddcode 6 +#define settextdcode 7 +#define taskinitdcode 8 +#define returntoosdcode 9 + +#define chainprogramdcode 11 +#define randomnumberdcode 12 + +#define getclockdcode 14 + +#define clgdcode 16 +#define linedcode 17 +#define filldcode 18 +#define chgcoldcode 19 +#define finishpicturedcode 20 + +#define ramsavedcode 22 +#define ramloaddcode 23 + +#define lenslokdisplaydcode 25 + +// used by both comp.c and finish.c +#define sizeofpointers 44 // overall gamedata pointers + +// used by both comp.c and code.c +#define smallmask 0x40 // if size bit (bit 6)=1, it is a 8 bit constant +#define relmask 0x20 // if relbit (bit 5)=1, it is a short jump + +// symbol table entry structure +#define symboltextlength 27 // including 0 terminator byte +struct _symbol { + char text[symboltextlength]; + char codestate; + char type; + struct _symbol *ptr; + uint16_t value; +}; +#define symbolsize sizeof(struct _symbol) +#define constanttype 1 +#define vartype 2 +#define tabletype 3 +#define labeltype 4 +#define undefinedlabeltype 5 + +// forward reference entry structure +struct _forwardentry { + // .. offset from start of table of next u/d reference to this symbol + struct _forwardentry *next; + // .. line number of reference + uint16_t linenumber; + // .. offset from start of code of the reference + uint16_t ref; + // .. offset from start of code of the opcode + uint16_t opcode; + // .. file number in which reference occured + char filenumber; + // .. CodeState + char codestate; +}; +#define forwardentrysize sizeof(struct _forwardentry) + +// definition of file control block +struct _fcb { + void *start; + void *end; + char filename[]; +}; + +// driver functions +extern bool isd0alphanumeric(char); +extern void printdecimald0(int); +extern void hexlonga0(uint32_t); +extern void driver(int, void*); +extern void openlogfile(char *); +extern void closelogfile(); +extern int OutputDevice; +extern void prs(char const *, ...); +extern char waitkey(); +extern int readdecimal(char **); +extern void hexbyted0(uint8_t); +extern void returntogem(); +extern void init1(); +extern bool init2(); diff --git a/l9dev/comp.c b/l9dev/comp.c new file mode 100644 index 0000000..f606363 --- /dev/null +++ b/l9dev/comp.c @@ -0,0 +1,2039 @@ +// 68000 Acode compiler (adapted for Linux) +// +// started 18:38 on Tuesday 29/7/86 +// last change: 2/6/88 +// +// started Linux version on Monday 8/12/25 +// first presentable version: 21/12/25 +// +// M.J.Austin. Copyright (C) 1988 Level 9 Computing +// + +#include "comp.h" + +// file control blocks +struct _fcb saveacodedriverblock = { + NULL, + NULL, + "acode.acd" +}; +//--- +struct _fcb loadcommandfile = { + NULL, + NULL, + "compile.bat" +}; +//-- +bool bugcomp = false; // if true, enable bugwards compatibility (can be set to true by providing --bugcomp) +bool oddacode = false; // if true, do not align acode (can be set to true by providing --oddacode) +bool testcomp = false; // if true, limit sizes to test overflow errors (can be set to true by providing --bugcomp) +bool i8086 = false; // if true, generate MC code for i8086 (can be set to true by providing --i8086) +bool splitdata = false; // if true, generate split acode and gamedata (can be set to true by providing --splitdata) +//--- +char batchfilebuffer[500]; +//--- +char compinstructiontable[][instructionlen] = { + "ADD", + "AND", + "ASR", // Arithmetic Shift Right (extra MC instruction introduced in 1.5) + "BREAK", + "CEND", // conditional assembly + "CIF", // conditional assembly + "CLEAR", + "CLS", + "CODE", // machine-code compilation + "DATA", + "DEBUG", + "DRIVER", + "EXIT", + "GETNEXT", + "GOSUB", + "GOTO", + "IF", + "INPUT", + "JUMP", + "MESSAGE", + "OR", + "PICTURE", + "POP", + "PRINT", + "PRINTINPUT", + "PRS", + "PUSH", + "RANDOM", + "RESTORE", + "RETURN", + "SAVE", + "SCREEN", + "STACK", + "SUB", + "XOR", + "XYZZY" // use this to trigger a compiler bug error in test mode +}; +//--- +void (*CompJumpTable[])() = { + NULL, // null entry because words numbered from 1 .. + COMPADD, + NotAllowedInAcode, // AND + NotAllowedInAcode, // ASR + COMPBREAKPT, + compcend, + compcif, + COMPCLEAR, + COMPCLS, + CompCode, + COMPDATA, + compdebuggingon, + COMPDRIVEROPCODE, + COMPEXIT, + COMPGETNEXT, + compgosub, + compgoto, + compif, + COMPINPUT, + COMPJUMP, + COMPMESSAGE, + NotAllowedInAcode, // OR + COMPPICTURE, + NotAllowedInAcode, // POP + COMPPRINT, + COMPPRINTINPUT, + COMPACODEPRS, + NotAllowedInAcode, // PUSH + COMPRANDOM, + COMPRESTORE, + COMPRETURN, + COMPSAVE, + COMPSCREEN, + COMPSTACK, + COMPSUB, + NotAllowedInAcode, // XOR + compilerbug +}; +//--- +void (*MCjumptable[])() = { // jump table for use in MC mode + NULL, // null entry because words numbered from 1 .. + MCAdd, + MCAnd, + MCASR, + MCBreakPt, + compcend, + compcif, + MCClear, + MCCLS, + CompCode, + MCData, + compdebuggingon, + MCDriverOpcode, + MCExit, + MCGetNext, + MCgosub, + MCgoto, + MCIF, + MCInput, + MCJump, + MCMessage, + MCOr, + MCPicture, + MCPop, + MCPrint, + MCPrintInput, + MCAcodePrs, + MCPush, + MCRandom, + MCRestore, + MCReturn, + MCSave, + MCScreen, + MCStack, + MCSub, + MCXor, + compilerbug +}; +//--- +// each entry is of length tsize +// with terminatori 0 included +// MUST BE ALPHABETICALLY SORTED +char controlwords[numcontrolwords][tsize] = { + "BEGIN", + "CONST", + "TABLE", + "VAR" +}; +//--- +// now some vectors to the real code (probably in driver.c).... +bool compisd0alphanumeric(char c) { return isd0alphanumeric(c); } +void compprintdecimald0(int n) { printdecimald0(n); } +void comphexlonga0(uint32_t n) { hexlonga0(n); } +void compdriver(int code, void *buffer) { driver(code, buffer); } +char compwaitkey() { return waitkey(); } +int compreaddecimal(char **s) { return readdecimal(s); } +void comphexbyted0(uint8_t n) { hexbyted0(n); } +void compreturntogem() { returntogem(); } +//--- +// workspace values +void *endcompiler = NULL; +void *opcodeaddress = NULL; +int currentvarnumber = 0; +int complinenumber = 0; +int TotalSourceLines = 0; +struct _symbol *startsymbols = NULL; // start of symbol table area +struct _symbol *endsymbols = NULL; // end of symbol table area +struct _symbol *freesymbol = NULL; // first free symbol address +void *startsource = NULL; // start of source area +void *endsource = NULL; // end of source area +int symboltablesize = 0; // size of symbol table area +void *compacodeptr = NULL; // pointer to code to be generated +void *savedacodeptr = NULL; +void *startacode = NULL; // start of acode area +void *endacode = NULL; // end of acode area +int errorstack = 0; // stack value for when errors occur +struct _forwardentry *startforward = NULL; +struct _forwardentry *freeforwardref = NULL; // pointer within forward ref table +struct _forwardentry *endforward = NULL; +int symboladdress = 0; +void *cbatchptr = 0; + +void (**CurrentJumpTable)() = NULL; // pointer to the current compiler jump table +//--- +char debugginginfoon = 0; +char compterminator = 0; +void *jumpdummyopcode = NULL; // absolute jump +void *dummyshortopcode = NULL; // must be startacode - 6 for code.c +void *dummylongopcode = NULL; // must be startacode - 5 for code.c +char forcedlongjumps = 0; // zero if off, 1 if on +char filenumber = 0; +char cexecutingcommandfile = 0; +char compilationerrors = 0; // set non-zero if any errors occur +char suppresscompilation = 0; // set to 1 for conditional assembly +bool acodeerror = false; // flag to signal acode overflow to the error subsystem +char CodeState = 0; // set to "+" to generate MC +char SixteenFlag = 0; // set to indicate 16 bit list operations +//--- +char compdriverbuffer[100]; +//--- +void compflush() { + // flush(); // is an interpreter routine, not needed for now + fflush(stdout); +} +//------------- +void clearsymbols() { + // acode area is immediately after comp + + // once-only init + endcompiler = malloc(512 * 1024); + + // acode area is first section + startacode = endcompiler + 2; // reserve space for acode length + compacodeptr = startacode; + endacode = startacode + (testcomp ? testsizeacodearea : + (splitdata ? splitsizeacodearea : sizeacodearea)); // 1.5 + + // allocate space for the dummy opcode addresses + jumpdummyopcode = endacode; + *(char *)jumpdummyopcode = 0; + dummyshortopcode = endacode + 2; + *(char *)dummyshortopcode = relmask; + dummylongopcode = endacode + 4; + *(char *)dummylongopcode = 0; + + // symbols sit between end of acode + // and source area + symboltablesize = (testcomp ? testsizesymbolarea : sizesymbolarea); + // set up pointer to start of symbol table + startsymbols = endacode + 8; // leave room for the dummies + + // and set up pointer to first free address in symbol table + // (immediately after the hash table) + freesymbol = startsymbols + hashentries; + + // clear space between startsymbols and startsymbols+symboltablesize + memset(startsymbols, 0, symboltablesize); + endsymbols = startsymbols + (testcomp ? testsymbolentries : symbolentries); + + // forward reference table is after symbol table + startforward = (struct _forwardentry *)endsymbols; + // zero offset from start of f/r table + freeforwardref = startforward; + endforward = (struct _forwardentry *)endsymbols + + (testcomp ? testforwardentries : forwardentries); + + // set up pointer at which source will be loaded + startsource = endforward; + // and some constants + currentvarnumber = 0; + + // complete.dat will eventually be formed at the end of everything + // to allow further compilation or symbol table actions after finishing + startcomplete = (char *)endforward; +} +//--- +void compsoftinit() { + // undo any potential finishing already done + *(char *)(startacode - 2) = 0; + *(char *)(startacode - 1) = 0; + savecompletedriverblock.start = NULL; + savecompletedriverblock.end = NULL; + + // start again with linenumber 1 + complinenumber = 1; +} +//--- +void compstart() { + init1(); + init2(); + clearsymbols(); + // wrapreset(); + + // set acode generation to start with + CodeState = '-'; + CurrentJumpTable = CompJumpTable; + + // with some 1.5 features hacked in + // to be able to support the AA games (GM and BTK) + compprs("\n"); + compprs("68000 Acode compiler 1.3 (for Linux)\n"); + compprs("Copyright (C) 1988 Level 9 Computing.\n"); + compprs("M.J.Austin 2/6/88\n"); + + // is there a command file in this directory on the disk? + compprs("\nLooking for compilation batch file - 'compile.bat'\n"); + loadcommandfile.start = &batchfilebuffer; // loading address + compdriver(loaddcode, &loadcommandfile); + if (*(char *)&loadcommandfile == 0) { + int r = loadcommandfile.end - (void *)batchfilebuffer; + if (r < 0) r = 0; + batchfilebuffer[r++] = cr; + batchfilebuffer[r++] = lf; + batchfilebuffer[r++] = eof; + batchfilebuffer[r++] = eof; + batchfilebuffer[r++] = 0; + cbatchptr = batchfilebuffer; + cexecutingcommandfile = 1; + } else return; // no, so get instructions from user + compprs("\nExecuting instructions in file 'compile.bat'\n"); + char c; + while ((c = *(char *)cbatchptr++) != eof) { + if (c == '1') { + if (!batchcompile()) break; + } else if (!dojumptable(c)) break; // for normal functions + } + // end of batch file, start prompting user +} + +bool batchcompile() { + // get a filename from batch file, then compile it + compsoftinit(); + compprs("Compiling file '"); + // copy file name into driverbuffer + struct _fcb *fcb = (struct _fcb *)&compdriverbuffer; + fcb->start = startsource; + char *f = fcb->filename; + char c; + while (c = *(char *)cbatchptr++, c != cr && c != lf) { + *f++ = c; + compprs("%c", c); + } + // end of filename, add 0 terminator + *f++ = 0; + compprs("'. "); + compflush(); + + compdriver(loaddcode, fcb); + if (*(char *)fcb) return false; // not found + abscompilefile(); + return true; +} + +//--- +void compmenu() { + cexecutingcommandfile = 0; + while (true) { + compprs("\n"); + compprs(" 0 .. Exit to TOS "); + compprs(" 1 .. Compile Source file\n"); + + compprs(" 2 .. Finish acode "); + compprs(" 3 .. Finish gamedata.dat\n"); + + compprs(" 4 .. Save Gamedata and acode "); + compprs(" 5 .. Run game\n"); + + compprs(" 6 .. Toggle debugging info\n"); + + compprs(" 7 .. Toggle forced long jumps "); + compprs(" 8 .. Print symbols\n"); + + compprs(" 9 .. Check for unused symbols "); + compprs(" A .. Toggle printing (to rs232) \n"); + if (splitdata) compprs(" B .. Finish gamedata without acode \n"); + compprs("\n"); + compprs("Your choice: "); + char c; + while (compdriver(osrdchdcode, &compdriverbuffer), (c = *compdriverbuffer) != lf) { + compprs("%c ", c); // echo character typed + dojumptable(c); + } + } +} +//--- +bool dojumptable(char c) { + // call compiler function by number + if (c < '0') return true; + switch (c) { + case '0': compreturntogem(); break; + case '1': return compilefile(); break; + case '2': finishacode(); break; + case '3': finishgamedatainmemory(); break; + case '4': savegamedata(); break; + case '5': rungame(); break; + case '6': toggledebugginginfo(); break; + case '7': toggleforcedlongjumps(); break; + case '8': printsymboltable(); break; + case '9': checkunusedsymbols(); break; + case 'A': ToggleRS232Printer(); break; + case 'B': if (splitdata) { finishwithoutacode(); break; } + default: return false; + } + return true; +} +//--- +void ToggleRS232Printer() { + if (OutputDevice == 2) { // currently to CON:? + SetRS232(); + } else { + OutputDevice = 2; // CON: + closelogfile(); + compprs("\nPrinting is now off. \n"); + } +} +//--- +void SetRS232() { + OutputDevice = 1; // AUX: + openlogfile("compile.log"); + compprs("\nPrinting is now on. \n"); +} +//--- +void finishgamedata(bool noacode) { + compprs("%s", finish_version); + // this program produces a complete.dat file in memory + // starting from acode.acd in memory and + // from the rest of the data on disk + finishedptr = startcomplete; + // (allows space for acode beneath gamedata.dat) + // now allow space for gamedata. Startsources is where + // the exits etc. are loaded in transiently + // in 1.5 with split data, gamedata can be big when still using combined + startsources = finishedptr + (splitdata ? splitsizegamedata : sizegamedata); + + finishedptr += sizeofpointers; + processexits(); + processtables(); + if (!splitdata) savedirectory(); // with split data no subdirs are used (1.5) + + if (!splitdata) selectdirectory(); // subdirectory for computer-specific text + processsquash(); + if (!splitdata) climb(); // and back to root for acode + + // set up ptr = start of acode + if (noacode) { // simulate zero-sized acode for split data (1.5) + ptr = finishedptr; + ptr[0] = 0; + ptr[1] = 0; + } else copyacode(); + processacodeptr(); + finishchecksum(); + + savecompletedriverblock.start = startcomplete; // start address to save + savecompletedriverblock.end = finishedptr; // end address to save +} +void finishwithoutacode() { + finishgamedata(true); // mimick observed behaviour +} +void finishgamedatainmemory() { + finishgamedata(false); +} +//--- +void copyacode() { + // work out length + int len = compacodeptr - startacode + 8; // allow plenty of space for length pointer + // make finishedptr even and zero out skip byte + if (!oddacode && (finishedptr - startcomplete) & 1) *finishedptr++ = 0; + // now copy it to current position in gamedata.dat i.e. at finishedptr + memcpy(finishedptr, startacode - 2, len); // backstep over pointer + ptr = finishedptr; // ptr = start of data in final position +} +//--- +void savegamedata() { + compprs("Saving acode.acd\n"); + saveacode(); + if (!splitdata) descend(); // with split data no subdirs are used (1.5) + compprs("Saving gamedata.dat\n"); + compdriver(savedcode, &savecompletedriverblock); + if (!splitdata) climb(); // leave us back where we started +} +//--- +void rungame() { // XXX + compprs("Running game... is not implemented...\n"); + compreturntogem(); + return; + + descend(); + // call_ebios _getrez + // addq.l 2,sp + // d0.b = 2 for hires + // cmp.b 2,d0 + int res = 0; + if (res != 2) { + // move.w 1,-(sp) // medium resolution + // move.l -1,-(sp) // retain physical base + // move.l -1,-(sp) // retain logical base + // call_ebios _setscreen + // add.l 12,sp + } + // dc.w 0xA00A // Line A function to hide mouse + // and set up palette - we want yellow text on black background + // setuppalette(); + + // lea initialstackpointer,a0 + // move.l sp,(a0) + // intinit1(); // first part of initialise + // move.l a6,-(sp) + // get end of gamedata file + // intinitloadpics(savecompletedriverblock->end); + // intstart2(); +} +//--- +void toggledebugginginfo() { + compprs("Debugging info is"); + debugginginfoon ^= 0xff; + togglereport(debugginginfoon); +} +//--- +void compdebuggingon() { +// as part of a program + debugginginfoon ^= 0xff; +} +//--- +void CompCode() { + // turn machine-code generation ON/OFF + char c = compsearch(); + if (c != '+' && c != '-') { + PlusOrMinusExpected(); + return; + } + + if (c == CodeState) { + AlreadyInState(); + return; + } + CodeState = c; + // c is new code state + if (c == '+') { + // change to MC + CurrentJumpTable = MCjumptable; + if (testcomp) { + if ((compacodeptr - startacode) & 1) + EvenError(); // for testing purposes simulate alignment error + else compskiptoeol(); + return; + } + compskiptoeol(); + code(opcchangecode); + // is current code ptr (relative to startacode) EVEN? + if (!i8086 && (compacodeptr - startacode) & 1) { + compacodeptr++; // not done for PC in 1.5 + } + } else { + // change to acode + CurrentJumpTable = CompJumpTable; + compskiptoeol(); + if (!testcomp) MCToAcode(); + } +} +//--- +void compcif() { + // start of a section of conditional assembly + struct _symbol *sym = NULL; + bool found = findsymbol(&sym); + if (!sym) return; + if (found) { + int type = sym->type & 0x7f; + sym->type |= 0x80; // set "USED" bit + if (type != constanttype) { + badtype(); + return; + } + if (suppresscompilation || !sym->value) { // always supress nested cif + // skip over conditional assembly code + suppresscompilation++; + } // non-zero, so allow it to be compiled. + } else { + // 'cif' as a variable is handled by caller + syntaxerror(); + return; + } +} +//--- +void compcend() { + // prevent it going negative + if (--suppresscompilation < 0) suppresscompilation = 0; +} +//--- +void toggleforcedlongjumps() { + compprs("Forced long jumps are"); + forcedlongjumps ^= 0xff; + togglereport(forcedlongjumps); +} +void togglereport(int t) { + if (t == 0) nowoff(); + else compprs(" now on\n"); +} +void nowoff() { + compprs(" now off\n"); +} +//--- +void finishacode() { + compprs("\nNumber of vars=%d", currentvarnumber); + compflush(); + compprs("\nNumber of source lines=%d", TotalSourceLines); + compflush(); + compprs("\n"); + + // check here for remaining forward references + int missing = 0; + struct _symbol *sym = startsymbols; + do { + if (*sym->text && (sym->type & 0x7f) == undefinedlabeltype) { + missing++; + struct _forwardentry *entry = startforward + sym->value; + do { + compilationerrors = 1; + compprs("\nMissing symbol '"); + absprintsymbol(sym); + + compprs("' which was referenced at line "); + compprintdecimald0(entry->linenumber); + compflush(); // print buffer contents + + compprs(" in file "); + compprintdecimald0(entry->filenumber); + compflush(); // print buffer contents + + entry = entry->next; + } while (entry); + } + sym++; + } while (sym < endsymbols); + compprs("\n"); + if (missing) compprs("Number of missing symbols: %d\n", missing); + + if (compilationerrors) { + compprs("Errors in compilation - code not saved\n"); + compprs("Press a key to return to gem\n"); + compwaitkey(); + compreturntogem(); + return; + } + // poke in length at start + int len = compacodeptr - startacode + 2; // give space for end pointer + *(char *)(startacode - 2) = len & 0xff; // allow space for length pointer + *(char *)(startacode - 1) = len >> 8; +} +//--- +void saveacode () { + saveacodedriverblock.start = startacode - 2; // allow space for length pointer + saveacodedriverblock.end = savedacodeptr; // end address + compdriver(savedcode, &saveacodedriverblock); +} +//--- + +bool compilefile() { + // load a file, with driver prompting for filename + compsoftinit(); // init on each and every compile + struct _fcb *fcb = (struct _fcb *)&compdriverbuffer; + fcb->start = startsource; + fcb->filename[0] = 0; // filename = null, so user must enter one + compdriver(loaddcode, fcb); + if (*(char *)fcb) return false; // not found + abscompilefile(); + return true; +} +void abscompilefile() { + char c; + filenumber++; + // ok, now compdriverbugger.start = start address + // and compdriverbugger.end = end address of file just loaded + struct _fcb *fcb = (struct _fcb *)&compdriverbuffer; + char *buf = (char *)fcb->end; + if (!buf) buf = startsource; + buf[0] = eof; // add terminators + buf[1] = eof; // (not necessarily word-aligned) + buf[2] = cr; + buf[3] = lf; + buf[4] = eof; + buf[5] = eof; + + // first find out what the terminator is + // it is assumed there will be one and only one of these per line + // other control codes are ignored completely by the compiler + ptr = startsource; + while (c = *ptr++, c != cr && c != lf); + compterminator = c; + + ptr = startsource; // remains as pointer throughout + + // now start compiling it! + displayline(); + + // start by looking for const/var definitions + c = checkforcontrolword(); + if (!c) { + syntaxerror(); + return; + } + while (true) { + switch (c) { + case 1: c = mainprogram(); break; + case 2: c = constantdefinitions(); break; + case 3: c = tabledefinitions(); break; + case 4: c = vardefinitions(); break; + case eof: endofcompfile(); return; break; + default: compilerbug(); return; + } + } +} + +//--- +void endofcompfile() { + savedacodeptr = compacodeptr; + compprs("End of source file.\n"); +} +//--- +int checkforcontrolword() { + if (compsupersearch() == eof) return eof; // skip spaces, comments etc. + return tablecompare(controlwords, numcontrolwords); +} +//--- +int constantdefinitions() { + if (debugginginfoon) { + compprs("\nStarting constant definitions segment at "); + compprintdecimald0(complinenumber); + compflush(); // print buffer contents + compprs("\n"); + } + while (true) { + char c = checkforcontrolword(); + if (c) return c; + struct _symbol *sym = addsymbol(constanttype, 0); // dummy value + // sym = address of symbol entry + if (!sym) continue; + if (*ptr++ != '=') { + equalsexpected(); + continue; + } + // now get a number + sym->value = compreaddecimal(&ptr); + } +} +//--- +int vardefinitions() { + if (debugginginfoon) { + compprs("\nStarting variable definitions at line "); + compprintdecimald0(complinenumber); + compflush(); // print buffer contents + compprs("\n"); + } + while (true) { + char c = checkforcontrolword(); + if (c) return c; + currentvarnumber++; + // In split data (1.5) vars can go higher than 256 + // for MC purposes but are flagged when + // used in non-MC sections + if (currentvarnumber >= (splitdata ? 65536 : 256)) { + TooManyVars(); + continue; + } + struct _symbol *sym = addsymbol(vartype, currentvarnumber); + if (!sym) continue; + } +} +int tabledefinitions() { + if (debugginginfoon) { + compprs("\nStarting table definitions at line "); + compprintdecimald0(complinenumber); + compflush(); // print buffer contents + compprs("\n"); + } + while (true) { + char c = checkforcontrolword(); + if (c) return c; + struct _symbol *sym = addsymbol(tabletype, 0); // dummy value + // sym = address of symbol entry + if (!sym) continue; + if (*ptr++ != '=') { + equalsexpected(); + continue; + } + // now get a number + sym->value = compreaddecimal(&ptr); + } +} +//--- +int mainprogram() { + if (debugginginfoon) { + compprs("\nStarting main program at line "); + compprintdecimald0(complinenumber); + compflush(); // print buffer contents + compprs("\n"); + } + while (true) { + char c = checkforcontrolword(); + if (c) return c; + // defining a label ? + if (*ptr == '.') { + if (suppresscompilation) { + compskiptoeol(); + continue; + } + ptr++; // move on to text of label + struct _symbol *sym = addsymbol(labeltype, compacodeptr - startacode); + if (!sym) continue; + sym->codestate = CodeState; + continue; + } + + int keyword = tablecompare(compinstructiontable, (testcomp ? numinstructions + 1 : numinstructions)); + if (keyword == 6 && *ptr == '=' ) { + // 'cif' here is being used as a variable, not a keyword + keyword = 0; + ptr -= 3; + } + if (suppresscompilation && keyword != (bugcomp ? 4 : 6) && keyword != 5) { + // only keyword numbers 5/6 [bug: was 3/4, adjusted for ASR to 4/5] + // (i.e. start/end conditional assembly) + // are assembled in the middle of conditional assembly + compskiptoeol(); // ignore instruction + continue; + } + + if (keyword) { // keyword number + CurrentJumpTable[keyword & 0x3f](); + continue; + } + + // only other possibility is that it is an assignment + // to a var or table + // check for 16 bit list access... + c = compsearch(); + if (c == '&') { + SixteenFlag = 1; + ptr++; + } else { + SixteenFlag = 0; + } + int index = 0; + int base = 0; + int n = -1; + struct _symbol *sym = NULL; + bool found = findsymbol(&sym); + if (!sym) continue; + if (!found) { + badinstruction(); + continue; + } + int type = sym->type & 0x7f; + sym->type |= 0x80; + if (type == vartype) { + if (compsearch() != '=') { + equalsexpected(); + continue; + } + ptr++; + compsearch(); + + struct _symbol *sym2 = NULL; + found = findsymbol(&sym2); + if (!sym2) continue; + if (found) { + type = sym2->type & 0x7f; + sym2->type |= 0x80; + if (type == constanttype) { + // assigning from a manifest constant + n = sym2->value; + } else if (type == tabletype) { + // var=table(c/v) + if (CodeState == '+') { + MCAft(sym->value, sym2->value); + continue; + } + + if (SixteenFlag) { + CantDo16(); + continue; + } + + if (compsearch() != '(') { + bracketsexpected(); + continue; + } + ptr++; // skip bracket + + struct _symbol *sym3 = NULL; + found = findsymbol(&sym3); + if (!sym3) continue; + if (found) { + type = sym3->type & 0x7f; + sym3->type |= 0x80; + if (type == vartype) { + // a variable + index = sym3->value; // value of var + base = 0xa0; // base value for var=table(v) + } else if (type != constanttype) { + badindex(); + continue; + } else { + // a manifest constant + index = sym3->value; // value of constant + base = 0xc0; // base value for var=table(c) + } + } else { + // a numeric value? + index = getnumberconstant(); // will print an error message if not + base = 0xc0; // base value for var=table(c) + if (index < 0) continue; + } + + if (compsearch() != ')') { + bracketsexpected(); + continue; + } + ptr++; // skip bracket + + // now generate the code + // first put in opcode - base value+table number + code(sym2->value | base); + + // and the index + if (index >= 0x100) { + badindex(); // single byte index only + continue; + } + code(index); + + // now thing not inside the brackets + code(sym->value); // i.e. var to assign to + continue; + } else if (type != vartype) { + varexpected(); + continue; + } else { + // var=var + if (CodeState == '+') { + MCLetVV(sym->value, sym2->value); // v1, v2 + } else { + code(opcletvv); // opc + code(sym2->value); // v2 + code(sym->value); // v1 + } + continue; + } + } else { + // assigning from constant? + n = getnumberconstant(); + if (n < 0) continue; + } + // n = constant to assign from + if (CodeState == '+') { + MCLetVC(sym->value, n); // var, constant + } else if (n < 0x100) { + code(opcletvcsmall); + code(n); // single byte constant only + code(sym->value); // var + } else { + code(opcletvcbig); + codew(n); // two byte constant + code(sym->value); // var + } + continue; + } else if (type == tabletype) { + // have found a table identifier at start of line + // i.e. want to do function of form @(V/C)=V + if (compsearch() != '(') { + bracketsexpected(); + continue; + } + ptr++; // skip bracket + + struct _symbol *sym2 = NULL; + found = findsymbol(&sym2); + if (!sym2) continue; + if (found) { + type = sym2->type & 0x7f; + sym2->type |= 0x80; + if (type == vartype) { + // table(var)=var + base = 0xe0; // base value for table(var)=var operations + index = sym2->value; + if (CodeState == '+') { + MCAttVar(sym->value, index); // table, index + continue; + } + } else if (type != constanttype) { + badindex(); + continue; + } else { + // a manifest constant index + index = sym2->value; // value of index + base = 0x80; // base for table(const)=var operations + } + } else { + // only remaining possibility is a numeric offset? + index = getnumberconstant(); // will print an error message if not + base = 0x80; // base for table(const)=var operations + if (index < 0) continue; + } + // have value of the constant index - generate code for table(c)=v + if (CodeState == '+') { + MCAttConst(sym->value, index); // table, index + continue; + } + + if (SixteenFlag) { + CantDo16(); + continue; + } + + if (compsearch() != ')') { + bracketsexpected(); + continue; + } + ptr++; // skip bracket + + if (compsearch() != '=') { + equalsexpected(); + continue; + } + ptr++; // skip equals + + // now generate the code + // first put in opcode - base value+table number + code(sym->value | base); + + // and the index + if (index >= 0x100) { + badindex(); // single byte index only + continue; + } + code(index); + + // and finally the var not inside the brackets + int v = compgetvar(); + if (v) code(v); + continue; + } else { + syntaxerror(); + continue; + } + } // back to mainprogloop +} +int getnumberconstant() { + // a real number + char c = compsearch(); + if (c < '0' || c > '9') { + syntaxerror(); + return -1; + } + // yup, so generate the code + return compreaddecimal(&ptr); // pointer immediately after number +} +//--- +void compif() { + // handle if v = <> < > then label + opcodeaddress = compacodeptr; + int value = 0; + int opcode = 0; + + int v1 = compgetvar(); + if (!v1) return; + int op = evaloperator(); // op = operator type + if (op < 0) return; + struct _symbol *sym = NULL; + bool found = findsymbol(&sym); + if (!sym) return; + if (!found) { + // only other possibility is a number + value = getnumberconstant(); + if (value < 0) return; + } else { + int type = sym->type & 0x7f; + sym->type |= 0x80; // set "USED" bit + if (type == vartype) { + code(op | 0x10); + code(v1); // first var number + code(sym->value); // second var number + thenjump(); + return; + } else if (type != constanttype) { + badtype(); + return; + } else { + value = sym->value; + } + } + + opcode = op | 0x18; + // now set up size bit + if (value < 0x100) { + opcode |= smallmask; // set sizebit - small constant + code(opcode); + code(v1); // first var number + code(value); // single byte constant + } else { + code(opcode); + code(v1); // first var number + codew(value); // double byte constant + } + thenjump(); +} +void thenjump() { + // skip over "THEN" if present, then evaluate jump address + compsearch(); + stringcompare("THEN"); + // stringcompare automatically skips string if matched + jumpstuff(); +} +int evaloperator() { + // return code corresponding to operator + char c = compsearch(); + ptr++; // skip operator + if (c == '=') return eqop; + if (c == '>') return gtop; + if (c != '<') { + badoperator(); + return -1; + } + c = *ptr; + if (c != '>') return ltop; + ptr++; // and skip > of <> + return neop; // must have been <> +} +//--- +void compgoto() { + opcodeaddress = compacodeptr; + code(opcgoto); + jumpstuff(); +} +void compgosub() { + opcodeaddress = compacodeptr; + code(opcgosub); + jumpstuff(); +} +bool jumpstuff() { + // insert code for a jump to the label (ptr) + // the address of the opcode for this jump is at opcodeaddress + char c = compsearch(); + if (c == '@') ptr++; // skip @ + else if (!forcedlongjumps) { + // relative jump, so set relbit in opcode + *(char *)opcodeaddress |= relmask; // set relbit + } + + struct _symbol *sym = NULL; + int label = getlabel(&sym); + if (label < 0) return false; + if (!sym) return false; + if (sym->codestate && sym->codestate != CodeState) { + WrongCodeState(); + return false; + } + + if (c == '@' || forcedlongjumps) { + // absolute jump + // getlabel gives value of label relative to start of acode + // which is just what we want! + codew(label); + } else { + // label is value of label relative to start of acode + // find current address relative to start + int delta = label - (compacodeptr - startacode); + if (delta < 128 && delta >= -128) code(delta); + else { + reljumpoutofrange(); + return false; + } + } + + return true; +} +//--- +int getlabel(struct _symbol **sym) { + // return value of label relative to start of acode area + // set up forward reference if label is not yet defined + struct _forwardentry *entry = NULL; + bool found = findsymbol(sym); + if (!*sym) return -1; + if (!found) { + // freeforwardref = value of symbol - offset of first entry in chain in f/r table + *sym = addsymbol(undefinedlabeltype, freeforwardref - startforward); + if (!*sym) return -1; + (*sym)->type |= 0x80; // set "USED" bit + } else { + int type = (*sym)->type & 0x7f; + (*sym)->type |= 0x80; // set "USED" bit + if (type == undefinedlabeltype) { + // add a forward reference to a label which already + // has some references to it, sym is entry in symbol table + // scan through existing list + // start with first forward reference entry + entry = startforward + (*sym)->value; + // then find end of list and link free entry + while (entry->next) entry = entry->next; + entry->next = freeforwardref; + } else if (type != labeltype) { + wronglabeltype(); + return -1; + } else return (*sym)->value; + } + + // and set up the new entry in the forward reference table + // structure is: + // .. offset from start of table of next u/d reference to this symbol + // .. line number of reference + // .. offset from start of code of the reference + // .. offset from start of code of the opcode + // .. file number in which reference occured + // .. CodeState + entry = freeforwardref; + entry->next = NULL; // offset of next entry + entry->linenumber = complinenumber; + entry->ref = compacodeptr - startacode; // current pos relative to start of acode + entry->opcode = opcodeaddress - startacode; + entry->filenumber = filenumber; + entry->codestate = CodeState; + + freeforwardref++; // and set up free space pointer + if (freeforwardref >= endforward) { + freeforwardref--; + forwardrefoverflow(); + return -1; + } + // returning offset relative to acode start of opcode. + // This is wrong for MC compilation because DummyOpcode used + // for MC, return current acode position + return (CodeState == '+') ? entry->ref : entry->opcode; +} +//--- +void resolveforwardref(struct _symbol *sym) { + // have just defined encountered ".label" which + // is in the symbol table as type undefinedlabeltype + // so zip through setting up all the jumps correctly + // symbol table entry is sym + // mark label as defined + sym->type = labeltype | 0x80; + struct _forwardentry *entry = startforward + sym->value; + + do { + if (entry->codestate != CodeState) { + ForwardWrongCodeState(sym, entry); + return; + } + + if (CodeState == '+') + MCrfr(sym, entry); + else { + int label = compacodeptr - startacode; + char *ref = (char *)(startacode + entry->ref); + char opcode = *(char *)(startacode + entry->opcode); + if (!(opcode & relmask)) { + // poke back in address for a long jump + // poke back two-byte reference + *ref++ = label & 0xff; // low byte + *ref = label >> 8; // high byte + } else { + // poke back in address for short jump + // make it relative to address of reference + int delta = label - entry->ref; + if (delta >= 128) { // >>was 0x100! + forwardoutofrange(sym, entry); // note special line number treatment + return; + } + *ref = delta; // poke in single byte reference + } + } + + // any more forward references? + // at present, no garbage collection on forward + // reference area. If this is needed (which I doubt) + // then the easiest way is probably to have a free-space + // linked list to which space is added. When space is + // needed, it can be taken off the start of this list + entry = entry->next; // next chained entry + } while (entry); +} +//--- +void addsub() { + int v1 = compgetvar(); + if (!v1) return; + if (compsearch() != ',') { + commaexpected(); + return; + } + ptr++; // skip over comma + int v2 = compgetvar(); + if (!v2) return; + code(v2); + code(v1); +} +void COMPADD() { + code(opcaddvv); + addsub(); +} +void COMPSUB() { + code(opcsubvv); + addsub(); +} +//--- +void COMPACODEPRS() { + // Compile a function call for acode prs - for acode debugging + if (compsearch() != '"') { + missingquote(); + return; + } + code(opcfunction); + code(fncprs); + ptr++; // skip over leading quote + + while (*ptr != '"') { + if (*(uint8_t *)ptr == 0x9c) { + poundsignnotallowed(); // pound sign is invisible + messes up capitalization + return; + } + code(*ptr++); + } + ptr++; // skip over closing quote + + code(0); // add 0 to terminate +} +//--- +void COMPCLEAR() { + code(opcfunction); + code(fncclear); +} +//--- +void COMPCLS() { + code(opcclear); + compsearch(); + char c = toupper(*ptr++); + if (c == 'T') { + code(0); + } else if (c == 'G') { + code(1); + } else { + badarg(); + } +} +//--- +void COMPDATA() { + char c = 0; + do { + // should it be reset to zero? + // since (in non-MC) '@' is always used + // in DATA, this is not a problem? + opcodeaddress = jumpdummyopcode; + if (!jumpstuff()) return; + c = compsearch(); + ptr++; // skip over comma + } while (c == ','); + if (c == ';') compssskiptoeol(); +} +//--- +void COMPDRIVEROPCODE() { + code(opcfunction); + code(fncacodedriver); +} +//--- +void fourargs(char c) { + code(c); + for (int i = 0; i < 4; i++) { + int v = compgetvar(); + if (!v) return; + code(v); + } +} +//--- +void COMPEXIT() { + fourargs(opcexit); +} +//--- +void COMPINPUT() { + fourargs(opcinput); +} +//--- +void COMPGETNEXT() { + code(opcgetnext); + for (int i = 0; i < 6; i++) { + int v = compgetvar(); + if (!v) return; + code(v); + } +} +//--- +void COMPJUMP() { + char longjumps = forcedlongjumps; + forcedlongjumps = 1; + + opcodeaddress = compacodeptr; + code(opccall); + if (jumpstuff()) { + int v = compgetvar(); + if (!v) return; + code(v); + } + + // and restore original value in forcedlongjumps + forcedlongjumps = longjumps; +} +//--- +void COMPMESSAGE() { + int message = 0; + struct _symbol *sym = NULL; + bool found = findsymbol(&sym); + if (!sym) return; + if (found) { + int type = sym->type & 0x7f; + sym->type |= 0x80; // set "USED" bit + if (type == constanttype) { + // manifest constant + message = sym->value; + } else if (type != vartype) { + badtype(); + return; + } else { + // message v + code(opcmessagev); // opcode + code(sym->value); // var number + return; + } + } else { + // numerical constant + message = getnumberconstant(); + if (message < 0) return; + } + // message c + if (message < 0x100) { + code(opcmessagecsmall); + code(message); // single byte constant + } else { + code(opcmessagecbig); + codew(message); // double byte constant + } +} +//--- +void COMPPICTURE() { + code(opcpicture); + int v = compgetvar(); + if (!v) return; + code(v); +} +//--- +void COMPPRINT() { + code(opcprint); + int v = compgetvar(); + if (!v) return; + code(v); +} +//--- +void COMPPRINTINPUT() { + code(opcprintinput); +} +//--- +void COMPBREAKPT() { + code(opcfunction); + code(fncbreakpt); +} +//--- +void COMPRANDOM() { + code(opcfunction); + code(fncrandom); + int v = compgetvar(); + if (!v) return; + code(v); +} +//--- +void COMPRESTORE() { + code(opcfunction); + code(fncrestore); +} +//--- +void COMPRETURN() { + code(opcreturn); +} +//--- +void COMPSAVE() { + code(opcfunction); + code(fncsave); +} +//--- +void COMPSCREEN() { + code(opcscreen); + compsearch(); + char c = toupper(*ptr++); + if (c == 'T') { + code(0); + } else if (c == 'G') { + code(1); + int v = compgetvar(); // dummy var for screeng g + if (!v) return; + code(v); + } else { + badarg(); + } +} +//--- +void COMPSTACK() { + code(opcfunction); + code(fncstack); +} +//--- +// now some general code generation subroutines +void codew(uint16_t w) { + code(w & 0xff); + code(w >> 8); +} +void code(uint8_t c) { + // add code to current position in code + *(uint8_t *)compacodeptr++ = c & 0xff; + if (compacodeptr == endacode) { + acodeoverflow(); + compacodeptr--; + } +} +//--- +int compgetvar() { + // return value of var (ptr) in sym + struct _symbol *sym = NULL; + bool found = findsymbol(&sym); + if (!sym) return 0; + if (!found) { + varnotdefined(); + return 0; + } + if ((sym->type & 0x7f) != vartype) { + varexpected(); + return 0; + } + sym->type |= 0x80; + return sym->value; +} +//--- +void checkunusedsymbols() { + compprs("Unused symbols... \n"); + + int unused = 0; + int total = 0; + struct _symbol *sym = startsymbols; + while (sym < endsymbols) { + if (*sym->text) { + total++; + if (!(sym->type & 0x80)) { + unused++; + printsymbol(sym); + } + } + sym++; + } + if (unused) compprs("Number of unused symbols: %d out of %d\n", unused, total); + compprs("\n"); +} +//--- +void printsymboltable() { + compprs("Symbol table...\n"); + // display all symbols + int total = 0; // total number of symbols + int hashed = 0; // symbols within hash table + compprs("\n"); + + struct _symbol *sym = startsymbols; + // end of hash table + struct _symbol *endhash = startsymbols + hashentries; + + while (sym < endsymbols) { + if (*sym->text) { + total++; // number of symbols + printsymbol(sym); + } + sym++; + + if (sym == endhash) { + compprs("-----------------\n"); + compprs("End of hash table\n"); + compprs("-----------------\n"); + hashed = total; // save number of symbols in hash table + } + } + compprs("Total number of symbols = "); + compprintdecimald0(total); + compflush(); // print buffer contents + compprs("\nOf which number in hash table = "); + compprintdecimald0(hashed); + compflush(); // print buffer contents + compprs("\n\n"); +} +//--- +void printsymbol(struct _symbol *sym) { + // print symbol (sym) + // first print value + compprintdecimald0(sym->value); + compflush(); // print buffer contents + compprs(" \t"); // tab + + absprintsymbol(sym); + compprs("\n"); +} +//--- +void absprintsymbol(struct _symbol *sym) { + // print symbol + compprs("%s", sym->text); +} +//--- + +struct _symbol *addsymbol(char type, int value) { + // add symbol (ptr) of alphanumeric characters + // with type and value + // return = address of symbol + struct _symbol *sym = NULL; + bool found = findsymbol(&sym); + if (!sym) return NULL; + if (found) { + // only one type of symbol can be redefined + // - where a "undefinedlabeltype" is to be replaced + // by a "labeltype" + if ((sym->type & 0x7f) != undefinedlabeltype || type != labeltype) { + cantredefinesymbol(); + return NULL; + } + resolveforwardref(sym); // ok! + } else { + // sym = address of last symbol in chain found + if (*sym->text) { // anything there? + // yes, find the first free address and add a symbol in it + // then chain on ptr at sym->ptr + sym->ptr = freesymbol; + sym = freesymbol; + // and adjust free symbol pointer accordingly + freesymbol++; + if (freesymbol == endsymbols) { + freesymbol--; + symboltableoverflow(); + return NULL; + } + // no, fall through - first entry with this hash value + } + // there is space to add a symbol so do so + int offset = 0; + do { + sym->text[offset++] = *ptr++; + } while (compisd0alphanumeric(*ptr) && offset < symboltextlength); + if (offset == symboltextlength) { + sym->text[offset - 1] = 0; + symboltoolong(); + return NULL; + } + } + // set up type, value + sym->type = (sym->type & 0x80) | type; + sym->value = value; + return sym; +} +//--- +bool findsymbol(struct _symbol **sym) { + // find symbol (ptr) of alphanumeric characters + // return: *sym = address of symbol if found and int = 0 + // else int <> 0 and *sym = address of last symbol in chain + + // first do hash calculation on the symbol + // to find the offset from the start of the symbol area + compsearch(); + // offset from start of symbol area + int hash = hashcalc(); + if (hash < 0) return false; + *sym = startsymbols + hash; + struct _symbol *current = *sym; + // is there an entry there already? + if (*current->text) { + while (stringcompare(current->text) != 0) { + // not found - any chained entries? + current = current->ptr; + if (!current) return false; + *sym = current; + } + // In split data (1.5) only checked when used in non-MC + if (splitdata && CodeState == '-' && + (*sym)->type == vartype && (*sym)->value >= 256) { + *sym = NULL; + TooManyVars(); + return false; + } + return true; + } else return false; +} +//--- +int hashcalc() { + // from symbol at (ptr), return the offset from the + // start of the hash table + uint8_t hash = 0; + int offset = 0; + if (!compisd0alphanumeric(*ptr)) { + badsymbol(); + return -1; + } + + do { + hash += toupper(*(ptr + offset)) - '0'; + offset++; + } while (compisd0alphanumeric(*(ptr + offset))); + + // modulo hashentries + return hash % hashentries; +} +//--- +void displayline() { + // display the line after the current pointer if debugging info is on + if (!debugginginfoon) return; + // display the previous 8 bytes + compprs("\n"); + // display address relative to start of acode + void *prev = compacodeptr - 8; + comphexlonga0(prev - startacode); + compprs(": "); + for ( ; prev < compacodeptr; prev++) { + comphexbyted0((prev < startacode) ? 0xff : *(char *)prev); + compprs(" "); + } + compprs(" - "); + // first give line number + compprintdecimald0(complinenumber); + compflush(); // print buffer contents + compprs(": "); + uint8_t *p = (uint8_t *)ptr; + while (*p >= 32) compprs("%c", *p++); + compflush(); // print buffer contents +} +//--- +int tablecompare(char table[][tsize], int nentries) { + // compare a word of alphanumerics at (ptr) + // with table starting at table, which has nentries entries + // each of length tsize + // return keyword number or 0 if not found + int lentry = -1; + int uentry = nentries; + while (true) { + // get mid-point between lower and nentries as next comparison string + int entry = (lentry + uentry) / 2; + // do a single string compare + int cmp = stringcompare(table[entry]); + // have we finished? + if (cmp == 0) return entry + 1; // found + else if (uentry - lentry <= 2) return 0; // not found + else if (cmp < 0) uentry = entry; + else lentry = entry; + } +} +//--- +int stringcompare(char *text) { + char *p = ptr; + while (compisd0alphanumeric(*p)) p++; + char orig = *p; // save original char + + *p = 0; // temporarily terminate string + int cmp = strcasecmp(ptr, text); + *p = orig; // restore original char + + if (cmp == 0) ptr = p; // advance ptr if match + return cmp; +} +//--- +void compssskiptoeol() { + compskiptoeol(); + compsupersearch(); // on new line as well! +} +void compskiptoeol() { + if (*ptr == eof) return; + while (*ptr++ != compterminator); + do { + TotalSourceLines++; + complinenumber++; + // skip control characters (including false eol) + uint8_t c = eof; + while (c = *ptr++, c < 32 && c != compterminator && c != eof); + ptr--; + displayline(); + } while (*ptr++ == compterminator); + ptr--; +} +int compsearch() { + // search, skipping spaces + while (*ptr == ' ') ptr++; + return *ptr; +} +int compsupersearch() { + // search, skipping over comments if present + while (true) { + uint8_t c = compsearch(); + if (c == eof) break; + if (c == '*' || c == ';' || c == compterminator || c < 32) { + compskiptoeol(); + } else break; + } + return *ptr; +} +//--- +void forwardoutofrange(struct _symbol *sym, struct _forwardentry *entry) { + compprs("\nForward reference to '"); + absprintsymbol(sym); + + compprs("' out of range at line "); + FROREnd(entry); +} +void FROREnd(struct _forwardentry *entry) { + // line number in which error occured + compprintdecimald0(entry->linenumber); + compflush(); // print buffer contents + compprs(" in file "); + // file number in which error occured + compprintdecimald0(entry->filenumber); + compflush(); // print buffer contents + compprs("\n"); + comperror1(); +} +//--- +void varexpected() { + compprs("\nVariable expected"); + comperror(); +} +//--- +void acodeoverflow() { + compprs("\nAcode overflow"); + acodeerror = true; + comperror(); + acodeerror = false; +} +//--- +void symboltableoverflow() { + compprs("\nSymbol table overflow"); + comperror(); +} +//--- +void symboltoolong() { + compprs("\nSymbol too long"); + comperror(); +} +//--- +void varnotdefined() { + compprs("\nVariable not defined"); + comperror(); +} +//--- +void compilerbug() { + compprs("\nFatal compiler bug"); + comperror(); +} +void comperror() { + compprs(" at line "); + compprintdecimald0(complinenumber); + compflush(); // print buffer contents + + compprs(" in file '"); + compprintfilename(); + compprs("'\n"); + comperror1(); +} +void comperror1() { + // all errors come here + compilationerrors = 1; // prevent saving of code + if (!acodeerror) compssskiptoeol(); +} +//--- +void compprintfilename() { + struct _fcb *fcb = (struct _fcb *)&compdriverbuffer; + compprs("%s", fcb->filename); +} +//--- +void chartoprinter(char c) { + // now send it to the printer +// move.l a0,-(sp) +// move.w d0,-(sp) // this is argument for routine as well as preservation +// call_bdos c_auxout // send to printer - call_bdos c_conout +// addq.l 2,sp // remove function call number etc. +// move.w (sp)+,d0 +// move.l (sp)+,a0 +// rts +} +//--- +void TooManyVars() { + compprs("\nToo many variables"); + comperror(); +} +//--- +void forwardrefoverflow() { + compprs("\nThe forward reference table overflowed"); + comperror(); +} +//--- +void cantredefinesymbol() { + compprs("\nCan't redefine symbol"); + comperror(); +} +//--- +void badsymbol() { + compprs("\nBad symbol"); + comperror(); +} +//--- +void equalsexpected() { + compprs("\nEquals expected"); + comperror(); +} +//--- +void commaexpected() { + compprs("\nComma expected"); + comperror(); +} +//--- +void bracketsexpected() { + compprs("\nBracket expected"); + comperror(); +} +//---- +void MCTooFar() { // Introduced in 1.5 + compprs("\nLong jump out of range"); + comperror(); +} +//---- +void reljumpoutofrange() { + compprs("\nRelative jump out of range"); + comperror(); +} +//--- +void badindex() { + compprs("\nBad table index"); + comperror(); +} +//--- +void badtype() { + compprs("\nBad type"); + comperror(); +} +//--- +void badoperator() { + compprs("\nBad operator"); + comperror(); +} +//--- +void poundsignnotallowed() { + compprs("\nPound sign is not allowed in prs"); + comperror(); +} +//--- +void missingquote() { + compprs("\nMissing quote"); + comperror(); +} +//--- +void badarg() { + compprs("\nBad argument"); + comperror(); +} +//--- +void badinstruction() { + compprs("\nInstruction not recognized"); + comperror(); +} +//--- +void wronglabeltype() { + compprs("\nSymbol redefined as different type"); + comperror(); +} +//--- +void compnotimp() { + compprs("\nSomething not implemented"); + comperror(); +} +//--- +void syntaxerror() { + compprs("\nSyntax error"); + comperror(); +} +//--- +void PlusOrMinusExpected() { + compprs("\nPlus or minus expected"); + comperror(); +} +//--- +void AlreadyInState() { + compprs("\nAlready in specified code state"); + comperror(); +} +//--- +void NotAllowedInAcode() { + compprs("\nInstruction not allowed in interpreted acode"); + comperror(); +} +//--- +void NotAllowedInMC() { + compprs("\nInstruction not allowed in machine code"); + comperror(); +} +//--- +void EvenError() { + compprs("\nMC must be even-aligned"); + comperror(); +} +//--- +void CantDo16() { + compprs("\nCan't do 16 bit tables in interpreted mode"); + comperror(); +} +//--- +void WrongCodeState() { + compprs("\nCan't jump into area of different code state"); + comperror(); +} +//--- +void ForwardWrongCodeState(struct _symbol *sym, struct _forwardentry *entry) { + compprs("\nForward reference to '"); + absprintsymbol(sym); + compprs("' changes code state at line "); + FROREnd(entry); +} +//--- +void usage(char *progname) { + printf("Usage: %s [options]\n\n", progname); + printf("Options:\n"); + printf("--help: print this usage message\n"); + printf("--bugcomp: enable bugwards compatibility (e.g. for conditional compilation)\n"); + printf("--oddacode: do not align acode in gamedata.dat\n"); + printf("--testcomp: limit sizes to test overflow errors\n"); + printf("--i8086: generate MC code for i8086\n"); + printf("--splitdata: generate split acode and gamedata\n"); + printf("\n"); + exit(0); +} +int main(int argc, char **argv) { + int arg = 0; + while (++arg < argc) { + if (strcmp(argv[arg], "--help") == 0) usage(argv[0]); + if (strcmp(argv[arg], "--bugcomp") == 0) { bugcomp = true; continue; } + if (strcmp(argv[arg], "--oddacode") == 0) { oddacode = true; continue; }; + if (strcmp(argv[arg], "--testcomp") == 0) { testcomp = true; continue; }; + if (strcmp(argv[arg], "--i8086") == 0) { i8086 = true; Mc8086(); continue; }; + if (strcmp(argv[arg], "--splitdata") == 0) { splitdata = true; continue; }; + printf("Unrecognized argument: '%s'\n\n", argv[arg]); + usage(argv[0]); + } + compstart(); + compmenu(); + return 0; +} diff --git a/l9dev/comp.h b/l9dev/comp.h new file mode 100644 index 0000000..08f449e --- /dev/null +++ b/l9dev/comp.h @@ -0,0 +1,243 @@ +// 68000 Acode compiler (for Linux) +// +// M.J.Austin. Copyright (C) 1988 Level 9 Computing +// + +#include "common.h" + +// comparison operators +#define eqop 0 // = +#define neop 1 // <> +#define ltop 2 // < +#define gtop 3 // > +//--- +// default sizes of various regions +#define hashentries 256 +#define symbolentries 3500 +#define testsymbolentries 464 +#define sizesymbolarea symbolentries*symbolsize +#define testsizesymbolarea testsymbolentries*symbolsize +#define sizeacodearea 24500 +#define splitsizeacodearea 60000 // for split data (1.5) +#define testsizeacodearea 0x1e8 +#define forwardentries 4000 +#define testforwardentries 4 +#define sizegamedata 50000 +#define splitsizegamedata 80000 // for split data (1.5) +//--- +// see controlwords +#define numinstructions 35 // 34 + 1 due to ASR in 1.5 +#define instructionlen 16 +//--- +#define opcgoto 0 +#define opcgosub 1 +#define opcreturn 2 +#define opcprint 3 +#define opcmessagev 4 +#define opcmessagec 5 +#define opcmessagecsmall opcmessagec+smallmask +#define opcmessagecbig opcmessagec +#define opcfunction 6 +#define opcinput 7 +#define opcletvcbig 8 +#define opcletvcsmall opcletvcbig+smallmask +#define opcletvv 9 +#define opcaddvv 10 +#define opcsubvv 11 +#define opcchangecode 12 // change code generation state +#define opccall 14 +#define opcexit 15 +#define opcscreen 20 +#define opcclear 21 +#define opcpicture 22 +#define opcgetnext 23 +#define opcprintinput 28 +// +// function codes +#define fncacodedriver 1 +#define fncrandom 2 +#define fncsave 3 +#define fncrestore 4 +#define fncclear 5 +#define fncstack 6 +#define fncbreakpt 7 +#define fncprs 250 +//--- +#define numcontrolwords 4 +#define tsize 16 +//--- +// function declarations needed for forward references in comp.c +#define compprs prs +void UNIMP(); +void NotAllowedInAcode(); +void COMPADD(); +void NotAllowedInAcode(); +void COMPBREAKPT(); +void compcend(); +void compcif(); +void COMPCLEAR(); +void COMPCLS(); +void CompCode(); +void COMPDATA(); +void compdebuggingon(); +void COMPDRIVEROPCODE(); +void COMPEXIT(); +void COMPGETNEXT(); +void compgosub(); +void compgoto(); +void compif(); +void COMPINPUT(); +void COMPJUMP(); +void COMPMESSAGE(); +void COMPPICTURE(); +void COMPPRINT(); +void COMPPRINTINPUT(); +void COMPACODEPRS(); +void COMPRANDOM(); +void COMPRESTORE(); +void COMPRETURN(); +void COMPSAVE(); +void COMPSCREEN(); +void COMPSTACK(); +void COMPSUB(); +void compdriver(int, void *); +bool dojumptable(char); +void ToggleRS232Printer(); +void SetRS232(); +void finishwithoutacode(); +void finishgamedatainmemory(); +void copyacode(); +void savegamedata(); +void rungame(); +void toggledebugginginfo(); +void toggleforcedlongjumps(); +void togglereport(int); +void nowoff(); +void finishacode(); +void saveacode (); +bool compilefile(); +bool batchcompile(); +void abscompilefile(); +void endofcompfile(); +int checkforcontrolword(); +int constantdefinitions(); +int vardefinitions(); +int tabledefinitions(); +int mainprogram(); +int getnumberconstant(); +void thenjump(); +int evaloperator(); +bool jumpstuff(); +int getlabel(struct _symbol **); +void codew(uint16_t); +void code(uint8_t); +int compgetvar(); +void checkunusedsymbols(); +void printsymboltable(); +void printsymbol(struct _symbol *); +void absprintsymbol(struct _symbol *); +struct _symbol *addsymbol(char, int); +bool findsymbol(struct _symbol **); +int hashcalc(); +void displayline(); +int tablecompare(char table[][tsize], int); +int stringcompare(char *); +void compssskiptoeol(); +void compskiptoeol(); +int compsearch(); +int compsupersearch(); +void forwardoutofrange(struct _symbol *, struct _forwardentry *); +void FROREnd(struct _forwardentry *); +void varexpected(); +void acodeoverflow(); +void symboltableoverflow(); +void symboltoolong(); +void varnotdefined(); +void compilerbug(); +void comperror(); +void comperror1(); +void compprintfilename(); +void TooManyVars(); +void forwardrefoverflow(); +void cantredefinesymbol(); +void badsymbol(); +void equalsexpected(); +void commaexpected(); +void bracketsexpected(); +void reljumpoutofrange(); +void badindex(); +void badtype(); +void badoperator(); +void poundsignnotallowed(); +void missingquote(); +void badarg(); +void badinstruction(); +void wronglabeltype(); +void compnotimp(); +void syntaxerror(); +void PlusOrMinusExpected(); +void AlreadyInState(); +void NotAllowedInAcode(); +void NotAllowedInMC(); +void EvenError(); +void CantDo16(); +void WrongCodeState(); +void ForwardWrongCodeState(struct _symbol *, struct _forwardentry *); +//--- +// defined in finish.c +extern char *ptr; +extern struct _fcb savecompletedriverblock; +extern char *startcomplete; +extern char *finishedptr; +extern void *startsources; +extern void processexits(); +extern void processtables(); +extern void savedirectory(); +extern void selectdirectory(); +extern void processsquash(); +extern void climb(); +extern void processacodeptr(); +extern void finishchecksum(); +extern void descend(); +//--- +// defined in code.c +extern void Mc8086(); +extern void MCPop(); +extern void MCPush(); +extern void MCToAcode(); +extern void MCReturn(); +extern void MCAdd(); +extern void MCAnd(); +extern void MCASR(); +extern void MCOr(); +extern void MCSub(); +extern void MCXor(); +extern void MCPrint(); +extern void MCMessage(); +extern void MCInput(); +extern void MCExit(); +extern void MCScreen(); +extern void MCPicture(); +extern void MCGetNext(); +extern void MCPrintInput(); +extern void MCDriverOpcode(); +extern void MCRandom(); +extern void MCSave(); +extern void MCRestore(); +extern void MCClear(); +extern void MCStack(); +extern void MCCLS(); +extern void MCJump(); +extern void MCAcodePrs(); +extern void MCBreakPt(); +extern void MCData(); +extern void MCgosub(); +extern void MCgoto(); +extern void MCIF(); +extern void MCLetVC(int, int); +extern void MCLetVV(int, int); +extern void MCAttVar(int, int); +extern void MCAttConst(int, int); +extern void MCAft(int, int); +extern void MCrfr(struct _symbol *, struct _forwardentry *); +//--- diff --git a/l9dev/compile.bat b/l9dev/compile.bat new file mode 100644 index 0000000..23aa5fd --- /dev/null +++ b/l9dev/compile.bat @@ -0,0 +1,3 @@ +6 +1test.txt +2340 diff --git a/l9dev/driver.c b/l9dev/driver.c new file mode 100644 index 0000000..29f1038 --- /dev/null +++ b/l9dev/driver.c @@ -0,0 +1,342 @@ +// Atari ST driver (minimal parts adapted for Linux) +// Copyright (C) 1986-1988 Level 9 Computing +// M.J.Austin 20/7/86 +// first presentable Linux version 21/12/25 + +// note - if 'graphics' is defined elsewhere (as anything), +// the appropriate code will be defined in here. +// To make this driver public domain, simply +// remove all the code assembled within the 'ifd' instruction + +// Some programs need to know which machine they are running +// on (e.g. to allow for different assemblers) +// this is catered for by the following constants +// THIS FACILITY SHOULD BE USED AS LITTLE AS POSSIBLE + +#include // for va_ macros + +#include "driver.h" + +char driverbuffer[40]; + +//////////////////////////////////////////// +// the Program Itself // +//////////////////////////////////////////// + +//--- +int OutputDevice = 2; // 2 = CON: 1 = AUX: +FILE *logfile = NULL; +void openlogfile(char *filename) { + logfile = fopen(filename, "a"); +} +void closelogfile() { + if (logfile) fclose(logfile); + logfile = NULL; +} +void prs(char const *fmt, ...) { + va_list ap; + va_start(ap, fmt); + vprintf(fmt, ap); + va_end(ap); + if (OutputDevice == 1 && logfile) { + va_start(ap, fmt); + vfprintf(logfile, fmt, ap); + va_end(ap); + } +} +char waitkey() { + while (driver(osrdchdcode, driverbuffer), !*(char *)driverbuffer); + return *(char *)driverbuffer; +} +//--- + +void driver(int code, void *buffer) { +// Standard entry point for all external routines + switch (code) { + case initdcode: + init(); break; + case checksumdcode: + calcchecksum(buffer); break; + case oswrchdcode: + driveroswrch(buffer); break; + case osrdchdcode: + driverosrdch(buffer); break; + case savedcode: + driversavefile(buffer); break; + case loaddcode: + driverloadfile(buffer); break; + case settextdcode: + settext(); break; + + case taskinitdcode: + resetginttask(); break; + case inputlinedcode: + driverinputline(buffer); break; + case returntoosdcode: + closedown(); break; + case randomnumberdcode: + randomnumber(buffer); break; + } +} + +//--- +int getclock() { + // return real time clock in list9(hi4,hi3,lo2,lo) + // approx 1/50 second per unit +// move.l realtimeclock,d0 +// move.l d0,(a6) + return 0; +} +//--- +void randomnumber(void *buffer) { + // return a random word + *(uint16_t *)buffer = (uint16_t)rand(); +} +//--- +void closedown() { + // exit gracefully + prs("\nDo you really want to leave the game? "); + char c; + do { + c = toupper(osrdch()); + } while (c != 'Y' && c != 'N'); + if (c == 'Y') { +// ifd graphics + killmultitasking(); + driver(settextdcode, NULL); +// endc // if graphics + returntogem(); + } +} +//--- +// ifd graphics +void killmultitasking() { +} +int getscreenaddress() { +// return address of screen start in a0.l and d0.l +// call_ebios _physbase +// addq.l 2,sp +// move.l d0,a0 + return 0; +} +void resetginttask() { +// lea gintstacktop(pc),a0 + +// lea gintstart(pc),a1 +// move.l a1,-(a0) +// move.w sr,-(a0) +// lea irqswaptaskend(pc),a1 +// move.l a1,-(a0) // return address from ist1 + +// movem.l d0-d7/a0-a6,-(a0) // dummy stack values +// lea taskstackptr,a1 +// move.l a0,(a1) +// rts +} +void init1() { + // cursorxpos = 0; + // cursorypos = 24; // bottom left is 0,24 here + + // cyclicwriteptr = cyclicib; + // cyclicbufferstart = cyclicib; + // cyclicbufferend = cyclicibtop; + // cycliccharsused = 0; +} +//--- +bool init2() { + // screenpointer = getscreenaddress(); + // now before doing anything, clear out the screen + // system("clear"); // not really necessary + // scrolledlines = 0; + // and what screen resolution are we in ? +// call_ebios _getrez * move.w #4,-(sp) +// addq.l #2,sp + // d0.b = 0 - low resolution, 1 = medium resolution, 2 = high res + // screenresolution = 1; + // if (screenresolution == 2) { + // screenheight = absscreenheight; + // } else { + // screenresolution = 0; // always low res for graphics nowadays + // } + // return screenresolution == 2; // hi-res ? + return false; +} +//--- +void init() { + // .initialise + // first, some general purpose initialisation --- + + // init1(); +// ifd graphics + // initialisetasks(); + // seterrorvectors(); // address error and bus error etc. +// endc // graphics + + // bool ishires = init2(); +// ifd graphics + // if (!ishires) initsplitscreen(); // no, so set up med-low res split screen +// endc + + // screenheight = absscreenheight * 2; // hi-res height +} +void calcchecksum(struct _fcb *area) { + // calculate checksum of area between area->start and area->end + int length = area->end - area->start + 1; + uint8_t checksum = 0; + uint8_t *checkptr = (uint8_t *)area->start; + while (length-- > 0) checksum += *checkptr++; + *(uint8_t *)area = checksum; +} + +//--- +void getfilename(struct _fcb *fcb) { + char *f = fcb->filename; + if (!*f) { + prs("\nFilename ? "); + scanf("%s", f); + } +} + +void driverloadfile(struct _fcb *fcb) { + getfilename(fcb); + FILE *fp = fopen(fcb->filename, "r"); + if (fp) { + int r = fread(fcb->start, 1, 0x30000, fp); + fclose(fp); + fcb->end = fcb->start + r; + *(char *)fcb = 0; // signify load ok + } else { + prs("Can't find file on disk.\n"); + *(char *)fcb = 1; // signify load error + } +} + +void driversavefile(struct _fcb *fcb) { + getfilename(fcb); + FILE *fp = fopen(fcb->filename, "w"); + if (fp) { + int size = fcb->end - fcb->start; + int written = fwrite(fcb->start, 1, fcb->end - fcb->start, fp); + fclose(fp); + if (written == size) { + *(char *)fcb = 0; // signify save ok + } else fp = NULL; + } + if (!fp) { + prs("Save error.\n"); + *(char *)fcb = 1; // signify save error + } +} +void hexlonga0(uint32_t n) { + prs("%08X", n); +} +void hexworda0(uint16_t n) { + prs("%04X", n); +} +void hexbyted0(uint8_t n) { + prs("%02X", n & 0xff); +} +void printhexdigit(uint8_t n) { + prs("%01X", n & 0xf); +} +void printdecimald0(int n) { + // print n as a decimal number, + // suppressing leading zeros + prs("%d", n); +} +int readdecimal(char **s) { + // given a decimal number as an ascii string at *s, return + // its value + // and *s = character after the number + return strtol(*s, s, 10); +} +//--- +bool isd0alphanumeric(char c) { + c = toupper(c); + return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z')); +} +//--- +#ifdef __linux__ +#include +#include +struct termios saved_attributes; +#endif +void reset_input_mode() { +#ifdef __linux__ + if (!isatty(STDIN_FILENO)) return; + tcsetattr(STDIN_FILENO, TCSANOW, &saved_attributes); +#endif +} +void set_input_mode() { +#ifdef __linux__ + struct termios tattr; + if (!isatty(STDIN_FILENO)) return; + + tcgetattr(STDIN_FILENO, &saved_attributes); + atexit(reset_input_mode); + + tcgetattr(STDIN_FILENO, &tattr); + tattr.c_lflag &= ~(ICANON|ECHO); + tattr.c_cc[VMIN] = 1; + tattr.c_cc[VTIME] = 0; + tcsetattr(STDIN_FILENO, TCSAFLUSH, &tattr); +#endif +} +int osrdch() { + char c; + set_input_mode(); + c = getchar(); + reset_input_mode(); + if (c == EOF) c = 0; + return c; +} +void driveroswrch(char *c) { + oswrch(*c); +} +void oswrch(char c) { + prs("%c", c); +} +void driverinputline(char *buffer) { + scanf("%s\n", buffer); +} +void driverosrdch(char *c) { + *c = osrdch(); +} +void returntogem() { +// ifd graphics + killmultitasking(); + driver(settextdcode, NULL); +// endc // if graphics + prs("\n"); +// call_bdos p_term + exit(0); + +//---------- + +// ifnd graphics // only assembled if graphics has not been defined +// settext +// setgraphics +// driverclg +// driverchgcol +// line +// fill +// gintstart +// killmultitasking +// rts +// endc +} + +//--- + +// ifd graphics // only assembled if graphics has been defined + + +void settext() { + // clear top half of screen +// move.l screenpointer(pc),a0 +// move.w #$3bfe,d0 * length to clear +// ... + + // and kill the split screen, restore full screen scrolling etc. + // drivergraphicsmode = 0; +} diff --git a/l9dev/driver.h b/l9dev/driver.h new file mode 100644 index 0000000..9d00815 --- /dev/null +++ b/l9dev/driver.h @@ -0,0 +1,22 @@ +// Atari ST driver (minimal parts adapted for Linux) +// Copyright (C) 1986-1988 Level 9 Computing + +#include "common.h" + +// function declarations needed for forward references in driver.c +void randomnumber(); +void closedown(); +void killmultitasking(); +void resetginttask(); +void init1(); +bool init2(); +void init(); +void calcchecksum(struct _fcb *area); +void driverloadfile(struct _fcb *fcb); +void driversavefile(struct _fcb *fcb); +int osrdch(); +void driveroswrch(char *c); +void oswrch(char c); +void driverinputline(char *buffer); +void driverosrdch(char *c); +void settext(); diff --git a/l9dev/exit.txt b/l9dev/exit.txt new file mode 100644 index 0000000..492ebed --- /dev/null +++ b/l9dev/exit.txt @@ -0,0 +1,550 @@ +; Lancelot source, copyright (C) 1987 Level 9 Computing. +; +; EXIT.TXT, data for the game exits. The numeric values for the +; directions is as follows: +; +; 1 up=9 in=11 cross=13 climb=14 jump=15 +; 8 2 down=10 +; ! +; 7 --+-- 3 +; ! +; 6 5 <- note that 4&5 are reversed. You cannot change this. +; 4 +; +; Special notes for interface between static and synthesised rooms.. +; +; There must be an in/out connection between the static and the +; object number of the scenery object to which it connects. +; +; E.g If you have a location object "[480:^N castle]", then an exit +; from room 15: 1001 12 180 +; will set up an in/out connection to the room where object no. 180 +; is situated. This allows the exit table to be changed easily. + +;********* remember to take out the dummy end exits +;&******** when I've finished using COMP option 5 to run the game! + + +; +;Room number 1 +; room modifiers for forest in part1 +; +; CHANGE THESE IF YOU CHANGE THE SIZE OF THE GRID. +0000 1 4 ; North. ; = XMAX +0000 2 5 ; NE ; = N+1 +0000 3 1 ; E ; = always 1 +0000 4 252 ; SOUTH ; = 256-XMAX +0000 5 253 ; SE ; = SOUTH+1 +0000 6 251 ; SW ; = SOUTH-1 +0000 7 255 ; WEST ; = always 255 +1000 8 3 ; NW ; = North-1 +;Room number 2 +0000 1 2 ; North. ; = XMAX +0000 2 3 ; NE ; = N+1 +0000 3 1 ; E ; = always 1 +0000 4 254 ; SOUTH ; = 256-XMAX +0000 5 255 ; SE ; = SOUTH+1 +0000 6 252 ; SW ; = SOUTH-1 +0000 7 255 ; WEST ; = always 255 +1000 8 1 ; NW ; = North-1 +; Room number 3 +1000 0 0 ; no exit - must use lift. 1001 9 39 +; Room number 4 +1001 4 6 +; Room number 5 +0011 12 7 +1000 5 7 ; visible exit to se +; Room number 6 +1001 4 7 +; Room number 7 +0010 8 5 ; invisible exit to secret passage +0101 12 50 +1011 6 50 +; Room number 8 +0011 12 9 +1101 4 9 +; Room number 9 +0001 12 119 +1011 4 119 +; Room number 10 +0101 12 9 +1011 7 9 +; Room number 11 +1000 0 0 +; Room number 12 +0101 12 61 +1011 4 61 +; Room number 13 +0001 10 64 +1011 4 64 +; Room number 14 +0001 12 69 +0011 10 69 +1011 4 69 +; Room number 15 +1101 7 14 +; Room number 16 +0001 12 70 +1011 1 70 +; Room number 17 +1001 1 16 +; Room number 18 +0001 12 71 +1011 1 71 +; Room number 19 +0001 10 18 +1011 1 18 +; Room number 20 +1101 1 19 +; Room number 21 +1001 10 106 +; Room number 22 +1101 7 19 +; Room number 23 +0001 12 71 +1011 7 71 +; Room number 24 +0001 12 101 +1011 4 101 +; Room number 25 +0101 12 47 +1011 4 47 +; Room number 26 +0011 12 49 +1001 1 49 +; Room number 27 +0011 12 26 +1001 1 26 +; Room number 28 +0011 12 27 +1001 1 27 +; Room number 29 +1001 10 21 +; Room number 30 +1001 10 32 +; Room number 31 +1001 7 30 +; Room number 32 +1001 3 33 +; Room number 33 +1001 12 111 +; Room number 34 +1001 9 32 +; Room number 35 +1001 7 34 +; Room number 36 +0010 3 112 +0000 12 112 +1001 9 35 +; Room number 37 +1101 7 35 +; Room number 38 +1101 3 39 +; Room number 39 +1001 4 4 +; Room number 40 +1000 0 0 +; Room number 41 +1000 0 0 +; Room number 42 +1000 0 0 +; Room number 43 +1000 0 0 +; Room number 44 +1000 0 0 +; Room number 45 +1001 1 110 +; Room number 46 +1001 7 45 +; Room number 47 +1001 7 46 +; Room number 48 +1001 1 47 +; Room number 49 +1001 1 48 +; Room number 50 +1001 4 51 +; Room number 51 +1001 4 53 +; Room number 52 +1001 3 53 +; Room number 53 +1001 3 55 +; Room number 54 +0001 12 52 +1011 1 52 +; Room number 55 +1001 3 56 +; Room number 56 +1001 3 57 +; Room number 57 +1001 3 68 +; Room number 58 +0001 1 118 +1001 4 68 +; Room number 59 +0001 4 185 ; to camelot! 59 +1001 1 68 +; Room number 60 +1001 3 180 +; Room number 61 +1001 5 62 +; Room number 62 +0001 4 66 +1011 10 66 +; Room number 63 +0001 6 62 +1011 7 62 +; Room number 64 +1001 6 63 +; Room number 65 +1000 0 0 +; Room number 66 +0001 10 67 +1011 3 67 +; Room number 67 +1001 3 97 +; Room number 68 +1001 3 60 +; Room number 69 +0001 10 181 +1011 7 181 +; Room number 70 +1001 7 182 +; Room number 71 +1001 7 70 +; Room number 72 +0001 5 78 +0001 4 77 +1001 3 73 +; Room number 73 +0001 4 78 +1001 3 74 +; Room number 74 +0001 4 79 +1001 3 75 +; Room number 75 +0001 4 80 +1001 3 76 +; Room number 76 +1001 4 81 +; Room number 77 +0001 4 82 +1001 3 78 +; Room number 78 +0001 5 84 +0001 4 83 +1001 3 79 +; Room number 79 +0001 4 84 +1001 3 80 +; Room number 80 +0001 4 85 +1001 3 81 +; Room number 81 +1001 4 85 +; Room number 82 +0001 4 87 +1001 3 83 +; Room number 83 +0001 5 89 +1001 4 88 +; Room number 84 +1001 7 83 +; Room number 85 +1001 4 90 +; Room number 86 +0001 12 91 +1011 4 91 +; Room number 87 +0001 4 92 +1001 3 88 +; Room number 88 +0001 4 93 +0001 10 93 +0001 5 94 +1001 3 89 +; Room number 89 +1001 3 90 +; Room number 90 +1001 3 91 +; Room number 91 +1001 4 96 +; Room number 92 +1001 3 93 +; Room number 93 +0001 4 97 +1001 3 94 +; Room number 94 +1001 3 95 +; Room number 95 +1001 1 90 +; Room number 96 +1001 7 95 +; Room number 97 +1001 3 100 +; Room number 98 +1001 4 99 +; Room number 99 +1001 4 100 +; Room number 100 +1001 3 52 +; Room number 101 +1001 4 102 +; Room number 102 +1001 4 103 +; Room number 103 +1001 4 104 +; Room number 104 +1001 4 105 +; Room number 105 +1001 4 106 +; Room number 106 +1001 4 107 +; Room number 107 +1001 4 50 +; Room number 108 +1001 4 109 +; Room number 109 +1001 7 105 +; Room number 110 +1001 7 108 +; Room number 111 +1001 11 33 +; Room number 112 +1001 1 111 +; Room number 113 +1001 10 114 +; Room number 114 +1001 10 115 +; Room number 115 +1001 7 111 +; Room number 116 +1001 1 115 +; Room number 117 +1001 1 116 +; Room number 118 +1001 1 117 +; Room number 119 +1001 4 56 +; Room number 120 +1000 0 0 +; Room number 121 +1000 0 0 +; Room number 122 +1000 0 0 +; Room number 123 +1000 0 0 +; Room number 124 +1000 0 0 +; Room number 125 +1001 10 30 +; Room number 126 +1001 1 97 +; Room number 127 +0001 12 98 +1011 4 98 +; Room number 128 +1001 3 19 +; Room number 129 +1001 7 181 +; Room number 130 +0001 12 55 +1011 1 55 +; Room number 131 +1011 12 106 +; 132 +1000 0 0 +; 133 +1001 7 151 +; 134 +1001 12 173 +; 135 +1001 10 159 +; 136 +1001 9 161 +;137 +1000 0 0 +; 138 +1000 0 0 +; 139 +1000 0 0 +; 140 +1001 4 141 +; 141 +0011 4 143 +1001 10 143 +; 142 +1001 7 141 +; 143 +0001 12 169 +0011 10 169 +1011 4 169 +; 144 +0001 12 184 +1011 4 184 ; to mews object +; 145 +0001 12 171 +1011 4 171 +; 146 +0001 12 170 +1011 4 170 +; 147 +0011 12 172 +1101 4 172 +; 1001 1 151 +; 148 +1101 3 150 +; 149 +1101 7 150 +; 150 +1000 10 151 +; 151 +1001 4 147 +;0101 12 172 +;1011 4 172 +; 152 +1001 3 183 ; to west way object +; 153 +1001 1 172 +; 154 +1001 7 153 +; 155 +1101 1 187 ; to south way +; 156 +0001 10 178 +0011 14 178 +1011 12 178 +; 157 +1001 1 156 +; 158 +1001 3 159 +; 159 +1001 1 157 +; 160 +1011 12 161 +; 161 +0001 12 179 +0011 1 179 +1001 9 159 +; 162 +1000 0 0 +; 163 +1000 0 0 +; 164 +1001 3 165 +; 165 +1001 3 166 +; 166 +1001 3 167 +; 167 +1001 3 168 +; 168 +1001 3 152 +; 169 +1001 3 170 +; 170 +1001 3 171 +; 171 +1001 3 184 ; road +; 172 +1001 7 186 ; market square +; 173 +1001 7 172 +; 174 +1001 1 155 +; 175 +1001 1 174 +; 176 +1001 1 175 +; 177 +1001 1 176 +; 178 +1001 3 179 +; 179 +1001 1 177 +; 180 +1000 0 0 +; 181 +1000 0 0 +; 182 +1000 0 0 +; 183 +1000 0 0 +; 184 +1000 0 0 +; 185 +1000 0 0 +; 186 +1000 0 0 +; 187 +1000 0 0 +; 188 +1000 0 0 +; 189 +1000 0 0 +; 190 +1000 0 0 +; 191 +1000 0 0 +; 192 +1000 0 0 +; 193 +1000 0 0 +; 194 +1000 0 0 +; 195 +1000 0 0 +; 196 +1000 0 0 +; 197 +1000 0 0 +; 198 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 + +;207 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 + +;217 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 + +;227 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 +1000 0 0 + + +0000 0 0 diff --git a/l9dev/finish.c b/l9dev/finish.c new file mode 100644 index 0000000..06250df --- /dev/null +++ b/l9dev/finish.c @@ -0,0 +1,492 @@ +// finish program +// +// M.J.Austin started 5/8/86 +// last change: 3/11/86 +// +// started Linux version on Monday 8/12/25 +// first presentable version: 21/12/25 +// +// Copyright (C) 1986-1988 Level 9 Computing + +#include "finish.h" + +// for menu program to build up a list +// of possible games, from which the user chooses one +// this data is overwritten when the game is loaded + +char *ptr = NULL; // pointer to current pos in file +char *finishedptr = NULL; +void *endfinish = NULL; +char filenamelist[1000]; +char directorypathname[100]; // will contain the complete path name for use by climb +char subdirname[100]; +char directoryname[] = "*.l9"; +//--- +char finishdriverbuffer[40]; +struct _fcb loadexitsdriverblock = { + NULL, + NULL, + "exit.txt" +}; +struct _fcb loadtablesdriverblock = { + NULL, + NULL, + "table.dat" +}; +struct _fcb loadsquashdriverblock = { + NULL, + NULL, + "squash.dat" +}; +struct _fcb loadacodedriverblock = { + NULL, + NULL, + "acode.acd" +}; +struct _fcb savecompletedriverblock = { + NULL, + NULL, + "gamedata.dat" +}; +//--- +// and now some workspace +void *startsources = NULL; // where the exits, tables etc. are loaded +char *startcomplete = NULL; // start of complete.dat block in memory +int linenumber = 0; +int squashlength = 0; +// +char terminator = 0; +//--- +void finishstart() { + prs("%s", finish_version); + + // this program always produces a complete.dat + // file from the data on the disk + + // once-only init + endfinish = malloc(512 * 1024); + finishedptr = endfinish; + startsources = finishedptr; + finishedptr += 0x30008; // allow space for files to be loaded + startcomplete = finishedptr; // pointer to start of complete.dat block in memory + finishedptr += sizeofpointers; + + processexits(); + + processtables(); + + if (!splitdata) savedirectory(); // with split data no subdirs are used (1.5) + if (!splitdata) selectdirectory(); // subdirectory for computer-specific text + processsquash(); + if (!splitdata) climb(); // and back to root for acode + + processacode(); + + finishchecksum(); + + if (!splitdata) descend(); // with split data no subdirs are used (1.5) + prs("Saving gamedata.dat\n"); + + savecompletedriverblock.start = startcomplete; // start address to save + savecompletedriverblock.end = finishedptr; // end address to save + driver(savedcode, &savecompletedriverblock); + + if (!splitdata) climb(); // leave us back where we started + + returntogem(); +} +//--- +void softinit() { + // init for each stage of development + linenumber = 1; +} +//--- +void finisheven() { + // make ptr even and zero out skip byte + if ((ptr - startcomplete) & 1) *ptr++ = 0; +} +//--- +void processexits() { + softinit(); + prs("Loading exit.txt\n"); + + char c = eof; + int flags = 0; + int direction = 0; + int room = 0; + + char *exitptr = startcomplete + exitptroffset; + int offset = finishedptr - startcomplete; + *exitptr = offset & 0xff; // poke in rel. ptr to exits + *(exitptr + 1) = offset >> 8; + + loadexitsdriverblock.start = startsources; // start address + driver(loaddcode, &loadexitsdriverblock); + char *buf = (char *)loadexitsdriverblock.end; + if (!buf) buf = startsources; + buf[0] = eof; + buf[1] = lf; + buf[2] = eof; + + ptr = startsources; + while (c = *ptr++, c != cr && c != lf); + buf[1] = terminator = c; + ptr = startsources; // start of exit data + + do { + if (supersearch() == eof) { + // terminate exit table on eof (without explicit end of data marker) + *finishedptr++ = 0; + *finishedptr++ = 0; + break; + } + + // first get four binary digits + flags = getbin() << 3 | getbin() << 2 | getbin() << 1 | getbin(); + + // now get direction + direction = getdec(); + *finishedptr++ = direction | flags << 4; + + // finally get destination room + room = getdec(); + *finishedptr++ = room; + } while (flags | direction | room); // 0000 0 0 ? (=end of data) +} +//--- +int getdec() { + // return a decimal number + char c = search(); + if (c < '0' || c > '9') errorindata(); + return readdecimal(&ptr); +} +int getbin() { + // return a binary digit + char c = search(); + if (c != '0' && c != '1') errorindata(); + ptr++; + return c - '0'; +} +//--- +void processtables() { + prs("Loading table.dat\n"); + ptr = startsources; + loadtablesdriverblock.start = ptr; + driver(loaddcode, &loadtablesdriverblock); + if (*(char *)&loadtablesdriverblock) return; + + // set up pointers at start of complete.dat file + // at the start of the table.dat file are pointers (longs) + // to the tables. There are numtable of these + // and then a pointer to the end of the table file + // copy the table pointers + ptr += 0x1c; // skip reloc information + int ntables = 9 + 1; // number of tables + int tableptr = 0; + + // get start of tables relative to complete.dat + int starttables = finishedptr - startcomplete; + // ptr is start of table data (assembled by any assembler) + char *destptr = startcomplete + list1ptroffset; + destptr[-1] = 0; // zero out unused field + destptr[-2] = 0; // aka list0 + + do { + ptr += 2; // skip high word + tableptr = *(uint8_t *)ptr++ << 8; + tableptr |= *(uint8_t *)ptr++; + // tableptr is a table pointer + // is it a workspace reference ? (0x8000-0x9000) + if (tableptr < 0x8000 || tableptr >= 0x9000) { + // so convert it to make it point to the table data + // relative to the start of complete.dat + tableptr += starttables - (9 * 4 + 4); // 9 table pointers = 40 + } // between 8000 and 9000, so don't adjust + *destptr++ = tableptr & 0xff; + *destptr++ = tableptr >> 8; + } while (--ntables > 0); // number of tables to process + + // and copy data in to finished data area + int len = tableptr - starttables; + memcpy(startcomplete + starttables, ptr, len); + ptr += len; + finishedptr = startcomplete + tableptr; +} +//--- +void processsquash() { + // load in squash.dat at finishedptr + // and adjust all pointers + prs("Loading squash.dat\n"); + + // make finishedptr even and zero out skip byte + if ((finishedptr - startcomplete) & 1) *finishedptr++ = 0; + int offset = 0; + int val = 0; + + loadsquashdriverblock.start = finishedptr; + driver(loaddcode, &loadsquashdriverblock); + if (*(char *)&loadsquashdriverblock) return; + + ptr = finishedptr; + char *oldptr = ptr; + finishedptr = startcomplete; + + // offset to add to all squash pointers + offset = ptr - startcomplete; + val = z80load(); // length + squashlength = val; + z80write(val + offset); // startcomplete+0 + + val = z80load(); // message destriptor pointer + z80write(val + offset); + + val = z80load(); // length of descriptors + z80write(val); + + val = z80load(); // word dictionary pointer + z80write(val + offset); + + val = z80load(); // word dictionary length + z80write(val); + + val = z80load(); // word dictionary index table + int dict = val + offset; // preserve value + z80write(dict); + + val = z80load(); // number of segments + int segments = val; // preserve value + z80write(segments); + + val = z80load(); // common word dictionary + z80write(val + offset); + + z80load(); // version number - ignore + z80write(0); // zero out unused bytes explicitely + + z80load(); // not used - ignore + + // and adjust word dictionary pointers + // to make them relative to (startcomplete) + // offset is offset to add to pointer + // dict is offset of word dictionary pointer + // segments is number of segments + + // fist find end of index table + // clear high bits of dict + dict &= 0xffff; + + uint8_t *start = (uint8_t *)startcomplete + dict; + uint8_t *end = start + 4 * segments; + uint8_t *scan = start; + // start is start of table. end is end of table + // let scan be the offset used to scan the table + // offset is offset to add to pointers + while (scan < end) { + // calc address of index entry in val + val = scan[0] | scan[1] << 8; + val += offset; + scan[0] = val & 0xff; + scan[1] = val >> 8; + scan += 4; + } + ptr = oldptr + squashlength; + finishedptr = ptr; +} +//--- +int z80load() { + int val = 0; + val = *(uint8_t *)ptr++; + val |= *(uint8_t *)ptr++ << 8; + return val; +} +//--- +void z80write(int val) { + *finishedptr++ = val & 0xff; + *finishedptr++ = val >> 8; +} +//--- +void processacode() { + // load acode.acd at finishedptr + // and adjust all pointers + prs("Loading acode.acd\n"); + + ptr = finishedptr; + if (!oddacode) finisheven(); // make ptr even + + loadacodedriverblock.start = ptr; + driver(loaddcode, &loadacodedriverblock); + processacodeptr(); +} + +void processacodeptr() { + finishedptr = ptr; + // get length of acode + int acodelen = z80load(); + + // ptr = start of acode + // acodelen = length of acode + char *endcomplete = ptr + acodelen; // end of complete.dat file in memory + endcomplete++; // allow an extra byte for the checksum + finishedptr = endcomplete; + + int sizecomplete = endcomplete - startcomplete; // size of complete.dat file + sizecomplete--; // and another byte less for good measure + startcomplete[0] = sizecomplete & 0xff; + startcomplete[1] = sizecomplete >> 8; + + int acodeoffset = ptr - startcomplete; + startcomplete[40] = acodeoffset & 0xff; + startcomplete[41] = acodeoffset >> 8; + + // zero out unused bytes explicitly + startcomplete[42] = 0; + startcomplete[43] = 0; + // finishedptr is end of complete.dat file in memory +} +//--- +void finishchecksum() { + struct _fcb *fcb = (struct _fcb *)&finishdriverbuffer; + fcb->start = startcomplete; // start of block to checksum + fcb->end = finishedptr - 1; // disregard checksum byte at present + driver(checksumdcode, fcb); + + // address checksum done up to + // poke in checksum byte + *(uint8_t *)fcb->end = -*(uint8_t *)fcb; +} +//--- +void errorindata() { + prs("error in data at line "); + printdecimald0(linenumber); + prs(" \nPress a key to return to Gem\n"); + waitkey(); + returntogem(); +} +//--- +void ssskiptoeol() { + skiptoeol(); + supersearch(); // on new line as well! +} +void skiptoeol() { + if (*ptr == eof) return; + while (*ptr++ != terminator); + do { + linenumber++; + // skip control characters (including false eol) + uint8_t c = eof; + while (c = *ptr++, c < 32 && c != terminator && c != eof); + ptr--; + } while (*ptr++ == terminator); + ptr--; +} +int search() { + // search, skipping spaces + while (*ptr == ' ') ptr++; + return *ptr; +} +int supersearch() { + // search, skipping over comments if present + while (true) { + uint8_t c = search(); + if (c == eof) break; + if (c == '*' || c == ';' || c == terminator || c < 32) { + skiptoeol(); + } else break; + } + return *ptr; +} +//--- +// +// ++++++++++++++ Some ST specific code to scan +// for possible sub-directories +++++++++++++++++ +// look in current directory for interesting sub-directories - +// i.e. those which match with directoryname +void selectdirectory() { + if (splitdata) return; // with split data no subdirs are used (1.5) + int found = 0; // number of files found + int current = 0; + int selection = 0; + glob_t globbuf; + glob(directoryname, 0, NULL, &globbuf); + found = globbuf.gl_pathc; + while (current < found) { + prs(" "); + prs("%c .. %s\n", current + 'A', globbuf.gl_pathv[current]); + current++; + } + + if (!found) { + prs("No suitable files on disk\n"); + prs("Press a key to return to gem\n"); + waitkey(); + returntogem(); + return; + } else if (found == 1) { + prs("Only one sub-directory - proceeding with finish\n"); + } else { + prs("Enter the letter corresponding to your choice .. "); + char c; + do { + // now get a letter + driver(osrdchdcode, &finishdriverbuffer); + c = toupper(*finishdriverbuffer); + prs("%c\n", c); + selection = c - 'A'; + } while (selection < 0 || selection >= found); + } + strcpy(subdirname, globbuf.gl_pathv[selection]); + globfree(&globbuf); + chdir(subdirname); +} +//--- +void descend() { + // go back down to previously selected directory + if (splitdata) return; // with split data no subdirs are used (1.5) + chdir(subdirname); +} +//--- +void savedirectory() { + // save the current directory + // to be restored by climb + if (splitdata) return; // with split data no subdirs are used (1.5) + // getcwd(directorypathname, sizeof(directorypathname)); + strcpy(directorypathname, ".."); // should be ok on modern systems +} +//--- +void fileerror() { + prs("Can't get current directory name\n"); + prs("Press a key to return to gem\n"); + waitkey(); + returntogem(); +} +//--- +void climb() { + chdir(directorypathname); +} + +// For embedded compilation, define EMBEDFINISH +#ifndef EMBEDFINISH +bool oddacode = false; +bool splitdata = false; +void usage(char *progname) { + printf("Usage: %s [options]\n\n", progname); + printf("Options:\n"); + printf("--help: print this usage message\n"); + printf("--oddacode: do not align acode in gamedata.dat\n"); + printf("--splitdata: generate split acode and gamedata\n"); + printf("\n"); + exit(0); +} +int main(int argc, char **argv) { + int arg = 0; + while (++arg < argc) { + if (strcmp(argv[arg], "--help") == 0) usage(argv[0]); + if (strcmp(argv[arg], "--oddacode") == 0) { oddacode = true; continue; } + if (strcmp(argv[arg], "--splitdata") == 0) { splitdata = true; continue; }; + printf("Unrecognized argument: '%s'\n\n", argv[arg]); + usage(argv[0]); + } + finishstart(); + return 0; +} +#endif diff --git a/l9dev/finish.h b/l9dev/finish.h new file mode 100644 index 0000000..c2ca7ff --- /dev/null +++ b/l9dev/finish.h @@ -0,0 +1,49 @@ +// finish program (for Linux) +// +// Copyright (C) 1986-1988 Level 9 Computing + +#include "common.h" + +// constants +#define lengthpointeroffset 0 +#define mdptroffset 2 // message descriptor ptr +#define mdlengthoffset 4 +#define dictionaryptroffset 6 +#define dictionarylengthoffset 8 +#define indextableptroffset 10 +#define numbersegments 12 +#define numbercommonwordtable 14 +#define versionptroffset 16 +#define exitptroffset 18 +#define list1ptroffset 22 +#define list2ptroffset 24 +#define list9ptroffset 38 +#define acodeptroffset 40 +#define startofdataoffset 42 // first real data starts here + +// function declarations needed for forward references in finish.c +void finishstart(); +int getdec(); +int getbin(); +int z80load(); +void z80write(int val); +void processacode(); +void processacodeptr(); +void processexits(); +void processtables(); +void savedirectory(); +void selectdirectory(); +void processsquash(); +void climb(); +void processacodeptr(); +void finishchecksum(); +void descend(); +void errorindata(); +void ssskiptoeol(); +void skiptoeol(); +int search(); +int supersearch(); + +// defined in comp.c +extern bool oddacode; +extern bool splitdata; diff --git a/l9dev/l9asm2bin b/l9dev/l9asm2bin new file mode 100755 index 0000000..6d4da8c --- /dev/null +++ b/l9dev/l9asm2bin @@ -0,0 +1,37 @@ +#!/bin/bash + +usage() { + echo "Usage: $0 [options] " + echo + echo "Options:" + echo "--help: this usage message" + echo + exit 1 +} + +if ! type -P m68k-linux-gnu-as >/dev/null +then + echo "Please install binutils-m68k-linux-gnu ..." + echo "On Ubuntu Linux: sudo apt install binutils-m68k-linux-gnu" + echo "On Rocky Linux: sudo dnf install binutils-m68k-linux-gnu" + echo + usage +fi + +name="" +while [[ $# -gt 0 ]] +do + case $1 in + --help) usage ;; + --*) echo "Unrecognized option: $1"; usage ;; + *) name=$1 ;; + esac + shift +done +if [[ -z $name ]]; then usage; fi + +if [[ ! -f $name.s ]]; then echo "The file $name.s was not found."; exit 2; fi + +m68k-linux-gnu-as -M -o $name.o $name.s +m68k-linux-gnu-objcopy -O binary $name.o $name.bin +rm $name.o diff --git a/l9dev/l9bin2tos b/l9dev/l9bin2tos new file mode 100755 index 0000000..ab8f558 --- /dev/null +++ b/l9dev/l9bin2tos @@ -0,0 +1,45 @@ +#!/bin/bash + +usage() { + echo "Usage: $0 [options] " + echo + echo "Options:" + echo "--help: this usage message" + echo "--old: for strict binary compatibility with older games" + echo + exit 1 +} + +if ! type -P m68k-linux-gnu-as >/dev/null +then + echo "Please install binutils-m68k-linux-gnu ..." + echo "On Ubuntu Linux: sudo apt install binutils-m68k-linux-gnu" + echo "On Rocky Linux: sudo dnf install binutils-m68k-linux-gnu" + echo + usage +fi + +old="" +name="" +while [[ $# -gt 0 ]] +do + case $1 in + --help) usage ;; + --old) old=$1 ;; + --*) echo "Unrecognized option: $1"; usage ;; + *) name=$1 ;; + esac + shift +done +if [[ -z $name ]]; then usage; fi + +if [[ ! -f $name.bin ]]; then echo "The file $name.bin was not found."; exit 2; fi + +size=`stat -c "%s" $name.bin` +if [[ -n $old ]]; then rel='\xff\xff'; end='\x00'; pbt='\x00'; else rel='\x00\x00'; end='\x00\x00\x00\x00'; pbt='\x90'; fi +if ((size%2==1)); then pad=$pbt; ((size++)); else pad=''; fi +s0=`printf '\\\\x%02X' $(((size>>24)&0xff))` +s1=`printf '\\\\x%02X' $(((size>>16)&0xff))` +s2=`printf '\\\\x%02X' $(((size>>8)&0xff))` +s3=`printf '\\\\x%02X' $((size&0xff))` +(LANG=C echo -ne "\x60\x1A$s0$s1$s2$s3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00$rel"; cat $name.bin; echo -ne "$pad$end") > $name.prg diff --git a/l9dev/l9comp b/l9dev/l9comp new file mode 100755 index 0000000..469e70d Binary files /dev/null and b/l9dev/l9comp differ diff --git a/l9dev/l9finish b/l9dev/l9finish new file mode 100755 index 0000000..f690ee9 Binary files /dev/null and b/l9dev/l9finish differ diff --git a/l9dev/l9gamegen b/l9dev/l9gamegen new file mode 100755 index 0000000..008aad0 --- /dev/null +++ b/l9dev/l9gamegen @@ -0,0 +1,54 @@ +#!/bin/bash + +usage() { + echo "Usage: $0 [options]" + echo + echo "Options:" + echo "--help: this usage message" + echo "--old: for strict binary compatibility with older games" + echo "--no-table: do not assemble table.txt into table.dat" + echo "--no-message: do not squash message.txt into squash.dat" + echo "--bugcomp: enable bugwards compatibility (e.g. for conditional compilation)" + echo "--oddacode: do not align acode in gamedata.dat" + echo "--i8086: generate MC code for PC" + echo "--splitdata: generate split acode and gamedata" + echo + exit 1 +} + +if ! type -P m68k-linux-gnu-as >/dev/null +then + echo "Please install binutils-m68k-linux-gnu ..." + echo "On Ubuntu Linux: sudo apt install binutils-m68k-linux-gnu" + echo "On Rocky Linux: sudo dnf install binutils-m68k-linux-gnu" + echo + usage +fi + +old="" +bugcomp="" +oddacode="" +no_table="" +no_message="" +i8086="" +splitdata="" +while [[ $# -gt 0 ]] +do + case $1 in + --help) usage ;; + --old) old=$1 ;; + --bugcomp) bugcomp=$1 ;; + --oddacode) oddacode=$1 ;; + --no-table) no_table=$1 ;; + --no-message) no_message=$1 ;; + --i8086) i8086=$1 ;; + --splitdata) splitdata=$1 ;; + --*) echo "Unrecognized option: $1"; usage ;; + esac + shift +done + +path=`dirname $0` +if [[ -z $no_table ]]; then $path/l9tablegen $old; fi +if [[ -z $no_message ]]; then $path/l9squash; fi +$path/l9comp $bugcomp $oddacode $i8086 $splitdata diff --git a/l9dev/l9squash b/l9dev/l9squash new file mode 100755 index 0000000..e9261cb Binary files /dev/null and b/l9dev/l9squash differ diff --git a/l9dev/l9tablegen b/l9dev/l9tablegen new file mode 100755 index 0000000..672833a --- /dev/null +++ b/l9dev/l9tablegen @@ -0,0 +1,63 @@ +#!/bin/bash + +usage() { + echo "Usage: $0 [options]" + echo + echo "Options:" + echo "--help: this usage message" + echo "--bin: use a binary table.bin as input iso table.txt" + echo "--old: for strict binary compatibility with older games" + echo "--i8086: for strict binary compatibility with older games" + echo + exit 1 +} + +if ! type -P m68k-linux-gnu-as >/dev/null +then + echo "Please install binutils-m68k-linux-gnu ..." + echo "On Ubuntu Linux: sudo apt install binutils-m68k-linux-gnu" + echo "On Rocky Linux: sudo dnf install binutils-m68k-linux-gnu" + echo + usage +fi + +bin="" +old="" +while [[ $# -gt 0 ]] +do + case $1 in + --help) usage ;; + --bin) bin=$1 ;; + --old) old=$1 ;; + esac + shift +done + +if [[ ! -f table.txt ]]; then echo "The file table.txt was not found."; exit 2; fi + +path=`dirname $0` +if [[ -z $bin ]] +then + # assembler does not support case insensitive names + cat table.txt | tr "[[:upper:]]" "[[:lower:]]" >table.s + # assembler does not support ORG directive + sed -i -e "s/^ org/;org/g" -e "/^ dc/s/, */,/g" table.s + # assembler wants to word-align every repeated instruction + exp="`echo -e ' rept\n dc.b 0\n endr'`" + act="`sed -ne '/rept/,/endr/{s/rept .*/rept/g;p}' table.s`" + if [[ -n "$act" && "$act" != "$exp" ]] + then + echo "Warning: unsupported rept statement." + else + # adjust observed case: start aligned and repeat "dc.b 0" + sed -i -e "s/^ rept \(.*\)/ rept (\1)\/2/g" table.s + sed -i -e "/^ endr/a\ even" table.s + fi + $path/l9asm2bin table 2>/dev/null + rm table.s +fi +$path/l9bin2tos table $old +if [[ -z $bin ]]; then rm table.bin; fi +mv table.prg table.dat +echo "Level 9 table.dat generation done." +echo diff --git a/l9dev/main.l9/gamedata.dat b/l9dev/main.l9/gamedata.dat new file mode 100644 index 0000000..435ae2b Binary files /dev/null and b/l9dev/main.l9/gamedata.dat differ diff --git a/l9dev/main.l9/message.txt b/l9dev/main.l9/message.txt new file mode 100644 index 0000000..a4023e6 --- /dev/null +++ b/l9dev/main.l9/message.txt @@ -0,0 +1,1861 @@ +; Knight Orc 1 Descriptions +; Copyright (C) 1987 Level 9 Computing +; +; The word type ^C is used when a word +; is not to be used as part of the normal parsing +; but is to be available for checking should it be needed +; This is so references to scenery may be checked for +; containing particular words. +; This word type replaces Proper Nouns in this game. +; +; +; Special ST notes: +; +; The vertical bar used to end the printable part +; of a message is found by shifting the backslash +; (next to the left hand shift key) + +; The ^ used for wordtypes is shift-6 +; +[1: ] +[2::] +[3:, ] +[4:.] ; dot with no space +[5:%] +[6:/and ] ; always starts with lower case a +[7:.%] +[8:?%] +[9:. ] +[10:exits lead ] +[11:an exit leads ] +[12: through a door] +[13: through an open door] +[14: and ] +[15:%We won't bother with "What now" from now on. ] +[16:%> ] ; replacement for 'What now' +[17:%What now? ] +[18:: ]; +[19:"] +; Messages for printing objects +; +[20:a ] +[21:the ] +[22:an ] +[23:some ] +; +[24:." ] +; +[101:^V north|^V n] +[102:^V northeast|^V ne] +[103:^V east|^V e] +[104:^V south|^V s] +[105:^V southeast|^V se] +[106:^V southwest|^V sw] +[107:^V west|^V w] +[108:^V northwest|^V nw] +[109:^V upwards|^V u ^V up] +[110:^V downwards|^V d ^V down] +[111:^V inside|^V in ^V into ^V enter] +[112:^V outside|^V o ^V out ^V leave] +[113:^V across|^V cross] +[114:with the ^V climb] +; as in 'you go by climbing and are in...' +[115:^V jump] +;; [116:^V plugh ^V xyzzy ^V sesame ^V plover ^V humakaat ^V satarh +;; ^V ollabin ^V obis] +; +; Intransitive verbs +; +[120:^V i] +[121:^V again ^V a] +[122:^V look|^V l] +[123:^V inventory ^V inv] +[124:^V quit ^V restart] +[125:^V restore ^V load] +[126:^V save] +[127:^V ramsave ^V ram] +[128:^V ramload] +[129:^V score] +[130:^V verbose] +[131:^V brief] +[132:^V wait|^V wa ^V pause ^V z] +;; [133:^V sleep ^V rest ^V dream] +[134:^V on] +[135:^V off] +[136:^V pictures ^V graphics] +[137:^V words ^V text] +[138:^V hello ^V welcome ^V hi] +[139:^V oops ^V undo] +[140:^V attack|^V hit ^V break] +;; [141:^V listen] +[142:^V search ^V explore] +[143:^V help ^V hint] +[144:^V sniff ^V smell] +[145:^V knock] +[146:^V stand] +[147:^V lie] +[148:^V sit] +[149:^V dig] +[150:^V say] ; used for output +;; [151:^V teleport] +;; [152:^V getme] +[153:^V think] +[154:^V run] +[155:^V yes ^V OK] +[156:^V no ^V n] +[157:^V board] +[158:^V go|^V goto ^V find ^V walk] +[159:^V stop] +[160:^V weather] +[161:^V treasure ^V money] +[162:^V exits] +[163:^V escape] +[164:^V want] +[165:^V what] +[166:^V why ^V y] +[167:^V where] +[168:^V how] +[169:^V whether] +; +; Rude words +[170:^V shit ^V cunt ^V jesus ^V christ ^V god ^V fucking +^V bugger ^V damn] ; leave in lower case to save space +; +; Table-driven commands +[171:^V intelligence] +[172:^V life] +[173:^V shout|^V yell] +[174:^V royalties] +[175:^V to] +[176:^V death] +[177:^V goodbye ^V bye] +[178:^V sorry] +[179:^V scream] +; +[180:^V have ] ; mainly for output +[181:^V has ] ; mainly for output +[182:^V am ] ; mainly for output +[183:^V are ] ; mainly for output +[184:^V is ] ; mainly for output +[185:^V phew] ; what a relief - prints 2411 +[186:^V dir ^V directory ^V catalog ^V cat] +;[187 is 'GO IN'] +;[188 is 'GO OUT'] +; 189 is 'wait for person' +; 190 is 'wait until time' +; 191 is 'wait for (length of time)' +; 192 is 'wait for single turn' +[193:^V fight ^V kill] +[194:^V time] +[195:^V dodge] +; 196 and 197 have text for debugging output only - do not mark +;; [196:gdgo] ; 196 - gdgo +;; [197:gdrun] ; 197 - gdrun +;; [198:^V obscure] +[199:^V buy] +; +; Transitive verbs +; +[200:^V examine|^V read] +[201:^V cut|^V chop] +;; [202:^V wake ^V rouse] +;; [203:^V cast] +[204:^V get] +[205:^V take|^V carry ^V steal] +[206:^V wear] +[207:^V drop] +[208:^V put|^V hide] +[209:^V remove] +[210:^V throw] +[211:^V give|^V offer] +[212:^V ask|^V question] +[213:^V follow|^V chase] +[214:^V open|^V unlock] +[215:^V light|^V burn] +[216:^V extinguish] +[217:^V push|^V press ^V touch] +[218:^V pull] +[219:^V fasten|^V tie] +[220:^V unfasten|^V untie] +;; [221:^V ring] +;; [222:^V fill] +[223:^V eat] +[224:^V rub|^V wave] +[225:^V bury] +[226:^V insert] +[227:^V pick|^V pluck] +;; [228:^V squeeze|^V squash ^V crush] +;; [229:^V dress] +[230:^V drink] +;; [231:^V play|^V blow] +;; [232:^V collect] ; goal-directed +;; [234:^V become] +[235:^V mount|^V ride] + +; 236 - 239 have text for debugging only +;; 236 is return object to initial position (for npcs) +;; 237 is take gold to pub +;; 238 is set up find +;; 239 is gdfind +; +[240:close|^V shut] +;; [241:^V breathe] +[242:^V tell] +;; [243:^V swim] +[244:struggle] ; output only +; +; now verbs specific to this game +; armed combat blows... +[270:^V scratch] +[271:^V pink] +[272:^V jab] +[273:^V stab] +[274:^V hack] +[275:^V batter] +[276:^V smite] +[277:^V cleave] +[278:^V pulverise] +[279:^V devastate] +; unarmed combat blows... +[280:^V slap] +[281:^V claw] +[282:^V bite] +[283:^V hit] ; must remain as hit, as it is used for output in THROW +[284:^V thump] +[285:^V belabour] +[286:^V crush] +[287:^V mangle] +[288:^V pulverise] +[289:^V demolish] +; +; Objects (300+N) +; +[301:you|^N player ^N me ^N myself ^N orc] ; do not mark "you" +[302:the ^N hunter] +[303:the ^N knight in ^A white ^N satin] +[304:^N Synonym the ^N wizard] ; adventurer +[305:^N Kris the ^N ant-warrior] ; adventurer +[306:^N Odin] ; adventurer +[307:the ^N prophet] ; adventurer +[308:the ^N gripper] ; adventurer +[309:the ^N innkeeper|^N bartender ^N barkeeper] +[310:^N Fungus the ^N boggit-man] ; adventurer +[311:^N Rapunzel] +[312:the ^N hermit] +[313:the ^A green ^N knight] +[314:a ^N knight in ^A shining ^N armour] +[315:the ^N valkyrie] +[316:Little ^N John] ; adventurer +[317:^N Denzyl] ; adventurer +[318:the ^N Phantom of the ^N Opera] ; adventurer +[319:the ^N Uruk] ; adventurer +[320:^A Mighty ^N Flynn] ; adventurer +[321:^N Genghis] ; adventurer +[322:^N Attila] ; adventurer +[323:^N Muscleman] ; adventurer +[324:the ^N Annihilator] ; adventurer +[325:^N Pope ^N Joan] ; adventurer +[326:^N Boadicea] ; adventurer +[327:^N Jeanie ^N II] ; adventurer +[328:^N Mrs ^N Wallop] ; adventurer +[329:^N Susan] ; adventurer +; +; now npcs who can't talk... +; +[330:^N goat] +[331:^A barrow ^N wight] +[332:^N wolf] +[333:^A swift ^N horse] ; orc hunter's horse +[334:^A green ^N horse] ; green knight's horse +[335:^N horse] ; user's horse at start +[336:the ^A huge ^N knight] +; NPCs end at 39 +; +; weapons... +; +[340:^N rapier] +[341:^N dagger] +[342:^N poignard] +[343:^A putty ^N knife] +[344:^A war ^N axe] +[345:^N lance] +[346:^N spear] ; used to throw through ring +; +; treasure (about 20)... +; first those which are scattered at random... +[350:gold ^N crest] +[351:gold ^N finch] +[352:gold ^N finger] +[353:gold ^N heart] +[354:gold ^N nugget] +[355:gold ^N plate] +[356:gold ^N shoulder] +[357:golden ^N ball] +[358:golden ^N fleece] +[359:golden ^N disk] +[360:golden ^N rod] +[361:golden ^N ruler] +; and the following bits which have definite starting positions... +[365:gold ^N brick] +[366:gold ^N comb] +[367:gold ^N ghost] +[368:gold ^N leaf] +[369:gold ^N standard] +[370:gold ^N sovereign] +[371:golden ^N apple] ; please leave as an apple! +; +; pieces of the rope... +[378:^N rope] ; ties you on the horse at the start +[379:^N coil of ^N rope] ; what you assemble from the pieces below.. +[380:^N piece of ^A plaitted ^N hair|^N rope] +[381:^A hessian ^N hawser|^N rope] +[382:^N lassoo|^N rope] +[383:^N belt|^N rope] +[384:^N reins|^N rope] +[385:^N noose|^N rope] +[386:^N halyard|^N rope] +[387:^N cord|^N rope] ; holds chest lid half-open +[388:^A washing ^N line|^N rope] +[389:^N tether|^N rope] +; +; clothes... +[390:^A hooded ^N cloak] +[391:^A saffron ^N robes] ; what the hermit wears +;; [392:^A green ^N suit] +; +; now some ordinary objects... +[400:^N cask] +; +[402:^N glass of ^N beer|^V pint ^V lager] +[403:^N empty ^N glass] +[404:^N bucket] +[405:^A welcome ^N mat] +[406:^N note] ; on drawbridge +[407:^A great ^N chest|^N lid] +;; [408:^N flag] +[409:^N key] +[410:^N head] ; horse's head! +; +; some static objects (150 onwards)... +[450:^N bar] ; in pub +[451:^N bar] ; in pub +[452:^N drawbridge] +[453:^A ominous ^A white ^N doorway] +[454:^A hardwood ^N roller] +[455:^N pile of ^N garbage|^A rubbish ^N heap] +[456:^A trophy ^N cabinet] +[457:^N flagpole|^N pole] +[458:^N signposts|^N posts] ; used in "you can see some (458)" +; +; some invisible objects... +[470:^N eyes|^N eye] +[471:Rapunzel's ^N hair hanging down from above] +[472:^N ring] ; through the orc's nose +[473:^N ivy climbing up the castle] ; mark nothing except IVY +[474:^A thorn ^N hedge|^N thorns] +[475:^A garbage ^N heap|^N rubbish ^N pile] +[476:^N head] ; orc's head +; +; Location objects... +; (These are used for seeing from a distance, +; and for input (for examine and for 'go castle') +; (note that 'go scenery' also works, so the only unique +; functions of these objects is for remote viewing, +; and for examine) +; +; 479+N +[480:^N gibbet] +[481:^N castle] +[482:^N clearing] +[483:^N crossroads] +[484:^N fairground|^N dismal] +[485:^A forest ^N lawn] +[486:^N cave] +[487:^A royal ^N oak] +[488:^N tower] +[489:^N viaduct] +[490:^N well] +[491:^N gate] +; +; collective nouns... +[534:^N everything ^N all ^N every] +[535:^N treasure] ; collective noun +[536:^N weapons] ; collective noun +[537:^N people ^N everyone ^N everybody] ; collective noun +[538:^N clothes] +; +; (more) omni-present objects: +[539:the ^N door] ; normal door - never described by printobject, +; so we can put in the article for the benefit of DESCRIBEACTIONACTOR +[540:^N vodka ^N whisky] ; drinks pub doesn't sell +[541:^N water] +[542:^N be] +[543:^N ground|^N floor] +[544:^N wall|^N walls] +[545:^N sky|^N sun] +[546:^N beer] +; and finally some miscellaneous nouns which are used +; for various purposes. +[547:^N except ^N but] +[548:^N it|^N that ^N them ^N him ^N her] +[549:^N minute|^N minutes] +; +[551:^J then ^J next] +[552:^J therefore ^J so] +[553:^N you ^N yourself] +; +; Pronouns... +[560:it] ; ita +[561:it] ; itan +[562:some] +[563:he] +[564:she] +[565:they] +[566:you] +; +[570:it] ; ita +[571:it] ; itan +[572:them] +[573:him] +[574:her] +[575:them] +[576:you] +; +; and some misc output messages +; plural endings and other odd verb declension... +[579:~] ; cause previous word to be printed +[580:s] +[581:es] +[582:is] ; used in examine +[583:buries] +; +; and directions for output +; in the form 'The orc enters from the outside' +; (as opposed to 'The orc goes out' - the normal verb table) +; Note that these are reversed so the offset into +; the table is the direction of the moving npc, not the observer +; +[585:from the south] ; north +[586:from the southwest] ; northeast +[587:from the west] ; east +[588:from the north] ; south +[589:from the northwest] ; southeast +[590:from the northeast] ; southwest +[591:from the east] ; west +[592:from the southeast] ; northwest +[593:from below] ; above +[594:from above] ; below +[595:from outside] ; inside +[596:from inside] ; outside +[597:from across the way]; across +[598:by climbing] ; climb +[599:with a jump] ; jump +; +; Examine messages (600+N). NO full stops at end please. +; +[601:an orc] +[602:dressed in hunting pink] ; the hunter +[603:like a frozen elf] ; knight in white +[604:a splendid figure] ; Synonym the Wizard +[605:a muscle-bound champion] ; Kris the Ant Warrior +[606:a one-eyed being of great power] ; Odin +[607:an unusual human] ; Prophet +[608:a rat-like youth] ; the Gripper +[609:dressed in garish clothes] ; the Innkeeper +[610:twitchy-fingered] ; Fungus, boggit-man +[611:a young woman with long, silky hair] ; Rapunzel +[612:sitting in lotus position] ; the Hermit +[613:a handsome, parfait knight] ; Green Knight +[614:a canned fool] ; Knight in shining armour +[615:a winged Amazon] ; Valkyrie +[616:a trollish oaf] ; Little John +[617:stupid] ; Denzyl +[618:a pointy-headed greaseball] ; Phantom of the Opera +[619:a trollish creature of great pungency] ; Uruk +[620:an tree-like man] ; Flynn +[621:a fur-clad warrior] ; Genghis +[622:a barbarian warrior] ; Attila +[623:like a Butcher's shop on two legs] ; Muscleman +[624:a golem-like figure] ; the Annihilator +[625:an impressive woman] ; Pope Joan +[626:a killer queen] ; Boadicea +[627:clad in hareem silks] ; Jeanie II +[628:the toughest woman ever seen] ; Mrs Wallop +[629:confused] ; Susan +; +[630:an obnoxious brute] ; goat +[631:very handsome] ; barrow wight +[632:a shaggy brute with sharp teeth] ; wolf +[633:an expensive nag] ; orc hunter's horse +[634:unbearably smug] ; green knight's horse +[635:like a flatulent barrel.] ; your horse +[636:encased in steel armour] ; huge knight + ; +[640:a fine weapon] ; rapier +[641:a long knife] ; dagger +[642:a funny-looking knife. It's quite sharp] ; poignard +[643:rusty and blunt] ; knife +[644:a lethal looking weapon] ; axe +[645:a sharpened fence-post]; spear +[646:a dirty great needle] ; spear +; +[650:a treasure] ; gold crest +[651:an ugly statue] ; gold finch +[652:a bit of vandalized statue] ; gold finger +[653:a treasure] ; gold heart +[654:gold dragon dung] ; gold nugget +[655:what pansy humans use] ; gold plate +[656:another treasure] ; gold shoulder +[657:part of some long-destroyed statue] ; golden ball +[658:metal wool] ; golden fleece +[659:valuable] ; golden disk +[660:a golden pole] ; golden rod +[661:covered with markings] ; golden ruler +; and the following bits which have definite starting positions... +[665:good and heavy] ; gold brick +[666:not much good] ; gold comb +[667:a flimsy little thing] ; gold ghost +[668:probably for making gold compost] ; gold leaf +[669:a silly little model flag] ; gold standard +[670:a thick little coin] ; gold sovereign +[671:the opposite of delicious] ; golden apple +; +; pieces of the rope... +[678:looped under the horse to hold you on] ; rope - tying you on horse +[679:tied together from several parts] ; what you assemble from... +[680:a strong pig-tail] ; hair +[681:green-slimed hessian] ; hessian rope +[682:hemp rope] ; lassoo +[683:strong cloth] ; belt +[684:decorated leather] ; reins +[685:a hempen rope] ; noose +[686:a silken cord] ; halyard for flag +[687:a tie-string] ; holds chest lid to 120 degrees when open +[688:smooth hemp] ; washing line +[689:tattered and chewed] ; tether +; +; clothes... +[690:a deep-shadowed cape] ; hooded cloak +[691:neat and simple] ; what the hermit wears +; +; now some ordinary objects... +[700:a rusty barrel of "lager beer". Others have a better name +for it] ; cask +; +[702:the best beer, made from potatoes etc] ; glass of beer +[703:not as good as a Hobbit-skull mug] ; empty glass +[704:perished leather] ; bucket +[705:decorated with: %"Welcome to the Orc's Head Inn. +No orcs allowed"] ; welcome mat +[706:printed with "Knock very carefully" in many languages, including +cartoons for Yellow Eye Readers] ; note +[707:iron-bound] ; great chest +; +[709:an old friend] ; key +[710:messily severed at the neck] +; +; some static objects (150 onwards)... +[750:horribly clean] ; bar in pub +[751:reeking of greasy polish] ; bar in pub +[752:a moving bridge] ; drawbridge +[753:a draughty archway] ; white door +[754:a kind of reel] ; well roller +[755:a delicious pile of fish-heads, brown cabbage and +furry bread] ; pile of garbage +[756:a stupid cupboard] ; trophy cabinet +[757:an ugly white post] ; flagpole +[758:two signposts, set at opposite corners of the crossroads.] ; signposts +; +; some invisible objects... +[770:deep, bloodshot and slightly crossed] ; eyes +[771:smooth, silky and golden. Yeuch] ; Rapunzel's hair +[772:a great iron hoop, far above, fixed through the orc statue's +nose which overhangs the gap in the broken viaduct] ; ring +[773:growing up the stone wall of the castle] ; ivy +[774:a sword's-length wide. Its thorns are long, sharp and inedible, +so there is no way through] ; thorn hedge +[775:enough to feed an army of orcs] ; garbage heap +[776:a huge orc's head carved out of the rock on the far side of +the broken viaduct. Its mouth leads to the orc lair, where you want +to be] ; head +; +[780:a homely construction, used for executions] +[781:a carbuncular castle designed by mad dwarfs. Ivy now hides the +vile stone walls] +[782:an open area of rabbit-mown grass] +[783:the junction of hard east-west and north-south roads] +[784:a trampled field with fair pavilions] +[785:a horrid field, sometimes used for bowling] +[786:horribly clean and dry. The air is polluted by the stink of +dried flowers and there are no worms to eat] +[787:a dirty great hollow tree] +[788:a vertical spire of burnt rock] +[789:the bridge back to your base in Orc Mountain. Unfortunately, +some overzealous idiot has smashed a wide gap in the middle] +[790:a deep hole] +[791:a magnificent glowing portal] +; +;------------------------------- +; +; if you change any of the tree types, must change code +; in .DRSYNTHESISED which chooses 'a' or 'an' +[901:^N alder|^N trees] +[902:^N beech|^N trees] +[903:^N blackthorn|^N trees] +[904:^N cedar|^N trees] +[905:^N elder|^N trees] +[906:^N elm|^N trees] +[907:^N hawthorn|^N trees] +[908:^N hazel|^N trees] +[909:^N holly|^N trees] +[910:^N hornbeam|^N trees] +[911:^N juniper|^N trees] +[912:^N larch|^N trees] +[913:^N oak|^N trees] +[914:^N pine|^N trees] +[915:^N rowan|^N trees] +[916:^N whitebeam|^N trees] +; +[920:^N clump] +[921:^N coppice] +[922:^N deadwood] +[923:^N edgewood] +[924:^N forest] +[925:^N ghostwood] +[926:^N glade] +[927:^N grove] +[928:^N heartwood] +[929:^N scrubland] +[930:^N spinney] +[931:^N tangle] +[932:^N thicket] +[933:^N underbrush] +[934:^N wildwood] +[935:^N woodland] +; +; examine messages for trees.. +[941:Alnus Glutinosa, the common black alder.The wood is used +for swamp poles and Elvish Cuckoo Clocks] + +[942:Fagus Sylvatica, the common beech. In times past, many +trees were grotesquely pollarded for firewood, their mutilated +stumps rotting into ghost-shapes, but this skill has been lost] + +[943:blackthorn, Prunus Spinosa, a very aggressive little tree, +armed with evil black thorns] + +[944:Cedrus Libani, the cedar, which lives a long time +unless something is done about it] + +[945:the elder, an ugly weed which lives wherever there is +rubbish] + +[946:Ulmus Procera, the elm, a big fuzzy-looking tree used +for coffins] + +[947:Crataegus Monogyna, the hawthorn. Its red berries +attract a lot of edible vermin] + +[948:Corylus Avellana, the Common Hazel from the east +hemisquare of Middle Earth] + +[949:holly, Ilex Aquifolium, a spiky evergreen tree from +middle Middle Earth. Its main use is in producing bird lime] + +[950:hornbeam, Carpinus Betulus, a birch-like tree from +left-of-centre Middle Earth. The dirty white timber burns well +and is very hard and tough; well suited for slave-yokes, +treadmills and butchers' blocks] + +[951:Juniper Communis, the left-wing Juniper] + +[952:Larix Laricina, the West Middle Earth larch, which clogs +up good marsh land all over the place] + +[953:oak, Quercus robur, a big beggar] + +[954:a marvelously attractive tree, almost as nice as the Leylandii +Cyprus] + +[955:rowan, Sorbus Aucuparia, a silly little tree. The main thing +to remember about rowan is to only park a cart below one in Autumn +if the owner is smaller than you] + +[956:whitebeam, Sorbus Aria, which infests middle Middle Earth] +; +[960:a tight cluster of trees] ; clump +[961:a small wood of young trees] ; coppice +[962:a fine region of dying trees] ; deadwoods +[963:an area of small trees] ; edgewoods +[964:a large tract of trees] ; forest +[965:a gloomy place] ; ghostwood +[966:an open space] ; glade +[967:a small tract of woodland] ; grove +[968:a dense maze of close-packed trees] ; heartwood +[969:a mess of brushwood and stunted trees] ; scrubland +[970:a small wood] ; spinney +[971:just a confused mass of twisty trees] ; tangle +[972:a tangle of shrubs and trees] ; thicket +[973:a region of clinging plants beneath the trees] ; underbrush +[974:a chaotic remnant of primal forest] ; wildwood +[975:an ordinary bit of forest] ; woodland +; +; Short-Form room Descriptions (1000+N). NO full stops at end please. +; +; in Knight Orc, these are the brief descriptions when +; in the same location. +; e.g. 'You are <1010> in an alder forest' +; +; room 1 is used as exit modifier for synthesised rooms +; +; rooms 2..20 are those with static connections - +; i.e. not on the synthesised grid of forest locations + +[1002:in a ^N cobbled ^N castle ^N courtyard] + +[1003:in the single, large ^N entrance ^N hall at the ^N base of +the ^N keep] + +[1004:on the ^N dangerously ^N rounded ^N steps of a ^N narrow +stone ^N staircase] + +[1005:on a ^N lead ^N rooftop. From this ^N high ^N lookout, +there is a ^N dizzying ^N view across the whole forest|^N ivy] + +[1006:in the ^N hermit's ^N horrid little ^N cave] + +[1007:inside the ^N rotten ^N trunk of the ^N royal oak] + +[1008:in the ^N public ^N bar of the ^N Orc's Head ^N Inn|^N pub ^N head] + +[1009:in the "^N Headhunters" ^N saloon ^N bar of the +^N Orc's Head ^N Inn|^N head] + +[1010:in a ^N damp ^N cellar] + +[1011:in the ^N market ^N field] + +[1012:on the ^N fairground] + +[1013:in a ^N dingy ^N stable] + +[1014:on a ^N jousting ^N field] + +[1015:on a ^N trampled ^N field] + +[1016:in the ^N grandstand: a ^N long ^N tent] + +[1018:standing on the ^N viaduct, just north of a ^A huge ^N gap +where the ^N southern ^N end of the ^N viaduct has been washed +away. To the south, across the ^N chasm, is a ^A huge ^N orc's +^N head, carved from the ^N rock. Its ^N nose seems to have been +damaged, but enough remains to hold a large metal ring] + +[1019:at the ^N bottom of the ^N well] + +[1020:standing on the ^N drawbridge] + +[1021:at the east ^N end of a forest ^N road] + +[1022:at the northern ^N end of a forest ^N road] + +[1023:at the west ^N end of a forest ^N road] + +[1025:at the ^N base of the ^N tower] + +[1026:in a ^N vast ^N hall of ^N bright ^N cloud] ; lab in Paradise + +[1029:in a huge pile of garbage] ; invisible object here I think +; +; long descriptions of location objects (do not mark)... +; +[1200:beside a gibbet] +[1201:outside an ugly castle] +[1202:in a clearing] +[1203:at a crossroads] +[1204:on a dismal fairground] +[1205:on a forest lawn] +[1206:outside a cave] +[1207:beside the royal oak] +[1208:a little way south of a tower, separated from it by a thorn +hedge] +[1209:just north of a broken viaduct] +[1210:beside a quaint little well] +[1211:beside Paradise Gate] +; +; Now long additions to location descriptions (1300+n) +; these are printed immediately after the short description +; without any intervening punctuation (you may start this message +; with either punctuation or just text) +; +[1302:, surrounded by ^N untidy ^N ranks of ^N wooden ^N sheds which +sprawl crookedly against the ^N outer stone ^N walls] + +;; [1303:. Its soft ^N mudrock ^N floor has been polished smooth +;; by use and the route from the ^N entrance door to the back +;; of the ^N hall has ^N worn into a ^N ditch. The ^N rounded ^N treads of +;; a ^N spiral ^N staircase emerge from the end of this ^N furrow +;; and coil upwards into the wall] + +[1304:, within the keep wall] + +;; [1305: though you can't quite make out the orc lair beyond the +;; viaduct] + +;; [1306:, decorated with ^N cartoons and ^N Christmas ^N cracker ^N mottos] + +;; [1307:, in a wide ^N chamber lined with ^N leaves and ^N cobwebs. +;; Just enough light seeps in from outside for you to be +;; able to see the ridged and knotted ^N wood all around] + +;; [1308:, squashed between serried ranks of ^N shove-halfpenny +;; ^N games and the ^N lacquered ^N bar ^N top with its ^N sticky +;; ^N puddles and ^N rows of ^N imitation ^N kegs. Magic +;; ^N wall-trumpets whine with Hobbit and Westron music and the +;; mood is one of gloom and depression. It all makes you quite homesick] + +;; [1309:, wading through the ^N thick ^N carpet. This +;; ^N high-class room is furnished with ^N luxurious ^N orc-skin +;; ^N armchairs and decorated with ^N paintings of ^N famous +;; ^N sportsmen and their ^N trophies] + +;; [1310:, reeking pleasantly of stale ale] + +;; [1311:. The ground has been churned into a ^N sea of ^N mud, +;; upon which the ^N bright ^N wood and ^N canvas ^N market ^N stalls +;; float like ^N trapped ^N butterflies] + +;; [1312:, a ^N shabby ^N collection of ^N damp ^N tents and +;; ^N muddy ^N signboards] + +[1313:, a ^N temporary ^N building with ^N canvas ^N walls and +^N lots of ^N straw] + +[1314:; an ^N acre of ^N firm ^N meadow, ^N divided by a ^N fence which +^N guides and ^N separates the ^N contestants. The ^N grass is surrounded +by ^N garish ^N pavilions and a ^N tented ^N grandstand, big enough for +hundreds of people to watch the fight] + +[1315:, pock-marked by the feet of humans and their horses] + +[1316: with one side missing, containing raised +^N wooden ^N benches for the spectators] + +[1318: over the ^N gap in the ^N viaduct] + +;; [1319:, standing ankle-deep in ^N mud] + +[1320: which leads into the ^N castle] + +;; [1321: which winds, narrows and fades away into the trees] + +;; [1322:, where it ends abruptly] + +;; [1323: to nowhere] + +;; [1324: through the ^N claustrophobic ^N undergrowth] + +[1325: where Rapunzel lives. It is a ^N peculiarly ^N spiky ^N building +with no way in] + +[1326:, lit from above by ^N painful ^N beams of ^N white ^N light. Sickly +^N perfume oozes from some hidden vent and ^N tinkly ^N music jars the +nerves] + +;; [1327: of ^N pink ^N mist, billowing about like a ^N salamander trapped +;; in a ^N thunderstorm (but without the noise)] + +;; [1328:] + +[1329:, with the other rubbish thrown away after the tournament] +; +; Message pairs for use in describing containment positions +; also used for preposition table +; +; part printed before container +; +[1600:can see] ; 0 - you can see +[1601:^P on |^P onto] ; 1 - on +[1602:^P underneath|^P below ^P under] ; 2 - under +[1603:^P behind] ; 3 - behind +[1604:] ; 4 - carrying +[1605:] ; 5 - wearing +[1606:|^P at] ; 6 - (person) is riding (horse) +[1607:^P inside|^P into ^P in] ; 7 - in +[1608:hanging from] ; 8 +[1609:] ; 9 - tied up with +[1610:^P between] ; tied between is tied a rope +;; [1611:] ; 11 - for ring of knucklebone +[1612:lying on] ; 12 +[1613:sitting on] ; 13 +[1614:fastened to] ; 14 +[1615:tied to] ; 15 +; 15 tied to (the chest) and holding the lid open is (a strap) +[1616:^P with|^P using] +[1617:^P from] +; +; part printed between container and contained. +; +[1640:] ; 0 +[1641:is] ; 1 - on +[1642:is] ; 2 - under +[1643:is] ; 3 - behind +[1644:is carrying] ; 4 +[1645:is wearing] ; 5 +[1646:is riding] ; 6 - is riding +[1647:is] ; 7 - in +[1648:is] ; 8 +[1649:is tied up with] ; 9 - ; tied up with - mainly for goat +[1650:is tied] ; 10 - +[1651:] ; 11 - from +[1652:] ; 12 +[1653:] ; 13 +[1654:is] ; 14 - fastened to +[1655:and holding the lid open is] ; 15 tied to the (chest) is a (strap) +; +; 1700: is base for prepositions to use with 'you' +; +; 1700+N is part printed before 'you' +;; [1714:tied up with] +[1715:tied to] +; +; 1740+N is part printed between you and object(s) +[1741:are on] ; 1 - on +; 1742 is 2 ; +; 1743 is 3 ; +[1744:own] ; 4 - own +[1745:are wearing] ; 5 +[1746:are riding] ; 6 +[1747:are in] ; 7 +[1752:are lying on] ; 12 +[1753:are sitting on] ; 13 +[1754:are tied up with] ; 14 +[1755:is] ; tied to you is 15 +; +; +[1800:^P off] +[1801:^P up] +[1802:^P down] +[1803:^P to] +[1804:^P out] +[1805:^P from the ] ; used for npc motion +[1806:^P for] +[1807:^P until] +[1808:^P debug] +[1809:^P through] +[1810:^P about] +; +; Parser messages +; +[2000:you don't need to use "] ; paired with 2001 +[2001:" in this part of the game. ] +; +[2003:I don't understand "] +[2004:" when used like that. ] +; +[2006:you are ] +[2007:in a ] ; as in 'You are in an alder forest' +[2008:in an ] +[2009:exits lead in all directions] +; +; general error message when parsing has broken down. +[2010:I don't understand. ] +[2011:you can't see] +[2012:you don't have] +[2013:you already have] +[2014:(please stop blathering and get on with the game). ] +[2015:it's too far away. ] ; examine, take etc. scenery objects +[2016:I can't find a verb in that sentence! ] +[2017:it's not there. ] +[2018:there were too many nouns in that sentence! ] +[2019:that's too heavy] +; +[2020:don't be silly] ; group.. +;; [2021:strange concept] +;; [2022:what a peculiar idea] +; +; group for things which people may +; try which might work, but don't +[2023:nice try] ; group... +;; [2024:a valiant attempt] +;; [2025:nice try] +; +[2030:that's scenery. ] ; that's just scenery group... +;; [2031:I suggest that you forget it. ] +;; [2032:that's probably not important. ] +; +; now must supply an object group +[2033:please say more. ] ; group... +;; [2034:what? I couldn't find an object in that. ] +;; [2035:could you elaborate? ] + +[2036:absolutely nothing happens. ] +; ^ verb in keyword table but not in CALLVERB routine +[2037:there doesn't seem to be anything suitable. ] +; +[2039:what a mouthful! ] +; +[2044:you can't ] +[2045:that. ] +[2046:that] +[2047:here] +[2048:I can't find ] +; +; again used following a command referring to scenery +[2050:you can't repeat that. ] +;; [2051:you can't repeat that. ] +;; [2052:it wouldn't help to try that again. ] +; +[2053:it's not clear to what ] +[2054: is referring. ] +; +[2055:(removing] ; E.g '(Removing the bat from the cage first).' +[2056:from the] ; to avoid containers inside themselves. +[2057:first). ] +; +; error messages for NPC's +[2060:talking to yourself again?] +[2061:you can't talk to several people at once. ] +; +[2062:stops, looking confused] ; group... +;; [2063:looks puzzled] +;; [2064:seems uncertain of what to do now] +; +;; [2065:looks around, as if searching for something. ] +; +[2065:for] ; as in 'looks for the cask' +[2066:but can't find] +; +; messages when the player tries to take stuff from others... +[2071:won't let you] +;; [2072:slaps your paw away] +;; [2073:stops you] +; +; and same for npcs... +[2074:won't let] +[2075:take it. ] +; +; Standard Adventure output messages +; +[2100:%Welcome to Knight Orc, copyright (c) 1987 from +^N Level 9 ^N Computing and Rainbird. ] +[2101:you can't see] +[2102:you don't have] +[2103:you already have] +[2104:you can't see that here. ] +[2105:in the distance is ] ; for scenery seen from afar +[2106:you own nothing at all! ] +[2108:it is dark. ] +; +[2109:nothing happens] ; Nothing happens group... +;; [2110:that doesn't work] +;; [2111:there is no effect] +; +; examining something greater than maxobject: (but not scenery) +; rare occurrence - mostly for omnipresent objects, numbers, spells +[2112:it looks exactly as you would expect] +[2113: nothing. ] +[2114:you can't go that way. ] +[2115:through the door] +; +[2117:it's already open. ] +; +[2119:you find] +; +; the following are printed after the object name... +; tried to take (move) fixed object +; only 2120 needs to be suitable for 'you' as well as 'object' +; before the message is printed +[2120:won't move] ; group... +;; [2121:doesn't budge] ; (person) group +;; [2122:refuses to be moved] +; +[2123:you can't put ] ; paired with 2123 +[2124:there. ] +; +[2125:you can't go there! ] +[2126:you'll have to drop it first. ] +; +[2127:you can't climb that. ] +[2128:%(This game provides commands for rapid movement. For +example, "GO TO CASTLE" or "FOLLOW THE VALKYRIE". ] +;; [2128:you can't drop that. ] +[2129:whee! That was fun. ] ; jump to no effect +; +; 2130 is used when player refers to scenery which is not nearby +[2130:I can't find a reference to "] +[2131:you're on it! ] +[2132:what? ] +[2133:I don't know where that could be! ] +[2134:you're wearing ] +[2135:please try again, saying what with? ] +[2136:which one? ] +[2137:at what? ] +; +[2139:is full. ] +[2140:" here. ] +; +[2142:you can't wear ] +[2143:you can't reach it from here. ] +; +[2144:that's pointless] ; don't bother group... +;; [2145:that would be a waste of time] +;; [2146:that's pointless] +; +[2147:you're already wearing that. ] +[2148:you don't need to do that. ] +; +; Confirmation messages +; +[2152:worn. ] +[2153:OK. ] +[2154:yeuch! ] ; don't want to eat it +[2155:time passes. ] +[2156:said. ] +[2157:most refreshing. ] ; water / other pleasant liquids +[2158:you'll have to untie it first] +; +[2160:YES or NO, please.%] +; +[2176:nothing happened. ] +; +[2190:(] +[2191:). ] +; +; Death, scoring, game control etc. +; +[2200:really restart? ] +; [2201:%press space to play again. ] +[2202:really restore? ] +[2203:%YES or NO, please] +[2204:you score ] +[2205: out of 1000. ] +[2207:do you want to continue? ] +[2209:% %Thy adventure is over. Type RESTART, RESTORE, OOPS or RAM +RESTORE. ] +[2210:you vandalize the place a bit. ] +[2211:what, again? ] +[2212:why don't you go and mangle a paper clip instead? ] +[2213:vandals seem to have been at work here. ] +[2214:% %do you want to continue? ] +[2215:that's too long to wait. ] ; won't wait +[2216:have you considered, eg "WAIT FOR VALKYRIE" or "WAIT FOR +25 MINUTES"? ] +[2217:the time is ] +[2218:you can't light it. ] +[2219:you have no source of fire. ] +; +; Help messages +[2270:please contact Rainbird if you are really stuck. ] +; +[2300:oops and ram save/restore don't work in this version. ] +;; [2301:remove the Knight Orc disk, insert your formatted save position +;; disk and press a key. ] ; disk *** +;; [2302:now pull your save position disk out and stuff the Knight Orc disk +;; back in.% %] ; disk *** +; +[2308:I can't use OOPS to go back further than this. ] +[2309:(this version allows you to use RAM SAVE and RAM RESTORE +to save a position in memory, and OOPS to take back bad moves). ] +[2310:I can't find that saved position in memory. ] +; +[2311:you're about to load another part of the game. Do you +want to save your position first? ] ; tape *** +[2312:that data was probably not saved from Knight Orc. ] +[2313:play the tape of "] ; tape *** +; +[2315:A Kind of Magic". ] ; part 2 (hitech) ; tape *** +[2316:Hordes of the Mountain King". ] ; part 3 (magic) ; tape *** +[2317:are you sure you want to enter "Hitech" mode? ] +[2318:as the visor lifts away from your eyes, the countryside seems +to twist and change. What you had previously seen as the "real" world +was only an image! ] +; +;--------- +; +; table driven responses.. +; all have a dot added automatically +[2401:ouch!] ; attack me +[2402:Mary Whitehouse slaps your legs] ; rude word +;; [2403:you hear nothing else] +[2404:you succeed in smelling even worse] +[2405:you find nothing special] +[2406:you smell great] ; smell player +[2407:go stuff yourself, orc scum] +[2408:why not] +[2409:Oh, I see] ; no +[2410:you sound strangely positive] ; yes +[2411:that was close] ; phew +[2412:you are very intelligent indeed, considering] +[2413:life is too good for most people] +[2414:yes please] ; treasure +[2415:send your cheques to Level 9] ; royalties +[2416:to be, or not to be, that is the cliche] +[2417:very nasty the time of year] ; weather +[2418:how greedy] ; want +[2419:how should I know] ; what,why etc. +[2420:what a nice thought] ; death +[2421:what, going so soon? Don't forget to SAVE first] ; bye +[2422:I should think so too] ; sorry +[2423:aargh..] ; scream +[2424:oi! Behave yourself] ; 'rude word' npc +[2425:sorry, can't do that] ; full stop added by acode. +; +;----------- +; +; 'Game play' messages +[2503:the drawbridge slowly starts to close. ] +[2504:the drawbridge clunks shut. ] +[2505:the drawbridge is closed. ] +; +[2507:the drawbridge is wide open. ] +[2508:the drawbridge is closing. ] +[2509:the drawbridge is closing. ] +[2510:the drawbridge is closing. ] +[2511:your weight pushes the drawbridge down. ] +; +[2513:the chest is locked - you will need a key] ; you have no key +[2514:the lock opens with a little click] +[2515:the chest lid swings open and is held by a cord] +[2516:the heavy lid strikes the ground with a crash] +; +[2518:it won't open. ] ; trying to open it +[2519:the drawbridge is half-shut] +[2520:you bump into the closed drawbridge. ] +[2521:WHOOMPH! You are crushed as the drawbridge falls open. ] +[2522:hits the drawbridge, which falls open. ] +[2523:the chest opens] ; no strap or other stuff +;; [2524:it is already open] +[2525:it is closed] ; examine message when locked +[2526:it is closed] ; examine message when unlocked but closed +[2527:it is open] ; examine message when open +[2528:the pallid knight leaps up in a rage. ] +[2529:the hunter is too far away. ] +[2530:the ropes join magically] +[2531:a horn blatts in the distance. ] +[2532:a mounted hunter bursts through the trees and spurs his +nag towards you. The fool is waving a lassoo and clinging on for +dear life. ] +[2533:the hunter rides over you. ] +[2534:the stupid hunter doesn't see your rope! He is caught mid-chest +and hurled, stunned, to the ground. ] +[2535:the hunter strikes out wildly with his whip. ] + +[2536:%the green knight puffs himself up and stares down +scornfully from the back of his overgrown pony, +%"If thee be brave, not coward base, +%Then thee must now my challenge face. +%With this, my axe, strike blow for blow. +%I'll let thee strike first. Have a go!" +%He indicates his mighty axe. +% +%] + +[2537:%the green knight sneers and, barely moving his lips, +spits out another gem of the poet's art, +%"Spineless weakling, scared of fate, +%I know not why you hesitate. +%If thou wouldst win thyself renown, +%Take up my axe and strike me down!" +% +%] + +[2538:to your complete amazement, with one mighty swing of the +axe, you chop off the giant knight's head! For one glorious +moment, his mighty body totters as his head curves through the +air. +% +%Then, suddenly, a green hand reaches out and catches the falling +noggin by its leafy tresses. With practiced ease, the knight +replaces his green dome back on his neck and smiles horribly. +Then he laughs, "Thought you, an orc, a knight to beat? I'll +never lose while I can cheat!" He wrests the axe rudely from +your grasp and swings it. The last thing you hear is the knight's +dreadful laughter, "Ho! Ho! Ho!"] + +[2539:with a surprisingly dextrous stroke you behead the horse. +The green knight shouts in surprise but, before he can retaliate, +the massive steed has fallen on him! He is trapped, but only for +the time being. ] +[2540:the green knight looks dazed. ] +[2541:the green knight struggles on the ground. ] +[2542:with a massive effort, the green knight clambers to his +feet. ] + +[2543:the green knight reattaches the head +to the horse's body. The horse comes back to life! ] +; +[2545:%His verdant war-horse stepping high slow, +%The green gallant prepares to hew. +%Heaves up his axe and, shouting thrice "Ho", +%Brings down his axe and beheads you. +% +%] + +[2546:you can't ride that! ] +[2547:it's already being ridden! ] + +[2548:the hermit turns his back on you and walks over to his +trophy cabinet. His shoulders are shaking with mirth. ] +[2549:the hermit walks back to you and sits down, cross-legged, +in the centre of the cave. He is chuckling more than ever. ] +[2550:the hermit wakes up, rubs his bald head and scowls. ] +[2551:the hermit examines it and bursts out laughing. ] +; +; trio of messages printed immediately after +; 'You (npc) attack(s) the hermit but he dodges' +[2552:the hermit roars with laughter as you miss hopelessly +and sprawl on the ground] ; group... +;; [2553:the hermit sits down again and blows you a kiss] +;; [2554:the hermit sways about, giggling. He seems to see every +;; blow before you make it] +; +[2555:while the hermit isn't looking, you clobber the old fool +on the back of his head and knock him out cold] +[2556:Rapunzel is looking out of an upper window of the tower, +pouting sexily and letting down her incredibly long hair] +[2557:the thorns drive you back] +[2558:that won't protect you from the thorns] ; trying to put +; anything but welcome mat on hedge +[2559:that wouldn't help you to cross the hedge] +[2560:you clamber over the hedge] +[2561:the hair is in reach] ; south of tower base +[2562:Rapunzel shrieks in angry protest] +[2563:the hair descends again] +[2564:you carefully climb up the hair and, just as carefully, +Rapunzel knocks you down with a large mallet] +[2565:you cut off a good length of Rapunzel's hair. She shouts +angrily and disappears into the tower. You hear loud +cursing and threats of vengeance against orcs] +; +[2567:it hangs down into the depths of the well] +[2568:you climb the rope..] +[2569:you can't climb down without rope] +[2570:the innkeeper pulls a fresh pint] +[2571:the innkeeper looks for the empty glass. ] +[2572:the innkeeper laughs at you, "Finish your last one first!" ] +[2573:the innkeeper says, "I'm busy." ] +[2574:the innkeeper says, "We don't serve orcs." ] +[2575:the innkeeper isn't here! ] +[2576:you don't have any] ; beer +[2577:she is too far away] ; acting on Rapunzel +[2578:% %You lie still for a while, unable to even twitch +until the valkyrie swoops down, picks up your body and flies steadily +southwards, eventually swinging low through Paradise Gate. +% +%There's a faint click and an awesomely feminine voice breathes huskily +at about a hundred decibels, "Good Morning! Welcome to Paradise. Our +nymphs are busy right now, but they will attend you in just a few +moments; remember that patience is a virtue." She pauses briefly, +then chirps, "Putting you on hold" and ends with another click. +Somewhere, out of sight, harp music jangles irritatingly into life. +% +%] +[2579:the innkeeper thanks ] +[2580:, pours a pint and ] +[2581:you have nothing to dig with. ] +[2582:drinks it. ] +[2583:with a fanfare of trumpets, two nymphs float majestically +forward, turn up their noses in disgust and throw you out..%] +[2584:and drinks it down. The innkeeper retrieves +the empty glass. ] +[2585:Rapunzel has gone away and you can't climb up without her +hair] +[2586:two nymphs float in and examine] +[2587:. They murmur a few words and then take] +[2588:out. ] +[2589:% +%Grindleguts struggled awake, groaning piteously. The world bucked +and swayed, his headache was agony and he ached in every limb. +Grindleguts' mouth tasted like a Hobbit's armpit and he seemed to +have lost another tooth - he could not quite remember what had +happened after they captured the Inn, yesternight, but he was sure +it must have been fun! He moaned again and prepared to wallow in +his hangover. +% +%A sharp object stabbed at Grindleguts' ribs again, interrupting +his enjoyment of his misery. Grindleguts risked ungluing one +bloodshot eye and squinted at the world. A shaft of sunlight +stabbed back. It was still light. It was very light! Some idiot +had woken him in the middle of the day! +% +%] + +[2590:%you, Grindleguts, leap furiously at the jabbing figure +beside you - and discover, to your horror, that your legs are +fastened to some huge animal! +% +%One of the robed figures hauls you back upright, jeering "Go on, +Sir Orc, you're next" and gives your horse a prod with his spear, +laughing as the frightened beast rears and bolts. +% +%] +[2591:%you find yourself in a large open arena. All around are +crowds of people in mediaeval costume, obviously enjoying themselves. +% +%A chorus of boos started when you emerged from the tent, in +contrast to the cheers at the east end of the arena, where the +huge knight is consulting with his seconds. +% +%] +[2592:%the knight turns his horse to face you and levels his lance. +As he starts to charge, a great yell rises up from the crowd! +% +%] +[2593:%the knight takes aim and, WHOOMPH, his lance meets your +chest and the crowd roar as you fall, stunned, to the hard ground. +% +%Some time later, you awake. Bruised and battered, but you must +still be alive!% +%] +[2594:the horse refuses to move. ] +[2595:you are tied to the horse. ] +[2596:the knots are too tight. ] +[2597:you charge a group of spectators. They scream and flee in +panic. The horse shies up and stops dead. ] +[2598:you bravely charge the knight. ] +[2599:it is ] ; first part of rope length report +[2600: feet long. ] ; second part of length report. +[2601:it is very valuable! ] ; after examine message +[2602:the valkyrie seems annoyed to find that]; followed by name +[2603:is alive! ] +[2604:if you did that, the spear would fall into the chasm and be +lost forever. ] ; throwing spear without rope +[2605:the rope is too short - the spear is jerked back and +you catch it. ] +[2606:the spear sails through the air and neatly slips through the +ring! You escape, swinging in a graceful arc through the air... +% +%And crunch into the far wall of the chasm. Not many bones are +broken but, patting at your head, you discover with a shock that +you are wearing some kind of visor - and presumably have been +doing so all along! It seems to have been knocked loose and can +be raised at any time from now on. +% +%Do you want to follow my advice and leave the visor alone? ] +; +[2607:What about some service here?] ; group... +;; [2608:Any danger of some service in here?] +;; [2609:How about a beer, bartender?] +; +[2612:Did someone want a beer?] ; group... +;; [2613:OK, OK, who was dying of thirst here?] +;; [2614:Who's dying of thirst?] +; +[2617:the green knight grabs back the reins shouting, "Not so fast, +varlet." ] +[2618:ouch! That nearly broke a tooth! ] ; bite any treasure +; (intended for "bite golden apple") +[2619:it's out of stock.] +[2620:he is unconscious] +[2621:a key falls from under the mat] +[2622:the hermit stops ]; person +[2623:and says, "Oi! Keep your thieving hands off! ] +[2624:the Green Knight pushes him roughly to one side. ] +; +; messages used for "I've just stolen ... from a vile orc!" +[2625:a filthy orc] ; group... +;; [2626:a vile orc] +;; [2627:a treacherous orc] +; +; rapunzel, hello... +[2630:Rapunzel flutters her eyelashes, "Why, +hello little orc. Why dontcha come up and see me..." ] +; hermit, hello... +[2631:the hermit laughs at your accent. ] +[2632:suddenly, the gate opens. Two nymphs emerge, throw +out ] +[2633:, and dance back in. ] +[2634:the rope makes an effective trip-wire] +[2635:you will need to fix something to the rope and throw that] +; +; response for most people to "tell me about you" +[2636:I am perfect in every way] ; group... +;; [2637:I am totally perfect] +;; [2638:I am without flaw] +; +[2641:You look orcish to me] ; group... +;; [2642:You evil monster] +;; [2643:Something smells around here] +; +[2646:nothing special] +; +[3508:the body of ] ; this is needed! +[3509:oi! Let the dead rest in peace] +[3517:, but ] ; as in 'but he dodges' +; +[3520:enter] ; as in 'enters from the north' +; +; health reports +[3560:dead] +[3561:at death's door] +[3562:a wreck] +[3563:badly injured] +[3564:wounded] +[3565:injured] +[3566:hurt] +[3567:almost uninjured] +[3568:in good shape] +[3569:unhurt] +[3570:uninjured] ; and probably cheating! +; +; groupsay messages for hello responses... +[3580:says, "Hello there." ] ; group... +;; [3581:says, "Greetings." ] +;; [3582:says, "Hello to you." ] +; +[3585:nods. ] ; group... +;; [3586:flickers an eyelid. ] +;; [3587:snorts softly. ] +; +; groupsay messages for people recovering things that they +; need for racetracks etc. +[3590:says, "That's mine!" ] ; group... +;; [3591:says, "Give that to me." ] +;; [3592:says, "That's mine!" ] +; +[3595:snarls angrily. ] ; group... +;; [3596:snarls. ] +;; [3597:stops dead. ] +; +[3600:a voice in the distance shouts, "] +[3601:." ] +[3602:Wow! A stack overflow] ; a stack overflow! +[3603:Don't panic!] ; a panic +[3604:I can't go there from here. ] +[3605:you'll have to find the way yourself. ] +; +; some grouped responses for npcs +; two groups - those who can talk and those who can't +; first - npc refuses an order +[3610:refuses. ] ; group... +;; [3611:says, "Don't try to order ME around!" ] +;; [3612:says, "No way!" ] +; +[3615:curls its upper lip. ] ; group... +;; [3616:sneers at your request. ] +;; [3617:laughs hoarsely. ] +; +; now, npc accepts an order +[3620:says, "Sure." ] ; group... +;; [3621:says, "OK." ] +;; [3622:says, "Right." ] +; +[3625:nods slowly. ] ; group... +;; [3626:nods in agreement. ] +;; [3627:agrees. ] +; +; now response to questions when not obedient... +[3630:ignores your question. ] ; group... +;; [3631:says, "You'll have to find that out for yourself." ] +;; [3632:says, "You won't get any help from me." ] +; +[3635:makes a rude gesture. ] ; group... +;; [3636:pretends to ignore you. ] +;; [3637:snarls threateningly. ] +; +; response to requests to give anything(s) to anyone +[3640:says, "You'll have to fight me for that." ] ; group... +;; [3641:says, "I'd rather die." ] +;; [3642:says, "I'm not about to give anything away." ] +; +[3645:clutches his possessions angrily. ] ; group... +;; [3646:makes a rude gesture. ] +;; [3647:waves it at you defiantly. ] +; +; now responses when npc wants to obey orders just given, +; but can't understand any of them! +[3650:says, "Speak properly, orc." ] ; group... +;; [3651:says, "It must be your accent; I can't understand what +;; you're saying." ] +;; [3652:says, "Pardon?" ] +; +[3655:doesn't seem to understand. ] ; group... +;; [3656:shrugs in non-comprehension. ] +;; [3657:makes a questioning noise. ] +; +; message group when people are attacked by other people (probably player) +[3660:yells angrily. ] ; group... +;; [3661:says, "What's your game, buster?" ] +;; [3662:says, "OK, so that's the way you want it." ] +; +[3665:growls in fury. ] ; group... +;; [3666:growls viciously. ] +;; [3667:whirls around, ready to fight. ] +; +; now messages when people launch unprovoked attacks on the user +; these are followed by "and attacks you" +[3670:shouts, "An orc! Let's kill it!" ] ; group... +;; [3671:shouts, "Kill the orc!" ] +;; [3672:shouts, "I'm going to kill you, vile orc." ] +; +[3675:growls menacingly] ; group... +;; [3676:stares at you with obvious distaste] +;; [3677:leaps towards you] +; +; messages when npc can't find the way to its destination +[3680:says, "Where can it be?" ] ; group... +;; [3681:says, "I can't find it anywhere." ] +;; [3682:says, "I'm lost." ] +; +[3685:seems lost. ] ; group... +;; [3686:seems to give up. ] +;; [3687:looks around, then snorts in disgust. ] +; +[3690:says, "No way!" ] ; group... +;; [3691:says, "Nope, I won't do it." ] +;; [3692:says, "No chance." ] +; +[3695:laughs hoarsely. ] ; group... +;; [3696:sniggers a bit. ] +;; [3697:sighs heavily. ] +; +; now group say for people peering at you suspiciously +[3700:peers at you suspiciously. ] ; group... +;; [3701:looks at you curiously. ] +;; [3702:gives you a long stare. ] +; +[3705:peers at you suspiciously. ] ; group... +;; [3706:looks at you curiously. ] +;; [3707:gives you a long stare. ] +; +; Responses to player shouting... +[3715:Shut up, you stinking orc!] ; group... +;; [3716:Come to the crossroads and say that, orc.] +;; [3717:That sounds like an orc! Who wants to help me kill it?] +; +; 16 things which people shout at random... +[3720:Hey! Give that back!] +[3721:Stop attacking me!] +[3722:How do I get a drink from the Innkeeper?] +[3723:How do I get through the Paradise Gate?] +[3724:Does anyone have any treasure to spare?] +[3725:Can someone tell me about the well?] +[3726:Goodbye folks, I'm leaving.] +[3727:Help!] +[3728:Can anyone hear me?] +[3729:Are there any orcs listening?] +[3730:Right, you asked for it!] +[3731:I want some gold.] +[3732:Where is the gold?] +[3733:Who's stolen all the treasure?] +[3734:Anyone seen the orc? I want to kill it.] +[3735:Someone find me an orc to butcher.] +; 'a male voice shouts' type messages +[3736:a voice in the distance shouts, "] ; ita +[3737:a distant voice shouts, "] ; itan +[3738:a voice in the distance shouts, "] +[3739:a male voice in the distance shouts, "] ; he +[3740:a female voice in the distance shouts, "] ; she +[3741:a strained voice in the distance shouts, "] ; they +[3742:a distant voice shouts, "] ; you +; message group when people are fighting player... +[3743:I'm fighting a vile orc!] ; group... +;; [3744:I'm fighting an orc!] +;; [3745:I'm killing an orc!] +[3746:a voice in the dark says ] +;--- +; singing of gold messages... +[3750:yawns. ] +[3751:scratches himself. ] +[3752:looks around. ] +; +; default male gold singing... +[3753:mumbles quietly. ] +[3754:scratches himself. ] +[3755:whistles a happy tune. ] +; +; gold-singing for hermit +[3756:looks smugly at his trophy cabinet and laughs at you. ] +[3757:shakes with laughter at your curious appearance, "Would you +happen to have any interesting curios to spare?" he chuckles and +bursts out laughing again. ] +[3758:falls about laughing at you. ] +; +; female default gold singing.... +[3759:rearranges her clothing. ] +[3760:gives you a dirty look. ] +[3761:hums a little tune. ] +; +; default gold singing for animals +[3762:paws the ground. ] +[3763:stares at you. ] +[3764:paces up and down. ] +; +; people attack you at random - or when they realize you're an orc.. +[3862:shouts, "Kill the orc!" ] ; group... +;; [3861:shouts, "An orc - kill it!" ] +;; [3862:shouts, "Get that wretched orc!" ] +; +; when someone attacks someone else in an unprovoked way.. +[3863:screams and turns on you angrily. ] ; group... +;; [3864:says, "What's your game, buster?" ] +;; [3865:says, "OK, so that's the way you want it." ] +; +; messages when people suspect you're an orc.. +[3866:peers at you suspiciously. ] ; group... +;; [3867:seems to be eyeing you strangely. ] +;; [3868:comes up close and looks at you intently. ] +; +; when you give people presents of treasure... +; this will probably make them like you a bit. +[3872:bites it to test its value. ] ; group... +;; [3873:says, "Ooo.. thank you. What's wrong with it?" ] +;; [3874:examines it closely. ] +; +; when someone steals something from an NPC +[3875:is very annoyed. ] ; group... +;; [3876:shouts in surprise. ] +;; [3877:snarls menacingly. ] +; +; group shouting messages... +[3880:I've just stolen some treasure from ] ; group... +;; [3881:I've just ripped off ] +;; [3882:I've just stolen something from ] +; +[3885:I've just found a valuable ] ; group... +;; [3886:I've just picked up a valuable ] +;; [3887:I've got a valuable ] +; +[3890:I'm back in the game!] ; group... +;; [3891:I'm now back in the game!] +;; [3892:I'm back!] +; +; now some racetrack messages +[3900:the innkeeper polishes the bar. ] ; innkeeper +[3901:the innkeeper hums a little tune. ] ; innkeeper +; +; '^C' word types - see comment at start of descriptions +; +; Garbage words +; +[4000:^N the ^N this ^N these ^N that ^N some ^N a ^N and +^N good ^N of ^N there] +[4001:^N therefore ^N am ^N my ^N your ^N try ^N following +^N gold ^N golden ^N body ^N little ^N stone] +;------------------------------------------- +; +; Book protection code... +; +[4200:%A funny little gnome with a book appears on the horizon +and sprints towards you, yelling "Stop! To prove that you are +allowed to do that, look in this copy of The Sign of the Orc. ] +[4201:page ] +[4202:, line ] +[4203:, word ] +[4204:?"%] +[4205:The gnome grins nastily, "Guess again, orc! ] +[4206:The gnome runs away again.%] +[4207:What is the word at ] +[4208:"Wrong!" The gnome flattens you with the book. You scored a mere ] +; +[4301:^C a ^C wurden] +[4302:^C till ^C beide] +;; [4303:] +[4304:^C against ^C traute] +[4305:^C used ^C auf] +[4306:^C muttered ^C kehrt] +[4307:^C to ^C konnte] +[4308:^C ravine ^C in] +[4309:^C on ^C du] +;; [4310:] +; +[4311:^C in ^C das] +;; [4312:] +[4313:^C off ^C hilfe] +[4314:^C Orc's ^C Orcs ^C waren] +;; [4315:] +[4316:^C with ^C rannten] +;; [4317:] +;; [4318:] +[4319:^C have ^C blieb] +[4320:^C one ^N steal ^C ansonsten] +; +[4321:^C Sir ^C wohl] +[4322:^C to ^C leid] +;; [4323:] +[4324:^C had ^C drache] +;; [4325:] +;; [4326:] +;; [4327:] +;; [4328:] +[4329:^C terrible ^C ins] +[4330:^C tower ^C bist ^C du] +; +[4331:^C occasionally ^C seine] +[4332:^C she ^C Grok] +;; [4333:] +[4334:^C got ^C mit ^C du] +;; [4335:] +[4336:^C do ^C dich] +;; [4337:] +[4338:^C Grok ^N Grok-grok ^C Ork] +[4339:^C butter ^C der] +[4340:^C something ^C Barney] +; +[4341:^C idea ^C rief] +[4342:^C pachi ^C dort] +[4343:^C dark ^C dann] +;; [4344:] +[4345:^C noticed ^C am] +[4346:^C anybody ^C sich] +[4347:^C the ^C damit's ^N damits] +[4348:^C terrible ^C gute] +[4349:^C paused ^C gewesen] +[4350:^C he ^C Oink] +; +;; [4351:] +[4352:^C bowls ^C die] +[4353:^C weapons ^C da] +[4354:^C understand ^C oder] +;; [4355:] +[4356:^C just ^C lachte] +[4357:^C had ^C einer] +;; [4358:] +[4359:^C plucking ^C im] +;; [4360:] +; +;; [4361:] +[4362:^C jaws ^C der] +;; [4363:] +[4364:^C the ^C krachen] +[4365:^C frowned ^C gold] +[4366:^C slid ^C anderen] +[4367:^C out ^C verstaubten] +[4368:^C gold ^C Brandon] +;; [4369:] +[4370:^C furniture ^C zu] +; +[4371:^C it ^C so] +[4372:^C strewth ^C mit] +[4373:^C was ^C erst] +[4374:^C grow ^C gutes] +;; [4375:] +[4376:^C it ^C seinem] +[4377:^C cider ^C nie] +[4378:^C a ^C dann] +[4379:^C to ^C schier] +[4380:^C Grok ^C glaubt] +; +[4381:^C else ^C woher] +;; [4382:] +;; [4383:] +[4384:^C tavern ^C gelassen] +;; [4385:] +[4386:^C remarkably ^C was] +[4387:^C own ^C Jack] +[4388:^C right ^C Oh] +[4389:^C and ^C am] +;; [4390:] +; +[4391:^C of ^C so] +[4392:^C toss ^C und] +;; [4393:] +[4394:^C about ^C inzwischen] +[4395:^C sat ^C er] +;; [4396:] +[4397:^C Brandon ^C geist] +[4398:^C rather ^C hielt] +;; [4399:] +[4400:^C discovered ^C einmal] +; ------------------------------------------------------------------- diff --git a/l9dev/main.l9/squash.dat b/l9dev/main.l9/squash.dat new file mode 100644 index 0000000..86dc108 Binary files /dev/null and b/l9dev/main.l9/squash.dat differ diff --git a/l9dev/pccode.c b/l9dev/pccode.c new file mode 100644 index 0000000..28dc1c7 --- /dev/null +++ b/l9dev/pccode.c @@ -0,0 +1,627 @@ +// Code generation section specific to particular processors +// +// 8086 version. N.W.Austin 18/7/88 +// +// Copyright (C) 1988-1989 Level 9 Computing +// +// last change 18/7/88 +// +// Linux adaptation in sync with: +// 68000 Acode to 8086 cross-compiler 1.53 +// Copyright (C) 1989 Level 9 Computing +// Mike Austin 14/11/89 +// Nick Austin 15/2/89 +// (complete source still missing) +// + +#include "code.h" + +// gamedata segment (in 1.5) contains: +// 0,1 PC for return to acode +// 2,3 Acode INT segment +// 4,5 Address of start of table 0 +// 6,7 Segment paragraph containing table 0 +// 8-35 Addresses of lists 1 thru 9 +// 36-141 Addresses of lists 10 thru 31 +// 142 RET instrction +// 143 Not used +// 144-2191 Vars and temp lists +// 2192+ Gamedata (includes acode and permanent tables) + +// +// data tables for ALL instructions +// one word per byte which goes into code. +// If the high byte of the word is zero, the low byte +// is used immediately as code. +// if the high byte is non-zero, it codes information as follows: +// bit 15 set: use high byte of argument as byte of code +// bit 14 set: substitute argument 1 for the current byte +// bit 13 set: substitute argument 2 for the current byte +// convention: arguments are given in the same order as in +// the acode source. +// + +uint8_t i8086DataShortGoto[] = { + // jmp short + 1, + 0x00, 0xEB, +}; + +uint8_t i8086DataLongGoto[] = { + // jmp near + 1, + 0x00, 0xE9, +}; + +uint8_t i8086DataShortGosub[] = { + // 8086 does not have short gosub + 0, +}; + +uint8_t i8086DataLongGosub[] = { + // call near + 1, + 0x00, 0xE8, +}; + +uint8_t i8086DataReturn[] = { + // ret near + 1, + 0x00, 0xC3, +}; + +uint8_t i8086DataToAcode[] = { + // mov bx,offset label + // mov di,0 + // jmp far cs:[di] + // label: + 9, // length also used in 'MCToAcode' + 0x00, 0xBB, + 0x40, 0x00, 0xC0, 0x00, // D4.w + 0x00, 0xBF, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x2E, + 0x00, 0xFF, + 0x00, 0x2D, +}; + +uint8_t i8086DataLetVC[] = { // i.e. Let V1=CCCC + // mov ds:V1,C1 + 6, + 0x00, 0xC7, + 0x00, 0x06, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x20, 0x00, 0xA0, 0x00, // C1 +}; + +uint8_t i8086DataLetVV[] = { // i.e. Let V1=V2 + // mov ax,ds:[V2] + // mov ds:[V1],ax + 6, + 0x00, 0xA1, + 0x20, 0x00, 0xA0, 0x00, // V2 + 0x00, 0xA3, + 0x40, 0x00, 0xC0, 0x00, // V1 +}; + +uint8_t i8086DataAddVV[] = { // i.e. ADD V1,V2: V1:=V1+V2 + // mov ax,ds:V2 + // add ds:V1,ax + 7, + 0x00, 0xA1, + 0x20, 0x00, 0xA0, 0x00, // V2 + 0x00, 0x01, + 0x00, 0x06, + 0x40, 0x00, 0xC0, 0x00, // V1 +}; + +uint8_t i8086DataSubVV[] = { // i.e. SUB V1,V2: V1:=V1-V2 + // mov ax,ds:V2 + // sub ds:V1,ax + 7, + 0x00, 0xA1, + 0x20, 0x00, 0xa0, 0x00, // V2 + 0x00, 0x29, + 0x00, 0x06, + 0x40, 0x00, 0xC0, 0x00, // V1 +}; + +uint8_t i8086DataIfNEVCShort[] = { // i.e. IF V<>C THEN label + // cmp ds:V,C + // jnz + 7, + 0x00, 0x81, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x20, 0x00, 0xA0, 0x00, // C1 + 0x00, 0x75, +}; + +uint8_t i8086DataIfNEVCLong[] = { // i.e. IF V<>C THEN @label + // cmp ds:V1,C1 + // jz+3 + // jmp + 9, + 0x00, 0x81, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x20, 0x00, 0xA0, 0x00, // C1 + 0x00, 0x74, + 0x00, 0x03, + 0x00, 0xE9, // jmp +}; + +uint8_t i8086DataIfEQVCShort[] = { // i.e. IF V=C THEN label + // cmp ds:V1,C1 + // jz + 7, + 0x00, 0x81, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x20, 0x00, 0xA0, 0x00, // C1 + 0x00, 0x74, +}; + +uint8_t i8086DataIfEQVCLong[] = { // i.e. IF V=C THEN @label + // cmp ds:V1,C1 + // jnz+3 + // jmp + 9, + 0x00, 0x81, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x20, 0x00, 0xA0, 0x00, // C1 + 0x00, 0x75, + 0x00, 0x03, + 0x00, 0xE9, // jmp +}; + +uint8_t i8086DataIfLTVCShort[] = { // i.e. IF VNICK 23/11/88 // jl + 7, + 0x00, 0x81, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x20, 0x00, 0xA0, 0x00, // C1 + 0x00, 0x72, // >NICK 23/11/88 0x00, 0x7C, +}; + +uint8_t i8086DataIfLTVCLong[] = { // i.e. IF VNICK 23/11/88 // jge+3 + // jmp + 9, + 0x00, 0x81, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x20, 0x00, 0xA0, 0x00, // C1 + 0x00, 0x73, // >NICK 23/11/88 0x00, 0x7D, + 0x00, 0x03, + 0x00, 0xE9, // jmp +}; + +uint8_t i8086DataIfGTVCShort[] = { // i.e. IF V>C THEN label + // cmp ds:V1,C1 + // ja // >NICK 23/11/88 // jg + 7, + 0x00, 0x81, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x20, 0x00, 0xA0, 0x00, // C1 + 0x00, 0x77, // >NICK 23/11/88 0x00, 0x7F, +}; + +uint8_t i8086DataIfGTVCLong[] = { // i.e. IF V>C THEN @label + // cmp ds:V1,C1 + // jbe +3 // >NICK 23/11/88 // jle +3 + // jmp + 9, + 0x00, 0x81, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x20, 0x00, 0xA0, 0x00, // C1 + 0x00, 0x76, // >NICK 23/11/88 0x00, 0x7E, + 0x00, 0x03, + 0x00, 0xE9, // jmp +}; + +uint8_t i8086DataIfNEVVShort[] = { // i.e. IF V<>V1 THEN label + // mov ax,ds:V + // cmp ax,ds:V1 + // jnz + 8, + 0x00, 0xA1, + 0x40, 0x00, 0xC0, 0x00, // V + 0x00, 0x3B, + 0x00, 0x06, + 0x20, 0x00, 0xA0, 0x00, // V1 + 0x00, 0x75, +}; + +uint8_t i8086DataIfNEVVLong[] = { // i.e. IF V<>V1 THEN @label + // mov ax,ds:V + // cmp ax,ds:V1 + // jz +3 + // jmp + 10, + 0x00, 0xA1, + 0x40, 0x00, 0xC0, 0x00, // V + 0x00, 0x3B, + 0x00, 0x06, + 0x20, 0x00, 0xA0, 0x00, // V1 + 0x00, 0x74, + 0x00, 0x03, + 0x00, 0xE9, // jmp +}; + +uint8_t i8086DataIfEQVVShort[] = { // i.e. IF V=V1 THEN label + // mov ax,ds:V + // cmp ax,ds:V1 + // jz + 8, + 0x00, 0xA1, + 0x40, 0x00, 0xC0, 0x00, + 0x00, 0x3B, + 0x00, 0x06, + 0x20, 0x00, 0xA0, 0x00, + 0x00, 0x74, +}; + +uint8_t i8086DataIfEQVVLong[] = { // i.e. IF V=V1 THEN @label + // mov ax,ds:V + // cmp ax,ds:V1 + // jnz +3 + // jmp + 10, + 0x00, 0xA1, + 0x40, 0x00, 0xC0, 0x00, // V + 0x00, 0x3B, + 0x00, 0x06, + 0x20, 0x00, 0xA0, 0x00, // V1 + 0x00, 0x75, + 0x00, 0x03, + 0x00, 0xE9, // jmp +}; + +uint8_t i8086DataIfLTVVShort[] = { // i.e. IF VNICK 23/11/88 // jl + 8, + 0x00, 0xA1, + 0x40, 0x00, 0xC0, 0x00, // V + 0x00, 0x3B, + 0x00, 0x06, + 0x20, 0x00, 0xA0, 0x00, // V1 + 0x00, 0x72, // >NICK 23/11/88 0x00, 0x7C, +}; + +uint8_t i8086DataIfLTVVLong[] = { // i.e. IF VNICK 23/11/88 // jge +3 + // jmp + 10, + 0x00, 0xA1, + 0x40, 0x00, 0xC0, 0x00, // V + 0x00, 0x3B, + 0x00, 0x06, + 0x20, 0x00, 0xA0, 0x00, // V1 + 0x00, 0x73, // >NICK 23/11/88 0x00, 0x7D, + 0x00, 0x03, + 0x00, 0xE9, // jmp +}; + +uint8_t i8086DataIfGTVVShort[] = { // i.e. IF V>V1 THEN label + // mov ax,ds:V + // cmp ax,ds:V1 + // ja // >NICK 23/11/88 // jg + 8, + 0x00, 0xA1, + 0x40, 0x00, 0xC0, 0x00, // V + 0x00, 0x3B, + 0x00, 0x06, + 0x20, 0x00, 0xA0, 0x00, // V1 + 0x00, 0x77, // >NICK 22/11/88 0x00, 0x7F, +}; + +uint8_t i8086DataIfGTVVLong[] = { // i.e. IF V>V1 THEN @label + // mov ax,ds:V + // cmp ax,ds:V1 + // jbe +3 // >NICK 23/11/88 // jle +3 + // jmp + 10, + 0x00, 0xA1, + 0x40, 0x00, 0xC0, 0x00, // V + 0x00, 0x3B, + 0x00, 0x06, + 0x20, 0x00, 0xA0, 0x00, // V1 + 0x00, 0x76, // >NICK 23/11/88 0x00, 0x7E, + 0x00, 0x03, + 0x00, 0xE9, // jmp +}; + +uint8_t *i8086MCIfVVTable[8] = { + // first the short branch versions... + i8086DataIfEQVVShort, + i8086DataIfNEVVShort, + i8086DataIfLTVVShort, + i8086DataIfGTVVShort, + + i8086DataIfEQVVLong, + i8086DataIfNEVVLong, + i8086DataIfLTVVLong, + i8086DataIfGTVVLong, +}; + +uint8_t *i8086MCIfVCTable[8] = { + i8086DataIfEQVCShort, + i8086DataIfNEVCShort, + i8086DataIfLTVCShort, + i8086DataIfGTVCShort, + + i8086DataIfEQVCLong, + i8086DataIfNEVCLong, + i8086DataIfLTVCLong, + i8086DataIfGTVCLong, +}; + +uint8_t i8086DataAttVV[] = { // i.e. TableN(V1)=V2 + // les di,ds:N + // add di,ds:V1 + // mov al,ds:V2 + // stosb + 12, + 0x00, 0xC4, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // N + 0x00, 0x03, + 0x00, 0x3E, + 0x20, 0x00, 0xA0, 0x00, // V1 + 0x00, 0xA0, + 0x10, 0x00, 0x90, 0x00, // V2 + 0x00, 0xAA, +}; + +uint8_t i8086DataAttCV[] = { // i.e. TableN(C)=V + // les ds:N + // mov al,ds:V + // mov es:C[si],al + 12, + 0x00, 0xC4, + 0x00, 0x36, + 0x40, 0x00, 0xC0, 0x00, // N + 0x00, 0xA0, + 0x10, 0x00, 0x90, 0x00, // V + 0x00, 0x26, + 0x00, 0x88, + 0x00, 0x84, // Short constant is available + 0x20, 0x00, 0xA0, 0x00, // C +}; + +uint8_t i8086DataAftVV[] = { // i.e. V2=TableN(V1) + // les ds:N + // mov bx,ds:V1 + // mov dl,es:[si+bx] + // mov ds:V2,dx // DH is always zero in m/c + 15, + 0x00, 0xC4, + 0x00, 0x36, + 0x20, 0x00, 0xA0, 0x00, // N + 0x00, 0x8B, + 0x00, 0x1E, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x00, 0x26, + 0x00, 0x8A, + 0x00, 0x10, + 0x00, 0x89, + 0x00, 0x16, + 0x10, 0x00, 0x90, 0x00, // V2 +}; + +uint8_t i8086DataAftVC[] = { // i.e. V=TableN(C) + // les ds:N + // mov dl,es:C[si] + // mov ds:V,dx + 13, + 0x00, 0xC4, + 0x00, 0x36, + 0x20, 0x00, 0xA0, 0x00, // N + 0x00, 0x26, + 0x00, 0x8A, // Can be optimised for CC<256 + 0x00, 0x94, + 0x10, 0x00, 0x90, 0x00, // C + 0x00, 0x89, + 0x00, 0x16, + 0x40, 0x00, 0xC0, 0x00, // V +}; + +uint8_t i8086DataAttVV16[] = { // i.e. &TableN(V1)=V2 + // les di,ds:N + // add di,ds:V1 + // mov ax,ds:V2 + // xchg ah,al + // stosw + 14, + 0x00, 0xC4, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // N + 0x00, 0x03, + 0x00, 0x3E, + 0x20, 0x00, 0xA0, 0x00, // V1 + 0x00, 0xA1, + 0x10, 0x00, 0x90, 0x00, // V2 + 0x00, 0x86, + 0x00, 0xE0, + 0x00, 0xAB, +}; + +uint8_t i8086DataAttCV16[] = { // i.e. &TableN(C)=V + // les ds:N + // mov ax,ds:V + // xchg ah,al + // mov es:C[si],ax + 14, + 0x00, 0xC4, + 0x00, 0x36, + 0x40, 0x00, 0xC0, 0x00, // N + 0x00, 0xA1, + 0x10, 0x00, 0x90, 0x00, // V + 0x00, 0x86, + 0x00, 0xE0, + 0x00, 0x26, + 0x00, 0x89, // Optimise for CC<256 + 0x00, 0x84, + 0x20, 0x00, 0xA0, 0x00, // C +}; + +uint8_t i8086DataAftVV16[] = { // i.e. &V2=TableN(V1) + // les si,ds:N + // add si,ds:V1 + // lods es:[si] + // xchg ah,al + // mov ds:V2,ax + 15, + 0x00, 0xC4, + 0x00, 0x36, + 0x20, 0x00, 0xA0, 0x00, // N + 0x00, 0x03, + 0x00, 0x36, + 0x40, 0x00, 0xC0, 0x00, // V1 + 0x00, 0x26, + 0x00, 0xAD, + 0x00, 0x86, + 0x00, 0xE0, + 0x00, 0xA3, + 0x10, 0x00, 0x90, 0x00, // V2 +}; + +uint8_t i8086DataAftVC16[] = { // i.e. &V=TableN(C) + // les si,ds:[n] + // mov ax,es:[si+C] + // xchg ah,al + // mov ds:V,ax + 14, + 0x00, 0xC4, + 0x00, 0x36, + 0x20, 0x00, 0xA0, 0x00, // N + 0x00, 0x26, + 0x00, 0x8B, // Optimise for CC<256 + 0x00, 0x84, + 0x10, 0x00, 0x90, 0x00, // C + 0x00, 0x86, + 0x00, 0xE0, + 0x00, 0xA3, + 0x40, 0x00, 0xC0, 0x00, +}; + +uint8_t i8086DataBreakPt[] = { + 1, + 0x00, 0xCC, +}; + +uint8_t i8086DataPush[] = { + // mov ax,ds:V + // push ax + 4, + 0x00, 0xA1, + 0x40, 0x00, 0xC0, 0x00, // V + 0x00, 0x50, +}; + +uint8_t i8086DataPop[] = { + // pop ax + // mov ds:V,ax + 4, + 0x00, 0x58, + 0x00, 0xA3, + 0x40, 0x00, 0xC0, 0x00, // V +}; + +uint8_t i8086DataAndVV[] = { + // mov ax,ds:V2 + // and ds:V1,ax + 7, + 0x00, 0xA1, + 0x20, 0x00, 0xA0, 0x00, // V2 + 0x00, 0x21, + 0x00, 0x06, + 0x40, 0x00, 0xC0, 0x00, // V1 +}; + +uint8_t i8086DataOrVV[] = { + // mov ax,ds:V2 + // or ds:V1,ax + 7, + 0x00, 0xA1, + 0x20, 0x00, 0xA0, 0x00, // V2 + 0x00, 0x09, + 0x00, 0x06, + 0x40, 0x00, 0xC0, 0x00, // V1 +}; + +uint8_t i8086DataXorVV[] = { + // mov ax,ds:V2 + // xor ds:V1,ax + 7, + 0x00, 0xA1, + 0x20, 0x00, 0xA0, 0x00, // V2 + 0x00, 0x31, + 0x00, 0x06, + 0x40, 0x00, 0xC0, 0x00, // V1 +}; + +uint8_t i8086DataASR[] = { + // sar ds:V1,1 + 4, + 0x00, 0xD1, + 0x00, 0x3E, + 0x40, 0x00, 0xC0, 0x00, // V1 +}; + +// i8086 code data table +struct _datatable i8086DataTable = { + i8086DataShortGoto, + i8086DataLongGoto, + i8086DataShortGosub, + i8086DataLongGosub, + i8086DataReturn, + i8086DataToAcode, + i8086DataLetVC, + i8086DataLetVV, + i8086DataAddVV, + i8086DataSubVV, + i8086DataIfNEVCShort, + i8086DataIfNEVCLong, + i8086DataIfEQVCShort, + i8086DataIfEQVCLong, + i8086DataIfLTVCShort, + i8086DataIfLTVCLong, + i8086DataIfGTVCShort, + i8086DataIfGTVCLong, + i8086DataIfNEVVShort, + i8086DataIfNEVVLong, + i8086DataIfEQVVShort, + i8086DataIfEQVVLong, + i8086DataIfLTVVShort, + i8086DataIfLTVVLong, + i8086DataIfGTVVShort, + i8086DataIfGTVVLong, + i8086DataAttVV, + i8086DataAttCV, + i8086DataAftVV, + i8086DataAftVC, + i8086DataAttVV16, + i8086DataAttCV16, + i8086DataAftVV16, + i8086DataAftVC16, + i8086DataBreakPt, + i8086DataPush, + i8086DataPop, + i8086DataAndVV, + i8086DataOrVV, + i8086DataXorVV, + i8086DataASR, +}; diff --git a/l9dev/regress/compile.bat b/l9dev/regress/compile.bat new file mode 100644 index 0000000..e9ff9c1 --- /dev/null +++ b/l9dev/regress/compile.bat @@ -0,0 +1,3 @@ +6 +1errors.txt +0 diff --git a/l9dev/regress/compile.log b/l9dev/regress/compile.log new file mode 100644 index 0000000..b1844e0 --- /dev/null +++ b/l9dev/regress/compile.log @@ -0,0 +1,1968 @@ +Compiling Knight Orc part 1 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. spec48.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 34264 bytes. +Number of modifications = 95. +Number of text characters = 26519. + +Phase 3 - Construct 'Frequency Table' + +Line number = 55. Line number = 95. Line number = 135. Line number = 184. Line number = 237. Line number = 276. Line number = 314. Line number = 357. Line number = 408. Line number = 451. Line number = 487. Line number = 524. Line number = 570. Line number = 615. Line number = 678. Line number = 744. Line number = 863. Line number = 928. Line number = 969. Line number = 1044. Line number = 1101. Line number = 1151. Line number = 1200. Line number = 1252. Line number = 1336. Line number = 1423. Line number = 1495. Line number = 1605. Line number = 1661. Line number = 1749. Line number = 1801. Line number = 1848. + +Number of 'words' = 1791. +Length of 'Frequency Table' = 15713 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 55. Line number = 95. Line number = 135. Line number = 184. Line number = 237. Line number = 276. Line number = 314. Line number = 357. Line number = 408. Line number = 451. Line number = 487. Line number = 524. Line number = 570. Line number = 615. Line number = 678. Line number = 744. Line number = 863. Line number = 928. Line number = 969. Line number = 1044. Line number = 1101. Line number = 1151. Line number = 1200. Line number = 1252. Line number = 1336. Line number = 1423. Line number = 1495. Line number = 1605. Line number = 1661. Line number = 1749. Line number = 1801. Line number = 1848. + +Longest compressed message = 224 bytes. +Length compressed Message Desriptors = 9859 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 56410 bytes. +Number of characters = 26519. Number of words = 1791. + +File 'squash.dat' length = 16423 bytes. +Compressed size of message descriptors = 9859 bytes. +Compressed size of word dictionary = 5875 bytes. +Compression = 61% of filesize = 39% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file 'mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'c1.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'converse.txt'. End of source file. +Compiling file 'npc.txt'. End of source file. +Compiling file 'oops.txt'. End of source file. +Compiling file 'book.txt'. End of source file. + +Number of vars=230 +Number of source lines=11709 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. spec48.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Knight Orc part 2 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. msx.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 51022 bytes. +Number of modifications = 138. +Number of text characters = 40739. + +Phase 3 - Construct 'Frequency Table' + +Line number = 65. Line number = 102. Line number = 135. Line number = 181. Line number = 228. Line number = 265. Line number = 304. Line number = 341. Line number = 375. Line number = 422. Line number = 466. Line number = 514. Line number = 564. Line number = 605. Line number = 657. Line number = 700. Line number = 752. Line number = 792. Line number = 886. Line number = 942. Line number = 982. Line number = 1031. Line number = 1083. Line number = 1131. Line number = 1191. Line number = 1238. Line number = 1299. Line number = 1361. Line number = 1412. Line number = 1456. Line number = 1511. Line number = 1567. Line number = 1617. Line number = 1667. Line number = 1715. Line number = 1777. Line number = 1831. Line number = 1874. Line number = 1927. Line number = 1976. Line number = 2018. Line number = 2073. Line number = 2124. Line number = 2177. + +Number of 'words' = 2246. +Length of 'Frequency Table' = 20134 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 65. Line number = 102. Line number = 135. Line number = 181. Line number = 228. Line number = 265. Line number = 304. Line number = 341. Line number = 375. Line number = 422. Line number = 466. Line number = 514. Line number = 564. Line number = 605. Line number = 657. Line number = 700. Line number = 752. Line number = 792. Line number = 886. Line number = 942. Line number = 982. Line number = 1031. Line number = 1083. Line number = 1131. Line number = 1191. Line number = 1238. Line number = 1299. Line number = 1361. Line number = 1412. Line number = 1456. Line number = 1511. Line number = 1567. Line number = 1617. Line number = 1667. Line number = 1715. Line number = 1777. Line number = 1831. Line number = 1874. Line number = 1927. Line number = 1976. Line number = 2018. Line number = 2073. Line number = 2124. Line number = 2177. + +Longest compressed message = 146 bytes. +Length compressed Message Desriptors = 14638 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 76456 bytes. +Number of characters = 40739. Number of words = 2246. + +File 'squash.dat' length = 22661 bytes. +Compressed size of message descriptors = 14638 bytes. +Compressed size of word dictionary = 7334 bytes. +Compression = 55% of filesize = 45% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file '../knight1.l9/aconst.txt'. End of source file. +Compiling file '../knight1.l9/mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file 'c2.txt'. End of source file. +Compiling file '../knight1.l9/aparse.txt'. End of source file. +Compiling file '../knight1.l9/acore.txt'. End of source file. +Compiling file '../knight1.l9/converse.txt'. End of source file. +Compiling file '../knight1.l9/npc.txt'. End of source file. +Compiling file '../knight1.l9/oops.txt'. End of source file. +Compiling file '../knight1.l9/book.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. + +Number of vars=254 +Number of source lines=13744 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. msx.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Knight Orc part 3 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. msx.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 52658 bytes. +Number of modifications = 159. +Number of text characters = 42521. + +Phase 3 - Construct 'Frequency Table' + +Line number = 64. Line number = 101. Line number = 133. Line number = 178. Line number = 223. Line number = 260. Line number = 299. Line number = 337. Line number = 371. Line number = 416. Line number = 459. Line number = 505. Line number = 555. Line number = 602. Line number = 662. Line number = 711. Line number = 762. Line number = 797. Line number = 888. Line number = 948. Line number = 988. Line number = 1036. Line number = 1086. Line number = 1130. Line number = 1185. Line number = 1237. Line number = 1302. Line number = 1369. Line number = 1427. Line number = 1470. Line number = 1515. Line number = 1563. Line number = 1611. Line number = 1665. Line number = 1706. Line number = 1767. Line number = 1822. Line number = 1867. Line number = 1916. Line number = 1967. Line number = 2008. Line number = 2063. Line number = 2119. Line number = 2171. + +Number of 'words' = 2270. +Length of 'Frequency Table' = 20268 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 64. Line number = 101. Line number = 133. Line number = 178. Line number = 223. Line number = 260. Line number = 299. Line number = 337. Line number = 371. Line number = 416. Line number = 459. Line number = 505. Line number = 555. Line number = 602. Line number = 662. Line number = 711. Line number = 762. Line number = 797. Line number = 888. Line number = 948. Line number = 988. Line number = 1036. Line number = 1086. Line number = 1130. Line number = 1185. Line number = 1237. Line number = 1302. Line number = 1369. Line number = 1427. Line number = 1470. Line number = 1515. Line number = 1563. Line number = 1611. Line number = 1665. Line number = 1706. Line number = 1767. Line number = 1822. Line number = 1867. Line number = 1916. Line number = 1967. Line number = 2008. Line number = 2063. Line number = 2119. Line number = 2171. + +Longest compressed message = 257 bytes. +Length compressed Message Desriptors = 15207 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 73445 bytes. +Number of characters = 42521. Number of words = 2270. + +File 'squash.dat' length = 23379 bytes. +Compressed size of message descriptors = 15207 bytes. +Compressed size of word dictionary = 7483 bytes. +Compression = 54% of filesize = 46% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file '../knight1.l9/aconst.txt'. End of source file. +Compiling file '../knight1.l9/mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file 'c2.txt'. End of source file. +Compiling file '../knight1.l9/aparse.txt'. End of source file. +Compiling file '../knight1.l9/acore.txt'. End of source file. +Compiling file '../knight1.l9/converse.txt'. End of source file. +Compiling file '../knight1.l9/npc.txt'. End of source file. +Compiling file '../knight1.l9/oops.txt'. End of source file. +Compiling file '../knight1.l9/book.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. + +Number of vars=254 +Number of source lines=13744 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. msx.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Lancelot part 1 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. main.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 75714 bytes. +Number of modifications = 307. +Number of text characters = 65784. + +Phase 3 - Construct 'Frequency Table' + +Line number = 67. Line number = 108. Line number = 163. Line number = 225. Line number = 284. Line number = 327. Line number = 380. Line number = 429. Line number = 498. Line number = 633. Line number = 771. Line number = 824. Line number = 964. Line number = 1110. Line number = 1252. Line number = 1296. Line number = 1344. Line number = 1386. Line number = 1468. Line number = 1580. Line number = 1669. Line number = 1718. Line number = 1793. Line number = 1847. Line number = 1961. Line number = 2060. Line number = 2136. Line number = 2174. Line number = 2215. Line number = 2253. Line number = 2304. Line number = 2366. Line number = 2418. Line number = 2458. Line number = 2497. Line number = 2566. Line number = 2626. Line number = 2686. Line number = 2724. Line number = 2762. + +Number of 'words' = 3022. +Length of 'Frequency Table' = 27601 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 67. Line number = 108. Line number = 163. Line number = 225. Line number = 284. Line number = 327. Line number = 380. Line number = 429. Line number = 498. Line number = 633. Line number = 771. Line number = 824. Line number = 964. Line number = 1110. Line number = 1252. Line number = 1296. Line number = 1344. Line number = 1386. Line number = 1468. Line number = 1580. Line number = 1669. Line number = 1718. Line number = 1793. Line number = 1847. Line number = 1961. Line number = 2060. Line number = 2136. Line number = 2174. Line number = 2215. Line number = 2253. Line number = 2304. Line number = 2366. Line number = 2418. Line number = 2458. Line number = 2497. Line number = 2566. Line number = 2626. Line number = 2686. Line number = 2724. Line number = 2762. + +Longest compressed message = 376 bytes. +Length compressed Message Desriptors = 21102 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 107885 bytes. +Number of characters = 65784. Number of words = 3022. + +File 'squash.dat' length = 31924 bytes. +Compressed size of message descriptors = 21102 bytes. +Compressed size of word dictionary = 10141 bytes. +Compression = 48% of filesize = 52% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file '../lancelt2.l9/aconst.txt'. End of source file. +Compiling file 'mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file '../lancelt2.l9/chain.txt'. End of source file. +Compiling file '../lancelt2.l9/aparse.txt'. End of source file. +Compiling file '../lancelt2.l9/acore.txt'. End of source file. +Compiling file '../lancelt2.l9/converse.txt'. End of source file. +Compiling file '../lancelt2.l9/npc.txt'. End of source file. +Compiling file '../lancelt2.l9/oops.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file '../lancelt2.l9/score.txt'. End of source file. +Compiling file '../lancelt2.l9/book.txt'. End of source file. + +Number of vars=255 +Number of source lines=11270 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. main.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Lancelot part 2 + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. main.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 85598 bytes. +Number of modifications = 336. +Number of text characters = 73950. + +Phase 3 - Construct 'Frequency Table' + +Line number = 45. Line number = 86. Line number = 140. Line number = 201. Line number = 261. Line number = 302. Line number = 339. Line number = 390. Line number = 437. Line number = 504. Line number = 626. Line number = 730. Line number = 834. Line number = 904. Line number = 968. Line number = 1036. Line number = 1161. Line number = 1313. Line number = 1488. Line number = 1657. Line number = 1813. Line number = 1964. Line number = 2018. Line number = 2062. Line number = 2141. Line number = 2213. Line number = 2286. Line number = 2342. Line number = 2424. Line number = 2487. Line number = 2553. Line number = 2601. Line number = 2687. Line number = 2753. Line number = 2791. Line number = 2873. Line number = 2970. Line number = 3016. Line number = 3089. Line number = 3168. Line number = 3234. Line number = 3271. Line number = 3307. + +Number of 'words' = 3207. +Length of 'Frequency Table' = 29134 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 45. Line number = 86. Line number = 140. Line number = 201. Line number = 261. Line number = 302. Line number = 339. Line number = 390. Line number = 437. Line number = 504. Line number = 626. Line number = 730. Line number = 834. Line number = 904. Line number = 968. Line number = 1036. Line number = 1161. Line number = 1313. Line number = 1488. Line number = 1657. Line number = 1813. Line number = 1964. Line number = 2018. Line number = 2062. Line number = 2141. Line number = 2213. Line number = 2286. Line number = 2342. Line number = 2424. Line number = 2487. Line number = 2553. Line number = 2601. Line number = 2687. Line number = 2753. Line number = 2791. Line number = 2873. Line number = 2970. Line number = 3016. Line number = 3089. Line number = 3168. Line number = 3234. Line number = 3271. Line number = 3307. + +Longest compressed message = 227 bytes. +Length compressed Message Desriptors = 23823 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 122326 bytes. +Number of characters = 73950. Number of words = 3207. + +File 'squash.dat' length = 35117 bytes. +Compressed size of message descriptors = 23823 bytes. +Compressed size of word dictionary = 10613 bytes. +Compression = 47% of filesize = 53% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file '../lancelt1.l9/mconst.txt'. End of source file. +Compiling file '../lancelt1.l9/sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file 'chain.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'converse.txt'. End of source file. +Compiling file 'npc.txt'. End of source file. +Compiling file 'oops.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'book.txt'. End of source file. +Compiling file 'score.txt'. End of source file. + +Number of vars=255 +Number of source lines=12430 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Can't find file on disk. +Loading table.dat +Can't find file on disk. + A .. main.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Lancelot part 3 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. main.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 75634 bytes. +Number of modifications = 251. +Number of text characters = 64964. + +Phase 3 - Construct 'Frequency Table' + +Line number = 64. Line number = 103. Line number = 155. Line number = 213. Line number = 272. Line number = 335. Line number = 396. Line number = 442. Line number = 526. Line number = 681. Line number = 792. Line number = 831. Line number = 972. Line number = 1113. Line number = 1301. Line number = 1447. Line number = 1495. Line number = 1546. Line number = 1596. Line number = 1683. Line number = 1792. Line number = 1878. Line number = 1949. Line number = 2035. Line number = 2100. Line number = 2154. Line number = 2210. Line number = 2253. Line number = 2317. Line number = 2384. Line number = 2443. Line number = 2484. Line number = 2523. Line number = 2573. Line number = 2656. Line number = 2699. Line number = 2737. Line number = 2775. Line number = 2825. Line number = 2869. Line number = 2910. Line number = 2947. + +Number of 'words' = 2905. +Length of 'Frequency Table' = 26421 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 64. Line number = 103. Line number = 155. Line number = 213. Line number = 272. Line number = 335. Line number = 396. Line number = 442. Line number = 526. Line number = 681. Line number = 792. Line number = 831. Line number = 972. Line number = 1113. Line number = 1301. Line number = 1447. Line number = 1495. Line number = 1546. Line number = 1596. Line number = 1683. Line number = 1792. Line number = 1878. Line number = 1949. Line number = 2035. Line number = 2100. Line number = 2154. Line number = 2210. Line number = 2253. Line number = 2317. Line number = 2384. Line number = 2443. Line number = 2484. Line number = 2523. Line number = 2573. Line number = 2656. Line number = 2699. Line number = 2737. Line number = 2775. Line number = 2825. Line number = 2869. Line number = 2910. Line number = 2947. + +Longest compressed message = 193 bytes. +Length compressed Message Desriptors = 21243 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 108702 bytes. +Number of characters = 64964. Number of words = 2905. + +File 'squash.dat' length = 31513 bytes. +Compressed size of message descriptors = 21243 bytes. +Compressed size of word dictionary = 9585 bytes. +Compression = 48% of filesize = 52% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file '../lancelt2.l9/aconst.txt'. End of source file. +Compiling file '../lancelt1.l9/mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file '../lancelt2.l9/chain.txt'. End of source file. +Compiling file '../lancelt2.l9/aparse.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file '../lancelt2.l9/converse.txt'. End of source file. +Compiling file '../lancelt2.l9/npc.txt'. End of source file. +Compiling file '../lancelt2.l9/oops.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file '../lancelt2.l9/score.txt'. End of source file. +Compiling file '../lancelt2.l9/book.txt'. End of source file. + +Number of vars=226 +Number of source lines=11528 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. main.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Ingrid's Back part 1 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. main.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 86946 bytes. +Number of modifications = 440. +Number of text characters = 77370. + +Phase 3 - Construct 'Frequency Table' + +Line number = 70. Line number = 107. Line number = 159. Line number = 216. Line number = 284. Line number = 335. Line number = 378. Line number = 421. Line number = 469. Line number = 558. Line number = 723. Line number = 891. Line number = 927. Line number = 1057. Line number = 1204. Line number = 1352. Line number = 1399. Line number = 1443. Line number = 1512. Line number = 1579. Line number = 1633. Line number = 1705. Line number = 1811. Line number = 1856. Line number = 1909. Line number = 1954. Line number = 2005. Line number = 2072. Line number = 2142. Line number = 2189. Line number = 2243. Line number = 2310. Line number = 2355. Line number = 2404. Line number = 2501. Line number = 2603. Line number = 2736. Line number = 2819. Line number = 2901. + +Number of 'words' = 3022. +Length of 'Frequency Table' = 27642 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 70. Line number = 107. Line number = 159. Line number = 216. Line number = 284. Line number = 335. Line number = 378. Line number = 421. Line number = 469. Line number = 558. Line number = 723. Line number = 891. Line number = 927. Line number = 1057. Line number = 1204. Line number = 1352. Line number = 1399. Line number = 1443. Line number = 1512. Line number = 1579. Line number = 1633. Line number = 1705. Line number = 1811. Line number = 1856. Line number = 1909. Line number = 1954. Line number = 2005. Line number = 2072. Line number = 2142. Line number = 2189. Line number = 2243. Line number = 2310. Line number = 2355. Line number = 2404. Line number = 2501. Line number = 2603. Line number = 2736. Line number = 2819. Line number = 2901. + +Longest compressed message = 323 bytes. +Length compressed Message Desriptors = 24832 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 116718 bytes. +Number of characters = 77370. Number of words = 3022. + +File 'squash.dat' length = 35595 bytes. +Compressed size of message descriptors = 24832 bytes. +Compressed size of word dictionary = 10082 bytes. +Compression = 46% of filesize = 54% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file '../ingrid1.l9/mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file '../ingrid1.l9/chain.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'converse.txt'. End of source file. +Compiling file 'npc.txt'. End of source file. +Compiling file '../ingrid1.l9/oops.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'score.txt'. End of source file. +Compiling file '../ingrid1.l9/book.txt'. End of source file. + +Number of vars=219 +Number of source lines=10936 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. main.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Ingrid's Back part 2 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. main.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 75319 bytes. +Number of modifications = 317. +Number of text characters = 66491. + +Phase 3 - Construct 'Frequency Table' + +Line number = 70. Line number = 108. Line number = 159. Line number = 212. Line number = 277. Line number = 334. Line number = 378. Line number = 439. Line number = 483. Line number = 627. Line number = 763. Line number = 849. Line number = 927. Line number = 1057. Line number = 1187. Line number = 1228. Line number = 1274. Line number = 1317. Line number = 1410. Line number = 1476. Line number = 1539. Line number = 1639. Line number = 1721. Line number = 1786. Line number = 1868. Line number = 1985. Line number = 2034. Line number = 2086. Line number = 2130. Line number = 2195. Line number = 2258. Line number = 2311. Line number = 2393. Line number = 2438. Line number = 2492. Line number = 2607. Line number = 2710. + +Number of 'words' = 2688. +Length of 'Frequency Table' = 24387 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 70. Line number = 108. Line number = 159. Line number = 212. Line number = 277. Line number = 334. Line number = 378. Line number = 439. Line number = 483. Line number = 627. Line number = 763. Line number = 849. Line number = 927. Line number = 1057. Line number = 1187. Line number = 1228. Line number = 1274. Line number = 1317. Line number = 1410. Line number = 1476. Line number = 1539. Line number = 1639. Line number = 1721. Line number = 1786. Line number = 1868. Line number = 1985. Line number = 2034. Line number = 2086. Line number = 2130. Line number = 2195. Line number = 2258. Line number = 2311. Line number = 2393. Line number = 2438. Line number = 2492. Line number = 2607. Line number = 2710. + +Longest compressed message = 389 bytes. +Length compressed Message Desriptors = 21691 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 104712 bytes. +Number of characters = 66491. Number of words = 2688. + +File 'squash.dat' length = 31371 bytes. +Compressed size of message descriptors = 21691 bytes. +Compressed size of word dictionary = 8999 bytes. +Compression = 47% of filesize = 53% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file '../ingrid1.l9/mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file '../ingrid1.l9/chain.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'converse.txt'. End of source file. +Compiling file 'npc.txt'. End of source file. +Compiling file '../ingrid1.l9/oops.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'score.txt'. End of source file. +Compiling file '../ingrid1.l9/book.txt'. End of source file. + +Number of vars=229 +Number of source lines=11913 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. main.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Ingrid's Back part 3 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. main.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 88079 bytes. +Number of modifications = 548. +Number of text characters = 78959. + +Phase 3 - Construct 'Frequency Table' + +Line number = 71. Line number = 108. Line number = 161. Line number = 202. Line number = 276. Line number = 320. Line number = 355. Line number = 406. Line number = 451. Line number = 562. Line number = 691. Line number = 796. Line number = 857. Line number = 900. Line number = 1031. Line number = 1160. Line number = 1292. Line number = 1370. Line number = 1411. Line number = 1453. Line number = 1515. Line number = 1563. Line number = 1613. Line number = 1714. Line number = 1842. Line number = 1968. Line number = 2170. Line number = 2222. Line number = 2270. Line number = 2329. Line number = 2387. Line number = 2444. Line number = 2495. Line number = 2540. Line number = 2601. Line number = 2697. Line number = 2793. + +Number of 'words' = 3103. +Length of 'Frequency Table' = 28379 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 71. Line number = 108. Line number = 161. Line number = 202. Line number = 276. Line number = 320. Line number = 355. Line number = 406. Line number = 451. Line number = 562. Line number = 691. Line number = 796. Line number = 857. Line number = 900. Line number = 1031. Line number = 1160. Line number = 1292. Line number = 1370. Line number = 1411. Line number = 1453. Line number = 1515. Line number = 1563. Line number = 1613. Line number = 1714. Line number = 1842. Line number = 1968. Line number = 2170. Line number = 2222. Line number = 2270. Line number = 2329. Line number = 2387. Line number = 2444. Line number = 2495. Line number = 2540. Line number = 2601. Line number = 2697. Line number = 2793. + +Longest compressed message = 373 bytes. +Length compressed Message Desriptors = 25848 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 111962 bytes. +Number of characters = 78959. Number of words = 3103. + +File 'squash.dat' length = 37233 bytes. +Compressed size of message descriptors = 25848 bytes. +Compressed size of word dictionary = 10704 bytes. +Compression = 47% of filesize = 53% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file '../ingrid1.l9/mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file '../ingrid1.l9/chain.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'converse.txt'. End of source file. +Compiling file 'npc.txt'. End of source file. +Compiling file '../ingrid1.l9/oops.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'score.txt'. End of source file. +Compiling file '../ingrid1.l9/book.txt'. End of source file. + +Number of vars=230 +Number of source lines=11413 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. main.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Scapeghost part 1 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. main.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 72878 bytes. +Number of modifications = 376. +Number of text characters = 64026. + +Phase 3 - Construct 'Frequency Table' + +Line number = 77. Line number = 113. Line number = 170. Line number = 238. Line number = 310. Line number = 353. Line number = 397. Line number = 463. Line number = 509. Line number = 615. Line number = 721. Line number = 814. Line number = 904. Line number = 995. Line number = 1106. Line number = 1228. Line number = 1310. Line number = 1352. Line number = 1423. Line number = 1473. Line number = 1528. Line number = 1572. Line number = 1646. Line number = 1733. Line number = 1841. Line number = 1940. Line number = 1992. Line number = 2036. Line number = 2087. Line number = 2131. Line number = 2247. Line number = 2396. Line number = 2521. Line number = 2630. Line number = 2739. + +Number of 'words' = 2685. +Length of 'Frequency Table' = 24170 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 77. Line number = 113. Line number = 170. Line number = 238. Line number = 310. Line number = 353. Line number = 397. Line number = 463. Line number = 509. Line number = 615. Line number = 721. Line number = 814. Line number = 904. Line number = 995. Line number = 1106. Line number = 1228. Line number = 1310. Line number = 1352. Line number = 1423. Line number = 1473. Line number = 1528. Line number = 1572. Line number = 1646. Line number = 1733. Line number = 1841. Line number = 1940. Line number = 1992. Line number = 2036. Line number = 2087. Line number = 2131. Line number = 2247. Line number = 2396. Line number = 2521. Line number = 2630. Line number = 2739. + +Longest compressed message = 333 bytes. +Length compressed Message Desriptors = 21695 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 103065 bytes. +Number of characters = 64026. Number of words = 2685. + +File 'squash.dat' length = 30984 bytes. +Compressed size of message descriptors = 21695 bytes. +Compressed size of word dictionary = 8608 bytes. +Compression = 48% of filesize = 52% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file 'mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file 'chain.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'converse.txt'. End of source file. +Compiling file 'npc.txt'. End of source file. +Compiling file 'oops.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'score.txt'. End of source file. +Compiling file 'book.txt'. End of source file. + +Number of vars=217 +Number of source lines=11505 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. main.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Scapeghost part 2 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. main.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 54176 bytes. +Number of modifications = 231. +Number of text characters = 47076. + +Phase 3 - Construct 'Frequency Table' + +Line number = 78. Line number = 116. Line number = 174. Line number = 228. Line number = 298. Line number = 344. Line number = 416. Line number = 460. Line number = 621. Line number = 754. Line number = 877. Line number = 1030. Line number = 1110. Line number = 1156. Line number = 1219. Line number = 1266. Line number = 1327. Line number = 1441. Line number = 1517. Line number = 1623. Line number = 1718. Line number = 1805. Line number = 1849. Line number = 1901. Line number = 1989. Line number = 2155. + +Number of 'words' = 2121. +Length of 'Frequency Table' = 19177 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 78. Line number = 116. Line number = 174. Line number = 228. Line number = 298. Line number = 344. Line number = 416. Line number = 460. Line number = 621. Line number = 754. Line number = 877. Line number = 1030. Line number = 1110. Line number = 1156. Line number = 1219. Line number = 1266. Line number = 1327. Line number = 1441. Line number = 1517. Line number = 1623. Line number = 1718. Line number = 1805. Line number = 1849. Line number = 1901. Line number = 1989. Line number = 2155. + +Longest compressed message = 177 bytes. +Length compressed Message Desriptors = 15288 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 82287 bytes. +Number of characters = 47076. Number of words = 2121. + +File 'squash.dat' length = 22815 bytes. +Compressed size of message descriptors = 15288 bytes. +Compressed size of word dictionary = 6846 bytes. +Compression = 48% of filesize = 52% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file '../part1.l9/mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file '../part1.l9/chain.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'converse.txt'. End of source file. +Compiling file 'npc.txt'. End of source file. +Compiling file '../part1.l9/oops.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'score.txt'. End of source file. +Compiling file '../part1.l9/book.txt'. End of source file. + +Number of vars=204 +Number of source lines=11332 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. main.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Scapeghost part 3 +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. main.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 71930 bytes. +Number of modifications = 352. +Number of text characters = 64242. + +Phase 3 - Construct 'Frequency Table' + +Line number = 78. Line number = 115. Line number = 170. Line number = 217. Line number = 300. Line number = 342. Line number = 412. Line number = 456. Line number = 606. Line number = 752. Line number = 861. Line number = 1056. Line number = 1166. Line number = 1224. Line number = 1287. Line number = 1337. Line number = 1386. Line number = 1468. Line number = 1549. Line number = 1658. Line number = 1747. Line number = 1866. Line number = 1939. Line number = 1983. Line number = 2036. Line number = 2080. Line number = 2194. Line number = 2328. Line number = 2480. Line number = 2639. Line number = 2754. + +Number of 'words' = 2547. +Length of 'Frequency Table' = 23115 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 78. Line number = 115. Line number = 170. Line number = 217. Line number = 300. Line number = 342. Line number = 412. Line number = 456. Line number = 606. Line number = 752. Line number = 861. Line number = 1056. Line number = 1166. Line number = 1224. Line number = 1287. Line number = 1337. Line number = 1386. Line number = 1468. Line number = 1549. Line number = 1658. Line number = 1747. Line number = 1866. Line number = 1939. Line number = 1983. Line number = 2036. Line number = 2080. Line number = 2194. Line number = 2328. Line number = 2480. Line number = 2639. Line number = 2754. + +Longest compressed message = 190 bytes. +Length compressed Message Desriptors = 20866 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 105496 bytes. +Number of characters = 64242. Number of words = 2547. + +File 'squash.dat' length = 29798 bytes. +Compressed size of message descriptors = 20866 bytes. +Compressed size of word dictionary = 8251 bytes. +Compression = 46% of filesize = 54% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file '../part1.l9/mconst.txt'. End of source file. +Compiling file 'sconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file '../part1.l9/chain.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'converse.txt'. End of source file. +Compiling file 'npc.txt'. End of source file. +Compiling file '../part1.l9/oops.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'score.txt'. End of source file. +Compiling file '../part1.l9/book.txt'. End of source file. + +Number of vars=215 +Number of source lines=11563 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. main.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Lords of Time +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. st.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 82450 bytes. +Number of modifications = 304. +Number of text characters = 70741. + +Phase 3 - Construct 'Frequency Table' + +Line number = 47. Line number = 84. Line number = 120. Line number = 155. Line number = 192. Line number = 247. Line number = 297. Line number = 358. Line number = 404. Line number = 455. Line number = 526. Line number = 562. Line number = 601. Line number = 636. Line number = 669. Line number = 705. Line number = 737. Line number = 769. Line number = 805. Line number = 939. Line number = 1079. Line number = 1215. Line number = 1254. Line number = 1306. Line number = 1347. Line number = 1383. Line number = 1418. Line number = 1486. Line number = 1569. Line number = 1614. Line number = 1690. Line number = 1751. Line number = 1833. Line number = 1901. Line number = 1976. Line number = 2043. Line number = 2113. Line number = 2181. Line number = 2217. Line number = 2253. + +Number of 'words' = 3557. +Length of 'Frequency Table' = 33437 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 47. Line number = 84. Line number = 120. Line number = 155. Line number = 192. Line number = 247. Line number = 297. Line number = 358. Line number = 404. Line number = 455. Line number = 526. Line number = 562. Line number = 601. Line number = 636. Line number = 669. Line number = 705. Line number = 737. Line number = 769. Line number = 805. Line number = 939. Line number = 1079. Line number = 1215. Line number = 1254. Line number = 1306. Line number = 1347. Line number = 1383. Line number = 1418. Line number = 1486. Line number = 1569. Line number = 1614. Line number = 1690. Line number = 1751. Line number = 1833. Line number = 1901. Line number = 1976. Line number = 2043. Line number = 2113. Line number = 2181. Line number = 2217. Line number = 2253. + +Longest compressed message = 428 bytes. +Length compressed Message Desriptors = 23120 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 93695 bytes. +Number of characters = 70741. Number of words = 3557. + +File 'squash.dat' length = 35908 bytes. +Compressed size of message descriptors = 23120 bytes. +Compressed size of word dictionary = 12103 bytes. +Compression = 50% of filesize = 50% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'mconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file 'aconst.txt'. End of source file. +Compiling file 'apconst.txt'. End of source file. +Compiling file '../red_moon.l9/acore.txt'. End of source file. +Compiling file '../red_moon.l9/aparse.txt'. End of source file. +Compiling file '../red_moon.l9/hires.txt'. End of source file. +Compiling file 'demo.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file '../red_moon.l9/oops.txt'. End of source file. +Compiling file '../red_moon.l9/chain.txt'. End of source file. +Compiling file '../red_moon.l9/book.txt'. End of source file. +Compiling file '../red_moon.l9/cheat.txt'. End of source file. + +Number of vars=192 +Number of source lines=5804 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. st.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Red Moon +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. st.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 55115 bytes. +Number of modifications = 171. +Number of text characters = 46309. + +Phase 3 - Construct 'Frequency Table' + +Line number = 48. Line number = 83. Line number = 117. Line number = 155. Line number = 191. Line number = 253. Line number = 300. Line number = 338. Line number = 384. Line number = 436. Line number = 500. Line number = 532. Line number = 565. Line number = 597. Line number = 630. Line number = 662. Line number = 694. Line number = 804. Line number = 935. Line number = 1034. Line number = 1143. Line number = 1250. Line number = 1349. Line number = 1447. Line number = 1534. Line number = 1588. Line number = 1630. Line number = 1674. Line number = 1723. Line number = 1797. + +Number of 'words' = 2681. +Length of 'Frequency Table' = 24787 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 48. Line number = 83. Line number = 117. Line number = 155. Line number = 191. Line number = 253. Line number = 300. Line number = 338. Line number = 384. Line number = 436. Line number = 500. Line number = 532. Line number = 565. Line number = 597. Line number = 630. Line number = 662. Line number = 694. Line number = 804. Line number = 935. Line number = 1034. Line number = 1143. Line number = 1250. Line number = 1349. Line number = 1447. Line number = 1534. Line number = 1588. Line number = 1630. Line number = 1674. Line number = 1723. Line number = 1797. + +Longest compressed message = 319 bytes. +Length compressed Message Desriptors = 15355 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 63819 bytes. +Number of characters = 46309. Number of words = 2681. + +File 'squash.dat' length = 25304 bytes. +Compressed size of message descriptors = 15355 bytes. +Compressed size of word dictionary = 9256 bytes. +Compression = 54% of filesize = 46% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file '../timelord.l9/mconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file 'aconst.txt'. End of source file. +Compiling file 'apconst.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'hires.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'oops.txt'. End of source file. +Compiling file 'chain.txt'. End of source file. +Compiling file 'book.txt'. End of source file. +Compiling file 'cheat.txt'. End of source file. + +Number of vars=191 +Number of source lines=5687 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. st.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling The Price of Magik + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. msx.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 73002 bytes. +Number of modifications = 254. +Number of text characters = 62732. + +Phase 3 - Construct 'Frequency Table' + +Line number = 46. Line number = 81. Line number = 115. Line number = 153. Line number = 189. Line number = 246. Line number = 295. Line number = 335. Line number = 385. Line number = 437. Line number = 501. Line number = 533. Line number = 566. Line number = 598. Line number = 631. Line number = 663. Line number = 695. Line number = 843. Line number = 1005. Line number = 1106. Line number = 1231. Line number = 1351. Line number = 1473. Line number = 1631. Line number = 1729. Line number = 1815. Line number = 1861. Line number = 1901. Line number = 1945. Line number = 2019. Line number = 2078. Line number = 2118. Line number = 2153. + +Number of 'words' = 3334. +Length of 'Frequency Table' = 31066 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 46. Line number = 81. Line number = 115. Line number = 153. Line number = 189. Line number = 246. Line number = 295. Line number = 335. Line number = 385. Line number = 437. Line number = 501. Line number = 533. Line number = 566. Line number = 598. Line number = 631. Line number = 663. Line number = 695. Line number = 843. Line number = 1005. Line number = 1106. Line number = 1231. Line number = 1351. Line number = 1473. Line number = 1631. Line number = 1729. Line number = 1815. Line number = 1861. Line number = 1901. Line number = 1945. Line number = 2019. Line number = 2078. Line number = 2118. Line number = 2153. + +Longest compressed message = 353 bytes. +Length compressed Message Desriptors = 20498 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 82437 bytes. +Number of characters = 62732. Number of words = 3334. + +File 'squash.dat' length = 32642 bytes. +Compressed size of message descriptors = 20498 bytes. +Compressed size of word dictionary = 11451 bytes. +Compression = 52% of filesize = 48% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file '../timelord.l9/mconst.txt'. End of source file. +Compiling file 'pconst.txt'. End of source file. +Compiling file 'aconst.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file '../red_moon.l9/hires.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file '../red_moon.l9/book.txt'. End of source file. +Compiling file '../red_moon.l9/cheat.txt'. End of source file. + +Number of vars=158 +Number of source lines=7946 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. msx.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Snowball +Level 9 table.dat generation done. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file 'apconst.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'chain.txt'. End of source file. +Compiling file 'oops.txt'. End of source file. +Compiling file 'book.txt'. End of source file. + +Number of vars=196 +Number of source lines=5334 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. st.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Return to Eden +Level 9 table.dat generation done. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file 'apconst.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'chain.txt'. End of source file. +Compiling file 'oops.txt'. End of source file. +Compiling file 'book.txt'. End of source file. + +Number of vars=193 +Number of source lines=5756 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. st.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling The Worm in Paradise +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + A .. st.l9 +Only one sub-directory - proceeding with squash + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 43279 bytes. +Number of modifications = 173. +Number of text characters = 35995. + +Phase 3 - Construct 'Frequency Table' + +Line number = 46. Line number = 97. Line number = 139. Line number = 180. Line number = 214. Line number = 253. Line number = 289. Line number = 333. Line number = 366. Line number = 407. Line number = 450. Line number = 487. Line number = 541. Line number = 585. Line number = 625. Line number = 666. Line number = 713. Line number = 759. Line number = 803. Line number = 851. Line number = 901. Line number = 936. Line number = 1003. Line number = 1051. Line number = 1110. Line number = 1176. Line number = 1234. Line number = 1284. Line number = 1351. Line number = 1423. + +Number of 'words' = 1833. +Length of 'Frequency Table' = 16500 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 46. Line number = 97. Line number = 139. Line number = 180. Line number = 214. Line number = 253. Line number = 289. Line number = 333. Line number = 366. Line number = 407. Line number = 450. Line number = 487. Line number = 541. Line number = 585. Line number = 625. Line number = 666. Line number = 713. Line number = 759. Line number = 803. Line number = 851. Line number = 901. Line number = 936. Line number = 1003. Line number = 1051. Line number = 1110. Line number = 1176. Line number = 1234. Line number = 1284. Line number = 1351. Line number = 1423. + +Longest compressed message = 267 bytes. +Length compressed Message Desriptors = 12133 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 48473 bytes. +Number of characters = 35995. Number of words = 1833. + +File 'squash.dat' length = 18790 bytes. +Compressed size of message descriptors = 12133 bytes. +Compressed size of word dictionary = 5972 bytes. +Compression = 52% of filesize = 48% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'aconst.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'averb.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'chain.txt'. End of source file. +Compiling file 'oops.txt'. End of source file. +Compiling file 'book.txt'. End of source file. + +Number of vars=149 +Number of source lines=6164 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. st.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Colossal Adventure +Level 9 table.dat generation done. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Forced long jumps are now on +Compiling file 'aconst.txt'. End of source file. +Compiling file 'apconst.txt'. End of source file. +Compiling file 'acore.txt'. End of source file. +Compiling file 'aparse.txt'. End of source file. +Compiling file 'aspecial.txt'. End of source file. +Compiling file 'chain.txt'. End of source file. +Compiling file 'oops.txt'. End of source file. +Compiling file 'book.txt'. End of source file. + +Number of vars=138 +Number of source lines=4664 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat + A .. st.l9 +Only one sub-directory - proceeding with finish +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Grange Mudrders for ST +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + +No suitable sub-directories available - searching current. + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 40849 bytes. +Number of modifications = 131. +Number of text characters = 34373. + +Phase 3 - Construct 'Frequency Table' + +Line number = 144. Line number = 277. Line number = 345. Line number = 420. Line number = 468. Line number = 502. Line number = 597. Line number = 831. Line number = 875. Line number = 916. Line number = 952. Line number = 1186. Line number = 1237. Line number = 1286. Line number = 1345. Line number = 1393. Line number = 1448. Line number = 1487. Line number = 1534. Line number = 1574. Line number = 1619. Line number = 1661. Line number = 1716. Line number = 1758. Line number = 1808. Line number = 1877. Line number = 1932. Line number = 1984. Line number = 2023. Line number = 2078. Line number = 2127. Line number = 2209. + +Number of 'words' = 1494. +Length of 'Frequency Table' = 13060 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 144. Line number = 277. Line number = 345. Line number = 420. Line number = 468. Line number = 502. Line number = 597. Line number = 831. Line number = 875. Line number = 916. Line number = 952. Line number = 1186. Line number = 1237. Line number = 1286. Line number = 1345. Line number = 1393. Line number = 1448. Line number = 1487. Line number = 1534. Line number = 1574. Line number = 1619. Line number = 1661. Line number = 1716. Line number = 1758. Line number = 1808. Line number = 1877. Line number = 1932. Line number = 1984. Line number = 2023. Line number = 2078. Line number = 2127. Line number = 2209. + +Longest compressed message = 57 bytes. +Length compressed Message Desriptors = 12546 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 84214 bytes. +Number of characters = 34373. Number of words = 1494. + +File 'squash.dat' length = 18459 bytes. +Compressed size of message descriptors = 12546 bytes. +Compressed size of word dictionary = 5244 bytes. +Compression = 53% of filesize = 47% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'mconst.txt'. End of source file. +Compiling file '../aahead.txt'. End of source file. +Compiling file '../aconst.txt'. End of source file. +Compiling file '../sconst.txt'. End of source file. +Compiling file '../pconst.txt'. End of source file. +Compiling file '../aaconst.txt'. End of source file. +Compiling file '../aavars.txt'. End of source file. +Compiling file '../aacore.txt'. End of source file. +Compiling file '../display.txt'. End of source file. +Compiling file '../aaprint.txt'. End of source file. +Compiling file '../aaspec.txt'. End of source file. +Compiling file '../aastand.txt'. End of source file. +Compiling file '../aaverbs.txt'. End of source file. +Compiling file '../aalogic.txt'. End of source file. +Compiling file '../aanpc.txt'. End of source file. +Compiling file '../menu.txt'. End of source file. +Compiling file '../floors.txt'. End of source file. +Compiling file '../goal.txt'. End of source file. +Compiling file '../cache.txt'. End of source file. + +Number of vars=358 +Number of source lines=15689 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Grange Mudrders for PC +Level 9 table.dat generation done. + + +COMPACT 2.3 +7th September 1987 +Available memory = 1048576 bytes + +Options: N N 128 + + + + + Level 9 Adventures + + Copyright (C) 1986-1988 Level 9 Computing + + + + + +No suitable sub-directories available - searching current. + +Phase 1 - Clear memory +Phase 2 - Sort into message number order + +Squashing. Please wait. + +Length of SMT = 40849 bytes. +Number of modifications = 131. +Number of text characters = 34373. + +Phase 3 - Construct 'Frequency Table' + +Line number = 144. Line number = 277. Line number = 345. Line number = 420. Line number = 468. Line number = 502. Line number = 597. Line number = 831. Line number = 875. Line number = 916. Line number = 952. Line number = 1186. Line number = 1237. Line number = 1286. Line number = 1345. Line number = 1393. Line number = 1448. Line number = 1487. Line number = 1534. Line number = 1574. Line number = 1619. Line number = 1661. Line number = 1716. Line number = 1758. Line number = 1808. Line number = 1877. Line number = 1932. Line number = 1984. Line number = 2023. Line number = 2078. Line number = 2127. Line number = 2209. + +Number of 'words' = 1494. +Length of 'Frequency Table' = 13060 bytes. + +Phase 4 - (Optional) Display 'Frequency Table' +Phase 5 - Construct 'Common Word Dictionary' +Phase 6 - Construct 'Message Descriptors' + +Line number = 144. Line number = 277. Line number = 345. Line number = 420. Line number = 468. Line number = 502. Line number = 597. Line number = 831. Line number = 875. Line number = 916. Line number = 952. Line number = 1186. Line number = 1237. Line number = 1286. Line number = 1345. Line number = 1393. Line number = 1448. Line number = 1487. Line number = 1534. Line number = 1574. Line number = 1619. Line number = 1661. Line number = 1716. Line number = 1758. Line number = 1808. Line number = 1877. Line number = 1932. Line number = 1984. Line number = 2023. Line number = 2078. Line number = 2127. Line number = 2209. + +Longest compressed message = 57 bytes. +Length compressed Message Desriptors = 12546 bytes. + +Phase 7 - Construct 'Word Dictionary' +Phase 8 - Construct 'Word Dictionary Index' +Phase 9 - Build Squash File + +Writing squash.dat ... + +File 'message.txt' length = 84214 bytes. +Number of characters = 34373. Number of words = 1494. + +File 'squash.dat' length = 18459 bytes. +Compressed size of message descriptors = 12546 bytes. +Compressed size of word dictionary = 5244 bytes. +Compression = 53% of filesize = 47% saved space. + + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file 'mconst.txt'. End of source file. +Compiling file '../aahead.txt'. End of source file. +Compiling file '../aconst.txt'. End of source file. +Compiling file '../sconst.txt'. End of source file. +Compiling file '../pconst.txt'. End of source file. +Compiling file '../aaconst.txt'. End of source file. +Compiling file '../aavars.txt'. End of source file. +Compiling file '../aacore.txt'. End of source file. +Compiling file '../display.txt'. End of source file. +Compiling file '../aaprint.txt'. End of source file. +Compiling file '../aaspec.txt'. End of source file. +Compiling file '../aastand.txt'. End of source file. +Compiling file '../aaverbs.txt'. End of source file. +Compiling file '../aalogic.txt'. End of source file. +Compiling file '../aanpc.txt'. End of source file. +Compiling file '../menu.txt'. End of source file. +Compiling file '../floors.txt'. End of source file. +Compiling file '../goal.txt'. End of source file. +Compiling file '../cache.txt'. End of source file. + +Number of vars=358 +Number of source lines=15689 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Billy the Kid for ST + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file '../firstvar.txt'. End of source file. +Compiling file 'mconst.txt'. End of source file. +Compiling file '../aahead.txt'. End of source file. +Compiling file '../language.txt'. End of source file. +Compiling file '../aaconst.txt'. End of source file. +Compiling file '../aavars.txt'. End of source file. +Compiling file '../demo.txt'. End of source file. +Compiling file '../standard.txt'. End of source file. +Compiling file '../menu.txt'. End of source file. +Compiling file '../walkabou.txt'. End of source file. +Compiling file '../fx.txt'. End of source file. +Compiling file '../arcade.txt'. End of source file. +Compiling file '../vectors.txt'. End of source file. +Compiling file '../strategy.txt'. End of source file. +Compiling file '../comms.txt'. End of source file. +Compiling file '../floors.txt'. End of source file. +Compiling file '../goal.txt'. End of source file. +Compiling file '../cache.txt'. End of source file. +Compiling file '../duel.txt'. End of source file. +Compiling file '../fire.txt'. End of source file. +Compiling file '../movecurs.txt'. End of source file. +Compiling file '../spaniob.txt'. End of source file. +Compiling file '../music.txt'. End of source file. +Compiling file '../display.txt'. End of source file. +Compiling file '../print.txt'. End of source file. +Compiling file '../intro.txt'. End of source file. + +Number of vars=252 +Number of source lines=15109 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + +Compiling Billy the Kid for PC + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Compiling file '../firstvar.txt'. End of source file. +Compiling file 'mconst.txt'. End of source file. +Compiling file '../aahead.txt'. End of source file. +Compiling file '../language.txt'. End of source file. +Compiling file '../aaconst.txt'. End of source file. +Compiling file '../aavars.txt'. End of source file. +Compiling file '../demo.txt'. End of source file. +Compiling file '../standard.txt'. End of source file. +Compiling file '../menu.txt'. End of source file. +Compiling file '../walkabou.txt'. End of source file. +Compiling file '../fx.txt'. End of source file. +Compiling file '../arcade.txt'. End of source file. +Compiling file '../vectors.txt'. End of source file. +Compiling file '../strategy.txt'. End of source file. +Compiling file '../comms.txt'. End of source file. +Compiling file '../floors.txt'. End of source file. +Compiling file '../goal.txt'. End of source file. +Compiling file '../cache.txt'. End of source file. +Compiling file '../duel.txt'. End of source file. +Compiling file '../fire.txt'. End of source file. +Compiling file '../movecurs.txt'. End of source file. +Compiling file '../spaniob.txt'. End of source file. +Compiling file '../music.txt'. End of source file. +Compiling file '../display.txt'. End of source file. +Compiling file '../print.txt'. End of source file. +Compiling file '../intro.txt'. End of source file. + +Number of vars=252 +Number of source lines=15109 + +Acode finish 1.1 (for Linux) +Copyright (C) 1986-1988 Level 9 Computing + +Loading exit.txt +Loading table.dat +Loading squash.dat +Saving acode.acd +Saving gamedata.dat + diff --git a/l9dev/regress/compileall b/l9dev/regress/compileall new file mode 100755 index 0000000..803e67d --- /dev/null +++ b/l9dev/regress/compileall @@ -0,0 +1,210 @@ +#!/bin/bash + +cd ${0%/*} +rm -f compile.log + +echo "Compiling Knight Orc part 1" >>compile.log +cd games.l9/knight1.l9 +pwd +../../../l9gamegen --old --bugcomp >>../../compile.log +cmp ref/table.dat table.dat +cmp spec48.l9/ref/squash.dat spec48.l9/squash.dat +cmp spec48.l9/ref/gamedata.dat spec48.l9/gamedata.dat +cd ../.. + +echo "Compiling Knight Orc part 2" >>compile.log +cd games.l9/knight2.l9 +pwd +../../../l9gamegen --old --bugcomp >>../../compile.log +cmp ref/table.dat table.dat +cmp msx.l9/ref/squash.dat msx.l9/squash.dat +cmp msx.l9/ref/gamedata.dat msx.l9/gamedata.dat +cd ../.. + +echo "Compiling Knight Orc part 3" >>compile.log +cd games.l9/knight3.l9 +pwd +../../../l9gamegen --old --bugcomp >>../../compile.log +cmp ref/table.dat table.dat +cmp msx.l9/ref/squash.dat msx.l9/squash.dat +cmp msx.l9/ref/gamedata.dat msx.l9/gamedata.dat +cd ../.. + +echo "Compiling Lancelot part 1" >>compile.log +cd games.l9/lancelt1.l9 +pwd +../../../l9gamegen >>../../compile.log +cmp ref/table.dat table.dat +cmp main.l9/ref/squash.dat main.l9/squash.dat +cmp main.l9/ref/gamedata.dat main.l9/gamedata.dat +cd ../.. + +echo "Compiling Lancelot part 2" >>compile.log +cd games.l9/lancelt2.l9 +pwd +../../../l9gamegen --no-table >>../../compile.log +cmp main.l9/ref/squash.dat main.l9/squash.dat +cmp main.l9/ref/gamedata.dat main.l9/gamedata.dat +cd ../.. + +echo "Compiling Lancelot part 3" >>compile.log +cd games.l9/lancelt3.l9 +pwd +../../../l9gamegen >>../../compile.log +cmp ref/table.dat table.dat +cmp main.l9/ref/squash.dat main.l9/squash.dat +cmp main.l9/ref/gamedata.dat main.l9/gamedata.dat +cd ../.. + +echo "Compiling Ingrid's Back part 1" >>compile.log +cd games.l9/ingrid.l9/ingrid1.l9 +pwd +../../../../l9gamegen --bugcomp >>../../../compile.log +cmp ref/table.dat table.dat +cmp main.l9/ref/squash.dat main.l9/squash.dat +cmp main.l9/ref/gamedata.dat main.l9/gamedata.dat +cd ../../.. + +echo "Compiling Ingrid's Back part 2" >>compile.log +cd games.l9/ingrid.l9/ingrid2.l9 +pwd +../../../../l9gamegen --bugcomp >>../../../compile.log +cmp ref/table.dat table.dat +cmp main.l9/ref/squash.dat main.l9/squash.dat +cmp main.l9/ref/gamedata.dat main.l9/gamedata.dat +cd ../../.. + +echo "Compiling Ingrid's Back part 3" >>compile.log +cd games.l9/ingrid.l9/ingrid3.l9 +pwd +../../../../l9gamegen --bugcomp >>../../../compile.log +cmp ref/table.dat table.dat +cmp main.l9/ref/squash.dat main.l9/squash.dat +cmp main.l9/ref/gamedata.dat main.l9/gamedata.dat +cd ../../.. + +echo "Compiling Scapeghost part 1" >>compile.log +cd games.l9/ghost.l9/part1.l9 +pwd +../../../../l9gamegen >>../../../compile.log +cmp ref/table.dat table.dat +cmp main.l9/ref/squash.dat main.l9/squash.dat +cmp main.l9/ref/gamedata.dat main.l9/gamedata.dat +cd ../../.. + +echo "Compiling Scapeghost part 2" >>compile.log +cd games.l9/ghost.l9/part2.l9 +pwd +../../../../l9gamegen >>../../../compile.log +cmp ref/table.dat table.dat +cmp main.l9/ref/squash.dat main.l9/squash.dat +cmp main.l9/ref/gamedata.dat main.l9/gamedata.dat +cd ../../.. + +echo "Compiling Scapeghost part 3" >>compile.log +cd games.l9/ghost.l9/part3.l9 +pwd +../../../../l9gamegen >>../../../compile.log +cmp ref/table.dat table.dat +cmp main.l9/ref/squash.dat main.l9/squash.dat +cmp main.l9/ref/gamedata.dat main.l9/gamedata.dat +cd ../../.. + +echo "Compiling Lords of Time" >>compile.log +cd games.l9/timelord.l9 +pwd +../../../l9gamegen --old >>../../compile.log +cmp ref/table.dat table.dat +cmp st.l9/ref/squash.dat st.l9/squash.dat +cmp st.l9/ref/gamedata.dat st.l9/gamedata.dat +cd ../.. + +echo "Compiling Red Moon" >>compile.log +cd games.l9/red_moon.l9 +pwd +../../../l9gamegen --old --oddacode >>../../compile.log +cmp ref/table.dat table.dat +cmp st.l9/ref/squash.dat st.l9/squash.dat +cmp st.l9/ref/gamedata.dat st.l9/gamedata.dat +cd ../.. + +echo "Compiling The Price of Magik" >>compile.log +cd games.l9/magik.l9 +pwd +../../../l9gamegen --no-table --bugcomp >>../../compile.log +cmp msx.l9/ref/squash.dat msx.l9/squash.dat +cmp msx.l9/ref/gamedata.dat msx.l9/gamedata.dat +cd ../.. + +echo "Compiling Snowball" >>compile.log +cd games.l9/snowball.l9 +pwd +../../../l9gamegen --old --no-message --oddacode >>../../compile.log +cmp ref/table.dat table.dat +cmp st.l9/ref/gamedata.dat st.l9/gamedata.dat +cd ../.. + +echo "Compiling Return to Eden" >>compile.log +cd games.l9/eden.l9 +pwd +../../../l9gamegen --old --no-message --oddacode >>../../compile.log +cmp ref/table.dat table.dat +cmp st.l9/ref/gamedata.dat st.l9/gamedata.dat +cd ../.. + +echo "Compiling The Worm in Paradise" >>compile.log +cd games.l9/worm.l9 +pwd +../../../l9gamegen --old --oddacode >>../../compile.log +cmp ref/table.dat table.dat +cmp st.l9/ref/squash.dat st.l9/squash.dat +cmp st.l9/ref/gamedata.dat st.l9/gamedata.dat +cd ../.. + +echo "Compiling Colossal Adventure" >>compile.log +cd games.l9/colossal.l9 +pwd +../../../l9gamegen --old --no-message >>../../compile.log +cmp ref/table.dat table.dat +cmp st.l9/ref/gamedata.dat st.l9/gamedata.dat +cd ../.. + +echo "Compiling Grange Mudrders for ST" >>compile.log +cd games.l9/grange.l9/st.l9 +pwd +../../../../l9gamegen --splitdata >>../../../compile.log +cmp ref/table.dat table.dat +cmp ref/squash.dat squash.dat +cmp ref/acode.acd acode.acd +cmp ref/gamedata.dat gamedata.dat +cd ../../.. + +echo "Compiling Grange Mudrders for PC" >>compile.log +cd games.l9/grange.l9/pc.l9 +pwd +../../../../l9gamegen --splitdata --i8086 >>../../../compile.log +cmp ref/table.dat table.dat +cmp ref/squash.dat squash.dat +cmp ref/acode.acd acode.acd +cmp ref/gamedata.dat gamedata.dat +cd ../../.. + +echo "Compiling Billy the Kid for ST" >>compile.log +cd games.l9/billy.l9/st.l9 +pwd +../../../../l9gamegen --no-table --no-message --splitdata >>../../../compile.log +cmp ref/acode.acd acode.acd +cmp ref/gamedata.dat gamedata.dat +cd ../../.. + +echo "Compiling Billy the Kid for PC" >>compile.log +cd games.l9/billy.l9/pc.l9 +pwd +../../../../l9gamegen --no-table --no-message --splitdata --i8086 >>../../../compile.log +cmp ref/acode.acd acode.acd +cmp ref/gamedata.dat gamedata.dat +cd ../../.. + +grep -e " in line " -e " at line " compile.log + +./compileerrors diff --git a/l9dev/regress/compileerrors b/l9dev/regress/compileerrors new file mode 100755 index 0000000..5e4f486 --- /dev/null +++ b/l9dev/regress/compileerrors @@ -0,0 +1,9 @@ +#!/bin/bash + +cd ${0%/*} +rm -f errors.log + +echo "Compiling errors.txt" >>errors.log +echo "$PWD/errors.txt" +../l9comp --testcomp >>errors.log +cmp errors.ref errors.log diff --git a/l9dev/regress/errors.log b/l9dev/regress/errors.log new file mode 100644 index 0000000..a3f515f --- /dev/null +++ b/l9dev/regress/errors.log @@ -0,0 +1,215 @@ +Compiling errors.txt + +68000 Acode compiler 1.3 (for Linux) +Copyright (C) 1988 Level 9 Computing. +M.J.Austin 2/6/88 + +Looking for compilation batch file - 'compile.bat' + +Executing instructions in file 'compile.bat' +Debugging info is now on +Compiling file 'errors.txt'. +FFFFFFF8: FF FF FF FF FF FF FF FF - 1: * Modified test.txt to cover as many errors as possible +FFFFFFF8: FF FF FF FF FF FF FF FF - 2: * To catch all errors use --testcomp +FFFFFFF8: FF FF FF FF FF FF FF FF - 3: +FFFFFFF8: FF FF FF FF FF FF FF FF - 4: table +Starting table definitions at line 4 + +FFFFFFF8: FF FF FF FF FF FF FF FF - 5: list1=1 +FFFFFFF8: FF FF FF FF FF FF FF FF - 6: +FFFFFFF8: FF FF FF FF FF FF FF FF - 7: var +Starting variable definitions at line 7 + +FFFFFFF8: FF FF FF FF FF FF FF FF - 8: a b c d e f g x1 +FFFFFFF8: FF FF FF FF FF FF FF FF - 9: a1 b1 c1 d1 e1 f1 g1 +FFFFFFF8: FF FF FF FF FF FF FF FF - 10: a2 b2 c2 d2 e2 f2 g2 +FFFFFFF8: FF FF FF FF FF FF FF FF - 11: a3 b3 c3 d3 e3 f3 g3 +FFFFFFF8: FF FF FF FF FF FF FF FF - 12: a4 b4 c4 d4 e4 f4 g4 +FFFFFFF8: FF FF FF FF FF FF FF FF - 13: a5 b5 c5 d5 e5 f5 g5 +FFFFFFF8: FF FF FF FF FF FF FF FF - 14: a6 b6 c6 d6 e6 f6 g6 +FFFFFFF8: FF FF FF FF FF FF FF FF - 15: a7 b7 c7 d7 e7 f7 g7 +FFFFFFF8: FF FF FF FF FF FF FF FF - 16: a8 b8 c8 d8 e8 f8 g8 +FFFFFFF8: FF FF FF FF FF FF FF FF - 17: a9 b9 c9 d9 e9 f9 g9 +FFFFFFF8: FF FF FF FF FF FF FF FF - 18: aa ba ca da ea fa ga +FFFFFFF8: FF FF FF FF FF FF FF FF - 19: ab bb cb db eb fb gb +FFFFFFF8: FF FF FF FF FF FF FF FF - 20: ac bc cc dc ec fc gc +FFFFFFF8: FF FF FF FF FF FF FF FF - 21: ad bd cd dd ed fd gd +FFFFFFF8: FF FF FF FF FF FF FF FF - 22: ae be ce de ee fe ge +FFFFFFF8: FF FF FF FF FF FF FF FF - 23: af bf cf df ef ff gf +FFFFFFF8: FF FF FF FF FF FF FF FF - 24: ag bg cg dg eg fg gg +FFFFFFF8: FF FF FF FF FF FF FF FF - 25: ah bh ch dh eh fh gh +FFFFFFF8: FF FF FF FF FF FF FF FF - 26: ai bi ci di ei fi gi +FFFFFFF8: FF FF FF FF FF FF FF FF - 27: aj bj cj dj ej fj gj +FFFFFFF8: FF FF FF FF FF FF FF FF - 28: ak bk ck dk ek fk gk +FFFFFFF8: FF FF FF FF FF FF FF FF - 29: al bl cl dl el fl gl +FFFFFFF8: FF FF FF FF FF FF FF FF - 30: am bm cm dm em fm gm +FFFFFFF8: FF FF FF FF FF FF FF FF - 31: an bn cn dn en fn gn +FFFFFFF8: FF FF FF FF FF FF FF FF - 32: ao bo co do eo fo go +FFFFFFF8: FF FF FF FF FF FF FF FF - 33: ap bp cp dp ep fp gp +FFFFFFF8: FF FF FF FF FF FF FF FF - 34: aq bq cq dq eq fq gq +FFFFFFF8: FF FF FF FF FF FF FF FF - 35: ar br cr dr er fr gr +FFFFFFF8: FF FF FF FF FF FF FF FF - 36: as bs cs ds es fs gs +FFFFFFF8: FF FF FF FF FF FF FF FF - 37: at bt ct dt et ft gt +FFFFFFF8: FF FF FF FF FF FF FF FF - 38: au bu cu du eu fu gu +FFFFFFF8: FF FF FF FF FF FF FF FF - 39: av bv cv dv ev fv gv +FFFFFFF8: FF FF FF FF FF FF FF FF - 40: aw bw cw dw ew fw gw +FFFFFFF8: FF FF FF FF FF FF FF FF - 41: ax bx cx dx ex fx gx +FFFFFFF8: FF FF FF FF FF FF FF FF - 42: ay by cy dy ey fy gy +FFFFFFF8: FF FF FF FF FF FF FF FF - 43: az bz cz dz ez fz gz +FFFFFFF8: FF FF FF FF FF FF FF FF - 44: a0 b0 c0 ; ERROR: Too many variables +Too many variables at line 44 in file 'errors.txt' + +FFFFFFF8: FF FF FF FF FF FF FF FF - 45: +FFFFFFF8: FF FF FF FF FF FF FF FF - 46: begin +Starting main program at line 46 + +FFFFFFF8: FF FF FF FF FF FF FF FF - 47: .Start +FFFFFFF8: FF FF FF FF FF FF FF FF - 48: cls x ; ERROR: Bad argument +Bad argument at line 48 in file 'errors.txt' + +FFFFFFF9: FF FF FF FF FF FF FF 15 - 49: prs " start of acode: " +0000000D: 61 63 6F 64 65 3A 20 00 - 50: input x1 x1 x1 x1 +00000012: 3A 20 00 07 08 08 08 08 - 51: a=Start ; ERROR: Variable expected +Variable expected at line 51 in file 'errors.txt' + +00000012: 3A 20 00 07 08 08 08 08 - 52: a=12345 +00000016: 08 08 08 08 08 39 30 01 - 53: h=a ; ERROR: Instruction not recognized +Instruction not recognized at line 53 in file 'errors.txt' + +00000016: 08 08 08 08 08 39 30 01 - 54: c=1 +00000019: 08 08 39 30 01 48 01 03 - 55: a=h ; ERROR: Syntax error +Syntax error at line 55 in file 'errors.txt' + +00000019: 08 08 39 30 01 48 01 03 - 56: +00000019: 08 08 39 30 01 48 01 03 - 57: ;code + +00000019: 08 08 39 30 01 48 01 03 - 58: +00000019: 08 08 39 30 01 48 01 03 - 59: push a ; ERROR: Instruction not allowed in interpreted acode +Instruction not allowed in interpreted acode at line 59 in file 'errors.txt' + +00000019: 08 08 39 30 01 48 01 03 - 60: code : ; ERROR: Plus or minus expected +Plus or minus expected at line 60 in file 'errors.txt' + +00000019: 08 08 39 30 01 48 01 03 - 61: ;pop b +00000019: 08 08 39 30 01 48 01 03 - 62: ;and a,b +00000019: 08 08 39 30 01 48 01 03 - 63: ;or a,b +00000019: 08 08 39 30 01 48 01 03 - 64: ;xor a,b +00000019: 08 08 39 30 01 48 01 03 - 65: add a,b +0000001C: 30 01 48 01 03 0A 02 01 - 66: sub a,b +0000001F: 01 03 0A 02 01 0B 02 01 - 67: sub a-b ; ERROR: Comma expected +Comma expected at line 67 in file 'errors.txt' + +00000020: 03 0A 02 01 0B 02 01 0B - 68: list1(0)=a +00000023: 01 0B 02 01 0B 81 00 01 - 69: list1(0)>a ; ERROR: Equals expected +Equals expected at line 69 in file 'errors.txt' + +00000023: 01 0B 02 01 0B 81 00 01 - 70: ;&list1(2)=a +00000023: 01 0B 02 01 0B 81 00 01 - 71: b=4 +00000026: 01 0B 81 00 01 48 04 02 - 72: &list1(b)=a ; ERROR: Can't do 16 bit tables in interpreted mode +Can't do 16 bit tables in interpreted mode at line 72 in file 'errors.txt' + +00000026: 01 0B 81 00 01 48 04 02 - 73: d=list1(3) +00000029: 00 01 48 04 02 C1 03 04 - 74: e=list1(b) +0000002C: 04 02 C1 03 04 A1 02 05 - 75: ;&f=list1(2) +0000002C: 04 02 C1 03 04 A1 02 05 - 76: ;&g=list1(b) +0000002C: 04 02 C1 03 04 A1 02 05 - 77: ;code - +0000002C: 04 02 C1 03 04 A1 02 05 - 78: code + +0000002C: 04 02 C1 03 04 A1 02 05 - 79: code + ; ERROR: Already in specified code state +Already in specified code state at line 79 in file 'errors.txt' + +0000002C: 04 02 C1 03 04 A1 02 05 - 80: push a ; ERROR: Something not implemented +Something not implemented at line 80 in file 'errors.txt' + +0000002C: 04 02 C1 03 04 A1 02 05 - 81: +0000002C: 04 02 C1 03 04 A1 02 05 - 82: .transcode +0000002C: 04 02 C1 03 04 A1 02 05 - 83: prs " Not allowed in MC ..." ; ERROR: Instruction not allowed in machine code +Instruction not allowed in machine code at line 83 in file 'errors.txt' + +0000002C: 04 02 C1 03 04 A1 02 05 - 84: code - +0000002C: 04 02 C1 03 04 A1 02 05 - 85: jump transcode x1; ERROR: Can't jump into area of different code state +Can't jump into area of different code state at line 85 in file 'errors.txt' + +0000002D: 02 C1 03 04 A1 02 05 0E - 86: code + ; ERROR: MC must be even-aligned (not if code is properly implemented) +MC must be even-aligned at line 86 in file 'errors.txt' + +0000002D: 02 C1 03 04 A1 02 05 0E - 87: code - +0000002D: 02 C1 03 04 A1 02 05 0E - 88: +0000002D: 02 C1 03 04 A1 02 05 0E - 89: prs " contents of list 1 are: " +00000049: 31 20 61 72 65 3A 20 00 - 90: prs ' contents of list 1 are: ' ; ERROR: Missing quote +Missing quote at line 90 in file 'errors.txt' + +00000049: 31 20 61 72 65 3A 20 00 - 91: a=0 +0000004C: 72 65 3A 20 00 48 00 01 - 92: .Tloop2 +0000004C: 72 65 3A 20 00 48 00 01 - 93: b=list1(a) +0000004F: 20 00 48 00 01 A1 01 02 - 94: b=list1[a]; ERROR: Bracket expected +Bracket expected at line 94 in file 'errors.txt' + +0000004F: 20 00 48 00 01 A1 01 02 - 95: print b +00000051: 48 00 01 A1 01 02 03 02 - 96: prs " " +00000055: 01 02 03 02 06 FA 20 00 - 97: b=list1(Start) ; ERROR: Bad table index +Bad table index at line 97 in file 'errors.txt' + +00000055: 01 02 03 02 06 FA 20 00 - 98: add a,c +00000058: 02 06 FA 20 00 0A 03 01 - 99: if 8<20 then Tloop2 ; ERROR: Variable not defined +Variable not defined at line 99 in file 'errors.txt' + +00000058: 02 06 FA 20 00 0A 03 01 - 100: if a<20 then Tloop2 +0000005C: 00 0A 03 01 7A 01 14 F1 - 101: if !<20 then Tloop2 ; ERROR: Bad symbol +Bad symbol at line 101 in file 'errors.txt' + +0000005C: 00 0A 03 01 7A 01 14 F1 - 102: prs " d=" +00000062: 14 F1 06 FA 20 64 3D 00 - 103: print d +00000064: 06 FA 20 64 3D 00 03 04 - 104: if a<20 then OoR +00000068: 3D 00 03 04 7A 01 14 FD - 105: prs " This is a very long string to produce out of range error " +000000A5: 20 65 72 72 6F 72 20 00 - 106: prs " This is another very long string to produce out of range error " +000000E8: 20 65 72 72 6F 72 20 00 - 107: prs " This is again a very long string to produce out of range error " +0000012B: 20 65 72 72 6F 72 20 00 - 108: .OoR ; ERROR: Forward reference to '%s' out of range +Forward reference to 'OoR' out of range at line 104 in file 1 + +0000012B: 20 65 72 72 6F 72 20 00 - 109: prs " This is a final very long string to produce out of range error " +0000016E: 20 65 72 72 6F 72 20 00 - 110: if a<20 then Tloop2 ; ERROR: Relative jump out of range +Relative jump out of range at line 110 in file 'errors.txt' + +00000171: 72 6F 72 20 00 7A 01 14 - 111: prs " e=" +00000177: 01 14 06 FA 20 65 3D 00 - 112: if a<20 then x1 ; ERROR: Symbol redefined as different type +Symbol redefined as different type at line 112 in file 'errors.txt' + +0000017A: FA 20 65 3D 00 7A 01 14 - 113: print e +0000017C: 65 3D 00 7A 01 14 03 05 - 114: if a!=20 then Tloop2 ; ERROR: Bad operator +Bad operator at line 114 in file 'errors.txt' + +0000017C: 65 3D 00 7A 01 14 03 05 - 115: prs " f=" +00000182: 03 05 06 FA 20 66 3D 00 - 116: prs " This is not allowed: œ ..." ; ERROR: Pound sign is not allowed in prs +Pound sign is not allowed in prs at line 116 in file 'errors.txt' + +0000019A: 6C 6C 6F 77 65 64 3A 20 - 117: print f +0000019C: 6F 77 65 64 3A 20 03 06 - 118: .x1 ; ERROR: Can't redefine symbol +Can't redefine symbol at line 118 in file 'errors.txt' + +0000019C: 6F 77 65 64 3A 20 03 06 - 119: prs " g=" +000001A2: 03 06 06 FA 20 67 3D 00 - 120: if aa ; ERROR: Equals expected +Equals expected at line 69 in file 'errors.txt' + +00000023: 01 0B 02 01 0B 81 00 01 - 70: ;&list1(2)=a +00000023: 01 0B 02 01 0B 81 00 01 - 71: b=4 +00000026: 01 0B 81 00 01 48 04 02 - 72: &list1(b)=a ; ERROR: Can't do 16 bit tables in interpreted mode +Can't do 16 bit tables in interpreted mode at line 72 in file 'errors.txt' + +00000026: 01 0B 81 00 01 48 04 02 - 73: d=list1(3) +00000029: 00 01 48 04 02 C1 03 04 - 74: e=list1(b) +0000002C: 04 02 C1 03 04 A1 02 05 - 75: ;&f=list1(2) +0000002C: 04 02 C1 03 04 A1 02 05 - 76: ;&g=list1(b) +0000002C: 04 02 C1 03 04 A1 02 05 - 77: ;code - +0000002C: 04 02 C1 03 04 A1 02 05 - 78: code + +0000002C: 04 02 C1 03 04 A1 02 05 - 79: code + ; ERROR: Already in specified code state +Already in specified code state at line 79 in file 'errors.txt' + +0000002C: 04 02 C1 03 04 A1 02 05 - 80: push a ; ERROR: Something not implemented +Something not implemented at line 80 in file 'errors.txt' + +0000002C: 04 02 C1 03 04 A1 02 05 - 81: +0000002C: 04 02 C1 03 04 A1 02 05 - 82: .transcode +0000002C: 04 02 C1 03 04 A1 02 05 - 83: prs " Not allowed in MC ..." ; ERROR: Instruction not allowed in machine code +Instruction not allowed in machine code at line 83 in file 'errors.txt' + +0000002C: 04 02 C1 03 04 A1 02 05 - 84: code - +0000002C: 04 02 C1 03 04 A1 02 05 - 85: jump transcode x1; ERROR: Can't jump into area of different code state +Can't jump into area of different code state at line 85 in file 'errors.txt' + +0000002D: 02 C1 03 04 A1 02 05 0E - 86: code + ; ERROR: MC must be even-aligned (not if code is properly implemented) +MC must be even-aligned at line 86 in file 'errors.txt' + +0000002D: 02 C1 03 04 A1 02 05 0E - 87: code - +0000002D: 02 C1 03 04 A1 02 05 0E - 88: +0000002D: 02 C1 03 04 A1 02 05 0E - 89: prs " contents of list 1 are: " +00000049: 31 20 61 72 65 3A 20 00 - 90: prs ' contents of list 1 are: ' ; ERROR: Missing quote +Missing quote at line 90 in file 'errors.txt' + +00000049: 31 20 61 72 65 3A 20 00 - 91: a=0 +0000004C: 72 65 3A 20 00 48 00 01 - 92: .Tloop2 +0000004C: 72 65 3A 20 00 48 00 01 - 93: b=list1(a) +0000004F: 20 00 48 00 01 A1 01 02 - 94: b=list1[a]; ERROR: Bracket expected +Bracket expected at line 94 in file 'errors.txt' + +0000004F: 20 00 48 00 01 A1 01 02 - 95: print b +00000051: 48 00 01 A1 01 02 03 02 - 96: prs " " +00000055: 01 02 03 02 06 FA 20 00 - 97: b=list1(Start) ; ERROR: Bad table index +Bad table index at line 97 in file 'errors.txt' + +00000055: 01 02 03 02 06 FA 20 00 - 98: add a,c +00000058: 02 06 FA 20 00 0A 03 01 - 99: if 8<20 then Tloop2 ; ERROR: Variable not defined +Variable not defined at line 99 in file 'errors.txt' + +00000058: 02 06 FA 20 00 0A 03 01 - 100: if a<20 then Tloop2 +0000005C: 00 0A 03 01 7A 01 14 F1 - 101: if !<20 then Tloop2 ; ERROR: Bad symbol +Bad symbol at line 101 in file 'errors.txt' + +0000005C: 00 0A 03 01 7A 01 14 F1 - 102: prs " d=" +00000062: 14 F1 06 FA 20 64 3D 00 - 103: print d +00000064: 06 FA 20 64 3D 00 03 04 - 104: if a<20 then OoR +00000068: 3D 00 03 04 7A 01 14 FD - 105: prs " This is a very long string to produce out of range error " +000000A5: 20 65 72 72 6F 72 20 00 - 106: prs " This is another very long string to produce out of range error " +000000E8: 20 65 72 72 6F 72 20 00 - 107: prs " This is again a very long string to produce out of range error " +0000012B: 20 65 72 72 6F 72 20 00 - 108: .OoR ; ERROR: Forward reference to '%s' out of range +Forward reference to 'OoR' out of range at line 104 in file 1 + +0000012B: 20 65 72 72 6F 72 20 00 - 109: prs " This is a final very long string to produce out of range error " +0000016E: 20 65 72 72 6F 72 20 00 - 110: if a<20 then Tloop2 ; ERROR: Relative jump out of range +Relative jump out of range at line 110 in file 'errors.txt' + +00000171: 72 6F 72 20 00 7A 01 14 - 111: prs " e=" +00000177: 01 14 06 FA 20 65 3D 00 - 112: if a<20 then x1 ; ERROR: Symbol redefined as different type +Symbol redefined as different type at line 112 in file 'errors.txt' + +0000017A: FA 20 65 3D 00 7A 01 14 - 113: print e +0000017C: 65 3D 00 7A 01 14 03 05 - 114: if a!=20 then Tloop2 ; ERROR: Bad operator +Bad operator at line 114 in file 'errors.txt' + +0000017C: 65 3D 00 7A 01 14 03 05 - 115: prs " f=" +00000182: 03 05 06 FA 20 66 3D 00 - 116: prs " This is not allowed: œ ..." ; ERROR: Pound sign is not allowed in prs +Pound sign is not allowed in prs at line 116 in file 'errors.txt' + +0000019A: 6C 6C 6F 77 65 64 3A 20 - 117: print f +0000019C: 6F 77 65 64 3A 20 03 06 - 118: .x1 ; ERROR: Can't redefine symbol +Can't redefine symbol at line 118 in file 'errors.txt' + +0000019C: 6F 77 65 64 3A 20 03 06 - 119: prs " g=" +000001A2: 03 06 06 FA 20 67 3D 00 - 120: if aa ; ERROR: Equals expected +;&list1(2)=a + b=4 +&list1(b)=a ; ERROR: Can't do 16 bit tables in interpreted mode + d=list1(3) + e=list1(b) +;&f=list1(2) +;&g=list1(b) +;code - +code + +code + ; ERROR: Already in specified code state + push a ; ERROR: Something not implemented + +.transcode + prs " Not allowed in MC ..." ; ERROR: Instruction not allowed in machine code +code - + jump transcode x1; ERROR: Can't jump into area of different code state +code + ; ERROR: MC must be even-aligned (not if code is properly implemented) +code - + + prs " contents of list 1 are: " + prs ' contents of list 1 are: ' ; ERROR: Missing quote + a=0 +.Tloop2 + b=list1(a) + b=list1[a]; ERROR: Bracket expected + print b + prs " " + b=list1(Start) ; ERROR: Bad table index + add a,c + if 8<20 then Tloop2 ; ERROR: Variable not defined + if a<20 then Tloop2 + if !<20 then Tloop2 ; ERROR: Bad symbol + prs " d=" + print d + if a<20 then OoR + prs " This is a very long string to produce out of range error " + prs " This is another very long string to produce out of range error " + prs " This is again a very long string to produce out of range error " +.OoR ; ERROR: Forward reference to '%s' out of range + prs " This is a final very long string to produce out of range error " + if a<20 then Tloop2 ; ERROR: Relative jump out of range + prs " e=" + if a<20 then x1 ; ERROR: Symbol redefined as different type + print e + if a!=20 then Tloop2 ; ERROR: Bad operator + prs " f=" + prs " This is not allowed: œ ..." ; ERROR: Pound sign is not allowed in prs + print f +.x1 ; ERROR: Can't redefine symbol + prs " g=" + if a0 + Samples=25 ; Can be changed - See FX.TXT. +; list25=25 ; sound samples(?) +; list26 is used to hold font + FloorMap=27 ; see FloorMapList. Specific to Billy. + + SpriteTable=28 ; was used for adept, now available. + LongWS=29 ; Shared workspace with machine code + WordWS=30 ; Shared workspace with machine code + ByteWS=31 ; Shared workspace with machine code + +;------------------- + +const + DebugSubplots=0 ; ****** Must be zero for RELEASE GAME. See fire.txt + + + + + Editor=0 ; conditional assembly - disable clipping etc. + NotEditor=1 + + IBMClipPosition=159 ;(IBMTopOfText-1) + IBMTopOfText=160 + IBMTextHeight=40 + IBMTextLimit=33 ;(IBMTextHeight-7) + +; draw flags are... + dRemoveRedraw=65535 ; -1 Remove and redraw + dInsert=0 ; 0 insert + dPlot=1 ; 1 plot as sprite + dInsertRedraw=2 ; 2 insert and redraw + dMarkPreload=3 ; 3 mark to preload + MarkPreload=3 ; 3 mark to preload + dSetProtect=4 ; 4 set protection mark + dUnsetProtect=5 ; 5 unsert protection mark + dPurgeObject=6 ; purge the object + +; offsets in List4... + EnterFromOffset=64 ;;32 + DoorOpenOffset=128 ;;64 + ThroughDoorOffset=256 ;;128 + +; animation constants... +;; GMJ 25/8/89 Now a Var ;; ACBStart=0 ; start within ACBList + ConstACBStart=0 +;; ConstACBSearchStartMinus1=63 ; 767 + ConstACBSearchStart=64 ; 768 ; NuMNPC*ACBSize + ConstACBEnd=4500 ; end within ACBList + + ConstTTPACBStart=4544 ; start for talking to people acbs + ConstTTPACBEnd=7488 ;***5500 ; end within ACBList + + ACBSortStart=7570 ;***5570 ; =ACBEnd. Table used for priortization of sprites + ACBListSize=8500 ; 8 Jan 1991. was 8500 + ACBSize=64 ; at least 42=ACBStackStart+AcbEntries*4. size of ACB entry in bytes + ACBEntries=5 ; 6 ; ACB is 5 word header, followed by double-word entries. + ACBStackStart=32 ; offset within ACB of first entry in stack + ACBStackStartMinus1=31 + ACBStackEnd=64 ;AcbStackStart+ACBEntries*6 + + ACBXOffset=4 + ACBZOffset=6 + ACBHOffset=8 + ACBRasterOffset=10 ; amount to add on to raster objects +; used within this acb. + + ACBDestX=12 + ACBDestZ=14 + ACBDestH=16 + ACBFinePosOffset=18 +; ACBTimeInRoom=19 + ACBLastHeightAdjust=20 ; byte + ACBStuckOnAnother=20 ; byte: timer to release irretrievable stuck sprites. +; (for scrolling games) + ACBCumulativeShift=22 ; word - for Walkabout: keeps track +; of how far we've shifted vertically - to allow the up/down +; movement as we walk to be cancelled when change animation. + +; ACBOwnerOffset=21 ; scrolling games mainly +; ACBAngleFromIntended=22 +; ACBIntendedDirection=23 +; ACBStepsInCurrentDir=24 + ACBCurrentSpeed=24 ; word is used + + +; ACBObjectOffset=26 ; the object number this acb corresponds to +; ACBSearchTime=28 +; ACBPreviousDistance=30 + +; values set in acbstatus +; All low values (<128) mean that the npc +; is under the sole control of the graphics task. + +; ACBToDoor=1 ; game uses direction 1..8 instead nowadays. Indicates +; that npc is doing a local gd to go through a door. + ACBGeneralGD=16 ;;10 ; a non-specific local gd is underway. + ACBFindNPC=17 ;;11 ; same as generalgd, but trying to find a person + ACBAscending=20 ; actor is ascending stairs + ACBDescending=21 ; actor is descending stairs + +; All higher values (>128) indicate that the npc +; may be controlled by either strategy or graphics +; tasks. + ACBStuck=252 ; an NPC couldn't get to its destination. + ACBArrived=253 ; ACBStatus set to this when a local gd has finished. Cleared +; by strategy task when appropriate action has been taken. + ACBInterruptibleGD=254 ; person is moving, but +; can be stopped or a new sequence started without +; any problems. + ACBIdle=0 ; ACBStatus set to this when no local gd is in place. +; - i.e. person is not moving (or is under user control) + +; no sprite is ever ENTIRELY controlled by the strategy +; task (whilst it is on-screen) +;---- + + MaxTicks=5 +;------- +; co-ordinate ranges for use by mouse handler code. + MinXUpperDisplayArea=16 + MaxXUpperDisplayArea=200 + MinYUpperDisplayArea=0 + MaxYUpperDisplayArea=200 + + MinXLowerDisplayArea=16 + MaxXLowerDisplayArea=200 + MinYLowerDisplayArea=100 + MaxYLowerDisplayArea=200 + + MinXColourBar=304 + MinYColourBar=32 + MaxYColourBar=160 + SizeColourBarElement=8 + +;- + RasterType=1 + XZHType=2 + AnimationType=3 + CompressedType=4 + CellType=5 + NeoType=6 + + NeoObjectNumber=0 + MagnifyObjectNumber=65535 + MagnifyXSize=8 + MagnifyYSize=8 + HalfMagnifyXSize=4 + HalfMagnifyYSize=4 + + + NumCells=1000 + + UpperContextType=1 + LowerContextType=2 + +Blocks=0 ; default editing mode - i.e. EditMode +Pixels=1 ; an editing mode +;- +; ObjectBufferSize=800 ; in bytes = (ObjectXSize+ObjectYSize)*2 +; ObjectXSize=20 ; horizontal size in 16x16 blocks +; ObjectXSizeMinus1=19 +; ObjectYSize=20 +; ObjectYSizeMinus1=19 +; sizes for nearly full screen... + ScreenXSize=15 + ScreenYSize=5 + ScreenXSizePixels=241 ; pixels: =ScreenXSize*16+1 + ScreenYSizePixels=161 ; pixels: =ScreenYSize*16+1 + +; reduced screen size for testing: +; ScreenXSize=10 +; ScreenYSize=7 +; ScreenXSizePixels=161 ; pixels: =ScreenXSize*16+1 +; ScreenYSizePixels=113 ; pixels: =ScreenYSize*16+1 +;--- +; false=0 +; true=1 +;---- + NeoScreenOffset=0 ; within list18 + EditorNeoOffset=32768 ; within list18 +; (remember that List operations won't find this data +; due to them being treated as signed offsets) +;---- + ScreenXBlocks=50 + ScreenXBlocksTimes2=100 + ScreenYBlocks=50 + MapSize=5000 ; ScreenXBlocks*ScreenYBlocks*2 (word based map table) + + UpMapStep=65546 ; -ScreenXBlocks*2 + RightMapStep=2 ; word-based map + DownMapStep=100 ; ScreenXBlocks*2 + LeftMapStep=65534 ; word-based map + + SpriteTableSize=3600 ; MaxMovingSprites*48 +; +; output buffer offsets (i.e. list 2 offsets) + StartOutputBuffer=0 +;; EndOutputBuffer=255 + EndOutputBufferPlus1=256 ; offset of first byte after used area of buffer + SizeOutputBuffer=256 ; EndOutputBufferPlus1-StartOutputBuffer + StartScreenLineBuffer=256 + EndScreenLineBuffer=296 +;-------- +; message manifest constants... +; space=197 +; cr=198 +; dot=199 +;--- +; offsets within LongWs + HiLongRandomSeed=8 ; long value + LoLongRandomSeed=10 ; long value +HiLongLogicalBase=12 +LoLongLogicalBase=14 +; holds address 8 less than the real physical base +; to allow the leftmost 16 pels to be clipped in an elegant fashion + +LongPhysicalBase=16 +HiLongPhysicalBase=16 +LoLongPhysicalBase=18 +; holds address of currently displayed screen +; holds address of currently displayed screen + +LongOSScreenAddress=20 +; screen address when game started + +HiLongTextScreenBase=24 +LoLongTextScreenBase=26 +; base address for writing text to. + + HiLongCurrentTaskMTCB=28 + LoLongCurrentTaskMTCB=30 + HiLongNextTaskMTCB=32 + LoLongNextTaskMTCB=34 + + HiLongSpriteDataPtr=108 + LoLongSpriteDataPtr=110 + + HiLongFreeWorkSpace=124 + LoLongFreeWorkSpace=126 + + LongGraphicsScreenBase=160 ; where MC thinks the screen on +; which to write graphics is. cf. TextScreenBase + HiLongGraphicsScreenBase=160 + LoLongGraphicsScreenBase=162 +;------ +; offsets within WordWs + WordCursorXPos=0 + WordCursorYPos=2 + WordFrameTime=4 + WordPlayer1SpriteOffset=6 + + WordScreenXPos=8 + WordScreenYPos=10 + WordScreenXMax=12 + WordScreenYMax=14 + WordPlayerXMax=16 + WordPlayerYMax=18 + + WordScreenXBlocks=20 + WordScreenYBlocks=22 + WordXPosSave=24 + WordYPosSave=26 + WordTextBufferOffset=28 + WordFreeSprites=30 + WordMouseXDistance=32 + WordMouseYDistance=34 + WordSuspendTaskSwap=36 + WordUseVM=38 + WordVBLDisabled=40 + + WordRasterOffset=56 + WordErrorNumber=66 +;-------- +; offsets within ByteWs + ByteJoystickStatus=0 + ByteLastKeyPressed=1 +; ByteFrameReadyFlag=2 + ByteInvertFlag=3 + ByteBreakPointArmed=4 + ByteScrollStep=5 + ByteCurrentWeapon=6 + + ByteFrameReadyFlag=9 + ByteStarPhase=10 + ByteWordWrapWidth=11 + +; offsets within permament sprite data block + StationaryAnimationOffset=14 + MovingAnimationOffset=16 + FightAnimationOffset=18 + ThrowAnimationOffset=20 + InitialHitPointOffset=22 + InitialBlowStrengthOffset=24 + ByteOutputDevice=25 + TimeBetweenBlowsOffset=26 + NumAnimationOffset=27 + TypeOffset=28 + SpeedOffset=29 + NullMovesOffset=30 + DistanceOffset=35 + AddDirOffset=37 + +;CDWithPlayer equ 0 * bit 0 +;CDWithMissiles equ 1 +;CDWithMonsters equ 2 +;CDWithBG equ 3 * bit 3 +;CDWithObject equ 4 +;CDWithInvisibles equ 5 +;CDWithMonsterMissile equ 6 + +; PlayerMask=1 +; MissileMask=2 +; MonsterMask=4 +; BGMask=8 +; ObjectMask=16 +; InvisibleMask=32 +; MonsterMissileMask=64 + +; PlayerType=1 +; MissileType=2 +; MonsterType=4 +; BGType=8 +; ObjectType=16 +; InvisibleType=32 +; MonsterMissileType=64 + +;; offsets within temporary sprite data block +; xspeedOffset=4 +; YSpeedOffset=6 +; XPosOffset=8 +; YPosOffset=10 +; DataPtrOffset=12 ; LONG +; LoDataPtrOffset=14 +; NameOffset=24 +; HitPointOffset=26 +; BlowStrengthOffset=28 +; TimeToNextBlowOffset=30 +; ViewOffset=31 +; StageOffset=32 ; animation stage +; LifeCounterOffset=36 +; AnimationOffset=38 + +; offsets of linked list pointers within LL list. +; note that many of these are referenced by MenuTable + LLPlayerInv=0 ; ll showing player's inventory + LLRangedWeapons=2 ; ll giving available ranged weapons + LLEntrySize=10 + LLTableSize=250 + +; offsets of entries in LL table. + InvNameOffset=2 ; contains a word giving the "name" of the + RWNameOffset=2 ; holds word value + RWTypeOffset=4 ; holds byte value +; object held. This will usually by the same as the number +; of the sprite data. + +MenuDelay=1000 ; slow down menu to prevent flickering display + +; offsets within RoomData +; ExitOffsetBase=4 +; North=2 +; East=4 +; South=6 +; West=8 + +; +; offsets within Workspace List + RoomTableOffset=0 ; gives number of exits used from each + RoomTableEntrySize=8 ; room - used in maze drawing + +; offsets within list7 + NextAddDirTableOffset=10 + ConvertViewToXY=38 ; 18+20 because index into table is -5..+5 + ConvertViewToView=67 ; 62+5 """ "" "" "" "" "" + +;------- +;; sprite data numbers... +;; i.e. NAMES of OBJECTS (objects) +; user=256 +; Bottle=14 +; Sword=15 +; Shield=16 +; Ring=17 +; Wand=18 +; Scroll=19 +; Gold=20 +; Club=21 + StructureBufferList=15 + +;--------- + FloorMapList=27 + EndCache2=6650 ; 4800 ;see 'const' in CACHE.TXT Size of two +; floormap files+220 bytes. + PlayerHeight=64 + + OverlayEntryOffset=12 ; see goto @OverlayEntryPoint in AAHEAD + +;------------- + true=1 + false=0 + ForceCR=3 + cr=5 + FlushBuffer=6 + dot=7 + space=8 + minusone=65535 + + ForceUpperCase=0 ; set non-zero if all text needs to be +; converted to upper case + + DefaultTextWidth=150 ; width of normal text box (10x10 at present) + StartStructureBuffer=32 + + +; Printing Constants... + RasterTop=0 + RasterLeftMargin=0 + + + + ACBOwnerOffset=22 + OwnedByPat=2 + OwnedByBilly=3 + ACBObjectTypeOffset=23 + MinHumanType=220 + ManType=221 + + LinkNextOffset=26 ; before stack in acb +; within acbs, this word gives the acb offset +; of any acb linked to this one. If this acb moves, move the other +; acb as well. If this acb is killed, kill the other acb as well + +; Menu Result codes... +DoNothing=0 + + +; values for Game variable... + EscapeGame=21 + PositionPeopleGame=25 + PatWalkGame=30 ; drop into pat walking around shooting section. + MinTrackingGame=127 ; lowest number a game using the +; tracking maps/cd tables can have + TrackingGame=128 + RustlingGame=140 + +; entry parameters for OverlayEntryPoint and CurrentScreen variable + SelectPlayerScreen=1 + CodeBackToWalkabout=2 ; (Not CurrentScreen variable) + CodeRestartGame=31000 + duelback=429 ; entry code for OverlayEntryPoint + GameMap=600 + BankGame=601 + IntroScreen=602 + CardGameScreen=12 ; arcadeb.se + BrawlScreen=560 ; arcadeb.se + + + TownAcode=69 ; 'e' + ScrollingAcode=50 ; '2' + ArcadeAcode=51 ; '3' + + NumberOfPeople=110 + NumberOfTowns=6 + TownFixedDataList=6 + TownVarDataList=7 + TownVarDataSize=10000 ; space allocated for it: must be at least +; NumberOfPeople*16+NumberOfTowns*16 + NumberOfPeople*32 (identikits) +; + Space for sub-plots + ObjectsInformation (about 400 bytes) + WorkListSize=6000 ; space allocated for WorkList(surprise, surprise) + WorkListNum=16 +;--------- + Pat=1 ; values for PlayersName + Billy=2 + + +; values for StructureFile variable + TownStructures=69 ;'acodE.acd', s.dat + IdentikitStructures=2 ; no particular acode, 'identiks.dat' + LinkingStructures=3 ; no particular acode, linkings.dat + BrawlStructures=49 ; s1.dat + ScrollingStructures=50 ; s2.dat + ArcadeStructures=51 ; 'acod3.acd', s3.dat + IntroStructures=999 + + DemoVersion=0 + NotDemoVersion=1 ; set to 0 for demo versions, 1 for normal game. + + ML=200 ; base for values in LOCATION variable +; of places accessed from map - e.g. ranches. +; i.e. LOCATION = TOWN + ML. Within town, LOCATION is +; the room number: 30..170. This gives a non-overlapping +; set of location numbers, for use in e.g. PeopleData +; location positions. + +; MinTown=430 +; MaxTown=590 + +;---------------------------- +; Strategy game constants... +; We keep the following table for people in the +; game: +; There are 60+ people, each has like the following: +; (16 bytes in all) +; .b: Bit 0 set if has met Pat +; : Bit 1 set if has met Billy +; .b Opinion of Billy. 0=hatred, 255=infatuation. +; .b Opinion of Pat. +; .b Time till prepared to do next robbery. +; .b Time till prepared to help Pat again. +; .b (Identikit stuff) +; .b + TVDPeopleNameOffset=6 +; .b +; PeopleBillyMenuOffset=8 +; .w Current Menu number for talking to Billy + PeoplePatMenuoffset=10 +; .w Current Menu number for talking to Pat +; .w +; .b,.w +; These people have their initial opinions and identikits +; randomly assigned. The position in the list corresponds +; to TownFixedData(ptr is offset 0) which contains a room number and an XZH +; number for the person (620..650) as they appear small. +; If the xzh number is zero, there is assumed to be one +; person only in the room (e.g. inside shops, where there +; is no small person shown). +; i.e. the format of this fixed table is: +; (8 bytes per person) + +; .b room number +; .b xzh number +TFDMenuOffset=2 +; .b initial menu number (half menu offset) +; .b +; .w +; .b +TFDPersonTypeOffset=7 +; .b + +; example is... +; dc.b NoPerson ; room number in which person appears =255 for end of this table. +; dc.b 0 ; xzh number used to represent person (0 if none, or any +;; xzh within range 620..650) +; dc.b DefaultMenu ; Current menu to use in conversations / 2 +; dc.b 1 ; identikit type prototype to use +; dc.b Default2ndMenu,NoName,0,YAM + + + + +; And there is a fixed table in TownFixedData(ptr is offset 2) +; which has the following entries (16 bytes per town) +; .w Increase in gold per time unit +; .w Maximum level of gold in bank. +; .w +; .w +; .w +; .w +; .w +; .w + +; There is a table containing all the bits of information +; people may want to know about: in TownVarData. +; This is initialised from a table of identical format +; in TownFixedData (except that offsets are relative to the +; start of this little table, wheras in TownVarData they +; are relative to TownVarData). The copy routine makes the +; appropriate conversion. +; +; .w Offset of "Money Location" information. +; .w Offset of "Deputies Location" information. +; .w Offset of "Gang Location" information +; .w Offset of "Recent robbery" information +; .w Offset of sub-plot table. + +; .w,.w Gold in Bank at town 0 +; .w,.w Gold in Bank at town 1 +; .w,.w Gold in Bank at town 2 +; .w,.w Gold in Bank at town 3 +; .w,.w Gold in Bank at town 4 +; .w,.w Gold in Bank at town 5 +; -1.w,-1.w + +; .w,.w Number of deputies in town 0 +; .w,.w Number of deputies in town 1 +; .w,.w Number of deputies in town 2 +; .w,.w Number of deputies in town 3 +; .w,.w Number of deputies in town 4 +; .w,.w Number of deputies in town 5 +; .w,.w Number of deputies in town 6 +; .w,.w Number of deputies in town 7 +; -1.w,-1.w +; .w,.w Gang location 0 +; .w,.w Gang location 1 +; .w,.w Gang location 2 +; .w,.w Gang location 3 +; .w,.w Gang location 4 +; .w,.w Gang location 5 +; .w,.w Gang location 6 +; .w,.w Gang location 7 +; -1.w,-1.w +; .w,.w Recent Robbery at ?, Gang/Billy involved? +; .w,.w Cattle rustled from ?, Gang/Billy involved? +; -1.w,-1.w +; .w,.w Sub-plot? +; -1.w,-1.w + +; offsets relative to TVD(SubPlotFlags) +; All are named in form SPFxxxx. +; When "Player" is specified in the comment, this +; usually means that the field has value 0, Pat, Billy. +; (Byte value). This leaves an extra byte spare in case it's needed. + +; 0 peasant being run off land +; 2 not used + SPFCowboysMet=4 ; (Mexican). Cowboys to ambush player in town? + SPFSickManOnHorse=6 ; sick man riding with Player? +; 8 peasant needs help nursing family +; 10 + SPFTexanPosseeAvailable=12 ; number of members (word) + SPFTrackingBarneysOutlaw=14 ; tracking outlaw suggested by +; Barney Mason + + SPFAccountsRequested=16 ; player been asked to fetch accounts? + SPFAccountsGot=18 ; player got accounts from store? + SPFGangToGrassOnBilly=20 ; gang name which has promised +; to grass on Billy + SPFFreeDeputies=22 ; number of deputies unallocated (word) + SPFBeefWanted=24 ; beef asked for by Indian Chief? + SPFUprisingOffered=26 ; number of uprisings available (word) + SPFMeetBountyHunter=28 ; meet bounter hunter referred +; to in 1634. Name of town: word + SPFAmbushDecision=30 ; cleared whenever go into new town, +; set when program has made a decision about whether Billy +; is to be ambushed here, or not. + SPFCounterfeitOffered=32 ; set when Billy has been offered +; counterfeit money as his share in a robbery. + SPFMcSweenStage=34 ; set to the following values: +; 0=startup - Mrs McSween running Tunstall ranch, happy. +; 1=Billy has been offered chance to save McSween's cows. +; 2=Sheriff Brady has gone to attack McSween. This is set when +; Billy has been told of this. If player does nothing, then +; we go on to 3. Otherwise 2 is the final state. +; 3=McSween is dead, ranch stays deserted + SPFJoeGrantMet=36 ; met Joe Grant? Set to 1 if yes but his +; gun unmolested, set to 2 if gun turned to empty chamber. +; Set to FF if duel fought. + SPFMeetBounterHunter=38 + SPFSevenRiversAmbush=40 ; ambushed by them in town? Byte + SPFJesseEvans=42 ; ambushed by them in town? Byte + SPFBuckShotRoberts=44 ; Billy ambushed by Buckshot? + SPFJoseMcSween=46 ; has player gone to help McSween at ranch? + +SantaFe=10 +WhiteOaks=11 +LincolnCity=12 +Mesilla=13 +Roswell=14 +ElPaso=15 +FortStanton=19 +FortSumner=20 +FritzRanch=25 +ChisumRanch=26 +DedrickRanch=27 +BeckwithRanch=28 +TunstallRanch=29 +ReedRanch=30 +MescaleroApache=35 +Train=39 +WagonTrain=40 +CooperGang=41 +RegulatorsGang=42 +SevenRiversGang=43 +DonaAnaBunchGang=44 +JesseEvansGang=45 +FugitivesGang=46 + +;------------ End Strategy game constants +ConstTillMDGoesBust=350 ; Amount of gold +; billy needs to steal to make each MD ranch to go bust. + + +; Strategy game constants... +; offsets of pointers relative to TownVarData(SubPlotsOffset) + SPMoneyOffset=0 + SPDeputiesOffset=2 + SPGangsOffset=4 + SPRobberyOffset=6 + SPSubPlotsOffset=8 + SPHiddenOffset=10 + SPCommsInfoOffset=12 + +; entries within CommsInfo... +CommsOtherPlayerLocation=0 ; byte + + +LawFulOffset=0 +HappinessOffset=1 +DeputiesOffset=2 +; Each town has the following variable table +; which is part of ObjectsInformation: 8 bytes each +; (i.e. 8 bytes per object, including e.g. cows, gangs) +; TVD(x1+LawfulOffset=0) .b 0 if lawless, 1 if lawful +; TVD(x1+HappinessOffset=1) .b How happy the town is: starts at 128 (moderately happy) +; to 0 (completely unhappy) and up to 255 (ecstatic) +; TVD(x1+DeputiesOffset=2) .b Number of deputies stationed + + AshUpton=168 + + barneyMason=960 ; 60*16 + TomOFoliard=1600 ; 100*16 + + +;------------------- +;MUSIC + ambushMusic=100 + BankJobMusic=102 + BarBrawlMusic=104 + CardMusic=106 + ChaseMusic=108 + DuelMusic=110 + Generic1Music=112 + Generic2Music=114 + Generic3Music=116 + Generic4Music=118 + Generic5Music=120 + GetawayMusic=122 + HoeDown1Music=124 + HoeDown2Music=126 + HonkyMusic=128 + Rag3Music=130 + RagTimeMusic=132 + ShockMusic=134 + ShootOutMusic=136 + ThemeMusic=138 + TrainMusic=140 + +; SOUND SAMPLES - offsets of filename pointers in IntroTables + UghSample=150 + Colt45Sample=152 + +; Sample list offsets + ShootoutSamples=180 + DuelSamples=182 + RustlingSamples=184 + TrackingSamples=186 + EscapeSamples=188 + BankJobSamples=190 + CardSamples=192 + BrawlSamples=194 + TrainSamples=196 + IntroSamples=196 + +; MENU NUMBERS + ClearOffMenu=4 ; clear off buster, I don't associate with your kind + + LoseRepMessage=907 ; message checked for to reduce player's +; reputation by a bit (When no specific message is printed) + + HourglassObject=94 ; xzh object containing hourglass symbol, +; in all parts. + + + + JoyU=1 ; Bit set for Joystick Up + JoyD=2 ; " " " " Down + JoyL=4 ; " " " " Left + JoyR=8 ; " " " " Right + JoyF=192 ; " " " Joystick/Mouse buttons (fire is bit6) +; + + SamplesOffset=0 ; AdlibSpace + SamplesSpace=10000 + MidiOffset=10000 ; SamplesOffset+SamplesSpace + MidiSpace=17050 ; space for largest midi score. + AllSoundSpace=27500 ; SamplesOffset+SamplesSpace (does not include +; adlib file) + AdlibOffset=27500 ; offset of adlib file within list19. + AdlibSpace=1350 ; space for adlib file (PC only) + MidiList=19 + SamplesListNumber=25 + + + ReleaseGame=1 ; set to 1 for release game. (e.g. disables certain errors) + + CDListNum=2 + + English=1 ; 0 will also default to english, but is used +; to indicate that user hasn't yet chosen. + German=2 + French=3 + + CommsByteUpdate=36 + CommsWordUpdate=37 + CommsWantFinalDuel=38 + CommsAcceptFinalDuel=39 + CommsOtherPlayerHasLost=40 + CommsOtherPlayerHasWon=41 + CommsIveDrawn=42 + CommsIveShotYou=43 + CommsRedisplayMap=44 + CommsDuelReady=45 ; figures set up, ready to go. \ No newline at end of file diff --git a/l9dev/regress/games.l9/billy.l9/aahead.txt b/l9dev/regress/games.l9/billy.l9/aahead.txt new file mode 100644 index 0000000..63db554 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/aahead.txt @@ -0,0 +1,434 @@ +; AAHead.txt +; +; M.J.Austin Nov 1988 +; +; Copyright (C) 1988 Level 9 Computing +; +;---- +; tables shared between strategy task and AA stuff... +table +; CurrentX=12 +; CurrentZ=13 +; CurrentH=25 + Hires=12 + + begin + data @Start,@Start ; Dummy - overwritten by "ToMCEnd" vector +.Start + code + + data @AcodeFns,@MCFns ; pointers to the major jump blocks + + +.AcodeFns +; jump table for acode functions called from MC + goto @AcodeStart + goto @FGSpecials + goto @FGSpecialsMovedSprite + goto @BGSpecials + goto @Dummy ; SpecialCollision + goto @DAMSSpecials + goto @IRQScheduler + goto @VBL + goto @HandleCR + goto @ExtraTask + goto @StrategyTask + goto @ErrorHandler + goto @OverlayEntryPoint ; OverlayEntryOffset = 12 + +.MCFns +; jump table for MC functions called from Acode +; reserve 6 bytes per jump - absolute, long jumps +; poked in by MC +.vMCHeroOnceOnlyInit data @Dummy,@Dummy,@Dummy ;0 +.vMCHeroInit data @Dummy,@Dummy,@Dummy ;1 +.vMCClearScreen data @Dummy,@Dummy,@Dummy ;2 + +.vMCMoveScreen data @Dummy,@Dummy,@Dummy ;3 +.vMCSpecials data @Dummy,@Dummy,@Dummy ;4 +.vMCBuildBackground data @Dummy,@Dummy,@Dummy ;5 +.vMCDisplayDestroyedWalls data @Dummy,@Dummy,@Dummy ;6 +.vMCMoveAllSprites data @Dummy,@Dummy,@Dummy ;7 +.vMCDisplayAllSprites data @Dummy,@Dummy,@Dummy ;8 +.vMCTrimEdges data @Dummy,@Dummy,@Dummy ;9 +.vMCDisplayTextLine data @Dummy,@Dummy,@Dummy ;a +.vMCDisplayUpperTextLine data @Dummy,@Dummy,@Dummy ;b +.vMCDoAllTimers data @Dummy,@Dummy,@Dummy ;c +.vMCCalculateMemoryFree data @Dummy,@Dummy,@Dummy ;d +.vMCHeroInput data @dummy,@Dummy,@Dummy ;e +.vMCOswrchV1 data @Dummy,@Dummy,@Dummy ;f +.vMCInvertedOswrchV1 data @Dummy,@Dummy,@Dummy ;10 +.vMCDestroyTempMoved data @Dummy,@Dummy,@Dummy ;11 +.vMCDestroyTempFixed data @Dummy,@Dummy,@Dummy ;12 +.vMCCloseDown data @Dummy,@Dummy,@Dummy ;13 +.vMCFindSprite data @Dummy,@Dummy,@Dummy ;14 +.vMCSetUpNewSprite data @Dummy,@Dummy,@Dummy ;15 +.vMCSprite data @Dummy,@Dummy,@Dummy ;16 +.vMCHandlePlayerInput data @Dummy,@Dummy,@Dummy ;17 +.vMCReturnFrameTime data @Dummy,@Dummy,@Dummy ;18 +.vMCUpdateFrameTime data @Dummy,@Dummy,@Dummy ;19 +.vMCClearRectangle data @Dummy,@Dummy,@Dummy ;1d +.vMCMapBuildBackground data @Dummy,@Dummy,@Dummy ;1a +.vMCPreScrollMap data @Dummy,@Dummy,@Dummy ;1b +.vMCSpecialCheck data @Dummy,@Dummy,@Dummy ;1c +.vMCStartBigExplosion data @Dummy,@Dummy,@Dummy ;1d +.vMCScrollTextLine data @Dummy,@Dummy,@Dummy ;1e +.vMCReCalcSpriteGraphics data @Dummy,@Dummy,@Dummy ;1f +.vMCOsrdch data @Dummy,@Dummy,@Dummy ;20 +.vMCChecksum data @Dummy,@Dummy,@Dummy ;21 +.vMCEmptyRoom +.vMCInit3D data @Dummy,@Dummy,@Dummy ;22 +.vMCDrawObjectV1 data @Dummy,@Dummy,@Dummy ;23 +.vMCBuildRoom +.vMCBuildViewMap data @Dummy,@Dummy,@Dummy ;24 +.vMCDisplayRoom +.vMCDisplayViewMap data @Dummy,@Dummy,@Dummy ;25 +.vMCInitBootPrg data @Dummy,@Dummy,@Dummy ;26 +.vMCReturnSpriteAddress data @Dummy,@Dummy,@Dummy ;27 +.vMCNoClipSprite data @Dummy,@Dummy,@Dummy ;28 +.vMCCalcScreenAddress data @Dummy,@Dummy,@Dummy ;29 +.vMCSaveFile data @Dummy,@Dummy,@Dummy ;2a +.vMCLoadFile data @Dummy,@Dummy,@Dummy ;2b +.vMCCopy data @Dummy,@Dummy,@Dummy ;2c +.vMCAbsChangeListPtr data @Dummy,@Dummy,@Dummy ;2d +.vMCLoadCells data @Dummy,@Dummy,@Dummy ;2e +.vMCSetUpPtrs data @Dummy,@Dummy,@Dummy ;2f +.vMCParseInputWord data @Dummy,@Dummy,@Dummy ;30 +.vMCInitTask data @Dummy,@Dummy,@Dummy ;31 +.vMCSnooze data @Dummy,@Dummy,@Dummy ;32 +.vMCAddToListPtr data @Dummy,@Dummy,@Dummy ;33 +.vMCReserveMemory data @Dummy,@Dummy,@Dummy ;34 +.vMCSetUpVariablePtrs data @Dummy,@Dummy,@Dummy ;35 +.vMCPreLoadCells data @Dummy,@Dummy,@Dummy ;36 +.vMCPlotLogicalScreen data @Dummy,@Dummy,@Dummy ;37 +.vMCPlotPhysicalScreen data @Dummy,@Dummy,@Dummy ;38 +.vMCUpdateScreen data @Dummy,@Dummy,@Dummy ;39 +.vMCUnPlotScreen data @Dummy,@Dummy,@Dummy ;3a +; returns v1=actual frame time in ms +.vMCSetPalette data @Dummy,@Dummy,@Dummy ;3b +.vMCSetTextWIndow data @Dummy,@Dummy,@Dummy ;3c +.vMCSetGraphicsWindow data @Dummy,@Dummy,@Dummy ;3d +.vMCClearChangeMaps data @Dummy,@Dummy,@Dummy ;3e +.vMCClearTextBuffer data @Dummy,@Dummy,@Dummy ;3f +.vMCCopyTextBuffer data @Dummy,@Dummy,@Dummy ;40 +.vMCEnableTextBuffer data @Dummy,@Dummy,@Dummy ;41 +.vMCInitSound data @Dummy,@Dummy,@Dummy ;42 +.vMCStartSound data @Dummy,@Dummy,@Dummy ;43 +.vMCFindObj data @Dummy,@Dummy,@Dummy ;44 +.vMCInitGraphics data @Dummy,@Dummy,@Dummy ;45 +.vMCCalcMatrix data @Dummy,@Dummy,@Dummy ;46 +.vMCDrawVector data @Dummy,@Dummy,@Dummy ;47 +.vMCKeyDown data @Dummy,@Dummy,@Dummy ;48 +.vMCInitJoystick data @Dummy,@Dummy,@Dummy ;49 +.vMCReserveChip data @Dummy,@Dummy,@Dummy ;4a +.vMCSaveProtect data @Dummy,@Dummy,@Dummy ;49 +.vMCInitScrolling data @Dummy,@Dummy,@Dummy ;47 +.vMCScrollDirection data @Dummy,@Dummy,@Dummy ;48 +.vMCPurgeAllCells data @Dummy,@Dummy,@Dummy ;49 +; MCSetTextWindow = Allocate memory for text buffer +; v1=top screen line +; v2=number of screen lines +; MCSetGraphicsWindow = Set graphics clipping +; v1=Left X +; v2=Right X +; v3=Top Y +; v4=Bottom Y +; MCClearChangeMaps = (Rebuild physical screen from Buffer2) +; MCClearTextBuffer = Clear one character row of text buffer +; v1=buffer Y to clear +; MCCopyTextBuffer = Copy text buffer to physical screen +; v1=Buffer Y to top of text window +; MCEnableTextBuffer = Select character output +; v1=0, write to TextScreenBase +; v1=mask: 1=buffers, 2=Logical, 4=Physical + +.vMCSetMaxFrameRate + data @Dummy,@Dummy,@Dummy ; 80 +; Paramters: +; V1 = 84; Time in milliseconds + +.vMCSetPreloadPalette + data @Dummy,@Dummy,@Dummy ; 81 + +.vMCCopyScreenToBuffer + data @Dummy,@Dummy,@Dummy ; 82 +; Copies the logical screen back to the buffer screen, thus adding +; any sprites on a semi-permament basis. Note though, that any +; insert/remove activity will corrupt these added sprites. Also +; these added sprites do not obey the 3D rules, so may give +; peculiar effects + +.vMCRasterHandler + data @Dummy,@Dummy,@Dummy ; 83 */ +; /* Parameters: +; V1 = destination raster +; V2 = source raster or clear color +; V5 = 2; /+ copy raster +/ 0=clear to color + +.vMCSetPrintRaster + data @Dummy,@Dummy,@Dummy ; 84 +; Parameter: V1=raster to print onto from now on. Must be in memory. + + +.vMCSetPrintFont + data @Dummy,@Dummy,@Dummy ; 85 +; v1=list number, v2=offset, v3=CGA palette code (mono machines only) + + +.vMCRasterPrintCharacter + data @Dummy,@Dummy,@Dummy ; 86 */ + +.vMCPasteCell + data @Dummy,@Dummy,@Dummy ; 87 + +.vMCMobilityAbility + data @Dummy,@Dummy,@Dummy ; 88 + +.vMCLoadCellDataDirect + data @Dummy,@Dummy,@Dummy ; 89 +; /* V1=list #, v2=offset, v3=cell # */ + +.vMCTransferParkedSprites + data @Dummy,@Dummy,@Dummy ; 90 + +.vMCDigitise + data @Dummy,@Dummy,@Dummy ; 91 +; /* Paramters: +; V5=0 Initialise +; V5=1 Terminate System +; V5=2 FindState Audio (returns V1=0 or 0FFFF) +; V5=3 Wait For Audio +; V5=4 Volume Control (V5=Volume) +; V5=5 Translate Sample (V1,V2 = sample, V6 = length, +; V3=Frequncy, V4=Volume) +; V5=6 Play Sample (V1,V2 = sample, V3=Frequency, +; V4=loop count, V6=Repeat flag) +; V5=7 Terminate Sample +; */ + +.vMCOnceOnlyMusicInit + data @Dummy,@Dummy,@Dummy ; 92 +; /* Returns V1,V2 = (driver) InfoWord +; V6 = 00000ABC +; A=1 Adlib sound driver +; B=1 Roland sound driver +; C=1 ReelTalk +; (Note: Adlib/Soundblaster requires a resident driver to be +; loaded before the game. If the driver is absent an +; error handler call occurs before V6 is returned) +; (Note: This is one of the few cases where error handlers +; could occur before SetUpVariablePtrs, so take care +; not to PRINT to the buffer screens) +; */ + +.vMCInitialiseScore + data @Dummy,@Dummy,@Dummy ; 93 +; /* Paramters: +; V1 list V2 offset Music Score +; V3 list V4 offset Adlib Instrument File +; V5 Score number (0-3) +; */ + +.vMCPlayScore + data @Dummy,@Dummy,@Dummy ; 94 +; /* Paramters: +; V1 Score number (0-3) +; V2 Repeat Flag (255=forever, 0=once, #=number of times) +; V3 Operation (0=restart, 1=resume, 2=stop) +; */ + +.vMCMusicCloseDown + data @Dummy,@Dummy,@Dummy ; 95 + +.vMCOpenSpriteFile + data @Dummy,@Dummy,@Dummy ; 96 +; /* Paramters: +; V1 list V2 offset = first 7 chars of sprites file name +; */ + +.vMCstopWithMessage + data @Dummy,@Dummy,@Dummy ; 97 +; /* Parameters: +; V1 list V2 offset = 80 character error message +; As MCCloseDown but also prints message +; */ + +.vMCJumpOverlay + data @Dummy,@Dummy,@Dummy ; 98 +; v1 is ascii code: e.g. acode1.acd, gamedat1.dat +; v2 is offset starting from 0 of routine within overlay + +.vMCCallOverlay + data @Dummy,@Dummy,@Dummy ; 99 +; v1 is ascii code: e.g. acode1.acd, gamedat1.dat +; v2 is offset starting from 0 of routine within overlay +; Do a return when you've finished in the overlay to +; reload the caller + +.vMCLoadGamedata + data @Dummy,@Dummy,@Dummy ; 100 +; v1 is ascii code: e.g. gamedat1.dat +; Loads in gamedata but does not affect acode file. +; Remember that list1..9 pointers will be changed, +; with the exception that any pointers equal to 0 in the new +; table.txt/dat will not change the existing pointers + +.MCloadEXE ; 101 + data @Dummy,@Dummy,@Dummy +; Description: Loads a file containing a DOS-style relocation table +; Args: V1 = list, V2=offset; of file name +; V3 = list, V4=offset; load address +; Returns: V1,V2 = size of file loaded +; +.MCSqueak ; 102 + data @Dummy,@Dummy,@Dummy +; Description: clicks internal speaker +; Args: none +; Returns: none +; +.MCinitSerial ; 103 + data @Dummy,@Dummy,@Dummy +; Description: Initialise serial comms/Clear RX and TX buffers +; Args: none +; Returns: V1=0 success +; V1=FFFF no serial port (not installed) +; + +.MCreadSerial ; 104 + data @Dummy,@Dummy,@Dummy +; Description: Read Serial port (buffered) +; (V2/V3 are status only. Error conditions are always in V1) +; Args: none +; Returns: V1 = FFFF (nothing read) +; V1 = 0 thru 00FF (byte received) +; V2 = bytes remaining in RX buffer (normally 0) +; V3 = bytes remaining in TX buffer (normally 0) +; + +.MCwriteSerial ; 105 + data @Dummy,@Dummy,@Dummy +; Description: Writes serial port (buffered) +; (V2/V3 are status only. Error conditions are always in V1) +; Args: V1 (lo byte only) byte to send +; Returns: V1 = 0 byte sent (or put in TX buffer) +; V1 = FFFF Buffer full +; V2 = bytes remaining in RX buffer (normally 0) +; V3 = bytes remaining in TX buffer (normally 0) +; + +.MCdecodeFile ; 106 +; Description: Decompress LZH file. (Presumably the file is loaded +; with the flag ByteWS[DisableLZH] set.) +; +; Args: V1=list, V2=offset Compressed file +; V3=list, V4=offset Decompress file +; Returns: V1=(decompressed) file length +; V1=FFFF file not LZH format +; + +.MCChooseVGAcard ; 107 + data @Dummy,@Dummy,@Dummy +; Description: See M Bryant +; Args: V1=Card number +; Returns: none +; + +.MCCopyVGAtoVGA ; 108 + data @Dummy,@Dummy,@Dummy +; Description: See M Bryant +; Args: V1=Source card number +; Returns: none +; + +.MCvalidateSoftInterrupt ; 109 + data @Dummy,@Dummy,@Dummy +; Description: Check software interrupt is initialised +; Args: V1=list +; V2=offset +; V3=interrupt number +; If not initialised exits to MCstopWithError +; (Displays error message in list V1) +; V1=FFFF +; V3=interrupt number +; Returns: V1=0 not initialised +; V1=segment, initialise +; + +.MCcallSoftInterrupt ; 110 + data @Dummy,@Dummy,@Dummy +; Description: execute INT instruction +; Args: V1 = interrupt number +; V2 = List address for DS:SI +; V3 = List address for ES:DI +; V4 = List containing 5 words, for registers ax,bx,cx,dx,bp +; Word at offset 0: AX +; Word at offset 2: BX +; Word at offset 4: CX +; Word at offset 6: DX +; Word at offset 8: BP +; Returns List V2 redirected to returned DS:SI +; List V3 redirected to returned ES:DI +; List V4 contents altered to returned ax,bx,cx,dx,bp + + + + + + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + data @Dummy,@Dummy,@Dummy ;50 + + + +.Dummy + code - + prs " bug!" + + code + +.AcodeDelay +; gosub @Delay +; goto @HeroLoop + +.AcodeStart + goto @Start3D + +.HandleCR +; MCOSWRCH has requested a cr. + gosub @DoCR + return + + +code - +; +; +; Args for MCDrawObjectV1: +; V1: object number +; V2: x coord in pixels +; V3: z " +; V4: h " +; V5: flag = -1 for remove object from structure +; 0 for insert object into structure +; +ve draw to screen directly (as a sprite) + +; Args for MCSetPalette: +; V1=list number +; V2=offset within list +; +; list: db x ) 16 times +; db y ) +; where yyyy yyyy xxxx xxxx +; red. green blue RGBI +; 0..7 (VGA) (EGA) + + diff --git a/l9dev/regress/games.l9/billy.l9/aavars.txt b/l9dev/regress/games.l9/billy.l9/aavars.txt new file mode 100644 index 0000000..328a0e2 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/aavars.txt @@ -0,0 +1,295 @@ +; AAVars.txt +; +; M.J.Austin Nov 1988 +; +; Copyright (C) 1988 Level 9 Computing +; + var +; LoopCounter1 LoopCounter2 + c4 + PrintX PrintY + LeftMargin ; margin for printing code. + TopMargin +; RepeatCount +; SelectedLine +; FirstLine + xsize ysize zsize + size + ObjectNumber + Header + ObjectNumberType + MinXZH MinCompressed MinAnimation MinCell + MinRaster + byte1 Byte2 Byte3 + CurrentAnimationY +; ObjectSizeIncrease ItemSizeIncrease +; HighlightedX HighlightedY CurrentArg HighlightedArg +; AniViewMode ; 0 for script/1 for preview +; PixelCursorH PixelCursorX +; XZHFlashCounter2 + AA CC EE ; ACB words + opcode num SP z h ACBHeader +; PixelCursorY + +; px1 + +; TextAreaSaved +; SchedulerX1 +; SX1 +; bx1 ; used in save/display backdrop ONLY +; tx1 + ViewMapBuilt +; PlayerPixelX PlayerPixelZ PlayerPixelH +; FlashCount CursorIsOn + +; PlayerPixelXSpeed +; crx1 crx2 ; for use in DoCr only. + MaxX + dx1 dx2 dx3 dx4 dx5 dx6 dx7 +; ix1 ix2 ix3 ix4 + dresult +; ACBsOnly XZHCursorX XZHCursorZ XZHCursorH +; UseMC +; vblx1 vblx2 vblx3 + CursorACB + dv1 dv2 dv3 dv4 dv5 dv6 + ACBPtr + CurrentStore ; for z-sorting sprites on output +; ACBLoopBreaker +; EntryV1 ; really only needed for editor + ExitOffsets + PlayerACB + RasterOffset + RoomCDWidth + +; shared between user interface task and graphics task... +; KeyPadDirection LastRequestedDirection + c16 c32 + +; ClimbingStairs ; npc currently climbing stairs +; StairsZ ; Z pos of stairs +; StairsX ; X pos of stairs +; ExecutingCommand ; set when player is executing a menu command +; ExecutingRacetrack ; set when player executing a racetrack (e.g. +; an involuntary distraction) +; JustArrived ; flag set when npc just arrived at a destination pos +; MenuText MenuData +; +; WantMenu ; set in user interface task, checked by strategy +; GameLoopTimer ; incremented every game loop +; NpcLoopTimer ; incremented every npc activations loop +; UserDisabled ; set when manual control disabled +; FastMode ; set when game runs without display +; TestHiresCoords ; flag set when hires co-ords should be tested +; when doing people collision, as an oppose to using on-screen co-ords + + ReturnCode CurrentSquare + PointOnMap + + ACBStart ; now a variable so that BuildAndDisplayFrame can +; be used for room animation only + +; GoalNowX GoalNowZ ;coords right now + + FireKey FireKeyChange LastFireKey + LeftKey RightKey UpKey DownKey XSpeed YSpeed + + m1 m2 + TextBoxDisplayed TextBoxWidth + PlayerDirection + PlayerX PlayerZ + + PleaseStopPlayer ; set to non-zero if something wants +; the player to stop walking. + result + + + + C0 C1 C2 C3 ; + C5 C7 C9 ; + C6 C8 C10 ; "Constants" with corresponding values + x y + +; gunfight stuff: + length height positionx positiony; variables for gunfight + Hit ; flag for hit in gunfight + arraycount + +; WaitingForInput ; interlock for continous npc actions +; InputX1 InputX2 ; for use by input routine +; CSx1 ; CalcScreenAddress + object +; IBMScrollOffset +; Joystick joystickInUse +; Debug1 Debug2 Debug3 Debug4 ;! + +; graphics task vars... +; gxdirection gydirection +; g1 g2 g3 g4 + +;framelimiting variables: +;; framelimiting + FrameCount DisplayedFrameCount + +; LastKey ;Joystick value + +; PRINT.TXT variables needing common access across overlays... + PrintRasterNum + FirstAsciiInFont + FontHeight ; character height, in pixels + + + + + Won + GameOver + + RepeatScroll ; countdown timer for TriggerScroll + + +; text printing vars... + ForegroundColour + BackgroundColour ; (0-16), + RasterPrintWidth ; = width of text, +; RasterPrintRaster + RasterPrintX + RasterPrintY + CurrentDO + CurrentPrintRaster + + + + UpdateACBs ; false if acbs are to be frozen for a while, +; e.g. whilst displaying menu + +; MeetingPerson ; set to Identikit number of person to meet, +; if we're due to meet them. + Town ; contains number of town/map location being visited + Location ; contains number of location (e.g. within town) +; being visited by player. + + NextMusic ; contains next music + + ScrollXDir ScrollYDir + ScreenX ScreenY + + TellOtherPlayer ; set to 1 if TownUpdateRoutine is to +; pass on the change to the other player. + PeopleVarData ; offset within TownVarData() + + AccostCounter ; time till someone in the room +; thinks about accosting Billy - presumably with some +; interesting other or other. + + PosRange NegRange ; size of CD for HiresCD + + TwoPlayerMode + + IdentikitTableBase ; offset within TVD. + + + + + + + + WantedDirection ; mainly for compatability with walkabout code. + + + CurrentScreen + + CurrentRoom RoomNum + MapNumber + + MenuDisplayed + MenuOffset ; offset of menu tables within IntroTables + MenuNumber ; menu we want to display + + PlayersName ; contains 2 is Billy, 3 if Pat. Corresponds to +; message number in all parts. + + cursory + CursorX CursorZ CursorH ; position of people + CursorSpeed TimeHeld + KeyHeld MaxCursorSpeed CrossHairACB + + StructureFile ; set to either TownStructures or IdentikitStructures + + lastTunePlayed + PersonDisplayed ; set to true when there is + SubPlotsOffset ; offset of ptrs within TownVarData + + ThisPersonVarData ; TownVarData(PersonVarData) is for NPC we're talking to. + + SubPlotFlags ; offset in TVD of flags and counters etc. +; used in subplots - see arbitrary offsets (SPFxxxxx) defined +; in AACONST.TXT + + GameOverTimer + ACBEnd + ACBSearchStart + + PlayerReputation + PlayerGold + ObjectsInformation ; used in Strategy.txt as an offset into TVD + +;; LastMapX LastMapY + TicksSinceLawful + RobberyTillMDGoesBust ; amount of money that Billy still +; needs to steal before the next Murphy-Dolan ranch goes bust. + + PlayerIncome ; amount of gold earned by player since last +; screen - used mainly for Billy robbing things, to determine +; when another Murphy Dolan ranch goes out of business. + ExtraNewsStory ; message number of extra news stories... e.g. +; ranches going out of business etc. Commonly in range +; 400+Location number. + +;; BillysCash ; Billy's global cash, used in card game + + Round ; game round, passed from main game + RoundsToPlay ; number of game rounds to win the brawl + + NextMeetingMenu ; message printed next time we leave the +; map to visit somewhere: like the random meetings, but can +; be easily programmed by other code. Used for when +; the law enforcement budget runs out and we have to +; fire deputies. Also when a town rebels. +; NextMeetingMessage ; like NextMeetingMenu, but just a quick message +; always from the player's second in command + + PatWarnings ; number of warnings player has had about imminent loss of game + TexanDeputies ; number of free deputies from Texas + + PlayerGang ; set to LOCATION of gang which has been recruited + + HourglassState ; =0 -> not displayed +; =1 -> want it displaying +; =2 -> currently displayed + + Difficulty ; current difficulty of arcade game. Standard +; is 256, will usually get harder as game progresses. +; If it doubles, the game should be twice as hard. + + BillyLives ; number of lives remaining (number of times +; he can get nursed) + + TotalGoldStolen ; total amount of gold stolen in game + + SoundOn ; 0 if sound is disabled, 1 if sound FX are on + MusicOn ; 0 if music is disabled, 1 if music is on + + SmoothScroller ; 0 for jump scrolling, non-zero for smoothy + + CopyProtectChecked ; 0 until it's been checked. + + ScrollDirectionDone ; set when ScrollDirection has been +; done in a particular frame - reset at the end of DisplayEverything + PlotLogicalDone ; set when ScrollDirection has been +; done in a particular frame - reset at the end of DisplayEverything + + + Language + EnemyName ; name for duel: Pat, Billy or $ff for other. + + CGAMode ; set to non-zero for CGA2/4. 0 for EGA/VGA etc. \ No newline at end of file diff --git a/l9dev/regress/games.l9/billy.l9/amconst.txt b/l9dev/regress/games.l9/billy.l9/amconst.txt new file mode 100644 index 0000000..752767b --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/amconst.txt @@ -0,0 +1,10 @@ +; Machine constants +; MCONST.TXT +const + st=1 ; conditional assembly + ReallyST=0 + Amiga=1 + pc=0 + notPc=1 + Scrolling=1 + AllowMusic=1 diff --git a/l9dev/regress/games.l9/billy.l9/arcade.txt b/l9dev/regress/games.l9/billy.l9/arcade.txt new file mode 100644 index 0000000..56ed434 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/arcade.txt @@ -0,0 +1,275 @@ +; ARCADE.TXT +; +; Minor 'arcade' games for Billy, called from within town. +; e.g. Bank Robbery, card game. +; +; Mike Austin September 1990. +; +; Copyright (C) 1990 Level 9 Computing Ltd. +; +; + var + StickMoving ; timer until stick arrives. + MovingToLeft ; set to true if stick is moving that way. + + begin + +.BankRobbery + gosub @CheckPlayerGang ; in two player mode, gang +; can be wiped out whilst Billy's walking in town. + if PlayerGang<>0 then BankRobWithGang + m1=858 ; Billy did not have a gang for bank job + gosub @DisplayInstructions ; gosub, return + goto @BackToWalkabout + +.BankRobWithGang + CurrentScreen=BankGame + NextMusic=Generic5Music ; BankJobMusic + + v4=BankJobSamples + gosub @LoadSamplesForGame + +; set DuelStatus as how many locks/hinges will be on this safe +; (there are originally six on the picture, we want to get +; rid of between 0 and 4 of them. i.e. we want 2..6) + code - + x2=5 + gosub @iRandomLimitX2 +; get x3 as a random number less than x2 +; i.e. there will be x2 possible values. + add x3,c2 ; between 2 and 6 + code + +; initialise various variables for this game + DuelStatus=x3 + StickMoving=0 + MovingToLeft=0 + + v4=7 ; in bank, positioning dynamite + gosub @DisplayLinkingPicture ; load linking structure file, +; open sprites file, and build the picture we've asked for(v4). +; preload the most graphics-intensive outcome scenes now... + dv1=9 ; too much picture + dv5=dMarkPreload + gosub @MCDrawObjectDV1 + dv1=11 ; too little picture + gosub @MCDrawObjectDV1 + gosub @MCPreloadCells + gosub @MenuWait ; wait for fire to be released + + RasterOffset=0 + ObjectNumber=20 ; 6 sticks of dynamite on left + dv2=228 ; x + dv3=58 ; z + dv4=65439 ; h + gosub @StartFreeACB + x5=dx4 ; save off acb for Left Hand Pile + push x5 + ObjectNumber=26 ; 0 sticks of dynamite on left + dv2=258 ; x + gosub @StartFreeACB + pop x5 + x6=dx4 ; save off acb for left hand pile + +.BankLoop + push x5 + push x6 + gosub @PlayTuneForScene + gosub @DisplayEverything + gosub @sGetControls + pop x6 + pop x5 + gosub @BankControls + if FireKey=0 then BankLoop + if FireKeyChange=0 then BankLoop + +; have pressed fire to leave the dynamite. What happens? + &dx1=ACBList(x5) ; how many sticks at left? + dx2=20 + sub dx1,dx2 ; dx1 = 6-number of sticks at left, Therefore +; dx1=number of sticks at right. + dv1=9 ; 9=too much dynamite. 10=safe open. 11=too little. + Won=false + if dx1>DuelStatus then BankOutcome + dv1=10 ; right amount + Won=true + if dx1=DuelStatus then BankOutcome + dv1=11 ; too little +.BankOutcome + push dv1 + gosub @MCEmptyRoom + gosub @InitACBs + v1=0 + v2=0 + gosub @MCBuildRoom + gosub @DisplayEverything ; display black screen + FrameCount=0 ; leave screen black for at least a second. + pop dv1 ; 9=too much dynamite. 10=safe open. 11=too little. + push dv1 + gosub @PreLoadAndInsertDV1 + pop dv1 +; now everything for the "outcome" should be in memory. +; If it's happened too fast (e.g. on a fast PC), wait a while + +.BRWait + if FrameCount<10 then BRWait + + push dv1 + gosub @MenuWait ; wait for fire to be released + +; now display the outcome screen.... + v1=0 + v2=0 + gosub @MCBuildRoom + + x1=Town ; 10..15 +; go to 31..36 for bank clerk number + x2=21 + add x1,x2 + MenuNumber=32 ; "we've been robbed" menu + gosub @NewMenuForPerson +; next time Player talks to person x1, use menu MenuNumber + + x2=Town + gosub @GetMoneyInBank +; return x2=TVD(x5) as amount of money in bank at town x2 (10..) + gosub @SetPrintMenu + pop dv1 ; outcome: dv1=10 = safe open + if dv1<>10 then BREnd5 ; only display amount of gold if safe open + if x2>10 then BREnd2 + x2=10 + +.BREnd2 + x1=x2 + add PlayerIncome,x1 ; paramter for BuildNewScreen entry point + asr x1 + asr x1 + asr x1 + asr x1 + add PlayerReputation,x1 ; gain more reputation for big robberies + add PlayerReputation,c4 ; always gain some reputation + code - + gosub @iStartPrinting + message 868 ; the safe contained + print x2 + message 869 ; dollars worth of gold + gosub @iEndPrinting + code + + TextBoxDisplayed=CurrentDO + +.BREnd5 + gosub WaitFireDisplay + goto @ToEscapeGame +;------------ +.WaitFireDisplay +.BRLoop + gosub @DisplayEverything + gosub @sGetControls + if FireKey=0 then BRLoop + if FireKeyChange=0 then BRLoop + return +;--------- +.BankControls +; have called GetControls. +; acb for LH pile of dynamite is at x5, +; acb of RH pile dynamite is at x6. +; shovel between the two, and start animation sequences +; to make the arm move. + &dv1=ACBList(PlayerACB) ; where is arm? + + if StickMoving=0 then @BCNotMoving + sub StickMoving,c1 + if StickMoving=4 then BC2 + if StickMoving<>0 then @BCRet +.BC2 +; stick arrives - but where? +; if dv1=842 then PlaceAtRight +; if dv1=845 then PlaceAtRight +; if dv1=841 then PlaceAtRight + if MovingToLeft=false then PlaceAtRight +; place at left + if StickMoving<>0 then TakeFromRight + dx4=x5 ; acb for left pile + &ObjectNumber=ACBList(dx4) + sub ObjectNUmber,c1 ; add a stick to pile + if ObjectNumber<20 then @BCRet ; too many sticks + goto @BCChangeACBDX4 ; gosub, return + +.TakeFromRight + dx4=x6 ; acb for right pile + &ObjectNumber=ACBList(dx4) + add ObjectNUmber,c1 ; take a stick from pile + goto @BCChangeACBDX4 ; gosub, return + +.PlaceAtRight + if StickMoving<>0 then TakeFromLeft + dx4=x6 ; acb for right pile + &ObjectNumber=ACBList(dx4) + sub ObjectNUmber,c1 ; add a stick to pile + goto @BCChangeACBDX4 ; gosub, return + +.TakeFromLeft + dx4=x5 ; acb for left pile + &ObjectNumber=ACBList(dx4) + add ObjectNUmber,c1 ; take a stick from pile + goto @BCChangeACBDX4 ; gosub, return + + +.BCNotMoving + dx4=PlayerACB + &dx1=ACBList(x5) ; how many sticks at left? + dx2=20 + sub dx1,dx2 ; dx1 = 6-number of sticks at left, Therefore +; dx1=number of sticks at right. + if dv1=840 then @BCArmAtLeft + if dv1=846 then @BCArmAtLeft ; initial acb to position arm + if dv1=841 then @BCArmAtRight +; arm is moving + +.BCRet + return ; can't control when moving. + +.BCArmAtLeft + if RightKey=0 then BCNotMoveToRight + if dx1=6 then BCRet ; all sticks already at right + MovingToLeft=false + ObjectNumber=842 ; move right with dynamite, then return empty. + gosub @BCChangeACBDx4 + StickMoving=4 + goto @TakeFromLeft ; make stick disappear at once + +.BCNotMoveToRight + if LeftKey=0 then BCRet + if dx1=0 then BCRet ; no sticks at right + MovingToLeft=true + ObjectNumber=843 ; move right empty, then return with dynamite. + gosub @BCChangeACBDx4 + StickMoving=8 + return +;--- +.BCArmAtRight + if LeftKey=0 then BCNotMoveToLeft + if dx1=0 then @BCRet ; no sticks at right + MovingToLeft=true + ObjectNumber=844 ; move left with dynamite, then return empty. + gosub @BCChangeACBDx4 + StickMoving=4 + goto @TakeFromRight ; make stick disappear at once. + +.BCNotMoveToLeft + if RightKey=0 then @BCRet + if dx1=6 then @BCRet ; no sticks at right + MovingToLeft=false + ObjectNumber=845 ; move left empty, then return with dynamite. + gosub @BCChangeACBDx4 + StickMoving=8 + return + +.BCChangeACBDX4 + push x5 + push x6 + gosub @ChangeACBDX4 + pop x6 + pop x5 + return + +;---------- diff --git a/l9dev/regress/games.l9/billy.l9/box.fnt b/l9dev/regress/games.l9/billy.l9/box.fnt new file mode 100644 index 0000000..cc8fc23 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/box.fnt differ diff --git a/l9dev/regress/games.l9/billy.l9/cache.txt b/l9dev/regress/games.l9/billy.l9/cache.txt new file mode 100644 index 0000000..fc91816 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/cache.txt @@ -0,0 +1,185 @@ +; Cache.TXT Copyright (C) 1989 Level 9 Computing. +; +; for Floor Map Loader/Cache. +; +; N.W.Austin 13/7/89 +; +;----- + +;CACHE.TXT: handle simple floormap cache +;Two entry points: +; FCInitFloorCache +; FCloadFloor + +;----- + +; draw flags are... +; dRemoveRedraw=65535 -1 Remove and redraw +; dInsert=0 insert +; dPlot=1 plot as sprite +; dInsertRedraw=2 insert and redraw +; dMarkPreload=3 mark to preload +; dSetProtect=4 set protection mark +; dUnsetProtect=5 unset protection mark +const +;Floor map directory must be 4*number of rooms (24 rooms = 220 bytes) +;Max floor map was 2290 bytes (=length), now=3200 + StartCache1=220 + StartCache2=3420 ; 2510 ;StartCache1+length + +begin + +;code + +.FCInitFloorCache ;v1=cache size +code - + CurrentCache=StartCache1 + Cache1=0 + Cache2=0 + + v2=0 ;table + MapNumber=49 ;'1' + +.fci1 +code + + push v1 + push v2 +code - + gosub @LoadMap +code + + pop v2 + pop v1 +code - + + v3=CurrentCache +.fci2 +code + + &v4=FloorMap(v3) ;room number +code - + if v4=0 then FCnextMap + + add v2,c4 + if v2>v1 then @FCtableFull + sub v2,c4 + +code + + if v2>4000 then @FMBug + &FloorMap(v2)=v4 ;room number + add v2,c2 + &FloorMap(v2)=MapNumber ;file + add v2,c2 + + add v3,c2 + &v4=FloorMap(v3) ;length-2 +code - + add v3,v4 + goto @fci2 + +.FCnextMap + if MapNumber=57 then fci3 ;'9' + if MapNumber=72 then fci4 ; 'H' was: 90 then fci4 ;'Z' + add MapNumber,c1 + goto @fci1 +.fci3 + MapNumber=65 ;'A' + goto @fci1 + +.fci4 + add v2,c4 + if v23 then fci5 + v2=4 +.fci5 + sub v2,c4 +code + + if v2>4000 then @FMBug + &FloorMap(v2)=c0 + add v2,c2 + &FloorMap(v2)=c0 + + CurrentCache=StartCache2 + if CurrentCache>4000 then @FMBug + &FloorMap(CurrentCache)=c0 ;Clear cache2 + CurrentCache=StartCache1 + if CurrentCache>4000 then @FMBug + &FloorMap(CurrentCache)=c0 ;Clear and select cache1 + MapNumber=0 + return + +.FMBug + break ;****** + return ;******** +;----- + +.FCnewRoomDv1 +code - + RoomNum=dv1 + if RoomNum=0 then @FCnoRoom + + v1=0 ;cache table +.fcl1 +code + + &v2=FloorMap(v1) +code - + if v2=0 then @FCnoRoom + if v2=RoomNum then fcl2 + add v1,c4 + goto fcl1 + +.fcl2 + add v1,c2 +code + + &MapNumber=FloorMap(v1) +code - + + if cache1=MapNumber then FCinCache1 + if cache2=MapNumber then FCinCache2 + + if CurrentCache=StartCache1 then FCswitchCache + CurrentCache=StartCache1 + Cache1=MapNumber + goto fcl3 +.FCswitchCache + CurrentCache=StartCache2 + Cache2=MapNumber +.fcl3 + gosub @LoadMap + gosub @FindRoom + code + +; if RoomNum<>0 then fcl4ok +;; try reloading floor cache +; push cache2 +; push CurrentCache +; push mapnumber +; gosub @InitFloors +; gosub @FCInitFloorCache +; pop MapNumber +; pop CurrentCache +; pop Cache2 +; code - +; goto @SevenRiversAmbush ; chuck player into ambush to hide the +;; little problems that might occur with this. +; code + + +.fcl4ok + return +code - + +.FCinCache1 + CurrentCache=StartCache1 + gosub @FindRoom +code + + return +code - + +.FCinCache2 + CurrentCache=StartCache2 + +.FCnoRoom ;Set RoomNum=0 + + gosub @FindRoom +code + + return + +;----- diff --git a/l9dev/regress/games.l9/billy.l9/comms.txt b/l9dev/regress/games.l9/billy.l9/comms.txt new file mode 100644 index 0000000..62e2c4f --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/comms.txt @@ -0,0 +1,614 @@ +; COMMS.TXT +; +; Billy The Kid +; +; Copyright (C) 1990 Level 9 Computing Ltd. +; +; +const +; operations codes to pass down serial link... + NameFlag=128 ; 64 + NameMask=127 ; 63 + + begin + code - +.iUpdateVarDataByte + code + + gosub @UpdateVarDataByte + code - + return +;------------ + code + + + +;-------------- +.UpdateVarDataWordInc + gosub UpdateVarDataWord + add v1,c2 ; next word entry + return +;------------- + +.UpdateVarDataWord +; general update routine for the TownVarData list: +; this is used for both people and town parameters, +; plus anything else for the strategy game. +; This routine (WILL) handle the communication of some +; of this information to the other computer in a 2-machine +; game. +; Parameters: +; v1=offset within list to modifiy +; v2=value. +; Not Supported: v3=mode: 0=update, 1=add, 2=subtract (limited to 0/FFFF respectively) +; TellOtherPlayer=0 if not, =1 if please do. +; May Corrupt x1, x2. +; No Return value. +; if v2<>0 then UVDW2 + if v1>TownVarDataSize then @cUpdateBug + &TownVarData(v1)=v2 + + if TwoPlayerMode=false then UVDWRet + push v2 + push v1 + v1=CommsWordUpdate + gosub @WriteSerial ; send v1, waiting if necessary + pop v1 ; address to write to + gosub @WriteSerialWord ; send v1 word, waiting if necessary + pop v1 ; word to write there + goto @WriteSerialWord ; send v1 word, waiting if necessary + +;.UVDW2 +; + + +; if v2<>1 then UVDW3 +;; add to existing value, limit to FFFF +; &x1=TownVarData(v1) +; x2=x1 ; keep original sign +; add x1,v3 +; xor x2,x1 ; sign changed? +; if x2<32768 then UVDWNoUpperLimit +; if x1>32767 then UVDWNoUpperLimit ; now negative +; x1=65535 ; sign changed to positive when added, so wrapped. +; +;.UVDWNoUpperLimit +; &TownVarData(v1)=x1 +; return +; +;.UVDW3 +;; take off existing value, limit to 0 +; &x1=TownVarData(v1) +; x2=x1 ; keep original sign +; add x1,v3 +; xor x2,x1 ; sign changed? +; if x2<32768 then UVDWNoUpperLimit +; if x1>32767 then UVDWNoUpperLimit ; now negative +; x1=65535 ; sign changed to positive when added, so wrapped. +; +;.UVDWNoUpperLimit +; &TownVarData(v1)=x1 +; return +; +;-------------- +.UpdateVarDataByteInc + gosub UpdateVarDataByte + add v1,c1 +.UVDWRet + return +;--------- +.cUpdateBug + cif NotPC + break ;******** + cend +.UVDBRet + return +;--------------- +.UpdateVarDataByte +; general update routine for the TownVarData list: +; this is used for both people and town parameters, +; plus anything else for the strategy game. +; This routine (WILL) handle the communication of some +; of this information to the other computer in a 2-machine +; game. +; Parameters: +; v1=offset within list to modifiy +; v2=value. +; TellOtherPlayer=0 if not, =1 if please do. +; May Corrupt x1, x2. +; No Return value. + if v1>TownVarDataSize then @cUpdateBug + TownVarData(v1)=v2 + + if TwoPlayerMode=false then UVDBRet + push v2 + push v1 + v1=CommsByteUpdate + gosub UVDBWriteSerial ; send v1, waiting if necessary + pop v1 ; address to write to + gosub @WriteSerialWord ; send v1 word, waiting if necessary + pop v1 ; word to write there +.UVDBWriteSerial + goto @WriteSerial ; send v1 byte, waiting if necessary +;------------------- +.TrySerial +; at initialisation - try to make connection with +; another computer playing Billy, then return. +; Space should interrupt and go back to menu, +; otherwise should keep trying forever. + &WordWS(WordCursorXPos)=c0 + &WordWS(WordCursorYPos)=c0 + TwoPlayerMode=true ; permit WriteSerial to send stuff... + + cif TownOverlay + m1=975 ; 'trying serial connection...' + gosub @DisplayTextNoWait + + gosub @MCinitSerial ; 103 +; Description: Initialise serial comms/Clear RX and TX buffers +; Args: none +; Returns: V1=0 success +; V1=FFFF no serial port (not installed) +; + if v1=65535 then @SelectPlayer ; no serial port + gosub @ClearReadBuffer ; returns v1 as last non-zero character. +; Each computer starts by listening to the line. If we hear +; another computer shouting its name, we answer with the alternate +; name and start the game. +; If we hear nothing useful, start shouting a name and listen +; for someone shouting back the other name. +; +; V1 is the last non-zero character we heard +;; if v1<>0 then CBN2 + x1=50000 ; check input buffer this many times before starting to squawk + +.CheckBufferedName + gosub @ReadSerialNoWait +; Returns: V1 = FFFF (nothing read) +; V1 = 0 thru 00FF (byte received) +; V2 = bytes remaining in RX buffer (normally 0) +; V3 = bytes remaining in TX buffer (normally 0) +;; if v1=65535 then NothingHeard +.CBN2 + v2=NameMask + and v1,v2 + PlayersName=Pat + if v1=Billy then @HeardName + PlayersName=Billy + if v1=Pat then @HeardName + sub x1,c1 ; number of times to check serial inputs + if x1>0 then CheckBufferedName ; keep checking many times + +.NothingHeard +; assume we're gonna be Billy, and send stuff on this basis... + PlayersName=Billy + gosub @SendName + +.JustListen +; check for both trying to be same person +; gosub @MCOsrdch ;****** +; if v1<>49 then JL2 ;****** +; PlayersName=Pat +; v1=Billy +; goto @HeardName + +.JL2 + gosub @readSerialNoWait ; 104 + +; push v1 ;********** +; v1=6 ; physical, logical +; gosub @MCEnableTextBuffer +; v1=49 ; '1' +; gosub @MCOswrchV1 +; pop v1 +; push v1 +; gosub @MCOswrchV1 +; pop v1 + + x1=65000 +.CommsDelay + sub x1,c1 + if x1>0 then CommsDelay + + + v2=NameMask + and v1,v2 + PlayersName=Pat + if v1=Billy then HeardName + PlayersName=Billy + if v1=Pat then HeardName + if v3>10 then @JustListen ; TX buffer is filling up. + goto @NothingHeard +; Description: Read Serial port (buffered) +; (V2/V3 are status only. Error conditions are always in V1) +; Args: none +; Returns: V1 = FFFF (nothing read) +; V1 = 0 thru 00FF (byte received) +; V2 = bytes remaining in RX buffer (normally 0) +; V3 = bytes remaining in TX buffer (normally 0) + +.HeardName +; check name twice more, just to be certain the other machine +; is trying to start up. + push v1 + gosub @SendName + gosub @readSerial ; wait if necessary + v2=NameMask + and v1,v2 + pop v2 + if v1<>v2 then @JustListen + push v1 + gosub @SendName + gosub @readSerial ; wait if necessary + v2=NameMask + and v1,v2 + pop v2 + if v1<>v2 then @JustListen + + +; v1=PlayersName of other machine. + if v1=PlayersName then @SelectPlayer ; both trying to play the same. +; Other player is playing the alternate person, so +; we're in business! + gosub @SendName ; tell other computer our name + TwoPlayerMode=true + + m1=954 + add m1,PlayersName +;[955:Pat, you must track all the outlaw gangs to +;their hideouts. Talk to people to get information. ] ;||| +;[956:Billy, rob banks and steal cows from the Murphy-Dolans. ] ;||| + goto @DisplayInstructions ; gosub, return +;------ +.SendName + v1=PlayersName + v2=NameFlag + or v1,v2 + gosub WSWWriteSerial ; send name to other computer , with top bit set. + v1=PlayersName + v2=NameFlag + or v1,v2 + gosub WSWWriteSerial ; send name to other computer , with top bit set. + v1=PlayersName + v2=NameFlag + or v1,v2 + goto WSWWriteSerial ; send name to other computer , with top bit set. +; Description: Writes serial port (buffered) +; (V2/V3 are status only. Error conditions are always in V1) +; Args: V1 (lo byte only) byte to send +; Returns: V1 = 0 byte sent (or put in TX buffer) +; V1 = FFFF Buffer full +; V2 = bytes remaining in RX buffer (normally 0) +; V3 = bytes remaining in TX buffer (normally 0) + + + cend ; TownOverlay +;------------ +.WriteSerialWord +; write v1 as a word + &WorkList(0)=v1 + v1=WorkList(0) + gosub WSWWriteSerial + v1=WorkList(1) +.WSWWriteSerial + goto @WriteSerial +;----------- +.ClearReadBuffer + v4=0 ; last non-zero character +.CRB0 + push v4 + gosub @readSerialNoWait ; 104 + pop v4 +; Description: Read Serial port (buffered) +; (V2/V3 are status only. Error conditions are always in V1) +; Args: v1=0 to read char, FFFF to check status +; Returns: V1 = FFFF (nothing read) +; V1 = 0 thru 00FF (byte received) +; V2 = bytes remaining in RX buffer (normally 0) +; V3 = bytes remaining in TX buffer (normally 0) +; +; if v1=65535 then CRBEnd + if v2=0 then CRBEnd ; RX buffer empty + v4=v1 ; last valid character +; if v4=129 then CRBEnd ; got notification of other player's name +; if v4=130 then CRBEnd + goto CRB0 + +.CRBEnd + v1=v4 ; last valid character received, or zero if none. + return +;---------- +.WriteSerialWait + v1=v5 ; retrieve byte to send + +.WriteSerial +; write v1 as a byte + if TwoPlayerMode=false then WriteSerialRet + v5=v1 ; save byte to send + gosub @MCWriteSerial +; Description: Writes serial port (buffered) +; (V2/V3 are status only. Error conditions are always in V1) +; Args: V1 (lo byte only) byte to send +; Returns: V1 = 0 byte sent (or put in TX buffer) +; V1 = FFFF Buffer full +; V2 = bytes remaining in RX buffer (normally 0) +; V3 = bytes remaining in TX buffer (normally 0) + if v1<>0 then WriteSerialWait ; sent ok? + + push x1 + x1=5000 +.WriteSerialDelay + sub x1,c1 + if x1>0 then WriteSerialDelay + pop x1 +.WriteSerialRet + return +;----------- +.CheckPositions +; pass on our location to the other player, and check where +; they are. If in the same place, call for a duel. + +;;************ +; v1=6 ; physical, logical +; gosub @MCEnableTextBuffer +; code - +; message cr ; flush buffer +; code + +; &WordWS(WordCursorXPos)=c0 +; &WordWS(WordCursorYPos)=c0 +; code - +; print location +; message dot +; code + +; v1=32 +; gosub @MCOswrchV1 +; TwoPlayerMode=true ;******** +;;********* + + +; send our location only occasionally, to avoid slowing down +; slow machines too much. + code - + random v1 + code + + if v1<240 then DontSendPosition + + &v1=TownVarData(SPCommsInfoOffset) +; within CommsInfo, offsets Billy/Pat are location of each player + add v1,PlayersName + v2=location + gosub @UpdateVarDataByte ; pass our location to other person + +.DontSendPosition + +; where is other player? + v1=3 + sub v1,PlayersName ; (3-1 or 2 => 2 or 1) + &v2=TownVarData(SPCommsInfoOffset) + add v1,v2 + v2=TownVarData(v1) +; other player is at v2, if we're also there, then maybe +; we want a final duel + +; code - ;****** +; print v2 ;****** +; message dot ;****** +; code + ;****** +; v1=65535 ; check status ;****** +; gosub @MCReadSerial ;********* +; code - ;****** +; print v2 ; bytes in read buffer ;****** +; message dot ;****** +; print v3 ; bytes in write buffer ;****** +; message dot ;****** +; code + ;****** + + cif TownOverlay + if PlayingDuel<>0 then NotTriggerFinalDuel + if CurrentScreen<430 then NotTriggerFinalDuel ; MinTown(430)-400 + if CurrentScreen>599 then NotTriggerFinalDuel ; MaxTown(599)-400 + if v2<>location then NotTriggerFinalDuel + MenuNumber=216 ; hello, want final duel? +; Menu216 dc.w 1867-MM,MMenu+218,0 ; approached each other, gonna fight? + gosub @PrettyMenu + if result=1268 then @InitTwoPlayerDuel ;1868-MM + goto @ReturnToMap +.NotTriggerFinalDuel + cend + +.LTSRet + return +;---------- +.ListenToSerial +; called every frame - pulls in strings of characters +; from serial buffer and makes appropriate updates to +; our local database + if TwoPlayerMode=false then LTSRet + cif TownOverlay + gosub @CheckPositions ; check where the other player is + cend + + v3=10 ; timeout value to avoid locking the machine +.LTSLoop + v1=65535 ; check status + push v3 ; timeout count + gosub @MCReadSerial + pop v3 + if v2<4 then LTSRet ; not a full command string in buffer yet. +; Description: Read Serial port (buffered) +; (V2/V3 are status only. Error conditions are always in V1) +; Args: v1=0 to read+check status +; FFFF to just check status +; Returns: V1 = FFFF (nothing read) +; V1 = 0 thru 00FF (byte received) +; V2 = bytes remaining in RX buffer (normally 0) +; V3 = bytes remaining in TX buffer (normally 0) + push v3 ; timeout count + gosub ReadAndProcessSerial + pop v3 + sub v3,c1 + if v3>0 then LTSLoop ; carry on till read buffer is nearly empty + return ; give up, to avoid locking the machine completely +;---------- +.ReadAndProcessSerial + gosub @ReadSerial ; read, waiting if necessary +; code - +; message Billy ; indicate receipt +; print v1 +; code + + if v1=CommsByteUpdate then @LTSByteUpdate + if v1=CommsWordUpdate then @LTSWordUpdate + + cif TownOverlay + if PlayingDuel<>0 then LTS3 + cend + if v1=CommsWantFinalDuel then @AcceptFinalDuel + if v1=CommsAcceptFinalDuel then @AcceptFinalDuel +.LTS3 + cif TownOverlay + if v1=CommsIveDrawn then @OtherHasDrawn + if v1=CommsIveShotYou then @OtherHasShotMe + if v1=CommsRedisplayMap then @RedisplayMap + cend + if v1=CommsOtherPlayerHasLost then @WinGame + if v1=CommsOtherPlayerHasWon then @LoseGame + return +;------------- + cif TownOverlay +.RedisplayMap + if CurrentScreen=GameMap then @ReturnToMap + return + +.OtherHasDrawn + duelstatus = 3 + dx4 = enemyacb + ObjectNumber=5 ; animation object for draw but don't fire (small figure) + add ObjectNumber,DuelOpponentBase + goto @changeacbdx4 ; gosub, return. +;------------- +.OtherHasShotMe + v1=0 ; colt45 sample + gosub @PlaySample + duelstatus = 7 ; player is dying + return + cend ; TownOverlay +;------------- +.LTSByteUpdate + gosub @ReadSerialWord ; get address of update + push v1 + gosub @ReadSerial ; read, waiting if necessary + pop v2 ; address + if v2>TownVarDataSize then @c2UpdateBug ;***** + TownVarData(v2)=v1 +; code - +; if v2<50 then LTSBU2 +; print v2 ;******* +; message dot ;*********** +; print v1 ;******** +; message dot ;****** +;.LTSBU2 +; code + + return + +.LTSWordUpdate + gosub @ReadSerialWord ; get address of update + push v1 + gosub @ReadSerialWord ; get word to write there + pop v2 ; address + if v2>TownVarDataSize then @c2UpdateBug ;***** + &TownVarData(v2)=v1 + return + +.c2UpdateBug + break ;***** + return ;****** +;-------------- +.ReadSerialWord +; assumes characters are available in buffer + gosub ReadSerial + WorkList(0)=v1 + gosub ReadSerial + WorkList(1)=v1 + &v1=WorkList(0) + return +;------------- +.ReadSerial ; read, waiting if necessary + gosub @ReadSerialNoWait + if v1=65535 then ReadSerial ; nothing read, so wait for it! +; Description: Read Serial port (buffered) +; (V2/V3 are status only. Error conditions are always in V1) +; Args: v1=0 to read+check status +; FFFF to just check status +; Returns: V1 = FFFF (nothing read) +; V1 = 0 thru 00FF (byte received) +; V2 = bytes remaining in RX buffer (normally 0) +; V3 = bytes remaining in TX buffer (normally 0) + return +;------------- +.InitTwoPlayerDuel + cif TownOverlay +.ITPD1 + v1=CommsWantFinalDuel + gosub @SendPadding ; send several v1s to evade receiver buffering + gosub @ReadSerial +; if v1=CommsWantFinalDuel then ITPD2 +; if v1<>CommsAcceptFinalDuel then ITPD1 +;.ITPD2 +; gosub @ReadSerial +; if v1=CommsWantFinalDuel then ITPD3 +; if v1<>CommsAcceptFinalDuel then ITPD1 +;.ITPD3 + cend ; TownOverlay + +.SetEnemyName +; set EnemyName so this duel is the final one. + EnemyName=Pat + if PlayersName=Billy then FinalConflict + EnemyName=Billy + +.FinalConflict +.NotFinalConflict + cif TownOverlay + goto @OEPFinalDuel + cend + v4=DuelBack +; EnemyName already set + goto @ToTownOverlayV4 +; call town overlay with parameter v4 +;----------- +.AcceptFinalDuel + v1=CommsAcceptFinalDuel + gosub @WriteSerial + v1=CommsAcceptFinalDuel + gosub @WriteSerial + v1=CommsAcceptFinalDuel + gosub @WriteSerial + v1=CommsAcceptFinalDuel + gosub @WriteSerial + v1=CommsAcceptFinalDuel + gosub @WriteSerial + goto @SetEnemyName ; goto @OEPNotFinalDuel + return ; for other overlays +;--------- +.AnnounceLoss + v1=CommsOtherPlayerHasLost + goto @SendPadding ; send several v1s to evade receiver buffering +;-------- +.AnnounceWin + v1=CommsOtherPlayerHasWon +; drop through to SendPadding +;---------- +.SendPadding ; pad out with v1s to evade receiver buffering + gosub SPWriteSerial + gosub SPWriteSerial + gosub SPWriteSerial +.SPWriteSerial + push v1 + gosub @WriteSerial + pop v1 + return +;---------- +.ReadSerialNoWait + v1=0 ; request read + goto @MCReadSerial +;----------- + + diff --git a/l9dev/regress/games.l9/billy.l9/demo.txt b/l9dev/regress/games.l9/billy.l9/demo.txt new file mode 100644 index 0000000..fc67ae6 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/demo.txt @@ -0,0 +1,2067 @@ +; Demo.TXT Copyright (C) 1989 Level 9 Computing. +; for Billy The Kid +; +; Mike Austin October 1990 + + +;**Will palette setting at start work without structure file? + + +; draw flags are... +; dRemoveRedraw=65535 ; -1 Remove and redraw +; dInsert=0 ; 0 insert +; dPlot=1 ; 1 plot as sprite +; dInsertRedraw=2 ; 2 insert and redraw +; dMarkPreload=3 ; 3 mark to preload +; dSetProtect=4 ; 4 set protection mark +; dUnsetProtect=5 ; 5 unset protection mark + + +const + CurrentAcode=69 ; 'e' - acodE.acd + CurrentGamedata=65 ; 'a' - gamedatA.dat + Overlay=1 ; town game. (1=map/town, 2=scrolling, 3=shootouts) + TownOverlay=1 + ScrollingOverlay=0 + ArcadesOverlay=0 + + + + +; game constants: + MapCursor=2719 ; raster showing little binoculars. + +;Scrolling constants: + MapTopBorder=7 + MapBottomBorder=369 + MapleftBorder=7 + MapRightBorder=615 ; 8 Jan 1991. was 625 + Scrollconst=1 + +;Duel Constants: + OpponentX=176 + OpponentZ=160 ; 153 + OpponentH=64 + + StartPlayerX=36 + StartPlayerZ=192 ;208 + StartPlayerH=102 ; 128 + Crosshairani=3941 + Bellani=3940 + BellRaster=2457 + + StartCrossX=160 ; 80 + StartCrossZ=500 ; 400; 300 ; 250 ; + StartCrossH=370 ; 270; 170 ; 120 ; + + BillDrawn=2384 + + SizeHiresTable=1760 ; 16 times the number of entries in ObjectTable +; (Which is used for CD with map objects, and for CD with +; people in town.) + ArcBigWindowRaster=3360 ; big text window print raster + ArcBigWindowDO=202 ; 3360 ; big text window display object + MinTown=430 ; min xzh town background + MaxTown=599 ; 560 ; max xzh town background. (600 is map) + MaxOutside=549 + TownRoomBase=400 ; this number is subtracted from CurrentScreen +; in the towns to get the "room number": mainly used for +; the exit table. + PlayerInitialY=120 + IntroTablesList=9 + +table + ObjectTable=1 + HiresTable=2 ; 16 bytes per object listed in ObjectTable + list4=4 + list7=7 + IntroTables=9 + + +var + cache1 cache2 ; floormap variables + MarginZ + FSizeZ + MarginX + FSizeX + CurrentCache + + + +; duel variables + enemyacb + fighteracb + duelstatus ; also used for number of locks wanted on safe. + enemystatus + playergundrawn + + lastNonZeroScrollXDir + +;cursor stuff: + + HandObject + + NewScreen ; set to number of new screen when we want a change. +; otherwise 0 + + +;Scrolling stuff +; ScrollXDir ScrollYDir + ScrollSpeed ; BillACB + ScrollDiff +; screenx screeny + screencursorx screencursory + Borderleft BorderRight BorderTop BorderBottom + +;; MikeTemp + + CurrentObjectTable ; offset of start of table for current screen +; in ObjectTable() + AnimationCount + + PlaceCursorX PlaceCursorY + BuildingRoom + +; MenuDisplayed +; MenuOffset ; offset of menu tables within IntroTables +; MenuNumber ; menu we want to display +; WantedDirection ; not really needed, for compatability with Scroll +; UpdateACBs ; false if acbs are to be frozen for a while, +; e.g. whilst displaying menu + + PersonNumber ; set to person number that we are talking to. + + MovingPersonHires ; offset in Hires() of moving scenery person - +; e.g. hostess in saloon, ladies in street. Max one per scene. + WantCSTB ; set to true when want to do a COpyScreenToBuffer + PlayingDuel ; set to 1 when we want a duel on the next +; street scene. +; DuelStatus<>0 when we've actually started the duel itself + TimeInRoom + HorseScreen ; screen where player left his horse! +; 0 if not yet left + HorseX HorseZ HorseH + PlayerWalking ; set as a boolean, false or true - allows +; you to continue walking from stopped, in the same direction +; (i.e. it removes the debouncing on setting up the walk animation). + + DuelPlayerBase DuelOpponentBase + Newspaper ; flag: false/true + +;=========================================================== +;main loop begin +;=========================================================== +begin +code + ;;;;;;; Initial setup begins ;;;;;;;;;;; +.Start3D + gosub @AAEssentialInit + gosub @MCHeroOnceOnlyInit + cif NotPC + SmoothScroller=1 ; ST/AMiga are always smooth scrolling + cend + cif pc + SmoothScroller=v3 ; 0 for jump scrolling, non-zero for smooth scrolling + cend + CGAMode=v2 + v1=240 ; $00F0 + and CGAMode,v1 ; =0 if EGA/VGA, <>0 for CGA2/4. + Language=0 ; not yet chosen - choose in intro. + gosub @MCOnceOnlyMusicInit + v5=0 ; initialise sound system + gosub @MCDigitise + gosub @Initialise + +.PlayAgain +.RestartGame + + push FirstAsciiInFont + push FontHeight + push SmoothScroller + push Language + push CGAMode + + v1=6 ; pointer to variables +.ClearAllVars1 + v2=0 + &list0(v1)=v2 + v2=2 + add v1,v2 + if v1<600 then ClearAllVars1 + gosub @AAEssentialInit + pop CGAMode + pop Language + pop SmoothScroller + pop FontHeight + pop FirstAsciiInFont + + + MusicOn=1 ; default to playing + SoundOn=1 ; default to playing sound FX + CopyProtectChecked=0 + PlotLogicalDone=0 + ScrollDirectionDone=0 + cif pc + gosub @MCInitJoystick + cend + + + TwoPlayerMode=false + + + + UpdateACBs=true ; not menu mode + push v4 ; parameter + gosub @AAEssentialInit + v1=65 ; 'A' as in gamedatA.dat ;*******why necessary?3jan90 + gosub @LoadGamedata + pop v4 + goto @DoWholeIntro ; comment out this line to remove intro from start +.vAfterIntroStart + +; gosub @MCEmptyRoom + + + + + gosub @InitFloors + gosub @FCInitFloorCache + + TwoPlayerMode=0 ; when restart after two-player game, important +; NOT to send the updates of all vars to the other computer, +; cause it's VERY slow! + gosub @InitStrategy ; initialise strategy tables, +; set up people identikits for this game, etc. etc. + PlayerGang=0 ; no gang to start with + TicksSinceLawful=3 ; 8-this number is time before first town +; becomes lawful + TotalGoldStolen=0 + PlayerGold=50 ; amount of gold owned. + PlayerIncome=0 ; income next time back to map + PlayerReputation=200 ; reward for capture, in Dollars. + RobberyTillMDGoesBust=ConstTillMDGoesBust ; make a ranch go bust immediately + PatWarnings=0 ; number of warnings about doing a bad job + BillyLives=4 ; lives remaining. + Newspaper=false + EnemyName=255 ; default to fighting generic outlaw + + v4=SelectPlayerScreen ; GameMap + goto AfterIntroStart2 ; AfterOverlayEntry + + +.OverlayEntryPoint + break ;********** + push v4 ; parameter + gosub @AAEssentialInit + v1=65 ; 'A' as in gamedatA.dat + gosub @LoadGamedata + pop v4 +; gosub @InitFloors +; gosub @FCInitFloorCache + +.AfterIntroStart2 + push v4 + gosub @vSetDefaultPalettes + BuildingRoom=false + PlayingDuel=false + DuelStatus=0 + v1=0 ; purge + gosub @MCPurgeAllCells + StructureFile=0 ; void structure to force loading + gosub @OpenTownStructures + pop v4 ; parameter + +; re-initialise variables that may have been corrupted by +; overlay code... + PlayerDirection=3 + +; now choose whether to go back to town, or back to the map. +; (or even into a duel, I guess) + if v4=CodeRestartGame then @PlayAgain ; restart game + if v4=CodeBackToWalkabout then @BackToWalkabout + if v4=GameMap then OverlayRestart + + if v4<>DuelBack then OEPNotDuel +; if BillyLives<>0 then OEPNotFinalDuel +; if TwoPlayerMode=false then OEPNotFinalDuel +; gosub @InitTwoPlayerDuel +; +.OEPFinalDuel + PlayingDuel=true + v4=CurrentScreen + if v4<430 then OEPDuel2 + if v4GameMap then NotInitGameMap + &CurrentObjectTable=ObjectTable(0) + NextMusic=ThemeMusic ; game map music + gosub @ClockTick +; v4=DuelSamples +; gosub @LoadSamplesForGame + +.NotInitGameMap + RasterOffset = 0 + BuildingRoom=true + if CurrentScreen=IntroScreen then @DoWholeIntro + + +; cif NotPC ;****** + gosub @ClearHiresTable ; for CD in map and walkabout stuff. +; cend ;****** + ACBSearchStart=ConstACBStart + ACBStart=ConstACBStart + ACBEnd=ConstACBEnd + + if CurrentScreen=SelectPlayerScreen then @NoInsertScreen + PersonDisplayed=0 + dv1 = CurrentScreen + gosub @PreLoadAndInsertdv1 ; does InitACBs as well + gosub @ccDoCross ; setup cursor if needed + cursory = cursorz + sub cursory,cursorh + + ScrollXDir=0 + ScrollYDir=0 + LastNonZeroScrollXDir=0 + screenx = 0 + screeny = 0 + screencursorx = cursorx + screencursory = cursory + v1=0 ; x position in pixels + v2=0 ; y position in pixels +; if CurrentScreen<>GameMap then SB2 +; V1=LastMapX +; v2=LastMapY +; +;.SB2 + gosub @BuildRoom ; ViewMap + gosub @ClearKBD + + arraycount = 0 + Timeheld = 0 + MaxCursorSpeed = 16 + KeyHeld = 0 + + + gosub @PreloadSprites + gosub @InitTown + +.NoInsertScreen +; LastTunePlayed=0 + HourglassState=false ; don't do hourglass until requested +; by code in this part of the game. + if CurrentScreen<>SelectPlayerScreen then @NotInitSelect +; gosub @AnnounceLoss ; if two-player game is still running +; on other screen, tell them to stop. + +; NewScreen=430 ;******SelectPlayerScreen ; GameMap +; PlayingDuel=true ;******* +; goto @BuildNewScreen ;****** +.SelectPlayer + MenuNumber=164 ; Billy, Pat, restore + gosub @prettyMenu +;; dc.w 953-MM,MDoIt+953-MM * Billy +;; dc.w 952-MM,MDoIt+952-MM * Pat +;[955:Pat, you must track all the outlaw gangs to +;their hideouts. Talk to people to get information. ] ;||| +;[956:Billy, rob banks and steal cows from the Murphy-Dolans. ] ;||| +;[974:2-PLAYER GAME ] ;œœœ +;[975:Trying serial connection (press FIRE to abandon) ] + if result=375 then InitTwoPlayerGame + PlayersName=Pat + if result=355 then InitSelectEnd + PlayersName=Billy + +.InitSelectEnd + HourglassState=0 ; ensure hourglass is redisplayed + goto @ReturnToMap + +.InitTwoPlayerGame + gosub @TrySerial ; also chooses who we're gonna play + goto InitSelectEnd ; to map etc. +;----------------- + +.NotInitSelect + GameOverTimer=0 ; not ending + GameOver=0 + Won=false + TimeInRoom=0 + gosub @PlayerNewScreen + +;;;;;;;;; Main loop for any one screen once it is set up ;;;;;; +.CarryOnLoop + BuildingRoom=false + gosub @OpenTownStructures ; in case corrupted somewhere + gosub @ListenToSerial + + Difficulty=PlayerReputation ; at the moment, make all the +; arcade games relate directly to reputation + add Difficulty,Difficulty ; PlayerReputation starts at 100, +; so doubled gives approx the standard difficulty of arcade games. + + if NewScreen<>0 then @BuildNewScreen + v2 = 0 + + +; in street scene? + if currentscreen <400 then notduel + if CurrentScreen>MaxOutside then NotDuel ; outside + if DuelStatus<>0 then DoDuel0 + if PlayingDuel=false then NotDuel +.DoDuel0 + NextMusic=Generic1Music ; DuelMusic +; If we want to shoot the generic cowboy, +; set variables here as if shooting Billy because his +; animation sequence fits better onto generic opponent. +;; DuelOpponentBase=3680 ; Billy as a small person + +; now big person... + DuelPlayerBase=3730 ; Billy player animations base + if PlayersName=Billy then DoDuel1 + DuelPlayerBase=3750 ; Pat player animations base + +.DoDuel1 + DuelOpponentBase=3680 ;3691 ; Billy as a small person +; (changed by SPaniob into generic person, if appropriate) +;; if EnemyName=255 then DuelGotOpponent ; =Pat, Billy or $ff for other + if EnemyName=255 then DoDuelGeneric +; EnemyName=Pat or Billy. Now ignore it, +; and choose the opposite to player to ensure we can never +; shoot ourselves! + if PlayersName=Pat then DuelGotOpponent ; if EnemyName=Billy then DuelGotOpponent + +.DoDuelGeneric + DuelOpponentBase=3700 ;3711 ; Pat as a small person + +.DuelGotOpponent + gosub @theduel + +.notduel + + + + cif ST + if CurrentScreen<>GameMap then NoSpeedUpST2 + if ScrollXDir<>0 then NoSpeedUpST + dx1=ScreenX + dx2=15 + and dx1,dx2 + if dx1<8 then NoSpeedUpST2 +; on ST, unless scrollxpos mod 15 is >8, DISPLAYROOM is much slower. + ScrollXDir=8 + if LastNonZeroScrollXDir<200 then NoSpeedUpST + ScrollXDir=65528 ; -8 + +.NoSpeedUpST + LastNonZeroScrollXDir=ScrollXDir + +.NoSpeedUpST2 + cend ; ST + + gosub @DisplayEverything + + + + if CurrentScreen<>GameMap then COLNotMap +; LastMapX=ScreenX +; LastMapY=ScreenY + DuelStatus=0 + gosub @MapControls ;check for map scrolling + +; Jose interrupts player looking at Map? + if PlayerReputation<400 then MapNotInterrupt + code - + random x1 + code + + if x1>20 then MapNotInterrupt + v1=SPFJoseMcSween ; has player gone to help McSween at ranch? + add v1,SubPlotsOffset + v2=TownVarData(v1) + if v2<>0 then MapNotInterrupt + v2=1 + gosub @UpdateVarDataByte + MenuNumber=124 + x1=0 ; 1360 ; number for jose (person number 85) + m1=1670 + gosub @MapInterruption ; come here with x1=person number*16, +; m1=interruption message (e.g. "stopped on the way") +; and MenuNumber=menu to use, if not their default +;; goto @ReturnToMap + +.MapNotInterrupt + + +.COLNotMap ; check for keypress for new screen in demo + + + cif ST + if ScrollXDir<>0 then COLNotSpeedST + if RepeatScroll=0 then COLNotSpeedST + if RepeatScroll>200 then COLNotSpeedST + sub RepeatScroll,c1 + ScrollXDir=LastNonZeroScrollXDir + gosub @MoveTheACB + +.COLNotSpeedST + cend + if currentScreenMaxTown then COLNotTown + if PlayerACB=0 then COLNotTown ; e.g. riding into town + if DuelStatus<>0 then COLNotTown + gosub @TownControls + +.COLNotTown + goto @CarryOnLoop + +;.GoTown +; if x1 > 371 then GoInside +; currentscreen = 360 +;; if x1 = TrainScreen then BuildNewScreen2 +; add x1,c1 +; currentscreen = x1 +; goto BuildNewScreen2 +;.GoInside +; if x1 > 619 then GoGunFight +; currentscreen = 605 +; if x1 = 372 then BuildNewScreen2 +; currentscreen = 607 +; if x1 = 605 then BuildNewScreen2 +; currentscreen = 620 +; if x1 = 607 then BuildNewScreen2 +;.GoGunFight +; add x1,c1 +; currentscreen = x1 +; +;.BuildNewScreen2 +; goto @BuildNewScreen + +;;;;;;;;;;; end of main loop for any one demo screen ;;;;;; + + +;==================================================== +; end of main bit!!!! +;==================================================== + +.mapcontrols + ScrollXDir=0 + ScrollYDir=0 + gosub @CheckKeys + + if KeyHeld=0 then MC3 + if PlaceCursorX=0 then MC3 ; no map window open +; have we moved cursor far enough to close this window? + x1=cursorx + sub x1,PlaceCursorX + gosub @AbsX1 + if x1>32 then MC2 ; close it! + x1=cursory + sub x1,PlaceCursorY + gosub @AbsX1 + if x1<32 then MC3 +.MC2 +; close down the magnified view + TextBoxDisplayed=0 + PlaceCursorX=0 + +.MC3 +; check key presses for change or start of scrolling + +; Now check whether we want to scroll the screen, +; so convert the map-based coordinates into screen-based +; coordinates. +; cursory is the y coord relative to the map +; ScreenCursorY is the y coordinate relative to the screen + +; First check for Map borders + if cursory > MapTopBorder then scheckMapBottom + ScrollYdir = 0 + goto @sCheckMapleft +.sCheckMapBottom + if cursory < MapBottomBorder then scheckScreenTop + scrollydir = 0 + goto @sCheckMapleft + +.scheckscreentop + ScreenCursorY = Cursory + sub ScreenCursorY,screeny + if screencursory < 10000 then sNotnegative + screencursory = 16 +.sNotNegative + if ScreenCursorY > 10 then sCheckScreenbottom ;checkborder + ScreenCursory = 16 ;reset cursor + ScrollYdir = 0 + sub ScrollYDir,ScrollSpeed ;set scrolling direction +; sub screeny,scrollspeed + goto scheckMapleft + +.sCheckScreenBottom + if ScreenCursorY < 170 then sCheckMapLeft + if ScreenY>192 then sCheckMapLeft ; limit how far down we can scroll + Screencursory = 169 + scrollydir = scrollspeed +; add screeny,scrollspeed + +.sCheckMapleft + if cursorx>32000 then scheckscreenleft + if cursorx > MapLeftBorder then scheckMapright + scrollxdir = 0 + goto @MoveTheACB +.scheckmapright + if cursorx < MapRightBorder then sCheckScreenLeft + scrollxdir = 0 + goto @MoveTheAcb + +.scheckscreenleft + ScreenCursorX = cursorx + sub ScreenCursorX,screenx + if ScreenCursorX < 10000 then snotoffscreen + screencursorx = 16 +.snotoffscreen + if ScreenCursorX > 10 then scheckScreenright + Screencursorx = 16 + sub scrollxdir,scrollspeed + cif ST + ScrollXDir=65520 ; -16 - scrolls faster on ST! + if RepeatScroll<>0 then MoveTheACB + RepeatScroll=4 ; do several scrolls at once + cend + goto movetheacb + +.sCheckScreenRight + if ScreenCursorX < 300 then movetheacb + if ScreenX>292 then MoveTheACB ; limit how far right we can scroll + Screencursorx = 299 + scrollxdir = scrollspeed + cif ST + ScrollXDir=16 ; scroll much faster on ST. + if RepeatScroll<>0 then MoveTheACB + RepeatScroll=4 ; do several scrolls at once + cend + + +.movetheacb +; calculate coordinates relative to map and reposition cursor + cursorx = screencursorx + add cursorx,screenx + cursory = screencursory + add cursory,screeny + + dx4 = crosshairacb + gosub @readacbdx4 + cif TownOverlay + if CurrentScreen<>GameMap then MTA2 + if dv1=0 then @ReturnToMap + +.MTA2 + cend + dv2 = cursorx + dv3 = cursorz + dv4 = cursorz + sub dv4,cursory + gosub @moveacbdx4 + gosub @CheckCursorSpeed + return + +;------------------------- end of cursor movement checks----------; +.moveACBdx4 + if dx4>ACBListSize then MABug ;**** + push dx4 + add dx4,c4 + &ACBList(dx4) = dv2 + add dx4,c2 + &ACBList(dx4) = dv3 + add dx4,c2 + &ACBlist(dx4) = dv4 + pop dx4 + return + +.MABug + break ;******* + break + break + return +;---------------- +.ReadACBdx4 + if dx4>ACBListSize then MABug ;**** + push dx4 + &dv1 = ACBList(dx4) + add dx4,c4 + &dv2 = ACBList(dx4) + add dx4,c2 + &dv3 = ACBList(dx4) + add dx4,c2 + &dv4 = ACBlist(dx4) + pop dx4 + return +;--------- +.Escape +.vCloseDown ; .CloseDown + cif ST + v1=IntroTablesList ; IntroTables + &v2=IntroTables(0) ; system palette + v3=16 + v4=0 ; mode + gosub @MCSetPalette + gosub @DisplayFrame ; make sure palette has been updated + gosub @WaitForFrame + cend + + + v1=0 ; score 0 + v2=0 ; play + v3=2 ; stop + cif AllowMusic +;; gosub @MCPlayScore + gosub @MCMusicCloseDown + cend + + gosub @MCCloseDown +;----- +;----- +.ErrorHandler + push dv1 + &dv1=WordWS(66) ;WordErrorNumber +; cif ReleaseGame +; if dv1=512 then EHAbandon +; if dv1<>259 then EH1 +; cend +.EHAbandon + pop dv1 + return + +.EH1 + pop dv1 + + + gosub @SetUpPhysicalTextPtr + &WordWS(WordCursorXpos)=c0 + &WordWS(WordCursorYpos)=c0 + push v1 + push v2 + v1=320 + v2=16 + gosub @MCClearRectangle + pop v2 + pop v1 + push dv1 + &dv1=WordWS(66) ;WordErrorNumber + code- + prs "Error Handler (" + print dv1 + message cr ;'DoCr' ignores newlines; this is 'flush' + prs ")" + code+ + pop dv1 + +.WaitKey + gosub @KeyScan ; allows for escape/pause as well + if v2=0 then WaitKey + return + +;========== + +; upper limits... +; 50 Hz 12.5 fps +; 60 Hz 16 fps + +.vDisplayEverything ;.DisplayEverything + BuildingRoom=false + &WordWS(WordMouseXDistance)=c0 + &WordWS(WordMouseYDistance)=c0 + + gosub @PlayTuneForScene + + +; cif NotPC +; ByteWS(ByteOutputDevice)=c1 ; to rs232 +; code - +; prs "D " +; code + +; ByteWS(ByteOutputDevice)=c2 ; to screen +; cend + + + +;; if framelimiting = false then slowmachine +; cif NotPC +;REMOVED FOR SELF-RUNNING DEMO if FrameCount < 3 then DisplayEverything +; cend +; FrameCount = 0 +;.WaitFrame +; cif Amiga +; gosub @MCClearScreen ; force screen to be displayed &****Temp. +; goto SlowMachine +; cend +; if FrameCount<4 then WaitFrame + +;.SlowMachine +;cif Amiga +; x1=800 +;.AmiDelay +; sub x1,c1 +; if x1>0 then AmiDelay ;****************************** +;cend + + + + FrameCount=c0 + + gosub @SafePlotLogical + gosub @MCDisplayRoom ;ViewMap + + + gosub @DisplayEverythingSprites + + + + if WantCSTB=false then BANoCSTB + WantCSTB=false + gosub @MCCopyScreenToBuffer + +.BANoCSTB + gosub @DisplayHourglass + + gosub @MCUpdateScreen + gosub @DisplayFrame + cif NotPC + gosub @WaitForFrame + cend + cif pc + gosub @MCUnplotScreen + cend + + if ScreenX<32000 then NotLimitLeft + ScrollXDir=8 ; bring back on! + +.NotLimitLeft + if ScreenY<32000 then NotLimitTop + ScrollYDir=8 ; bring back on! + +.NotLimitTop + gosub @ConvertScrollToJump + + if ScreenX>8 then NotLimitLeft2 + if ScrollXDir<200 then NotLimitLeft2 +; near left, trying to go left - disable + ScrollXDir=0 + +.NotLimitLeft2 + if ScreenX<300 then NotLimitRight + if ScrollXDir>200 then NotLimitRight +; near right, trying to go right - disable + ScrollXDir=0 + +.NotLimitRight + if ScreenY>8 then NotLimitTop2 + if ScrollYDir<200 then NotLimitTop2 +; near top, trying to go up - disable + ScrollYDir=0 + +.NotLimitTop2 + if ScreenY<192 then NotLimitBottom + if ScrollYDir>200 then NotLimitBottom +; near bottom, trying to go down - disable + ScrollYDir=0 + +.NotLimitBottom + push v1 + push v2 + v1 = ScrollXDir ; 65532 ; x step=-4 + v2 = ScrollYDir ; 0 ; y step + if SmoothScroller=false then @MaybeJump + + gosub @SafeScrollDirection ; returns 0,0 if couldn't do it. + if v1=32768 then SDErr1 + add screenx,v1 ; Scrollxdir +.SDErr1 + if v2=32768 then SDErr2 + add screeny,v2 ; Scrollydir +.SDErr2 + pop v2 + pop v1 + + ScrollDirectionDone=0 + PlotLogicalDone=0 + +; if TextBoxDisplayed=0 then DENoWait +; TextBoxDisplayed=0 +;.DEWait +; gosub @WaitKey +; if v1<>13 then DEWait +; +;.DENoWait + return +;----------------------------------- + +.DisplayEverythingSprites + if CurrentScreen<>GameMap then DE1 + add AnimationCount,c1 + if AnimationCount=2 then DE2 ; only recalculate animation every other frame + AnimationCount=0 + +.DE1 + if UpdateACBs=false then DE2 + + gosub @DisplayACBS + HourglassState=0 ; have started to animate, so kill the hourglass + +.DE2 + gosub @SortAndDisplayObjects + +;; display hand on top +; v1=HandObject ; hand +; v2=cursorx +; v3=cursorz +; v4=cursorh +; v5=1 ; sprite +; v6=0 ; non-reversed +; gosub @MCDrawObjectV1 + + + if TextBoxDisplayed=0 then BANoBox ;*****MIKE + gosub @MenuSprites + if TextBoxDisplayed>2379 then BANoBox ; kludge to remove gunfighter + dv1=TextBoxDisplayed + dv2=screenx + dv3=screeny ; z + dv4=150 ; h + add dv3,dv4 ; bring to higher z coord, so it's in front of intro stuff + dv5=1 ; plot + dv6=0 ; non-reflected + gosub @MCDrawObjectDv1 + +.BANoBox + + cif ReallyST + &WordWS(WordCursorXPos)=c0 + x1=192 + &WordWS(WordCursorYPos)=x1 + v1=320 ; pixels wide + v2=8 ; pixels high + gosub @MCClearRectangle + cend + return +;------------- +.Initialise +; VBLInitialised=false ; will prevent any task swaps during init. + gosub @MCHeroInit + + cif NotPC + &x1=LongWS(HiLongLogicalBase) + &LongWS(HiLongGraphicsScreenBase)=x1 + &x1=LongWS(LoLongLogicalBase) + &LongWS(LoLongGraphicsScreenBase)=x1 + cend + + gosub @AllocateWorkspaceLists +; x1=0 +; &LongWS(HiLongRandomSeed)=x1 +; &LongWS(LoLongRandomSeed)=x1 + &WordWS(WordSuspendTaskSwap)=c1 ; suspended during init + + gosub @AAEssentialInit + LeftMargin=0 + + gosub @SetUpTextPtr + x1=39 + ByteWS(ByteWordWrapWidth)=x1 + +; initialise 3D. + v1=12500 ; number of cells used. (will crash if too small) + v2=2400 ; 7 jan 91 - increased for PC. was 2400 ; number of map links + v3=200 ; no. of heap entries (only used on PC) + cif ST + v4=1800 ; unusued + cend + cif PC + v4=800 ;no. of cumulative transparency masks + cend + v5=5800 ; size of ground map=width*height in cells. + gosub @MCSetUpVariablePtrs + + v1=640 ;1280 ; 4 screens, 20 wide each, in pixels + v2=384 ; 2 screens, 12 high each, in pixels + v3=1 ; game mode: 0=non-scrolling, 1=scrolling, 2=jumps + gosub @InitScrolling + + + gosub @MCEmptyRoom + cif pc + gosub @BuildRoom ; have to do a buildroom before any plotting, +; on PC only. + cend + + &WordWS(WordRasterOffset)=c0 + +;; WaitingForInput=false +; VBLInitialised=true + &WordWS(WordSuspendTaskSwap)=c0 ; start swapping! +cif pc + x1=IBMTopOfText + &WordWS(WordCursorYPos)=x1 +cend + &WordWS(WordVBLDisabled)=c0 ; enable vbl + gosub @SafePlotLogical ; tell the PC about the meaning of life. + + v1=100 ; minimum number of milliseconds per frame + gosub @MCSetMaxFrameRate + return +;--- +.VBL + add FrameCount,c1 + return +;--- +.vSpecialAniShift +; caller does: +; gosub @SpecialAniShift ; moving dv1 from dv2,dv3,dv4 by dx2,dx3,dx4 +; you can change any of these if necessary. +; This is for the acb at ACBList(ACBHeader) + if StructureFile<>TownStructures then SASNotTown + if CurrentScreenMaxTown then SASNotTown + if PersonDisplayed<>0 then SASNotTown + goto @SpecialAniShiftTown + +.SASNotTown + return +;------ + +.SpecialSetupAniObject + if CurrentScreenMaxTown then SSUAONotTown + if PersonDisplayed<>0 then SSUAONotTown + gosub @ScanObjectTables + +.SSUAONotTown + +.SSAONotBank +; DyingGreenLaw=3711 +; DyingOneLaw=3710 +; DyingWhiteLaw=3712 +; DyingBlueLaw=3713 +; DyingSmallLaw=3715 +; DyingBrownLaw=3714 +; +; DyingBlueOut=3735 +; DyingWaistOut=3736 +; DyingWhiteout=3737 +; DyingCoatOut=3738 +; DyingTinyOut=3740 +; DyingMexican=3739 + +; if dv1 < DyingoneLaw then ssaoEnd +; if dv1 > DyingSmallTown then ssaoCheckBandits +; goto ssaoWritelist +;.ssaoCheckBandits +; if dv1 < DyingBlueOut then ssaoEnd +; if dv1 > DyingTinyOut then ssaoEnd +;.ssaoWriteList +; &worklist(arraycount) = dv1 +; add arraycount,c2 +; &worklist(arraycount) = dv2 +; add arraycount,c2 +; &worklist(arraycount) = dv3 +; add arraycount,c2 +; &worklist(arraycount) = dv4 +; add arraycount,c2 +; dv1 = 0 +.ssaoEnd +return + +.StrategyTask +.DoCr +.BGSpecial +.TextDisplayAnimation +.FGSpecials +.ExtraTask +.DamsSpecials +.FGSpecialsMovedSprite +;.ErrorHandler +.IRQScheduler +.BGSpecials +;.SpecialACBkilled ;ACBList(ACBHeader) or dv1 + return +;--- +.SpecialXZHObject +; for map, hide some things until the player knows about them... + if CurrentScreen<>BankGame then @SXONotBankGame + if dv1<27 then SXONotHinge + if dv1>32 then SXONotHinge +; DuelStatus is how many hinges/locks are wanted + dx1=dv1 + dx2=26 ; first lock(27) -1 + sub dx1,dx2 +; dx1=how many locks using this one would make it. + if dx1GameMap then @SXONotMap9 +; if dv1<290 then @SRONotClickable +; if dv1>350 then @SRONotClickable +;; in "hidden" table? +; dx1=SPHiddenOffset +; add dx1,SubplotsOffset +; &dx1=TownVarData(dx1) +; add dx1,dv1 +; dx2=290 +; sub dx1,dx2 +; dx2=TownVarData(dx1) +; if dx2=0 then SRONotClickable +; dv1=0 ; delete object +; return +; +;.SRONotClickable + if PlayersName<>Pat then SXOMapNotPat + if dv1<>4040 then SXONotPat ; hide train from Pat so + dv1=0 ; he isn't tempted to rob it. + +.SXOMapNotPat +.SXONotPat + if dv1<331 then @SXONotHideout + if dv1>336 then @SXONotHideout +; which gang is this, and have they been discovered? + dx1=dv1 + dx2=331 ; first gang + sub dx1,dx2 + add dx1,dx1 ; multiply by 16 - bytes per subplot entry in TVD + add dx1,dx1 ; multiply by 16 + add dx1,dx1 ; multiply by 16 + add dx1,dx1 ; multiply by 16 + dx2=SPGangsOffset + add dx2,SubPlotsOffset + &dx2=TownVarData(dx2) ; get start of gangs sub-plot information. + add dx1,dx2 + &dx1=TownVarData(dx1) + if dx1<250 then SXONotMap9 ; hidden from map + dv1=0 ; don't add it. + return ; discovered + +.SXONotHideout +.SXONotMap9 + if StructureFile=ArcadeStructures then SXONotTown ; ranch pic etc. +;; if PlayingDuel<>0 then SXONotTown + gosub @ScanObjectTables +.SXONotTown + return +;--- +.SpecialRasterObject + gosub @ScanObjectTables + return +;--- +.ClearHiresTable +; clear table giving coordinates of objects on current screen + x1=0 +.CHT1 + HiresTable(x1)=c0 + add x1,c1 + if x1GameMap then @ScanForWalkabout + x1=CurrentObjectTable +.SOT1 + &x2=ObjectTable(x1) + if x2=65535 then @SOTEnd + if x2<>dv1 then SOT2 +; got a match - record coordinates + sub x1,CurrentObjectTable + x2=65534 ; mask off bottom bit + and x1,x2 + add x1,x1 ; now index into 16-byte-per-entry table: i.e. times 8 + add x1,x1 + add x1,x1 + +.RecordCoordinates +; x1=number of object times 16 + if x1>SizeHiresTable then SOTBug ; 19 Jan 1991. + &HiresTable(x1)=dv2 ; x coord + add x1,c2 + x2=dv3 ; z + sub x2,dv4 ; y=z-h + &HiresTable(x1)=x2 ; y coord +.SOTEnd + return + +.SOTBug + break ;**** + return ;*(***** + break ;****** + +.SOT2 + add x1,c2 + goto @SOT1 +;--------- +.ScanForWalkabout +; Object dv1..dv4 being plotted +; look through TownFixedData(PeopleTableBase...) +; (numberOfPeople worth of 16-byte entries) +; First byte is room number person can occur in, +; second byte is object number they use (0 if any in range) +; Record any people in HiresTable() for checking with HiresCD +; This is the same CD routine as used for pointing +; at things on the game map. + if PlayingDuel=0 then SFWNotDuel + if CurrentScreen>MaxOutside then SFWNotDuel ; outside + if dv3>32019 then SFWNotDuel ; negative - include object + if dv6=dPlot then SFWNotDuel ; include all sprites + if dv3>160 then @SFWPersonDead ; remove foreground scenery + +.SFWNotDuel + + x3=84 ; gambler + x1=1344 ; x3*16 + if dv1=2658 then @SFWPersonX1Time16 ; gamblers in all saloons + if dv1<620 then @SFWRet ;******* + if dv1>650 then @SFWRet ;******* +.ScanForWalkabout2 + &x4=TownFixedData(0) ; offset in TownFixedData() + x3=0 ; number of person being examined +.SFWLoop + x1=TownFixedData(x4) ; room number +; people not specifically named, and for objects e.g. wanted poster + add x4,c1 + if x1=0 then SFW1 ; not fussy about which room it's in - e.g. + if x1<>Location then @SFW3 +.SFW1 + x1=TownFixedData(x4) ; graphics object number used. + x2=620 ; base for graphics number + add x2,x1 + if x2=dv1 then SFW2 ; a match! +; not a match, but... + if x1<>0 then @SFW3 ; not "anything vaguely like a person" flag. + if dv1<620 then @SFW3 ; lowest graphics number for person + if dv2>650 then @SFW3 ; highest graphics number for person +.SFW2 +; got a match - record it etc. + x1=x4 + &x2=TownFixedData(0) + sub x1,x2 * take off start of this table. + add x1,x1 ; get number times 16 from number times 8. + x2=65520 ; $fff0 ; remove bottom 4 bits. + and x1,x2 + +; person number x1/16 +; are they alive? + x2=PeopleVarData + add x2,x1 + x3=TVDPeopleNameOffset + add x2,x3 + x3=TownVarData(x2) + if x3=0 then SFWPersonDead + + if PlayingDuel<>0 then SFWPersonDead + +.SFWPersonX1Time16 + if dv1<639 then VRecordCoordinates + if dv1>645 then VRecordCoordinates +; this is a moving person - make a separate record of the offset + MovingPersonHires=x1 +.VRecordCoordinates + goto @RecordCoordinates ; gosub, return + +.SFW3 + x1=7 ; 8 bytes per entry + add x4,x1 + add x3,c1 ; number of person being examined + if x30 then SSEnd +; pop v1 +; goto @MCStartSound +; +;.SSEnd +; pop v1 +; return +;--- + +.ReadObjectAreas + MinXZH=1 + &MinRaster=StructureBuffer(4) + add MinRaster,c1 + &MinAnimation=StructureBuffer(10) + add MinAnimation,c1 + &MinCompressed=StructureBuffer(16) + add MinCompressed,c1 + &MinCell=StructureBUffer(28) +.ADRRet +.SuspendTaskSwap +.ResumeTaskSwap + return +;--- +.SetUpTextPtr +; &x1=list11(72) ; list 18's ptr +; &LongWS(HiLongTextScreenBase)=x1 +; &x1=list11(74) +; &LongWS(LoLongTextScreenBase)=x1 + return +;----- +;--- +.SetUpLogicalTextPtr +; &x1=LongWS(HiLongLogicalBase) +; &LongWS(HiLongTextScreenBase)=x1 +; &x1=LongWS(LoLongLogicalBase) +; &LongWS(LoLongTextScreenBase)=x1 + return +;--- +.SetUpPhysicalTextPtr +cif PC + v1=7 + gosub @MCEnableTextBuffer +cend ;PC + cif NotPC + &x1=LongWS(HiLongPhysicalBase) + &LongWS(HiLongTextScreenBase)=x1 + + &x1=LongWS(LoLongPhysicalBase) + &LongWS(LoLongTextScreenBase)=x1 + cend + return + +;--- +.LoadStructures + StructureFile=TownStructures + &v1=IntroTables(12) ; 's.dat' +.vLoadStructuresV1 ; .LoadStructuresV1 + + gosub @CopyFilename + v1=15 ; load list 15 (structureBuffer onwards) + v2=0 ; offset within list15 + v3=0 + gosub @MCLoadFile ; filename is list17(8...) + + v1=15 ; use list15, please + gosub @MCSetUpPtrs ; tell MC about ptrs + gosub @ReadObjectAreas ; read mincell, minraster, mincompressed +;; StartStructureBuffer=32 + StructureFile=TownStructures + return +;----------- +.AllocateStructures +; set up ACBList (14) + &x1=longws(HiLongFreeWorkspace) + &list11(56)=x1 ; set up list14 + &x1=longws(LOLongFreeWorkspace) + &list11(58)=x1 ; set up list14 + v1=ACBListSize ; probably excessive + gosub @MCReserveMemory + +; structure file... + &x1=longws(HiLongFreeWorkspace) + &list11(60)=x1 ; set up list15 + &x1=longws(LOLongFreeWorkspace) + &list11(62)=x1 ; set up list15 + + v1=60000 + gosub @MCReserveMemory + +; drop through to AAEssentialInit... + +.AAEssentialInit +; things which must be initialised after clear etc. + c0=0 ;****! + c1=1 + c2=2 + c3=3 + c4=4 + c5=5 + c6=6 + c7=7 + c8=8 + c9=9 + c16=16 + c32=32 + return + +;============ +.DisplayFrame + gosub @SetUpTextPtr + cif NotPC + ByteWS(ByteFrameReadyFlag)=c1 + cend + return +;------ +; wait for frame to be displayed +.WaitForFrame +cif NotPc ; don't wait on pc. + x1=ByteWS(ByteFrameReadyFlag) + if x1<>0 then WaitForFrame +cend + return +;---- +;---- +.WP1 +.EBRet + return +;---- +.DivX1X2 +; x1:=x1/x2 + x3=minusone ; result = 0 if x2>x1 +.DivLoop + add x3,c1 + sub x1,x2 + if x1<50000 then DivLoop + x1=x3 + return +;--- +;.ModX1X2 +;; x1:=x1 mod x2 +;.ModLoop +; x3=x1 ; trial result +; sub x1,x2 +; if x1<50000 then ModLoop +; x1=x3 +; return +;-------------- +.AllocateWorkspaceLists + cif NotPC +; PC allocates 2.5K for vars/table.txt var lists, +; ST allocates 0.5K total, but can allocate more here... + v1=512 ; space for extra vars + gosub @MCreserveMemory + cend + + &x1=longws(HiLongFreeWorkspace) + &list11(68)=x1 ; set up list17 + &x1=longws(LOLongFreeWorkspace) + &list11(70)=x1 ; set up list17 + v1=100 ; reserve space for list 17 (filename buffer) + gosub @MCReserveMemory + + &x1=longws(HiLongFreeWorkspace) + &list11(28)=x1 ; set up list7 + &x1=longws(LOLongFreeWorkspace) + &list11(30)=x1 ; set up list7 + + cif pc + v1=7 ; load into list 7 (acode doesn't need to +; access the exponent table again, so this subroutine just +; allocates some space for it, and we re-set up list7 +; afterward it's been called - thus leaving the data in memory) + gosub @LoadExponentTable + + &x1=longws(HiLongFreeWorkspace) + &list11(28)=x1 ; set up list7 + &x1=longws(LOLongFreeWorkspace) + &list11(30)=x1 ; set up list7 + cend + + + v1=TownVarDataSize ; reserve space for list 7 (TownTempData) + gosub @MCReserveMemory + +; This is the end of the area saved by the SAVE GAME option + + &x1=longws(HiLongFreeWorkspace) + &list11(64)=x1 ; set up list16 + &x1=longws(LOLongFreeWorkspace) + &list11(66)=x1 ; set up list16 + v1=WorkListSize ; reserve space for list 16 + gosub @MCReserveMemory +; if this overspills (as seems to happen in the scrolling games**** +; it will corrupt the thing afterwards + + +; v1=3000 ; attempt to fix bug which manifests in the scrolling +;; game maps (espec Escape) +; gosub @MCreserveMemory + +; list 2 is used by scrolling games for CD maps etc. +; It needs a total of 2400 bytes. Now, SizeHiresTable is normally +; 1440, so they need an extra 1000 bytes - unless you do some +; re-arrangement. +; See CDListNum and CDList in AACONST.TXT + + &x1=longws(HiLongFreeWorkspace) + &list11(8)=x1 ; set up list2 + &x1=longws(LOLongFreeWorkspace) + &list11(10)=x1 ; set up list2 + v1=SizeHiresTable ; reserve space for list 2(HiresTable) + add v1,c16 + gosub @MCReserveMemory + v1=700 + gosub @MCReserveMemory ; extra space used by scrolling games + + + gosub @AllocateStructures + + + gosub @AllocateAndLoadFont ; in list 26 + + gosub @AllocateSamplesAndMusic + + + + + &x1=longws(HiLongFreeWorkspace) ; allocate FloorMap + &list11(108)=x1 ; set up list27 ( for floormaps: Walkabout code ) + &x1=longws(LOLongFreeWorkspace) + &list11(110)=x1 ; set up list27 + v1=EndCache2 ; space for floor map cache. + goto @MCReserveMemory ; gosub ,return +; v1=8000 ;*********** Amstrad still crashes with this present. +; gosub @MCReserveMemory ; (it actually crashed +; whilst apparently within the driver 'open' function +; Possibly whilst scanning the floor maps before the game +; proper starts). + +;cif amiga +; v1=16000 +; v2=2 ; type of memory +; v3=25 ; return address in list 25 ptr +; gosub @MCReserveChip +; goto InitSamples2 +;cend +; +; return +;--- +.vPreLoadAndInsertdv1 ;.PreLoadAndInsertdv1 + push BuildingRoom +; make sure these system flags are cleared, in case an +; overlay terminated 'abnormally' + ScrollDirectionDone=0 + PlotLogicalDone=0 + BuildingRoom=true + push dv1 + gosub @InitACBs + + RasterOffset=0 + dv2=0 + dv3=0 + dv4=0 + dv5=dMarkPreload + dv6=0 ; non-reversed + gosub @DrawObjectdv1 + pop dv1 + + if CurrentScreen=GameMap then PLAI2 +; preload the first bit of any animation sequences, doing +; repeats once and once only... + x1=8 ; countdown counter + push dv1 +.PLAI1 + push x1 + gosub @DisplayACBsDV5 + gosub @SortAndDisplayObjects + pop x1 + sub x1,c1 + if x1>0 then PLAI1 + pop dv1 + dv2=0 + dv3=0 + dv4=0 + dv6=0 + +.PLAI2 + gosub @MCPreLoadCells + dv5=dInsert ; insert into structure. +;;;; if CurrentScreen=GameMap then @MCDrawObjectDV1 ; gosub, return + push dv1 + gosub @InitACBs + pop dv1 + gosub @DrawObjectdv1 ; gosub, return. + pop buildingRoom + return +;----- +.StartFreeACB0 +; ani sequence ObjectNumber, started at coords 0 +; returns dx4 as acb offset + dv2=0; x + dv3=0 ; z + dv4=0 ; h + +.StartFreeACB ;ObjectNumber, dv2, dv3, dv4; returns dx4 + dv1=ObjectNumber + dv5=dPlot + dv6=0 ; no reflection + gosub @FindObjectNumber + goto @SetupACB00 ; set up acb, without stepping on other animation. + +;----- +;---------- + + +;---- +;.SetUpACBdx4 +; push dx4 +; gosub @FindObjectNumber +; gosub @DecodeHeader +; pop dx4 +; dv1=ObjectNumber +; gosub @SUAGotBlankACB +; return +;--- +.ChangeACBdx4 +; change acb dx4 to use ani object ObjectNumber + push ACBHeader + push dx4 + ACBHeader=dx4 + push ObjectNumber + gosub @KillACBHeader + pop ObjectNumber + gosub @FindObjectNumber + gosub @DecodeHeader + pop dx4 + pop ACBHeader + dv1=ObjectNumber + dv6=0 ; reset reflection + goto @SUAChangeACB +;--- +; gosub @MCInitSound +; &WordwS(58)=c0 ; set length of sound to play to zilch. + + +;.[SpecialAniObject +;****** Now separate file****;KYC +;; object num has been requested by an animation sequence. +;; Do any intercepts, and change dv1-6 if you really +;; want to. + +;.StartSound +;; start sound if nothing already playing. +;; (priorities?) +; push v1 +; &v1=WordWS(58) ; snd_len - i.e. samples yet to play. +; if v1>0 then SSEnd +; pop v1 +; goto @MCStartSound +; +;.SSEnd +; pop v1 +; return +;--- + + +;--- +;code - +;code + +;.MCDrawObjectV1Vec +; goto @MCDrawObjectV1 +; +;.MCNoClipSpriteVec +; goto @MCNoClipSprite +; +;.MCFindObjVec +; goto @MCFindOBj +; + +;------ + +;---------- +.AbsX1 +; return absolute value of x1, in x1 + if x1<32768 then AbsX1Ret + push x2 + x2=x1 + x1=0 + sub x1,x2 + pop x2 +.AbsX1Ret +.SpecialSetUpFork ; with ACB dx4, coords dv2..dv4 +.SpecialSetUpACB + return +;-------- +.MultdX1dx2 +; dx1=dx1*dx2 + dx3=dx1 + if dx2=0 then Multdx1dx2Zero + if dx2=1 then Multdx1dx2Ret +.Multdx1dx2Loop + add dx1,dx3 + sub dx2,c1 + if dx2>1 then Multdx1dx2Loop +.Multdx1dx2Ret + return +.Multdx1dx2Zero + dx1=0 + return +;---------- +.PreloadSprites +; preload sprites for e.g. walkabout, or duel. + if CurrentScreen<400 then NotPreloadWalkabout + if CurrentScreen>549 then NotPreloadWalkabout + + dv5=dMarkPreload + dv1=49 ; person preload screen + x1=100 ; 0 for another, 100 for Billy, 200 for Pat. + if PlayersName=Billy then NIGM2 + x1=200 ; pat +.NIGM2 + &WordWS(WordRasterOffset)=x1 + gosub @MCDrawObjectDV1 + &WordWS(WordRasterOffset)=c0 + if HorseScreen=0 then PreloadHorse ; riding into town + if CurrentScreen<>HorseScreen then PreloadNotHorse +.PreloadHorse + dv1=48 ; horse preload screen + gosub @MCDrawObjectDV1 + +.PreloadNotHorse +.NotPreloadWalkabout + if PlayingDuel=false then @NotPreloadDuel ; if CurrentScreen<>DuelBack then NotPreloadDuel +; preload foreground person + if CurrentScreen<400 then @NotPreloadDuel ; not in town (kkludge) + if CurrentScreen>599 then @NotPreloadDuel + &WordWS(WordRasterOffset)=c0 + x1=20 ; number of objects to preload + dv1=2380 ; big Billy Draw + if PlayersName=Billy then PLDuel2 + dv1=2400 ; big Pat draw +.PLDuel2 + gosub @MCDrawObjectDV1 + add dv1,c1 + sub x1,c1 + if x1>0 then PLDuel2 + + x1=25 ; number of objects to preload + dv1=20 ; first frame of generic small person drawing + if EnemyName=255 then PLDuel3 ; =Pat, Billy or $ff for other + dv1=2530 ; small Billy Draw + if EnemyName=Billy then PLDuel3 ; =Pat, Billy or $ff for other + dv1=2420 ; small Pat draw +.PLDuel3 + gosub @MCDrawObjectDV1 + add dv1,c1 + sub x1,c1 + if x1>0 then PLDuel3 + + +.NotPreloadDuel + goto @MCpreloadCells ;' gosub, return +;----------------- +.DITBug ;**** + break ;****** + return +;------- +.InitTown + if CurrentScreenMaxTown then @NotInitTown + NextMusic=RagTimeMusic ; walkabout music (inside) + + if CurrentScreen>MaxOutside then DoInitTown ; Inside where duels can't happen? + NextMusic=ThemeMusic ; outside walkabout + + if PlayingDuel<> 0 then @NotInitTown +.DoInitTown + if HorseScreen<>0 then DIT2 + HorseScreen=CurrentScreen + PlayerACB=0 ; prevent anything resetting height when on horse + ObjectNumber=3630 ; Billy rides into town + if PlayersName=Billy then RideIn2 + ObjectNumber=3640 ; Pat rides into town + +.RideIn2 + dv2=0 ; x + dv3=0 ; z + dv4=0 ; h + RasterOffset=0 + gosub @StartFreeACB + goto @DIT3 + +.DIT2 + ObjectNumber=3400 + if PlayerWalking=true then DIT2a + ObjectNumber=3410 ; Player stopped in direction + +.DIT2a + add ObjectNumber,PlayerDirection + dv2=PlayerX ; 32 + dv3=PlayerZ + dv4=PlayerHeight ; h +;; add dv3,dv4 ; z=y+h + RasterOffset=100 ; 0 for another, 100 for Billy, 200 for Pat. + if PlayersName=Billy then DIT2b + RasterOffset=200 ; Pat + +.DIT2b + gosub @StartFreeACB + PlayerACB=dx4 + dx1=ACBCumulativeShift ; word - for Walkabout: keeps track +; of how far we've shifted vertically - to allow the up/down +; movement as we walk to be cancelled when change animation. + add dx1,PlayerACB + if dx1>ACBlistSize then @DITBug + &ACBList(dx1)=c0 ; reset cumulative H shift. + + if CurrentScreen<>HorseScreen then NotAddHorse +; if in room where we left the horse, put it back! + if horseX<150 then NotAddHorse ; horse has gone wrong somehow! + if HorseZ<120 then NotAddHorse ; horse has gone wrong somehow + ObjectNumber=3624 ; horse standing + dv2=HorseX ; x + dv3=HorseZ ; z + dv4=HorseH ; h + sub dv4,c8 ; h coord is slightly wrong as recorded because the +; raster for the horse's hindquarters is trapped + RasterOffset=0 + gosub @StartFreeACB +;; gosub @TCSetUpPlayer + +.NotAddHorse +.DIT3 + dv1=CurrentScreen + gosub @FCNewRoomDv1 ; load floor maps in. + + gosub @MoveOffBlockedSquares ; make sure Player isn't standing on +; something blocked (doesn't matter for horse) + + +.NotInitTown + return +;------------------------- +;---------------- + +.vSetDefaultPalettes + v1=4 ; list4 +cif notpc + &v2=list4(16) ; palette +cend + v3=16 +cif pc + &v2=list4(14) ; palette +cend + gosub @MCSetPalette + cif pc + gosub @SetCGAPalettes + cend + return +;-------------- +.SafePlotLogical + cif pc + if PlotLogicalDone=true then DEPL2 + gosub @MCPlotLogicalScreen + PlotLogicalDone=true + +.DEPL2 + cend + return +;--------------- +.SafeScrollDirection + cif pc + if ScrollDirectionDone=true then SSD4 + ScrollDirectionDone=true + gosub @MCScrollDirection +; convert error codes to a sane value which can safely be ignored + if v1<>32768 then SSD2 + v1=0 +.SSD2 + if v2<>32768 then SSD3 + v2=0 +.SSD3 +.SSD4 + cend + return +;----------------- +.vSelectLanguage + if Language<>0 then DontReload ; have already chosen + Language=German ;***** +; MenuNumber=6 ; choose language menu +; gosub @PrettyMenu +; Language=result + if language=English then DontReload + v1=65 ; 'a' + gosub @LoadGameData ; reload appropriate town gamedata. + &MenuOffset=IntroTables(32) ; offset of menu data. + +.DontReload + return +;---------- +.vBuildRoom + BuildingRoom=false ; a flag to Acode only, ignored by machine +; code. Logically it should go after this call, but that +; would waste a return instruction. + goto @MCBuildRoom +;---------- +.SetCGAPalettes + cif pc +; dc.b $0,$F,$F,$F,$F,$F,$0,$0,$F,$0,$9,$F,$F,$F,$0,$F ; 2 colour text printing +; dc.b $0,$F,$F,$F,$F,$F,$0,$0,$F,$0,$9,$F,$F,$F,$0,$F ; 2 color map +; dc.b $0,$F,$F,$1,$F,$F,$1,$1,$7,$0,$F,$0,$F,$F,$9,$0 ; 2 Pat, Billy & Barbrawl +; dc.b $0,$F,$7,$1,$F,$9,$1,$0,$7,$0,$F,$F,$F,$F,$A,$F ; 2 Outside Buildings +; dc.b $0,$F,$9,$0,$0,$0,$F,$0,$A,$A,$F,$F,$F,$F,$7,$F ; 2 Saloons + v1=4 ; list 4 + &v2=list4(20) ; CGA2 palette + v3=2 ; 2-color palette + v4=255 ; 255 is text printing palette + gosub @MCSetPalette + + add v2,c16 ; skip on to default palette (map) + v4=0 ; default palette + gosub @MCSetPalette + + add v2,c16 ; skip on to people palette + v4=1 ; palette 1 - people + gosub @MCSetPalette + + + v1=4 ; res-set up list just in case + &v2=list4(22) ; CGA4 palette + v3=4 ; 4-color palette + v4=255 ; 255 is text printing palette + gosub @MCSetPalette + + add v2,c16 ; skip on to default palette (map) + v4=0 ; default palette + gosub @MCSetPalette + + add v2,c16 ; skip on to people palette + v4=1 ; palette 1 - people + gosub @MCSetPalette +cend + + cif TownOverlay + x1=800 ; first object used for people + x2=999 ; last object used for people + x3=1 ; palette to set to + gosub @SetPreLoadPalettes + cend + + return +;-------------- +.SetPreLoadPalettes + cif pc +; set objects x1..x2 to use cga palette x3 + v1=x3 + gosub @MCSetPreloadPalette + + v1=x1 + v5=7 ; dSetPreloadPalette +.SPLP1 + gosub @MCDrawObjectV1 + add v1,c1 + if v1>Mike 30/3/89 - optimization in FindObjectNumber added +; +; changes 20/12/89 - fix reversal propogation in DisplayACBs +;>>Mike 18 June 1990 - Linked forks now kill existing links + +;>> 6 August 1990 - FindObjectNumber acode version +; removed for release game - makes a huge improvement +; in speed, because ObjectNumber=0 was being displayed +; for some reason by ACBs, and this was causing the entire +; structure file to be scanned. + +;31 August 1990 - fix to allow static acbs to have +; a raster offset (0 lines added) +; 10 October - SpecialInitACBs added, InitACBs changed +; to clear whole ACBList, including Sorting area. + +; 8 Jan 1991 - change to MCDrawObjectDV1 to stop +; plotting (caused by SetupACB calling DisplayACBs) whilst +; building a room. + +;; 19 Jan 1991 - important changes to SETUPACB - +; no longer returns negative (large positive) error return +; as this might cause corruption of later stuff if acbs overflow. +; Also, SetupACB0 changed to range-check acb requested, and +; abandon if too large. + + const +; LinkNextOffset=26 ; before stack in acb +; within acbs, this word gives the acb offset +; of any acb linked to this one. If this acb moves, move the other +; acb as well. If this acb is killed, kill the other acb as well + LinkedForks=1 ; set to 1 to allow, 0 to disable +;; LinkNextOffset=26 ; before stack in acb ; >>>>>>> RAJ + BloodRelations=0 ; set to 1 for blood relations only + +var + LinkNext LinkNextShift +;; X Y Z H ;>>>>>>>>>>>>added so new version works with RAJ. 4/8/90 + ACBLoopBreaker ;&*********** + + +begin + +;---- + +.MCDrawObjectdv1 + gosub @SuspendTaskSwap + push v1 + push v2 + push v3 + push v4 + push v5 + push v6 + if buildingRoom=false then MDO2 ; 8 Jan 1991 +; when building room, on PC mustn't do a plot because +; it screws everything up. + if dv5=dPlot then MDOEnd + +.MDO2 + v1=dv1 + v2=dv2 + v3=dv3 + v4=dv4 + v5=dv5 + v6=dv6 + gosub @MCDrawObjectv1 +.MDOEnd + pop v6 + pop v5 + pop v4 + pop v3 + pop v2 + pop v1 + gosub @ResumeTaskSwap + return +;----- +.InitACBs + gosub @SpecialInitACBs + + &ACBList(ACBSortStart)=c0 ; kill displayed acbs + dx1=8 + dx2=ACBSortStart + add dx1,dx2 + if dx1>ACBListSize then IABug ;******* + &ACBList(dx1)=c0 ; zero object to display + dx1=ACBStart +.IACBLoop + &ACBList(dx1)=c0 +; ix1=ACBSize + add dx1,c2 ; ix1 + if dx132767 then DisplayCell1 ; off screen +; calculate the maximum x used (for xsize of xzh objects) + MaxX=dv2 + +.DisplayCell1 + if dv2>MinX then DisplayCell2 + MinX=dv2 + +.DisplayCell2 +;cif Editor +; sub dv3,YBase +; and dv3,DisplayZMask +; add dv3,YBAse +;cend + + if dv2xclipMax then @DCRet + dx1=dv3 + sub dx1,dv4 + if dx1yclipMax then @DCRet +cend + +push dv3 + cif Editor + if UseMC=true then DCMC + if dv5=1 then @DCDraw + cend +.DCMC +; use MC to do plotting + if dv2>320 then DCMCDrawEnd ; x too big, or negative +;; if dv2<16 then DCMCDrawEnd ; x wrapped round to rhs of screen + + dx1=dv3 + sub dx1,dv4 + if dx1>200 then DCMCDrawEnd ; y too big, or negative + gosub @MCDrawObjectdv1 + +.DCMCDrawEnd +pop dv3 +.DCRet + return + +.DCDraw +; Use my draw cause it doesn't do vm +; calc y coord = z-h + if dv2>320 then DCDrawEnd ; x too big, or negative + sub dv3,dv4 + if dv3>200 then DCDrawEnd ; y too big, or negative + sub dv1,MinCell +; only used from structure editor, so no conflict over +; use of v1-3 with other tasks. + v1=dv1 + v2=dv2 + v3=dv3 + gosub @MCNoClipSprite ; displays at x=v2, y=v3 +.DCDrawEnd +pop dv3 + return +;--- +.DONNeo +; display the Neochrome screen +; which starts at List18(NeoScreenOffset) +; first 128 bytes are palette info. +; subsequent are groups of 4 words, 16 pel per word + +; Find starting address (i.e. ScrollX,ScrollY 16x16 blocks +; of PixelScrollX,PixelScrollY pixels) + +cif Editor + dx1=PixelScrollY ; *160 + dx2=160 + gosub @Multdx1dx2 + dx2=ScrollX + add dx2,dx2 + add dx2,dx2 + add dx2,dx2 ; *8 + add dx1,dx2 + dx2=NeoScreenOffset + add dx1,dx2 + dx2=128 ; skip palette info + add dx1,dx2 +; dx1 is now offset within List18 of the Neo screen +; to use for Import/export functions +; display it! +; copy neo picture to screen... +;code - +;code + + &WordWS(WordCursorXPos)=c0 + &WordWS(WordCursorYPos)=c0 + v1=19 ; logical base in list 19 + v2=20 ; physical base in list 20 + gosub @MCCalcScreenAddressVec ; get List19 as start of screen + v1=18 ; source for copy is list18 + v2=dx1 ; offset within source list + v3=19 ; destination is list19 + v4=0 ; offset within dest list + v5=8000 ; no. of words to copy + if SingleScreen=false then @MCCopyVec + v5=16000 ; copy a full screen + goto @MCCopyVec ; gosub, return +cend + return + +;--- +cif editor +.ADXAniCursor +; display xzh cursor (which is an animation object) + push ObjectNumber + ObjectNumber=CursorObject + dv1=CursorObject + gosub @FindObjectNumber + gosub @SetUPAcb + pop ObjectNumber + return +cend ; editor +;-------- +.DisplayXZHCursor + cif Editor +; if dv3xzhCursorZ then AbsDisplayXZHCursor +;code - +; random dx1 +;code + +; if dx1>128 then @DXZHNotCursorYet + return ; always display cursor on top nowadays. + cend + +.AbsDisplayXZHCursor +cif Editor + if WantToDisplayCursor=false then @DXZHNotCursorYet + WantToDisplayCursor=false + if CursorObject20 then @DONRet + Entryv1=dv1 +cend + gosub @SpecialXZHObject + if dv1=0 then DONRet + +push ObjectNumber + ObjectNumber=dv1 + gosub @FindAndDecode ; returns header as start of header +pop ObjectNumber +; now Header=start of header for this object + if size=4 then DONRet ; @AbsDisplayXZHCursor ; null object - don't bother + dx4=4 + add dx4,Header + if dv6=0 then dxzhLoop +; add on width to get the right-hand side as a base +; (because all the offsets specified in xzh objects are relative +; to what would be the lhs if it was displayed normal-way-round) + dx1=xsize + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dv2,dx1 + +.DXZHLoop + push dx4 ; save start of object call + push dv1 ; current object we're interpreting + push dv2 ; base x coord + push dv3 ; base z coord + push dv4 ; base h coord + push dv6 ; save reflection flag + cif Editor + push EntryV1 + cend + push xsize + push size + push header + push ObjectNumber + dx1=StructureBuffer(dx4) ; x coord + gosub @SignExtenddx1 + add dx1,dx1 + add dx1,dx1 + add dv2,dx1 + if dv6=0 then DXZHNotReflected + sub dv2,dx1 ; double subtract (because we've already added it on) + sub dv2,dx1 + +.DXZHNotReflected + add dx4,c1 + dx1=StructureBuffer(dx4) ; z coord + gosub @SignExtenddx1 + add dx1,dx1 + add dx1,dx1 + add dv3,dx1 + add dx4,c1 + dx1=StructureBuffer(dx4) ; h coord + gosub @SignExtenddx1 + add dx1,dx1 + add dx1,dx1 + add dv4,dx1 + add dx4,c1 + dx5=header + add dx5,size + if dx4>dx5 then @DXZHNull ; off end of buffer + +; sixteen bit non word-aligned read... + dx1=StructureBuffer(dx4) + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx4,c1 + dv1=StructureBuffer(dx4) + add dv1,dx1 ; merge in high byte + +; was the current xzh object reversed? +; the xzh coords we've calculated above give the RHS +; of the object to call (because offsets are relative +; to this: when non-reflected, it's the LHS), +; but we need to calculate the LHS +; for the benefit of the object we call. +; So take off the x size of the object we're calling. + if dv6=0 then dxzh5 +; i.e. calculate lhs of object before calling it. + ObjectNumber=dv1 + dx1=32767 + and ObjectNumber,dx1 + push dx4 + gosub @FindAndDecode + pop dx4 + dx1=xsize + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + sub dv2,dx1 ; calc lhs of the current object for the benefit +; of the called routine + +.dxzh5 + if dv1<32768 then DXNotSetReflect + dx1=65535 ; toggle all bits + xor dv6,dx1 ; toggle reflection on/off + +.DXNotSetReflect + dx1=32767 + and dv1,dx1 ; remove x reflection bit + cif Editor + gosub @EditorCursorStuff + cend + if dv1=0 then @DXZHNull ;*** + gosub @DrawObjectdv1 ; beware - recursive!!! + +.DXZHNull + pop ObjectNumber + pop header + pop size + pop xsize + cif Editor + pop EntryV1 + cend + pop dv6 ; reflection flag + pop dv4 + pop dv3 + pop dv2 + pop dv1 + pop dx4 + dx1=5 + add dx4,dx1 + dx5=header + add dx5,size + if dx432008 then DXZHNotUp + sub NestingDepth,c1 + cend +.DXZHNotUp + return +;-------- +cif editor +.EditorCursorStuff + if Entryv1<>XZHbaseObjectNumber then DXZHNotBase +; flash current object ( selected by TAB) + add XZHSequenceNumber,c1 + if XZHSequenceNumber<>XZHCurrentItem then DXZHNotBase + if ybase<>CurrentYbase then dxzhNotBase + CurrentCellNumber=dv1 ; value of current item - for display on editor screen + CurrentX=dv2 + add CurrentX,PixelScrollX + CurrentZ=dv3 + CurrentH=dv4 + sub CurrentH,PixelScrollY + CurrentItemAddress=dx4 + sub CurrentItemAddress,c4 ; because dx4 was last byte of item. + + add XZHFlashCounter,c1 + if XZHFlashCounter=1 then DXZHNotBase + XZHFlashCounter=0 + dv1=0 ; prevent it displaying current item. + return + +.DXZHNotBase +; push MaxX +; push MinX +; push dv6 +; push XZHSequenceNumber +; XZHSequenceNumber=32000 ; prevent flashing things if CursorObject=ObjectNumber +; gosub @DisplayXZHCursor +; pop XZHSequenceNumber +; pop dv6 +; pop MinX +; pop MaxX + return +cend +;------ +.DrawObjectdv1 +; display dv1 directly from StructureBuffer +; starting from ScrollX,ScrollY blocks within the object (measured +; from the top left, as always) +; and dv6=0 for normal, -1 for LR reversed. + if dv1=NeoObjectNumber then @DONNeo + if dv132768 then DONNull ; -ve scroll + if y>32768 then DONNull ; -ve scroll + &dv1=StructureBuffer(dx4) + if dv1=0 then DONNull ;* + if dv1=32768 then DONNull + push dv2 ; x + push dv3 ; z + push dv4 ; h + push dv6 ; reflection flag + push dx4 + if dv1<32768 then DONRasterNotReflect + dx1=32768 + xor dv6,dx1 ; invert reflection flag + sub dv1,dx1 ; strip off reflection flag +.DONRasterNotReflect + gosub @DrawObjectdv1 ; display object dv1. MCNoClipSprite + pop dx4 + pop dv6 + pop dv4 + pop dv3 + pop dv2 +.DONNull + add dx4,c2 + dx1=16 + add dv2,dx1 ; x coord + if dv6=0 then DONNoReflect + sub dv2,dx1 ; x coords decrease in x reflection mode + sub dv2,dx1 + +.DONNoReflect + add x,c1 + if x>32768 then @DONXloop + if x32768 then @DONYLoop + if y32768 then @DONMapXloop + if x32768 then @DONMapYLoop + if yyclipMax then DONRMRet ; off window, or negative + &WordWS(WordCursorYPos)=dv3 ;x1 + v1=19 ; logical base in list 19 + v2=20 ; physical base in list 20 + gosub @MCCalcScreenAddressVec ; get List19 as current address +; plot an 8x4 pixel square + dx1=136 ; $10001000 + if ysize<3 then DON3 + dx1=170 ; $10101010 + if ysize<5 then DON3 + dx1=255 ; $11111111 +.DON3 + push dx1 + dx1=dv3 ; y coord in pixels (8x4 pels per block). + dx2=YRoomOffset + asr dx2 + asr dx2 + sub dx1,dx2 ; reduce y by offset used when it's displayed + if dx1>MapYPixels then DONOffCDMap + dx2=10 ; Multiply by 10 to give 20 words per line + gosub @MultDx1Dx2 + dx2=dv2 ; x coord in pixels + dx3=XRoomOffset + asr dx3 + sub dx2,dx3 ; reduce x by offset used when it's displayed + if dx2>MapXPixels then DONOffCDMap + asr dx2 ; /4 -> 0..160 (8x4s) => 0..40 per line (8x4 pels per block) + asr dx2 + add dx1,dx2 ; add on x blocks + dx2=65534 ; remove bottom bit + and dx1,dx2 + &Map(dx1)=ysize +.DONOffCDMap + pop dx1 + + list19(0)=dx1 + list19(160)=dx1 + if zsize=0 then @DON4Ret ; draw a thinner bar if 0 size. + list19(320)=dx1 + list19(480)=dx1 +; list19(640)=dx1 +; list19(800)=dx1 +; list19(960)=dx1 +; list19(1120)=dx1 + list20(0)=dx1 + list20(160)=dx1 + list20(320)=dx1 + list20(480)=dx1 +; list20(640)=dx1 +; list20(800)=dx1 +; list20(960)=dx1 +; list20(1120)=dx1 +.DON4Ret + return + + +cend + +;--- +;.DisplayAnimationFromMC +;; &dv1=longWs(Longdv1) +;; &dv2=longWs(Longdv2) +;; &dv3=longWs(Longdv3) +;; &dv4=longWs(Longdv4) +;; &dv5=longWs(Longdv5) +;; &dv6=longWs(Longdv6) +; &header=WordWS(WordAniHeader) +; &dv2=WordWS(WordX) +; &dv3=WordWS(WordZ) +; &dv4=WordWS(WordH) +; gosub @SetUpACB +; return +;--- +.DisplayAnimation +; display animation Object dv1 in text-form from +; start of current edit window (ScrollY) +; with the current edit line (CurrentAnimationY) highlighted. + cif Editor + if ACBSOnly=true then DARet ; ignore Ani objects + cend + gosub @SpecialSetUpAniObject + if dv1=0 then DARet + ObjectNumber=dv1 + gosub @FindAndDecode + cif Editor + if AniViewMode=0 then @TextDisplayAnimation + cend + gosub @SetUpACB ; PreviewAnimation + +.DARet + return +;------- +.DABug ;**** + break ;***** + return ;****** +;------- +.DisplayACBs +; display all Animation Control Blocks. + dv5=1 ; display as sprite. +.DisplayACBsdv5 + CurrentStore=ACBSortStart + if CurrentStore>ACBListSize then DABug ;**** + &ACBList(CurrentStore)=c0 ; indicate end of sorting list + +.DisplayACBs2 + gosub @PurgeACBs ; get rid of any acbs killed by other code - +; e.g. when people's animation sequence is changed, and the links +; have 7fff written to them by KillACBHeader. + +; GMJ 1/9/89 +cif BloodRelations +; display still people while in menu mode + if ACBStart<>ACBSearchStart then DisplayACBs3 + gosub @DisplayStillPeople +.DisplayACBs3 +cend + + + ACBHeader=ACBStart +.DisplayACBsLoop +;** cif Editor + ACBLoopBreaker=0 +;** cend + dv6=0 ; non-reversed ;20/12/89 + + cif LinkedForks + LinkNext=0 ; 11/May/90 + LinkNextShift=1 ; if a shift is done, link any linked forks to it + cend + + gosub @DisplayACB + dx1=ACBSize + add ACBHeader,dx1 + if ACBHeader32767 then CACL2 ; flag set up by KillACB + &ACBList(ACBHeader)=c0 + dx2=2 + add dx2,ACBHeader + if dx2>ACBlistSize then @DABug ;****** + &ACBList(dx2)=c0 ; kill SP as well, just in case acb is reanimated + +.CACL2 + + +; additions 28 august 1990 to try to fix "following arms" bug + dx2=LinkNextOffset + add dx2,ACBHeader + &dx3=ACBList(dx2) ; what is child? + &dx3=ACBList(dx3) ; is child alive? + if dx3=0 then CACL3 ; no - remove link to it + if dx3<>32767 then CACL4 +.CACL3 + if dx2>ACBListSize then @DABug ;****** + &ACBList(dx2)=c0 + +.CACL4 +; end of 28 august 1990 additions. + + + add ACBHeader,dx1 ; dx1 is still ACBSize + if ACBHeaderACBlistSize then @DABug ;***** + &ACBList(CurrentStore)=c0 ; indicate end of sorting list + + dv6=0 ; non-reversed + ACBHeader=ACBSize +.DisplaySPLoop +;; ACBLoopBreaker=0 + gosub @DisplayStillPerson + dx1=ACBSize + add ACBHeader,dx1 + if ACBHeader32010 then @DisplayStaticACB + add SP,ACBHeader ; make absolute + +.DisplayACB1 +;** cif Editor + add ACBLoopBreaker,c1 + if ACBLoopBreaker>20 then @RDARet +;** cend + + dx1=1 + and dx1,sp + if dx1<>0 then @RDAEmergencyKill ;***** why is this necessary? + + dx1=SP + &AA=ACBList(dx1) ; find AA at current stack position + add dx1,c2 + &CC=ACBList(dx1) ; find CC at current stack position + add dx1,c2 + &EE=ACBList(dx1) ; find EE at current stack position + + dv6=cc ; extract reversal status (top bit of count) >>Mike 23/9/89 + dx1=32767 ; $7fff + and cc,dx1 + dx1=32768 + and dv6,dx1 ; keep top bit only + + if AAACBStackStartMinus1 then RDAPop2 +; Nothing else to pop: terminate this ACB +.RDAKill + gosub @KillACBHeader + return + +.RDARet +; break ;**** +; dx1=StructureBuffer(AA) ;**** +; &dx1=ACBList(SP) ;*********** +.RDANull + return + +.RDAPopKill + pop dx1 + goto RDAKill + +.RDAEmergencyKill +; break ;********* leave in, but comment out please. + goto RDAKill + +.RDAPop2 + dx4=2 + add dx4,ACBHeader +; dx1=sp + sub sp,ACBHeader ; make it relative + if dx4>ACBListSize then @RDABug1 ;***** + &ACBList(dx4)=sp + add sp,ACBHeader ; make it absolute again + goto @DisplayACB1 ; try again - with the caller of this routine +;--- +.RDABUg1 ;******** + break ;******** + return ;********* +.RDABUg2 ;******** + break ;******** + return ;********* +.RDABUg3 ;******** + break ;******** + return ;********* +.RDABUg4 ;******** + break ;******** + return ;********* +.RDABUg5 ;******** + break ;******** + return ;********* +.RDABUg6 ;******** + break ;******** + return ;********* +.RDABUg7 ;******** + break ;******** + return ;********* +.RDABUg8 ;******** + break ;******** + return ;********* +.RDABUg9 ;******** + break ;******** + return ;********* +.RDABUg10 ;******** + break ;******** + return ;********* +.RDABUg11 ;******** + break ;******** + return ;********* +.RDABUg12 ;******** + break ;******** + return ;********* +.RDABUg13 ;******** + break ;******** + return ;********* +.RDABUg14 ;******** + break ;******** + return ;********* +.RDABUg15 ;******** + break ;******** + return ;********* +.RDABUg16 ;******** + break ;******** + return ;********* +.RDABUg17 ;******** + break ;******** + return ;********* +.RDABUg18 ;******** + break ;******** + return ;********* +;------- +.RDAOk + gosub @DecodeInstruction +; -> dx4=start of next instruction +; -> Opcode, x,z,h,num as the instruction to execute + if dx4>EE then @RDAReturn ; padding instruction at end. + if cc=24373 then SkipInstruction + if opcode=128 then NextInstruction ; repeating a repeat instruction + if cc<>0 then RDARepeat +.NextInstruction +; execute instruction once, then skip onto next. +; (In fact, let's skip onto next now) + if sp>ACBListSize then @RDABug2 ;******* + &ACBList(sp)=dx4 ; set up new pc + goto @DANoRepeat + +.SkipInstruction +;;break ;******* + if sp>ACBlistSize then @RDABug3 ;******* + &ACBList(sp)=dx4 ; set up new pc + dx1=2 + add dx1,sp + if dx1>ACBListSize then @RDABug4 ;****** + &ACBList(dx1)=dv6 ; zero repeat count so future instructions are done + goto @DisplayACB ; repeat it no times at all. + +.RDARepeat +; decrement repeat count + if cc=32767 then DANoRepeat ; repeat forever + dx1=2 + add dx1,sp + sub cc,c1 + dx2=cc ;>>Mike 23/9/89 + or dx2,dv6 + if dx1>ACBListSize then @RDABUg5 ;****** + &ACBList(dx1)=dx2 ; cc + +.DANoRepeat +; execute instruction @ StructureBuffer(AA). +;; gosub @DecodeInstruction + if Opcode<>192 then @RDANotFork + if num=0 then @RDANull + ObjectNumber=num + gosub @GetObjectType + if ObjectNumberType<>AnimationType then @RDANotFork2 + + + gosub @FindAndDecode + dx4=32000 ; dummy dx4, just in case it's a static acb +; (To stop the instant display code below doing anything nasty ) + + gosub @SetUpACB0 ; just display it, don't step on ani or anything. + +cif LinkedForks + if LinkNext=0 then DAForkNoLink ; 11may1990 + LinkNext=dx4 ; acb we just set up + + dx1=LinkNextOffset + add dx1,ACBHeader + if dx1>ACBListSize then @RDABUg6 ;******** + &ACBList(dx1)=LinkNext ; either 0, or the acb we're linking to this +; one. + LinkNext=0 ;11may 1990 +.DAForkNoLink +cend ; LinkedForks + +; we have just set up acb dx4. If we're not going to do so this +; turn, do it now. + gosub @SpecialSetUpFork ; setting up animation object OBJECTNUMBER +; in ACB dx4, coords dv2..dv4 +; requested by ACB ACBHeader + + if dx4>ACBHeader then NotInstantDisplay + push ACBHeader + ACBHeader=dx4 + gosub @DisplayACB + pop ACBHeader + +.NotInstantDisplay + + goto @DisplayACB ; display next frame of parent as well + +.RDANotFork2 + return +;--- +.RDANotFork + if Opcode<>0 then @RDANotDisplay + if num=0 then @RDANull + if num<>16383 then RDANotFlip +; flip xreflection + dx2=32768 + xor dx2,dv6 + dx1=2 + add dx1,sp + if dx1>ACBListSize then @RDABug7 ;******* + &ACBList(dx1)=dx2 ; dv6 + goto @DisplayACB +;--- +.RDANotFlip + +cif LinkedForks + if num<>16381 then RDANotUnlinkedShift +; next shift will not affect links + LinkNextShift=0 + goto RDALNextACB + +.RDANotUnlinkedShift + if num<>16382 then RDANotLinkNext +; kill any pre-existing linked fork + push ACBHeader + dx1=LinkNextOffset + add dx1,ACBHeader + &ACBHeader=ACBList(dx1) ; either 0, or the acb we're linking to this + if ACBHeader=0 then RDALinkIt + gosub @KillACBHeader +.RDALinkIt + pop ACBHeader + + LinkNext=1 ; if next instruction is a fork, make it linked +.RDALNextACB + goto @DisplayACB + +.RDANotLinkNext +cend + + + ObjectNumber=num + gosub @GetObjectType + if ObjectNumberType<>AnimationType then @RDANotAni +; if numACBStackStart then RDANoBug2 ;**** +; gosub @SuspendTaskSwap ;**** +; break ;**** +; gosub @ResumeTaskSwap ;***** +; +;.RDANoBug2 +push sp + dx2=2 + add dx2,ACBHeader + dx1=sp + sub dx1,ACBHeader ; make sp relative + if dx1>ACBStackEnd then @RDAPopKill + if dx2>ACBlistSize then @RDABug8 ;******* + &ACBList(dx2)=dx1 ; set up new sp + gosub @FindObjectNumber +; AA CC EE Stack entries + dx2=4 + add dx2,header ; skip over header + if sp>ACBListSize then @RDABUg9 ;******* + &ACBList(sp)=dx2 + add sp,c2 + &ACBList(sp)=dv6 ; zero count, including reversal flag. c0 ; single execution of next instruction + add sp,c2 + &dx1=StructureBuffer(header) + add dx1,header + &ACBList(sp)=dx1 ; end of object +pop sp ; new sp + goto @DisplayACB1 ; display it immediately + +.RDANotAni +; Store request to draw object num at coords dv2,dv3,dv4 +; dx1=ACBRasterOffset +; add dx1,ACBHeader +; &dx1=ACBList(dx1) + push dv1 + gosub @SpecialAniObject + pop dv1 + if num=0 then @SADORet + +.StoreNum + dx1=62 + add dx1,ACBHeader + &ACBlist(dx1)=num ; store frame being used. + + dx1=ACBRasterOffset + add dx1,ACBHeader + &dx1=ACBList(dx1) + + add CurrentStore,c2 ; skip link ptr + if CurrentStore>ACBListSize then @RDABug10 ;******* + &ACBList(CurrentStore)=dv3 ; store z coord first, for easy sorting + add CurrentStore,c2 + &ACBList(CurrentStore)=dv2 ; x coord + add CurrentStore,c2 + &ACBList(CurrentStore)=dv4 ; h coord + add CurrentStore,c2 + &ACBList(CurrentStore)=num ; object to draw + add CurrentStore,c2 + &ACBList(CurrentStore)=dv6 ; reversal flag + add CurrentStore,c2 + &ACBList(CurrentStore)=dx1 ; raster offset + add CurrentStore,c2 + &ACBList(CurrentStore)=c0 ; zero to indicate new end of list +.SADORet + return + +.SortAndDisplayObjects +; given the complete list, ACBList(ACBSortStart..CurrentStore), +; sort it and display from the back, working forwards. +; Format of each entry is: +; ACBList(CurrentStore+0)=link ptr for sort. +; ACBList(CurrentStore+2)=z coord +; ACBList(CurrentStore+4)=x coord +; ACBList(CurrentStore+6)=h coord +; ACBList(CurrentStore+8)=number of object to plot. +; ACBList(CurrentStore+10)=reflection flag to be used +; ACBList(CurrentStore+12)=RasterOffset + dv5=1 ; only every display as sprites... + +.SortAndDisplaydV5 +; A linked list sort... + dx6=ACBSortStart ; start of current linked list. + dx5=14 ; size of each entry + dx4=ACBSortStart; current entry we're examining + if CurrentStore=dx4 then SADORet ; nothing to display +.LLSort1 + add dx4,c2 + &dx1=ACBList(dx4) ; dx1:=z coord + sub dx4,c2 + gosub @AddToLL + add dx4,dx5 + if dx40 then @LLDisplayLoop + return + +.AddToLL +; find where in current linked list: ACBList(dx6) we +; should add the object ACBList(dx4), which has z coord dx1, +; and do it. + dx3=dx6 + add dx3,c2 ; move on to z coord + &dx2=ACBList(dx3) ; get z coord of first item in linked list. + if dx1ACBListSize then SortBug ;****** + &ACBList(dx4)=dx3 ; entry in list which follows this one + if dx6>ACBListSize then SortBug ;****** + &ACBList(dx6)=dx4 ; entry in list which preceeds this one +.AddInEnd + pop dx6 ; get back the start of the Linked list + return + +.SortBug ;**** + break ;****** + return ;****** +;--- +.AddToStart + dx1=dx6 ; old start of linked list + dx6=dx4 + if dx6=dx1 then ATS1 ; first entry to be put in an empty LL will +; always go wrong unless we do this. + if dx6>ACBListSize then SortBug ;****** + &ACBList(dx6)=dx1 ; point to old start of linked list. +.ATS1 + return +;--- +.RDANotDisplay + if Opcode<>64 then @RDANotShift +; 01HHHHHH XXXXXXXX ZZZZZZZZ = shift base for current object. (pixels) +; x,z,h are treated as signed bytes + dx1=x + gosub @SignExtenddx1 + push dx1 ; push x + dx1=z + gosub @SignExtenddx1 + push dx1 ; push z + dx1=h + gosub @SignExtend6Bitdx1 + dx4=dx1 ; h speed + pop dx3 ; z speed + pop dx2 ; x speed + gosub @DoShift + + goto @DisplayACB + +.RDANotShift + if Opcode<>128 then @RDANotRepeat +; 10RNNNNN = If R=0, repeat next instruction N times +; R=1, repeat next until 5bit random>N +; change ACBList(SP+2) to reflect desired count + if dv5=MarkPreload then @RDANotRepeat ; preload - do once only. + + dx1=2 + add dx1,sp + dx2=32767 ; signify repeat forever + if num=0 then @DARepeatDx2 + + add num,c1 ; repeat goes 2..16, not 1..15 (0=forever) + if num<17 then RDANotRandom +; 17 is lowest value that comes here for random. +; -> we want that to translate to "do never" + dx2=18 + sub num,dx2 ; makes num negative for 17 +code - + random x2 +code + + asr x2 + asr x2 + asr x2 + asr x2 +; have random 0..15 + sub num,x2 + if num<32000 then GotRandomRepeat +; skip next instruction... + dx2=24373 ; skip next instruction + goto DARepeatDX2 + +.GotRandomRepeat +.RDANotRandom +; add on to existing count + &dx2=ACBList(dx1) + add dx2,num +.DARepeatDx2 + or dx2,dv6 + if dx1>ACBListSize then @RDABug11 ;***** + &ACBList(dx1)=dx2 ; num + goto @DisplayACB ; execute the instruction to be repeated + +.RDANotRepeat + return +;---- +.DecodeInstruction +; For instruction StructureBuffer(AA), return +; dx4=address of next instruction +; and opcode, x, z, h, num as the instruction + dx4=AA + opcode=StructureBuffer(AA) + dx1=opcode ; save number + dx2=192 + and opcode,dx2 +; now opcode=one of: +; 00NNNNNN NNNNNNNN = DISPLAY object N +; 01HHHHHH XXXXXXXX ZZZZZZZZ = shift base for current object. (pixels) +; 10RNNNNN = If R=0, repeat next instruction N times +; R=1, repeat next until 5bit random>N +; 11NNNNNN = fork (start new animation object +; in addition to existing one) + + if opcode=192 then DIDisplay + if opcode<>0 then @DINotDisplay +.DIDisplay +; dx2=256 +; gosub @Multdx1dx2 ; high byte of num + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + add dx1,dx1 + + num=dx1 + add dx4,c1 + dx1=StructureBuffer(dx4) + add num,dx1 + add dx4,c1 +push dx1 ; I'm not sure if this is necessary or not. + dx1=16383 ; $3fff + and num,dx1 ; remove opcode (for Fork opcode) +pop dx1 +; dx1=StructureBuffer(dx4) +; h=15 +; and h,dx1 +; dx2=16 +; gosub @Divdx1dx2 +; x=dx1 +; add dx4,c1 ; skip on to next instruction +; z=0 ; no z offset generated by this instruction + return +; +.DINotDisplay + if opcode<>64 then DINotShift +; 01HHHHHH XXXXXXXX ZZZZZZZZ = shift base for current object. (pixels) + h=63 + and h,dx1 + add dx4,c1 + x=StructureBuffer(dx4) + add dx4,c1 + z=StructureBuffer(dx4) + add dx4,c1 + return +; +.DINotShift + if opcode<>128 then DINotRepeat +; 10RNNNNN = If R=0, repeat next instruction N times +; R=1, repeat next until 5bit random>N + num=63 + and num,dx1 + add dx4,c1 + return +; +;code - +; prs " bad instruction: " ;******* +;code + +.DINotRepeat +;;break ; test code + add dx4,c1 ; prevent loops and sim if we get a bad instruction. + return + +;-------- +.NewACB +.SetUpACBdv1 + ObjectNumber=dv1 + gosub @FindAndDecode + +.SetUpACB +; Given dv1=Object, dv2=x, dv3=z, dv4=h, dv5=placement type: +; and header as start of Object +; Set up an ACB of the form: +; ** dv1 (object number) +; ** SP ------------------------- (relative to itself) +; ** x (pixels) } | +; ** z (pixels) } current base coords for this ani object. +; ** h (pixels) } | +; (Other stuff, depending on value of ACBStackStart in +; the rest of the program) | +; | +; AA CC EE Stack entries | +; AA CC EE | +; AA CC EE <---- +; AA: AA= address of opcode to execute next, +; And CC=Repeat Count for current repeat operation +; Each time executed, decrements+does instruction. +; If (after decrement) CC=0, we +; move AA on to next instruction: i.e. treated as a PC. +; Then execute the instruction at the original value of AA. +; Essentially, CC is the number of EXTRA times to +; repeat the next instruction: i.e. to execute it once, CC=0 +; to execute it twice, CC=1 etc. +; EE: is address of first byte after current object. +; Also, return ACBList(dx4) as the ACB set up. +; if dv1ACBListSize then SGBARet ;19 Jan 1991 +; change 28 August 1990 to try to fix "Flashing body" bug + push dx4 + push acbheader + ACBHeader=dx4 + gosub @KillACBHeader + pop ACBHeader + pop dx4 +; end of 28 August 1990. + gosub @SpecialSetUpACB +push dx4 + add dx4,c4 ; skip over sp + if dx4>ACBListSize then @RDABug12 ;***** + &ACBList(dx4)=dv2 ; x + add dx4,c2 + &ACBList(dx4)=dv3 ; z + add dx4,c2 + &ACBList(dx4)=dv4 ; h + add dx4,c2 + &ACBList(dx4)=RasterOffset ; ACBList(ACBRasterOffset) +pop dx4 + +cif LinkedForks + dx1=LinkNextOffset + add dx1,dx4 + if dx1>ACBlistSize then @RDABug13 ;****** + &ACBList(dx1)=c0 ; no links from this acb +cend + +.SUAChangeACB +; change acb dx4 without altering coordinates etc. +; DOES NOT CHANGE RASTER OFFSET EITHER + if dx4>ACBlistSize then @RDABug14 ;******* + &ACBList(dx4)=dv1 ; poke in object number + add dx4,c2 + dx1=ACBStackStart + &ACBList(dx4)=dx1 ; ptr to "sp" + sub dx4,c2 + +;;&*&*& Change requested by Graham: 19/7/89 +; cif NotEditor +; object=dx4 +; asr object +; asr object +; asr object +; asr object +; asr object +; asr object +; dx1=ACBObjectOffset +; add dx1,dx4 +; &ACBList(dx1)=object +; cend +;;&*&*& + + +push dx4 + dx1=ACBStackStart + add dx4,dx1 ; x4:=start of stack area. + dx1=4 + add dx1,header + if dx4>ACBlistSize then @RDABUg15 ;******* + &ACBList(dx4)=dx1 ; PC within ani object + add dx4,c2 + dx1=32768 ; only keep reversal flag + and dv6,dx1 + if dx4>ACBlistSize then @RDABUg16 ;******* + &ACBList(dx4)=dv6 ; zero count - top bit is reversal status. >>Mike 23/9/89 + add dx4,c2 + &dx1=StructureBuffer(header) + add dx1,header + if dx4>ACBlistSize then @RDABUg17 ;******* + &ACBList(dx4)=dx1 ; first byte outside current object +pop dx4 + + if dv1MinCell then SUS1 ; static acb + +.SetUpACb1Ret + return +;--- +.SetUpStaticACBdx4 + gosub @SUAGotBlankACB +; goto @SUS1 +; +;.SetUpStaticACB +;; set up an ACB for a non-animation object - i.e. +;; an object which will remain still, such as a person. +;; (Though it may be moved around by special-case code). +;; Thus it is effectively used as a sprite control block. +;push dv1 +; gosub @SetUpACB1 +;pop dv1 +.SUS1 +push dx4 + if dx4>ACBlistSize then @RDABUg18 ;******* + &ACBList(dx4)=dv1 + add dx4,c2 + dx1=34000 ; make sure SP=ACBHeader+dx1 is negative. + &ACBList(dx4)=dx1 ; flags it as negative + dx1=ACBRasterOffset + add dx1,dx4 + &ACBList(dx1)=RasterOffset +pop dx4 +.DSBRet + return +;--- +;------- +.DisplayStaticACB +; have an ACB to display some object at coords dv2,dv3,dv4 +; &v1=ACBList(ACBHeader) ; dx4) +; v2=dv2 +; v3=dv3 +; v4=dv4 +; v5=dv5 +; v6=dv6 +; goto @MCDrawObjectv1 + &num=ACBList(ACBHeader) + if num=32767 then DSBRet ; ACB has been flagged for execution +; at the end of this DisplayACBs cycle. +; dx1=0 ; raster offset=0 + goto @StoreNum +;------ + +;-- +cif editor +code - + prs " FindObjectNumber. " +code + +cend +;--- +.FindAndDecode + gosub @FindObjectNumber + goto @DecodeHeader +;--- +.FindObjectNumber +; return Header=offset of ObjectNumber within StructureBuffer +; goto @FON6 +; + gosub @GetObjectType + dx1=32767 ; strip off reflection flag + and ObjectNumber,dx1 + if ObjectNumber=0 then @FON6 + if ObjectNumber>MinCompressed then @FON6 +;;; goto @FON6 ;*************** +cif Editor + if StructuresChanged=true then @FON6 + if SafeMode<>false then @FON6 +cend + push v1 + push v2 + push v3 + v1=ObjectNumber ; object to find + v2=StructureBufferList ; list containing structure buffer + gosub @MCFindObj +; v3 is offset within structure buffer + header=v3 + dresult=true + pop v3 + pop v2 + pop v1 + return +;--- +.FON6 +cif Editor + if ObjectNumber>MinCell then @FONEndOfBuffer + LastHeader=65535 ; dummy value for error-trapping +;; StartStructureBuffer=32 + if ObjectNumber=0 then @FONEndOfBuffer ; not found +cend + + Header=StartStructureBuffer + return ; must not have this code for release game! +; because it causes a major slowdown if ObjectNUmber 0 is plotted - +; and it seems to be from time to time! + + +cif Editor + dx2=1 ; current object number + +.FON1 + push dx1 + push dx4 + dx1=1 ;test code + and dx1,header + if dx1=0 then @FONHeaderOk + dx1=65534 + and header,dx1 ; make it even + goto @FONError + +.FONHeaderOk + pop dx4 + pop dx1 +;;cend + + &dx1=StructureBuffer(Header) + +;; cif Editor +; check validity of pointer + push dx1 + push dx4 + if AniViewMode=1 then @fonOk ; skip checking in preview mode. + if SafeMode=false then @fonOk ; skip checking +; if dx1<4 then fonError + if dx1>32000 then fonError ; don't allow backwards pointers. + dx4=1 ;test code + and dx4,dx1 + if dx4=0 then @FONOk +.fonError + if IgnoreErrors>5000 then fonE2 + sub IgnoreErrors,c1 + goto @FONExit + +.fonE2 +push dx1 +push dx4 + gosub @SetUpPhysicalTextPtr + &WordWS(WordCursorYPos)=c0 + RealCr=true + dx4=LastHeader +code - + prs " A major error has been detected at " + message cr + prs " offset " + print header + prs " ptr=" + print dx1 + prs " Last header=" + print dx4 ; = LastHeader + message cr + prs " within the structure file. " + message cr + prs " The system may possibly crash. " + message cr + prs " Hit panic or any key. " + message cr + prs " Press esc to truncate structure file." + message cr + prs " Press '1' to ignore next 100 errors. " + message cr + prs " Press '2' to ignore next 5000 errors. " + message cr + prs " Press '3' to break. " +code + + pop dx4 + pop dx1 + RealCr=false + gosub @WaitKey + if v2=1 then @FONTruncate + if v2<>2 then fonNotIgnore ;'1' + IgnoreErrors=100 + goto @FONExit + +.fonNotIgnore + if v2<>3 then fonNotIgnore2 ;'2' + IgnoreErrors=4999 + goto @FONExit + +.fonNotIgnore2 + if v2<>4 then fonNotBreak ;'3' + break ; leave in, please + push LastHeader + pop LastHeader + push header + pop header + goto @FONExit + +.fonNotBreak + &dx1=StructureBuffer(Header) + dx4=65534 ; remove bottom bit + and dx1,dx4 ; attempt to correct tree + if dx1>3 then FONNotTooSmall + dx1=4 + +.FONNotTooSmall + &StructureBuffer(header)=dx1 + pop dx4 + pop dx1 + goto @fonEndOfBuffer ; and recover gracefully + +.FONTruncate + dx1=1024 + + push header +.FONT1 + dx4=65534 + and header,dx4 + &StructureBuffer(header)=c0 + add header,c2 + and dx1,dx4 + if dx1>0 then FONT1 + pop header + +.FONExit +;;cif editor + LastHeader=header +;;cend + dx1=65534 + and header,dx1 + pop dx4 + pop dx1 + goto fonEndOfBuffer ; and recover gracefully + +.fonOk + pop dx4 + pop dx1 +;; cend + + if dx1=0 then FONEndOfBuffer + if dx2=ObjectNumber then FONFound + add dx2,c1 ; increment object number + add Header,dx1 + goto @FON1 + +.FONFound + dresult=true + return + +.FONEndOfBuffer + dresult=false ; not found + return + + + cend ;Editor - FON code not needed. +;--- +;-- +.DecodeHeader +; decode header at Header + dx4=Header + &Size=StructureBuffer(dx4) + add dx4,c2 + xsize=StructureBuffer(dx4) + add dx4,c1 + zsize=StructureBuffer(dx4) +; now calculate ysize (only valid for raster objects) + dx1=size + sub dx1,c4 +; halve size (word-based table), then divide it by xsize to give ysize + if size=0 then dhNullObject + dx2=xsize + add dx2,dx2 + gosub @Divdx1dx2 + ysize=dx1 + return + +.dhNullObject +; blank object + ysize=0 + return +;--- + cif editor +.MultdX1dx2 +; dx1=dx1*dx2 + dx3=dx1 + if dx2=0 then Multdx1dx2Zero + if dx2=1 then Multdx1dx2Ret +.Multdx1dx2Loop + add dx1,dx3 + sub dx2,c1 + if dx2>1 then Multdx1dx2Loop +.Multdx1dx2Ret + return +.Multdx1dx2Zero + dx1=0 + return + cend +;--- +.SignExtenddX1 +; dX1 contains a byte: sign-extend to a full word + dx2=255 + and dx1,dx2 + if dx1<128 then SignExtenddRet + dx2=65280 ; 65536-256 + add dx1,dx2 +.SignExtenddRet + return +;--- +;--- +.SignExtend6Bitdx1 +; dx1 contains a 6-bit number: sign-extend to a full word + dx2=63 + and dx1,dx2 + if dx1<32 then SignExtendd6Ret + dx2=65472 ; 65536-64 + add dx1,dx2 +.SignExtendd6Ret + return +;---- +;.Divdx1dx2 +;; dx1:=dx1/dx2 +; dx3=65535 ; result = 0 if dx2>dx1 +;.DivdLoop +; add dx3,c1 +; sub dx1,dx2 +; if dx1<50000 then DivdLoop +; dx1=dx3 +; return +;;--- + +.DivdX1dX2 +; dx1:=dx1 div dx2 + dx3=0 ; result + if dx2=0 then DivdX1dX2End +.DivdX1dX2a + sub dx1,dx2 + if dx1>32011 then DivdX1dX2End + add dx3,c1 + goto DivdX1dX2a + +.DivdX1dX2End + dx1=dx3 + return +;---- + cif Editor +.ExtractMap +; extract map from the "generated" raster object dv1 +push ObjectNumber + ObjectNUmber=dv1 + gosub @FindAndDecode +pop ObjectNumber + + dv1=4 + add dv1,header ; read ptr within StructureBuffer() + dv3=size + add dv3,header ; dv3=end ptr within StructureBuffer() + dv2=0 ; write ptr within Map() +.EMLoop + &dx1=StructureBuffer(dv1) + dx6=15 + dx5=15 + dx4=15 + dx3=15 + and dx6,dx1 + asr dx1 + asr dx1 + asr dx1 + asr dx1 + and dx5,dx1 + asr dx1 + asr dx1 + asr dx1 + asr dx1 + and dx4,dx1 + asr dx1 + asr dx1 + asr dx1 + asr dx1 + and dx3,dx1 +; now dx3,dx4,dx5,dx6 are leftmost..rightmost cells within +; this block + if dv2>1000 then @EMExit + &Map(dv2)=dx3 + add dv2,c2 + &Map(dv2)=dx4 + add dv2,c2 + &Map(dv2)=dx5 + add dv2,c2 + &Map(dv2)=dx6 + add dv2,c2 + add dv1,c2 + if dv1ACBlistSize then @SASBug ;****** + &ACBList(dx1)=dv3 + add dx1,c2 + &ACBList(dx1)=dv4 + +cif LinkedForks + dx1=LinkNextOffset + add dx1,ACBHeader + &dx1=ACBList(dx1) ; either 0, or the acb we're linking to this + if dx1=0 then @ShiftNotLinked + if LinkNextShift=0 then @ShiftNotLinked ; object 16381 done recently +; a linked object - do the shift for that as well + push ACBHeader +; don't need to save dv2-dv4 as we jump back to DisplayACB +; after this. + ACBHeader=dx1 + add dx1,c4 ; skip parent num+SP + &dv2=ACBList(dx1) + add dx1,c2 + &dv3=ACBList(dx1) + add dx1,c2 + &dv4=ACBList(dx1) + add dx1,c2 + gosub @DoShift1 ; recurse + pop ACBHeader +.ShiftNotLinked + LinkNextShift=1 ; next shift will be linked +cend ; LinkedForks + + return +;----- +.vKillACBHeader + push ACBHeader + gosub @SpecialACBKilled + dx1=32767 ; mark this acb as being killed, but not yet available + + &ACBList(ACBHeader)=dx1 +; dx1=2 +; add dx1,ACBHeader +; &ACBList(dx1)=c0 ; kill SP as well, just in case acb is reanimated + +cif LinkedForks + dx1=LinkNextOffset + add dx1,ACBHeader + &ACBHeader=ACBList(dx1) ; either 0, or the acb we're linking to this + if dx1>ACBListSize then @SASBug ;******* + &ACBList(dx1)=c0 ; kill pointer to child + if ACBHeader=0 then KACH1 + gosub @KillACBHeader ; recurse +cend + +.KACH1 + pop ACBHeader + return +;----- diff --git a/l9dev/regress/games.l9/billy.l9/duel.txt b/l9dev/regress/games.l9/billy.l9/duel.txt new file mode 100644 index 0000000..ada237b --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/duel.txt @@ -0,0 +1,207 @@ +;--------------------------Duel Code -----------------------------; + begin + +.Duel +.Theduel + if GameOverTimer=0 then DuelNotEnding + sub GameOverTimer,c1 + if GameOverTimer=0 then @DuelGameOver + +.DuelNotEnding +; in case the initialisation wait went wrong, keep sending +; signal that the duel has started + v1=CommsDuelReady + gosub @SendPadding ; send v1 several times because receiver waits till +; several bytes have been received before processing them + + gosub @sGetControls + if duelstatus<4 then notfourthstage ;<> Mike 19 dec 90 + if duelStatus>6 then NotFourthStage ; started to die. +;duelstatus=4 is in process of draw + gosub @fourthstage +;; goto duelend + +.NotFourthStage + if duelstatus<>7 then notdying + dx4=fighteracb + if playergundrawn<>0 then gunfall + v1=0 + gosub @PlaySample + objectnumber=6 + add ObjectNumber,DuelPlayerBase ; 3756 + goto setupdyingplayer +.GunFall + objectnumber=4 + add ObjectNumber,DuelPlayerBase ; 3754 +.SetupDyingPLayer + Won=false + gosub @changeacbdx4 + GameOverTimer=20 ; time till we terminate + duelstatus=8 + +.NotDying + if duelstatus<>3 then notthirdstage + gosub @thirdstage + goto duelend + +;duelstatus=2 is waiting for bell + +.NotThirdStage +; if duelstatus<>1 then notsecondstage +; gosub @secondstage ; press fire to set up bell +; goto duelend +; +;.NotSecondStage ; look for draw (up key) + if duelstatus<>0 then notfirststage + gosub @setupfigures ; set up duel figures + gosub @SecondStage ; set up delayed bell + v4=DuelSamples + gosub @LoadSamplesForGame +; if TwoPlayerMode=false then NotInitTwoPlayerDuel +; if EnemyName>2 then NotInitTwoPlayerDuel +; if EnemyName<1 then NotInitTwoPlayerDuel +; gosub @InitTwoPlayerDuel + + +.NotInitTwoPlayerDuel +.NotFirststage +.duelend + return +;---------------- +.DuelGameOver + if Won=false then LoseDuel + + if EnemyName<>255 then @WinGame ; won final conflict + + m1=PlayersName + m2=101 ; win duel + gosub @DisplayInstructionsM1M2 + add PlayerReputation,c16 + PlayingDuel=0 + DuelStatus=0 + goto @BackToWalkabout ; ReturnToMap + +.LoseDuel + if EnemyName<>255 then @LoseGame ; lose final conflict + m1=PlayersName + m2=102 ; lose duel + gosub @DisplayInstructionsM1M2 + gosub @DisplayNursingPicture + PlayingDuel=0 + DuelStatus=0 + goto @ReturnToMap + +;--------------- +.SetupFigures + objectnumber=0 + add ObjectNumber,DuelOpponentBase ; 3700 + dv2=opponentx + dv3=opponentz + dv4=opponenth + dv5=1 + dv6=0 + gosub @StartFreeACB + enemyacb=dx4 + + objectnumber=0 + add ObjectNumber,DuelPlayerBase ; 3750 + dv2=Startplayerx + dv3=Startplayerz + dv4=startplayerh + dv5=1 + dv6=0 + gosub @StartFreeACB + fighteracb=dx4 + duelstatus=1 + CrossHairACB=0 ; ensure cross hair is not visible + EnemyStatus=0 ; enemy not killed yet + + if TwoPlayerMode=false then SUFigRet + if EnemyName=Billy then SUFWait + if EnemyName<>Pat then SUFigRet +; two-player mode, final duel. Wait for other computer +; to be ready. +.SUFWait + v2=3 ; send ready byte this many times + +.SUFWait2 + v1=CommsDuelReady + gosub @SendPadding ; send v1 several times because receiver waits till +; several bytes have been received before processing them + if v1<>CommsDuelReady then SUFWait +; read again, to make sure it's not just a stray byte... + gosub @ReadSerial + if v1<>CommsDuelReady then SUFWait + +.SUFigRet + return +;------------ +.secondstage +;;if fire key pressed, then setup bell ring +; if FireKey=0 then NoStart +; if FireKeyChange=0 then NoStart +; then setup bell to ring after a delay + x1=32 + objectnumber=bellani + dv1=objectnumber + dv2=Startplayerx + dv3=Startplayerz + dv4=startplayerh + add dv4,x1 + x1=16 + add dv4,x1 + add dv2,x1 + dv5=1 + dv6=0 + gosub @StartFreeACB + duelstatus=2 + +.NoStart + return +;---------- +.ThirdStage + if UpKey<>0 then ThirdS2 + if FireKey=0 then @nodraw + if FireKeyChange=0 then @NoDraw + v1=0 + gosub @PlaySample + +.ThirdS2 + if EnemyName=255 then TSDontNotify + v1=CommsIveDrawn + gosub @SendPadding ; send v1 several times because receiver waits till +; several bytes have been received before processing them + +.TSDontNotify + duelstatus=4 + if CrossHairACB<>0 then NoDraw + ObjectNumber=1 + add ObjectNumber,DuelPlayerBase ; 3751 ;draw + dx4=fighterACB + gosub @ChangeACBdx4 + playergundrawn=1 + Rasteroffset=0 + objectnumber=crosshairani + dv1=objectnumber + dv2=startcrossx + dv3=startcrossz + dv4=startcrossh + dv5=1 + dv6=0 + gosub @startfreeacb + crosshairacb=dx4 + +.Nodraw + return +;------------ +.FourthStage + dx4=crosshairacb + gosub @readacbdx4 + cursorx=dv2 + cursory=dv3 + sub cursory,dv4 + + gosub @checkcursor + return + +;---------------------------end duel code -------------------------; diff --git a/l9dev/regress/games.l9/billy.l9/exit.txt b/l9dev/regress/games.l9/billy.l9/exit.txt new file mode 100644 index 0000000..8463fd1 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/exit.txt @@ -0,0 +1,583 @@ +; Dummy Exits File for Hero +; +; EXIT.TXT, data for the game exits. The numeric values for the +; directions is as follows: +; +; 1 up=9 in=11 cross=13 climb=14 jump=15 +; 8 2 down=10 +; ! +; 7 --+-- 3 +; ! +; 6 4 +; 5 +; +; Room 1 - Santa Fe Undertaker +1000 0 0 + +; Room 2 - bank +1000 0 0 + +; Room 3 - bank +1000 0 0 + +; Room 4 - bank +1000 0 0 + +; Room 5 - Santa Fe Wire Office +1000 0 0 + +; Room 6 - bank +1000 0 0 + +; Room 7 +1000 0 0 + +; Room 8 - Santa Fe News Office +1000 0 0 + +; Room 9 +1000 0 0 + +; Room 10 +1000 0 0 + +; Room 11 +1000 0 0 + +; Room 12 - Santa Fe Bank +1000 0 0 + +; Room 13 +1000 0 0 + +; Room 14 +1000 0 0 + +; Room 15 +1000 0 0 + +; Room 16 +1000 0 0 + +; Room 17 +1000 0 0 + +; Room 18 +1000 0 0 + +; Room 19 +1000 0 0 + +; Room 20 +1000 0 0 + +; Room 21 +1000 0 0 + +; Room 22 +1000 0 0 + +; Room 23 +1000 0 0 + +; Room 24 +1000 0 0 + +; Room 25 +1000 0 0 + +; Room 26 +1000 0 0 + +; Room 27 +1000 0 0 + +; Room 28 +1000 0 0 + +; Room 29 +1000 0 0 + +; room 30 - Santa Fe +0001 1 1 ; to undertaker +0001 2 5 ; to wire +1001 3 31 ; to street + +; room 31 - Santa Fe +0001 5 36 ; to other street +0001 1 8 ; to news +0001 2 64 ; to store +1001 3 32 ; to street + +; room 32 - Santa Fe +0001 1 12 ; to bank +1001 3 33 ; to street + +; room 33 - Santa Fe +0001 1 160 ; to saloon +0001 2 0 ; to train station +1001 3 34 ; to street + +; room 34 - Santa Fe +0001 1 80 ; to jail Sheriff's office +0000 5 38 ; south to other street +1001 2 65 ; to store + +; room 35 - Santa Fe (Street 2) +0001 1 171 ; to saloon +1001 3 36 ; to street + +; room 36 - Santa Fe +0001 2 190 ; to courthouse CLOSED +1001 3 37 ; to street + +; room 37 - Santa Fe +0001 1 190 ; CLOSED +0001 2 190 ; CLOSED +1001 3 38 ; to street + +; room 38 - Santa Fe +0001 1 190 ; to other street +0001 2 34 ; to other street +1001 3 39 ; to street + +; room 39 - Santa Fe +1001 1 19 ; to livery stables + +; 40 +1000 0 0 + +; 41 +1000 0 0 +; 42 +1000 0 0 +; 43 +1000 0 0 +; 44 +1000 0 0 +; 45 +1000 0 0 +; 46 +1000 0 0 +; 47 +1000 0 0 +; 48 +1000 0 0 +; 49 +1000 0 0 + +; 50 - El Paso +0001 3 51 +0001 1 168 ; to saloon +1001 2 24 ; to doctors + +; 51 +0001 3 52 +0000 2 55 ; NE goes to other street +1001 1 66 ; to hotel + +; 52 +0001 3 53 +1001 1 13 ; to bank + +; 53 +0001 3 54 +0001 1 6 ; to telegraph office +1001 2 56 ; to other street + +; 54 +1001 1 20 ; to stable + +; 55 El Paso second street. +0001 3 56 +0000 5 51 ; south goes back to southern street +0001 1 167 ; to saloon +1001 2 60 ; to store + +; 56 +0001 3 57 +0001 2 81 ; to sheriff's office +0001 7 55 ; west to saloon/store +0000 5 53 ; south goes back to southern street +1001 1 9 ; to El Paso Sun + +; 57 +1001 1 2 ; to Undertakers + +; 58 +1000 0 0 + +; 59 unused +1000 0 0 + +; 60 store +1000 0 0 + +; 61 +1000 0 0 + +; 62 +1000 0 0 + +; 63 +1000 0 0 + +; 64 Store +1000 0 0 + +; 65 store Zang's (Santa Fe) +1000 0 0 + +; 66 hotel +1000 0 0 + +; 67 Not USED +1000 0 0 + +; 68 +1000 0 0 + +; 69 +1000 0 0 + +; 70 Roswell. +0001 3 71 +1001 1 82 ; to Sheriff's office + +; 71 +0001 3 72 +1001 1 3 ; to undertakers + +; 72 +0001 3 73 +0001 2 61 ; to hardware store +1001 1 173 ; 67 ; to hotel + +; 73 +0001 1 190 ; CLOSED. to post office +1000 0 0 + +; 74 +1000 0 0 + +; 75 +1000 0 0 + +; 76 +1000 0 0 + +; 77 +1000 0 0 + +; 78 +1000 0 0 + +; 79 +1000 0 0 + +; 80 Sheriff's Office (Santa Fe) +1000 0 0 + +; 81 Sheriff's Office (El Paso) +1000 0 0 + +; 82 Sheriff's Office (Roswell) +1000 0 0 + +; 83 Sheriff's Office (Lincoln City) +1000 0 0 + +; 84 Sheriff's Office (Mesilla) +1000 0 0 + +; 85 Sheriff's Office (White Oaks) +1000 0 0 + +; 86 +1000 0 0 + +; 87 +1000 0 0 + +; 88 +1000 0 0 + +; 89 +1000 0 0 + +; 90 +1000 0 0 + +; 91 +1000 0 0 + +; 92 +1000 0 0 + +; 93 +1000 0 0 + +; 94 +1000 0 0 + +; 95 +1000 0 0 + +; 96 +1000 0 0 + +; 97 +1000 0 0 + +; 98 +1000 0 0 + +; 99 +1000 0 0 + +; 100 Lincoln City +0001 7 21 ; to corral / Torreon? +0001 3 101 +1001 1 165 ; to saloon + +; 101 +0001 3 102 +1001 1 62 ; to store + +; 102 +0001 3 103 ; east along street +1001 1 83 ; to sheriff's office + +; 103 +0001 3 104 +1001 1 15 ; to bank + +; 104 +0001 3 105 +1001 1 69 ; to house + +; 105 +1000 1 190 ; CLOSED to courts/jail + +; 106 +1000 0 0 + +; 107 +1000 0 0 + +; 108 +1000 0 0 + +; 109 +1000 0 0 + +; 110 +1000 0 0 + +; 111 +1000 0 0 + +; 112 +1000 0 0 + +; 113 +1000 0 0 + +; 114 +1000 0 0 + +; 115 +1000 0 0 + +; 116 +1000 0 0 + +; 117 +1000 0 0 + +; 118 +1000 0 0 + +; 119 +1000 0 0 + +; 120 +1000 0 0 + +; 121 Mesilla +;; 0001 7 120 ; west to empty desert +0001 3 122 +1001 1 25 ; doctor's + +; 122 +0001 3 123 +1001 1 16 ; to bank + +; 123 +0001 3 124 +0000 2 191 ; NE goes to nowhere +1001 1 169 ; saloon + +; 124 +0000 2 191 ; goes nowhere +1001 1 190 ; CLOSED + +; 125 +1000 0 0 + +; 126 +1000 0 0 + +; 127 +1000 0 0 + +; 128 +1000 0 0 + +; 129 +1000 0 0 + +; 130 +1000 0 0 + +; 131 +1000 0 0 + +; 132 +1000 0 0 + +; 133 +1000 0 0 + +; 134 +1000 0 0 + +; 135 +1000 0 0 + +; 136 +1000 0 0 + +; 137 +1000 0 0 + +; 138 +1000 0 0 + +; 139 +1000 0 0 + +; 140 White Oaks +0001 3 141 +0001 5 142 ; to other street +1001 1 63 ; to store + +; 141 +1001 1 17 ; to bank + +; 142 +0001 3 143 +0000 2 140 ; NE to other street +1001 1 172 ; to saloon + +; 143 +0001 3 144 +1001 1 10 ; to news office + +; 144 +1001 1 22 ; to livery stables + +; 145 +1000 0 0 + +; 146 +1000 0 0 + +; 147 +1000 0 0 + +; 148 +1000 0 0 + +; 149 +1000 0 0 + +; 150 +1000 0 0 + +; 151 +1000 0 0 + +; 152 +1000 0 0 + +; 153 +1000 0 0 + +; 154 +1000 0 0 + +; 155 +1000 0 0 + +; 156 +1000 0 0 + +; 157 +1000 0 0 + +; 158 +1000 0 0 + +; 159 +1000 0 0 + +; 160 ; saloon right (Santa Fe 1) +1001 7 162 + +; 161 +1000 0 0 + +; 162 ; saloon left (Santa Fe 1) +1000 5 33 ; south back to street + +; 163 +1000 0 0 + +; 164 +1000 0 0 + +; 165 ; big single saloon in Lincoln City +1000 0 0 + +; 166 ; left El Paso 1 +1000 5 55 ; south back to street + +; 167 ; right El Paso 1 +1001 7 166 + +; 168 ; single El Paso 2 +1000 0 0 + +; 169 ; single Mesilla +1000 0 0 + +; 170 Left Santa Fe 2 +1000 5 35 ; south back to street + +; 171 Right Santa Fe 2 +1001 7 170 + +; 172 Single White Oaks +1000 0 0 + +; 173 Left Roswell +1001 5 72 ; south back to street + +; 174 Right Roswell +1001 7 173 + +1000 0 0 +0000 0 0 + + diff --git a/l9dev/regress/games.l9/billy.l9/fire.txt b/l9dev/regress/games.l9/billy.l9/fire.txt new file mode 100644 index 0000000..8c578df --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/fire.txt @@ -0,0 +1,937 @@ +begin +;-------------------------------------------------------- +; subroutines to fire gun and check for hits +;-------------------------------------------------------- +.Fire + if CurrentScreen<>GameMap then @FireNotGameMap +; v1=0 ; sample number in current game +; gosub @PlaySample +; if FireKeyChange=0 then @FireNotGameMap + + HorseScreen=0 ; will want to ride into town, if we visit there. +; pointing at a town/ranch etc. ? + gosub @HiresCD + if result=false then @GMNoFire ; no collision +; got it: at HiresTable(x1) ! + asr x1 + asr x1 + asr x1 + asr x1 + if x1=49 then @DisplaySystemMenu + Town=x1 ; standard location number of place to visit +; This will be used by several of the overlays - e.g. +; the scrolling games use it to decide which map number +; to use. + m1=500 + add m1,x1 + + if FireKeyChange=false then @FireNoChangeScreen + if TextBoxDisplayed=false then @FireNoChangeScreen +; Text box is already displayed, so must have pressed fire key again. + + push x1 ; place to visit + gosub @MaybeRandomMeeting + gosub @PutUpHourglass + pop x1 ; place to visit + + NextMeetingMenu=0 +; NextMeetingMessage=0 ; quick messages from player's second (Tom O'Foliard +;; or Barney Mason for Pat) + + MenuNumber=0 ; no 'forced' menu entry + m1=0 ; no 'forced' message - comes before first menu + gosub @CheckSubPlotVisits ; check any events which happen +; when visiting a place: returns m1 and menunumber +; non-zero if either is to be used. + if m1=0 then VisitNoText + push x1 + gosub @DisplayInstructions + m1=0 + pop x1 + +.VisitNoText +; This is the request to 'visit' the town whose box is displayed. +; Work out what screen change this requires, if any + &x2=ObjectTable(10) ; table giving screen numbers + add x2,x1 ; double byte-based table + add x2,x1 + v1=ObjectTable(x2) ; overlay letter to switch to. + add x2,c1 + v4=ObjectTable(x2) ; screen number within overlay. + + + if x1<10 then @FireStealCows ; cows + if x1<19 then @FireVisitPlace ; town + +; hide certain places when you visit them - because they have +; one-shot subplots. Mark in "hidden" table + if x1<31 then FVPNotHide + if x1>33 then FVPNotHide + dx1=SPHiddenOffset + add dx1,SubplotsOffset + &dx1=TownVarData(dx1) + add dx1,x1 + if dx1>TownVarDataSize then @TVD2Bug ;****** + TownVarData(dx1)=c1 + +.FVPNotHide + + Location=x1 + x2=ML ;=200 + add Location,x2 ; set up location to be 200+TOWN - this +; is the same format as used in "PeopleData" and elsewhere. +; (within town, location is the room number) + if x1<24 then @FireVisitPlace ; Fort + if x1<35 then @VisitRanch + if x1<39 then @FireVisitApache + if x1=39 then @TrainCheckGang ; @FireVisitPlace ; FireGotMenuNumber ; train + if x1=40 then @FireVisitPlace ; wagon train + if x1=48 then @FireVisitPlace ; prospector +; visit a gang + + if PlayersName=Pat then @FireVisitPlace ; FireGotMenuNumber +; Billy can go straight there - linking overlay, scene 14 + gosub @MarkGangAsKnown + + MenuNumber=150 ; visit again message: prints message 1858, quits + if x2=0 then FVG2 + MenuNumber=146 +.FVG2 + v4=14 ; cowboy picture (round campfire) + goto @CallLinkingOverlay + +.FireStealCows +; offer player choice of stealing them, or of +; taking them to the indians (If we've started that subplot) + x4=SPFBeefWanted + add x4,SubPlotFlags + x4=TownVarData(x4) + if x4=0 then @FireVisitPlace + if x4>200 then @FireVisitPlace + MenuNumber=138 ; take cows to indians? + +.FireGotMenuNumber + push x1 ; town to visit + push v1 ; overlay that will be needed + push v4 ; scene within overlay + gosub @PrettyMenu + pop v4 + pop v1 + pop x1 + if result=DoNothing then @GMNoFire ; 'do nothing' selected + if result=760 then @FireVisitPlace ; steal cows + if result<>164 then @FireNotTakeCowsToIndians + push v1 + v1=SPFBeefWanted + add v1,SubPlotFlags + v2=10 ; flag for taking cows to indians (read by SCROLL.TXT) + gosub @UpdateVarDataByte + pop v1 + goto @FireVisitPlace +;---------------- +.TVD2Bug ;****** + break ;****** + return ;******* +.FireVisitApache +; get Buckshot Roberts encounter? + if PlayersName<>Billy then @FireVisitPlace + x1=SPFBuckShotRoberts ; Billy ambushed by Buckshot? + add x1,SubPlotFlags + v2=TownVarData(x1) + if v2<>0 then @FireVisitPlace ; already happened + v1=x1 + v2=1 + gosub @UpdateVarDataByte ; being ambushed right now! + M1=1640 ; Buckshot roberts ambush + gosub @DisplayInstructions + Location=260 ; special code for Buckshot ambush + goto @SubPlotShootout + +; +;--------------- +.FireVisitPlaceM1M2 + push v1 + push v4 + gosub @DisplayInstructionsM1M2 + pop v4 + pop v1 + +.FireNotTakeCowsToIndians +.FireVisitPlace + PlayingDuel=false ; reset when ride into town, just in case. + if v4=0 then @FireNoChangeScreen + if v1<>CurrentAcode then NewScreenDifferentAcode ;'e' - town overlay + NewScreen=v4 + x1=400 ; base for rooms + add NewScreen,x1 + gosub @OpenTownStructures ; in case random sequence removed them. + return ; back to caller - will switch screen to visit town. + +.NewScreenDifferentAcode + if v1=52 then @FireGotoLinking ; to intermission screen + gosub @CallOverlayV1 ; call overlay, clearing sprites etc. as necessary. +.NSDARet + return +;---------------- +.TrainCheckGang + m1=0 + m2=26 ; instructions for Pat (do not mention robbery) + if PlayersName<>Billy then @FireVisitPlaceM1M2 + m1=25 ; train instructions +; gosub @CheckPlayerGang + if PlayerGang<>0 then @FireVisitPlaceM1M2 + m1=859 ; Billy did not have a gang + gosub @DisplayInstructions ; gosub, return + goto @ReturnToMap +;-=--------- +.CallLinkingOverlay +; goto a linking screen - involves a structure and sprites file +; switch +; dc.w LinkingSprites-IntroTables ; offset 70 +; dc.w LinkingStructures-IntroTables ; offset 72 +; dc.w IntroSprites-IntroTables ; offset 74 +; dc.w IntroStructures-IntroTables ; offset 76 +; Screen we want in linking screen is number v4 + PersonNumber=0 ; remove any person we may have been talking +; to beforehand +; Location=0 + +.FireGotoLinking + if v4>19 then FGL2 + if v4>15 then @LinkingPictureWait ; 16..19 are bordello etc., +; so do not have menus +.FGL2 + gosub @MCPurgeAllCells + gosub @OpenLinkingStructures + dv1=v4 ; 1=bank, 2=grave, 3=prospector, 6=fort. + goto @DisplayPlaceAndTalk +;------------ +.CheckSubPlotVisits +; visiting place x1 - should any subplot events happen +; immediately? + code - + v1=SPFAmbushDecision ; cleared whenever go into new town, + add v1,SubPlotFlags + v2=0 + gosub @iUpdateVarDataByte ; clear ambush decision flag + + + v1=SPFSickManOnHorse + add v1,SubPlotFlags + x3=TownVarData(v1) + if x3=0 then CSPV2 + if x3=255 then CSPV2 + v2=255 ; don't do this subplot again + gosub @iUpdateVarDataByte +; sick man is on horse - if going to Santa Fe, get a bonus + m1=1684 ; thanks! + if x1=SantaFe then @CSPVPrint + m1=1685 ; F you + goto @CSPVPrint + +.CSPV2 + + if x1<>Fortsumner then CSPV3 + x2=SPFAccountsRequested ; player been asked to fetch accounts? + add x2,SubPlotFlags + x3=TownVarData(x2) + if x2<>PlayersName then CSPV3 + v1=SPFAccountsGot ; player got accounts from store? + add v1,SubPlotFlags + v2=255 ; have got accounts now - and presented them. So subplot over + gosub @iUpdateVarDataByte ; TVD(V1)=v2 + M1=1516 ; showed the accounts to Colonel Baxter + goto @CSPVPrint + +.CSPV3 +; SPFGangToGrassOnBilly=8 ; gang name which has promised +; to grass on Billy +; SPFTexanPosseeAvailable=10 ; number of members (word) +; SPFFreeDeputies=12 ; number of deputies unallocated (word) +; SPFTrackingBarneysOutlaw=14 ; tracking outlaw suggested by +; Barney Mason +; SPFBeefWanted=16 ; beef asked for by Indian Chief? +; SPFUprisingOffered=18 ; number of uprisings available (word) +; SPFMeetBountyHunter=20 ; meet bounter hunter referred +; to in 1634. Name of town: word + +; SPFCounterfeitOffered=24 ; set when Billy has been offered +; counterfeit money as his share in a robbery. +; SPFMcSweenStage=26 +; SPFJoeGrantMet=28 ; met Joe Grant? + + + +.CSPVPrint ; m1=forced message to print on arrival + code + + return + + +;------------- + code - +;--- +.iDuel + code + + goto @Duel +;----------- + code - +.iSubPlotShootoutNoM1 + m1=0 + m2=0 + +.iSubPlotShootout + code + +.SubPlotShootout +;[110:the homesteader ] ; followed by 115 +;[111:the prospector ] ; followed by 115 +;[112:Mrs McSween ] ; ; followed by 116 +;[115:came up and said "thanks pard, you've +;done me a right big favour and I'll be sure to tell everyone +;about you". ] ;œœœ +;[116:came up and said "thanks old friend. That's +;stopped to the Murphy Dolans, at least for a while". ] + +; if m1=0 then SPS2 +; WantCSTB=true ; preserve last frame of animation +; gosub @DisplayInstructions ; TextBigBox +;.SPS2 + v1=ArcadeAcode + +; 0: facing barn +; 1: facing farmhouse +; 2: facing rocks +; 3: facing chasm +; 4: facing bank/wagon - looking down main road. +; 5: facing grain store + code - + v4=6 ; buckshot roberts + if Location>255 then sps4 ; buckshot special + v4=0 ; shootout 1 - facing farmhouse + if Location>223 then sps3 ; ranches + v4=2 ; shootout facing rocks + if location>199 then sps4 ; only one outside scene + v4=4 ; shootout in town + +.sps3 + random x1 + if x1>127 then sps4 + add v4,c1 ; randomly use 1 of the two shootouts +.sps4 + code + +.sps5 + push v1 + push v4 + gosub @PutUpHourglass + pop v4 + pop v1 + goto @CallOverlayV1 +;------------ +.FireNoChangeScreen + CurrentPrintRaster=3361 ; 3361 is 10x2 print raster + CurrentDO=270 ; also shows 3361: 20x2 print raster + add CurrentDO,x1 ; use display object containing enlarged +; binoculars graphic suitable for this place, plus the text +; box below it. + TextBoxWidth=124 ; 140 + + if x1>16 then FVP1 ; not a town! + if x1<10 then FVP1 ; not a town! + x4=Town + gosub @IsTownLawful ; x2=TVD(x1) non-zero if lawful + m2=0 ; no comment for lawless towns + if x2=0 then FVP1 + m2=1881 ; (lawful) + +.FVP1 + + + + gosub @DisplayTextFunnyBox ; display M1 in CurrentPrintRaster/CurrentDO + m2=0 ; m2 must remain 0 except where it's needed. + PlaceCursorX=Cursorx + PlaceCursorY=CursorY +.GMNoFire + return +;----------- +.CheckPlayerGang +; modify PlayerGang variable if they've been wiped out +; (only matters in two player mode - in single player mode, +; the meeting message handles it) + push x1 + if PlayerGang=0 then CPGEnd + x4=PlayerGang + gosub @IsTownLawful ; x2=TVD(x1) non-zero if lawful + if x2=0 then CPGEnd + x4=PlayerGang + gosub @bringLawToTown +; town x4 has become lawful - so remove it from the map etc. +.CPGEnd + pop x1 + return + +;---------- +.MaybeRandomMeeting +; about 1/3 of the time player goes somewhere, make them meet +; someone at random. The type of information they give will +; normally be the same as from meeting someone in town, +; but occasionally the player will get the intro to a sub-plot. + MenuNumber=NextMeetingMenu + if NextMeetingMenu=0 then MRM1 +.MRM0 +; forced meeting with someone. + NextMeetingMenu=0 + x1=TomOFoliard + if PlayersName=Billy then @MRM4 + x1=BarneyMason + goto @MRM4 + +.MRM1 + code - + random x1 + code + + if x1<230 then MRMNotStatusReport +; Tom O'Foliard tells Billy how he's doing + if Playersname<>Billy then MRMNotStatusReport + gosub @BillyStatusReport + goto @MRMRet + +.MRMNotStatusReport + if x1<200 then @MRMRet + code - + x3=190 ; room number for random meetings + x2=7 ; determines how many people can be met in the wilds + random x1 + code + + + and x1,x2 +.DoSubplotX1 +; is this subplot still available? + v1=x1 + add v1,v1 + add v1,SubPlotFlags + x4=TownVarData(v1) + if x4>0 then @MRMRET ; non-zero means it's in progress, or finished. + +; do we want to forget about this one this time? + code - + random x4 + code + + if x4>80 then @MRMRet + + v2=PlayersName + gosub @UpdateVarDataByte ; make non-available by setting up to +; equal the players name - maybe overwritten later. + + add x3,x1 ; choice of 8 people to meet in the wilds + gosub @WhoIsAtX3 +; gets x1 as person number * 16 for room x3. + if x1=0 then @MRMRet ; no-body there: e.g. that subplot has finished + if x1<912 then MRM4 ; pat or Billy can meet this person 57 + if PlayersName<>Billy then MRM3 + if x1>928 then MRMRet ; 57/58 are Billy Only, others are Pat Only +.MRM3 + if PlayersName<>Pat then MRM4 + if x1<944 then MRMRet ; 59/60 are pat Only, others are Billy only + +.MRM4 + m1=1854 ;[1854:was stopped on the way. He pulled up his horse + push x1 + gosub @ActorM1NoWait + + code - + random x1 + code + +;*** dv1=690 ; gen desert 1(road) in town structure/sprites +;**** if x1>128 then MRM2 + dv1=691 ; gen desert 2(stream) in town structure/sprites +;.MRM2 +; gosub @PreloadAndInsertDV1 +; v1=0 +; v2=0 +; gosub @MCBuildRoom + gosub @BuildPicture ; build picture dv1 + pop x1 + +.MapInterruption +; come here with x1=person number*16, +; and MenuNumber=menu to use, if not their default + push x1 + gosub @OpenIdentikitStructures ; load structure file for identikits + pop x1 ; person offset (Number*16) + + gosub @MaybeForceTalkToPerson ; MenuNumber=menu to force them to have +; (mostly used for talking to Second-In-Command - Foliard or Mason) + if result<1100 then MRMNotBackToMap + if Result<1130 then @ReturnToMap ; sick man in desert etc - +; back to map to give player option of going to a town next + +.MRMNotBackToMap +.MRMRet + return +;------------ +;.DisplayLinkingPicture ;****used? +; gosub @MCPurgeAllCells +; gosub @OpenLinkingStructures +;; gosub @MCEmptyRoom +; dv1=v4 ; 1=bank, 2=grave, 3=prospector, 6=fort. +;; gosub @PreloadAndInsertDV1 +;; gosub @MCBuildRoom +; gosub @BuildPicture +; return +;------------- +;------------- +.HiresCD +; check HiresTable(0..SizeHiresTable) +; for collision with thing at coordinates cursorx,cursory +; Return result=true if found +; and x1=offset in HiresTable + +.HiresCDRange + x1=0 +.FireLoop + PosRange=24 ; was 32 + NegRange=65512 ; -24 was -36 + + &x2=HiresTable(x1) + sub x2,cursorx + gosub AdjustCDSizes + if x2192 then ACS2 ; reduce size of Lincoln City Cd +.ACS1 + PosRange=16 ; normally 24 + NegRange=65520 ; -16 normally -24 + +.ACS2 + if x1<>1344 then ACS3 ; gamblers in saloon? + PosRange=80 + NegRange=65456 ;65504 + +.ACS3 + return +;--------------------------- + + + +.FireNotGameMap + if PlayingDuel=0 then @FireNotDuel + if DuelStatus=0 then @FireNotDuel + if DuelStatus=7 then @FireNotDuel ; player is dying + gosub @farcadeshoot ; gun shot sequence + gosub @fHit ; who got shot sequence + +; move cursor randomly after shot, as if gun jerks back +code - + random x1 +code + + asr x1 + asr x1 + asr x1 + cursorspeed=x1 + dx4=CrossHairACB + gosub @readACBdx4 + add dv4,x1 + if dv4< 201 then fNotOffTop + dv4=200 + +; make sure cursor stays on screen +.fNotOffTop + asr x1 + add dv2,x1 + if dv2<306 then fNotOffSide + dv2=305 +.fNotOffSide + gosub @moveACBdx4 + dx4=0 + +.FireNotDuel + return +;------------ end of main fire calls--------------------- + +;-------------------------------------------------------- +; gun fire sequence +; parameter: currentgun +;-------------------------------------------------------- +.farcadeshoot + dv1=3732 ; fire for Billy in foregroung + if PlayersName=Billy then fas2 + dv1=3752 ;fire +.fas2 + objectnumber=dv1 + dx4=fighteracb + gosub @ChangeACBdx4 + return +;------------------------- end of gunfire sequence-------- + +;--------------------------------------------------------- +; subroutine checks if anyone or anything hit +; parameters: crosshairacb +;--------------------------------------------------------- +.fCheckHit + gosub @fquartercalculation + dx4=CrossHairACB + push dx4 + gosub @ReadACBdx4 + sub dv3,dv4 + add dv3,c8 + add dv2,c8 + if dv2PositionX then fMiss + if dv3>PositionY then fMiss + sub dv3,c8 + sub dv2,c8 + add dv3,dv4 + pop dx4 + Hit=1 + dx4=0 + Return + +.fMiss ; didn't hit anything + sub dv3,c8 + sub dv2,c8 + add dv3,dv4 + pop dx4 + Hit=0 + dx4=0 + return +;-----------------------end of hit checking--------- + + +;--------------------------------------------------- +;calculate 3/4 of the area of the sprite hit, as 'HIT ZONE' +;--------------------------------------------------- +.fThreeQuarterCalc + add Length,Length; 1/2 in. + add PositionX,Length; 3/4 in + add Height,Height ; + add PositionY,Height; + return + +.fQuarterCalculation; + add Height,Height;1/8 height + add Height,Height; 1/4 height + push Height + add length,length; 1/8 length + add length,length; 1/4 length + push length + add PositionX,length + add PositionY,Height + pop Length + pop Height + return +;------------------end of two routines for area calculation + + +;---------------------------------------------------------- +; Okay, so who got hit ??? +;---------------------------------------------------------- +.fHit +; hit opponent in Duel? + Hit=0 + if enemystatus=2 then @fnotpat + dx4 =enemyacb + ACBHeader=dx4 + push dx4 + gosub @fFindPosition + pop dx4 + If Hit=0 then @fNotpat + dv1=3707 ; dying unnamed bandit + if EnemyName=255 then InsertDead ; =Pat, Billy or $ff for other + + + if PlayersName=Pat then otherDead ; if enemystatus<>0 then otherdead + dv1=3701 ;dying pat + goto insertdead +.otherdead ; Billy dies + dv1=3681 ; animation sequence for small Billy dying +.insertdead + objectnumber=dv1 +; gosub @changeacbdx4 + dx4=EnemyACB + gosub @ReadACBDx4 + push ObjectNumber + ACBHeader=EnemyACB + gosub @KillACBHeader + pop ObjectNumber + gosub @StartFreeACB + EnemyACB=dx4 + if EnemyName=255 then DontNotifyTwoPlayer + v1=CommsIveShotYou + gosub @WriteSerial + +.DontNotifyTwoPlayer +;** dv2=opponentx +;** dv3=opponentz +;** dv4=opponenth +;** gosub @moveacbdx4 + enemystatus=2 + Won=true + GameOverTimer=20 ; time till game terminates +.fnotpat +return + +;------------- end of people hit routines + +;------------------- nobody hit + +; parameters: acbheader,dv1 +.fFindPosition + dx4=ACBHeader + gosub @ReadACBdx4 + PositionX=dv2 + PositionY=dv3 + sub PositionY,dv4 + x1=62 + add x1,dx4 + &dv1=ACBList(x1) + xsize=2 ; cells wide + ysize=4 ; cells high + if dv1<50 then ffindGotSize ; xzh object: little outlaw for dueel + objectnumber= dv1 + gosub @FindAndDecode +.ffindGotSize + Height=ysize + Length=xsize + gosub @fCheckHit + return +;----------------------------------------- + + +;-------------------------------------------- +; find x and y coordinates for an object +.fGetCoords + dx4=ACBHeader + gosub @ReadACBdx4 + PositionX=dv2 + PositionY=dv3 + sub PositionY,dv4 +.OTSSRet + return +;-------------------------------------------- +.OpenTownStructures + BackgroundColour=1 ; white (changed in some strange places, +; like card game) + if StructureFile=TownStructures then OTSSRet + gosub @LoadStructures + + cif pc + gosub @SetCGAPalettes + gosub @SetPreloadPalettes + cend + + + if StructureFile=IdentikitStructures then OTS2 +; identikits, town structure file share the same sprites file + v1=IntroTablesList + &v2=IntroTables(34) ; map/town sprites filename + v3=1 ; 0=purge, 1=don't purge + gosub @MCOpenSpriteFile + gosub @MCPurgeAllCells + +.OTS2 + StructureFile=TownStructures + goto @InitACBs ; gosub, return +;--------- +.VisitRanch +; visit a ranch x1 (24..30) - will a shootout happen here, or +; do we just talk to someone? + + push x1 +; Has town gone bust, If it's a Murphy Dolan one? + x4=x1 ; object number for ranch (24..30, 29=Tunstall Ranch(McSween)) + gosub @GetLocationData ; returns x2=TVD(x1) where x1=position in ObjectsInfo +; x2=0 if not gone bust... yet! + pop x1 ; number of ranch to visit (24..30) + + push x2 ; decision on bust or not + gosub @OpenArcadeStructures + code - + random x1 + code + + CurrentScreen=0 ; disable scroll decision code, etc. + dv1=630 ; ranch picture, no outlaws + if x1<128 then VR2 + dv1=631 ; alternate ranch picture, no outlaws +.VR2 + pop x2 ; decision on bust or not + if x2=0 then VR3 ; not gone bust yet - get to see Murphy Dolan, +; or Mrs McSween, if there... + +; Has gone bust, so display picture and "Mysteriously deserted message" + + + gosub @BuildPicture + m1=1882 ; mysteriously deserted + gosub @DisplayInstructions + goto @ReturnToMap + + +.VR3 +.DisplayPlaceAndTalk +; display place dv1, talk to person at LOCATION + gosub @BuildPicture + x3=Location ; place we're visiting + gosub @WhoIsAtX3 +; gets x1 as person number * 16 for room x3. + if x1=0 then DPAT2 ; nobody there, so do animation. + push x1 ; person number + WantCSTB=true ; do one frame of animation (to put up e.g. +; sails on windmill + gosub @DisplayEverything + gosub @OpenIdentikitStructures ; load structure file for identikits + pop x1 + +.DPAT2 + push MenuNumber + gosub @MaybeForceTalkToPerson ; changed to this for Gang visits. + pop MenuNumber + if MenuNumber<>150 then DPATNotStatusReport + gosub @BillyStatusReport + +.DPATNotStatusReport + goto @ReturnToMap +;-------------- +.MarkGangAsKnown +; gang x1 (41..46) have been visited by player - so +; make people tell player about another gang next time +; he pumps them for information +; Returns x2 as zero if had already visited this gang + x2=41 ; 41=first gang + sub x1,x2 ; x1=gang number 0..5 + add x1,x1 ; get offset from SubPlot tables in TownVarData + add x1,x1 + add x1,x1 + add x1,x1 ; 8 words per entry in TVD + + x4=4 ; offset of gangs + add x4,SubPlotsOffset + &x4=TownVarData(x4) ; x4 is now start of subplot data word pairs + add x4,x1 ; add on gang + &x2=TownVarData(x4) ; returns zero if already known about + &TownVarData(x4)=c0 ; nothing more to know about this gang now. + return +;---------- +.ToCardGame +; Location=PlayersName ; do not acknowledge requests for Duel +;; in two-player game + gosub @PutUpHourglass + NextMusic=CardMusic + v1=ArcadeAcode + v4=CardGameScreen + goto @FireVisitPlace +;------------ +.ToBrawlGame +; Location=PlayersName ; do not acknowledge requests for Duel +;; in two-player game + gosub @FreezeAndPutUpHourglass + + v4=BrawlScreen + v1=ArcadeAcode ; '3' + gosub @FireVisitPlace + goto @BackToWalkabout ; in case we get back here, which is unlikely +;---------------- +.ToTrackingGame + gosub @PutUpHourglass + + NextMusic=102 ; getaway music + gosub @PlayTuneForScene + v4=TrackingGame + goto @CallScrollingOverlay ; to getaway game. Was goto @BackToWalkabout +;------------ +.ToRustlingGame + gosub @PutUpHourglass + + gosub @PlayTuneForScene + v4=RustlingGame + goto @CallScrollingOverlay ; to getaway game. Was goto @BackToWalkabout +;------------ +.ToEscapeGame + gosub @PutUpHourglass + + + NextMusic=102 ; getaway music + gosub @PlayTuneForScene + + gosub @MCPurgeAllCells ; purge cells from linking picture. + v4=EscapeGame + goto @CallScrollingOverlay ; to getaway game. Was goto @BackToWalkabout +;--------------- +.DisplaySystemMenu +; come here when select system icon on map + MenuNumber=274 ; system menu + gosub @PrettyMenu + if result=68 then SaveGame ; 668-MM,MDoIt+668-MM * save game + if result=69 then RestoreGame ; dc.w 669-MM,MDoIt+669-MM * restore + if result=70 then @RestartGame ; dc.w 670-MM,MDoIt+670-MM * restart + return +;-------- +.SaveGame + gosub @PutUpHourglass + + &v1=IntroTables(2) ; offset of filename within IntroTables +; from IntroTables(v1) to list17(8) + gosub @CopyFilename + + v1=0 ; (list0 is var table start). TownVarDataList ;=7 (list to save) + v2=0 ; offset within list + v5=0 ; high length + v6=1024 ; save variables (up to 512 of them) + gosub @MCSaveFile ; address: ListV1(V2), length is v5(hi),v6(lo), + + + x1=66 ; 'Billy.sav' -> 'Billy.SAB' + list17(16)=x1 + v1=17 ; save list 17 onwards + v6=18000 ; Various things... including... +; TownVarDataSize=10000 ; space allocated for it + gosub @MCSaveFile ; address: ListV1(V2), length is v5(hi),v6(lo), + return +;------- +.RestoreGame + gosub @PutUpHourglass + &v1=IntroTables(2) ; offset of filename within IntroTables +; from IntroTables(v1) to list17(8) + gosub @CopyFilename + + push SmoothScroller ; system option, nothing to do with save file. + v1=0 ; (list0 is var table start). TownVarDataList ;=7 (list to save) + v2=0 ; offset within list + gosub @MCLoadFile ; address: ListV1(V2), + + x1=66 ; 'Billy.sav' -> 'Billy.SAB' + list17(16)=x1 + v1=17 ; list17 is where most of the data is + v2=0 ; offset within list + gosub @MCLoadFile ; address: ListV1(V2), + pop SmoothScroller + +; re-initialise the floor maps which appear to get trashed by +; restore. + gosub @InitFloors + gosub @FCInitFloorCache + goto @ReturnToMap ; build map etc. return +;------- diff --git a/l9dev/regress/games.l9/billy.l9/firstvar.txt b/l9dev/regress/games.l9/billy.l9/firstvar.txt new file mode 100644 index 0000000..a5786f2 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/firstvar.txt @@ -0,0 +1,6 @@ +var + V1 ; must be first var + V2 ; must be second var + v3 v4 v5 v6 v7 ; etc.. +;; v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19 + x1 x2 x3 x4 x5 x6 x7 x8 diff --git a/l9dev/regress/games.l9/billy.l9/floors.txt b/l9dev/regress/games.l9/billy.l9/floors.txt new file mode 100644 index 0000000..ea2e228 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/floors.txt @@ -0,0 +1,120 @@ +; FloorMap interface code... +; +const + BadRoomOK=1 ;must be 1 for game + +;;table +;; FloorMap=16 ;transient stuff for init + +begin +.InitFloors +code - + MarginZ=0 + FSizeZ=0 + MarginX=0 + FSizeX=0 + RoomNum=0 + CursorZ=64 + CursorX=0 + CursorH=64 + CurrentCache=0 + MapNumber=0 + v1=220 ; table size +code + + return ; *********** goto @FCinitFloorCache + +.LMBug ;****** + break ;****** + return ;****** +;--- +;.ChangeACBdx4 +; goto @AlterACB +; dv5=1 ; display as a sprite. +; dv6=1 ; 0=non-reversed, 1=LR reversed +; push dx4 +; gosub @FindObjectNumber +; gosub @DecodeHeader +; pop dx4 +; dv1=ObjectNumber +; gosub @KillACBHeaderVEC +; object=actor +; gosub @CalcRasterOffsetObjectV +; goto @SUAChangeACB +;--- +code - +.LoadMap + gosub @SetFileName +code + + if CurrentCache>4000 then @LMBug ;********** + &FloorMap(CurrentCache)=c0 +code - + v1=FloorMapList + v2=CurrentCache ;offset +code + + if v2>4000 then @LMBug ;********** + gosub @MCloadFile +code - +; GMJ 06/07/90 Modified=0 + return +;--- +.SetFileName + v1=70 ;'f' + list17(8)=v1 + v1=76 ;'l' + list17(9)=v1 + v1=79 ;'o' + list17(10)=v1 + v1=79 ;'o' + list17(11)=v1 + v1=82 ;'r' + list17(12)=v1 + list17(13)=MapNumber + v1=46 ;'.' + list17(14)=v1 + v1=68 ;'d' + list17(15)=v1 + v1=65 ;'a' + list17(16)=v1 + v1=84 ;'t' + list17(17)=v1 + list17(18)=c0 ; put a terminator on, for benefit of Amiga etc. + return +;--- +;RoomNum is XZH number of room +;returns RoomNum=0, CurrentRoom=terminator word if no floor map +; CurrentRoom=FloorData +; +.FindRoom + CurrentRoom=CurrentCache +.FR1 +code + + &v1=FloorMap(CurrentRoom) +code - + if v1=RoomNum then Found + if v1=0 then @EOF + add CurrentRoom,c2 +code + + &v2=FloorMap(CurrentRoom) ;Structure length-2 +code - + add CurrentRoom,v2 + goto FR1 +; +.Found + add CurrentRoom,c4 +code + + &MarginX=FloorMap(CurrentRoom) + add CurrentRoom,c2 + &MarginZ=FloorMap(CurrentRoom) + add CurrentRoom,c2 + &FSizeX=FloorMap(CurrentRoom) + add CurrentRoom,c2 + &FSizeZ=FloorMap(CurrentRoom) +code - + add CurrentRoom,c2 + return +; +.EOF + RoomNum=0 + return +code + +;--- diff --git a/l9dev/regress/games.l9/billy.l9/fontbbc.txt b/l9dev/regress/games.l9/billy.l9/fontbbc.txt new file mode 100644 index 0000000..1a150d0 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/fontbbc.txt differ diff --git a/l9dev/regress/games.l9/billy.l9/fx.txt b/l9dev/regress/games.l9/billy.l9/fx.txt new file mode 100644 index 0000000..58b3aca --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/fx.txt @@ -0,0 +1,243 @@ +; FX.TXT +; +; Mike Austin November 1990 +; +; Copyright (C) 1990 Level 9 Computing Ltd. +; +; +;-------------------------------------- +begin + + cif TownOverlay +;----------- + cif pc +.LoadExponentTable +; v1 is list to load into. (Called only at Allocate time) + push v1 + v1=256 ; bytes to reserve for exponent table + gosub @MCReserveMemory + &v1=IntroTables(20) ; 'exponent.025' + gosub @CopyFilename + pop v1 ; list to load into + push v1 + v2=0 ; offset in list + v3=0 + gosub @MCLoadFile ; filename is list17(8...) +; v1 is length loaded + pop v1 ; list number we loaded exponent table into + v5=8 ; set exponent table + v2=0 ; offset within list. + goto @MCDigitise ; V5=8 Set exponent v1,v2=exponent table. + cend ; PC +;-------- + cend ; TownOverlay + + + cif TownOverlay +.AllocateSamplesAndMusic +; allocate a block of memory to be used for samples. + + +; now set up list pointers within this space: list19 for midi scores, +; list25 for sound samples. + + &x1=longws(HiLongFreeWorkspace) + &list11(100)=x1 ; set up list25 + &list11(76)=x1 ; set up list19 + &x1=longws(LOLongFreeWorkspace) + &list11(102)=x1 ; set up list25 + &list11(78)=x1 ; set up list19 + + + v1=AllSoundSpace ; total space to allocate - has to be in +; a block because we're using MCReserveChip, which doesn't +; allocate areas contiguiously if they're requested separately. + v2=2 ; type of memory + v3=25 ; return address in list 25 ptr + cif Amiga + gosub @MCReserveChip ; on ST, just does MCReserveMemory. +; on Amiga, gets special "Chip" memory which the sound hardware +; can access. + cend + cif ReallyST + gosub @MCReserveMemory + cend + cif PC + x1=AdlibSpace + add v1,x1 ; allocate extra space for adlib file + gosub @MCReserveMemory + cend + + cif Amiga +; we've set up list25 in chip memory. Now copy the list +; pointer to list19 for the midi list. + &x1=longws(100) + &list11(76)=x1 ; set up list19 + &x1=longws(102) + &list11(78)=x1 ; set up list19 + cend + +;; now move midi file pointer to after samples space +; v1=19 +; v2=0 ; high word of addition +; v3=MidiOffset +; gosub @MCAddToListPtr ; add (V2,V3).l to listv1 + + cif pc +; load instrument file for adlib board on PC. + &v1=IntroTables(18) ; 'intro.adl' + gosub @CopyFilename + v1=19 ; list to load into + v2=AdlibOffset + v3=0 + gosub @MCLoadFile ; filename is list17(8...) + cend + return + + cend +;-------------- +.LoadSamplesForGame +; load samples whose name ptr offsets/2 are in IntroTables(v4) +; into Samples() +; i.e. +; IntroTables(v4) is a pointer to a table of bytes: +; .b Number of introtables filename pointer /2 +; .b Number of introtables filename pointer /2 +; ... +; 0 +; Set up a table at start of Samples() of 4 words for each sample. +; .w Offset of sample within Samples() 0=no more samples in table. +; .w Length of sample, in bytes. +; .w Not used +; .w Not used +; This table is then accessed by PlaySample() + + + v5=0 ; current pointer + v6=128 ; load first sample after table pointers + &v4=IntroTables(v4) ; get offset of table +.LSFG1 + v1=IntroTables(v4) + add v4,c1 + if v1=0 then @LSFGRet + add v1,v1 ; double to get actual pointer + &v1=IntroTables(v1) + push v4 + gosub @CopyFilename + pop v4 + v1=SamplesListNumber ; load list 15 (structureBuffer onwards) + v2=v6 ; offset within list15 + v3=0 + push v2 ; offset in list + gosub @MCLoadFile ; filename is list17(8...) + pop v2 +; v1=length of file loaded +; set up table entries + if v5>AllSoundSpace then @LSFBug ;*** + &samples(v5)=c0 ; null pointer if not loaded + if v1=0 then @LSFGRet ; not loaded. + +; for PC and Amiga, do a translate stage on the sample + push v1 + push v4 + push v5 + push v6 + v6=v1 ; length + v1=SamplesListNumber + v3=7500 ; frequency in hertz + v4=255 ; volume + v5=5 ; translate + gosub @MCDigitise +; V5=5 Translate Sample (V1,V2 = sample, V6 = length, +; V3=Frequncy, V4=Volume) + pop v6 + pop v5 + pop v4 + pop v1 + + if v5>AllSoundSpace then LSFBug ;*** + &Samples(v5)=v6 ; offset pointer + add v5,c2 + &Samples(v5)=v1 ; length + add v5,c2 + &Samples(v5)=c0 + add v5,c2 + &Samples(v5)=c0 + add v5,c2 + add v6,v1 + goto @LSFG1 + +.LSFGRet + return + +.LSFBug + break ;******* + return +;--------------------- +.IsSamplePlaying +; return v2<>0 if a sample is still playing + push v1 + v5=2 + gosub @MCDigitise + v2=v1 ; function return: FindState Audio (returns V1=0 or 0FFFF) + pop v1 +.PlaySampleRet + return +;--------- +.PlaySample +; play sample number v1, in Samples() + gosub IsSamplePlaying + if v2<>0 then @PlaySampleRet ; something already playing + +.HiPriPlaySample ; play high priority sample + if SoundOn=false then PlaySampleRet + add v1,v1 + add v1,v1 ; get offset into 4-word table at start + add v1,v1 + +; MCDigitise ; 91 +; /* Paramters: +; V5=0 Initialise +; V5=1 Terminate System +; V5=2 FindState Audio (returns V1=0 or 0FFFF) +; V5=3 Wait For Audio +; V5=4 Volume Control (V5=Volume) +; V5=5 Translate Sample (V1,V2 = sample, V6 = length, +; V3=Frequncy, V4=Volume) +; V5=6 Play Sample (V1,V2 = sample, V3=Frequency, +; V4(hi)=loop count, (lo)=Repeat count +; V6=length +; V5=7 Terminate Sample +; V5=8 Set exponent v1,v2=exponent table. +; v5=-1 Change MCDigitiseHandler vector + + + &v2=Samples(v1) ; offset in list + if v2=0 then @PlaySampleRet ; not available + add v1,c2 + &v6=Samples(v1) ; length of sample + v3=7500 ; frequency + v4=0 ; loop flag + v5=6 ; function: play sample + v1=SamplesListNumber + goto @MCDigitise +;--------------- +;;LoadSamples +;cif Amiga +;; Amiga expects samples to be -128..127, not +;; the 0..255 used by the ST. +;; on ST/AMiga, mcloadfile returns v1 as the +;; length of file loaded +; v3=v2 +; add v3,v1 +;; v2=start, v3=end of sample +; x2=128 +;.ModifySampleLoop +; x1=list25(v2) +; sub x1,x2 +; list25(v2)=x1 +; add v2,c1 +; if v2v1 then GPM1 + if CursorX=v1 then GPM1 ;* + if CursorZ0 then GQM1 + v1=1 ;0001 + if v3=0 then GQM2 + v1=2 ;0010 + goto GQM2 +.GQM1 + v1=4 ;0100 + if v3=0 then GQM2 + v1=8 ;1000 +.GQM2 + return + +;----- + +.GDreadSquare + if CurrentRoom=0 then NoData ;* + gosub GDsquareAddr + CurrentSquare=FloorMap(v1) + return +.NoData ;* + CurrentSquare=48 ;00110000 height=0 + return + +.GDsquareAddr + v3=CursorZ + sub v3,MarginZ + asr v3 ;each byte represents an 8x8 area + asr v3 + asr v3 +; (320-32)/4=72 + v2=FSizeX + asr v2 + asr v2 + asr v2 + v1=0 +.gds1 + if v2=0 then gds2 + add v1,v3 + sub v2,c1 + if v2>0 then gds1 + +.gds2 + v2=CursorX + sub v2,MarginX + asr v2 + asr v2 + asr v2 + add v1,v2 + add v1,CurrentRoom + return +;---------- +.CheckCollision +; CursorX=PlayerX +; CursorZ=PlayerY +; x1=PlayerHeight +; add CursorZ,x1 + gosub @GDpointOnMap + CurrentSquare=48 ;00110000 height=0 + if ReturnCode=0 then GTL1 + gosub @GDreadSquare ;current square=collision byte + gosub @GDquadMask ;v1=mask +.GTL1 + and v1,CurrentSquare + if v1=0 then GTL3 +.GTL2 + ReturnCode=0 ;blocked + return +.GTL3 + ReturnCode=1 ; not blocked + return +;--------- +;; Check map square at dv2+dx2,dv3+dx3 +;; V1=0 if square is vacant... +;.CheckMap +; push CursorX +; push CursorZ +; CursorX=dv2 +; CursorZ=dv3 +; add CursorX,dx2 +; add CursorZ,dx3 +; gosub @GDpointOnMapVec +; CurrentSquare=48 +; PointOnMap=false +; if ReturnCode=0 then FVPMap +; PointOnMap=true +; gosub @GDreadSquareVec ;current square=collision byte +; gosub @GDquadMaskVec ;v1=mask +;.FVPMap +; pop CursorZ +; pop CursorX +; and v1,CurrentSquare +; return +;;--- +; Adjust person's height to that of the terrain... +; on entry: CurrentSquare=value of walkable square +; on exit: x1=height adjustment x2=peopleheight+x1 +.AdjustPersonHeight + x2=15 + and x2,currentsquare + if x2<>0 then DefaultPersonH ; not walkable! + x1=240 + and x1,CurrentSquare ; x1=height*16 + asr x1 + asr x1 + asr x1 ;/16 then *2 (for words) + x2=65534 ; remove bottom bit +++Mike 17Oct90 + and x1,x2 ;+++Mike 17Oct90 +; limit height range that can be chosen + if x1>24 then DefaultPersonH ; some error or other +++Mike 17Oct90 was >12 + &x2=List4(36) ;HeightTable + add x1,x2 + &x1=List4(x1) + + x2=PlayerHeight + add x2,x1 + result=true ; ok + return + +.DefaultPersonH + result=false ; height information faulty/not available +; x1=0 +; x2=PlayerHeight +; add x2,x1 + return +;--- diff --git a/l9dev/regress/games.l9/billy.l9/identiks.dat b/l9dev/regress/games.l9/billy.l9/identiks.dat new file mode 100644 index 0000000..49a5c5d Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/identiks.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/intro.txt b/l9dev/regress/games.l9/billy.l9/intro.txt new file mode 100644 index 0000000..cb7b91d --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/intro.txt @@ -0,0 +1,333 @@ +; INTRO.TXT - intro sequence control for Billy the Kid +; +; Copyright (C) 1990 Level 9 Computing Ltd. +; +; Mike Austin 4 September 1990. +; +; +var + CurrentScreenTableOffset + CurrentScreenTimer + TextBoxAfter + TextBoxTime + SceneTimer + +begin + +.vDoWholeIntro + gosub @InitIntro + gosub @SetDefaultPalettes + + StructureFile=IntroStructures + CurrentPrintRaster=2310 + v1=CurrentPrintRaster + code - + gosub @iStartPrinting ; make sure SetPrintRaster etc. is done. + v1=CurrentPrintRaster + code + + gosub @SetupPrintRaster + + + +.RestartIntro + CurrentScreenTableOffset=0 +.NextScreen +; this bit initalises each screen + TextBoxWidth=220 + SceneTimer=0 + gosub @ChooseCurrentScreen ; which screen? + +; 7 jan 1991 - size reduced to prevent PC coming up +; with a 'no links' error after 2 people in front of mirror scene. + v1=1060 + v2=400 ; (320 shows clipping bug on title screen) + v3=1 ; game mode: 0=non-scrolling, 1=scrolling, 2=jumps + gosub @MCInitScrolling + + cif Amiga +; do another initscrolling to try to fix this +; peculiar 8-pixel-non-alignment bug (partic on Amiga) + v1=1060 ; 640 + v2=640 ; 1280 (320 shows clipping bug on title screen) + v3=1 ; game mode: 0=non-scrolling, 1=scrolling, 2=jumps + gosub @MCInitScrolling + cend + + cif pc +; need to do SetGraphicsWindow for PC, even though game is scrolling + v1=0 ; X1 + v2=319 ; X2 + v3=0 ; Y1 + v4=191 ; Y2 + gosub @MCSetGraphicsWindow + cend + + ScreenX=0 + ScreenY=0 + gosub @MCEmptyRoom + gosub @InitACBs + RasterOffset=0 + + BuildingRoom=1 + dv1=CurrentScreen + gosub @PreLoadAndInsertdv1 + + + + gosub @HandleText ; insert any initial text box + + v1=0 ; x position in pixels (scrolling) + v2=0 ; y position in pixels (scrolling) + gosub @BuildRoom + + gosub @ClearKBD ; prevent quitting intro immediately - we need +; to randomize the random number seed a bit, according to how +; long the user waits before pressing a key. + + BuildingRoom=0 + cif NotPC + v1=0 ; x step + cend + + cif amiga + v1=65520 ; x=-16 +.KludgePossee + cend + + cif notpc + v2=0 ; y step + ScreenX=v1 + ScreenY=0 + gosub @MCScrollDirection + cend + + ScrollXDir=0 +.IntroLoop + gosub @PlayTuneForScene + gosub @HandleText ; do any text box changes + PlotLogicalDone=0 + gosub @DisplayEverything + code - + random x1 + code + + + gosub @SelectLanguage + + + gosub @sGetControls ; also does KeyScan + ScrollXDir=0 + cif ReleaseGame + goto introNotRightKey + cend + if RightKey<>0 then @NextScreen ; DEBUGGING FEATURE TO SKIP SCREEN ****************** + +.IntroNotRightKey + cif NotDemoVersion + if FireKey<>0 then @EndIntro + cend + + cif Amiga + goto NotScrollMainStreet ; does disk access on Amiga/ST at present... + cend + if CurrentScreen<>102 then NotScrollMainStreet + if SceneTimer<70 then NotScrollMainStreet + if SceneTimer>100 then NotScrollMainStreet + ScrollXDir=8 + +.NotScrollMainStreet + if CurrentScreen<>107 then NotScrollBuggy + if CurrentScreenTimer>50 then NotScrollBuggy + if CurrentScreenTimer<32 then NotScrollBuggy + ScrollXDir=8 ; (20 frames of scroll seems ABOUT right) +.NotScrollBuggy + + + add SceneTimer,c1 ; count-up timer + sub CurrentScreenTimer,c1 + if CurrentScreenTimer>0 then @IntroLoop + goto @NextScreen +;---------------- +.InitIntro + LeftMargin=0 + TopMargin=0 + v4=IntroSamples + gosub @LoadSamplesForGame + + v1=IntroTablesList + &v2=IntroTables(74) ; intro sprites filename + gosub @MCOpenSpriteFile + &v1=IntroTables(76) ; intro structures + gosub @LoadStructuresV1 + goto @SetDefaultPalettes +;---------------------- +.ChooseCurrentScreen +; which screen? + &x1=IntroTables(90) ; start of ScreenInfo table + add x1,CurrentScreenTableOffset +; called, we'll get the next picture. + &CurrentScreen=IntroTables(x1) + if CurrentScreen<500 then CCS1 + if CurrentScreen>2100 then CCS1 + SceneTimer=65535 ; pretend to have been on this scene a LONG time + gosub @HandleText ; discard erroneous text message - +; only get here if user has skipped a scene (or if there's +; a bug in the script!) + SceneTimer=0 + goto ChooseCurrentScreen + +.CCS1 + add CurrentScreenTableOffset,c8 ; next time this routine is + if CurrentScreen>32767 then EndIntro ; end of intro + add x1,c2 + &CurrentScreenTimer=IntroTables(x1) + add x1,c2 + NextMusic=x1 ; offset of filename in IntroTables + add x1,c2 + &MusicRepeatCount=IntroTables(x1) + return + +.EndIntro +; freeze screen for menu to select pat/billy + WantCSTB=true + gosub @DisplayEverything + gosub @InitACBs + gosub @PutUpHourglass + + cif DemoVersion + goto @RestartIntro ; never leave for demo! + cend + + v4=GameMap ; paramter for OverlayEntryPoint + goto @AfterIntroStart +;--------- +.vHandleText +; format of table entry in IntroTables(ScreenInfo) +; dc.w 2001, NoDelay, DefaultX,DefaultY,dInsert + &x1=IntroTables(90) ; start of ScreenInfo table + add x1,CurrentScreenTableOffset + &m1=IntroTables(x1) ; is there a queue message waiting? + if m1<500 then @HTRet ; not a message - must be next piccy + if m1>2100 then @HTRet + add x1,c2 + &x2=IntroTables(x1) + if x2>SceneTimer then @HTRet ; not time yet + add x1,c2 + + BackgroundColour=0 ; don't affect existing text + CurrentPrintRaster=2310 + CurrentDO=2310 +; gosub @DoTextWindow + push x1 ; position in IntroTables + code- +; instead of @iStartPrinting, do the following... + PrintX=LeftMargin + PrintY=TopMargin + v1=CurrentPrintRaster ;=1725 (use 431 to display) + code + + gosub @SetupPrintRaster2 ; don't do SetPrintRaster per se +; because it's slow, and we've already done it once. + code - + gosub @iStartPrintToBuffer + + message m1 +; code to finish up, and display the text with an outline... + message cr ; ensure buffer is flushed etc. + gosub @iEndPrintToBuffer +; text has been printed between TextBuffer(2..v7) + code + + ForeGroundColour=7 ; foreground colour=black + gosub @OutputText ; my routine which saves start coords + + add PrintX,c2 + add LeftMargin,c2 + add TextBoxWidth,c2 ; more like right margin + gosub @OutputText ; my routine which saves start coords + + add PrintY,c2 + gosub @OutputText ; my routine which saves start coords + + sub PrintX,c2 + sub LeftMargin,c2 + sub TextBoxWidth,c2 ; more like right margin + gosub @OutputText ; my routine which saves start coords + + ForeGroundColour=12 ;yellow=12 + add PrintX,c1 + add LeftMargin,c1 + add TextBoxWidth,c1 ; more like right margin + sub PrintY,c1 + gosub @OutputText ; my routine which saves start coords + + LeftMargin=0 + pop x1 + &v2=IntroTables(x1) + add x1,c2 + &x2=IntroTables(x1) ; y + add x1,c2 + v3=400 ; z + v4=v3 ; h + sub v4,x2 ; y=z-h so h=z-y + &v5=IntroTables(x1) ; draw flag + add x1,c2 + x1=10 ; skip onto next entry in table + add CurrentScreenTableOffset,x1 + + v1=TextBoxDisplayed + v6=0 ; non-reflected + + if SceneTimer>32000 then AfterTB ; skipping this text box + x1=v5 + if v5<>65535 then HT3a + cif pc + gosub @SafePlotLogical + gosub @MCDrawObjectV1 ; remove the previous text box + gosub @SortAndDisplayObjects + gosub @MCUpdateScreen + gosub @MCUnplotScreen + v1=0 + v2=0 + gosub @SafeScrollDirection + goto HT4 + cend + goto HT3 + +.HT3a + v5=0 ; insert + +.HT3 + gosub @MCDrawObjectV1 + v1=ScreenX + v2=ScreenY + gosub @BuildRoom ; correct for mistakes made by InsRebuild on scrolling screens +.HT4 + TextBoxDisplayed=0 ; don't display text as a sprite as well + +.AfterTB +.HTRet + return + +;------------- + +.OutputText + push PrintX + push PrintY + push v7 + code - + gosub @iDisplayBufferedText + code + + pop v7 + pop PrintY + pop PrintX + return + +;----------------- +; dc.w IntroSprites-IntroTables ; offset 74 +; dc.w IntroStructures-IntroTables ; offset 76 +; dc.w 0 ; IdentikitSprites-IntroTables ; offset 78 +; dc.w IdentikitStructures-IntroTables ; offset 80 +; dc.w 0 ; 82 +; dc.w 0 ; 84 +; dc.w 0 +; dc.w 0 +; dc.w ScreenInfo-IntroTables ; offset 90 +;-------------------------- diff --git a/l9dev/regress/games.l9/billy.l9/language.txt b/l9dev/regress/games.l9/billy.l9/language.txt new file mode 100644 index 0000000..66dbac4 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/language.txt @@ -0,0 +1,6 @@ +const +; english=0 +; german=1 +; french=0 +; TranslateExtraChars=1 ; set to 1 to permit funny characters +; like accents etc. diff --git a/l9dev/regress/games.l9/billy.l9/manual.txt b/l9dev/regress/games.l9/billy.l9/manual.txt new file mode 100644 index 0000000..600ee96 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/manual.txt @@ -0,0 +1,648 @@ +Graphics Structure Editor. Copyright (C) 1989 Level 9 Computing Ltd +------------------------------------------------------------------- + +This editor is not for drawing pictures, but to let you take +Neochrome format graphics (eg from Art Studio) and combine them +into space-efficient 3D rooms, animation sequences etc. + +It handles four types of objects (graphics data)... + +* Cell: a 16x16 pixel square, in 16 colours (with colour 0 meaning + transparent). This is the way in which real pixels are stored: + the other objects are basically collections of cells. + +* Raster: a rectangle of cells, any number of cells wide by any + number high. Any cell can be used anywhere within a raster, and + the same cell can be used many times (to save space). + +* XZH object. These are built from any number of any of the four + types of objects, each at its own 3D position. Objects within an + XZH object are also known as "items". + + The co-ordinate system is: + + ^ H (H is the height above the "floor") + | + | + +-----> X (X is the left/right position) + \ + \ + Z (bigger Z means it's nearer to the viewer) + + XZH objects can be used for a picture on a wall (i.e slightly + in front of it), an animated bird in a gilded cage (i.e slightly + behind the bars), or a 3D room made up from dozens of objects. + +* Animation sequence. This is a list of animation instructions: + object (display any of the four types of objects), shift (move), + repeat next instruction, and fork (start another animation + sequence, to run simulteneously). These instructions are processed + one-at-a-time in order. + + EDITING + ------- + +The screen normally displays two windows, one at the top and one at +the bottom, and each shows one object. + +To the right of each window is a column of status information +for the corresponding object. For example: + +20 Current object number. +4110 Current item (only used when editing an XZH object). +0 0 64 3D position (X Z H) of current item (ditto). +xzh Type of object. +x 144 X position of cursor object. +z 16 Z position of cursor object. +h 64 H position of cursor object. +4x0x0 X, H, "unused" sizes of current object, if raster. +Scr0,0 How far window is scrolled (X,Y). Use for big XZH objects. +OqfHR Status display (capital=on, lower case=off): + O=raster Offset (only affects preview mode), + Q=Quick mode (use when editing very big XZH objects), + F=Fast mode (do not use), + H=auto Height mode (for placing rasters on XZH floor), + R=Reflect. + +The cursor is a twinkling dot, which you can move anywhere with the +mouse. Normally, when it is in one window (half of the screen), a +copy of the object from the other window follows it about and can +be placed at its current position by pressing the left mouse button +or space - this is the usual way of building objects. + +Only XZH objects have truly 3D cursor movement. For these, the mouse +controls movement along the ground (changing X and Z). And, provided +you're not in auto height mode (toggled on/off by "H"), you press +keyboard "-" and "+" (with or without shift), or move the mouse with +its right button pressed, to change the height H above the ground. + + + DISPLAYING ANOTHER OBJECT + ------------------------- + +To change which object is displayed in the current window.. + +7/9 Numeric keypad 7 or 9 display the previous or next object. This + is not intended for moving from object 1 to 500, but is ideal if + e.g animation frames of a person running are stored in adjacent + objects, because you can step through them quickly for a check. + +. Dot makes the editor ask you for a new object number. Type a + number, press return and the chosen object is displayed. + +1/3 Numeric keypad 1 or 3 display the previous or next object in the + other window. (The other window doesn't visibly alter, because + it is not being redisplayed, but the object number and therefore + the object following the cursor are changed). This is useful if, + e.g, you are copying adjacent cells into a raster. + + + EDITING + ------- + +* CELL EDITING. Cells cannot be edited or copied, except by saving +them in a Neochrome file (S) and importing (I) them later. Normally +pressing the left mouse button means "copy the object in the other +window to here". But because you can't copy onto a cell, moving the +cursor onto a cell and pressing the left button has been reused as +a quick way to select that cell as the current one. + + +* RASTER EDITING. To create a raster, choose an object number in the +range allowed for rasters (press "Help", "N" and "N" for information) +and display it, e.g by pressing keypad "." and entering the number. + +Initialise the raster using the "R" (raster) command, e.g: + R4 (return) set the width to 4 cells + 3 (return) set the height to 3 cells + (return) initially use some blank cells. +This raster is now 12 cells big; you can see the numbers of the +(blank) cells it contains by moving the mouse dot over the raster +space, near the top left of the window. + +To copy cells into the raster, display the raster in the upper window +and choose a cell object in the lower window. Move the cursor onto the +raster (followed by the image of the chosen cell) and press space or +the left mouse button to place it. Repeat until the raster is full. + +To copy a raster into a raster, display the destination in the upper +window and the source in the lower. Move the cursor across the upper +raster (followed by the image of the source raster) and press space +or the left mouse button to place it. All cells which overlap the +target raster are copied. + +(Note however that no cells or pixels are really changed or copied +by any of the above, as rasters really just contain cell numbers. +Much the same applies to XZH and animation objects too.) + +Arrow keys change the size of an existing raster: press up/down to +increase/decrease height, or left/right to increase/decrease width. + + +* XZH EDITING. You do not create XZH objects as such (only Rasters +need initialising); just pick a number in the range allowed. + +Any kind of object can be copied into an XZH object. It is better +to have the destination in the upper window, so display the XZH +object there, and the source object in the lower window. + +Now move the cursor around the destination XZH, and it is followed +by the object you are copying. Note that this copy does not follow +smoothly, but moves in jumps - this is because it can usually only +be positioned on a cell boundary (every 16th pixel). + +The mouse controls movement along the ground, changing X and Z. If +auto height mode is set (toggle it on/off by pressing "H"), the copy +automatically sits with its lowest pixels at height H=0. If not in +this mode, you can change the height H by keyboard "-" and "+" (with +or without shift), or moving the mouse with its right button pressed. + +Press the left mouse button, or space to copy the object into the +XZH object. Space is better, as it is easier to get a single press. + +Accurate positioning. Normally, objects can only be positioned on a +16x16x16 boundaries within XZH objects. Press keypad "*" to toggle +"four pixel mode", in which you can position them accurate to 4x4x4, +though positions are still rounded to 16 pixels on display. This +allows several layers of objects to be placed at what the game will +think is the same Z coordinate (when rounded to 16x16x16), allowing +for things such as a picture on a wall or an expression on a face. + +Preview mode. Enter preview mode by pressing "P" and leave by "Esc". +This mode shows the current window as it will appear in a finished +game, and therefore an XZH object is shown in 3D. It allows you to +check, for example, that a midground object really is between fore- +and background objects as you copy it into place. Preview mode also +shows animation objects (if rapid animation makes editing difficult, +press "S" in preview mode for single step mode.. thereafter, press +any key to step on the animation). See later for more information. +Note: space is NOT the same as left mouse button in preview mode. + +To edit an existing XZH object, e.g to delete one of the objects +it contains (items), press: + Esc to go to the start of the current XZH object, + Tab to step on to the next item (the current item flashes), + D to delete the current item, + Delete to delete the XZH object and all its contents. +You will notice that items are stored in order of their Z positions: +background objects first and working towards the foreground. + + +* ANIMATION SEQUENCE EDITING. Animation sequences are just lists of +instructions; use preview mode (see just above) to reveal what the +animation looks like. + +To enter new instructions, press: + F Fork (start another animation sequence AND continue) + O display Object + R Repeat next instruction: 0,1=forever, 2-16=2-16 times, 17+=pick + a random number 16-31 and do-the-next-instruction-and-repeat + unless it exceeds yours. "Repeat m, repeat n, object o" means + "Repeat m+n, object o"; this allows for bigger repeat numbers. + S Shift (move) +To change a number in an instruction: move the cursor onto it; the +old number is highlit; type the new number and press return. + +To delete an instruction: move the cursor on to its name, and when +this is highlit, press "D". To delete the sequence, press Delete. + +To copy an animation sequence into another, display the source one in +the lower window, move the cursor on to the destination sequence in +the upper window and press the left mouse button, or space. Normally +the animation instructions are copied before those in the destination +sequence; to copy them after an instruction in the middle, first move +the cursor on to its name so that this is highlit. + +The other types of objects can be copied into an animation sequence +in the same way, resulting in an appended or inserted Object command. + +Example animation sequences for a man walking from left to right.. + +2500: + Repeat ! ! is displayed for 0: repeat forever. + Object # 2501 Display object 2501 (two strides). + End. + +2501: + Object #100 Display object 100 (start of movement). + Shift x 4 z 0 h -1 Shift 4 pixels to the right and 1 down. + Object #101 + Shift x 4 z 0 h -1 + Object #102 Varying the height H for the "bobbing" + Shift x 4 z 0 h 1 action as the man walks along means + Object #103 that, in the objects for the individual + Shift x 4 z 0 h 1 frames, we can keep his head and torso + Object #104 in a constant position. This will make + Shift x 4 z 0 h -1 it easier for the game to super-impose + Object #105 facial expressions and possessions as + Shift x 4 z 0 h -1 play continues. + Object #106 + Shift x 4 z 0 h 1 + Object #107 Display object 107 (end of movement). + Shift x 4 z 0 h 1 Shift 4 pixels to the right and 1 up. + End. + + + IMPORT AND EXPORT OF NEOCHROME PICTURES + --------------------------------------- + +Graphics for the Structure Editor are drawn using an arts package, +such as Neochrome or Art Studio, and must be imported. + +* IMPORTING. To import a Neochrome picture file, move the cursor to +the upper window and press "I". Then type the picture filename, e.g: +MYPIC.NEO and press return. The picture is loaded into a temporary +area of memory known as "the Neochrome screen" and is displayed. (You +can see the Neochrome screen at other times by displaying object 0). + + +* GRABBING A RASTER. After importing, move to the lower window and +choose a raster (presumably an unused one, which means you must +dimension it with "R") which is the right size for one of the things +drawn on the Neochrome screen. + +Now move the cursor to the upper window, where you will see two +parallel lines, indicating the size of the raster. Position this +"box" around the thing you want to grab, e.g the picture of a table. +Then press the mouse button to grab the graphics in the "box" and +swap them with the contents of the raster. + +(Unlike normal "copy" operations, which leave cells and pixels +unchanged, grabbing data from the Neochrome screen in this way +actually changes the pixels in all of the cells used by the raster.) + + +* AUTO-IMPORTING is a faster method when you want to grab all the +graphics from the Neochrome screen which you have just imported. + +Press "A" and the system asks for the number of the starting cell. +It will copy all the non-blank 16x16 pixels on the Neochrome screen +into cells, starting with your number and working upwards, so enter +a number which is clear of any already-used cells. (Because blank, +i.e all colour 0, parts of the picture are ignored, you should space +out things in a format easy to draw and not cram them together.) + +The request "Blank cells only?" is now redundant, no blank cells are +imported. You will presumably then go and copy the cells into rasters + yourself. + + + MISCELLANEOUS FEATURES + ---------------------- + +* SCROLLING THE WINDOW. Because lots of objects are too big to fit +into their window, the numeric keypad can be used to scroll them +around so that you can edit different parts: + + 8 Use the keypad to scroll the window across the object. + | Press 8 to move the window up, 2 down, 4 left, 6 right. + 4--+--6 And 5 to centre it again. Because the window starts at + | the top left of the object, scrolling down and right + 2 are speeded up: 2 and 6 scroll in four-cell jumps. + + +* SAVE. Press "S" to save a Neochrome image of the entire screen on +disk. You are asked for a file name. + + +* PREVIEW MODE shows you the object in the current window as it will +appear in the game: an XZH object is shown in 3D, and an animation +sequence is animated. The other window is not shown, but the object +from it slowly follows the cursor as a sprite. + +With an XZH object, you can move the cursor (and cursor object) +about through the 3D scene. If you press "P" again in preview mode, +the cursor object is positioned on the nearest 16x16 boundary to +the cursor. If you waggle the cursor dot, away from the cursor, the +cursor object slides towards it one pixel at a time. To change the +height H, press the mouse button and move the mouse as usual. + +To copy the cursor object into an XZH object, just press the left +mouse button as normal. Because you can see the real appearance of +objects, this may be the best way of editing 3D scenes. + +When an animation sequence is displayed in preview mode, the left +mouse button's function changes. Press it to restart the animation. + +You can slow or speed animation by pressing keyboard "-" or "+". +Press "S" in preview mode for single step mode.. thereafter, press +any key to step on the animation. See below for more information. +Note: space is NOT the same as left mouse button in preview mode. + +Screens in preview mode can be saved to a neochrome file by pressing +W (Write). The system requests a file name and saves the current +frame being previewed. This utility is useful for demos. + +Finally, press "Esc" to leave preview mode. + + +* HELP. Press "Help" for details of common commands. The help screen +ends with, "Leave Editor?": press "Y" (yes) to quit (you are warned +and can change your mind if if this could lose data), or "N" (no) +to display the next help screen, showing object information. This +tells you the ranges of numbers allowed for the various types of +objects, and ends by asking if you want the 'special functions' +menu: press "Y" to see this menu, or "N" to return to editing. + + +* PANIC PIXEL. Move the cursor to the extreme top right of the screen +and press the left mouse button to hit the panic button. This is an +extreme form of "Esc"; it should stop everything and restart the +editor with object 0 in both windows. The panic pixel also works +as an UNDO of the last change made. + + +* REFLECTION. Press "Return" to toggle reflection on/off. When an +object is copied into a graphical object (a cell into a raster, +or anything cell/raster/XZH into an XZH), the current reflection +status is stored along with it. Thus, to set up an XZH object for +something symmetrical, you would set reflection off, copy in one +half, set reflection on and copy in the same half, now reflected). + + +* RASTER OFFSET. This is a constant, added to the object numbers of +all rasters displayed in preview mode, or by the game. It is set by +pressing "O", for Offset, (but note: "O" means something different +while editing an animation sequence, and in preview mode itself (!)). +This allows several groups of graphics to be displayed using the +same animation sequences and/or game logic - e.g a dozen game people +who all have the same range of actions. + + +* SPECIAL FUNCTIONS are on a menu accessed via "Help" - see above. +As the menu warns, the potential for disaster is quite great, so +make a backup copy of your disk first. + +1..add new objects. Add some unused/blank objects and shuffle all +the higher objects up. It asks you where to add the new objects, +which are all the same type as the one before; the idea is to make +room for you to e.g set up more rasters. The range of numbers used +for object types change, but that for cells is NOT changed by this +command. So the starting position for cells MUST be changed first, +by "6", if there is any danger of existing objects overlapping them. +Addition takes several minutes; use "Help" to see what the ranges +of object types are afterwards. + +2..remove objects. Deletes some objects (blank and otherwise) and +shuffles all the higher objects down. It asks you which objects to +delete; please make sure they are all of the same type. The range +used for cells remains the same, but the range of numbers for other +object types are changed. Remove takes several minutes; "Help" +shows the ranges of object types afterwards. + +3..find and delete unused objects (not just cells). It asks you +which objects to check; please make sure they are all of the same +type. Object type ranges, and numbers of remaining objects are +unchanged. It takes several minutes. + +4..scrunch objects together. This renumbers objects, and changes +object ranges - sliding them all down to fill in any gaps and make +the numbers as small as possible. Numbers of objects, and object +type ranges, are all changed (even cells). It takes a long time. + +5..make maps. No longer used. Generates a set of rasters as a basis +for the floor plan map used for collision detection in the game (i.e +showing where people can walk). The rasters can then be modified in +map mode (press "t" while over a suitable raster) and the keypad used +to change entries to add floorpointers and add/delete free squares. + +6..move cells. Change the starting number of the cells and +renumber all references to them. It takes several minutes. Use +this to make room for other objects, or to avoid clashes when e.g +preparing to import structures which use overlapping numbers. + +7..set number of cells. Sets the finishing number of the cells, so +determining how much memory is saved/loaded by the editor. Do not +set this too high, as even "empty" cells take 128 bytes each. + +8..print structures. Print objects in a text form to RS232, +Centronics, a file, or to the screen. It is useful for, e.g debugging +if funny things happen with an XZH object (perhaps it gets very slow +to edit), and to keep a paper record. + +9..set auto cell range. When "R" is pressed to dimension a raster, +if you just press return the program automatically chooses blank +cells for the raster. This function sets the upper and lower limits +of the range of cells chosen from, though the highest cell of the +range may be overshot. + +0..change misc settings. Display a further menu to: + 1..toggle safe mode. When safe mode is set, the editor protects + itself slightly more against corrupted structure files, but + runs slower. (Safe mode is also set by pressing "S" after the + editor loads). Leave it off unless you have problems. + 2..enable Neochrome screen. This does NOT refer to the memory + used when grabbing cells, but to some cosmetic graphics which + show the border between screens, panic "button" etc. These + graphics are only loaded when the program is, so after using + this option, you need to save the data (with "Undo"), quit + from the editor (from "Help") and run the program again. + 3..disable Neochrome screen. See just above. + 4..toggle information. Switch the information at the right of + the screen on/off (the object number, status display etc). + You will almost always want the information shown, but it can + be a pain when editing wide objects, and switching it off + slightly speeds the editor. + Esc..return to editor screen (as usual). + +-..set x size for implied raster. When the object displayed in a + window is a cell, it is not displayed alone, but in a rectangle + of perhaps eighty adjacent cells. The width of the rectangle is + initially 13 cells, but you can change it with the "-" function. + For example, if you have imported cells which matched up + vertically on a Neochrome screen, setting the width to 20 will + mean that they match up in the window displaying cells, as well. + +q..export objects. Write out a range of objects to a file. Only + select one type of object: if you want to export several types, + export each to a seperate file. Export/Import can be used to copy + objects from one structure file to another, but you may need to + do some renumbering (e.g by 1..add new objects) before exporting, + or perhaps before importing, to avoid overwriting necessary + objects in the destination file. Take care and full backups. + +w..import objects. Read a file previously created by export. It asks + what range of objects you want to overwrite with the objects from + the disk file. Enter two numbers, which must be the same as those + used for the export. Bear in mind that references within the + imported objects may not work, because the objects they use have + been deleted or replaced by objects with different functions. + +e..truncate structures. Delete all objects above a specified number. + This is a debugging command, for amputating the end of the object + data if it has become corrupted. + +r..delete objects. Like "2..remove objects", but does not shuffle + later objects down and so does no renumber. It is a bit faster + than removing, but not much. + +t..read text-form structures from disk. The format is the same as + for "8..print structures", and it can read files produced by this. + + + + € WHAT ALL THE KEYS DO + -------------------- +KEYBOARD... + +A = Auto-import graphics after "I" +B +C +D = Delete current raster or animation item +E +F = toggle Fast mode (refreshes less screen) +G +H = toggle auto Height mode +I = Import neochrome screen +J +K +L +M = toggle Magnify window (disabled) +N +O = display Object in animation sequence +P = select Preview mode (Esc leaves it) +Q = toggle Quick mode (experts only) +R = dimension Raster / Repeat animation +S = save screen in Neochrome file / Shift animation +T = toggle map mode (not worth using) +W = save a previewed screen to a neochrome file + +U, V, X, Y, Z = nothing + +- = slow animation in preview mode / decrease H in XZH ++ = speed animation in preview mode / increase H in XZH + +Up arrow = Increase height of raster +Down arrow = Decrease height of raster +Left arrow = Increase width of raster +Right arrow = Decrease width of raster + +0 = toggle single window mode +Esc = to start of current XZH / cancel input, preview etc. +Tab = step on to next item of current XZH +Delete = Delete items in current raster or animation + +Space = place object (acts as left mouse button) +Return = toggle reflection +Help = help and status information +Undo = save all the structure data + +left mouse = place object +right mouse = press and move mouse to adjust H in XZH object + + +NUMERIC KEYPAD... + +* toggle 4-pixel mode. +- decrease Z size for raster objects (not worth using) ++ increase Z size for raster objects (not worth using) + +7 current object -1. 8 scroll window up. 9 current object +1 +4 scroll window left. 5 centralise scroll. 6 scroll window right +1 other object -1. 2 scroll window down. 3 other object +1 + +. (dot) ask for object number and change to displaying that object + + + € HINTS & TIPS + ------------ + +Save your work, using "Undo", about every 5 minutes of active work. +Backup your disk several times a day. And don't say I didn't warn you. + +If funny things happen, first check the options on the status line. + +You are advised not to try and recover from errors in the structure +file. Go back to an earlier version. + +Efficient animation. Graphics that move, e.g anything displayed by +an animation sequence, are called "sprites" and take much more +processing power to display than static objects. Please bear this +in mind when designing objects which sometimes move, or where only +part moves. For example: +* A wall lamp with a flickering flame is more efficient if set up + as an XZH object, which contains an animation structure for just + the flame. Likewise a clock with a pendulum, a spectator who + constantly waves a flag, etc. +* A man who occasionally cheers is more efficiently shown with his + resting expression on his face - this can be overlayed when he + cheers. Linewise a candle which flickers only very occasionally. + +Efficient objects. XZH objects use 5 bytes per item, while Rasters +use 2 bytes per cell. Both have a 2 byte overhead. Thus it is +clearly more efficient to use a Raster if possible. However, a +full-screen raster would still take 484 bytes, and it would almost +certainly be better to use an XZH object made up from several +standard rasters for large areas, such as the back wall. Don't +forget reflection either (all objects can be reflected, even cells). + +Object 0 is special. If you display object 0 in the editor, e.g via +the dot command, this is taken to mean the Neochrome screen used for +importing sprites. In structures, however, object 0 has another +meaning and it displays nothing: the effect is as though a blank cell +had been displayed, but NO processing power is wasted. + +Always dimension a Raster (using "R") to a group of non-blank cells; +either with cells off the end of the file (greater than MaxCell), or +as a specific group of cells containing something recognisable for +this purpose. If you let the "R" (Raster) command pick a lot of blank +cells for you, you can be sure that sometime later you will forget +which cells it chose, use the once-blank cells for storing graphics +and not notice until bugs are reported in the pictures. + +The 3D system assumes that each thing displayed is at one distance +from the observer, and this works pretty well for flat, rectangular +or small objects, where you are always looking at the front face. +But it does not work at all for big irregular objects, or objects +at an angle such as the diagonal side walls of a stage set, where +the surface that you can see is at a wide range of distances. E.g +a diagonal wall should be set up as an XZH object, like a Venetian +blind with vertical slats, each one cell wide: + -- A diagonal wall appears on the screen as a continuous + -- diagonal surface, but its internal structure is an XZH + -- object, built up from vertical 1-cell-thick slats. + +To create an empty structure file, use special functions to truncate +it at object 1; set 0 cells; and then add new objects. (This has not +been tested). + +When editing animation sequences, remember that some of the useful +keys, e.g "O", change their meanings. + +For animations, assume the game will run at about 8 frames per sec. + + + FEATURES + -------- + +3D graphics (in preview mode and the game), need a background in +order to be shown properly. Without one, they are displayed all +right but the 3D impression is not perfect. In a game, make sure +that moving objects always have something to move in front of. + +You should theoretically be able to edit anything in either window, +but it is a great deal safer to only edit the object in the top one. + + + BUGS + ---- + +Special function 4, "scrunch", does not work. + +Special function t, "read text structures", is not yet quite +compatible with files produced by s.f 8, "print structures". + +Object numbers can not be greater than 8000. + +Rasters are not displayed correctly when scrolling is set, but you +can edit them, and the numbers on the right are correct, except for +item (cell) numbers. + +Animation objects cannot yet be reflected. + +A raster's size can sometimes get corrupted while working on it. (The +size is shown as, e.g 4x3x0 on the right). If the first two numbers +change to silly values, it may be best to delete the raster (use the +"Delete" key) and start again. + +Auto import ignores "Y" after "Blank cells only?", treating it as "N". diff --git a/l9dev/regress/games.l9/billy.l9/menu.txt b/l9dev/regress/games.l9/billy.l9/menu.txt new file mode 100644 index 0000000..150d24a --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/menu.txt @@ -0,0 +1,1295 @@ +; MENU.TXT for Billy The Kid +; +; Mike Austin July 1990 +; +; Copyright (C) 1990 Level 9 Computing Ltd. +; +; +;********** Debug code in WaitFire. +; +; + + +var + PrettyMenuDisplayed ; false/true + HighlightY + HighlightEntry ; offset of highlight, i.e. number of entry 0.. + MaxHighlightEntry + +const + MM=600 ; message base for menu messages +MDoIt=0 ; equ $0000 +MPrintM1=4096 ; equ $1000 +MActorM1=8192 ; equ $2000 +MMenu=12288 ; equ $3000 +MPrintDOM1=16384 ; equ $4000 +MActorDOM1=20480 ; equ $5000 + + begin + + code + +;.Menu +; m1=10 +; gosub @DoTextWindow +; gosub @DisplayEverything +; TextBoxDisplayed=0 +; +; gosub @MenuWait +; +;.MenuLoop +; gosub @WaitFire +; push v1 +; x1=48 +; x2=v1 +; sub x2,x1 +; m1=20 +; add m1,x2 +; gosub @DoTextWindow +; gosub @DisplayEverything +; pop v1 +; gosub @GotoGameV1 +; goto @MenuLoop +; +;----------------------- + + + + + cif TownOverlay +.MenuGotScreen +; want to change to screen number x1 within this overlay + NewScreen=x1 + goto @OverlayRestart ; return + cend + +;------ +.OpenArcadeStructures +; e.g. for visiting ranches etc. + push v4 + TextBoxDisplayed=0 + PlayerACB=0 + gosub @MCPurgeAllCells + v1=IntroTablesList + &v2=IntroTables(38) ; arcade sprites filename + v3=1 ; 0=purge, 1=don't purge + gosub @OpenSpriteFile + &v1=IntroTables(44) ; arcade structures filename + if StructureFile=LinkingStructures then OAS1 + gosub @LoadStructuresV1 + StructureFile=ArcadeStructures +.OAS1 + gosub @InitACBs + pop v4 + return +;---------- +.WaitFireRelease +.MenuWait +; menu has been displayed - handle selections + push x1 + gosub @sgetControls + pop x1 + if FireKey<>0 then MenuWait ; wait for fire to be released +.MenuClearKbd + goto @ClearKBD +;--------- +.WaitFire + cif ST + gosub @MCDisplayRoom ; ******************** re-hook kbd vector ****************** +;**************DEBUG VERSION ONLY ******************* + cend + gosub @ClearKBD + gosub @WaitFireRelease + +.WaitFireLoop + gosub @sGetControls ; also does keyscan + if FireKey=0 then WaitFireLoop + if FireKeyChange=0 then WaitFireLoop + gosub @WaitFireRelease +.WFRet + return +;------------ +.WaitFireAndDisplay + gosub @DisplayEverything + gosub @sGetControls ; also does keyscan + if FireKey=0 then WaitFireAndDisplay + if FireKeyChange=0 then WaitFireAndDisplay + gosub @WaitFireRelease + return + +;-------- +.RealMenu + code - + gosub @iStartPrinting + message 200 + gosub @iEndPrinting + code + + gosub @DisplayEveryThing + gosub @MenuWait +.RM1 + gosub @MCOsrdch + if v1<48 then RM1 + if v1>58 then RM1 + TextBoxDisplayed=0 + return +;---------------------------------- +.PutUpMenu + + gosub @SetPrintMenu + gosub @MenuWait ; wait for fire to be released, etc. + + +; park the black box which goes behind the menu to +; make it run good and fast... + gosub @MCDisplayRoom +;; dv1=206 ; black box behind menu +;; if StructureFile=TownStructures then MS1 +; dv1=97 ; black box behind structures +;.MS1 +; dv2=screenx +; dv3=screeny ; z +; dv4=0 +; dv5=dPlot +; dv6=0 ; non-reflected +; gosub @MCDrawObjectDv1 +; gosub @MCCopyScreenToBuffer + + +.PutUpMenuAgain +; push CurrentPrintRaster +; push CurrentDO + if MenuNumber<>100 then PMNotWidowWoman +; can only get widow woman message when have enough money + if PlayerGold>999 then PMNotWidowWoman + MenuNumber=16 ; Standard menu + +.PMNotWidowWoman + push ForegroundColour + push BackgroundColour + push TextBoxWidth + ForegroundColour=16 ; foreground color (7). 16=Print transparent. + BackGroundColour=1 ; background color (1). 0=Don't change current. +; 1=white. The background is also cleared to this colour +; IntroTables(MenuOffset) is start of menus + x4=MenuOffset + add x4,MenuNumber ; add on offset of menu we want + &x4=IntroTables(x4) +; now IntroTables(x4) is the menu requested + push x4 + gosub @PrintMenu + pop x4 + HighlightY=TopMargin ; start with top entry highlit. + HighlightEntry=0 ; likewise entry number + pop TextBoxWidth + pop BackgroundColour + pop ForegroundColour +; pop CurrentDO +; pop CurrentPrintRaster + + return +;------------------- +code - +.iPrettyMenu + code + + gosub @PrettyMenu + code - + return +code + +.PrettyMenu +; menu offset MenuNumber has been requested +; code to handle MenuStructures(). +; Returns result=0 or result=message number offset from MM +; (See Menudata.txt) + &MenuOffset=IntroTables(32) ; offset of menu data. + gosub @PutUpMenu + +.SelectPrettyMenu +; select from menu already displayed: x4 +; push CurrentPrintRaster +; push CurrentDO + push ForegroundColour + push BackgroundColour + push TextBoxWidth + +.PrettyMenuLoop +.PMDisplayLoop +.PMInputLoop + gosub @DisplayNewMenu + + push x4 + gosub @sGetControls + pop x4 + if FireKeyChange=0 then @PMNoFire + if FireKey=0 then @PMNoFire +; fire pressed. + push x4 + gosub @WaitFireRelease + pop x4 + goto @PMEnd + +.PMNoFire +; up/down on highlight bar? + if UpKey=false then PMNoUp + sub HighlightEntry,c1 ; entry number 0.. + sub HighlightY,c8 + if HighlightEntry<200 then @PMDisplayLoop ; redisplay in new position + HighlightY=TopMargin ; limit to top of menu + HighlightEntry=0 + +.PMNoUp + if DownKey=false then PMNoDown + add HighlightEntry,c1 + if HighlightEntryMPrintM1 then PMNotPrintM1 +.PMPrintM1 + MaxHighlightEntry=1 ; HighLightY=65535 ; remove hightlight bar. + push x1 ; operation code. + push m1 + code - + gosub @iStartPrinting +; messages to go to text box go here... + if m1<3000 then PMP2 + x1=61440 ; $f000 ;negative numbers -> 3 hex digits. + add m1,x1 +.PMP2 + message m1 + gosub @iEndPrinting + code + + pop m1 + gosub @DisplayNewMenu + gosub @WaitFire ; wait for user to press fire button + pop x1 ; operation code + if x1=MPrintDOM1 then @PMReturnCode ; return message offset as operation code + result=0 ; do nothing code + goto PMReturnCode + +.PMNotPrintM1 + if x1=MActorDOM1 then PMActorM1 + if x1<>MActorM1 then PMNotActorM1 +.PMActorM1 + MaxHighlightEntry=1 ; HighLightY=65535 ; remove hightlight bar. + push x1 ; operation code + code - + gosub @iStartPrinting +; messages to go to text box go here... + message PlayersName + message m1 + gosub @iEndPrinting + code + + gosub @DisplayNewMenu + gosub @WaitFire ; wait for user to press fire button + pop x1 ; operation code +; result=m1 + if x1=MActorDOM1 then @PMReturnCode ; return offset as operation code + result=0 ; do nothing code + goto PMReturnCode + +.PMNotActorM1 + if x1<>MMenu then PMNotMMenu + MenuNumber=result + +; make menus 0..8 latch when we switch to them. This allows +; for the equivalent of "first meeting" messages + cif TownOverlay + if MenuNumber>8 then PMNotLatch + x1=PersonNumber + gosub @NewMenuForPerson ; person x1 + +.PMNotLatch + cend + gosub @PutUpMenuAgain ; get new menu, print it to raster... + goto @PrettyMenuLoop + +.PMNotMMenu + + + +.PMReturnCode +; result is operation code to return to caller. +; 0=by default do nothing. + TextBoxDisplayed=false ; kill any other text box that +; may have been displayed before + pop TextBoxWidth + pop BackgroundColour + pop ForegroundColour +; pop CurrentDO +; pop CurrentPrintRaster + return +;------------- +.SetPrintMenu + LeftMargin=10 ; allow for area hidden by border + TopMargin=9 + TextBoxWidth=144 ; 160 - 16 to allow for area hidden by border + + CurrentDO=95 ; 207 ; display object for menu box (white bit which +; gets printed onto) + CurrentPrintRaster=2743 ; menu print raster + if StructureFile=TownStructures then SPMRet + if StructureFile=BrawlStructures then SPMRet + if StructureFile=ArcadeStructures then SPMRet + CurrentPrintRaster=2311 + if StructureFile=IntroStructures then SPMRet + + CurrentPrintRaster=599 ; was 196 ; menu box + if StructureFile<>ScrollingStructures then SPMRet + CurrentPrintRaster=1000 ; menu print raster + +.SPMRet + return + +;------------- +; EXAMPLE OF MENU STRUCTURES... +; menu data for game. Each entry contains two words: +; .w Message number of appear on menu, relative to MM (0 if +; end of this menu) +; .w (1) MDoIt + Operation code. +; (2) MPrintM1 + Message number to print in response, relative to MM +; A further click returns to the previous menu +; (3) MActorM1 + Message number. As MResp, but puts +; (Billy/Pat) at start of message. +; (4) MMenu + Offset of menu to go to if item selected. 0 to +; quit menus +; (5) MPrintDOM1 + Message number to print in response, relative to MM +; the offset from MM is then return as a return code. +; (6) MActorDOM1 + Message number. As MResp, but puts +; (Billy/Pat) at start of message. +; the offset from MM is then return as a return code. + +;MDoIt equ $0000 +;MPrintM1 equ $1000 +;MActorM1 equ $2000 +;MMenu equ $3000 +;MPrintDOM1 equ $4000 +;MActorDOM1 equ $5000 + + +; dc.w Menu0-IntroTables +; +;Menu0 +; dc.w 1,MDoIt+0 * do nothing +; dc.w 2,MActorM1+3 ; visit town/ride into town +; dc.w 0,0 * end of table + + +;------------- +.PrintMenu +; print menu with data starting at IntroTables(x4) + MaxHighlightEntry=0 + code - + + gosub @iStartPrinting + x6=0 ; set if any of messages printed involve spending money + code + +; messages to go to text box go here... +.PrintMenuLoop + &m1=IntroTables(x4) + if m1=0 then PrintMenuDone + if m1>49 then PML2 + x6=1 ; a message involves spending money +.PML2 + x1=MM + add m1,x1 + push x4 + gosub @SpecialPrintMenu + pop x4 + if m1=0 then PML3 + code - + message m1 + code + + add MaxHighlightEntry,c1 +.PML3 + add x4,c4 + goto PrintMenuLoop + +.PrintMenuDone + code - + if x6=0 then PMD2 ; no menu options involved spending money + message PlayersName + message 872 ; Billy had $ + print PlayerGold + message 873 ;. +.PMD2 + + cif TownOverlay + if MenuNumber<>174 then pmdNotBudget2 + message 464 ; [464:funds remaining: $] +; and Income in x5 + print PlayerGold ; gold remaining out of budget +;[465:income: $] +;[466:costs: $] + message 465 ; income + x1=200 + print x1 ; 200$/month at present + message 466 ; costs... + gosub @iCalcCostOfDeputies ; gets running cost in x3 + print x3 ; cost + + x1=SPFTexanPosseeAvailable ; number of members (byte) + x2=SubPlotFlags + add x1,x2 + x2=TownVarData(x1) ; number of deputies working for nothing + if x2=0 then pmdNotBudget2 + message 467 ; (including + print x2 + message 468 ; texan deputies) + +.pmdNotBudget2 + cend + HighlightY=0 ; so that EndPrinting will print transparent + if MaxHighlightEntry>1 then pmdEnd2 + HighlightY=65535 ; no highlight + +.pmdEnd2 + gosub @iEndPrinting + code + + return +;-------------- + + +;------------ +.MenuSprites +; called from display everything before the text box +; is displayed. +; Is a pretty menu displayed? + if PrettyMenuDisplayed<>true then @MSRet + + &WordWS(WordRasterOffset)=c0 +; if HighlightY>32000 then MSRet ; bar removed - e.g. for result message + if MaxHighlightEntry<2 then @MSRet ; bar removed - e.g. for result message +; if MaxHighlightEntry<2 then MSRet ; only one option - don't bother +;; with highlight. + + dv1=206 ; black box behind menu + if StructureFile=TownStructures then MS1 + dv1=97 ; black box behind structures +.MS1 + dv2=screenx + dv3=screeny ; z + dv4=0 + dv5=dPlot + dv6=0 ; non-reflected + + cif TownOverlay + if TextBoxDisplayed=99 then MSBigBox + if CurrentDO=99 then MSBigBox + if CurrentPrintRaster=2744 then MSBigBox ; for deputy's challenge + if CurrentPrintRaster<>594 then HighlightNotBigBox ; 12x7 +.MSBigBox +; unusual case - we need the hightlight/black box +; behind the big text box. It needs to be positioned slightly +; differently... + add dv2,c16 + if StructureFile=ArcadeStructures then MSBigBox2 + if StructureFile=IdentikitStructures then MSBigBox2 + if StructureFile=LinkingStructures then MSBigBox2 + add dv2,c16 ; intro, town structures need a greater move of highlight. +.MSBigBox2 + add dv4,c32 + if StructureFile=TownStructures then hBB2 + if StructureFile<>IdentikitStructures then HighlightNotBigBox +.hbb2 + sub dv2,c32 + sub dv2,c16 + add dv4,c16 + +.highlightNotBigBox + cend + + gosub @MCDrawObjectDv1 + + dv5=dPlot + dv6=0 ; non-reflected + sub dv4,HighlightY ; h=0-y in this unusual case. +; dv1=205 ; highlight bar. +; if StructureFile=TownStructures then MS2 + dv1=96 ; was98. ; highlight bar in Identikit structure file. + +.MS2 + gosub @MCDrawObjectDv1 + +.MSRet + return +;------------- +.DisplayNewMenu +; refresh screen to show the changes to the menu + PrettyMenuDisplayed=true +.DisplayNewTextBox + if PersonDisplayed=true then DNTB2 + UpdateACBs=false ; when on map etc. don't change acbs +.DNTB2 + push x4 + gosub @DisplayEverything ; make it visible + pop x4 + UpdateACBs=true ; back to normal mode again + PrettyMenuDisplayed=false + return +;------------- +.DisplayInstructions + m2=0 +.DisplayInstructionsM1M2 + gosub DisplayTextNoWait + gosub @WaitFireRelease ; wait for fire to be released, etc. + gosub @WaitFire +; fire pressed. + TextBoxDisplayed=0 + return +;--------------- +.DisplayTextNoWait + gosub @SetPrintMenu +.DisplayTextFunnyBox + MaxHighlightEntry=1 ; HighlightY=65535 ; remove highlight + code - + gosub @iStartPrinting +.DTFB2 + message m1 + message m2 +.DTFB3 + gosub @iEndPrinting + code + +.DisplayInstructions2 + gosub @DisplayNewTextBox + return +;------------ +.ActorM1NoWait + gosub @SetPrintMenu + code - + gosub @iStartPrinting + message PlayersName + goto DTFB2 ; display M1, finish up. + code + +;------------ +.DisplayTextBigBox + gosub SetBigBox + goto @DisplayTextFunnyBox ; display M1 in CurrentPrintRaster/CurrentDO +;--------------- +.SetBigBox + cif TownOverlay + if Newspaper=true then DTB2 + if StructureFile=IntroStructures then DTB2 ; don't change in intro! + cend + TextBoxWidth=170 + CurrentPrintRaster=2744 ; 12x7 + CurrentDO=99 ; was208 + if StructureFile=TownStructures then DTB2 + if StructureFile=BrawlStructures then DTB2 + if StructureFile=ArcadeStructures then DTB2 + CurrentPrintRaster=594 ; 12x7 + if StructureFile<>ScrollingStructures then DTB2 + CurrentPrintRaster=1001 ; big print raster + +.DTB2 + return +;--------------- +.ToFinalDuel + BillyLives=0 ; signal it's the final conflict + EnemyName=Pat + if PlayersName=Billy then ToDuel + EnemyName=Billy + +.ToDuel + v4=DuelBack + cif TownOverlay + PlayingDuel=true + goto @OverlayEntryPoint + cend + goto ToTownOverlayV4 +;-------------- +.GotoGameV1 +; v1=49 = '1' - map +; 50 = '2' - scrolling game +; 51 = '3' - bank robbery escape +; 52 = '4' - arcade game +; 53 = '5' - train game + + if v1<>49 then @MenuNotTown +.ReturnToMap + v4=GameMap ; parameter + +.ToTownOverlayV4 +; call town overlay with parameter v4 + push v4 + gosub @PutUpHourglass + cif TownOverlay + PlayingDuel=false + gosub @OpenTownStructures + x1=GameMap + v4=GameMap + goto @MenuGotScreen ; '1' - map + cend + break ;******* + v1=69 ; 'E' as in acodE.acd + pop v4 ; parameter to town overlay + +.CallOverlayV1 + push v4 ; corrupted on pC? + push v1 + gosub ClearKBD + pop v1 + gosub @MCPurgeAllCells + &WordWS(WordVBLDisabled)=c1 ; disable vbls during chain + push v1 + gosub @ClearKBD + pop v1 + pop v4 + v2=OverlayEntryOffset + gosub @MCCallOverlay + return +;------------------ +.ClearKBD + x1=100 ; countdown timer +.ClearKBD1 + sub x1,c1 + if x1=0 then ClearKBD2 + gosub @MCOsrdch + if v1<>0 then ClearKBD1 +.ClearKBD2 + FireKey=0 + return +;------------------ +.MenuNotTown + if v1=51 then MenuScrolling ; '3' - bank robbery escape + if v1<>50 then MenuNotScrolling ; '2' - scrolling game +.MenuScrolling + cif ScrollingOverlay + goto @OverlayRestart + cend + gosub @MCPurgeAllCells +.CallScrollingOverlay + v1=50 ; '2' + v2=OverlayEntryOffset +; v4 is parameter to overlay being called + gosub @MCCallOverlay +.MenuRet + return +;- +.MenuNotScrolling + if v1=53 then MenuArcades ; '5' - train game + if v1<>52 then MenuNotArcades ; '4' - arcade game +.MenuArcades + v4=v1 + cif ArcadesOverlay + goto @OverlayRestart + cend + gosub @MCPurgeAllCells + v1=51 ; '3' + v2=OverlayEntryOffset +; v4 is parameter to overlay being called + gosub @MCCallOverlay + return +;- +.MenuNotArcades + return +;------------- +.BuildPicture +; build picture dv1 in non-scrolling mode. + push dv1 + if CurrentScreen=BankGame then BP2 + if CurrentScreen<400 then BP1 ; not in town + if CurrentScreen<599 then BP2 ; in town - don't change currentScreen +.BP1 + prettyMenuDisplayed=false ; disable all MenuSprites + cif ArcadesOverlay + if CurrentScreen<620 then BPnotShootout + if CurrentScreen<628 then BP3 ; a shootout scene - try to +; get rid of this goddam stray text box. + +.BPNotShootout + cend ; ArcadesOverlay + + CurrentScreen=dv1 + +.BP2 +; TextBoxDisplayed=0 + gosub @PutUpHourglass +.BP3 + v1 = 640 ; 640 + v2 = 1240 ; 384 + v3=0 ; game mode: 0=non-scrolling, 1=scrolling, 2=jumps + gosub @InitScrolling + ScreenX=0 + ScreenY=0 + gosub @MCEmptyRoom + gosub @MCBuildRoom + gosub @MCEmptyRoom + gosub @InitACBs + ScrollXDir=0 + ScrollYDir=0 + pop dv1 + gosub @PreloadAndInsertDV1 + v1=0 + v2=0 + goto @MCBuildRoom ; gosub, return. +;--------- +.OpenLinkingStructures + push v4 + if StructureFile=LinkingStructures then OLO1 + TextBoxDisplayed=0 + PlayerACB=0 + v1=IntroTablesList + &v2=IntroTables(70) ; linking sprites filename + v3=1 ; 0=purge, 1=don't purge + gosub @OpenSpriteFile + &v1=IntroTables(72) ; linking structures filename + gosub @LoadStructuresV1 + StructureFile=LinkingStructures +.OLO1 + gosub @InitACBs + pop v4 + return +;---------- +.OpenIdentikitStructures + push v4 + if StructureFile=IdentikitStructures then OIO2 + if StructureFile=TownStructures then OIO1 ; same sprites file + PlayerACB=0 + gosub @MCPurgeAllCells + v1=IntroTablesList + &v2=IntroTables(34) ; map/town sprites filename + v3=1 ; 0=purge, 1=don't purge + gosub @OpenSpriteFile +.OIO1 + &v1=IntroTables(80) ; identikit structures filename + gosub @LoadStructuresV1 + StructureFile=IdentikitStructures + +.OIO2 + gosub @InitACBs + pop v4 + return +;------------------- +.DLPNoHourglass + push v4 + goto DLP2 +;------- +.DisplayLinkingPicture +; number v4, without menu +; This is unfortunate for pictures such as the nursing pic +; which has a bed in the foreground! + push v4 + gosub @PutUpHourglass + +.DLP2 + cif TownOverlay + PlayingDuel=false ; in duel, foreground graphics are disabled. + cend + TextBoxDisplayed=0 + PrettyMenuDisplayed=0 + gosub @MCPurgeAllCells + gosub @OpenLinkingStructures + pop v4 + dv1=v4 ; 1=bank, 2=grave, 3=prospector, 6=fort. + gosub @BuildPicture + gosub @DisplayEverything + gosub @PutUpHourglass + return +;---------- +.LinkingPictureWait + gosub @DisplayLinkingPicture + goto @WaitFireAndDisplay ; gosub, return +;------------- +.SpecialInitACBs +; select between normal acb area and +; the high area used for talking to people (e.g. whilst +; walking around) + UpdateACBs=true + ACBStart=0 ; ConstACBSearchStart + ACBSearchStart=ConstACBSearchStart + ACBEnd=ConstACBEnd ; end within ACBList + cif TownOverlay + if StructureFile<>IdentikitStructures then SIA2 + ACBSearchStart=ConstTTPACBStart + ACBStart=ConstTTPACBStart + ACBEnd=ConstTTPACBEnd + +.SIA2 + cend + return +;------------- +.NewMenuForPerson +; next time Player talks to person x1, use menu MenuNumber + add x1,x1 + add x1,x1 + add x1,x1 + add x1,x1 + add x1,PeopleVarData ; get offset in TVD +.NewMenuForPersonTVDx1 + v1=x1 + x1=PeoplePatMenuOffset +; if PlayersName=Pat then NMFP2 +; x1=PeopleBillyMenuOffset +.NMFP2 + add v1,x1 + v2=MenuNumber + goto @UpdateVarDataWord ; gosub, return +;---------- +.KillGangAtTownX4 +.bringLawToTown +; town x4 has become lawful - so remove it from the map etc. + +; was Billy's gang there? + if x4<>playerGang then BLTT2 + PlayerGang=0 + +.BLTT2 + gosub @IsTownLawful + v2=c1 ; lawful + v1=x1 + gosub @UpdateVarDataByte ; TownVarData(x1)=c1 ; lawful + ExtraNewsStory=400 + add ExtraNewsStory,x4 ; story about town becoming lawful + cif TownOverlay + if x4<16 then PI2 + if PlayersName=Billy then @LoseGame + if PlayersName=Pat then @ToFinalDuel ; WinGame + cend + +.PI2 + x1=SPGangsOffset + add x1,SubPlotsOffset + &x1=TownVarData(x1) ; x4 is now start of subplot data word pairs + x2=x4 + x3=SantaFe + sub x2,x3 ; take off first town to get gang (0..5) + + NextMeetingMenu=260 ; menu for first gang + x3=x2 + add x3,x3 ; twice gang number (0..5) to get offset into menus + add nextMeetingMenu,x3 + +; 8 words per enty in subplot data, so times 16 + add x2,x2 + add x2,x2 + add x2,x2 + add x2,x2 + add x1,x2 +; &TVD(x1) is now visible/invisible flag for this town + v2=254 ; invisible/unobtainable + v1=x1 + gosub @UpdateVarDataWord ; &TownVarData(x1)=v2 + v1=CommsRedisplayMap + goto @WriteSerial ; request other machine to redisplay +; the map if it's currently displayed +;----------- +.IsTownLawful +.GetLocationData +; is town object x4 (10..15) lawful? +; Return x2=TVD(x1) as flag: 0 if lawless, 1 if lawful +; (This routine also used to find objectsInformation offset:x1 +; for other objects: e.g. ranches) +; Each town has the following variable table +; which is part of ObjectsInformation: 8 bytes each +; (i.e. 8 bytes per object, including e.g. cows, gangs) +;LawfulOffset equ 0 +; .b 0 if lawless, 1 if lawful +; Happiness offset equ 1 +; .b How happy the town is: starts at 128 (moderately happy) +; to 0 (completely unhappy) and up to 255 (ecstatic) + x1=x4 + add x1,x1 + add x1,x1 + add x1,x1 ; times 8 + add x1,ObjectsInformation +; +(LawfulOffset=0) + x2=TownVarData(x1) + return +;--------------- +.DisplayNursingPicture +; (Called from all parts) +; take away part of the player's reputation + sub PlayerReputation,c16 + + HourglassState=0 + PrettyMenuDisplayed=0 + TextBoxDisplayed=0 + v4=17 ; nursing picture + gosub @DLPNoHourglass + m1=PlayersName + m2=1864 ; nursing message + gosub @DisplayInstructionsM1M2 + + if PlayersName<>Billy then NotBillyLoseLife + sub BillyLives,c1 + if BillyLives>0 then NotBillyLoseLife + m1=1865 ; Pat burst in + m2=1866 ; Billy, we gotta finish it right now... + gosub @DisplayInstructionsM1M2 + CurrentScreen=430 ; force it to Santa Fe, regardless of where we were + EnemyName=Pat ; make it the final duel + goto @ToDuel + +.NotBillyLoseLife + HourglassState=0 ; ensure hourglass is redisplayed + gosub @PutUpHourglass + return +;---------- +.FreezeAndPutUpHourglass + WantCSTB=true + HourglassState=0 + UpdateACBs=false ;18 Jan 1991 + gosub @DisplayEverything ; freeze people in saloon + gosub @InitACBs + TextBoxDisplayed=0 + +.PutUpHourglass + if HourglassState=2 then PUHRet ; already displayed? +;; if CurrentScreen=SelectPlayerScreen then PUHRet + if CurrentScreen=0 then PUHRet + HourglassState=1 ; we want to display it + push UpdateACBs + push dv1 + UpdateACBs=false ; don't change any sprites + gosub @DisplayEverything + pop dv1 + pop UpdateACBs + +.PUHRet + return +;------------------ +.DisplayHourglass + if StructureFile=BrawlStructures then DHRet ; no hourglass in +; brawl structure file. + if WantCSTB=true then DHRet ; don't freeze hourglass + if HourglassState=false then BANoHourglass + if TextBoxDisplayed<>0 then BANoHourglass ; don't do hourglass when +; text box is going to be displayed +;;; if CurrentScreen=SelectPlayerScreen then BANoHourglass + if CurrentScreen=0 then BANoHourglass + dv1=HourglassObject + dv2=ScreenX ; x + dv3=ScreenY ; z + dx1=120 ; move hourglass up to top left. + sub dv2,dx1 + dx1=80 ; increase z coord + add dv3,dx1 + dv4=160 ; h =z+80m to move hourglass to top left. + + &WordWS(WordRasterOffset)=c0 + dv5=dPlot + dv6=0 ; reflect + gosub @MCDrawObjectDV1 + HourglassState=2 ; now displayed +.BANoHourglass +.DHRet + return +;----------------- +.AdjustDifficulty +; return x1 and x2 such that IF X1>X2 then PlayerInTrouble +code- + random x1 +code+ + x3=Difficulty ; standard is 256 + asr x3 + asr x3 + asr x3 ; x3 is related to dificulty, standard difficulty gives 32. + x2=190 + sub x2,x3 ; -> x2=150 at standard difficulty, decreases progressively + if x2>40 then mef2 + x2=40 ; limit difficulty +.mef2 + return +;---------- +.WinGame + x1=100 ; bonus for winning final duel + add PlayerReputation,x1 + if PlayerReputation<600 then LoseGame + if TwoPlayerMode=false then WinGame1 + gosub @AnnounceWin +.WinGame1 + v4=19 ; Pat/girl + if PlayersName=Pat then WinGame2 + v4=18 ; Billy/Girl +.WinGame2 + HourglassState=0 + gosub @DisplayLinkingPicture ; load linking structure file, +; open sprites file, and build the picture we've asked for(v4). + m1=1811 ; Pat win + if PlayersName=Pat then LoseGame2 + m1=1850 ; Billy win + goto LoseGame2 +;---------- +.LoseGame + if TwoPlayerMode=false then LoseGame1 + gosub @AnnounceLoss +.LoseGame1 + v4=2 ; grave piccy + HourglassState=0 + gosub @DisplayLinkingPicture ; load linking structure file, +; open sprites file, and build the picture we've asked for(v4). + m1=1812 ; Pat lose + if PlayersName=Pat then LoseGame2 + m1=1851 ; Billy lose +.LoseGame2 +; gosub @WaitFireRelease +; gosub @WaitFire +; gosub @WaitFireRelease + gosub @WaitTimeOrFire + + ScreenX=16 ; move text box right a bit, to avoid hiding the lovers/grave + gosub @DisplayInstructions + + +; display rating +;[1920:Billy's final reward was $] +;[1921:out of a maximum of about $5000, and he will ] ;^^^^ +; +;[1922:not be remembered. ] +;[1923:be a dim memory. ] +;[1924:be a figure of fun. ] +;[1925:be remembered by many. ] +;[1926:be remembered by most. ] +;[1927:be a minor hero. ] +;[1928:be a popular hero. ] +;[1929:be a household name till the end of time. ] +; +;[1930:Pat's final popularity was ] +;[1931:out of a maximum of about 5000, and he will ] ;^^^^ + code - + gosub @iStartPrinting + m1=1920 ; final reward + if PlayersName=Billy then DisRat2 + m1=1930 ; final popularity +.DisRat2 + message m1 + gosub @iValidateReputation ; check it's in range + print PlayerReputation + add m1,c1 + message m1 + m1=1922 + if PlayerReputation<200 then DisRat3 + m1=1923 + if PlayerReputation<250 then DisRat3 + m1=1924 + if PlayerReputation<400 then DisRat3 + m1=1925 ; first reasonable-sounding rating. + if PlayerReputation<600 then DisRat3 + m1=1926 + if PlayerReputation<900 then DisRat3 + m1=1927 + if PlayerReputation<1400 then DisRat3 + m1=1928 + if PlayerReputation<2500 then DisRat3 + m1=1929 +.DisRat3 + message m1 + gosub @iEndPrinting + code + + gosub @DisplayNewTextBox + gosub @WaitFire + + cif TownOverlay + goto @PlayAgain + cend + v4=CodeRestartGame + goto @ToTownOverlayV4 +;------------ +;---------- +.WaitTimeOrFire + gosub @WaitFireRelease + FrameCount=0 +.WTOF1 + gosub @sGetControls + if FireKey<>0 then WTOF2 + if FrameCount<100 then WTOF1 +.WTOF2 + gosub @WaitFireRelease + return +;------------ +.ConvertScrollToJump +; Convert ScrollXDir, ScrollYDir to suitable jump sizes +; if this is a jump-scrolling driver (PC only) + if SmoothScroller<>0 then CSTJRet + push v1 + push v2 + push v3 + push v4 + if ScrollXDir=0 then CSTJ2 + v3=64 ; positive step size + v4=65472 ; negative step size + cif ScrollingOverlay +; tracking game etc. uses smaller jump size, to avoid +; oscillation. + v3=40 + v4=65496 ; negative step size + cend + cif ArcadesOverlay +; train game etc. uses smaller jump size, to avoid +; oscillation. + v3=40 + v4=65496 ; negative step size + cend + + v1=v3 + if ScrollXDir<32000 then CSTJ1 + v1=v4 + +.CSTJ1 + ScrollXDir=v1 + +.CSTJ2 + if ScrollYDir=0 then CSTJ4 + v2=v3 + if ScrollYDir<32000 then CSTJ3 + v2=v4 + +.CSTJ3 + ScrollYDir=v2 +.CSTJ4 + pop v4 + pop v3 + pop v2 + pop v1 + +.CSTJRet + return +;--------- +.MaybeJump +; we've done COnvertScrollToJump, come here +; with v1,v2=direction of scroll asked for. Do a suitable rebuild. +; old v1,v2 are on stack. + ScrollDirectionDone=0 + PlotLogicalDone=0 + + IF V1<>0 then MJ2 + if v2=0 then MJEnd +.MJ2 + add ScreenX,v1 + add ScreenY,v2 + v1=ScreenX + v2=ScreenY + gosub @MCBuildRoom +.MJEnd + cif pc + v1=0 + v2=0 + gosub @MCScrollDirection ; to keep the flow checker happy + cend + pop v2 ; ;remove values pushed in DisplayEverythin + pop v1 + return +;------- +.InitScrolling + gosub @MCInitScrolling + cif pc +; need to do SetGraphicsWindow for PC, even though game is scrolling + v1=0 ; X1 + v2=319 ; X2 + v3=0 ; Y1 + v4=191 ; Y2 + gosub @MCSetGraphicsWindow + cend + ScrollXDir=0 + ScrollYDir=0 + return +;---------- +.EmptyRoomEtc + cif TownOverlay + if CurrentScreen=SelectPlayerScreen then @NoClearScreen ; display selection +; window on top of the relevant bit of the intro + cend + v1 = 800 ; 640 + v2 = 1240 ; 384 + v3=1 ; game mode: 0=non-scrolling, 1=scrolling, 2=jumps + cif TownOverlay + if CurrentScreen=GameMap then IS1 + if CurrentScreen=IntroScreen then IS1 + v3=0 ; non-scrolling for all others + cend +.IS1 + gosub @InitScrolling + gosub @MCEmptyRoom + +.NoClearScreen + return +;------------------ +.LoadGameData +; v1=65 (town), 50('2'=scrolling) or 51('3'=arcades) +; Convert to correct number for language. + x1=v1 + if Language=German then LGDGerman + if Language=French then LGDFrench + +.LGDMC + goto @MCLoadGameData + + +.LGDGerman +; Convert to... +; v1=52 ('4'town), 53('5'=scrolling) or 54('6'=arcades) + v1=53 + if x1=50 then LGDMC + v1=54 + if x1=51 then LGDMC + v1=52 ; default to town + goto LGDMC + +.LGDFrench +; Convert to... +; v1=55 ('7'town), 56('8'=scrolling) or 57('9'=arcades) + v1=56 + if x1=50 then LGDMC + v1=57 + if x1=51 then LGDMC + v1=55 ; default to town + goto LGDMC + +;----------- + code - +.iValidateReputation ; check it's in range + if PlayerReputation<32000 then iVRRet + PlayerReputation=2 + +.iVRRet + return + code + +;------- +.OpenSpriteFile + gosub @MCOpenSpriteFile + goto @SetCGAPalettes ; cleared by MCOpenSpritesFile +;------------ diff --git a/l9dev/regress/games.l9/billy.l9/menudata.txt b/l9dev/regress/games.l9/billy.l9/menudata.txt new file mode 100644 index 0000000..04a3e82 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/menudata.txt @@ -0,0 +1,979 @@ +; MENUDATA.TXT +; +; included from table.txt in all parts of game. +; +; Mike Austin August 1990. +; +; Copyright (C) 1990 Level 9 Computing Ltd. +; +; +MenuStructures +; menu data for game. Each entry contains two words: +; .w Message number of appear on menu, relative to MM (0 if +; end of this menu) +; .w (1) MDoIt + return code. +; (2) MMenu + Offset of menu to go to if item selected. 0 to +; quit menus +; (3) MPrintM1 + Message number to print in response, relative to MM +; A further click returns to the previous menu +; (4) MActorM1 + Message number. As MResp, but puts +; (Billy/Pat) at start of message. +; (5) MPrintDOM1 + Message number to print in response, relative to MM +; the offset from MM is then return as a return code. +; (6) MActorDOM1 + Message number. As MResp, but puts +; (Billy/Pat) at start of message. +; the offset from MM is then return as a return code. + +LoseRepMessage equ 907 ; message checked for to reduce player's +; reputation by a bit (When no specific message is printed) + +MDoIt equ $0000 +MPrintM1 equ $1000 +MActorM1 equ $2000 +MMenu equ $3000 +MPrintDOM1 equ $4000 +MActorDOM1 equ $5000 +MSpecial equ $6000 * used for e.g. die. Bottom bits are parameter: +Die equ 1 +FFF equ $0fff + +MM equ 600 ; first message number used in menu data + dc.w Menu0-IntroTables ; click on town main menu + dc.w Menu2-IntroTables ; click on town sub-menu (debug) + dc.w Menu4-IntroTables ; click on town sub-menu (debug) + DC.W Menu6-IntroTables ; click on train + DC.W Menu8-IntroTables ; click on wagon train + DC.W Menu10-IntroTables ; click on apache + dc.w Menu12-IntroTables ; click at bar + dc.w Menu14-IntroTables ; click at call girl + dc.w Menu16-IntroTables ; player meets someone + dc.w Menu18-IntroTables ; general yes/no question. Returns 0 if no + dc.w Menu20-IntroTables ; debugging menu for Billy + dc.w Menu22-IntroTables ; debugging menu for Pat + dc.w Menu24-IntroTables ; + dc.w Menu26-IntroTables ; rob bank menu for Billy + dc.w Menu28-IntroTables ; Hello stranger (Billy) + dc.w Menu30-IntroTables ; Hello stranger (Pat) + dc.w Menu32-IntroTables ; "we've been robbed" + dc.w Menu34-IntroTables ; "we've been robbed by someone not Billy" + dc.w Menu36-IntroTables ; Hello again + dc.w 0 ;Menu38-IntroTables ; + dc.w 0 ;Menu40-IntroTables ; + dc.w 0 ;Menu42-IntroTables ; + dc.w 0 ;Menu44-IntroTables ; + dc.w 0 ;Menu46-IntroTables ; + dc.w 0 ;Menu48-IntroTables ; + dc.w Menu50-IntroTables ; + dc.w Menu52-IntroTables ; + dc.w Menu54-IntroTables ; + dc.w Menu56-IntroTables ; + dc.w Menu58-IntroTables ; + dc.w Menu60-IntroTables ; + dc.w Menu62-IntroTables ; + dc.w Menu64-IntroTables ; + dc.w Menu66-IntroTables ; + dc.w Menu68-IntroTables ; + dc.w Menu70-IntroTables ; + dc.w Menu72-IntroTables ; + dc.w Menu74-IntroTables ; + dc.w Menu76-IntroTables ; + dc.w Menu78-IntroTables ; + dc.w Menu80-IntroTables ; + dc.w Menu82-IntroTables ; + dc.w Menu84-IntroTables ; + dc.w Menu86-IntroTables ; + dc.w Menu88-IntroTables ; + dc.w Menu90-IntroTables ; + dc.w Menu92-IntroTables ; + dc.w Menu94-IntroTables ; + dc.w Menu96-IntroTables ; + dc.w Menu98-IntroTables ; + dc.w Menu100-IntroTables ; + dc.w Menu102-IntroTables ; + dc.w Menu104-IntroTables ; + dc.w Menu106-IntroTables ; + dc.w Menu108-IntroTables ; + dc.w Menu110-IntroTables ; + dc.w Menu112-IntroTables ; + dc.w Menu114-IntroTables ; + dc.w Menu116-IntroTables ; + dc.w Menu118-IntroTables ; + dc.w Menu120-IntroTables ; + dc.w Menu122-IntroTables ; + dc.w Menu124-IntroTables ; + dc.w Menu126-IntroTables ; + dc.w Menu128-IntroTables ; + dc.w Menu130-IntroTables ; + dc.w Menu132-IntroTables ; + dc.w Menu134-IntroTables ; + dc.w Menu136-IntroTables ; + dc.w Menu138-IntroTables ; + dc.w Menu140-IntroTables ; + dc.w Menu142-IntroTables ; + dc.w Menu144-IntroTables ; + dc.w Menu146-IntroTables ; + dc.w Menu148-IntroTables ; + dc.w Menu150-IntroTables ; + dc.w Menu152-IntroTables ; + dc.w Menu154-IntroTables ; + dc.w Menu156-IntroTables ; + dc.w Menu158-IntroTables ; + dc.w Menu160-IntroTables ; + dc.w Menu162-IntroTables ; + dc.w Menu164-IntroTables ; + dc.w Menu166-IntroTables ; + dc.w Menu168-IntroTables ; + dc.w Menu170-IntroTables ; + dc.w Menu172-IntroTables ; + dc.w Menu174-IntroTables ; + dc.w Menu176-IntroTables ; + dc.w Menu178-IntroTables ; + dc.w Menu180-IntroTables ; + dc.w Menu182-IntroTables ; + dc.w Menu184-IntroTables ; + dc.w Menu186-IntroTables ; + dc.w Menu188-IntroTables ; + dc.w Menu190-IntroTables ; + dc.w Menu192-IntroTables ; + dc.w Menu194-IntroTables ; + dc.w Menu196-IntroTables ; + dc.w Menu198-IntroTables ; + dc.w Menu200-IntroTables ; + dc.w Menu202-IntroTables ; + dc.w Menu204-IntroTables ; + dc.w Menu206-IntroTables ; + dc.w Menu208-IntroTables ; + dc.w Menu210-IntroTables ; + dc.w Menu212-IntroTables ; + dc.w Menu214-IntroTables ; + dc.w Menu216-IntroTables ; + dc.w Menu218-IntroTables ; + dc.w Menu220-IntroTables ; + dc.w Menu222-IntroTables ; + dc.w Menu224-IntroTables ; + dc.w Menu226-IntroTables ; + dc.w Menu228-IntroTables ; + dc.w Menu230-IntroTables ; + dc.w Menu232-IntroTables ; + dc.w Menu234-IntroTables ; + dc.w Menu236-IntroTables ; + dc.w Menu238-IntroTables ; + dc.w Menu240-IntroTables ; + dc.w Menu242-IntroTables ; + dc.w Menu244-IntroTables ; + dc.w Menu246-IntroTables ; + dc.w Menu248-IntroTables ; + dc.w Menu250-IntroTables ; + dc.w Menu252-IntroTables ; + dc.w Menu254-IntroTables ; + dc.w Menu256-IntroTables ; + dc.w Menu258-IntroTables ; + dc.w Menu260-IntroTables ; + dc.w Menu262-IntroTables ; + dc.w Menu264-IntroTables ; + dc.w Menu266-IntroTables ; + dc.w Menu268-IntroTables ; + dc.w Menu270-IntroTables ; + dc.w Menu272-IntroTables ; + dc.w Menu274-IntroTables ; system menu + dc.w Menu276-IntroTables ; player selection for two-player game. + + +; general message ranges: +; MM+1..MM+49: involve spending money +; MM+50..MM+99: are the menu options themselves +; MM+100..MM+149: involve chaining to a new overlay + +; if a person gets to menu 0..8, this becomes their default menu + +Menu0 + dc.w 51,MDoIt+0 * do nothing + dc.w 50,MDoIt+1 * back to map + dc.w 0 * end of table + +Menu2 +; normal 'second time meeting' menu. Same as first time meeting, +; but get "Oh, it's you again" type message at the start. + dc.w 957-MM,MMenu+16 * drop into normal conversation +;[957:Oh, it's you again. ] ; ||| meet someone again that you +; haven't been introduced to. + dc.w 0 + +Menu4 +ClearOffMenu equ 4 + dc.w 958-MM,MDoIt+0 * back to walkabout/map +;[958:Clear off buster, I don't associate with your kind. ] ;||| +; meet someone again who we didn't get on with last time! + dc.w 0 + +Menu6 +;[671:English `] ; menu option +;[672:Deutsch `] ; menu option +;[673:Fran‡ais `] ; menu option + dc.w 671-MM,MDoIt+1 + dc.w 672-MM,MDoIt+2 + dc.w 673-MM,MDoIt+3 + dc.w 0 + +Menu8 + +Menu10 +* used when player is talking to someone, and has bribed them already +* then we get this menu. +* See also Menu16, 24 + dc.w 62,MDoIt+0 * move on + dc.w 60,MDoIt+60 ; talk + dc.w 61,MDoIt+61 ; threaten + dc.w 0 + +Menu12 +* used when click at bar + dc.w 62,MDoIt+0 * move on + dc.w 50,MDoIt+1 * back to map +;; dc.w 6,MDoIt+0 * beer + dc.w 656-MM,657-MM ; [656:RAISE HELL. `], [657:Yeehaa... ] + dc.w 1,MActorDoM1+253 * buy round of drinks + dc.w 0 + +Menu14 +* used when click at call girl + dc.w 62,MDoIt+0 * move on + dc.w 2,MActorDoM1+254 * go upstairs with the girl + dc.w 0 + +Menu16 +* used when player meets someone for the first time. A greeting message, +* probably chosen from 951 to 957 is printed, +* then we get this menu. +* See also Menu24 + dc.w 62,MDoIt+0 * move on + dc.w 59,MDoIt+59 ; hello + dc.w 60,MDoIt+60 ; talk + dc.w 61,MDoIt+61 ; threaten + dc.w 3,MActorDoM1+255 * offer bribe + dc.w 0 + +Menu18 +* General yes/no: used e.g. when +* someone has offered Billy a part in some sort of robbery. + dc.w 54,MDoIt+54 * yes + dc.w 55,MDoIt+0 * no: return 0 + dc.w 0 + +Menu20 + +Menu22 +* menu when challenged to a duel. + dc.w 63,MPrintDOM1+904-MM * accept + dc.w 64,MPrintDoM1+905-MM * climb down + dc.w 0 + +Menu24 +* used when player meets someone again. A greeting message, +* probably chosen from 920 to 960 is printed, +* then we get this menu. +* See also Menu16 + dc.w 62,MDoIt+0 * move on + dc.w 60,MDoIt+60 ; talk + dc.w 61,MDoIt+61 ; threaten + dc.w 3,MActorDoM1+255 * offer bribe + dc.w 0 + +Menu26 +* used when Billy goes into a bank. +* + dc.w 62,MDoIt+0 * move on + dc.w 59,MDoIt+59 ; hello + dc.w 60,MDoIt+60 ; talk + dc.w 65,MDoIt+257 ; MPrintDoM1+257 ; Rob the Bank + dc.w 0 + + +Menu28 +* hello stranger (Billy) + dc.w 920-MM,MMenu+16 * intro message (modified by code depending +* on alignment of person) + dc.w 0 + +Menu30 +* hello stranger (Pat) + dc.w 920-MM,MMenu+16 * intro message (modified by code depending +* on alignment of person) + dc.w 0 + +Menu32 +* We've been robbed (by Billy) + dc.w 870-MM,MMenu+26 * intro message (modified by code depending +* on alignment of person) + dc.w 0 + +Menu34 +* We've been robbed (by another gang, not involving Billy) + dc.w 871-MM,MMenu+26 * intro message (modified by code depending +* on alignment of person) + dc.w 0 + +Menu36 +* hello again (actual message printed is changed by code +* in SpecialPrintMenu) + dc.w 920-MM,MMenu+24 * intro message (modified by code) + dc.w 0 + +Menu50 +* first sub-plot menu: Mexican peasant being run off his +* land by Anglo ranchers... + dc.w 1500-MM,MMenu+52 * help! + dc.w 0 + +Menu52 +* options: yes/no + dc.w 54,MPrintDoM1+1540-MM * start gunfight: message number +* group: intro/win/lose + dc.w 55,MPrintDoM1+1501-MM * a thousand curses! + dc.w 0 + +Menu54 +* lady in saloon being pestered by gunslinger... + dc.w 1503-MM,MMenu+56 * help! + dc.w 0 + +Menu56 +* Will you challenge him? (From 54) + dc.w 54,MPrintDoM1+1570-MM * start duel: message number +* group: intro/win/lose + dc.w 55,MPrintDoM1+1504-MM * a thousand curses! + dc.w 0 + +Menu58 +* mexican picked on by cowboys... + dc.w 1506-MM,MMenu+60 * help! + dc.w 0 + +Menu60 +* options: yes/no + dc.w 54,MPrintDoM1+1508-MM * we'll get you for this... + dc.w 55,MPrintDoM1+1507-MM * disappointed + dc.w 0 + +Menu62 +* sick man in desert... + dc.w 1509-MM,MMenu+64 * help! + dc.w 0 + +Menu64 + * options: yes/no + dc.w 54,MPrintDoM1+1700-MM * man got on (take to santa fe for bonus) + dc.w 55,MPrintDoM1+1510-MM * man collapsed again + dc.w 0 + + + + +Menu66 +* soldier at Fort Sumner - army are being cheated on meat contract + dc.w 1512-MM,MMenu+68 * army are being cheated. + dc.w 0 + +Menu68 +* we need proof (stays in this state until get proof) + dc.w 1517-MM,MDoIt+1517-MM + dc.w 0 + + +Menu70 +; Pat is about to defeat a gang in a shootout, +; their leader calls a truce and barters their escape + dc.w 1520-MM,MMenu+72 * gang leader calles out: + dc.w 0 + +Menu72 +;[1521:"Pat - let us go and we'll tell you if Billy leads +;us on a robbery". ] +;[1522:"Pat - let us go and we'll leave the territory". ] +;[1523:"Pat - let us go and we'll tell you where there is a stash of +;buried gold". ] + dc.w 1521-MM,MMenu+74 * offer (modified by code) + dc.w 0 + +Menu74 +* options: yes/no +; and responses to 1521..1523 if Pat accepts the offer... +;[1524:"thanks Pat - we'll be in touch". They rode off. ] +;[1525:"buenos dias Senor - we'll head for Mexico". ] +;[1526:"It's on the east side of the Pecos, at a deserted prospector's +;site". They rode off. ] + dc.w 54,MPrintDoM1+1524 * yes - response (choice of 3) + dc.w 55,MPrintDoM1+1501-MM * no + dc.w 0 + +Menu76 +; Pat meets Texan possee in desert. Player can choose to +; lie that Billy has stolen Texan cattle. +;[1529:Pat met a Texan possee looking for cattle thieves. What did +;he tell them about Billy? ] ; intro message + dc.w 1529-MM,MMenu+78 + dc.w 0 + +Menu78 +;[1530:Billy steals Texan Cattle. `] +;[1531:Billy is an outlaw. ] ; menu options - keep short. +;[1532:the possee offered their services as deputies - at least +;for a while. ] ; Pat lies about Billy stealing Texan cattle +;[1533:the possee offered Pat good fortune, but unfortunately +;they could not help. ] ; Pat says Billy is an outlaw only. + dc.w 1531-MM,MPrintDoM1+1533-MM * Billy is an outlaw + dc.w 1530-MM,MPrintDoM1+1532-MM * Billy steals + dc.w 0 + +;[1534:"that Texan Possee got a telegram and had to leave in +;a hurry". ] ; comment from deputy at sheriff's office. + +Menu80 +; Barney Mason reports the escape of an outlaw +; from Santa Fe - Pat can track him unaided for a reward. +;[1535:Barney Mason rode up. "Pat - an outlaw has just escaped from Santa +;Fe. Come with me now, and I'll put you on his trail. "] +;[1536:Barney rode off. ] ; no to 1535 +;[1537:Barney lead Pat at high speed to the head of a winding +;valley, then left him to track the escapee on his own. ] ; yes to 1535 + dc.w 1535-MM,MMenu+82 + dc.w 0 + +Menu82 + dc.w 54,MPrintDoM1+1537-MM * yes + dc.w 55,MPrintDoM1+1536-MM * no + dc.w 0 +;[1538:Pat took in the outlaw and claimed the $100 reward. ] ; get +; the outlaw. + +; Mayor accosts Pat... +Menu84 + dc.w 1600-MM,MMenu+86 + dc.w 0 + +Menu86 + dc.w 54,MPrintDoM1+1601-MM * yes + dc.w 55,MPrintDoM1+1602-MM * no + dc.w 0 + +; Mayor accosts Pat... +Menu88 + dc.w 1605-MM,MMenu+90 + dc.w 0 + +Menu90 + dc.w 54,MPrintDoM1+1606-MM * yes + dc.w 55,MPrintDoM1+1607-MM * no + dc.w 0 + + +; BILLY ONLY ENCOUNTERS +; meet Indian - where's the beef? +Menu92 + dc.w 1610-MM,MDoIt+1610-MM + dc.w 0 + +Menu94 + dc.w 1612-MM,MMenu+96 *thanks Billy - we'll fake an uprising for you + dc.w 0 + +Menu96 + dc.w 50,MDoIt+1 * back to map + dc.w 1613-MM,MPrintDoM1+1614-MM * yes Billy - we fake uprising + dc.w 0 + +; normal menu for Indian +Menu98 + dc.w 50,MDoIt+1 * back to map + dc.w 0 + + + +; Meet WIdow Woman +Menu100 +WidowWomanMenu equ 100 + dc.w 1620-MM,MMenu+102 * I want all your money, and I want it now + dc.w 0 + +Menu102 + dc.w 54,MPrintDoM1+1622-MM * yes + dc.w 55,MPrintDoM1+1623-MM * no + dc.w 0 + +; peasant meets Billy and asks him to nurse family +Menu104 + dc.w 1630-MM,MMenu+106 * help me! + dc.w 0 + +Menu106 + dc.w 54,MMenu+108 * yes + dc.w 55,MPrintDoM1+1632-MM * no + dc.w 0 + +Menu108 + dc.w 1631-MM,MPrintDoM1+1701-MM * Billy rode off with peasant, helped. + dc.w 0 + +; Cooper offers Billy counterfeit money as his share in a robbery +Menu110 + dc.w 1650,MMenu+112 *want money? + dc.w 0 + +Menu112 + dc.w 54,MMenu+114 * yes + dc.w 55,MPrintDoM1+1654-MM * no + dc.w 0 + +Menu114 + dc.w 1651-MM,MMenu+116 * how to spend the money? + dc.w 0 + +Menu116 + dc.w 1653-MM,MDoIt+1653-MM * spend it normally + dc.w 1652-MM,MDoIt+1652-MM * buy cattle with it -> rustling game + dc.w 0 + +; in saloon, hear some conversation about Brady going +; to murder McSween +Menu118 + dc.w 1660-MM,MMenu+120 ; overhears conversation + dc.w 0 + +Menu120 + dc.w 1661-MM,MMenu+122 ; what to do? + dc.w 0 + +Menu122 + dc.w 1662-MM,MDoIt+1662-MM ; nothing + dc.w 1663-MM,MPrintDoM1+1664-MM ; stop Brady + dc.w 0 + +; Jose interrupts player looking at Map +Menu124 + dc.w 1670-MM,MMenu+126 ; hi - will you help McSween + dc.w 0 + +Menu126 ; McSween-specific + dc.w 1662-MM,MDoIt+1662-MM ; nothing + dc.w 1671-MM,MPrintDoM1+1672-MM * go there + dc.w 0 + +; meet Joe Grant, Drunk, in a saloon. +Menu128 + dc.w 1674-MM,MMenu+152 ; examine this pistol, Billy + dc.w 0 + +Menu130 + dc.w 1662-MM,MDoIt+0 ; nothing + dc.w 1676-MM,MPrintDoM1+1677-MM * turned barrel to empty chamber + dc.w 0 + +; meet hostile soldier (changed by SpecialPrintMenu for Pat) +Menu132 + dc.w 1680-MM,MDoIt+0 * buzz off + dc.w 0 + +Menu134 +; meet Mrs McSween + dc.w 1681-MM,MPrintDoM1+1682-MM ; hello Billy/gotta rush + dc.w 0 + +Menu136 +; meet prospector + dc.w 1683-MM,MMenu+16 * why have you stopped me panning? + dc.w 0 + +Menu138 +; do you want to take cows to Indians? + dc.w 1611-MM,MMenu+140 + dc.w 0 + +Menu140 + dc.w 666-MM,MPrintDoM1+760-MM ; steal cows + dc.w 667-MM,MActorDoM1+764-MM ; take cows to Apaches + dc.w 0 + +Menu142 + dc.w 802-MM,MDoIt+0 ; in bordello + dc.w 0 + +;[1855:Hey Billy, come share some coffee with us... ] ;||| then 1856 +;[1856:Billy sat down with gang and talked of daring deeds +;and famous crimes. Then he asked the crucial question... +;"I've got a real sweet job planned. You want in?". The gang +;looked at Billy. Should they trust this young hotblood? ] ;||| +;; 1856, gang leader's name, 1857 ||| +;[1857:spoke "Sure, but we'll want a good big cut. Now get out of +;here before I change my mind". ] ;||| +;; gang names to go between 1856 and 1847 +;[1858:Cooper ] ; 41 Santa Fe |||| +;[1859:The Regulators' leader ] ; 42 White Oaks |||| +;[1860:The Seven Rivers Gang leader ] ; 43 Lincoln City |||| +;[1861:Dona Ana ] ; 44 Mesilla ||| +;[1862:Jesse Evans ] ; 45 Roswell ||| +;[1863:The fugitives' leader ] ; 46 El Paso ||| + +Menu144 + dc.w 1855-MM,MMenu+146 ; meet gang + dc.w 0 + +Menu146 + dc.w 1856-MM,MMenu+148 + dc.w 0 + +Menu148 + dc.w 1857-MM,MDoIt+1857-MM * sure, but we'll want a big cut. + dc.w 0 + +Menu150 +; visit gang again message: prints message 1858, quits + dc.w 1858-MM,MDoIt+0 * hello again billy + dc.w 0 + + +; meet Joe Grant, Drunk, in a saloon. CONTINUED +Menu152 + dc.w 1675-MM,MMenu+130 ; examine this pistol, Billy + dc.w 0 + + +;Menus for Ash Upton at store in Roswell. +AshUptonMenu equ 154 +Menu154 + dc.w 1511-MM,MMenu+24 ; Hi, drop into normal menu + dc.w 0 + +;[1511:Howdoo pardner. I'm Ash Upton. How can I be of service? ] ;||| Store +;; in Mesilla + +Menu156 + dc.w 1519-MM,MMenu+158 * the store was deserted... + dc.w 0 + +Menu158 +; when Murphy-Dolans are away the mice can play... + dc.w 62,MDoIt+0 * move on + dc.w 1518-MM,MPrintDoM1+1515-MM * get books + dc.w 0 + +; menus used when Billy gets seen by a deputy in a lawful town... +;[1859:down the street, a deputy called out "Billy The Kid - hold it +;right there. You gonna come quietly?" ] ;||| +;[1860:run away.` ] ; ||| menu option +;[1861:ignore him.` ] ; ||| menu option +;[1862:Billy fled the town. ] ; run away ||| +;[1863:"go for your gun, outlaw." ] ;||| +Menu160 + dc.w 1859-MM,MMenu+162 + dc.w 0 + +Menu162 + dc.w 1860-MM,MPrintDoM1+1862-MM ; run away + dc.w 1861-MM,MPrintDoM1+1863-MM ; ignore him + dc.w 0 + +Menu164 +; menu at start of game: Which person: Billy or Pat? +;[954:who do you want to play? ] ; |||opening question. + dc.w 954-MM,MMenu+166 + dc.w 0 + + +Menu166 +;[952:Pat ] ; copy of message 1||| +;[953:Billy ] ; copy of message 2||| + +;[955:Pat, you must track all the outlaw gangs to +;their hideouts. Talk to people to get information. ] ;||| +;[956:Billy, rob banks and steal cows from the Murphy-Dolans. ] ;||| +;[974:2-PLAYER GAME ] ;œœœ +;[975:Trying serial connection (press FIRE to abandon) ] + dc.w 953-MM,MPrintDoM1+956-MM * Billy + dc.w 952-MM,MPrintDoM1+955-MM * Pat + dc.w 974-MM,MDoIt+975-MM * two-player + dc.w 0 + + +Menu168 +;; person 68 soldier at Fort Sumner +;[1516:showed the books to Colonel Baxter. He was livid and vowed to +;prosecute the Murphy-Dolan's with the full force of the law. ] +;; go to Fort Sumner with books. + dc.w 1516-MM,MMenu+24 * back to default menu + dc.w 0 + +Menu170 +CardGameMenu equ 170 +;[900:we're playing Monte. D'you want to sit in? ] +;[901:some other time, pard. ] ; refuse to play monte. + dc.w 900-MM,MMenu+172 + dc.w 0 + +Menu172 + dc.w 54,MDoIt+900-MM * yes + dc.w 55,MPrintDoM1+901-MM * no: return 0 + dc.w 0 + + + +; MENUS FOR PAT IN SHERIFF'S OFFICE +; text for Pat to control deputies etc. +;[450:WHERE ARE DEPUTIES `] ;|||menu option +;[451:HIRE DEPUTY `] ; |||menu option +;[452:FIRE DEPUTY `] ; |||menu option +;[453:deputy ] ; for reporting number +;[454:deputies ] +;[455:people are ] ; followed by happiness: 456..464 +;[456:rebelling. `] +;[457:furious. `] +;[458:angry. `] +;[459:displeased. `] +;[460:restless. `] +;[461:content. `] +;[462:happy. `] +;[463:ecstatic. `] +;[464:funds remaining: $] +;[510:Santa Fe ] ; dc.w 3345 ; Santa Fe 10 +;[511:White Oaks ] ; dc.w 3346 ; Albe'que 11 +;[512:Lincoln City ] ; dc.w 3347 ; Lincoln City 12 +;[513:Mesilla ] ; dc.w 588 ; Las Cruces 13 +;[514:Roswell ] ; dc.w 589 ; Roswell 14 +;[515:El Paso ] ; dc.w 0 ; spare town 15 +;[516:Frontier Town ] ; dc.w 0 ; spare town 16 +Menu174 +; used when walk into Sheriff's office (As Pat) + dc.w 62,MDoIt+0 * move on + dc.w 450-MM,MDoIt+450-MM ; where are deputies? + dc.w 451-MM,MDoIt+451-MM ; hire deputy + dc.w 452-MM,MDoIt+452-MM ; fire deputy + dc.w 0 + + +Menu176 +; ask "Where from" question for Hire Deputy/Fire Deputy options... + dc.w 470-MM,10 + dc.w 471-MM,11 + dc.w 472-MM,12 + dc.w 473-MM,13 + dc.w 474-MM,14 + dc.w 475-MM,15 + dc.w 0 + +Menu178 +; meet Barney Mason when budget has run out + dc.w 1813-MM,MDoIt+0 + dc.w 0 + +Menu180 +; meet Barney Mason when a town has started to revolt + dc.w 1814-MM,MDoIt+0 + dc.w 0 + +Menu182 +; Barney Mason tells Pat he's fired + dc.w 1815-MM,MDoIt+1815-MM + dc.w 0 + + +Menu184 +; every fourth member of Texan possee who drifts off +; gives this message... + dc.w 1534-MM,MDoIt+0 + dc.w 0 +; [1534:Barney Mason rode up and said "Pat, another man from that Texan +; Possee had to high-tail it outa town. You'd better get into +; town and check the budget". ] ; |||now mentions Barney Mason, budget + +; Menus 186 to 256 reserved for extra people menus (in case +; we need to radically expand the differences between people +; in different places) + +Menu186 +LauraPicketMenu equ 186 + dc.w 330-MM,MMenu+188 + dc.w 0 + +Menu188 + dc.w 54,MDoIt+1330-MM * yes + dc.w 55,MDoIt+LoseRepMessage * no: return 0 + dc.w 0 + + +Menu190 +WilmaKatzMenu equ 190 +LonelyFarmhouseMenu equ 190 + dc.w 331-MM,MMenu+192 + dc.w 0 + +Menu192 +* wanna fight shootout? Used by prospector etc. + dc.w 54,MPrintDoM1+1540-MM * 1331-MM * yes + dc.w 55,MDoIt+LoseRepMessage * no + dc.w 0 + +Menu194 +RickRiderMenu equ 194 + dc.w 332-MM,MMenu+22 * go to challenge to duel menu + dc.w 0 + +Menu196 +ProspectorMenu equ 196 + dc.w 333-MM,MMenu+192 * wanna help me fight shootout? + dc.w 0 + +Menu198 +NedParkinMenu equ 198 * spill drink menu for Ned Parkin only +SpillDrinkMenu equ 198 * general spill drink menu for unnnamed people + dc.w 302-MM,MMenu+BuyBeerOrElseMenu * jogged elbow + dc.w 0 + +Menu200 +JackShoeMenu equ 200 + dc.w 303-MM,MMenu+BuyBeerOrElseMenu * jogged elbow + dc.w 0 + +Menu202 +BenDavisMenu equ 202 + dc.w 304-MM,MMenu+BuyBeerOrElseMenu * jogged elbow + dc.w 0 + +Menu204 +LaviniaStrumpetMenu equ 204 + dc.w 305-MM,MPrintDoM1+((300-MM)&fff) + dc.w 0 + +Menu206 +GirlFriendMenu equ 206 + dc.w 334-MM,MDoIt+0 + dc.w 0 + +Menu208 +BuyBeerOrElseMenu equ 208 +* buy person a beer? + dc.w 6,MDoIt+6 * beer + dc.w 55,MPrintDoM1+((300-MM)&FFF) * no: go into bar room brawl + dc.w 0 + +Menu210 +SomeoneNeedsHelpMenu equ 210 + dc.w 342-MM,MDoIt+0 + dc.w 0 + +Menu212 +SomeoneWasLookingMenu equ 212 + dc.w 362-MM,MDoIt+0 + dc.w 0 + + +;----- +; section to do with final duel +;[1865:Suddenly, Pat Garrett burst in. ] ;&&& +;[1866:"Billy, you know I can't +;take you in. They'd hang ya like a dog, and I can't stand by and let that +;happen. We'll have to settle this now, gun-to-gun. Draw, +;outlaw". ] ;&&& +;[1867:Billy and Pat approached other and exchanged glances. +;Both knew that they were sworn enemies, but also old friends. +;Was this to be the end for one of them? ] ;&&& +;[1868:CHALLENGE TO DUEL. `] ; menu option &&& +;[1869:AVOID CONFLICT. `] ; menu option &&& +Menu214 dc.w 1865-MM,MPrintDoM1+1866-MM,0 ; Pat Garret Burst in, ... +Menu216 dc.w 1867-MM,MMenu+218,0 ; approached each other, gonna fight? +Menu218 + dc.w 1868-MM,MDoIt+1868-MM * challenge + dc.w 1869-MM,MDoIt+1869-MM * avoid conflict + dc.w 0 + +Menu220 +Menu222 +Menu224 +Menu226 +Menu228 +Menu230 +Menu232 +Menu234 +Menu236 +Menu238 +Menu240 +Menu242 +Menu244 +Menu246 +Menu248 +Menu250 +Menu252 +Menu254 +Menu256 + + +; usable for normal menus + +Menu258 +; UNUSED + + +; MENUS WHICH DISPLAY TOM O'Foliard + +Menu260 +;; messages Billy gets when gangs go out of business +;[1890:Tom O'Foliard rode up and said "Billy, ] ;||| +;[1891:the Cooper Gang have been raided". ] ;||| +;[1892:the Socorro Varueros gang has been raided". ] +;[1893:the Seven Rivers Gang gang has been raided". ] +;[1894:the Dona Ana Bunch gang has been raided". ] +;[1895:the Jesse Evans gang has been raided". ] +;[1896:the fugitives' gang has been raided". ] +;[1897:the regulators' gang has been raided". ] + dc.w 1891-MM,MDoIt+0 + dc.w 0 + +Menu262 + dc.w 1892-MM,MDoIt+0 + dc.w 0 + +Menu264 + dc.w 1893-MM,MDoIt+0 + dc.w 0 + +Menu266 + dc.w 1894-MM,MDoIt+0 + dc.w 0 + +Menu268 + dc.w 1895-MM,MDoIt+0 + dc.w 0 + +Menu270 + dc.w 1896-MM,MDoIt+0 + dc.w 0 + +Menu272 + dc.w 1897-MM,MDoIt+0 + dc.w 0 + +Menu274 +; system menu + dc.w 651-MM,MDoIt+0 ; do nothing + dc.w 668-MM,MDoIt+668-MM * save game + dc.w 669-MM,MDoIt+669-MM * restore + dc.w 670-MM,MDoIt+670-MM * restart + dc.w 0 +;[651:DO NOTHING. `] ; menu option +;[662:MOVE ON. `] +;[668:SAVE GAME `] ;||| +;[669:RESTORE `] ;||| +;[670:RESTART `] ;||| + +Menu276 +; menu to select which player you're going to be in +; a two-player game +;[952:Pat ] ; copy of message 1||| +;[953:Billy ] ; copy of message 2||| + +;[955:Pat, you must track all the outlaw gangs to +;their hideouts. Talk to people to get information. ] ;||| +;[956:Billy, rob banks and steal cows from the Murphy-Dolans. ] ;||| +;[974:2-PLAYER GAME ] ;œœœ +;[975:Trying serial connection (press FIRE to abandon) ] + dc.w 953-MM,MPrintDoM1+956-MM * Billy + dc.w 952-MM,MPrintDoM1+955-MM * Pat + dc.w 0 diff --git a/l9dev/regress/games.l9/billy.l9/message.txt b/l9dev/regress/games.l9/billy.l9/message.txt new file mode 100644 index 0000000..0e2508e --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/message.txt @@ -0,0 +1,1200 @@ +; MESSAGE.TXT +; +; Messages for Billy The Kid Map/Strategy Games +; +; Copyright (C) 1991 Level 9 Computing Ltd. +; +; +; ||| are changes since initial text sent to Ocean for translation +; œœœ are changes since final text sent to Ocean for translation 8 Dec 90 +; (Corrections of obvious spelling and punctuation errors are not +; marked - but additions to punctuations are). +; &&& are additional things +; ^^^ are changes from 1991 onwards. +;l *********** what about copyright message???? +; +[1:Pat ] +[2:Billy ] ; names for "PLAYERSNAME" variable. +[3:`] +[5:%] +[6:% %] +[7:. ] ; dot +[8: ] ; space ; ^^^^ + +[11:Sheriff Pat Garrett ] ; full name for Pat, e.g. for +; when introduced to people. +[12:Billy The Kid ] ; full name for Billy, e.g. for +; when introduced to people. + + + +;||| messages 21..102 moved to other parts of the game... +;[21:Billy spread the map and figured on it a while. He'd gotta +;make a move and he'd gotta make it right... ] +;[22:Billy drove off the herd and started the long drive to Mexico... ] +;[23:Outside, a man shouted, "Come on out with your hands in the air, +;fella. We've gotcha surrounded!" ] +;[24:The Kid was trapped! The law was all over the place, and he hadn't +;got nuthin' but his ol' 6-gun. ] +[25:The plan was perfect. The train'd have to slow when it hit the +incline. And that'd be the chance to catch onto it. ] + +[26:Run alongside, jump over the rocks, then climb up the ladder +and jump onto the fuel wagon. Stop that train! ] ; œœœinstructions +; added. Also "Billy" replaced with "the" + +; +; Duel messages. Both follow Player's name ||| +[101:had won by a whisker. His opponent collapsed to the floor. ] ;^^^ +;It seemed best to hightail it outa there before anyone started +;to ask awkward questions about who fired first. ] ;||| +[102:went down in agony. The last thing he remembered +was friendly hands dragging him onto a horse... ] ;||| + + +; Brawl messages ||| +[300:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew that he would +have to fight his way to the door if he wanted to escape in one +piece. ] ;Billy is on the right. ] ; Billy ||| œœœ(mentions group of thugs) +[301:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew he'd +have to fight his way to the door if he wanted to escape in one +piece. You are on the right. ] ; Pat |||œœœ(mentions group of thugs) +[302:"I reckon you jogged ma +elbow and spilled my beer there Mister. Get me another drink, +if you know what's good for you". ] ;||| Ned Parkin +[303:"I don't like +the way you're looking at me, son. Reckon you'd best take +you're liquor elsewhere". ] ;||| Jack Shoe +[304:"We don't like your sort in this bar, Mister. +Maybe you'd better find another place to drink your sasparilla!" ] ;||| Ben Davis +[305:"Hey Mister, some guys other there +were talking about jumping you. You gonna stand there and take +that?" ] ;||| Lavinia Strumpet + + +; invitations to card game in saloon +[320:"They say +you're pretty good with a deck, Mister. But how about a game +with the grown-ups?" ] ;||| Rick Sands +[321:"Sorry Mister, I must have mistaken you for a man!" ] ;||| + +; encounters elsewhere in town, or others +[330:"You look the type who might aid an honest godfearing woman, +Sir. My respectable boarding house has been taken over by ruffians. Can +you drive them off for me?" ] ;||| Laura Picket +[331:"Hey mister. Some drifter friends of +the local Judge have taken over my homestead. You've got an honest +face - can't you help me?" ] ;||| œœœno longer mentions name. +[332:"I guess you think you can strut around this town like you +own the place, Stranger. Well there's only room for one tough +guy in this town. Draw or git!" ] ; Rick "Two Fingers" Rider. ;||| +[333:"Hey mister, they say you're pretty good with those shootin' +irons of yours. Won'cha help me out - some of Murphy's mob have +taken over my claim. Move 'em out and I'll cut you in for a share!" ] ;||| +[334:"Why hello again, dear. I'd love to talk to ya some more, +but I've just gotta wash my hair..." ] ;||| visit girlfriend! œœœpunc + + + +; references to people elsewhere who need help. +[340:"Hey mister, a friend of mine needs help... ] ; before 342..349 ;||| +[341:Might be able to help ya in return, too! ] ; after 342..349 ;||| +[342:It's Whiskey Pete the prospector out at his claim. ] ;||| +[343:Laura Picket at the El Paso hotel has got big trouble. ] ;||| +; ^^^ now at El Paso + +[344:Wilma Dunn out at the Dunn ranch. ] ;||| +[345:Joe Dunn out at his ranch. ] ;||| +[346:lil' ol' Miss Rose, out at her old place. ] ;||| + + + +[360:"Hey mister, someone was looking for you... ] ; before 362..369 +[361:why not get over there and look 'em up?" ] ; after 362..369 +[362:Joe Grant was the name. He was hanging out in the Santa +Fe Saloon. ] +[363:Karl Bekkert was the name. He was hanging out in the Santa Fe +Saloon. ] +[364:Jack Shoe was his name. Saw him in the El Paso Saloon. ] +[365:Ben Davis, I think. Saw him in the Santa Fe Saloon. ] +[366:Warren Oaks, I think. He hangs out in the Mesilla saloon. ] +[367:lil' ol' Miss Rose, out at her old place. ] ;||| +;[367:Wayne Rogers, so I'm told. He hangs out in the +;White Oaks saloon. ] ;||| + + + +; 400+location number is press stories about the most common events +; that happen at places... ||| +[410:Pat Garrett has been made Sheriff of Santa Fe ] +[411:Pat Garrett has been made Sheriff of White Oaks ] +[412:Pat Garrett has been made Sheriff of Lincoln City ] +[413:Pat Garrett has been made Sheriff of Mesilla ] +[414:Pat Garrett has been made Sheriff of Roswell ] +[415:Pat Garrett has been made Sheriff of El Paso ] + +[424:the Bitter Lake Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ +[425:the Fritz Ranch, of the Murphy-Dolan's, has gone broke. ] ;||| œœœ +[426:the Chisum Ranch has gone out of business. ] ;||| œœœ +[427:the Dedrick Ranch, of the Murphy-Dolan's, has closed down. ] ;||| œœœ +[428:the Beckwiths, associates of Murphy and Dolan, have closed their +ranch and left the state. ] ;||| œœœ +[429:the Tunstall Ranch has gone out of business. ] ;||| +[430:the Reed Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ + +[431:only another ] ;œœœ (Followed by number of ranches left, then 432) +[432: of those Murphy-Dolan swine to get. Keep at it, Billy] ;œœœ + +; text for Pat to control deputies etc.;||| +[450:WHERE ARE DEPUTIES `] ;|||menu option ;||| +[451:HIRE DEPUTY `] ; |||menu option +[452:FIRE DEPUTY `] ; |||menu option +[453:deputy ] ; for reporting number +[454:deputies ] +[455:people are ] ; followed by happiness: 456..464 +[456:rioting. ] +[457:very angry. ] +[458:angry. ] +[459:displeased. ] +[460:restless. ] +[461:content. ] +[462:happy. ] +[463:ecstatic. ] +[464:money: $] ;||| +[465:`income next month: $] ;||| +[466:`costs next month: $] ;||| +[467:`(] ; 467, number, 468 || +[468: Texan Deputies working for nothing). ] ||| + +; menu option versions of town names... +[470:Santa Fe `] +[471:White Oaks `] +[472:Lincoln City `] +[473:Mesilla `] +[474:Roswell `] +[475:El Paso `] + + +;||| Full stops removed from messages 500..548 +[501:a herd of longhorns ] ; 0 +[502:a herd of longhorns ] ; 0 +[503:a herd of longhorns ] ; 0 +[504:a herd of longhorns ] ; 0 +[505:a herd of longhorns ] ; 0 + +[510:Santa Fe ] ; dc.w 3345 ; Santa Fe 10 +[511:White Oaks ] ; dc.w 3346 ; Albe'que 11 +[512:Lincoln City ] ; dc.w 3347 ; Lincoln City 12 +[513:Mesilla ] ; dc.w 588 ; Las Cruces 13 +[514:Roswell ] ; dc.w 589 ; Roswell 14 +[515:El Paso ] ; dc.w 0 ; spare town 15 +[516:Frontier Town ] ; dc.w 0 ; spare town 16 +[517:Frontier Town ] ; dc.w 0 ; spare town 17 +[518:Frontier Town ] ; dc.w 0 ; spare town 18 +[519:Fort Stanton ] ; dc.w 3351 ; Fort Stanton 19 +[520:Fort Sumner ] ; dc.w 3352 ; Fort Sumner 20 +[521:A New Fort ] ; dc.w 0 ; spare fort 21 +[522:A New Fort ] ; dc.w 0 ; spare fort 22 +[523:A New Fort ] ; dc.w 0 ; spare fort 23 +[524:Bitter Lake ] ; dc.w 581 ; +[525:the Fritz Ranch ] ; dc.w 582 ; +[526:the Chisum Ranch ] ; dc.w 583 ; +[527:the Dedrick Ranch ] ; dc.w 584 +[528:the Beckwith Ranch ] ; dc.w 585 +[529:the Tunstall Ranch ] ; dc.w 586 ; +[530:the Reed Ranch ] ; dc.w 587 + + + + + + + + + + + + + +; one of these should be Blazer's Mill, nr Mescalero Apache... +; See P.10 design +[531:the Dunn farmhouse ] ; 31 +[532:the Dunn farmhouse ] ; 32 +[533:the Rose homestead ] ; 33 +[534:a farmhouse ] ; 34 + + +[535:Mescalero Apache Reservation ] ; dc.w 3356 ; Mescalero Apache +settlement 35 +[536:Wild Apache Settlement ] ; dc.w 0 ; spare indians 36 +[537:Wild Apache Settlement ] ; dc.w 0 ; spare indians 37 +[538:Wild Apache Settlement ] ; dc.w 0 ; spare indians 38 +[539:the Santa Fe express ] ; 39 +[540:a wagon train ] ; 40 +; outlaw hideout names... +[541:The Cooper Gang hideout ] ; 41 Santa Fe +[542:Socorro Vaqueros ] ; 42 White Oaks Run by Pete Stewart ||| +[543:The Seven Rivers Gang hideout ] ; 43 Lincoln City +[544:The Dona Ana Bunch hideout ] ; 44 Mesilla +[545:The Jesse Evans gang hideout ] ; 45 Roswell +[546:The fugitives' hideout ] ; 46 El Paso +[547:The regulators' hideout ] ; 47 ; Los Portales, NE of Fort Sumner. ||| +[548:a prospector ] ; 48 + +;|||[598:Billy ] +;|||[599:Pat ] +; Menu messages start at 600... +; general message ranges: +; MM+1..MM+49: involve spending money +; MM+50..MM+99: are the menu options themselves +; MM+100..MM+149: involve chaining to a new overlay + +; menu options involving spending money... +[601:BUY ROUND OF DRINKS ($5) `] +[602:GO UPSTAIRS WITH THE GIRL ($25) `] +[603:OFFER A BRIBE ($15) `] +[604:GIVE $20 `] +; drinks on offer at bar... +[605:NOTHING `] +[606:RED-EYE ($1) `] +[607:BEER ($1) `] + +; menu options not involving spending money... +[650:LEAVE TOWN. `] +[651:DO NOTHING. `] ; menu option +[652:GO THERE. `] ; menu option +;; [653:think about it. `] ; menu option ****** +[654:YES. `] +[655:NO. `] +[656:RAISE HELL. `] ; option in bar ||| +[657:Yeehaa... ] ; response to 656. ||| + +;[656:ROB THE TRAIN. `] ; option when click on train. +;[657:meet the wagon train. `] ; option when click on wagons +;[658:go visit the Apaches. `] ; option when click on apache ; +;settlement. +; standard menu for talking to people. +[659:GREET. `] ; ||| HULLO. `] +[660:TALK. `] +[661:THREATEN. `] +[662:MOVE ON. `] +; menu for when challenged to a duel... +[663:ACCEPT. `] +[664:BACK DOWN. `] ; try to pacify person. +[665:ROB THE BANK. `] +[666:STEAL COWS. `] +[667:TAKE COWS TO APACHES. `] + +; SYSTEM menu options... +[668:SAVE GAME `] ;||| +[669:RESTORE `] ;||| +[670:RESTART `] ;||| + +[671:English `] ; menu option +[672:Deutsch `] ; menu option +[673:Fran‡ais `] ; menu option + + +;600+100..129: arcades overlay games +;600+130..159: intermission overlay games +;600+160..189: scrolling overlay games +;[700:rode off to intercept the train. ] +;[701:rode off to the ranch... ] +;[702:rode off to the ranch... ] +;[703:rode off to the ranch... ] +;[704:rode off to the ranch... ] +;[705:rode off to the ranch... ] +;[706:rode off to the ranch... ] + +;[730:rode off to meet the wagon train. ] +;[731:rode off to visit the Apache settlement. ] + +[760:set off to steal the steers. ] +[761:Get behind them longhorns +and drive 'em south. Press fire to switch between the +members of your gang. ] ; rustling game. œœœinstructions added. +[762:track the gang southwards. Press fire when near a clue +to see what it means. Don't take too long! ] ;œœœadded. +[763:when the bell goes, push forwards to draw, and then steer +the gunsight onto the other guy. Press FIRE to shoot him. ] ;œœœ +;[761:set off to hunt down the gang. ] ; tracking game +;[762:escaped from the bank. ] ; Billy bank escape +;[763:set off to ambush Billy. ] ; prevent Bank robbery game. +[764:set off to take the cows to the Indians. ] ;|||| +[765:Press fire and down to duck, fire and up to raise your +head above the barricade. Shoot as many of the bad guys as +you can. You can't shoot or be shot so long as you keep your +head down. ] ;œœœ +[766:Press right//left to move sticks of dynamite, and press +FIRE to light the fuse. But how many do you need? ] ;œœœ + +; responses... +;[851:rode off. Press fire. ] ; result of 652 +;[852:had finally come to a decision, and rode into town. ] +;; result of 652 under other circumstances (***debugging) +[853:called for drinks on the house. That sure made him popular. ] +[854:went upstairs with the saloon girl... ] +[855:offered the bribe. ] +[856:handed over some money. ] +[857:Billy headed back to the hideout to round up the gang, +and burst into the bank in force... ] +[858:Billy started to draw his gun, but realised that without +a gang to back him up he hadn't a hope. ] ;||| try to rob bank +; without having contacted a gang first. +[859:Billy started to ride off, but realised that without +a gang free to back him up he hadn't a hope. ] ;||| try to rob train +; without having contacted a gang first. + + +; invitation to train robbery (less common, so one only)... +[867:"There's gonna be a whole heap of gold on that train tomorrow. +Why, if a body had a mind to, he could catch it real easy at the +gradient". ] ; œœœ punc +[868:the safe contained ] ; followed by amount of gold, 869. +[869: dollars in gold. ] +[870:"We've been robbed by Billy The Kid - so don't ask to make +a big withdrawal! "] +; when Billy goes into a bank he's recently robbed. +[871:"We've been robbed. I hope you've come to make a deposit". ] ; œœœ punc +; when Billy goes into a bank another gang has recently robbed + +; GENERAL MESSAGES ||| +[872:owned $] ;preceded by PlayersName, followed by amount, 873 ||| +[873:. ] ; after 872/amount. ||| +[874:A voice called out "Get outa here - we're closed!" ] ;||| +; try to go into buildings which are just scenery. +[875:Billy decided not to go into the Sheriffs office, just +to be on the safe side. ] ; ||| +[876:"You deaf or something, boy?" ] ; œœœ ask same person a second +; question ; œœœ punc +[877:"I said, YOU DEAF OR SOMETHING, BOY?" ] ; œœœ ask same person a second +; question ; œœœ punc +[878:"Can't stand around jawing all day. Be seeing ya". ] ;œœœ ; œœœ punc + + + + + + +; Saloon bits and pieces... +[899:"Prepare to draw, varmit". ] ;||| challenged to duel whilst outside. ; œœœ punc +[900:"I hear you play Monte. D'you want to deal?" ] ; œœœ reworded +[901:"Some other time, pard." ] ; refuse to play monte. ; œœœ punc +[902:Accuse the varmit of cheating. ] ; Monte +[903:Forget it. ] ; After Monte game +[904:"I'll meet you on the street". ] ; what Billy says if he decides +; to fight the duel. +[905:"OK, Yellabelly. Just crawl outa here fast, or I'll plug you". ] ; œœœ punc +; climb down instead of fighting duel. +[906:"Yeh, well... I guess I'll help ya... ] ;|||trailing quote removed +; threaten, agrees to give info. ; œœœ punc +[907:"Gee, I'd surely like to help ya, but I don't know nuthin'!" ] ; œœœ punc +; threaten, but doesn't know anything. +[908:"You trying to push me around, you saddle bum? Let's settle this +right now, gun-to-gun". ] ; |||no longer mentions outside ; œœœ punc +[909:"What'll it be, friend?" ] ; barman offers drinks ; œœœ punc +[910:"Wanna place a bet, friend?" ] ; roulette ; œœœ punc +[911:put his money on the table. The wheel span, and as it stopped +the ball sprang sideways into 00. That table surely was crooked! ] +[912:Accuse the croupier of cheating. ] ; roulette table. +[913:Forget it. ] ; roulette table. +;|||[914:I'll see you outside. ] ; what Billy says if he decides +;; to challenge +[915:"I'm ] ; then player's full name +[916:", the reply came back: "I'm ] ; name chosen from 1000... +[917:". ] ; after 916, name. +[918:"Nobody tells me nuthin'." ] ; unthreatened, just knows nothing +[919:"I ain't telling you nuthin' about anythin', bud!" ] ; refuses +; to tell Player, in response to "talk" option on menu + +; MESSAGES FOR FIRST MEETING VARIOUS TYPE OF PEOPLE... +; a group of 10 messages from a cowardly person... +; a group of 10 messages from a greedy person... +; a group of 10 messages from anyone else... +; +; cowardly meeting... +[920:"Why, hello stranger". ] ; œœœ punc +[921:"Well, howdy mister". ] ; œœœ punc +[922:"Welcome, stranger". ] ; œœœ punc +[923:"Er, greetings stranger". ] ; œœœ punc +[924:"Er, howdoo young fella". ] ; œœœ punc +[925:"Er, hello pardner". ] ; œœœ punc +[926:"Er, howdoo stranger". ] ; œœœ punc +[927:"Er, good day to you, pardner". ] ; œœœ punc +[928:"Er, howdoo stranger". ] ; œœœ punc +[929:"Er, hello young Sir". ] ; œœœ punc + +; greedy meeting... +[930:"Hello stranger". ] ; œœœ punc +[931:"Howdoo stranger". ] ; œœœ punc +[932:"Hi there, stranger". ] ; œœœ punc +[933:"Good day, pardner". ] ; œœœ punc +[934:"Hello stranger". ] ; œœœ punc +[935:"Hello friend. You new around here?" ] ; œœœ punc +[936:"Hello there, boy. You want anything from me?" ] ; œœœ punc +[937:"Greetings stranger. You wanting something?" ] ; œœœ punc +[938:"Hello stranger. Can I help you some?" ] ; œœœ punc +[939:"Howdy pardner. You needing some help?" ] ; œœœ punc +; +; normal, well-balanced people... +[940:"Hello pardner". ] ; œœœ punc +[941:"Howdoo stranger". ] ; œœœ punc +[942:"Hi stranger". ] ; œœœ punc +[943:"Greetings stranger". ] ; œœœ punc +[944:"Howdoo stranger". ] ; œœœ punc +[945:"Hello pardner". ] ; œœœ punc +[946:"Howdy stranger". ] ; œœœ punc +[947:"Goodday stranger". ] ; œœœ punc +[948:"Howdoo friend". ] ; œœœ punc +[949:"Hello stranger". ] ; œœœ punc + +[950:"Howdy Pat". ] ; œœœ punc +[951:"Howdy Billy". ] ; meet someone again. ; œœœ punc +[952:Sheriff Pat Garrett`] ;œœœ last bit moved to 975ish + +[953:Billy The Kid`] ; copy of message 2||| MENU OPTION +[954:Who do you want to play?` `(Press FIRE or SPACE). ] ; |||opening question. œœœ reworded +[955:Pat, you must track down and capture all the outlaw gangs. Talk +to people for information. And when in a sheriffs office, check your +deputies are where they're wanted.` `(Press FIRE or SPACE). ] ;||| œœœ reworded +[956:Billy, you must try to bankrupt the Murphy-Dolan gang. Rob +their banks and steal their cows. Talk to people for information. +And try to steer clear of the law.` `(Press FIRE or SPACE). ] +;||| œœœ reworded +[957:"Oh, it's you again". ] ; ||| meet someone again that you +; haven't been introduced to. ; œœœ punc +[958:"Clear off buster, I don't associate with your kind". ] ;||| +; meet someone again who we didn't get on with last time! + + +;[951:"I don't deal with your kind, lawman". ] ; Pat tries to talk to +;; someone he is very unpopular with. +;[952:"I don't have nothing to do with outlaws". ] +; likewise Billy. +; +;[953:"What can I do for you, stranger. ] ; either player +;; talks to someone for the first time, when they are not +;; very well known (i.e. at the start of the game). + +;[954:Ain't you Billy the Kid? Anything I can do to oblige you? ] +;; meet's someone for the first time when better known +;[955:well, if it isn't Sheriff Garrett. What can I do for you, sir? ] +;; meet's someone for the first time when better known + +;; meet someone who is inclined towards/neutral towards player + + +[960:] ; header for 960..990 messages. |||quote removed +[961:." ] ; terminator for 960..990 messages. +[962:I hear ] ; always followed by gang name. +[963:just robbed the bank in ] ; followed by town name +[964:just rustled some cows from ] ; followed by ranch name +[965:hideout is right near ] ; preceded by gang name, followed by town +; name. +[966:Folks tell me there's a pile of money at the bank in ] +;|||moved to 972. [967:I hear say there are x deputies stationed at ] +[968:"There's a widow woman over at ] ; œœœ punc +[969:who needs help". ] ; œœœ punc +[970:"I'm being run off my land by Murphy. I need help!" ] ; œœœ punc +[971:"That gunslinger over there is threatening me and my folks. +Kill him, won't ya?" ] ; œœœ punc +[972:there are ] ; followed by number, 973||| +[973: deputies stationed at ] ; after 972/number, before town name.||| +[974:2-PLAYER GAME (Use UP//DOWN to select, +then press FIRE or SPACE). ] ; œœœcopy of message 1||| MENU OPTION AT START OF GAME +[975:Trying serial connection. ];^^^ (press FIRE to give up). ] ;œœœ œœœ punc + + + +; 1000+Location number for various places that people can +; mention things happening. Events can include train + +; contents, contents of banks, number of deputies in +; various towns, gang locations, recent robberies, +; subplot hints: e.g. Widow women needing help(!) +[1010:Santa Fe. ] ; Santa Fe 10 +[1011:White Oaks. ] ; Albe'que 11 +[1012:Lincoln City. ] ; Lincoln City 12 +[1013:Mesilla. ] ; Las Cruces 13 +[1014:Roswell. ] ; Roswell 14 +[1015:El Paso. ] ; 15 + +[1039:the express train. ] ; 39 +[1040:the wagon train. ] ; 40 + +; messages where someone tells one of the players +; about various robberies, train/bank, that are +; planned during the next little while. +[1041:the Cooper Gang] ; 41 Santa Fe ; œœœ punc +[1042:Socorro Vaqueros] ; 42 White Oaks ||| ; œœœ punc +[1043:the Seven Rivers Gang] ; 43 Lincoln City ; œœœ punc +[1044:the Dona Ana Bunch] ; 44 Mesilla ; œœœ punc +[1045:the Jesse Evans gang] ; 45 Roswell ; œœœ punc +[1046:the fugitives] ; 46 El Paso ; œœœ punc +[1047:the Regulators] ; 47 Near Fort Sumner ||| ; œœœ punc +; +; names for white American Males (young/old)... +; other possible formula names are... +; ... the rat + +[1100:honest Jake] ; œœœ punc +[1101:cookhouse Charlie] ; œœœ punc +[1102:Jericho Jake] ; œœœ punc +[1103:little Joe] ; œœœ punc +[1104:Black Jake] ; œœœ punc +[1105:Trapper John] ; œœœ punc +[1106:Prairie John] ; œœœ punc +[1107:long tall John] ; œœœ punc +[1108:Johnny Reb] ; œœœ punc +[1109:Omaha John] ; œœœ punc + +[1110:Sam Peckinpaw] ; œœœ punc +; ** also name on a grave in Fistful of Dollars ** +[1111:Cornish Sam] ; œœœ punc +[1112:snake-eyes Sam] ; œœœ punc +[1113:Yosemite Sam] ; œœœ punc +[1114:slippery Sam] ; œœœ punc +[1115:Ledger Bill] ; œœœ punc +[1116:Arkansas Will] ; œœœ punc +[1117:Hotel Bill] ; œœœ punc +[1118:Bronco Bill] ; œœœ punc +[1119:Tom Destry] ; œœœ punc +; ** as in Destry Rides Again + +[1120:Rowdy Yates] ; œœœ punc +; ** Clint Eastwood's role in Rawhide + +[1121:mad Mike] ; œœœ punc +[1122:Texas Mike] ; œœœ punc +[1123:mustang Mike] ; œœœ punc +[1124:Howard Johnson] ; œœœ punc +; ** as in Blazing Saddles +[1125:mule-skinner Jim] ; œœœ punc +[1126:Louis L'Amour] ; œœœ punc +; ** Western novelist +[1127:cool-hand Jim] ; œœœ punc +[1128:the Swede] ; œœœ punc +[1129:Bernardo O'Riley] ; œœœ punc +; ** Bronson's role in the Magnificent Seven +; +[1130:Slim Pickins] ; œœœ punc +[1131:Mexico Pete] ; œœœ punc +[1132:Two-gun Pete] ; œœœ punc +[1133:Billy-Joe Bob] ; œœœ punc +; ** character in Fresno +[1134:Teacher Pete] ; œœœ punc +[1135:Red River Nick] ; œœœ punc +[1136:Nebraska Nick] ; œœœ punc +[1137:tricky Nick] ; œœœ punc +[1138:lucky Luke] ; œœœ punc +; ** Goscinny & Uderzo hero +[1139:Navaho Nick] ; œœœ punc +; +[1140:honest Dave] ; œœœ punc +[1141:dead-eye Dick] ; œœœ punc +[1142:Kansas Dave] ; œœœ punc +[1143:dainty Dave] ; œœœ punc +[1144:dynamite Dave] ; œœœ punc +[1145:red-eye Bert] ; œœœ punc +[1146:bull-whip Bert] ; œœœ punc +[1147:slick Bert] ; œœœ punc +[1148:Frenchie Dupont] ; œœœ punc +[1149:Duke Wayne] ; œœœ punc +; ** John Wayne nicknamed Duke +; + +; new names for extra subplots... +[1160:Whiskey Pete] ;||| ; œœœ punc +[1161:Joe Dunn] ;||| ; œœœ punc +[1162:Joe Grant] ;||| ; œœœ punc +[1163:Karl Bekkert] ;||| ; œœœ punc +[1164:Jack Shoe] ;||| ; œœœ punc +[1165:Ben Davis] ;||| ; œœœ punc +[1166:Warren Oaks] ;||| ; œœœ punc +[1167:Wayne Rodgers] ;||| ; œœœ punc +[1168:Ash Upton] ;||| ; œœœ punc +[1169:Chief How] ;********* at Mescalero Apache ;||| +[1170:Rick Sands] ;||| ; œœœ punc +[1171:Rick "Two Fingers" Rider] ;||| œœœ ; œœœ punc +; +; names for American Females... +; call girls (10)... +[1200:Honey Bun] ; œœœ punc +[1201:Sarah Jane] ; œœœ punc +[1202:Fast Sally] ; œœœ punc +[1203:Long tall Kerri] ; œœœ punc +[1204:Saucy Miss Cockwell] ; original wording at Kerri's request! +[1205:Sweet Charity] ; œœœ punc +[1206:li'l Mabel] ; œœœ punc +[1207:Nice Nelly] ; American slang for excessive propriety +[1208:Annabel Lee] ; œœœ punc +[1209:Dizzy Lizzie] ; œœœ punc +; + +[1210:Laura Picket] ;||| ; œœœ punc +[1211:Wilma Dunn] ;||| ; œœœ punc +[1212:Miss Rosy] ;||| ; œœœ punc +[1213:Lavinia Strumpet] ;||| ; œœœ punc +[1214:Mrs McSween] ;||| ; œœœ punc +[1215:Paulita Maxwell] ; Billy/Pat's girlfriend. +;------------ +; subplot messages + +[1490:Barney Mason rode up and said, "] +[1491:Pat, it's the end of the month, and the wages just arrived. +We've doling them out now, but you can change the budget for +next month if you like. Just come into the sheriff's office in +Lincoln and see how we're spending the money". ] ;œœœ + + +; Mexican peasant going to be run off his land by Anglo ranchers +[1500:"The Greengo ranchers, they try to drive me off my farm! Help me +fight them!" ] +[1501:"May the Blessed Virgin bring a thousand curses upon you". ] ; no to 1500 + +; lady in saloon being pestered by notorious gunslinger +[1503:"There's a gunslinger over there who don't know how to treat +a lady right. Teach him a lesson, Big Boy and I could show you +a good time". ] ;œœœ reworded from... ; œœœ punc +;; "This gunslinger don't know how to treat a lady right. Will you teach him +;; a lesson, Big Boy?" ] + +[1504:the lady looked disappointed. ] ; no to 1503 + + + + + + + + + + + + + +; Mexican picked on by cowboys... +[1506:"These cowboys, they picking on me. You make them stop, Senor?" ] +[1507:The Mexican looked disappointed. ] ; no to 1506 +[1508:The cowboys walked off, saying, "We're gonna get you for this" ] +; yes to 1506 ; œœœ punc + +; sick man in desert... +[1509:"Help me - my horse is dead, I'm out of water and plumb near dead". ] +;|||mentions reason for being in trouble. ; œœœ punc + +[1510:The man collapsed in despair. ] ; no to 1509 +;|||1511 moved to 1700 ; œœœ punc + + +; army being cheated by MD's subplot +[1511:"Howdoo pardner. I'm Ash Upton. How can I be of service?" ] ;||| Store +; in Lincoln ; œœœ punc +; Soldier at Fort Sumner - army are being cheated by Murphy- +; Dolan's +[1512:"The army are being cheated by the Murphy-Dolans on the meat +contract". ] ; œœœ punc +[1513:"What the heck brung you here? Draw, you son of a bitch". ] ; œœœ punc +; Billy goes into store whilst MDs present +[1514:"Get out of here, lawman. You ain't welcome". ] ; ; œœœ punc +; Pat goes into store whilst MDs present. +[1515:hunted through some papers and came up with the real account +books for the Murphy-Dolans. Now to show them to Colonel Baxter... ] +; pat/billy goes into the MD store whilst they're away. +[1516:showed the books to Colonel Baxter. He was livid and vowed to +prosecute the Murphy-Dolan's with the full force of the law. ] +; go to Fort Sumner with books. +[1517:"I can't go to the Colonel until I got proof - maybe you could +get hold of their books from the store in Lincoln?" ] +[1518:SEARCH FOR BOOKS. `] ; menu option in MD store +;;||| [1519:found the books and hid them in his jacket. ] ; find books in store +[1519:The store was deserted. ] ;||| go there when MD's / Ash not there + +; Pat is about to defeat a gang in a shootout, +; their leader calls a truce and barters their escape +[1520:The gang leader waved a white flag and called out: ] ; +; followed by one of 1521..1523 +[1521:"Pat - let us go and we'll tell you when Billy's planning the +next robbery". ] +[1522:"Pat - let us go and we'll leave the territory". ] +[1523:"Pat - let us go and we'll tell you where there is a stash of +gold buried". ] +; and responses to 1521..1523 if Pat accepts the offer... +[1524:"Thanks Pat - we'll be seeing you". They rode off. ] ; œœœ punc +[1525:"Buenos dias Senor. Now we head for Mexico". ] ; œœœ punc +[1526:"It's on the east side of the Pecos, at a deserted prospector's +camp". They rode off. ] +[1527:"Then we fight to the death". ] ; œœœ punc + +; Pat meets Texan posse in desert. Player can choose to +; lie that Billy has stolen Texan cattle. +[1529:Pat met a Texan posse looking for rustlers. What did he tell +them about Billy? ] ; intro message +[1530:HE STEALS TEXAN CATTLE `] ; menu option|||upper case +[1531:HE IS AN OUTLAW `] ; menu options - keep short. |||upper case +[1532:the posse offered to ride along as deputies, for the time +being. ] ; Pat lies about Billy stealing Texan cattle + + +[1533:The posse wished Pat good luck, and were right sorry +they couldn't help. ] ; Pat says Billy is an outlaw only. +[1534:Barney Mason rode up and said, "Pat, another man from that Texan +posse had to high-tail it outa town. You'd better get into +town and check the budget". ] ; |||now mentions Barney Mason, budget + +; Barney Mason reports the escape of an outlaw +; from Santa Fe - Pat can track him unaided for a reward. +[1535:Barney Mason rode up. "Pat - an outlaw's just busted out from +Santa Fe. Ride with me now, and I'll put you on his trail. "] +[1536:Barney rode off. ] ; no to 1535 +[1537:Barney lead Pat at a gallop to the head of a winding valley, +then left him to track the fugitive on his own. ] ; yes to 1535 +[1538:Pat took the outlaw in and claimed the $100 reward. ] +; get the outlaw. + + +; shootout message groups: intro/win/lose 1540..1569 +[1540:"Hurry! We must fight them!" ] ; yes to 1500 +[1541:"Muchos gracias, Senor. Now my farm is safe". ] ; œœœ punc +[1542:The peasant had been hit by a bullet. He died without saying a +word. ] ; œœœ punc + + + + +; duel message groups: intro/win/lose 1570..1599 + +; gunslinger bothering lady (1503) +[1570:The gunslinger slowly turned around and started to head for the +door... ] ; yes to 1503 +[1571:The gunslinger slumped to the floor... ] +[1572:the bullet struck home, bringing merciful blackness. ] +; invitations to duel in saloon + +[1573:"So you're the guy that drilled my +kid brother in the back, Mister Big Shot. Wanna settle this +outside?" ] ;||| Warren Oaks +[1574:"They say you're pretty fancy with +that six-gun of yours, Mister. But I reckon you ain't. Wanna take +me on outside?" ] ;||| Wayne Rodgers +[1575:"I seeze you undressin' my Mary-Jane +with your eyes, buster! Wanna settle this like a Man?" ] ;||| Karl Bekkert + + +; +; Pat is accosted by a local mayor with request for more protection +[1600:a pompous mayor walked up and shouted, "Sheriff Garrett, +this town's gotta have more protection. I want at least one more +deputy here before you leave us.] ;||| now mentions appearance ; œœœ punc +[1601:"OK, I guess that'll have to do". ] ; œœœ punc +[1602:"The people of this town ain't gonna be happy about this". ] ; œœœ punc + +; The same mayor asks Pat to run a vagrant out of town +; to enforce a bogus claim against the prospector (?) +[1605:A pompous mayor walked up and shouted, "Sheriff Garrett, there's +a vagrant I want run outa town. The varmit says he owns a claim +that one of my friends has a mind to". ] ; œœœ punc +[1606:Pat helped the mayor, and drove the vagrant out of town. But he +surely didn't feel good about doing it. ] +[1607:Pat refused, saying that even a vagrant has his rights. ] + +; Pat encounters an outlaw whilst tracking +; ++ In scrolling game ++ + +; At Siege, Carlyle runs in. +; ++ In arcades game ++ + +; Pat meets outlaw gang in an old Building. +; ++ In arcades game ++ + + + + + + + + + + + + + +; Billy Only encounters... +[1610:"Paleface, we greet you. Beef promised us by treaty, +Murphy-Dolans send us scraps. My people starve". ] ;|||no longer mentions Billy +; comment from Indian chief. +[1611:do you want to try to take these cows to the Indian Reservation? ] ; +; when double-click on Longhorns, after seeing 1610. +;[1612:the Indian chief rode up: "How, red man's friend?". He thanked +;Billy for the beef and offered to fake an uprising, if needed, to +;distract Pat in the future. ] ; +++ Moved to scrolling games |||| +[1613:FAKE UPRISING. `] ; extra MENU option. +[1614:"Yes paleface, for you we make lawman think we on warpath". ] ; œœœ punc + ;^^^ Billy->paleface + +; meet Widow Woman who wants ALL BILLY'S MONEY (quel surprise) +[1620:"Oh Sir, I'm jest a poor widow woman. If I can't pay the bank, +I'll be thrown off my little farm and have to go a-begging in the +streets. It ain't no more than $1000] ; followed by amount of gold +[1621:; that surely ain't nothing to a rich man like you". ] +[1622:"O thank you sir. I'll always be a-thinking on you". ] +; yes to 1620 +[1623:"O no! My last hope is gone - I'll be in the poorhouse till the +end of my days". ] ; no to 1620 + +; Desert peasant meets Billy and entices him to his house +; with story that family is sick. While Billy stays there, +; an outlaw arrives wit news of a gold consignment at +; the local bank, but it's a bluff - if Billy leaves to +; travel there, he gets challenged in the street by a bounty +; hunter. (Note: there may or may not be gold in then bank) +[1630:A peasant rode up: "Senor Billy, my family are sick. I no can +make them better. Please, you come try and help them". ] +[1631:he rode off with the peasant and stayed at his farmhouse; +fetching and boiling water and cooking for the family. +After a few days, they were recovering and was +about to leave when there come a knocking at the door... ] +; yes to 1630 (|This is Followed by 1633) +[1632:"Oh pity me, my family will surely die". ] ; no to 1630 +; 1633 moved to 1701||| +[1634:a bounty hunter was lying in wait. "Gotcha! you dumb +saddlebum - you've been set up! I'm gonna take you in, +dead or alive! Draw! ] +; meet Bounty hunter in town, after 1630/1631/1633 + + + + +; ambush by Buckshot Roberts +[1640:As he rode near a farmhouse, a huge man stepped out from +behind a rock: "There's folks as wants to talk to ya. I'm takin' you +in. The name's Roberts - +Buckshot Roberts. I'm a bounty hunter - an' I've taken in fifty scum +like you already, and you're gonna make it fifty-one. ] +;||| removed: You coming quiet? ] + +;|||moved to arcades.[1641:although Buckshot Roberts must have stopped half a dozen +;|||bullets, he still found strength to climb onto a horse and ride off. ] + + + + + + + + + + + + +; win gunfight +++ Move to arcades? + + +; Seven Rivers gang ambushes Billy/Pat in town. +[1645:Suddenly shots started to ring out. He dove for cover. On the +other side of the street, gunslingers hired by the Murphy-Dolan gang were +shooting at him! ] ; |||no longer mentions Billy ^^^now murphy-dolan, +; not seven-rivers + +; Jesse Evans gang ambushes Billy in town. +[1646:Suddenly the air rang to the crack of gunshot. He leapt for +cover. Across the street, he could see some badmen +throwing lead at him! ] ;|||no longer mentions Billy ^^^no longer +; mentions Jesse Evans Gang + +; Tom Cooper offers Billy lots of counterfeit money +; instead of his share in a robbery. +[1650:Tom Cooper said, "Billy, how'd you like 5 times your share of +this robbery - in counterfeit bills. There's a tenderfoot called +Duncan, spreading it around. It's a good looking paper. Won't give you +no problems if you spend it careful. What d'you say". ] +[1651:Cooper smiled: "Say, that's great. Here's the sack of money". +Billy pondered on it. How could he use it most easily? ] +[1652:BUY CATTLE WITH IT. `] ; menu option after 1651 +[1653:SPEND IT NORMALLY. `] ; menu option after 1651 +[1654:Cooper counted out Billy's share and rode off. ] ; no to 1650 + +; when Billy is in Lincoln City Saloon, he overhears that Sheriff +; Brady is on his way to ambush McSween. +[1660:he heard something that made him prick up his ears."You +know that no-good sheriff Brady's gonna run Mrs McSween off her ranch. +Ain't that the devil! But what can we do?" ] +[1661:Good Mrs McSween! An old friend, and a friend of the late +lamented Tunstall! One of the last alive to stand against the Murphy- +Dolans! What now? ] ; after 1660 ;œœœ no longer mentions Billy +[1662:DO NOTHING. `] ; menu option. +[1663:STOP BRADY. ] ; menu option. ->1664 + +[1664:he ran from the saloon and found Brady heading out of town. +He caught up with him and pulled him from his horse. Brady got up, +shaking with anger. It was obvious he was going to draw. ] +; stop brady from 1663 + +; Jose Miguel Sedillo, a friend of Billy's from way back, tells +; him of an attempted horse-robbery on Tunstall Ranch, +; while this is being run by Mrs McSween. +[1670:Jose Miguel Sedillo - an old and +trusted friend - rode up. "You must go help Mrs McSween - the +Murphy-Dolan's are there right now. They try to steal her cattle".] +;||| wording changed to make non-Billy specific + +; do nothing or... +[1671:GO THERE. `] +[1672:they rode off and got ready to fight... ] ; selects 1671: +;goes into shootout. + +; meet Joe Grant,. drunk in a saloon. + + + + + + + + + + + + + +[1674:Joe Grant staggered out of a back room, plainly drunk. "Hey Kid! +You know I'm the fastest gun in the West now. Lookee here at this +pearl-handled pistol I just - er - got gived". ] +[1675:He handed over the +pistol. It surely was pretty, but wouldn't be powerful enough to stop +a mosquito. Only three chambers were loaded. What did he do? ] +; nothing or... +[1676:ROTATE THE BARREL TO AN EMPTY CHAMBER. `] ; menu option +[1677:he turned the barrel and handed the gun back. ] +[1678:Joe Grant was waiting outside. He seemed to have gotten sober +real quick. He snarled "Draw, you prairie dog". ] +[1679:he handed the gun back. ] ; don't play with chambers + +[1680:"Beat it, we don't want none of Tunstall's men hereabouts". ] +; Billy meets hostile soldier + +; meet Mrs McSween +[1681:"Why hello old friend - how're you keeping". ] ;|||no longer mentions billy +[1682:"Gotta get going. This place keeps a body busy". ] +; follows 1681 + +; meet prospector +[1683:"What do you want, stranger? You another claim jumper?" ] + +; take sick man to santa fe +[1684:when they arrived with the sick man clinging to the horse, +he said "thanks for the ride Pard" and staggered off. ] |||^^^no longer +; mentions Billy + +; take sick man somewhere other than Santa Fe + +[1685:when they arrived with the sick man clinging to his horse, +the sick man cursed him for not going to Santa Fe and +staggered off on his own. ] ||| + +[1686:"Sheriff, can you come back later. We're real busy right now". ] +; Pat meets hostile soldier/rancher. ||| copied, slightly changed from 1680 + + + +; messages which result in player being thrown back to map... 1700..1729 +[1700:the man struggled onto the horse, and clung on weakly. He +gasped "Take me to Santa Fe, Mister. I got folks there". ] ; |||now mentions Santa Fe. +; yes to 1509 +; if visit Santa Fe next, get 1684, otherwise get 1685. +[1701:An outlaw burst through the door, brandishing a gun! He saw +Billy and dropped it in terror. "Billy the Kid! Don't kill me please, +I didn't mean ya no harm. Look, I'll help ya. The bank at White Oaks +just had a big payroll for a ranch thereabouts. Git +down there now, ya can pick up a whole load of money". ] ; follows +; 1631 ;||| moved from 1633 + + + +; Pat's strategy game messages... +; Go into sheriff's office... +;|||[1800:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||can I do for you?" ] +;|||[1801:move deputy to reserve. `] ; take deputy away from town +;|||[1802:move deputy to town. `] ; station deputy in this town. +;|||[1803:ok. ] +;|||[1804:there are ] ; followed by number of deputies +;|||[1805: deputies in town. ] ; follows 1804/digit +;|||[1806: deputies in reserve. ] ; follows 1804/digit +;|||[1807:Pat got a reward of ] ; followed by number: amount of dollars +;|||[1808: dollars. ] ; follows number. +;|||[1809:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||are you going to do to calm down the people in this here town?" ] +; people are upset about level of crime. +[1810:"the people sure are not gonna be happy about this." ] +[1811:And so the west was won. Pat had brought Law to +his domain, and was respected throughout the land. ] ; win message +[1812:And so Pat died in obscurity - known only by a few +historians who read dusty books about the Wild West. ] ; lose message + +[1813:Barney Mason rode up: "Pat, the county has run out of money. +I took temporary charge while you were away, but I had to fire +some deputies. You'd better get into town real quick and sort +it out". He rode off again. ] ; ||| +[1814:Barney Mason rode up: "Pat, there's trouble brewing. +People are saying you're doing no good as sheriff. You'd +better get into the office and do something". ] ;||| +[1815:Barney Mason rode up: "Pat, you finally got it wrong. You've +lost the election. Sorry old friend, you're no longer Sheriff". ] ; ||| + +;Billy strategy messages + +[1850:And so Billy became a legend. His reputation was known +throughout the world, and his story was oft repeated +by people of all countries. ] ; win message +[1851:And so Billy died in obscurity - known only by a few +historians who read dusty books about the wild west. ] ; lose message + +[1852:WANTED! Billy The Kid, Dead or Alive. Reward $]|||| +[1853:. ] ; after 1852/number||| +[1854:was stopped on the way. He pulled up his horse +and dismounted... ] ; Actors name, 1854. Used when +; get a random event whilst trying to go somewhere from map. |||| +; messages to do with meeting a gang... + +[1855:"Hey Billy, come share some coffee"... ] ;||| then 1856 ; œœœ punc +[1856:Billy sat down with the gang and talked of daring deeds +and famous crimes. Then he asked the crucial question... +"I've got a real sweet job planned. You want in?". The gang +looked at Billy. Should they trust this young hotblood? ] ;||| +; 1856, 1857 ||| +[1857:their leader spoke "Sure, but we'll want a good big cut. Now get out of +here before I change my mind". ] ;||| +[1858:Billy and the gang went over and over the targets they +could hit, but they couldn't agree which should be next... ] ; ||| visit gang again +;œœœ made "meaner" + + +; get spotted by a deputy in a lawful town... +[1859:down the street, a deputy called out, "Billy The Kid - hold it +right there. You gonna come quietly?" ] ;||| ; œœœ punc +[1860:RUN AWAY `] ; ||| menu option +[1861:IGNORE HIM `] ; ||| menu option +[1862:Billy fled the town. ] ; run away ||| +[1863:"Go for your gun, outlaw." ] ;||| + +[1864:woke to see his ex-girlfriend Paulita Maxwell tending +his injuries. "You should take more care, my love. Next time +could be your last". With her loving care, he was soon ready to go +again. ] ;&&& note either Billy/Pat. Preceded by Players Name +[1865:Suddenly, Pat Garrett burst in. ] ;&&& +[1866:"Billy, you know I can't +take you in. They'd hang ya like a dog, and I can't stand by and let that +happen. We'll have to settle this now, gun-to-gun. Draw, +outlaw". ] ;&&& +[1867:Billy and Pat approached other and exchanged glances. +Both knew that they were sworn enemies, but also old friends. +Was this to be the end for one of them? ] ;&&& +[1868:CHALLENGE TO DUEL. `] ; menu option &&& +[1869:AVOID CONFLICT. `] ; menu option &&& + + +; messages which occasionally replace the standard greetings +[1870:"Hey, it's Pat Garrett. I hear you polled ] ;||| for Pat ; œœœ punc +[1871:"Hey, it's Billy the Kid. I hear your reward is now $] ; |||| ; œœœ punc +[1872: votes". ] ;||| follows 1870 ; œœœ punc +[1873:". ] ; ||| follows 1871/amount of money ; œœœ punc + +[1880:"Hey, It's Billy The Kid! Get him boys!" ] ; occasionally +; when you go into a bank, or other law-abiding place +; in town. Leads to escape game. ||| +[1881:(lawful) ] ; added to town name on map +[1882:the place was completely deserted. ] ; ||| visit a ranch +; etc. which has gone bust, or similar. + + +; messages Billy gets when gangs go out of business +[1890:Tom O'Foliard rode up and said, "hello old friend, ] ;||| ^^^ +; now now longer mentions Billy + +[1891:the Cooper Gang have been brought to justice". ] ;||| +[1892:the Socorro Vaqueros gang has been brought to justice". ] +[1893:the Seven Rivers Gang gang has been brought to justice". ] +[1894:the Dona Ana Bunch gang has been brought to justice". ] +[1895:the Jesse Evans gang has been brought to justice". ] +[1896:the fugitives' gang has been brought to justice". ] +[1897:the regulators' gang has been brought to justice". ] + +[1900:"Ain't nuthin going on around here". ] ; knows of no ||| +; relevant events in this town. +; Tom O'Foliard's comments on Billy's progress. +[1901:you've gotta hurry up. The Murphy-Dolans are taking over +the county, and you've gotta stop 'em". ] ; œœœ punc +[1902:you've got the Murphy-Dolans on the run. Keep going +ol' buddy". ] ; œœœ punc +[1903:you've almost nailed the Murphy-Dolans, my friend. But +Pat's almost got the territory cleaned up, so you'd better pull +off some pretty big heists to finish 'em off". ] ; œœœ punc +[1904:Billy, you've stolen a total of $] ;^^^Billy added at start (not +; an important change) +[1905: which has bankrupted ] +[1906:of their ranches, but ] +[1907:of the 6 important gangs have been wiped out". ] ; œœœ punc + +; ratings added ^^^^ +[1920:Billy's final reward was $] +[1921: out of a maximum of about $15000, and he will ] ;^^^^ + +[1922:not be remembered. ] +[1923:be a dim memory. ] +[1924:be a figure of fun. ] +[1925:be remembered by many. ] +[1926:be remembered by most. ] +[1927:be a minor hero. ] +[1928:be a popular hero. ] +[1929:be a household name till the end of time. ] + +; ratings added ^^^^ +[1930:Pat's final popularity was ] +[1931: votes out of a maximum of about 4000, and he will ] ;^^^^ + + +;------------------ +;; [2000:Billy The Kid Intro screens. ] +[2001:"Well if it ain't momma's boy Billy! Let's see how good you are +now. Draw, Kid!" ] +[2002:Tunstall Ranch in Lincoln County, across the state line. ] +[2003:"...Murphy and Dolan are dangerous men, Mr Tunstall." ] +[2004:"I ain't gonna let their threats worry me, Sheriff Garrett. I'm +too riled up about the way they're cheating honest farmers." ] +[2005:"Hey now! Here's someone who might be a help. Where've you +been these past years, Billy? John Tunstall, meet the Kid, an old +friend of mine and a good man in a fight." ] +[2006:"I'd like you to join my men, Billy. Here's my lucky Silver +Dollar on account. Keep it safe." ] +[2007:"Pat, Billy, there goes dinner!" ] +[2008:"Another good man dead! I swear I'll bring order to Lincoln +County and hunt down every last outlaw in it." ] +[2009:"You're wrong, Pat, you can't play it by their rules. If you +mean what you said, you'll be hunting me too. Because I vow to do +whatever I must to avenge this murder, inside or outside the law." ] +[2010:"The Legend of Billy The Kid" is an authentic Western for +one or two players. ] +[2011:As Billy, you might tie up your horse on Main Street, +swagger into the saloon, meet an outlaw gang at cards, and go +on to rob the bank... ] +[2012:...or raise money to help a poor widow by rustling a herd +of cows and driving them to Mexico. ] +[2013:As Pat you might learn of a planned train robbery from +the local drunk... ] +[2014:...and lead a posse after the outlaws, track them to their lair, +and shoot it out with the gang. ] + + + + + + + + +-------- + diff --git a/l9dev/regress/games.l9/billy.l9/movecurs.txt b/l9dev/regress/games.l9/billy.l9/movecurs.txt new file mode 100644 index 0000000..be6281f --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/movecurs.txt @@ -0,0 +1,291 @@ + begin + +;;--------------------------------------------------- +; check cursor checks for keypresses associated with +; crosshair movement in the shootup scenes. + +.CheckCursor + gosub @CheckKeys + +.ccNext2 +; check position of cursor on screen +.cursormove + if cursory > 10000 then toohigh + if cursorY > 200 then toolow + if cursorx > 10000 then tooleft + if cursorx > 316 then tooright + goto movethecursor +.toohigh + cursory = 8 + goto movethecursor +.toolow + cursory = 192 + goto movethecursor +.tooleft + cursorx = 8 + goto movethecursor +.tooright + cursorx = 316 + +.movethecursor + dx4 = crosshairacb + gosub @readacbdx4 + dv2 = cursorx + dv3 = cursorz + dv4 = cursorz + sub dv4,cursory + gosub @moveacbdx4 + gosub @CheckCursorSpeed + return + +;------------------------- end of cursor movement checks----------; + +;------------------------- cursor speed routines ---------------- +.CheckCursorSpeed + add TimeHeld,KeyHeld ; count for key kept pressed + if KeyHeld<>0 then sNotDecrease + goto sNotIncrease + +.sNotDecrease + if TimeHeld<2 then sNotIncrease ; key not held long, do + ; not increase cursor speed + add CursorSpeed,c2 ; increase cursor speed + TimeHeld = 0 ; reset check for key hold + +; then check to see if cursor speed exceeds its maximum + if CursorSpeed>MaxCursorSpeed then sLimit + if CursorSpeed=MaxCursorSpeed then sNotIncrease + if CursorSpeed0 then scursorend + TimeHeld = 0 + CursorSpeed = 4 + +.scursorend + keyheld = 0 + return +;---------------------------------------------------------------; + +;------------------------- key check routines---------------------; +.CheckKeys + gosub @sGetControls +; look at kbd/joystick/mouse and return +; dir as new movement direction in standard adventure format +; and FireKey=0 if not pressed, 1 if pressed. +; and FireKeyChange=1 if pressed/released this turn + +; and for directions, returns: +; x1 +; x4 x2 +; x3 +; Non-zero means trying to move in that direction +; and x5=x offset (single pixel movement), signed +; x6=y offset (single pixel movement), signed +; x7=direction number in standard adventure format +; i.e. 1 +; 8 2 +; 7 3 +; 6 4 +; 5 + XSpeed=x5 + YSpeed=x6 + + if FireKey=0 then ccNext1 ; if v2 <> 107 then ccNext1 + gosub @fire + +.ccNext1 + + + +;cif pc +; v1=104 ; keypad 8 +; gosub @MCkeyDown +; if v1<>0 then smoveup +; v1=71;103; keypad 7 +; gosub @MCkeyDown +; if v1<>0 then smoveup +; v1=72 ; cursor up +; gosub @MCkeyDown +; if v1<>0 then smoveup +; v1=73;105 ; keypad 9 +; gosub @MCkeyDown +; if v1=0 then sCursorNotUp +;.smoveup + + + &X1=WordWS(WordMouseXDistance) ; signed distance mouse has moved l/r + &X2=WordWS(WordMouseYDistance) ; signed distance mouse has moved u/d + &WordWS(WordMouseXDistance)=c0 + &WordWS(WordMouseYDistance)=c0 + add CursorX,X1 + add CursorY,X2 +;; or x1,x2 ; did mouse move in either direction? +;; if x1>0 then @mgcRepositionCursor + + + + if UpKey=0 then sCursorNotUp + keyheld = 1 + sub cursory,cursorspeed + +.sCursorNotUp +; v1=73;105 ;keypad 9 +; gosub @MCkeyDown +; if v1<>0 then smoveright +; v1=108 ; keypad 6 +; gosub @MCkeyDown +; if v1<>0 then smoveright +; v1=81;111 ; keypad 3 +; gosub @MCkeyDown +; if v1<>0 then smoveright +; v1=77 ; cursor right +; gosub @MCkeyDown +; if v1=0 then scursornotright +;.smoveright + if RightKey=0 then sCursorNotRight + keyheld = 1 + add cursorx,cursorspeed + +.sCursorNotRight +; v1=110 ; keypad 2 +; gosub @MCkeyDown +; if v1 <> 0 then smovedown +; v1=79;109 ; keypad 1 +; gosub @MCkeyDown +; if v1 <> 0 then smovedown +; v1=81;111 ; keypad 3 +; gosub @MCkeyDown +; if v1 <> 0 then smovedown +; v1=80 ; cursor down +; gosub @MCkeyDown +; if v1 = 0 then sCursorNotDown +;.smovedown + if DownKey=0 then sCursorNotDown + keyheld = 1 + add cursory,CursorSpeed + +.sCursorNotDown +; v1=71;103 ; keypad 7 +; gosub @MCkeyDown +; if v1 <> 0 then @smoveleft +; v1=106 ; keypad 4 +; gosub @MCkeyDown +; if v1 <> 0 then @smoveleft +; v1=79;109 ; keypad 1 +; gosub @MCkeyDown +; if v1 <> 0 then @smoveleft +; v1=75 ; cursor left +; gosub @MCkeyDown +; if v1 = 0 then @sCursormove +;.smoveleft +; if v1=0 then @sCursormove + if LeftKey=0 then sCursorNotLeft + keyheld = 1 + sub cursorx,CursorSpeed +.sCursorNotLeft +;cend + + +;cif st +; v1=104 ; keypad 8 +; gosub @MCkeyDown +; if v1<>0 then smoveup +; v1=103; keypad 7 +; gosub @MCkeyDown +; if v1<>0 then smoveup +; v1=72 ; cursor up +; gosub @MCkeyDown +; if v1<>0 then smoveup +; v1=105 ; keypad 9 +; gosub @MCkeyDown +; if v1=0 then sCursorNotUp +;.smoveup +; keyheld = 1 +; sub cursory,cursorspeed +; +;.sCursorNotUp +; v1=105 ;keypad 9 +; gosub @MCkeyDown +; if v1<>0 then smoveright +; v1=108 ; keypad 6 +; gosub @MCkeyDown +; if v1<>0 then smoveright +; v1=111 ; keypad 3 +; gosub @MCkeyDown +; if v1<>0 then smoveright +; v1=77 ; cursor right +; gosub @MCkeyDown +; if v1=0 then scursornotright +;.smoveright +; keyheld = 1 +; add cursorx,cursorspeed +; +;.sCursorNotRight +; v1=110 ; keypad 2 +; gosub @MCkeyDown +; if v1 <> 0 then smovedown +; v1=109 ; keypad 1 +; gosub @MCkeyDown +; if v1 <> 0 then smovedown +; v1=111 ; keypad 3 +; gosub @MCkeyDown +; if v1 <> 0 then smovedown +; v1=80 ; cursor down +; gosub @MCkeyDown +; if v1 = 0 then sCursorNotDown +;.smovedown +; keyheld = 1 +; add cursory,CursorSpeed +; +;.sCursorNotDown +; v1=103 ; keypad 7 +; gosub @MCkeyDown +; if v1 <> 0 then @smoveleft +; v1=106 ; keypad 4 +; gosub @MCkeyDown +; if v1 <> 0 then @smoveleft +; v1=109 ; keypad 1 +; gosub @MCkeyDown +; if v1 <> 0 then @smoveleft +; v1=75 ; cursor left +; gosub @MCkeyDown +; if v1 = 0 then @sCursormove +;.smoveleft +; if v1=0 then @sCursormove +; keyheld = 1 +; sub cursorx,CursorSpeed +;cend +.scursormove + return +;-------------------------------------------------------------- + +;------------------------ +; set up cursors and man in gunfight +;------------------------------------ +.ccDoCross + if currentscreen <> GameMap then @ccendcross + Objectnumber=MapCursor + dv3 = 384 ; z + dv4 = 300 ; h +; fall through to insertcursor + +.insertcursor + dv2 = 150 + dv5 = 0 + dv6 = 0 + cursorx = dv2 + cursorz = dv3 + cursorh = dv4 + gosub @StartFreeACB ; Starts ACB with ObjectNumber. SetupACB + CrossHairACB = dx4 +.ccendCross + return +;------------------------------------------- + + diff --git a/l9dev/regress/games.l9/billy.l9/music.txt b/l9dev/regress/games.l9/billy.l9/music.txt new file mode 100644 index 0000000..50cd0c7 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/music.txt @@ -0,0 +1,193 @@ +; MUSIC.TXT +; +; Mike Austin May 1990 +; +; Copyright (C) 1990 Level 9 Computing Ltd +; +var +;; NextMusic ; contains next music +; LastTunePlayed ; set to the value of NextMusic for the +; last tune we've actually asked the driver for. + HaveDoneStop ; set to 1 when we've asked for the current tune +; to stop - i.e. at the next frame build, the driver should be +; ready to play the next tune. + MusicRepeatCount + +const + MusicDebug=0 + +begin +;--------- +.CopyFilename +; from IntroTables(v1) to list17(8) + v2=8 +.CF2 + v3=IntroTables(v1) + if v2>30 then CFBug + list17(v2)=v3 + add v1,c1 + add v2,c1 + if v3<>0 then CF2 +.PTFSRet + return + +.CFBug + break ;****** + break ;****** + return +;---- +.PlayTuneForScene +; NextMusic is offset in IntroTables of tune to play + if MusicOn=0 then PTFSRet + cif AllowMusic + if NextMusic<>0 then PTFSTune ; no new tune + cend +.PTFSRet2 + return + +.PTFSTune + if LastTunePlayed=NextMusic then PTFSRet2 +;; return ; we've just asked for this tune - don't ask again + +;;.PTFST2 + cif AllowMusic + LastTunePlayed=NextMusic ; write it down as having requested this one +;; if HaveDoneStop=1 then PTFSTune2 + +; cif MusicDebug +; v1=7 +; gosub @MCEnableTextBuffer +; code - +; prs " Stop: " +; message cr +; code + +; gosub @WaitKey +; cend ; MusicDebug + + + + v1=0 ; score 0 for everything at the moment. +; v2 not needed + v3=2 ; stop + gosub @MCPlayScore +;; HaveDoneStop=1 +;; return + +.PTFSTune2 +;; HaveDoneStop=0 ; reset the flag so the next tune will do a stop first + + + &v1=IntroTables(NextMusic) + gosub @CopyFilename + + cif MusicDebug + push v1 + push v2 + v1=7 + gosub @MCEnableTextBuffer + code - + prs " Load: " + code + + v1=list17(8) + gosub @MCOswrchV1 + v1=list17(9) + gosub @MCOswrchV1 + v1=list17(10) + gosub @MCOswrchV1 + v1=list17(11) + gosub @MCOswrchV1 + v1=list17(12) + gosub @MCOswrchV1 + v1=list17(13) + gosub @MCOswrchV1 + v1=list17(14) + gosub @MCOswrchV1 + v1=list17(15) + gosub @MCOswrchV1 + v1=list17(16) + gosub @MCOswrchV1 + v1=list17(17) + gosub @MCOswrchV1 + v1=list17(18) + code - + prs " " + print v1 ; print out ascii code. + prs " " + code + + v1=13 + gosub @MCOswrchV1 + gosub @WaitKey + pop v2 + pop v1 + cend ; MusicDebug + + + v1=19 ; list to load into + v2=MidiOffset + v3=0 + gosub @MCLoadFile ; filename is list17(8...) + + + + cif MusicDebug + &v1=list17(0) ; return code + &v2=list17(2) ; return code + &v3=list17(4) ; return code + &v4=list17(6) ; return code +; code - +; print v1 +; prs " " +; print v2 +; prs " " +; message cr +; print v3 +; prs " " +; print v4 +; prs " " +; code + + v1=7 + gosub @MCEnableTextBuffer + code - + prs " Init: " + code + + gosub @WaitKey + cend ; MusicDebug + + + + + v1=19 ; list + v2=MidiOffset + v3=19 ; adlib instrument file? + v4=AdlibOffset + v5=0 ; score number + gosub @MCInitialiseScore +; /* Paramters: +; V1 list V2 offset Music Score +; V3 list V4 offset Adlib Instrument File +; V5 Score number (0-3) + + + cif MusicDebug + v1=7 + gosub @MCEnableTextBuffer + code - + prs " Play: " + code + + gosub @WaitKey + cend ; MusicDebug + + + v1=0 ; score number + v2=255 ; MusicRepeatCount ; 0=1 play, 1=twice etc. + v3=0 ; restart + gosub @MCPlayScore + +; /* Paramters: +; V1 Score number (0-3) +; V2 Repeat Flag (255=forever, 0=once, #=number of times) +; V3 Operation (0=restart, 1=resume, 2=stop) +; */ + cend ; AllowMusic + return +;-------- diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/acode.acd b/l9dev/regress/games.l9/billy.l9/pc.l9/acode.acd new file mode 100644 index 0000000..aa11347 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/pc.l9/acode.acd differ diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/compile.bat b/l9dev/regress/games.l9/billy.l9/pc.l9/compile.bat new file mode 100644 index 0000000..4bca291 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/pc.l9/compile.bat @@ -0,0 +1,27 @@ +1../firstvar.txt +1mconst.txt +1../aahead.txt +1../language.txt +1../aaconst.txt +1../aavars.txt +1../demo.txt +1../standard.txt +1../menu.txt +1../walkabou.txt +1../fx.txt +1../arcade.txt +1../vectors.txt +1../strategy.txt +1../comms.txt +1../floors.txt +1../goal.txt +1../cache.txt +1../duel.txt +1../fire.txt +1../movecurs.txt +1../spaniob.txt +1../music.txt +1../display.txt +1../print.txt +1../intro.txt +2B40 diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/exit.txt b/l9dev/regress/games.l9/billy.l9/pc.l9/exit.txt new file mode 100644 index 0000000..8463fd1 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/pc.l9/exit.txt @@ -0,0 +1,583 @@ +; Dummy Exits File for Hero +; +; EXIT.TXT, data for the game exits. The numeric values for the +; directions is as follows: +; +; 1 up=9 in=11 cross=13 climb=14 jump=15 +; 8 2 down=10 +; ! +; 7 --+-- 3 +; ! +; 6 4 +; 5 +; +; Room 1 - Santa Fe Undertaker +1000 0 0 + +; Room 2 - bank +1000 0 0 + +; Room 3 - bank +1000 0 0 + +; Room 4 - bank +1000 0 0 + +; Room 5 - Santa Fe Wire Office +1000 0 0 + +; Room 6 - bank +1000 0 0 + +; Room 7 +1000 0 0 + +; Room 8 - Santa Fe News Office +1000 0 0 + +; Room 9 +1000 0 0 + +; Room 10 +1000 0 0 + +; Room 11 +1000 0 0 + +; Room 12 - Santa Fe Bank +1000 0 0 + +; Room 13 +1000 0 0 + +; Room 14 +1000 0 0 + +; Room 15 +1000 0 0 + +; Room 16 +1000 0 0 + +; Room 17 +1000 0 0 + +; Room 18 +1000 0 0 + +; Room 19 +1000 0 0 + +; Room 20 +1000 0 0 + +; Room 21 +1000 0 0 + +; Room 22 +1000 0 0 + +; Room 23 +1000 0 0 + +; Room 24 +1000 0 0 + +; Room 25 +1000 0 0 + +; Room 26 +1000 0 0 + +; Room 27 +1000 0 0 + +; Room 28 +1000 0 0 + +; Room 29 +1000 0 0 + +; room 30 - Santa Fe +0001 1 1 ; to undertaker +0001 2 5 ; to wire +1001 3 31 ; to street + +; room 31 - Santa Fe +0001 5 36 ; to other street +0001 1 8 ; to news +0001 2 64 ; to store +1001 3 32 ; to street + +; room 32 - Santa Fe +0001 1 12 ; to bank +1001 3 33 ; to street + +; room 33 - Santa Fe +0001 1 160 ; to saloon +0001 2 0 ; to train station +1001 3 34 ; to street + +; room 34 - Santa Fe +0001 1 80 ; to jail Sheriff's office +0000 5 38 ; south to other street +1001 2 65 ; to store + +; room 35 - Santa Fe (Street 2) +0001 1 171 ; to saloon +1001 3 36 ; to street + +; room 36 - Santa Fe +0001 2 190 ; to courthouse CLOSED +1001 3 37 ; to street + +; room 37 - Santa Fe +0001 1 190 ; CLOSED +0001 2 190 ; CLOSED +1001 3 38 ; to street + +; room 38 - Santa Fe +0001 1 190 ; to other street +0001 2 34 ; to other street +1001 3 39 ; to street + +; room 39 - Santa Fe +1001 1 19 ; to livery stables + +; 40 +1000 0 0 + +; 41 +1000 0 0 +; 42 +1000 0 0 +; 43 +1000 0 0 +; 44 +1000 0 0 +; 45 +1000 0 0 +; 46 +1000 0 0 +; 47 +1000 0 0 +; 48 +1000 0 0 +; 49 +1000 0 0 + +; 50 - El Paso +0001 3 51 +0001 1 168 ; to saloon +1001 2 24 ; to doctors + +; 51 +0001 3 52 +0000 2 55 ; NE goes to other street +1001 1 66 ; to hotel + +; 52 +0001 3 53 +1001 1 13 ; to bank + +; 53 +0001 3 54 +0001 1 6 ; to telegraph office +1001 2 56 ; to other street + +; 54 +1001 1 20 ; to stable + +; 55 El Paso second street. +0001 3 56 +0000 5 51 ; south goes back to southern street +0001 1 167 ; to saloon +1001 2 60 ; to store + +; 56 +0001 3 57 +0001 2 81 ; to sheriff's office +0001 7 55 ; west to saloon/store +0000 5 53 ; south goes back to southern street +1001 1 9 ; to El Paso Sun + +; 57 +1001 1 2 ; to Undertakers + +; 58 +1000 0 0 + +; 59 unused +1000 0 0 + +; 60 store +1000 0 0 + +; 61 +1000 0 0 + +; 62 +1000 0 0 + +; 63 +1000 0 0 + +; 64 Store +1000 0 0 + +; 65 store Zang's (Santa Fe) +1000 0 0 + +; 66 hotel +1000 0 0 + +; 67 Not USED +1000 0 0 + +; 68 +1000 0 0 + +; 69 +1000 0 0 + +; 70 Roswell. +0001 3 71 +1001 1 82 ; to Sheriff's office + +; 71 +0001 3 72 +1001 1 3 ; to undertakers + +; 72 +0001 3 73 +0001 2 61 ; to hardware store +1001 1 173 ; 67 ; to hotel + +; 73 +0001 1 190 ; CLOSED. to post office +1000 0 0 + +; 74 +1000 0 0 + +; 75 +1000 0 0 + +; 76 +1000 0 0 + +; 77 +1000 0 0 + +; 78 +1000 0 0 + +; 79 +1000 0 0 + +; 80 Sheriff's Office (Santa Fe) +1000 0 0 + +; 81 Sheriff's Office (El Paso) +1000 0 0 + +; 82 Sheriff's Office (Roswell) +1000 0 0 + +; 83 Sheriff's Office (Lincoln City) +1000 0 0 + +; 84 Sheriff's Office (Mesilla) +1000 0 0 + +; 85 Sheriff's Office (White Oaks) +1000 0 0 + +; 86 +1000 0 0 + +; 87 +1000 0 0 + +; 88 +1000 0 0 + +; 89 +1000 0 0 + +; 90 +1000 0 0 + +; 91 +1000 0 0 + +; 92 +1000 0 0 + +; 93 +1000 0 0 + +; 94 +1000 0 0 + +; 95 +1000 0 0 + +; 96 +1000 0 0 + +; 97 +1000 0 0 + +; 98 +1000 0 0 + +; 99 +1000 0 0 + +; 100 Lincoln City +0001 7 21 ; to corral / Torreon? +0001 3 101 +1001 1 165 ; to saloon + +; 101 +0001 3 102 +1001 1 62 ; to store + +; 102 +0001 3 103 ; east along street +1001 1 83 ; to sheriff's office + +; 103 +0001 3 104 +1001 1 15 ; to bank + +; 104 +0001 3 105 +1001 1 69 ; to house + +; 105 +1000 1 190 ; CLOSED to courts/jail + +; 106 +1000 0 0 + +; 107 +1000 0 0 + +; 108 +1000 0 0 + +; 109 +1000 0 0 + +; 110 +1000 0 0 + +; 111 +1000 0 0 + +; 112 +1000 0 0 + +; 113 +1000 0 0 + +; 114 +1000 0 0 + +; 115 +1000 0 0 + +; 116 +1000 0 0 + +; 117 +1000 0 0 + +; 118 +1000 0 0 + +; 119 +1000 0 0 + +; 120 +1000 0 0 + +; 121 Mesilla +;; 0001 7 120 ; west to empty desert +0001 3 122 +1001 1 25 ; doctor's + +; 122 +0001 3 123 +1001 1 16 ; to bank + +; 123 +0001 3 124 +0000 2 191 ; NE goes to nowhere +1001 1 169 ; saloon + +; 124 +0000 2 191 ; goes nowhere +1001 1 190 ; CLOSED + +; 125 +1000 0 0 + +; 126 +1000 0 0 + +; 127 +1000 0 0 + +; 128 +1000 0 0 + +; 129 +1000 0 0 + +; 130 +1000 0 0 + +; 131 +1000 0 0 + +; 132 +1000 0 0 + +; 133 +1000 0 0 + +; 134 +1000 0 0 + +; 135 +1000 0 0 + +; 136 +1000 0 0 + +; 137 +1000 0 0 + +; 138 +1000 0 0 + +; 139 +1000 0 0 + +; 140 White Oaks +0001 3 141 +0001 5 142 ; to other street +1001 1 63 ; to store + +; 141 +1001 1 17 ; to bank + +; 142 +0001 3 143 +0000 2 140 ; NE to other street +1001 1 172 ; to saloon + +; 143 +0001 3 144 +1001 1 10 ; to news office + +; 144 +1001 1 22 ; to livery stables + +; 145 +1000 0 0 + +; 146 +1000 0 0 + +; 147 +1000 0 0 + +; 148 +1000 0 0 + +; 149 +1000 0 0 + +; 150 +1000 0 0 + +; 151 +1000 0 0 + +; 152 +1000 0 0 + +; 153 +1000 0 0 + +; 154 +1000 0 0 + +; 155 +1000 0 0 + +; 156 +1000 0 0 + +; 157 +1000 0 0 + +; 158 +1000 0 0 + +; 159 +1000 0 0 + +; 160 ; saloon right (Santa Fe 1) +1001 7 162 + +; 161 +1000 0 0 + +; 162 ; saloon left (Santa Fe 1) +1000 5 33 ; south back to street + +; 163 +1000 0 0 + +; 164 +1000 0 0 + +; 165 ; big single saloon in Lincoln City +1000 0 0 + +; 166 ; left El Paso 1 +1000 5 55 ; south back to street + +; 167 ; right El Paso 1 +1001 7 166 + +; 168 ; single El Paso 2 +1000 0 0 + +; 169 ; single Mesilla +1000 0 0 + +; 170 Left Santa Fe 2 +1000 5 35 ; south back to street + +; 171 Right Santa Fe 2 +1001 7 170 + +; 172 Single White Oaks +1000 0 0 + +; 173 Left Roswell +1001 5 72 ; south back to street + +; 174 Right Roswell +1001 7 173 + +1000 0 0 +0000 0 0 + + diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/gamedata.dat b/l9dev/regress/games.l9/billy.l9/pc.l9/gamedata.dat new file mode 100644 index 0000000..48dfe61 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/pc.l9/gamedata.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/mconst.txt b/l9dev/regress/games.l9/billy.l9/pc.l9/mconst.txt new file mode 100644 index 0000000..39edd72 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/pc.l9/mconst.txt @@ -0,0 +1,10 @@ +; Machine constants +; MCONST.TXT +const + st=0 ; conditional assembly + ReallyST=0 + Amiga=0 + pc=1 + notPc=0 + Scrolling=1 + AllowMusic=1 diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/message.txt b/l9dev/regress/games.l9/billy.l9/pc.l9/message.txt new file mode 100644 index 0000000..0e2508e --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/pc.l9/message.txt @@ -0,0 +1,1200 @@ +; MESSAGE.TXT +; +; Messages for Billy The Kid Map/Strategy Games +; +; Copyright (C) 1991 Level 9 Computing Ltd. +; +; +; ||| are changes since initial text sent to Ocean for translation +; œœœ are changes since final text sent to Ocean for translation 8 Dec 90 +; (Corrections of obvious spelling and punctuation errors are not +; marked - but additions to punctuations are). +; &&& are additional things +; ^^^ are changes from 1991 onwards. +;l *********** what about copyright message???? +; +[1:Pat ] +[2:Billy ] ; names for "PLAYERSNAME" variable. +[3:`] +[5:%] +[6:% %] +[7:. ] ; dot +[8: ] ; space ; ^^^^ + +[11:Sheriff Pat Garrett ] ; full name for Pat, e.g. for +; when introduced to people. +[12:Billy The Kid ] ; full name for Billy, e.g. for +; when introduced to people. + + + +;||| messages 21..102 moved to other parts of the game... +;[21:Billy spread the map and figured on it a while. He'd gotta +;make a move and he'd gotta make it right... ] +;[22:Billy drove off the herd and started the long drive to Mexico... ] +;[23:Outside, a man shouted, "Come on out with your hands in the air, +;fella. We've gotcha surrounded!" ] +;[24:The Kid was trapped! The law was all over the place, and he hadn't +;got nuthin' but his ol' 6-gun. ] +[25:The plan was perfect. The train'd have to slow when it hit the +incline. And that'd be the chance to catch onto it. ] + +[26:Run alongside, jump over the rocks, then climb up the ladder +and jump onto the fuel wagon. Stop that train! ] ; œœœinstructions +; added. Also "Billy" replaced with "the" + +; +; Duel messages. Both follow Player's name ||| +[101:had won by a whisker. His opponent collapsed to the floor. ] ;^^^ +;It seemed best to hightail it outa there before anyone started +;to ask awkward questions about who fired first. ] ;||| +[102:went down in agony. The last thing he remembered +was friendly hands dragging him onto a horse... ] ;||| + + +; Brawl messages ||| +[300:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew that he would +have to fight his way to the door if he wanted to escape in one +piece. ] ;Billy is on the right. ] ; Billy ||| œœœ(mentions group of thugs) +[301:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew he'd +have to fight his way to the door if he wanted to escape in one +piece. You are on the right. ] ; Pat |||œœœ(mentions group of thugs) +[302:"I reckon you jogged ma +elbow and spilled my beer there Mister. Get me another drink, +if you know what's good for you". ] ;||| Ned Parkin +[303:"I don't like +the way you're looking at me, son. Reckon you'd best take +you're liquor elsewhere". ] ;||| Jack Shoe +[304:"We don't like your sort in this bar, Mister. +Maybe you'd better find another place to drink your sasparilla!" ] ;||| Ben Davis +[305:"Hey Mister, some guys other there +were talking about jumping you. You gonna stand there and take +that?" ] ;||| Lavinia Strumpet + + +; invitations to card game in saloon +[320:"They say +you're pretty good with a deck, Mister. But how about a game +with the grown-ups?" ] ;||| Rick Sands +[321:"Sorry Mister, I must have mistaken you for a man!" ] ;||| + +; encounters elsewhere in town, or others +[330:"You look the type who might aid an honest godfearing woman, +Sir. My respectable boarding house has been taken over by ruffians. Can +you drive them off for me?" ] ;||| Laura Picket +[331:"Hey mister. Some drifter friends of +the local Judge have taken over my homestead. You've got an honest +face - can't you help me?" ] ;||| œœœno longer mentions name. +[332:"I guess you think you can strut around this town like you +own the place, Stranger. Well there's only room for one tough +guy in this town. Draw or git!" ] ; Rick "Two Fingers" Rider. ;||| +[333:"Hey mister, they say you're pretty good with those shootin' +irons of yours. Won'cha help me out - some of Murphy's mob have +taken over my claim. Move 'em out and I'll cut you in for a share!" ] ;||| +[334:"Why hello again, dear. I'd love to talk to ya some more, +but I've just gotta wash my hair..." ] ;||| visit girlfriend! œœœpunc + + + +; references to people elsewhere who need help. +[340:"Hey mister, a friend of mine needs help... ] ; before 342..349 ;||| +[341:Might be able to help ya in return, too! ] ; after 342..349 ;||| +[342:It's Whiskey Pete the prospector out at his claim. ] ;||| +[343:Laura Picket at the El Paso hotel has got big trouble. ] ;||| +; ^^^ now at El Paso + +[344:Wilma Dunn out at the Dunn ranch. ] ;||| +[345:Joe Dunn out at his ranch. ] ;||| +[346:lil' ol' Miss Rose, out at her old place. ] ;||| + + + +[360:"Hey mister, someone was looking for you... ] ; before 362..369 +[361:why not get over there and look 'em up?" ] ; after 362..369 +[362:Joe Grant was the name. He was hanging out in the Santa +Fe Saloon. ] +[363:Karl Bekkert was the name. He was hanging out in the Santa Fe +Saloon. ] +[364:Jack Shoe was his name. Saw him in the El Paso Saloon. ] +[365:Ben Davis, I think. Saw him in the Santa Fe Saloon. ] +[366:Warren Oaks, I think. He hangs out in the Mesilla saloon. ] +[367:lil' ol' Miss Rose, out at her old place. ] ;||| +;[367:Wayne Rogers, so I'm told. He hangs out in the +;White Oaks saloon. ] ;||| + + + +; 400+location number is press stories about the most common events +; that happen at places... ||| +[410:Pat Garrett has been made Sheriff of Santa Fe ] +[411:Pat Garrett has been made Sheriff of White Oaks ] +[412:Pat Garrett has been made Sheriff of Lincoln City ] +[413:Pat Garrett has been made Sheriff of Mesilla ] +[414:Pat Garrett has been made Sheriff of Roswell ] +[415:Pat Garrett has been made Sheriff of El Paso ] + +[424:the Bitter Lake Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ +[425:the Fritz Ranch, of the Murphy-Dolan's, has gone broke. ] ;||| œœœ +[426:the Chisum Ranch has gone out of business. ] ;||| œœœ +[427:the Dedrick Ranch, of the Murphy-Dolan's, has closed down. ] ;||| œœœ +[428:the Beckwiths, associates of Murphy and Dolan, have closed their +ranch and left the state. ] ;||| œœœ +[429:the Tunstall Ranch has gone out of business. ] ;||| +[430:the Reed Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ + +[431:only another ] ;œœœ (Followed by number of ranches left, then 432) +[432: of those Murphy-Dolan swine to get. Keep at it, Billy] ;œœœ + +; text for Pat to control deputies etc.;||| +[450:WHERE ARE DEPUTIES `] ;|||menu option ;||| +[451:HIRE DEPUTY `] ; |||menu option +[452:FIRE DEPUTY `] ; |||menu option +[453:deputy ] ; for reporting number +[454:deputies ] +[455:people are ] ; followed by happiness: 456..464 +[456:rioting. ] +[457:very angry. ] +[458:angry. ] +[459:displeased. ] +[460:restless. ] +[461:content. ] +[462:happy. ] +[463:ecstatic. ] +[464:money: $] ;||| +[465:`income next month: $] ;||| +[466:`costs next month: $] ;||| +[467:`(] ; 467, number, 468 || +[468: Texan Deputies working for nothing). ] ||| + +; menu option versions of town names... +[470:Santa Fe `] +[471:White Oaks `] +[472:Lincoln City `] +[473:Mesilla `] +[474:Roswell `] +[475:El Paso `] + + +;||| Full stops removed from messages 500..548 +[501:a herd of longhorns ] ; 0 +[502:a herd of longhorns ] ; 0 +[503:a herd of longhorns ] ; 0 +[504:a herd of longhorns ] ; 0 +[505:a herd of longhorns ] ; 0 + +[510:Santa Fe ] ; dc.w 3345 ; Santa Fe 10 +[511:White Oaks ] ; dc.w 3346 ; Albe'que 11 +[512:Lincoln City ] ; dc.w 3347 ; Lincoln City 12 +[513:Mesilla ] ; dc.w 588 ; Las Cruces 13 +[514:Roswell ] ; dc.w 589 ; Roswell 14 +[515:El Paso ] ; dc.w 0 ; spare town 15 +[516:Frontier Town ] ; dc.w 0 ; spare town 16 +[517:Frontier Town ] ; dc.w 0 ; spare town 17 +[518:Frontier Town ] ; dc.w 0 ; spare town 18 +[519:Fort Stanton ] ; dc.w 3351 ; Fort Stanton 19 +[520:Fort Sumner ] ; dc.w 3352 ; Fort Sumner 20 +[521:A New Fort ] ; dc.w 0 ; spare fort 21 +[522:A New Fort ] ; dc.w 0 ; spare fort 22 +[523:A New Fort ] ; dc.w 0 ; spare fort 23 +[524:Bitter Lake ] ; dc.w 581 ; +[525:the Fritz Ranch ] ; dc.w 582 ; +[526:the Chisum Ranch ] ; dc.w 583 ; +[527:the Dedrick Ranch ] ; dc.w 584 +[528:the Beckwith Ranch ] ; dc.w 585 +[529:the Tunstall Ranch ] ; dc.w 586 ; +[530:the Reed Ranch ] ; dc.w 587 + + + + + + + + + + + + + +; one of these should be Blazer's Mill, nr Mescalero Apache... +; See P.10 design +[531:the Dunn farmhouse ] ; 31 +[532:the Dunn farmhouse ] ; 32 +[533:the Rose homestead ] ; 33 +[534:a farmhouse ] ; 34 + + +[535:Mescalero Apache Reservation ] ; dc.w 3356 ; Mescalero Apache +settlement 35 +[536:Wild Apache Settlement ] ; dc.w 0 ; spare indians 36 +[537:Wild Apache Settlement ] ; dc.w 0 ; spare indians 37 +[538:Wild Apache Settlement ] ; dc.w 0 ; spare indians 38 +[539:the Santa Fe express ] ; 39 +[540:a wagon train ] ; 40 +; outlaw hideout names... +[541:The Cooper Gang hideout ] ; 41 Santa Fe +[542:Socorro Vaqueros ] ; 42 White Oaks Run by Pete Stewart ||| +[543:The Seven Rivers Gang hideout ] ; 43 Lincoln City +[544:The Dona Ana Bunch hideout ] ; 44 Mesilla +[545:The Jesse Evans gang hideout ] ; 45 Roswell +[546:The fugitives' hideout ] ; 46 El Paso +[547:The regulators' hideout ] ; 47 ; Los Portales, NE of Fort Sumner. ||| +[548:a prospector ] ; 48 + +;|||[598:Billy ] +;|||[599:Pat ] +; Menu messages start at 600... +; general message ranges: +; MM+1..MM+49: involve spending money +; MM+50..MM+99: are the menu options themselves +; MM+100..MM+149: involve chaining to a new overlay + +; menu options involving spending money... +[601:BUY ROUND OF DRINKS ($5) `] +[602:GO UPSTAIRS WITH THE GIRL ($25) `] +[603:OFFER A BRIBE ($15) `] +[604:GIVE $20 `] +; drinks on offer at bar... +[605:NOTHING `] +[606:RED-EYE ($1) `] +[607:BEER ($1) `] + +; menu options not involving spending money... +[650:LEAVE TOWN. `] +[651:DO NOTHING. `] ; menu option +[652:GO THERE. `] ; menu option +;; [653:think about it. `] ; menu option ****** +[654:YES. `] +[655:NO. `] +[656:RAISE HELL. `] ; option in bar ||| +[657:Yeehaa... ] ; response to 656. ||| + +;[656:ROB THE TRAIN. `] ; option when click on train. +;[657:meet the wagon train. `] ; option when click on wagons +;[658:go visit the Apaches. `] ; option when click on apache ; +;settlement. +; standard menu for talking to people. +[659:GREET. `] ; ||| HULLO. `] +[660:TALK. `] +[661:THREATEN. `] +[662:MOVE ON. `] +; menu for when challenged to a duel... +[663:ACCEPT. `] +[664:BACK DOWN. `] ; try to pacify person. +[665:ROB THE BANK. `] +[666:STEAL COWS. `] +[667:TAKE COWS TO APACHES. `] + +; SYSTEM menu options... +[668:SAVE GAME `] ;||| +[669:RESTORE `] ;||| +[670:RESTART `] ;||| + +[671:English `] ; menu option +[672:Deutsch `] ; menu option +[673:Fran‡ais `] ; menu option + + +;600+100..129: arcades overlay games +;600+130..159: intermission overlay games +;600+160..189: scrolling overlay games +;[700:rode off to intercept the train. ] +;[701:rode off to the ranch... ] +;[702:rode off to the ranch... ] +;[703:rode off to the ranch... ] +;[704:rode off to the ranch... ] +;[705:rode off to the ranch... ] +;[706:rode off to the ranch... ] + +;[730:rode off to meet the wagon train. ] +;[731:rode off to visit the Apache settlement. ] + +[760:set off to steal the steers. ] +[761:Get behind them longhorns +and drive 'em south. Press fire to switch between the +members of your gang. ] ; rustling game. œœœinstructions added. +[762:track the gang southwards. Press fire when near a clue +to see what it means. Don't take too long! ] ;œœœadded. +[763:when the bell goes, push forwards to draw, and then steer +the gunsight onto the other guy. Press FIRE to shoot him. ] ;œœœ +;[761:set off to hunt down the gang. ] ; tracking game +;[762:escaped from the bank. ] ; Billy bank escape +;[763:set off to ambush Billy. ] ; prevent Bank robbery game. +[764:set off to take the cows to the Indians. ] ;|||| +[765:Press fire and down to duck, fire and up to raise your +head above the barricade. Shoot as many of the bad guys as +you can. You can't shoot or be shot so long as you keep your +head down. ] ;œœœ +[766:Press right//left to move sticks of dynamite, and press +FIRE to light the fuse. But how many do you need? ] ;œœœ + +; responses... +;[851:rode off. Press fire. ] ; result of 652 +;[852:had finally come to a decision, and rode into town. ] +;; result of 652 under other circumstances (***debugging) +[853:called for drinks on the house. That sure made him popular. ] +[854:went upstairs with the saloon girl... ] +[855:offered the bribe. ] +[856:handed over some money. ] +[857:Billy headed back to the hideout to round up the gang, +and burst into the bank in force... ] +[858:Billy started to draw his gun, but realised that without +a gang to back him up he hadn't a hope. ] ;||| try to rob bank +; without having contacted a gang first. +[859:Billy started to ride off, but realised that without +a gang free to back him up he hadn't a hope. ] ;||| try to rob train +; without having contacted a gang first. + + +; invitation to train robbery (less common, so one only)... +[867:"There's gonna be a whole heap of gold on that train tomorrow. +Why, if a body had a mind to, he could catch it real easy at the +gradient". ] ; œœœ punc +[868:the safe contained ] ; followed by amount of gold, 869. +[869: dollars in gold. ] +[870:"We've been robbed by Billy The Kid - so don't ask to make +a big withdrawal! "] +; when Billy goes into a bank he's recently robbed. +[871:"We've been robbed. I hope you've come to make a deposit". ] ; œœœ punc +; when Billy goes into a bank another gang has recently robbed + +; GENERAL MESSAGES ||| +[872:owned $] ;preceded by PlayersName, followed by amount, 873 ||| +[873:. ] ; after 872/amount. ||| +[874:A voice called out "Get outa here - we're closed!" ] ;||| +; try to go into buildings which are just scenery. +[875:Billy decided not to go into the Sheriffs office, just +to be on the safe side. ] ; ||| +[876:"You deaf or something, boy?" ] ; œœœ ask same person a second +; question ; œœœ punc +[877:"I said, YOU DEAF OR SOMETHING, BOY?" ] ; œœœ ask same person a second +; question ; œœœ punc +[878:"Can't stand around jawing all day. Be seeing ya". ] ;œœœ ; œœœ punc + + + + + + +; Saloon bits and pieces... +[899:"Prepare to draw, varmit". ] ;||| challenged to duel whilst outside. ; œœœ punc +[900:"I hear you play Monte. D'you want to deal?" ] ; œœœ reworded +[901:"Some other time, pard." ] ; refuse to play monte. ; œœœ punc +[902:Accuse the varmit of cheating. ] ; Monte +[903:Forget it. ] ; After Monte game +[904:"I'll meet you on the street". ] ; what Billy says if he decides +; to fight the duel. +[905:"OK, Yellabelly. Just crawl outa here fast, or I'll plug you". ] ; œœœ punc +; climb down instead of fighting duel. +[906:"Yeh, well... I guess I'll help ya... ] ;|||trailing quote removed +; threaten, agrees to give info. ; œœœ punc +[907:"Gee, I'd surely like to help ya, but I don't know nuthin'!" ] ; œœœ punc +; threaten, but doesn't know anything. +[908:"You trying to push me around, you saddle bum? Let's settle this +right now, gun-to-gun". ] ; |||no longer mentions outside ; œœœ punc +[909:"What'll it be, friend?" ] ; barman offers drinks ; œœœ punc +[910:"Wanna place a bet, friend?" ] ; roulette ; œœœ punc +[911:put his money on the table. The wheel span, and as it stopped +the ball sprang sideways into 00. That table surely was crooked! ] +[912:Accuse the croupier of cheating. ] ; roulette table. +[913:Forget it. ] ; roulette table. +;|||[914:I'll see you outside. ] ; what Billy says if he decides +;; to challenge +[915:"I'm ] ; then player's full name +[916:", the reply came back: "I'm ] ; name chosen from 1000... +[917:". ] ; after 916, name. +[918:"Nobody tells me nuthin'." ] ; unthreatened, just knows nothing +[919:"I ain't telling you nuthin' about anythin', bud!" ] ; refuses +; to tell Player, in response to "talk" option on menu + +; MESSAGES FOR FIRST MEETING VARIOUS TYPE OF PEOPLE... +; a group of 10 messages from a cowardly person... +; a group of 10 messages from a greedy person... +; a group of 10 messages from anyone else... +; +; cowardly meeting... +[920:"Why, hello stranger". ] ; œœœ punc +[921:"Well, howdy mister". ] ; œœœ punc +[922:"Welcome, stranger". ] ; œœœ punc +[923:"Er, greetings stranger". ] ; œœœ punc +[924:"Er, howdoo young fella". ] ; œœœ punc +[925:"Er, hello pardner". ] ; œœœ punc +[926:"Er, howdoo stranger". ] ; œœœ punc +[927:"Er, good day to you, pardner". ] ; œœœ punc +[928:"Er, howdoo stranger". ] ; œœœ punc +[929:"Er, hello young Sir". ] ; œœœ punc + +; greedy meeting... +[930:"Hello stranger". ] ; œœœ punc +[931:"Howdoo stranger". ] ; œœœ punc +[932:"Hi there, stranger". ] ; œœœ punc +[933:"Good day, pardner". ] ; œœœ punc +[934:"Hello stranger". ] ; œœœ punc +[935:"Hello friend. You new around here?" ] ; œœœ punc +[936:"Hello there, boy. You want anything from me?" ] ; œœœ punc +[937:"Greetings stranger. You wanting something?" ] ; œœœ punc +[938:"Hello stranger. Can I help you some?" ] ; œœœ punc +[939:"Howdy pardner. You needing some help?" ] ; œœœ punc +; +; normal, well-balanced people... +[940:"Hello pardner". ] ; œœœ punc +[941:"Howdoo stranger". ] ; œœœ punc +[942:"Hi stranger". ] ; œœœ punc +[943:"Greetings stranger". ] ; œœœ punc +[944:"Howdoo stranger". ] ; œœœ punc +[945:"Hello pardner". ] ; œœœ punc +[946:"Howdy stranger". ] ; œœœ punc +[947:"Goodday stranger". ] ; œœœ punc +[948:"Howdoo friend". ] ; œœœ punc +[949:"Hello stranger". ] ; œœœ punc + +[950:"Howdy Pat". ] ; œœœ punc +[951:"Howdy Billy". ] ; meet someone again. ; œœœ punc +[952:Sheriff Pat Garrett`] ;œœœ last bit moved to 975ish + +[953:Billy The Kid`] ; copy of message 2||| MENU OPTION +[954:Who do you want to play?` `(Press FIRE or SPACE). ] ; |||opening question. œœœ reworded +[955:Pat, you must track down and capture all the outlaw gangs. Talk +to people for information. And when in a sheriffs office, check your +deputies are where they're wanted.` `(Press FIRE or SPACE). ] ;||| œœœ reworded +[956:Billy, you must try to bankrupt the Murphy-Dolan gang. Rob +their banks and steal their cows. Talk to people for information. +And try to steer clear of the law.` `(Press FIRE or SPACE). ] +;||| œœœ reworded +[957:"Oh, it's you again". ] ; ||| meet someone again that you +; haven't been introduced to. ; œœœ punc +[958:"Clear off buster, I don't associate with your kind". ] ;||| +; meet someone again who we didn't get on with last time! + + +;[951:"I don't deal with your kind, lawman". ] ; Pat tries to talk to +;; someone he is very unpopular with. +;[952:"I don't have nothing to do with outlaws". ] +; likewise Billy. +; +;[953:"What can I do for you, stranger. ] ; either player +;; talks to someone for the first time, when they are not +;; very well known (i.e. at the start of the game). + +;[954:Ain't you Billy the Kid? Anything I can do to oblige you? ] +;; meet's someone for the first time when better known +;[955:well, if it isn't Sheriff Garrett. What can I do for you, sir? ] +;; meet's someone for the first time when better known + +;; meet someone who is inclined towards/neutral towards player + + +[960:] ; header for 960..990 messages. |||quote removed +[961:." ] ; terminator for 960..990 messages. +[962:I hear ] ; always followed by gang name. +[963:just robbed the bank in ] ; followed by town name +[964:just rustled some cows from ] ; followed by ranch name +[965:hideout is right near ] ; preceded by gang name, followed by town +; name. +[966:Folks tell me there's a pile of money at the bank in ] +;|||moved to 972. [967:I hear say there are x deputies stationed at ] +[968:"There's a widow woman over at ] ; œœœ punc +[969:who needs help". ] ; œœœ punc +[970:"I'm being run off my land by Murphy. I need help!" ] ; œœœ punc +[971:"That gunslinger over there is threatening me and my folks. +Kill him, won't ya?" ] ; œœœ punc +[972:there are ] ; followed by number, 973||| +[973: deputies stationed at ] ; after 972/number, before town name.||| +[974:2-PLAYER GAME (Use UP//DOWN to select, +then press FIRE or SPACE). ] ; œœœcopy of message 1||| MENU OPTION AT START OF GAME +[975:Trying serial connection. ];^^^ (press FIRE to give up). ] ;œœœ œœœ punc + + + +; 1000+Location number for various places that people can +; mention things happening. Events can include train + +; contents, contents of banks, number of deputies in +; various towns, gang locations, recent robberies, +; subplot hints: e.g. Widow women needing help(!) +[1010:Santa Fe. ] ; Santa Fe 10 +[1011:White Oaks. ] ; Albe'que 11 +[1012:Lincoln City. ] ; Lincoln City 12 +[1013:Mesilla. ] ; Las Cruces 13 +[1014:Roswell. ] ; Roswell 14 +[1015:El Paso. ] ; 15 + +[1039:the express train. ] ; 39 +[1040:the wagon train. ] ; 40 + +; messages where someone tells one of the players +; about various robberies, train/bank, that are +; planned during the next little while. +[1041:the Cooper Gang] ; 41 Santa Fe ; œœœ punc +[1042:Socorro Vaqueros] ; 42 White Oaks ||| ; œœœ punc +[1043:the Seven Rivers Gang] ; 43 Lincoln City ; œœœ punc +[1044:the Dona Ana Bunch] ; 44 Mesilla ; œœœ punc +[1045:the Jesse Evans gang] ; 45 Roswell ; œœœ punc +[1046:the fugitives] ; 46 El Paso ; œœœ punc +[1047:the Regulators] ; 47 Near Fort Sumner ||| ; œœœ punc +; +; names for white American Males (young/old)... +; other possible formula names are... +; ... the rat + +[1100:honest Jake] ; œœœ punc +[1101:cookhouse Charlie] ; œœœ punc +[1102:Jericho Jake] ; œœœ punc +[1103:little Joe] ; œœœ punc +[1104:Black Jake] ; œœœ punc +[1105:Trapper John] ; œœœ punc +[1106:Prairie John] ; œœœ punc +[1107:long tall John] ; œœœ punc +[1108:Johnny Reb] ; œœœ punc +[1109:Omaha John] ; œœœ punc + +[1110:Sam Peckinpaw] ; œœœ punc +; ** also name on a grave in Fistful of Dollars ** +[1111:Cornish Sam] ; œœœ punc +[1112:snake-eyes Sam] ; œœœ punc +[1113:Yosemite Sam] ; œœœ punc +[1114:slippery Sam] ; œœœ punc +[1115:Ledger Bill] ; œœœ punc +[1116:Arkansas Will] ; œœœ punc +[1117:Hotel Bill] ; œœœ punc +[1118:Bronco Bill] ; œœœ punc +[1119:Tom Destry] ; œœœ punc +; ** as in Destry Rides Again + +[1120:Rowdy Yates] ; œœœ punc +; ** Clint Eastwood's role in Rawhide + +[1121:mad Mike] ; œœœ punc +[1122:Texas Mike] ; œœœ punc +[1123:mustang Mike] ; œœœ punc +[1124:Howard Johnson] ; œœœ punc +; ** as in Blazing Saddles +[1125:mule-skinner Jim] ; œœœ punc +[1126:Louis L'Amour] ; œœœ punc +; ** Western novelist +[1127:cool-hand Jim] ; œœœ punc +[1128:the Swede] ; œœœ punc +[1129:Bernardo O'Riley] ; œœœ punc +; ** Bronson's role in the Magnificent Seven +; +[1130:Slim Pickins] ; œœœ punc +[1131:Mexico Pete] ; œœœ punc +[1132:Two-gun Pete] ; œœœ punc +[1133:Billy-Joe Bob] ; œœœ punc +; ** character in Fresno +[1134:Teacher Pete] ; œœœ punc +[1135:Red River Nick] ; œœœ punc +[1136:Nebraska Nick] ; œœœ punc +[1137:tricky Nick] ; œœœ punc +[1138:lucky Luke] ; œœœ punc +; ** Goscinny & Uderzo hero +[1139:Navaho Nick] ; œœœ punc +; +[1140:honest Dave] ; œœœ punc +[1141:dead-eye Dick] ; œœœ punc +[1142:Kansas Dave] ; œœœ punc +[1143:dainty Dave] ; œœœ punc +[1144:dynamite Dave] ; œœœ punc +[1145:red-eye Bert] ; œœœ punc +[1146:bull-whip Bert] ; œœœ punc +[1147:slick Bert] ; œœœ punc +[1148:Frenchie Dupont] ; œœœ punc +[1149:Duke Wayne] ; œœœ punc +; ** John Wayne nicknamed Duke +; + +; new names for extra subplots... +[1160:Whiskey Pete] ;||| ; œœœ punc +[1161:Joe Dunn] ;||| ; œœœ punc +[1162:Joe Grant] ;||| ; œœœ punc +[1163:Karl Bekkert] ;||| ; œœœ punc +[1164:Jack Shoe] ;||| ; œœœ punc +[1165:Ben Davis] ;||| ; œœœ punc +[1166:Warren Oaks] ;||| ; œœœ punc +[1167:Wayne Rodgers] ;||| ; œœœ punc +[1168:Ash Upton] ;||| ; œœœ punc +[1169:Chief How] ;********* at Mescalero Apache ;||| +[1170:Rick Sands] ;||| ; œœœ punc +[1171:Rick "Two Fingers" Rider] ;||| œœœ ; œœœ punc +; +; names for American Females... +; call girls (10)... +[1200:Honey Bun] ; œœœ punc +[1201:Sarah Jane] ; œœœ punc +[1202:Fast Sally] ; œœœ punc +[1203:Long tall Kerri] ; œœœ punc +[1204:Saucy Miss Cockwell] ; original wording at Kerri's request! +[1205:Sweet Charity] ; œœœ punc +[1206:li'l Mabel] ; œœœ punc +[1207:Nice Nelly] ; American slang for excessive propriety +[1208:Annabel Lee] ; œœœ punc +[1209:Dizzy Lizzie] ; œœœ punc +; + +[1210:Laura Picket] ;||| ; œœœ punc +[1211:Wilma Dunn] ;||| ; œœœ punc +[1212:Miss Rosy] ;||| ; œœœ punc +[1213:Lavinia Strumpet] ;||| ; œœœ punc +[1214:Mrs McSween] ;||| ; œœœ punc +[1215:Paulita Maxwell] ; Billy/Pat's girlfriend. +;------------ +; subplot messages + +[1490:Barney Mason rode up and said, "] +[1491:Pat, it's the end of the month, and the wages just arrived. +We've doling them out now, but you can change the budget for +next month if you like. Just come into the sheriff's office in +Lincoln and see how we're spending the money". ] ;œœœ + + +; Mexican peasant going to be run off his land by Anglo ranchers +[1500:"The Greengo ranchers, they try to drive me off my farm! Help me +fight them!" ] +[1501:"May the Blessed Virgin bring a thousand curses upon you". ] ; no to 1500 + +; lady in saloon being pestered by notorious gunslinger +[1503:"There's a gunslinger over there who don't know how to treat +a lady right. Teach him a lesson, Big Boy and I could show you +a good time". ] ;œœœ reworded from... ; œœœ punc +;; "This gunslinger don't know how to treat a lady right. Will you teach him +;; a lesson, Big Boy?" ] + +[1504:the lady looked disappointed. ] ; no to 1503 + + + + + + + + + + + + + +; Mexican picked on by cowboys... +[1506:"These cowboys, they picking on me. You make them stop, Senor?" ] +[1507:The Mexican looked disappointed. ] ; no to 1506 +[1508:The cowboys walked off, saying, "We're gonna get you for this" ] +; yes to 1506 ; œœœ punc + +; sick man in desert... +[1509:"Help me - my horse is dead, I'm out of water and plumb near dead". ] +;|||mentions reason for being in trouble. ; œœœ punc + +[1510:The man collapsed in despair. ] ; no to 1509 +;|||1511 moved to 1700 ; œœœ punc + + +; army being cheated by MD's subplot +[1511:"Howdoo pardner. I'm Ash Upton. How can I be of service?" ] ;||| Store +; in Lincoln ; œœœ punc +; Soldier at Fort Sumner - army are being cheated by Murphy- +; Dolan's +[1512:"The army are being cheated by the Murphy-Dolans on the meat +contract". ] ; œœœ punc +[1513:"What the heck brung you here? Draw, you son of a bitch". ] ; œœœ punc +; Billy goes into store whilst MDs present +[1514:"Get out of here, lawman. You ain't welcome". ] ; ; œœœ punc +; Pat goes into store whilst MDs present. +[1515:hunted through some papers and came up with the real account +books for the Murphy-Dolans. Now to show them to Colonel Baxter... ] +; pat/billy goes into the MD store whilst they're away. +[1516:showed the books to Colonel Baxter. He was livid and vowed to +prosecute the Murphy-Dolan's with the full force of the law. ] +; go to Fort Sumner with books. +[1517:"I can't go to the Colonel until I got proof - maybe you could +get hold of their books from the store in Lincoln?" ] +[1518:SEARCH FOR BOOKS. `] ; menu option in MD store +;;||| [1519:found the books and hid them in his jacket. ] ; find books in store +[1519:The store was deserted. ] ;||| go there when MD's / Ash not there + +; Pat is about to defeat a gang in a shootout, +; their leader calls a truce and barters their escape +[1520:The gang leader waved a white flag and called out: ] ; +; followed by one of 1521..1523 +[1521:"Pat - let us go and we'll tell you when Billy's planning the +next robbery". ] +[1522:"Pat - let us go and we'll leave the territory". ] +[1523:"Pat - let us go and we'll tell you where there is a stash of +gold buried". ] +; and responses to 1521..1523 if Pat accepts the offer... +[1524:"Thanks Pat - we'll be seeing you". They rode off. ] ; œœœ punc +[1525:"Buenos dias Senor. Now we head for Mexico". ] ; œœœ punc +[1526:"It's on the east side of the Pecos, at a deserted prospector's +camp". They rode off. ] +[1527:"Then we fight to the death". ] ; œœœ punc + +; Pat meets Texan posse in desert. Player can choose to +; lie that Billy has stolen Texan cattle. +[1529:Pat met a Texan posse looking for rustlers. What did he tell +them about Billy? ] ; intro message +[1530:HE STEALS TEXAN CATTLE `] ; menu option|||upper case +[1531:HE IS AN OUTLAW `] ; menu options - keep short. |||upper case +[1532:the posse offered to ride along as deputies, for the time +being. ] ; Pat lies about Billy stealing Texan cattle + + +[1533:The posse wished Pat good luck, and were right sorry +they couldn't help. ] ; Pat says Billy is an outlaw only. +[1534:Barney Mason rode up and said, "Pat, another man from that Texan +posse had to high-tail it outa town. You'd better get into +town and check the budget". ] ; |||now mentions Barney Mason, budget + +; Barney Mason reports the escape of an outlaw +; from Santa Fe - Pat can track him unaided for a reward. +[1535:Barney Mason rode up. "Pat - an outlaw's just busted out from +Santa Fe. Ride with me now, and I'll put you on his trail. "] +[1536:Barney rode off. ] ; no to 1535 +[1537:Barney lead Pat at a gallop to the head of a winding valley, +then left him to track the fugitive on his own. ] ; yes to 1535 +[1538:Pat took the outlaw in and claimed the $100 reward. ] +; get the outlaw. + + +; shootout message groups: intro/win/lose 1540..1569 +[1540:"Hurry! We must fight them!" ] ; yes to 1500 +[1541:"Muchos gracias, Senor. Now my farm is safe". ] ; œœœ punc +[1542:The peasant had been hit by a bullet. He died without saying a +word. ] ; œœœ punc + + + + +; duel message groups: intro/win/lose 1570..1599 + +; gunslinger bothering lady (1503) +[1570:The gunslinger slowly turned around and started to head for the +door... ] ; yes to 1503 +[1571:The gunslinger slumped to the floor... ] +[1572:the bullet struck home, bringing merciful blackness. ] +; invitations to duel in saloon + +[1573:"So you're the guy that drilled my +kid brother in the back, Mister Big Shot. Wanna settle this +outside?" ] ;||| Warren Oaks +[1574:"They say you're pretty fancy with +that six-gun of yours, Mister. But I reckon you ain't. Wanna take +me on outside?" ] ;||| Wayne Rodgers +[1575:"I seeze you undressin' my Mary-Jane +with your eyes, buster! Wanna settle this like a Man?" ] ;||| Karl Bekkert + + +; +; Pat is accosted by a local mayor with request for more protection +[1600:a pompous mayor walked up and shouted, "Sheriff Garrett, +this town's gotta have more protection. I want at least one more +deputy here before you leave us.] ;||| now mentions appearance ; œœœ punc +[1601:"OK, I guess that'll have to do". ] ; œœœ punc +[1602:"The people of this town ain't gonna be happy about this". ] ; œœœ punc + +; The same mayor asks Pat to run a vagrant out of town +; to enforce a bogus claim against the prospector (?) +[1605:A pompous mayor walked up and shouted, "Sheriff Garrett, there's +a vagrant I want run outa town. The varmit says he owns a claim +that one of my friends has a mind to". ] ; œœœ punc +[1606:Pat helped the mayor, and drove the vagrant out of town. But he +surely didn't feel good about doing it. ] +[1607:Pat refused, saying that even a vagrant has his rights. ] + +; Pat encounters an outlaw whilst tracking +; ++ In scrolling game ++ + +; At Siege, Carlyle runs in. +; ++ In arcades game ++ + +; Pat meets outlaw gang in an old Building. +; ++ In arcades game ++ + + + + + + + + + + + + + +; Billy Only encounters... +[1610:"Paleface, we greet you. Beef promised us by treaty, +Murphy-Dolans send us scraps. My people starve". ] ;|||no longer mentions Billy +; comment from Indian chief. +[1611:do you want to try to take these cows to the Indian Reservation? ] ; +; when double-click on Longhorns, after seeing 1610. +;[1612:the Indian chief rode up: "How, red man's friend?". He thanked +;Billy for the beef and offered to fake an uprising, if needed, to +;distract Pat in the future. ] ; +++ Moved to scrolling games |||| +[1613:FAKE UPRISING. `] ; extra MENU option. +[1614:"Yes paleface, for you we make lawman think we on warpath". ] ; œœœ punc + ;^^^ Billy->paleface + +; meet Widow Woman who wants ALL BILLY'S MONEY (quel surprise) +[1620:"Oh Sir, I'm jest a poor widow woman. If I can't pay the bank, +I'll be thrown off my little farm and have to go a-begging in the +streets. It ain't no more than $1000] ; followed by amount of gold +[1621:; that surely ain't nothing to a rich man like you". ] +[1622:"O thank you sir. I'll always be a-thinking on you". ] +; yes to 1620 +[1623:"O no! My last hope is gone - I'll be in the poorhouse till the +end of my days". ] ; no to 1620 + +; Desert peasant meets Billy and entices him to his house +; with story that family is sick. While Billy stays there, +; an outlaw arrives wit news of a gold consignment at +; the local bank, but it's a bluff - if Billy leaves to +; travel there, he gets challenged in the street by a bounty +; hunter. (Note: there may or may not be gold in then bank) +[1630:A peasant rode up: "Senor Billy, my family are sick. I no can +make them better. Please, you come try and help them". ] +[1631:he rode off with the peasant and stayed at his farmhouse; +fetching and boiling water and cooking for the family. +After a few days, they were recovering and was +about to leave when there come a knocking at the door... ] +; yes to 1630 (|This is Followed by 1633) +[1632:"Oh pity me, my family will surely die". ] ; no to 1630 +; 1633 moved to 1701||| +[1634:a bounty hunter was lying in wait. "Gotcha! you dumb +saddlebum - you've been set up! I'm gonna take you in, +dead or alive! Draw! ] +; meet Bounty hunter in town, after 1630/1631/1633 + + + + +; ambush by Buckshot Roberts +[1640:As he rode near a farmhouse, a huge man stepped out from +behind a rock: "There's folks as wants to talk to ya. I'm takin' you +in. The name's Roberts - +Buckshot Roberts. I'm a bounty hunter - an' I've taken in fifty scum +like you already, and you're gonna make it fifty-one. ] +;||| removed: You coming quiet? ] + +;|||moved to arcades.[1641:although Buckshot Roberts must have stopped half a dozen +;|||bullets, he still found strength to climb onto a horse and ride off. ] + + + + + + + + + + + + +; win gunfight +++ Move to arcades? + + +; Seven Rivers gang ambushes Billy/Pat in town. +[1645:Suddenly shots started to ring out. He dove for cover. On the +other side of the street, gunslingers hired by the Murphy-Dolan gang were +shooting at him! ] ; |||no longer mentions Billy ^^^now murphy-dolan, +; not seven-rivers + +; Jesse Evans gang ambushes Billy in town. +[1646:Suddenly the air rang to the crack of gunshot. He leapt for +cover. Across the street, he could see some badmen +throwing lead at him! ] ;|||no longer mentions Billy ^^^no longer +; mentions Jesse Evans Gang + +; Tom Cooper offers Billy lots of counterfeit money +; instead of his share in a robbery. +[1650:Tom Cooper said, "Billy, how'd you like 5 times your share of +this robbery - in counterfeit bills. There's a tenderfoot called +Duncan, spreading it around. It's a good looking paper. Won't give you +no problems if you spend it careful. What d'you say". ] +[1651:Cooper smiled: "Say, that's great. Here's the sack of money". +Billy pondered on it. How could he use it most easily? ] +[1652:BUY CATTLE WITH IT. `] ; menu option after 1651 +[1653:SPEND IT NORMALLY. `] ; menu option after 1651 +[1654:Cooper counted out Billy's share and rode off. ] ; no to 1650 + +; when Billy is in Lincoln City Saloon, he overhears that Sheriff +; Brady is on his way to ambush McSween. +[1660:he heard something that made him prick up his ears."You +know that no-good sheriff Brady's gonna run Mrs McSween off her ranch. +Ain't that the devil! But what can we do?" ] +[1661:Good Mrs McSween! An old friend, and a friend of the late +lamented Tunstall! One of the last alive to stand against the Murphy- +Dolans! What now? ] ; after 1660 ;œœœ no longer mentions Billy +[1662:DO NOTHING. `] ; menu option. +[1663:STOP BRADY. ] ; menu option. ->1664 + +[1664:he ran from the saloon and found Brady heading out of town. +He caught up with him and pulled him from his horse. Brady got up, +shaking with anger. It was obvious he was going to draw. ] +; stop brady from 1663 + +; Jose Miguel Sedillo, a friend of Billy's from way back, tells +; him of an attempted horse-robbery on Tunstall Ranch, +; while this is being run by Mrs McSween. +[1670:Jose Miguel Sedillo - an old and +trusted friend - rode up. "You must go help Mrs McSween - the +Murphy-Dolan's are there right now. They try to steal her cattle".] +;||| wording changed to make non-Billy specific + +; do nothing or... +[1671:GO THERE. `] +[1672:they rode off and got ready to fight... ] ; selects 1671: +;goes into shootout. + +; meet Joe Grant,. drunk in a saloon. + + + + + + + + + + + + + +[1674:Joe Grant staggered out of a back room, plainly drunk. "Hey Kid! +You know I'm the fastest gun in the West now. Lookee here at this +pearl-handled pistol I just - er - got gived". ] +[1675:He handed over the +pistol. It surely was pretty, but wouldn't be powerful enough to stop +a mosquito. Only three chambers were loaded. What did he do? ] +; nothing or... +[1676:ROTATE THE BARREL TO AN EMPTY CHAMBER. `] ; menu option +[1677:he turned the barrel and handed the gun back. ] +[1678:Joe Grant was waiting outside. He seemed to have gotten sober +real quick. He snarled "Draw, you prairie dog". ] +[1679:he handed the gun back. ] ; don't play with chambers + +[1680:"Beat it, we don't want none of Tunstall's men hereabouts". ] +; Billy meets hostile soldier + +; meet Mrs McSween +[1681:"Why hello old friend - how're you keeping". ] ;|||no longer mentions billy +[1682:"Gotta get going. This place keeps a body busy". ] +; follows 1681 + +; meet prospector +[1683:"What do you want, stranger? You another claim jumper?" ] + +; take sick man to santa fe +[1684:when they arrived with the sick man clinging to the horse, +he said "thanks for the ride Pard" and staggered off. ] |||^^^no longer +; mentions Billy + +; take sick man somewhere other than Santa Fe + +[1685:when they arrived with the sick man clinging to his horse, +the sick man cursed him for not going to Santa Fe and +staggered off on his own. ] ||| + +[1686:"Sheriff, can you come back later. We're real busy right now". ] +; Pat meets hostile soldier/rancher. ||| copied, slightly changed from 1680 + + + +; messages which result in player being thrown back to map... 1700..1729 +[1700:the man struggled onto the horse, and clung on weakly. He +gasped "Take me to Santa Fe, Mister. I got folks there". ] ; |||now mentions Santa Fe. +; yes to 1509 +; if visit Santa Fe next, get 1684, otherwise get 1685. +[1701:An outlaw burst through the door, brandishing a gun! He saw +Billy and dropped it in terror. "Billy the Kid! Don't kill me please, +I didn't mean ya no harm. Look, I'll help ya. The bank at White Oaks +just had a big payroll for a ranch thereabouts. Git +down there now, ya can pick up a whole load of money". ] ; follows +; 1631 ;||| moved from 1633 + + + +; Pat's strategy game messages... +; Go into sheriff's office... +;|||[1800:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||can I do for you?" ] +;|||[1801:move deputy to reserve. `] ; take deputy away from town +;|||[1802:move deputy to town. `] ; station deputy in this town. +;|||[1803:ok. ] +;|||[1804:there are ] ; followed by number of deputies +;|||[1805: deputies in town. ] ; follows 1804/digit +;|||[1806: deputies in reserve. ] ; follows 1804/digit +;|||[1807:Pat got a reward of ] ; followed by number: amount of dollars +;|||[1808: dollars. ] ; follows number. +;|||[1809:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||are you going to do to calm down the people in this here town?" ] +; people are upset about level of crime. +[1810:"the people sure are not gonna be happy about this." ] +[1811:And so the west was won. Pat had brought Law to +his domain, and was respected throughout the land. ] ; win message +[1812:And so Pat died in obscurity - known only by a few +historians who read dusty books about the Wild West. ] ; lose message + +[1813:Barney Mason rode up: "Pat, the county has run out of money. +I took temporary charge while you were away, but I had to fire +some deputies. You'd better get into town real quick and sort +it out". He rode off again. ] ; ||| +[1814:Barney Mason rode up: "Pat, there's trouble brewing. +People are saying you're doing no good as sheriff. You'd +better get into the office and do something". ] ;||| +[1815:Barney Mason rode up: "Pat, you finally got it wrong. You've +lost the election. Sorry old friend, you're no longer Sheriff". ] ; ||| + +;Billy strategy messages + +[1850:And so Billy became a legend. His reputation was known +throughout the world, and his story was oft repeated +by people of all countries. ] ; win message +[1851:And so Billy died in obscurity - known only by a few +historians who read dusty books about the wild west. ] ; lose message + +[1852:WANTED! Billy The Kid, Dead or Alive. Reward $]|||| +[1853:. ] ; after 1852/number||| +[1854:was stopped on the way. He pulled up his horse +and dismounted... ] ; Actors name, 1854. Used when +; get a random event whilst trying to go somewhere from map. |||| +; messages to do with meeting a gang... + +[1855:"Hey Billy, come share some coffee"... ] ;||| then 1856 ; œœœ punc +[1856:Billy sat down with the gang and talked of daring deeds +and famous crimes. Then he asked the crucial question... +"I've got a real sweet job planned. You want in?". The gang +looked at Billy. Should they trust this young hotblood? ] ;||| +; 1856, 1857 ||| +[1857:their leader spoke "Sure, but we'll want a good big cut. Now get out of +here before I change my mind". ] ;||| +[1858:Billy and the gang went over and over the targets they +could hit, but they couldn't agree which should be next... ] ; ||| visit gang again +;œœœ made "meaner" + + +; get spotted by a deputy in a lawful town... +[1859:down the street, a deputy called out, "Billy The Kid - hold it +right there. You gonna come quietly?" ] ;||| ; œœœ punc +[1860:RUN AWAY `] ; ||| menu option +[1861:IGNORE HIM `] ; ||| menu option +[1862:Billy fled the town. ] ; run away ||| +[1863:"Go for your gun, outlaw." ] ;||| + +[1864:woke to see his ex-girlfriend Paulita Maxwell tending +his injuries. "You should take more care, my love. Next time +could be your last". With her loving care, he was soon ready to go +again. ] ;&&& note either Billy/Pat. Preceded by Players Name +[1865:Suddenly, Pat Garrett burst in. ] ;&&& +[1866:"Billy, you know I can't +take you in. They'd hang ya like a dog, and I can't stand by and let that +happen. We'll have to settle this now, gun-to-gun. Draw, +outlaw". ] ;&&& +[1867:Billy and Pat approached other and exchanged glances. +Both knew that they were sworn enemies, but also old friends. +Was this to be the end for one of them? ] ;&&& +[1868:CHALLENGE TO DUEL. `] ; menu option &&& +[1869:AVOID CONFLICT. `] ; menu option &&& + + +; messages which occasionally replace the standard greetings +[1870:"Hey, it's Pat Garrett. I hear you polled ] ;||| for Pat ; œœœ punc +[1871:"Hey, it's Billy the Kid. I hear your reward is now $] ; |||| ; œœœ punc +[1872: votes". ] ;||| follows 1870 ; œœœ punc +[1873:". ] ; ||| follows 1871/amount of money ; œœœ punc + +[1880:"Hey, It's Billy The Kid! Get him boys!" ] ; occasionally +; when you go into a bank, or other law-abiding place +; in town. Leads to escape game. ||| +[1881:(lawful) ] ; added to town name on map +[1882:the place was completely deserted. ] ; ||| visit a ranch +; etc. which has gone bust, or similar. + + +; messages Billy gets when gangs go out of business +[1890:Tom O'Foliard rode up and said, "hello old friend, ] ;||| ^^^ +; now now longer mentions Billy + +[1891:the Cooper Gang have been brought to justice". ] ;||| +[1892:the Socorro Vaqueros gang has been brought to justice". ] +[1893:the Seven Rivers Gang gang has been brought to justice". ] +[1894:the Dona Ana Bunch gang has been brought to justice". ] +[1895:the Jesse Evans gang has been brought to justice". ] +[1896:the fugitives' gang has been brought to justice". ] +[1897:the regulators' gang has been brought to justice". ] + +[1900:"Ain't nuthin going on around here". ] ; knows of no ||| +; relevant events in this town. +; Tom O'Foliard's comments on Billy's progress. +[1901:you've gotta hurry up. The Murphy-Dolans are taking over +the county, and you've gotta stop 'em". ] ; œœœ punc +[1902:you've got the Murphy-Dolans on the run. Keep going +ol' buddy". ] ; œœœ punc +[1903:you've almost nailed the Murphy-Dolans, my friend. But +Pat's almost got the territory cleaned up, so you'd better pull +off some pretty big heists to finish 'em off". ] ; œœœ punc +[1904:Billy, you've stolen a total of $] ;^^^Billy added at start (not +; an important change) +[1905: which has bankrupted ] +[1906:of their ranches, but ] +[1907:of the 6 important gangs have been wiped out". ] ; œœœ punc + +; ratings added ^^^^ +[1920:Billy's final reward was $] +[1921: out of a maximum of about $15000, and he will ] ;^^^^ + +[1922:not be remembered. ] +[1923:be a dim memory. ] +[1924:be a figure of fun. ] +[1925:be remembered by many. ] +[1926:be remembered by most. ] +[1927:be a minor hero. ] +[1928:be a popular hero. ] +[1929:be a household name till the end of time. ] + +; ratings added ^^^^ +[1930:Pat's final popularity was ] +[1931: votes out of a maximum of about 4000, and he will ] ;^^^^ + + +;------------------ +;; [2000:Billy The Kid Intro screens. ] +[2001:"Well if it ain't momma's boy Billy! Let's see how good you are +now. Draw, Kid!" ] +[2002:Tunstall Ranch in Lincoln County, across the state line. ] +[2003:"...Murphy and Dolan are dangerous men, Mr Tunstall." ] +[2004:"I ain't gonna let their threats worry me, Sheriff Garrett. I'm +too riled up about the way they're cheating honest farmers." ] +[2005:"Hey now! Here's someone who might be a help. Where've you +been these past years, Billy? John Tunstall, meet the Kid, an old +friend of mine and a good man in a fight." ] +[2006:"I'd like you to join my men, Billy. Here's my lucky Silver +Dollar on account. Keep it safe." ] +[2007:"Pat, Billy, there goes dinner!" ] +[2008:"Another good man dead! I swear I'll bring order to Lincoln +County and hunt down every last outlaw in it." ] +[2009:"You're wrong, Pat, you can't play it by their rules. If you +mean what you said, you'll be hunting me too. Because I vow to do +whatever I must to avenge this murder, inside or outside the law." ] +[2010:"The Legend of Billy The Kid" is an authentic Western for +one or two players. ] +[2011:As Billy, you might tie up your horse on Main Street, +swagger into the saloon, meet an outlaw gang at cards, and go +on to rob the bank... ] +[2012:...or raise money to help a poor widow by rustling a herd +of cows and driving them to Mexico. ] +[2013:As Pat you might learn of a planned train robbery from +the local drunk... ] +[2014:...and lead a posse after the outlaws, track them to their lair, +and shoot it out with the gang. ] + + + + + + + + +-------- + diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/ref/acode.acd b/l9dev/regress/games.l9/billy.l9/pc.l9/ref/acode.acd new file mode 100644 index 0000000..aa11347 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/pc.l9/ref/acode.acd differ diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/ref/gamedata.dat b/l9dev/regress/games.l9/billy.l9/pc.l9/ref/gamedata.dat new file mode 100644 index 0000000..48dfe61 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/pc.l9/ref/gamedata.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/ref/message.txt b/l9dev/regress/games.l9/billy.l9/pc.l9/ref/message.txt new file mode 100644 index 0000000..0e2508e --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/pc.l9/ref/message.txt @@ -0,0 +1,1200 @@ +; MESSAGE.TXT +; +; Messages for Billy The Kid Map/Strategy Games +; +; Copyright (C) 1991 Level 9 Computing Ltd. +; +; +; ||| are changes since initial text sent to Ocean for translation +; œœœ are changes since final text sent to Ocean for translation 8 Dec 90 +; (Corrections of obvious spelling and punctuation errors are not +; marked - but additions to punctuations are). +; &&& are additional things +; ^^^ are changes from 1991 onwards. +;l *********** what about copyright message???? +; +[1:Pat ] +[2:Billy ] ; names for "PLAYERSNAME" variable. +[3:`] +[5:%] +[6:% %] +[7:. ] ; dot +[8: ] ; space ; ^^^^ + +[11:Sheriff Pat Garrett ] ; full name for Pat, e.g. for +; when introduced to people. +[12:Billy The Kid ] ; full name for Billy, e.g. for +; when introduced to people. + + + +;||| messages 21..102 moved to other parts of the game... +;[21:Billy spread the map and figured on it a while. He'd gotta +;make a move and he'd gotta make it right... ] +;[22:Billy drove off the herd and started the long drive to Mexico... ] +;[23:Outside, a man shouted, "Come on out with your hands in the air, +;fella. We've gotcha surrounded!" ] +;[24:The Kid was trapped! The law was all over the place, and he hadn't +;got nuthin' but his ol' 6-gun. ] +[25:The plan was perfect. The train'd have to slow when it hit the +incline. And that'd be the chance to catch onto it. ] + +[26:Run alongside, jump over the rocks, then climb up the ladder +and jump onto the fuel wagon. Stop that train! ] ; œœœinstructions +; added. Also "Billy" replaced with "the" + +; +; Duel messages. Both follow Player's name ||| +[101:had won by a whisker. His opponent collapsed to the floor. ] ;^^^ +;It seemed best to hightail it outa there before anyone started +;to ask awkward questions about who fired first. ] ;||| +[102:went down in agony. The last thing he remembered +was friendly hands dragging him onto a horse... ] ;||| + + +; Brawl messages ||| +[300:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew that he would +have to fight his way to the door if he wanted to escape in one +piece. ] ;Billy is on the right. ] ; Billy ||| œœœ(mentions group of thugs) +[301:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew he'd +have to fight his way to the door if he wanted to escape in one +piece. You are on the right. ] ; Pat |||œœœ(mentions group of thugs) +[302:"I reckon you jogged ma +elbow and spilled my beer there Mister. Get me another drink, +if you know what's good for you". ] ;||| Ned Parkin +[303:"I don't like +the way you're looking at me, son. Reckon you'd best take +you're liquor elsewhere". ] ;||| Jack Shoe +[304:"We don't like your sort in this bar, Mister. +Maybe you'd better find another place to drink your sasparilla!" ] ;||| Ben Davis +[305:"Hey Mister, some guys other there +were talking about jumping you. You gonna stand there and take +that?" ] ;||| Lavinia Strumpet + + +; invitations to card game in saloon +[320:"They say +you're pretty good with a deck, Mister. But how about a game +with the grown-ups?" ] ;||| Rick Sands +[321:"Sorry Mister, I must have mistaken you for a man!" ] ;||| + +; encounters elsewhere in town, or others +[330:"You look the type who might aid an honest godfearing woman, +Sir. My respectable boarding house has been taken over by ruffians. Can +you drive them off for me?" ] ;||| Laura Picket +[331:"Hey mister. Some drifter friends of +the local Judge have taken over my homestead. You've got an honest +face - can't you help me?" ] ;||| œœœno longer mentions name. +[332:"I guess you think you can strut around this town like you +own the place, Stranger. Well there's only room for one tough +guy in this town. Draw or git!" ] ; Rick "Two Fingers" Rider. ;||| +[333:"Hey mister, they say you're pretty good with those shootin' +irons of yours. Won'cha help me out - some of Murphy's mob have +taken over my claim. Move 'em out and I'll cut you in for a share!" ] ;||| +[334:"Why hello again, dear. I'd love to talk to ya some more, +but I've just gotta wash my hair..." ] ;||| visit girlfriend! œœœpunc + + + +; references to people elsewhere who need help. +[340:"Hey mister, a friend of mine needs help... ] ; before 342..349 ;||| +[341:Might be able to help ya in return, too! ] ; after 342..349 ;||| +[342:It's Whiskey Pete the prospector out at his claim. ] ;||| +[343:Laura Picket at the El Paso hotel has got big trouble. ] ;||| +; ^^^ now at El Paso + +[344:Wilma Dunn out at the Dunn ranch. ] ;||| +[345:Joe Dunn out at his ranch. ] ;||| +[346:lil' ol' Miss Rose, out at her old place. ] ;||| + + + +[360:"Hey mister, someone was looking for you... ] ; before 362..369 +[361:why not get over there and look 'em up?" ] ; after 362..369 +[362:Joe Grant was the name. He was hanging out in the Santa +Fe Saloon. ] +[363:Karl Bekkert was the name. He was hanging out in the Santa Fe +Saloon. ] +[364:Jack Shoe was his name. Saw him in the El Paso Saloon. ] +[365:Ben Davis, I think. Saw him in the Santa Fe Saloon. ] +[366:Warren Oaks, I think. He hangs out in the Mesilla saloon. ] +[367:lil' ol' Miss Rose, out at her old place. ] ;||| +;[367:Wayne Rogers, so I'm told. He hangs out in the +;White Oaks saloon. ] ;||| + + + +; 400+location number is press stories about the most common events +; that happen at places... ||| +[410:Pat Garrett has been made Sheriff of Santa Fe ] +[411:Pat Garrett has been made Sheriff of White Oaks ] +[412:Pat Garrett has been made Sheriff of Lincoln City ] +[413:Pat Garrett has been made Sheriff of Mesilla ] +[414:Pat Garrett has been made Sheriff of Roswell ] +[415:Pat Garrett has been made Sheriff of El Paso ] + +[424:the Bitter Lake Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ +[425:the Fritz Ranch, of the Murphy-Dolan's, has gone broke. ] ;||| œœœ +[426:the Chisum Ranch has gone out of business. ] ;||| œœœ +[427:the Dedrick Ranch, of the Murphy-Dolan's, has closed down. ] ;||| œœœ +[428:the Beckwiths, associates of Murphy and Dolan, have closed their +ranch and left the state. ] ;||| œœœ +[429:the Tunstall Ranch has gone out of business. ] ;||| +[430:the Reed Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ + +[431:only another ] ;œœœ (Followed by number of ranches left, then 432) +[432: of those Murphy-Dolan swine to get. Keep at it, Billy] ;œœœ + +; text for Pat to control deputies etc.;||| +[450:WHERE ARE DEPUTIES `] ;|||menu option ;||| +[451:HIRE DEPUTY `] ; |||menu option +[452:FIRE DEPUTY `] ; |||menu option +[453:deputy ] ; for reporting number +[454:deputies ] +[455:people are ] ; followed by happiness: 456..464 +[456:rioting. ] +[457:very angry. ] +[458:angry. ] +[459:displeased. ] +[460:restless. ] +[461:content. ] +[462:happy. ] +[463:ecstatic. ] +[464:money: $] ;||| +[465:`income next month: $] ;||| +[466:`costs next month: $] ;||| +[467:`(] ; 467, number, 468 || +[468: Texan Deputies working for nothing). ] ||| + +; menu option versions of town names... +[470:Santa Fe `] +[471:White Oaks `] +[472:Lincoln City `] +[473:Mesilla `] +[474:Roswell `] +[475:El Paso `] + + +;||| Full stops removed from messages 500..548 +[501:a herd of longhorns ] ; 0 +[502:a herd of longhorns ] ; 0 +[503:a herd of longhorns ] ; 0 +[504:a herd of longhorns ] ; 0 +[505:a herd of longhorns ] ; 0 + +[510:Santa Fe ] ; dc.w 3345 ; Santa Fe 10 +[511:White Oaks ] ; dc.w 3346 ; Albe'que 11 +[512:Lincoln City ] ; dc.w 3347 ; Lincoln City 12 +[513:Mesilla ] ; dc.w 588 ; Las Cruces 13 +[514:Roswell ] ; dc.w 589 ; Roswell 14 +[515:El Paso ] ; dc.w 0 ; spare town 15 +[516:Frontier Town ] ; dc.w 0 ; spare town 16 +[517:Frontier Town ] ; dc.w 0 ; spare town 17 +[518:Frontier Town ] ; dc.w 0 ; spare town 18 +[519:Fort Stanton ] ; dc.w 3351 ; Fort Stanton 19 +[520:Fort Sumner ] ; dc.w 3352 ; Fort Sumner 20 +[521:A New Fort ] ; dc.w 0 ; spare fort 21 +[522:A New Fort ] ; dc.w 0 ; spare fort 22 +[523:A New Fort ] ; dc.w 0 ; spare fort 23 +[524:Bitter Lake ] ; dc.w 581 ; +[525:the Fritz Ranch ] ; dc.w 582 ; +[526:the Chisum Ranch ] ; dc.w 583 ; +[527:the Dedrick Ranch ] ; dc.w 584 +[528:the Beckwith Ranch ] ; dc.w 585 +[529:the Tunstall Ranch ] ; dc.w 586 ; +[530:the Reed Ranch ] ; dc.w 587 + + + + + + + + + + + + + +; one of these should be Blazer's Mill, nr Mescalero Apache... +; See P.10 design +[531:the Dunn farmhouse ] ; 31 +[532:the Dunn farmhouse ] ; 32 +[533:the Rose homestead ] ; 33 +[534:a farmhouse ] ; 34 + + +[535:Mescalero Apache Reservation ] ; dc.w 3356 ; Mescalero Apache +settlement 35 +[536:Wild Apache Settlement ] ; dc.w 0 ; spare indians 36 +[537:Wild Apache Settlement ] ; dc.w 0 ; spare indians 37 +[538:Wild Apache Settlement ] ; dc.w 0 ; spare indians 38 +[539:the Santa Fe express ] ; 39 +[540:a wagon train ] ; 40 +; outlaw hideout names... +[541:The Cooper Gang hideout ] ; 41 Santa Fe +[542:Socorro Vaqueros ] ; 42 White Oaks Run by Pete Stewart ||| +[543:The Seven Rivers Gang hideout ] ; 43 Lincoln City +[544:The Dona Ana Bunch hideout ] ; 44 Mesilla +[545:The Jesse Evans gang hideout ] ; 45 Roswell +[546:The fugitives' hideout ] ; 46 El Paso +[547:The regulators' hideout ] ; 47 ; Los Portales, NE of Fort Sumner. ||| +[548:a prospector ] ; 48 + +;|||[598:Billy ] +;|||[599:Pat ] +; Menu messages start at 600... +; general message ranges: +; MM+1..MM+49: involve spending money +; MM+50..MM+99: are the menu options themselves +; MM+100..MM+149: involve chaining to a new overlay + +; menu options involving spending money... +[601:BUY ROUND OF DRINKS ($5) `] +[602:GO UPSTAIRS WITH THE GIRL ($25) `] +[603:OFFER A BRIBE ($15) `] +[604:GIVE $20 `] +; drinks on offer at bar... +[605:NOTHING `] +[606:RED-EYE ($1) `] +[607:BEER ($1) `] + +; menu options not involving spending money... +[650:LEAVE TOWN. `] +[651:DO NOTHING. `] ; menu option +[652:GO THERE. `] ; menu option +;; [653:think about it. `] ; menu option ****** +[654:YES. `] +[655:NO. `] +[656:RAISE HELL. `] ; option in bar ||| +[657:Yeehaa... ] ; response to 656. ||| + +;[656:ROB THE TRAIN. `] ; option when click on train. +;[657:meet the wagon train. `] ; option when click on wagons +;[658:go visit the Apaches. `] ; option when click on apache ; +;settlement. +; standard menu for talking to people. +[659:GREET. `] ; ||| HULLO. `] +[660:TALK. `] +[661:THREATEN. `] +[662:MOVE ON. `] +; menu for when challenged to a duel... +[663:ACCEPT. `] +[664:BACK DOWN. `] ; try to pacify person. +[665:ROB THE BANK. `] +[666:STEAL COWS. `] +[667:TAKE COWS TO APACHES. `] + +; SYSTEM menu options... +[668:SAVE GAME `] ;||| +[669:RESTORE `] ;||| +[670:RESTART `] ;||| + +[671:English `] ; menu option +[672:Deutsch `] ; menu option +[673:Fran‡ais `] ; menu option + + +;600+100..129: arcades overlay games +;600+130..159: intermission overlay games +;600+160..189: scrolling overlay games +;[700:rode off to intercept the train. ] +;[701:rode off to the ranch... ] +;[702:rode off to the ranch... ] +;[703:rode off to the ranch... ] +;[704:rode off to the ranch... ] +;[705:rode off to the ranch... ] +;[706:rode off to the ranch... ] + +;[730:rode off to meet the wagon train. ] +;[731:rode off to visit the Apache settlement. ] + +[760:set off to steal the steers. ] +[761:Get behind them longhorns +and drive 'em south. Press fire to switch between the +members of your gang. ] ; rustling game. œœœinstructions added. +[762:track the gang southwards. Press fire when near a clue +to see what it means. Don't take too long! ] ;œœœadded. +[763:when the bell goes, push forwards to draw, and then steer +the gunsight onto the other guy. Press FIRE to shoot him. ] ;œœœ +;[761:set off to hunt down the gang. ] ; tracking game +;[762:escaped from the bank. ] ; Billy bank escape +;[763:set off to ambush Billy. ] ; prevent Bank robbery game. +[764:set off to take the cows to the Indians. ] ;|||| +[765:Press fire and down to duck, fire and up to raise your +head above the barricade. Shoot as many of the bad guys as +you can. You can't shoot or be shot so long as you keep your +head down. ] ;œœœ +[766:Press right//left to move sticks of dynamite, and press +FIRE to light the fuse. But how many do you need? ] ;œœœ + +; responses... +;[851:rode off. Press fire. ] ; result of 652 +;[852:had finally come to a decision, and rode into town. ] +;; result of 652 under other circumstances (***debugging) +[853:called for drinks on the house. That sure made him popular. ] +[854:went upstairs with the saloon girl... ] +[855:offered the bribe. ] +[856:handed over some money. ] +[857:Billy headed back to the hideout to round up the gang, +and burst into the bank in force... ] +[858:Billy started to draw his gun, but realised that without +a gang to back him up he hadn't a hope. ] ;||| try to rob bank +; without having contacted a gang first. +[859:Billy started to ride off, but realised that without +a gang free to back him up he hadn't a hope. ] ;||| try to rob train +; without having contacted a gang first. + + +; invitation to train robbery (less common, so one only)... +[867:"There's gonna be a whole heap of gold on that train tomorrow. +Why, if a body had a mind to, he could catch it real easy at the +gradient". ] ; œœœ punc +[868:the safe contained ] ; followed by amount of gold, 869. +[869: dollars in gold. ] +[870:"We've been robbed by Billy The Kid - so don't ask to make +a big withdrawal! "] +; when Billy goes into a bank he's recently robbed. +[871:"We've been robbed. I hope you've come to make a deposit". ] ; œœœ punc +; when Billy goes into a bank another gang has recently robbed + +; GENERAL MESSAGES ||| +[872:owned $] ;preceded by PlayersName, followed by amount, 873 ||| +[873:. ] ; after 872/amount. ||| +[874:A voice called out "Get outa here - we're closed!" ] ;||| +; try to go into buildings which are just scenery. +[875:Billy decided not to go into the Sheriffs office, just +to be on the safe side. ] ; ||| +[876:"You deaf or something, boy?" ] ; œœœ ask same person a second +; question ; œœœ punc +[877:"I said, YOU DEAF OR SOMETHING, BOY?" ] ; œœœ ask same person a second +; question ; œœœ punc +[878:"Can't stand around jawing all day. Be seeing ya". ] ;œœœ ; œœœ punc + + + + + + +; Saloon bits and pieces... +[899:"Prepare to draw, varmit". ] ;||| challenged to duel whilst outside. ; œœœ punc +[900:"I hear you play Monte. D'you want to deal?" ] ; œœœ reworded +[901:"Some other time, pard." ] ; refuse to play monte. ; œœœ punc +[902:Accuse the varmit of cheating. ] ; Monte +[903:Forget it. ] ; After Monte game +[904:"I'll meet you on the street". ] ; what Billy says if he decides +; to fight the duel. +[905:"OK, Yellabelly. Just crawl outa here fast, or I'll plug you". ] ; œœœ punc +; climb down instead of fighting duel. +[906:"Yeh, well... I guess I'll help ya... ] ;|||trailing quote removed +; threaten, agrees to give info. ; œœœ punc +[907:"Gee, I'd surely like to help ya, but I don't know nuthin'!" ] ; œœœ punc +; threaten, but doesn't know anything. +[908:"You trying to push me around, you saddle bum? Let's settle this +right now, gun-to-gun". ] ; |||no longer mentions outside ; œœœ punc +[909:"What'll it be, friend?" ] ; barman offers drinks ; œœœ punc +[910:"Wanna place a bet, friend?" ] ; roulette ; œœœ punc +[911:put his money on the table. The wheel span, and as it stopped +the ball sprang sideways into 00. That table surely was crooked! ] +[912:Accuse the croupier of cheating. ] ; roulette table. +[913:Forget it. ] ; roulette table. +;|||[914:I'll see you outside. ] ; what Billy says if he decides +;; to challenge +[915:"I'm ] ; then player's full name +[916:", the reply came back: "I'm ] ; name chosen from 1000... +[917:". ] ; after 916, name. +[918:"Nobody tells me nuthin'." ] ; unthreatened, just knows nothing +[919:"I ain't telling you nuthin' about anythin', bud!" ] ; refuses +; to tell Player, in response to "talk" option on menu + +; MESSAGES FOR FIRST MEETING VARIOUS TYPE OF PEOPLE... +; a group of 10 messages from a cowardly person... +; a group of 10 messages from a greedy person... +; a group of 10 messages from anyone else... +; +; cowardly meeting... +[920:"Why, hello stranger". ] ; œœœ punc +[921:"Well, howdy mister". ] ; œœœ punc +[922:"Welcome, stranger". ] ; œœœ punc +[923:"Er, greetings stranger". ] ; œœœ punc +[924:"Er, howdoo young fella". ] ; œœœ punc +[925:"Er, hello pardner". ] ; œœœ punc +[926:"Er, howdoo stranger". ] ; œœœ punc +[927:"Er, good day to you, pardner". ] ; œœœ punc +[928:"Er, howdoo stranger". ] ; œœœ punc +[929:"Er, hello young Sir". ] ; œœœ punc + +; greedy meeting... +[930:"Hello stranger". ] ; œœœ punc +[931:"Howdoo stranger". ] ; œœœ punc +[932:"Hi there, stranger". ] ; œœœ punc +[933:"Good day, pardner". ] ; œœœ punc +[934:"Hello stranger". ] ; œœœ punc +[935:"Hello friend. You new around here?" ] ; œœœ punc +[936:"Hello there, boy. You want anything from me?" ] ; œœœ punc +[937:"Greetings stranger. You wanting something?" ] ; œœœ punc +[938:"Hello stranger. Can I help you some?" ] ; œœœ punc +[939:"Howdy pardner. You needing some help?" ] ; œœœ punc +; +; normal, well-balanced people... +[940:"Hello pardner". ] ; œœœ punc +[941:"Howdoo stranger". ] ; œœœ punc +[942:"Hi stranger". ] ; œœœ punc +[943:"Greetings stranger". ] ; œœœ punc +[944:"Howdoo stranger". ] ; œœœ punc +[945:"Hello pardner". ] ; œœœ punc +[946:"Howdy stranger". ] ; œœœ punc +[947:"Goodday stranger". ] ; œœœ punc +[948:"Howdoo friend". ] ; œœœ punc +[949:"Hello stranger". ] ; œœœ punc + +[950:"Howdy Pat". ] ; œœœ punc +[951:"Howdy Billy". ] ; meet someone again. ; œœœ punc +[952:Sheriff Pat Garrett`] ;œœœ last bit moved to 975ish + +[953:Billy The Kid`] ; copy of message 2||| MENU OPTION +[954:Who do you want to play?` `(Press FIRE or SPACE). ] ; |||opening question. œœœ reworded +[955:Pat, you must track down and capture all the outlaw gangs. Talk +to people for information. And when in a sheriffs office, check your +deputies are where they're wanted.` `(Press FIRE or SPACE). ] ;||| œœœ reworded +[956:Billy, you must try to bankrupt the Murphy-Dolan gang. Rob +their banks and steal their cows. Talk to people for information. +And try to steer clear of the law.` `(Press FIRE or SPACE). ] +;||| œœœ reworded +[957:"Oh, it's you again". ] ; ||| meet someone again that you +; haven't been introduced to. ; œœœ punc +[958:"Clear off buster, I don't associate with your kind". ] ;||| +; meet someone again who we didn't get on with last time! + + +;[951:"I don't deal with your kind, lawman". ] ; Pat tries to talk to +;; someone he is very unpopular with. +;[952:"I don't have nothing to do with outlaws". ] +; likewise Billy. +; +;[953:"What can I do for you, stranger. ] ; either player +;; talks to someone for the first time, when they are not +;; very well known (i.e. at the start of the game). + +;[954:Ain't you Billy the Kid? Anything I can do to oblige you? ] +;; meet's someone for the first time when better known +;[955:well, if it isn't Sheriff Garrett. What can I do for you, sir? ] +;; meet's someone for the first time when better known + +;; meet someone who is inclined towards/neutral towards player + + +[960:] ; header for 960..990 messages. |||quote removed +[961:." ] ; terminator for 960..990 messages. +[962:I hear ] ; always followed by gang name. +[963:just robbed the bank in ] ; followed by town name +[964:just rustled some cows from ] ; followed by ranch name +[965:hideout is right near ] ; preceded by gang name, followed by town +; name. +[966:Folks tell me there's a pile of money at the bank in ] +;|||moved to 972. [967:I hear say there are x deputies stationed at ] +[968:"There's a widow woman over at ] ; œœœ punc +[969:who needs help". ] ; œœœ punc +[970:"I'm being run off my land by Murphy. I need help!" ] ; œœœ punc +[971:"That gunslinger over there is threatening me and my folks. +Kill him, won't ya?" ] ; œœœ punc +[972:there are ] ; followed by number, 973||| +[973: deputies stationed at ] ; after 972/number, before town name.||| +[974:2-PLAYER GAME (Use UP//DOWN to select, +then press FIRE or SPACE). ] ; œœœcopy of message 1||| MENU OPTION AT START OF GAME +[975:Trying serial connection. ];^^^ (press FIRE to give up). ] ;œœœ œœœ punc + + + +; 1000+Location number for various places that people can +; mention things happening. Events can include train + +; contents, contents of banks, number of deputies in +; various towns, gang locations, recent robberies, +; subplot hints: e.g. Widow women needing help(!) +[1010:Santa Fe. ] ; Santa Fe 10 +[1011:White Oaks. ] ; Albe'que 11 +[1012:Lincoln City. ] ; Lincoln City 12 +[1013:Mesilla. ] ; Las Cruces 13 +[1014:Roswell. ] ; Roswell 14 +[1015:El Paso. ] ; 15 + +[1039:the express train. ] ; 39 +[1040:the wagon train. ] ; 40 + +; messages where someone tells one of the players +; about various robberies, train/bank, that are +; planned during the next little while. +[1041:the Cooper Gang] ; 41 Santa Fe ; œœœ punc +[1042:Socorro Vaqueros] ; 42 White Oaks ||| ; œœœ punc +[1043:the Seven Rivers Gang] ; 43 Lincoln City ; œœœ punc +[1044:the Dona Ana Bunch] ; 44 Mesilla ; œœœ punc +[1045:the Jesse Evans gang] ; 45 Roswell ; œœœ punc +[1046:the fugitives] ; 46 El Paso ; œœœ punc +[1047:the Regulators] ; 47 Near Fort Sumner ||| ; œœœ punc +; +; names for white American Males (young/old)... +; other possible formula names are... +; ... the rat + +[1100:honest Jake] ; œœœ punc +[1101:cookhouse Charlie] ; œœœ punc +[1102:Jericho Jake] ; œœœ punc +[1103:little Joe] ; œœœ punc +[1104:Black Jake] ; œœœ punc +[1105:Trapper John] ; œœœ punc +[1106:Prairie John] ; œœœ punc +[1107:long tall John] ; œœœ punc +[1108:Johnny Reb] ; œœœ punc +[1109:Omaha John] ; œœœ punc + +[1110:Sam Peckinpaw] ; œœœ punc +; ** also name on a grave in Fistful of Dollars ** +[1111:Cornish Sam] ; œœœ punc +[1112:snake-eyes Sam] ; œœœ punc +[1113:Yosemite Sam] ; œœœ punc +[1114:slippery Sam] ; œœœ punc +[1115:Ledger Bill] ; œœœ punc +[1116:Arkansas Will] ; œœœ punc +[1117:Hotel Bill] ; œœœ punc +[1118:Bronco Bill] ; œœœ punc +[1119:Tom Destry] ; œœœ punc +; ** as in Destry Rides Again + +[1120:Rowdy Yates] ; œœœ punc +; ** Clint Eastwood's role in Rawhide + +[1121:mad Mike] ; œœœ punc +[1122:Texas Mike] ; œœœ punc +[1123:mustang Mike] ; œœœ punc +[1124:Howard Johnson] ; œœœ punc +; ** as in Blazing Saddles +[1125:mule-skinner Jim] ; œœœ punc +[1126:Louis L'Amour] ; œœœ punc +; ** Western novelist +[1127:cool-hand Jim] ; œœœ punc +[1128:the Swede] ; œœœ punc +[1129:Bernardo O'Riley] ; œœœ punc +; ** Bronson's role in the Magnificent Seven +; +[1130:Slim Pickins] ; œœœ punc +[1131:Mexico Pete] ; œœœ punc +[1132:Two-gun Pete] ; œœœ punc +[1133:Billy-Joe Bob] ; œœœ punc +; ** character in Fresno +[1134:Teacher Pete] ; œœœ punc +[1135:Red River Nick] ; œœœ punc +[1136:Nebraska Nick] ; œœœ punc +[1137:tricky Nick] ; œœœ punc +[1138:lucky Luke] ; œœœ punc +; ** Goscinny & Uderzo hero +[1139:Navaho Nick] ; œœœ punc +; +[1140:honest Dave] ; œœœ punc +[1141:dead-eye Dick] ; œœœ punc +[1142:Kansas Dave] ; œœœ punc +[1143:dainty Dave] ; œœœ punc +[1144:dynamite Dave] ; œœœ punc +[1145:red-eye Bert] ; œœœ punc +[1146:bull-whip Bert] ; œœœ punc +[1147:slick Bert] ; œœœ punc +[1148:Frenchie Dupont] ; œœœ punc +[1149:Duke Wayne] ; œœœ punc +; ** John Wayne nicknamed Duke +; + +; new names for extra subplots... +[1160:Whiskey Pete] ;||| ; œœœ punc +[1161:Joe Dunn] ;||| ; œœœ punc +[1162:Joe Grant] ;||| ; œœœ punc +[1163:Karl Bekkert] ;||| ; œœœ punc +[1164:Jack Shoe] ;||| ; œœœ punc +[1165:Ben Davis] ;||| ; œœœ punc +[1166:Warren Oaks] ;||| ; œœœ punc +[1167:Wayne Rodgers] ;||| ; œœœ punc +[1168:Ash Upton] ;||| ; œœœ punc +[1169:Chief How] ;********* at Mescalero Apache ;||| +[1170:Rick Sands] ;||| ; œœœ punc +[1171:Rick "Two Fingers" Rider] ;||| œœœ ; œœœ punc +; +; names for American Females... +; call girls (10)... +[1200:Honey Bun] ; œœœ punc +[1201:Sarah Jane] ; œœœ punc +[1202:Fast Sally] ; œœœ punc +[1203:Long tall Kerri] ; œœœ punc +[1204:Saucy Miss Cockwell] ; original wording at Kerri's request! +[1205:Sweet Charity] ; œœœ punc +[1206:li'l Mabel] ; œœœ punc +[1207:Nice Nelly] ; American slang for excessive propriety +[1208:Annabel Lee] ; œœœ punc +[1209:Dizzy Lizzie] ; œœœ punc +; + +[1210:Laura Picket] ;||| ; œœœ punc +[1211:Wilma Dunn] ;||| ; œœœ punc +[1212:Miss Rosy] ;||| ; œœœ punc +[1213:Lavinia Strumpet] ;||| ; œœœ punc +[1214:Mrs McSween] ;||| ; œœœ punc +[1215:Paulita Maxwell] ; Billy/Pat's girlfriend. +;------------ +; subplot messages + +[1490:Barney Mason rode up and said, "] +[1491:Pat, it's the end of the month, and the wages just arrived. +We've doling them out now, but you can change the budget for +next month if you like. Just come into the sheriff's office in +Lincoln and see how we're spending the money". ] ;œœœ + + +; Mexican peasant going to be run off his land by Anglo ranchers +[1500:"The Greengo ranchers, they try to drive me off my farm! Help me +fight them!" ] +[1501:"May the Blessed Virgin bring a thousand curses upon you". ] ; no to 1500 + +; lady in saloon being pestered by notorious gunslinger +[1503:"There's a gunslinger over there who don't know how to treat +a lady right. Teach him a lesson, Big Boy and I could show you +a good time". ] ;œœœ reworded from... ; œœœ punc +;; "This gunslinger don't know how to treat a lady right. Will you teach him +;; a lesson, Big Boy?" ] + +[1504:the lady looked disappointed. ] ; no to 1503 + + + + + + + + + + + + + +; Mexican picked on by cowboys... +[1506:"These cowboys, they picking on me. You make them stop, Senor?" ] +[1507:The Mexican looked disappointed. ] ; no to 1506 +[1508:The cowboys walked off, saying, "We're gonna get you for this" ] +; yes to 1506 ; œœœ punc + +; sick man in desert... +[1509:"Help me - my horse is dead, I'm out of water and plumb near dead". ] +;|||mentions reason for being in trouble. ; œœœ punc + +[1510:The man collapsed in despair. ] ; no to 1509 +;|||1511 moved to 1700 ; œœœ punc + + +; army being cheated by MD's subplot +[1511:"Howdoo pardner. I'm Ash Upton. How can I be of service?" ] ;||| Store +; in Lincoln ; œœœ punc +; Soldier at Fort Sumner - army are being cheated by Murphy- +; Dolan's +[1512:"The army are being cheated by the Murphy-Dolans on the meat +contract". ] ; œœœ punc +[1513:"What the heck brung you here? Draw, you son of a bitch". ] ; œœœ punc +; Billy goes into store whilst MDs present +[1514:"Get out of here, lawman. You ain't welcome". ] ; ; œœœ punc +; Pat goes into store whilst MDs present. +[1515:hunted through some papers and came up with the real account +books for the Murphy-Dolans. Now to show them to Colonel Baxter... ] +; pat/billy goes into the MD store whilst they're away. +[1516:showed the books to Colonel Baxter. He was livid and vowed to +prosecute the Murphy-Dolan's with the full force of the law. ] +; go to Fort Sumner with books. +[1517:"I can't go to the Colonel until I got proof - maybe you could +get hold of their books from the store in Lincoln?" ] +[1518:SEARCH FOR BOOKS. `] ; menu option in MD store +;;||| [1519:found the books and hid them in his jacket. ] ; find books in store +[1519:The store was deserted. ] ;||| go there when MD's / Ash not there + +; Pat is about to defeat a gang in a shootout, +; their leader calls a truce and barters their escape +[1520:The gang leader waved a white flag and called out: ] ; +; followed by one of 1521..1523 +[1521:"Pat - let us go and we'll tell you when Billy's planning the +next robbery". ] +[1522:"Pat - let us go and we'll leave the territory". ] +[1523:"Pat - let us go and we'll tell you where there is a stash of +gold buried". ] +; and responses to 1521..1523 if Pat accepts the offer... +[1524:"Thanks Pat - we'll be seeing you". They rode off. ] ; œœœ punc +[1525:"Buenos dias Senor. Now we head for Mexico". ] ; œœœ punc +[1526:"It's on the east side of the Pecos, at a deserted prospector's +camp". They rode off. ] +[1527:"Then we fight to the death". ] ; œœœ punc + +; Pat meets Texan posse in desert. Player can choose to +; lie that Billy has stolen Texan cattle. +[1529:Pat met a Texan posse looking for rustlers. What did he tell +them about Billy? ] ; intro message +[1530:HE STEALS TEXAN CATTLE `] ; menu option|||upper case +[1531:HE IS AN OUTLAW `] ; menu options - keep short. |||upper case +[1532:the posse offered to ride along as deputies, for the time +being. ] ; Pat lies about Billy stealing Texan cattle + + +[1533:The posse wished Pat good luck, and were right sorry +they couldn't help. ] ; Pat says Billy is an outlaw only. +[1534:Barney Mason rode up and said, "Pat, another man from that Texan +posse had to high-tail it outa town. You'd better get into +town and check the budget". ] ; |||now mentions Barney Mason, budget + +; Barney Mason reports the escape of an outlaw +; from Santa Fe - Pat can track him unaided for a reward. +[1535:Barney Mason rode up. "Pat - an outlaw's just busted out from +Santa Fe. Ride with me now, and I'll put you on his trail. "] +[1536:Barney rode off. ] ; no to 1535 +[1537:Barney lead Pat at a gallop to the head of a winding valley, +then left him to track the fugitive on his own. ] ; yes to 1535 +[1538:Pat took the outlaw in and claimed the $100 reward. ] +; get the outlaw. + + +; shootout message groups: intro/win/lose 1540..1569 +[1540:"Hurry! We must fight them!" ] ; yes to 1500 +[1541:"Muchos gracias, Senor. Now my farm is safe". ] ; œœœ punc +[1542:The peasant had been hit by a bullet. He died without saying a +word. ] ; œœœ punc + + + + +; duel message groups: intro/win/lose 1570..1599 + +; gunslinger bothering lady (1503) +[1570:The gunslinger slowly turned around and started to head for the +door... ] ; yes to 1503 +[1571:The gunslinger slumped to the floor... ] +[1572:the bullet struck home, bringing merciful blackness. ] +; invitations to duel in saloon + +[1573:"So you're the guy that drilled my +kid brother in the back, Mister Big Shot. Wanna settle this +outside?" ] ;||| Warren Oaks +[1574:"They say you're pretty fancy with +that six-gun of yours, Mister. But I reckon you ain't. Wanna take +me on outside?" ] ;||| Wayne Rodgers +[1575:"I seeze you undressin' my Mary-Jane +with your eyes, buster! Wanna settle this like a Man?" ] ;||| Karl Bekkert + + +; +; Pat is accosted by a local mayor with request for more protection +[1600:a pompous mayor walked up and shouted, "Sheriff Garrett, +this town's gotta have more protection. I want at least one more +deputy here before you leave us.] ;||| now mentions appearance ; œœœ punc +[1601:"OK, I guess that'll have to do". ] ; œœœ punc +[1602:"The people of this town ain't gonna be happy about this". ] ; œœœ punc + +; The same mayor asks Pat to run a vagrant out of town +; to enforce a bogus claim against the prospector (?) +[1605:A pompous mayor walked up and shouted, "Sheriff Garrett, there's +a vagrant I want run outa town. The varmit says he owns a claim +that one of my friends has a mind to". ] ; œœœ punc +[1606:Pat helped the mayor, and drove the vagrant out of town. But he +surely didn't feel good about doing it. ] +[1607:Pat refused, saying that even a vagrant has his rights. ] + +; Pat encounters an outlaw whilst tracking +; ++ In scrolling game ++ + +; At Siege, Carlyle runs in. +; ++ In arcades game ++ + +; Pat meets outlaw gang in an old Building. +; ++ In arcades game ++ + + + + + + + + + + + + + +; Billy Only encounters... +[1610:"Paleface, we greet you. Beef promised us by treaty, +Murphy-Dolans send us scraps. My people starve". ] ;|||no longer mentions Billy +; comment from Indian chief. +[1611:do you want to try to take these cows to the Indian Reservation? ] ; +; when double-click on Longhorns, after seeing 1610. +;[1612:the Indian chief rode up: "How, red man's friend?". He thanked +;Billy for the beef and offered to fake an uprising, if needed, to +;distract Pat in the future. ] ; +++ Moved to scrolling games |||| +[1613:FAKE UPRISING. `] ; extra MENU option. +[1614:"Yes paleface, for you we make lawman think we on warpath". ] ; œœœ punc + ;^^^ Billy->paleface + +; meet Widow Woman who wants ALL BILLY'S MONEY (quel surprise) +[1620:"Oh Sir, I'm jest a poor widow woman. If I can't pay the bank, +I'll be thrown off my little farm and have to go a-begging in the +streets. It ain't no more than $1000] ; followed by amount of gold +[1621:; that surely ain't nothing to a rich man like you". ] +[1622:"O thank you sir. I'll always be a-thinking on you". ] +; yes to 1620 +[1623:"O no! My last hope is gone - I'll be in the poorhouse till the +end of my days". ] ; no to 1620 + +; Desert peasant meets Billy and entices him to his house +; with story that family is sick. While Billy stays there, +; an outlaw arrives wit news of a gold consignment at +; the local bank, but it's a bluff - if Billy leaves to +; travel there, he gets challenged in the street by a bounty +; hunter. (Note: there may or may not be gold in then bank) +[1630:A peasant rode up: "Senor Billy, my family are sick. I no can +make them better. Please, you come try and help them". ] +[1631:he rode off with the peasant and stayed at his farmhouse; +fetching and boiling water and cooking for the family. +After a few days, they were recovering and was +about to leave when there come a knocking at the door... ] +; yes to 1630 (|This is Followed by 1633) +[1632:"Oh pity me, my family will surely die". ] ; no to 1630 +; 1633 moved to 1701||| +[1634:a bounty hunter was lying in wait. "Gotcha! you dumb +saddlebum - you've been set up! I'm gonna take you in, +dead or alive! Draw! ] +; meet Bounty hunter in town, after 1630/1631/1633 + + + + +; ambush by Buckshot Roberts +[1640:As he rode near a farmhouse, a huge man stepped out from +behind a rock: "There's folks as wants to talk to ya. I'm takin' you +in. The name's Roberts - +Buckshot Roberts. I'm a bounty hunter - an' I've taken in fifty scum +like you already, and you're gonna make it fifty-one. ] +;||| removed: You coming quiet? ] + +;|||moved to arcades.[1641:although Buckshot Roberts must have stopped half a dozen +;|||bullets, he still found strength to climb onto a horse and ride off. ] + + + + + + + + + + + + +; win gunfight +++ Move to arcades? + + +; Seven Rivers gang ambushes Billy/Pat in town. +[1645:Suddenly shots started to ring out. He dove for cover. On the +other side of the street, gunslingers hired by the Murphy-Dolan gang were +shooting at him! ] ; |||no longer mentions Billy ^^^now murphy-dolan, +; not seven-rivers + +; Jesse Evans gang ambushes Billy in town. +[1646:Suddenly the air rang to the crack of gunshot. He leapt for +cover. Across the street, he could see some badmen +throwing lead at him! ] ;|||no longer mentions Billy ^^^no longer +; mentions Jesse Evans Gang + +; Tom Cooper offers Billy lots of counterfeit money +; instead of his share in a robbery. +[1650:Tom Cooper said, "Billy, how'd you like 5 times your share of +this robbery - in counterfeit bills. There's a tenderfoot called +Duncan, spreading it around. It's a good looking paper. Won't give you +no problems if you spend it careful. What d'you say". ] +[1651:Cooper smiled: "Say, that's great. Here's the sack of money". +Billy pondered on it. How could he use it most easily? ] +[1652:BUY CATTLE WITH IT. `] ; menu option after 1651 +[1653:SPEND IT NORMALLY. `] ; menu option after 1651 +[1654:Cooper counted out Billy's share and rode off. ] ; no to 1650 + +; when Billy is in Lincoln City Saloon, he overhears that Sheriff +; Brady is on his way to ambush McSween. +[1660:he heard something that made him prick up his ears."You +know that no-good sheriff Brady's gonna run Mrs McSween off her ranch. +Ain't that the devil! But what can we do?" ] +[1661:Good Mrs McSween! An old friend, and a friend of the late +lamented Tunstall! One of the last alive to stand against the Murphy- +Dolans! What now? ] ; after 1660 ;œœœ no longer mentions Billy +[1662:DO NOTHING. `] ; menu option. +[1663:STOP BRADY. ] ; menu option. ->1664 + +[1664:he ran from the saloon and found Brady heading out of town. +He caught up with him and pulled him from his horse. Brady got up, +shaking with anger. It was obvious he was going to draw. ] +; stop brady from 1663 + +; Jose Miguel Sedillo, a friend of Billy's from way back, tells +; him of an attempted horse-robbery on Tunstall Ranch, +; while this is being run by Mrs McSween. +[1670:Jose Miguel Sedillo - an old and +trusted friend - rode up. "You must go help Mrs McSween - the +Murphy-Dolan's are there right now. They try to steal her cattle".] +;||| wording changed to make non-Billy specific + +; do nothing or... +[1671:GO THERE. `] +[1672:they rode off and got ready to fight... ] ; selects 1671: +;goes into shootout. + +; meet Joe Grant,. drunk in a saloon. + + + + + + + + + + + + + +[1674:Joe Grant staggered out of a back room, plainly drunk. "Hey Kid! +You know I'm the fastest gun in the West now. Lookee here at this +pearl-handled pistol I just - er - got gived". ] +[1675:He handed over the +pistol. It surely was pretty, but wouldn't be powerful enough to stop +a mosquito. Only three chambers were loaded. What did he do? ] +; nothing or... +[1676:ROTATE THE BARREL TO AN EMPTY CHAMBER. `] ; menu option +[1677:he turned the barrel and handed the gun back. ] +[1678:Joe Grant was waiting outside. He seemed to have gotten sober +real quick. He snarled "Draw, you prairie dog". ] +[1679:he handed the gun back. ] ; don't play with chambers + +[1680:"Beat it, we don't want none of Tunstall's men hereabouts". ] +; Billy meets hostile soldier + +; meet Mrs McSween +[1681:"Why hello old friend - how're you keeping". ] ;|||no longer mentions billy +[1682:"Gotta get going. This place keeps a body busy". ] +; follows 1681 + +; meet prospector +[1683:"What do you want, stranger? You another claim jumper?" ] + +; take sick man to santa fe +[1684:when they arrived with the sick man clinging to the horse, +he said "thanks for the ride Pard" and staggered off. ] |||^^^no longer +; mentions Billy + +; take sick man somewhere other than Santa Fe + +[1685:when they arrived with the sick man clinging to his horse, +the sick man cursed him for not going to Santa Fe and +staggered off on his own. ] ||| + +[1686:"Sheriff, can you come back later. We're real busy right now". ] +; Pat meets hostile soldier/rancher. ||| copied, slightly changed from 1680 + + + +; messages which result in player being thrown back to map... 1700..1729 +[1700:the man struggled onto the horse, and clung on weakly. He +gasped "Take me to Santa Fe, Mister. I got folks there". ] ; |||now mentions Santa Fe. +; yes to 1509 +; if visit Santa Fe next, get 1684, otherwise get 1685. +[1701:An outlaw burst through the door, brandishing a gun! He saw +Billy and dropped it in terror. "Billy the Kid! Don't kill me please, +I didn't mean ya no harm. Look, I'll help ya. The bank at White Oaks +just had a big payroll for a ranch thereabouts. Git +down there now, ya can pick up a whole load of money". ] ; follows +; 1631 ;||| moved from 1633 + + + +; Pat's strategy game messages... +; Go into sheriff's office... +;|||[1800:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||can I do for you?" ] +;|||[1801:move deputy to reserve. `] ; take deputy away from town +;|||[1802:move deputy to town. `] ; station deputy in this town. +;|||[1803:ok. ] +;|||[1804:there are ] ; followed by number of deputies +;|||[1805: deputies in town. ] ; follows 1804/digit +;|||[1806: deputies in reserve. ] ; follows 1804/digit +;|||[1807:Pat got a reward of ] ; followed by number: amount of dollars +;|||[1808: dollars. ] ; follows number. +;|||[1809:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||are you going to do to calm down the people in this here town?" ] +; people are upset about level of crime. +[1810:"the people sure are not gonna be happy about this." ] +[1811:And so the west was won. Pat had brought Law to +his domain, and was respected throughout the land. ] ; win message +[1812:And so Pat died in obscurity - known only by a few +historians who read dusty books about the Wild West. ] ; lose message + +[1813:Barney Mason rode up: "Pat, the county has run out of money. +I took temporary charge while you were away, but I had to fire +some deputies. You'd better get into town real quick and sort +it out". He rode off again. ] ; ||| +[1814:Barney Mason rode up: "Pat, there's trouble brewing. +People are saying you're doing no good as sheriff. You'd +better get into the office and do something". ] ;||| +[1815:Barney Mason rode up: "Pat, you finally got it wrong. You've +lost the election. Sorry old friend, you're no longer Sheriff". ] ; ||| + +;Billy strategy messages + +[1850:And so Billy became a legend. His reputation was known +throughout the world, and his story was oft repeated +by people of all countries. ] ; win message +[1851:And so Billy died in obscurity - known only by a few +historians who read dusty books about the wild west. ] ; lose message + +[1852:WANTED! Billy The Kid, Dead or Alive. Reward $]|||| +[1853:. ] ; after 1852/number||| +[1854:was stopped on the way. He pulled up his horse +and dismounted... ] ; Actors name, 1854. Used when +; get a random event whilst trying to go somewhere from map. |||| +; messages to do with meeting a gang... + +[1855:"Hey Billy, come share some coffee"... ] ;||| then 1856 ; œœœ punc +[1856:Billy sat down with the gang and talked of daring deeds +and famous crimes. Then he asked the crucial question... +"I've got a real sweet job planned. You want in?". The gang +looked at Billy. Should they trust this young hotblood? ] ;||| +; 1856, 1857 ||| +[1857:their leader spoke "Sure, but we'll want a good big cut. Now get out of +here before I change my mind". ] ;||| +[1858:Billy and the gang went over and over the targets they +could hit, but they couldn't agree which should be next... ] ; ||| visit gang again +;œœœ made "meaner" + + +; get spotted by a deputy in a lawful town... +[1859:down the street, a deputy called out, "Billy The Kid - hold it +right there. You gonna come quietly?" ] ;||| ; œœœ punc +[1860:RUN AWAY `] ; ||| menu option +[1861:IGNORE HIM `] ; ||| menu option +[1862:Billy fled the town. ] ; run away ||| +[1863:"Go for your gun, outlaw." ] ;||| + +[1864:woke to see his ex-girlfriend Paulita Maxwell tending +his injuries. "You should take more care, my love. Next time +could be your last". With her loving care, he was soon ready to go +again. ] ;&&& note either Billy/Pat. Preceded by Players Name +[1865:Suddenly, Pat Garrett burst in. ] ;&&& +[1866:"Billy, you know I can't +take you in. They'd hang ya like a dog, and I can't stand by and let that +happen. We'll have to settle this now, gun-to-gun. Draw, +outlaw". ] ;&&& +[1867:Billy and Pat approached other and exchanged glances. +Both knew that they were sworn enemies, but also old friends. +Was this to be the end for one of them? ] ;&&& +[1868:CHALLENGE TO DUEL. `] ; menu option &&& +[1869:AVOID CONFLICT. `] ; menu option &&& + + +; messages which occasionally replace the standard greetings +[1870:"Hey, it's Pat Garrett. I hear you polled ] ;||| for Pat ; œœœ punc +[1871:"Hey, it's Billy the Kid. I hear your reward is now $] ; |||| ; œœœ punc +[1872: votes". ] ;||| follows 1870 ; œœœ punc +[1873:". ] ; ||| follows 1871/amount of money ; œœœ punc + +[1880:"Hey, It's Billy The Kid! Get him boys!" ] ; occasionally +; when you go into a bank, or other law-abiding place +; in town. Leads to escape game. ||| +[1881:(lawful) ] ; added to town name on map +[1882:the place was completely deserted. ] ; ||| visit a ranch +; etc. which has gone bust, or similar. + + +; messages Billy gets when gangs go out of business +[1890:Tom O'Foliard rode up and said, "hello old friend, ] ;||| ^^^ +; now now longer mentions Billy + +[1891:the Cooper Gang have been brought to justice". ] ;||| +[1892:the Socorro Vaqueros gang has been brought to justice". ] +[1893:the Seven Rivers Gang gang has been brought to justice". ] +[1894:the Dona Ana Bunch gang has been brought to justice". ] +[1895:the Jesse Evans gang has been brought to justice". ] +[1896:the fugitives' gang has been brought to justice". ] +[1897:the regulators' gang has been brought to justice". ] + +[1900:"Ain't nuthin going on around here". ] ; knows of no ||| +; relevant events in this town. +; Tom O'Foliard's comments on Billy's progress. +[1901:you've gotta hurry up. The Murphy-Dolans are taking over +the county, and you've gotta stop 'em". ] ; œœœ punc +[1902:you've got the Murphy-Dolans on the run. Keep going +ol' buddy". ] ; œœœ punc +[1903:you've almost nailed the Murphy-Dolans, my friend. But +Pat's almost got the territory cleaned up, so you'd better pull +off some pretty big heists to finish 'em off". ] ; œœœ punc +[1904:Billy, you've stolen a total of $] ;^^^Billy added at start (not +; an important change) +[1905: which has bankrupted ] +[1906:of their ranches, but ] +[1907:of the 6 important gangs have been wiped out". ] ; œœœ punc + +; ratings added ^^^^ +[1920:Billy's final reward was $] +[1921: out of a maximum of about $15000, and he will ] ;^^^^ + +[1922:not be remembered. ] +[1923:be a dim memory. ] +[1924:be a figure of fun. ] +[1925:be remembered by many. ] +[1926:be remembered by most. ] +[1927:be a minor hero. ] +[1928:be a popular hero. ] +[1929:be a household name till the end of time. ] + +; ratings added ^^^^ +[1930:Pat's final popularity was ] +[1931: votes out of a maximum of about 4000, and he will ] ;^^^^ + + +;------------------ +;; [2000:Billy The Kid Intro screens. ] +[2001:"Well if it ain't momma's boy Billy! Let's see how good you are +now. Draw, Kid!" ] +[2002:Tunstall Ranch in Lincoln County, across the state line. ] +[2003:"...Murphy and Dolan are dangerous men, Mr Tunstall." ] +[2004:"I ain't gonna let their threats worry me, Sheriff Garrett. I'm +too riled up about the way they're cheating honest farmers." ] +[2005:"Hey now! Here's someone who might be a help. Where've you +been these past years, Billy? John Tunstall, meet the Kid, an old +friend of mine and a good man in a fight." ] +[2006:"I'd like you to join my men, Billy. Here's my lucky Silver +Dollar on account. Keep it safe." ] +[2007:"Pat, Billy, there goes dinner!" ] +[2008:"Another good man dead! I swear I'll bring order to Lincoln +County and hunt down every last outlaw in it." ] +[2009:"You're wrong, Pat, you can't play it by their rules. If you +mean what you said, you'll be hunting me too. Because I vow to do +whatever I must to avenge this murder, inside or outside the law." ] +[2010:"The Legend of Billy The Kid" is an authentic Western for +one or two players. ] +[2011:As Billy, you might tie up your horse on Main Street, +swagger into the saloon, meet an outlaw gang at cards, and go +on to rob the bank... ] +[2012:...or raise money to help a poor widow by rustling a herd +of cows and driving them to Mexico. ] +[2013:As Pat you might learn of a planned train robbery from +the local drunk... ] +[2014:...and lead a posse after the outlaws, track them to their lair, +and shoot it out with the gang. ] + + + + + + + + +-------- + diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/ref/squash.dat b/l9dev/regress/games.l9/billy.l9/pc.l9/ref/squash.dat new file mode 100644 index 0000000..aa922ec Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/pc.l9/ref/squash.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/squash.dat b/l9dev/regress/games.l9/billy.l9/pc.l9/squash.dat new file mode 100644 index 0000000..aa922ec Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/pc.l9/squash.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/table.dat b/l9dev/regress/games.l9/billy.l9/pc.l9/table.dat new file mode 100644 index 0000000..9e00cfd Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/pc.l9/table.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/pc.l9/table.txt b/l9dev/regress/games.l9/billy.l9/pc.l9/table.txt new file mode 100644 index 0000000..e6b93ff --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/pc.l9/table.txt @@ -0,0 +1,2150 @@ +;;;LaviniaStrumpetMenu equ 204 + +; Billy The Kid source, copyright (C) 1990 Level 9 Computing. +; +; TABLE.TXT, assembler format data for tables, a.k.a lists/arrays. +; (Save the assembled data as TABLE.DAT). +; +; You must start all DEFWs on EVEN boundaries, else subsequent code +; seems to be padded to make it even (according to the GENST listing, +; anyway). The EVEN directive inserts a padding byte if appropriate. +; + ORG 0 +starttables + dc.l ObjectTable-starttables ; object positions etc. + dc.l $FFFF ; HiresTable() Set up in AllocateWorkspaceLists + dc.l $FFFF ; + dc.l LIST4-starttables + dc.l NPCINITIAL-starttables ; npc initial and 'floor pointers' + dc.l TownFixedData-startTables ; + dc.l $FFFF ; 7: TownVarData: variable town stuff (AllocateWorkspaceLists) + dc.l list8-starttables ; 8 - assorted fixed system tables + dc.l IntroTables-startTables ; 9 - input table,object table + dc.l ENDTABLE-starttables +;--- +; +;--- +ObjectTable +; list giving the graphics objects which are important +; to the game. This is divided up by section: i.e. +; the map is separate from the various Sierra-style rooms, +; this separation being handled by the table at the start. + dc.w MapObjects-ObjectTable + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w MapToNewScreen-ObjectTable ; 10 + +; now the object tables themselves. These objects can +; be either xzh or rasters, and their order is critically +; important to the program. If you want to add new objects, +; just add them on the end. If you need to delete an object, +; replace it with a 0 or some new number. DON'T DELETE IT. +; The table ends with -1 + +MapObjects + dc.w 0 ; 0 + dc.w 340 ; 1 cows + dc.w 341 ; 2 cows + dc.w 342 ; 3 cows + dc.w 343 ; 4 cows + dc.w 344 ; 5 cows + dc.w 0 ; 6 + dc.w 0 ; 7 + dc.w 0 ; 8 + dc.w 0 ; 9 + dc.w 3345 ; Santa Fe 10 + dc.w 3346 ; White Oaks 11 + dc.w 592 ; Lincoln City 12 was 3347 + dc.w 588 ; Mesilla 13 + dc.w 589 ; Roswell 14 + dc.w 591 ; 3349 ; El Paso 15 + dc.w 0 ; spare town 16 + dc.w 0 ; spare town 17 + dc.w 0 ; spare town 18 + dc.w 3351 ; Fort Stanton 19 + dc.w 3352 ; Fot Sumner 20 + dc.w 0 ; spare fort 21 + dc.w 0 ; spare fort 22 + dc.w 0 ; spare fort 23 + dc.w 581 ; Unknown ranch near Bitter Lake 24 + dc.w 582 ; Fritz Ranch 25 + dc.w 583 ; Chisum Ranch 26 + dc.w 584 ; Dedrick Ranch 27 + dc.w 585 ; Beckwith Ranch 28 + dc.w 586 ; Reed ranch 29 + dc.w 587 ; unknown ranch 30 + dc.w 576 ; Katz farmhouse 31 + dc.w 577 ; Dunn farmhouse 32 + dc.w 578 ; Rose farmhouse 33 + dc.w 0 ; farmhouse 34 + dc.w 330 ; Mescalero Apache settlement 35 + dc.w 0 ; spare indians 36 (3356 might work) + dc.w 0 ; spare indians 37 + dc.w 0 ; spare indians 38 + dc.w 3304 ; train 39 + dc.w 2730 ; wagon train 40 + dc.w 331; outlaw hideout 41 + dc.w 332 ; outlaw hideout 42 + dc.w 333 ; outlaw hideout 43 + dc.w 334 ; outlaw hideout 44 + dc.w 335 ; outlaw hideout 45 + dc.w 336 ; outlaw hideout 46 + dc.w 0 ; outlaw hideout 47 + dc.w 337 ; prospector's camp 48 + dc.w 329 ; system + dc.w -1 ; end of table + + + + +MapToNewScreen +; for each object picked up in map, this table +; gives the corresponding screen number that it will +; invoke, or 0 if none. + + +; First byte: overlay letter to call. +; Second byte: screen number within that overlay. +; (for map, addition to 400, unsigned) +; (for scrolling games, = map number) +MO equ 69 * 'E' map overlay +SO equ 50 * '2' scrolling overlay +AO equ 51 * '3' arcade overlay, train +IO equ 52 * '4' intermission overlay - separate structure file, +* at least. + +; values for Game variable... +EscapeGame equ 21 +PositionPeopleGame equ 25 +PatWalkGame equ 30 ; drop into pat walking around shooting section. +MinTrackingGame equ 127 ; lowest number a game using the +; tracking maps/cd tables can have +TrackingGame equ 128 +RustlingGame equ 140 + + dc.b MO,0 ; 0 + dc.b SO+0,RustlingGame ; 1 - cows + dc.b SO+0,RustlingGame ; 2 + dc.b SO+0,RustlingGame ; 3 + dc.b SO+0,RustlingGame ; 4 + dc.b SO+0,RustlingGame ; 5 + dc.b SO+0,RustlingGame ; 6 + dc.b MO,0 ; 7 + dc.b MO,0 ; 8 + dc.b MO,0 ; 9 + dc.b MO,430-400 ; Santa Fe 10 + dc.b MO,540-400 ; White Oaks 11 + dc.b MO,500-400 ; Lincoln City 12 + dc.b MO,521-400 ; Mesilla 13 + dc.b MO,470-400 ; Roswell 14 + dc.b MO,450-400 ; El Paso 15 + dc.b MO,0 ; spare town 16 + dc.b MO,0 ; spare town 17 + dc.b MO,0 ; spare town 18 + dc.b IO+0,6 ; Fort Stanton 19 + dc.b IO+0,6 ; Fot Sumner 20 + dc.b IO+0,6 ; spare fort 21 + dc.b IO+0,6 ; spare fort 22 + dc.b IO+0,6 ; spare fort 23 + dc.b AO+0,1 ; Unknown ranch near Bitter Lake 24 + dc.b AO+0,1 ; Fritz Ranch25 + dc.b AO+0,1 ; Chisum Ranch 26 + dc.b AO+0,1 ; Dedrick Ranch 27 + dc.b AO+0,1 ; Beckwith Ranch 28 + dc.b AO+0,1 ; Reed ranch 29 + dc.b AO+0,1 ; unknown ranch 30 + dc.b AO+0,1 ; spare ranch 31 + dc.b AO+0,1 ; spare ranch 32 + dc.b AO+0,1 ; spare ranch 33 + dc.b AO+0,1 ; spare ranch 34 + dc.b IO+0,15 ; Mescalero Apache settlement 35 + dc.b IO+0,15 ; spare indians 36 + dc.b IO+0,15 ; spare indians 37 + dc.b IO+0,15 ; spare indians 38 + dc.b AO+0,21 ; train 39 + dc.b IO+0,5 ; wagon train 40 + dc.b SO+0,TrackingGame ; gang hideout: near santa fe 41 + dc.b SO+0,TrackingGame ; gang hideout: nr White Oaks 42 + dc.b SO+0,TrackingGame ; gang hideout: nr Lincoln Cit#y 43 + dc.b SO+0,TrackingGame ; gang hideout: nr Mesilla 44 + dc.b SO+0,TrackingGame ; gang hideout: nr Roswell 45 + dc.b SO+0,TrackingGame ; gang hideout: nr El Paso 46 + dc.b 0,0 ; 47 + dc.b IO+0,3 ; Prospector 48 + dc.b MO+0,0 ; 48 + dc.b MO+0,0 ; 49 + + + + +;--- + even +ENDOBJECTS +;terraintable +list8 +; +;--------- + even +NPCINITIAL +list5 +LIST4 +; new stuff added for AA + +; Menu text, etc. +; First, ptrs for all uses... + dc.w 0 ;MenuText-List4 0 + dc.w 0 ;MenuData-list4 2 + dc.w 0 ;HiresCoords-list4 4 + dc.w 0 ;ExitOffsets-list4 6 + dc.w 0 ;ObjectGraphics-list4 8 + dc.w 0 ;IntroText-list4 10 + dc.w 0 ;NounVerbTable-list4 12 + dc.w PCpalette-list4 14 + dc.w STpalette-list4 16 + dc.w 0 ;kerri-list4 18 + dc.w CGA2Palettes-list4 20 + dc.w CGA4Palettes-list4 ; 22 + dc.w 0 ; 24 + dc.w 0 ; 26 + dc.w 0 ; 28 + dc.w 0 ; 30 + dc.w 0 ; 32 + dc.w 0 ; 34 + dc.w HeightTable-list4 ; 36 + +CGA2Palettes + dc.b $0,$f,$2,$3,$4,$5,$6,$0,$8,$9,$a,$b,$c,$d,$e,$a ; 2 colour text printing + +; All these palettes have had to be modified because +; colour 6 is used for the highlight bar, so cannot be black. +; dc.b $0,$F,$F,$F,$F,$F,$0,$0,$F,$0,$9,$F,$F,$F,$0,$F ; 2 color map + dc.b $0,$F,$F,$F,$F,$F,$3,$0,$F,$0,$9,$F,$F,$F,$0,$F ; 2 color map + +; dc.b $0,$F,$F,$1,$F,$F,$1,$1,$7,$0,$F,$0,$F,$F,$9,$0 ; 2 Pat, Billy & Barbrawl + dc.b $0,$F,$F,$1,$F,$F,$1,$1,$7,$0,$F,$0,$F,$F,$9,$0 ; 2 Pat, Billy & Barbrawl + +; dc.b $0,$F,$7,$1,$F,$9,$1,$0,$7,$0,$F,$F,$F,$F,$A,$F ; 2 Outside Buildings + dc.b $0,$F,$7,$1,$F,$9,$1,$0,$7,$0,$F,$F,$F,$F,$A,$F ; 2 Outside Buildings + + dc.b $0,$F,$9,$0,$0,$0,$F,$0,$A,$A,$F,$F,$F,$F,$7,$F ; 2 Saloons + + +CGA4Palettes + dc.b $0,$F,$2,$3,$4,$5,$7,$0,$8,$9,$a,$b,$c,$d,$e,$a ; 4 colour text printing + dc.b $0,$F,$0,$F,$A,$5,$2,$0,$F,$5,$7,$0,$A,$F,$A,$A ; 4 color map + dc.b $0,$F,$F,$0,$F,$0,$0,$0,$A,$0,$5,$0,$F,$F,$5,$0 ; 4 Pat, Billy & Barbrawl + dc.b $0,$F,$A,$1,$A,$0,$F,$0,$A,$5,$5,$F,$F,$F,$A,$D ; 4 Outside Buildings + dc.b $0,$D,$A,$0,$A,$1,$F,$0,$A,$5,$5,$0,$F,$F,$D,$7 ; 4 Saloons + + +HeightTable +; used in walkabout code to go from the floor map "height adjust" +; packed byte to a value in pixels: kindof an exponential table. + dc.w -12 ;0 + dc.w -8 + dc.w -4 + dc.w 0 + dc.w 4 ;4 + dc.w 8 + dc.w 12 + dc.w 16 + dc.w 20 ;8 + dc.w 24 + dc.w 28 + dc.w 32 + dc.w 36 ;12 + dc.w 40 + dc.w 44 + dc.w 48 + + + + + + +; dc.b 0,$f,$e,$7,$f,$0,$7,$0,$8,$0,$f,$f,$f,$a,$8,$f ; town +; dc.b 0,$f,$f,$f,$0,$0,$a,$0,$8,$a,$8,$0,$0,$9,$0,$f ; people +; dc.b 0,$f,$0,$f,$0,$0,$7,$0,$a,$8,$f,$0,$e,$f,$7,$7 ; train + + +STpalette; also used for VGA +;commonm colours... +transparent equ $0000 ; ok +white equ $666F ; ok +flesh equ $6339 ;light red +Cyan equ $0346 ; ok +Violet equ $203a ; ok +Iblue equ $0263 ;light blue ok +black equ $0000 ;ok +Red equ $2008 ;dark brown ok +Blue equ $0042 ;dark blue ok +Brown equ $320C ;light brown ok +yellow equ $762D ;ok +Lgrey equ $444e; +Dgrey equ $2221 ;ok +Green equ $0304 ;dark green ok +Lgreen equ $1735; +pink equ $526c;orange 520C ;770a +Lcyan equ $0677; Pete 11/9/90 + + +;additional colours, for 'variable colours' only... + +PaleBlue1 equ $2254 +Vyellow equ $770a +;These colours must have IBM equivalents... +BlueGrey equ $223d ;(Mgrey?) +PaleBlue2 equ $3454 +PaleWhite equ $5671 + + + +PcPalette + + dc.w transparent,white,flesh,cyan + dc.w lgreen + dc.w Dgrey ; is Purple in other games. + dc.w iblue,black,Red,Blue,Brown + dc.w lcyan ; >> Pete 11/9/90 + dc.w yellow,Lgrey,Dgrey,Green + + + + + +IntroTables +; filenames for music, and other random stuff. Not necessarily +; just to do with the intro, but called that for compatability +; with the Grange intro sequence + dc.w SystemPalette-IntroTables ; 0 MapMusic-IntroTables ; 0 + dc.w SaveFilename-IntroTables ; 2 + dc.w 0 ; GunfightMusic-IntroTables ; 4 + dc.w 0 ; TrainMusic-IntroTables ; 6 + dc.w 0 ; MapMusic-IntroTables ; 8 + dc.w 0 ; 10 + dc.w StructureFilename-IntroTables ; 12 + dc.w 0 ; 14 + dc.w 0 ; 16 + dc.w AdlibFilename-IntroTables ; 18 + dc.w ExponentTableName-IntroTables ; 20 + dc.w 0 ; 22 + dc.w 0 ; 24 + dc.w 0 ; 26 + dc.w FontFilename-IntroTables ; 28 Font filename + dc.w 0 ; 30 + dc.w MenuStructures-IntroTables ; 32 + dc.w TownSpritesFilename-IntroTables ; map/town sprites filename 34 + dc.w 0 ; ScrollingSpritesFilename-IntroTables ; offset 36 + dc.w ArcadeSpritesFilename-IntroTables ; arcade games sprites filename offset 38 + dc.w 0 ; reserved for fourth sprites filename offset 40 + dc.w 0 ; MenuStructures-IntroTables ; offset 42 + dc.w ArcadeStructureFIlename-IntroTables ; 44 + dc.w 0 ; 46 + dc.w 0 ; 48 + dc.w 0 ; 50 + dc.w 0 ; 52 + dc.w 0 ; 54 + dc.w 0 ; 56 + dc.w 0 ; 58 + dc.w 0 ; 60 + dc.w 0 ; 62 + dc.w 0 ; 64 + dc.w 0 ; 66 + dc.w 0 ; 68 + dc.w LinkingSprites-IntroTables ; offset 70 + dc.w LinkingStructures-IntroTables ; offset 72 + dc.w IntroSprites-IntroTables ; offset 74 + dc.w IntroStructures-IntroTables ; offset 76 + dc.w 0 ; IdentikitSprites-IntroTables ; offset 78 + dc.w IdentikitStructures-IntroTables ; offset 80 + dc.w 0 ; 82 + dc.w 0 ; 84 + dc.w 0 + dc.w 0 + dc.w ScreenInfo-IntroTables ; offset 90 + dc.w 0 ; 92 + dc.w 0 ; 94 + dc.w 0 ; 96 + dc.w 0 ; 98 + dc.w ambushMusic-IntroTables ; 100 + dc.w BankJobMusic-IntroTables ; 102 + dc.w BarBrawlMusic-IntroTables ; 104 + dc.w CardMusic-IntroTables ; 106 + dc.w ChaseMusic-IntroTables ; 108 + dc.w DuelMusic-IntroTables ; 110 + dc.w Generic1Music-IntroTables ; 112 + dc.w Generic2Music-IntroTables ; 114 + dc.w Generic3Music-IntroTables ; 116 + dc.w Generic4Music-IntroTables ; 118 + dc.w Generic5Music-IntroTables ; 120 + dc.w GetawayMusic-IntroTables ; 122 + dc.w HoeDown1Music-IntroTables ; 124 + dc.w HoeDown2Music-IntroTables ; 126 + dc.w 0 ; HonkyMusic-IntroTables ; 128 + dc.w 0 ; Rag3Music-IntroTables ; 130 + dc.w RagTimeMusic-IntroTables ; 132 + dc.w ShockMusic-IntroTables ; 134 + dc.w ShootOutMusic-IntroTables ; 136 + dc.w ThemeMusic-IntroTables ; 138 + dc.w TrainMusic-IntroTables ; 140 + dc.w ShootOut2Music-IntroTables ; 142 + dc.w ShootOut3Music-IntroTables ; 144 + dc.w 0 ; 146 + dc.w 0 ; 148 +UghSampleNum equ 150 + dc.w UghSample-IntroTables ; 150 +Colt45SampleNum equ 152 + dc.w Colt45Sample-IntroTables ; 152 + dc.w 0 ; 154 + dc.w 0 ; 156 + dc.w 0 ; 158 + dc.w 0 ; 160 + dc.w 0 ; 162 + dc.w 0 ; 164 + dc.w 0 ; 166 + dc.w 0 ; 168 + dc.w 0 ; 170 + dc.w 0 ; 172 + dc.w 0 ; 174 + dc.w 0 ; 176 + dc.w 0 ; 178 + dc.w ShootoutSamples-IntroTables ; 180 + dc.w DuelSamples-IntroTables ; 182 + dc.w RustlingSamples-IntroTables ; 184 + dc.w TrackingSamples-IntroTables ; 186 + dc.w EscapeSamples-IntroTables ; 188 + dc.w BankJobSamples-IntroTables ; 190 + dc.w CardSamples-IntroTables ; 192 + dc.w BrawlSamples-IntroTables ; 194 + dc.w IntroSamples-IntroTables ; 196 + +ExponentTableName + dc.b 'exponent.025',0 + even + + +IntroSamples + dc.b Colt45SampleNum/2 + dc.b 0 + +ShootOutSamples +; list of sample pointers needed for shootout + dc.b Colt45SampleNum/2 + dc.b 0 + +DuelSamples + dc.b Colt45SampleNum/2 + dc.b 0 * 182 +RustlingSamples + dc.b 0 *184 +TrackingSamples + dc.b 0 ; 186 +EscapeSamples + dc.b Colt45SampleNum/2 + dc.b 0 ; 188 +BankJobSamples + dc.b 0 ; 190 +CardSamples + dc.b 0 ; 192 +BrawlSamples + dc.b UghSampleNum/2 + dc.b 0 ; 180 + +Colt45Sample dc.b 'colt45.spl',0 + even +UghSample dc.b 'ugh.spl',0 + even + + +SaveFilename dc.b 'billy.sav',0 + even + +ambushMusic dc.b 'ambushv2.mid',0 + even +BarBrawlMusic dc.b 'barbrawl.mid',0 + even +CardMusic dc.b 'cardv2.mid',0 + even +ChaseMusic dc.b 'Chasev2.mid',0 + even +DuelMusic dc.b 'duel.mid',0 + even +Generic1Music dc.b 'generic.mid',0 + even +Generic2Music dc.b 'gen2v3.mid',0 + even +Generic3Music dc.b 'generic3.mid',0 + even +Generic4Music dc.b 'generic4.mid',0 + even +Generic5Music dc.b 'generic5.mid',0 + even +HoeDown1Music dc.b 'hoedown1.mid',0 + even +HoeDown2Music dc.b 'hoedown2.mid',0 + even +;;HonkyMusic dc.b 'honky1v2.mid',0 + even +;Rag3Music dc.b 'rag3.mid',0 +; even +RagTimeMusic dc.b 'ragtime.mid',0 + even +ShockMusic dc.b 'shockv2.mid',0 + even +ShootOutMusic dc.b 'shootout.mid',0 + even +ShootOut2Music dc.b 'shootut2.mid',0 + even +ShootOut3Music dc.b 'shootut3.mid',0 + even +ThemeMusic dc.b 'map.mid',0 + even +GetawayMusic dc.b 'Getwayv3.mid',0 + even +BankJobMusic dc.b 'BankJbV2.mid',0 + even +TrainMusic dc.b 'train.mid',0 + even + + + +ArcadeSpritesFilename + dc.b 'arcades1.cmp',0 + even + +ArcadeStructureFilename + dc.b 's3.dat',0 * 'desert7.fnt',0 + even + + + +IntroSprites + dc.b 'introsp1.cmp',0 + even +IntroStructures + dc.b 'intros.dat',0 + even + +NoDelay equ 2 +LongTime equ 3000 +DefaultX equ 32 +DefaultY equ 32 +LowY equ 112 +dInsert equ 0 +dInsertR equ 2 +dRemove equ -1 +ScreenInfo +; for intro sequence: contains which picture to display, +; and for how many frames. +; parameters are: +; pic num, frames, soundtrack, repeat count for music + dc.w 99,100,HoeDown2Music-IntroTables,0 * title picture + dc.w 100, 230, RagTimeMusic-IntroTables, 0 ; street scene outside dance hall + dc.w 101, 50, music1, 0 ; blacksmith + dc.w 2001, NoDelay, DefaultX,DefaultY,dInsert + dc.w 102, 200, ChaseMusic-IntroTables, 0 ; street scene, scrolls after half time + dc.w 103, 210, music1, 0 ; possee in valley + + dc.w 104, 110, HoeDown1Music-IntroTables, 0 ; hoe down scene, dancers + dc.w 2002, NoDelay, DefaultX,DefaultY,dInsert + + dc.w 105, 300, 0, 0 ; talk 1 (inside) + dc.w 2003, NoDelay, DefaultX+16,LowY,dInsert + dc.w 2003, 79, DefaultX+16,LowY,dRemove + dc.w 2004, 100, DefaultX-16,LowY,dInsertR + dc.w 2004, 190, DefaultX-16,LowY,dRemove + dc.w 2005, 220, DefaultX+16,LowY,dInsertR + + dc.w 106, 95, HoeDown2Music-IntroTables, 0 ; talk outside + dc.w 2006, NoDelay, DefaultX+48,LowY+32,dInsert + + dc.w 107, 150, 0, 0 ; buggy from distance, scrolls. + dc.w 2007, 90, DefaultX,DefaultY,dInsertR + dc.w 2007, 100,DefaultX,DefaultY,dRemove + + dc.w 108, 70, ShootOutMusic-IntroTables, 0 ; buggy, bandit in F/G + + dc.w 109, 250, 0, 0 ; Tunstall propped on wheel + dc.w 2008, NoDelay, DefaultX,LowY,dInsert + dc.w 2008, 80, DefaultX,LowY,dRemove + dc.w 2009, 100, DefaultX,LowY,dInsertR + +; dc.w 2300, 50, RagTimeMusic-IntroTables,0 ; town scene walkabout in front of bank +; dc.w 2010, NoDelay, DefaultX,DefaultY,dInsert ; Generic text +; dc.w 2304, 50, RagTimeMusic-IntroTables,0 ; dancers +; dc.w 2011, NoDelay, DefaultX,DefaultY+16,dInsert ; Billy text +; +; dc.w 2303, 50, RagTimeMusic-IntroTables,0 ; shootout1 +; dc.w 2012, NoDelay, DefaultX,DefaultY,dInsert ; Billy Text 2 +; +; dc.w 2301, 50, RagTimeMusic-IntroTables,0 ; shop +; dc.w 2013, NoDelay, DefaultX,DefaultY,dInsert ; Pat Text 1 +; dc.w 2302, 50, RagTimeMusic-IntroTables,0 ; shootout2 +; dc.w 2014, NoDelay, DefaultX,DefaultY,dInsert ; Pat Text 2 + dc.w -1,-1,-1 + +music1 equ 0 * no music at present + + +IdentikitStructures + dc.b 'identiks.dat',0 + even + +LinkingSprites + dc.b 'linking1.cmp',0 + even + +LinkingStructures + dc.b 'linkings.dat',0 + even + + +SystemPalette +; palette for returning to system on ST ONLY +; to the ega colors. + dc.w $777f ; 0000 ; transparent/black + dc.w $0000 ; 777f ; white + dc.w $3330 ; + dc.w $0000 ; 777f ; + dc.w $0004 ; + dc.w $777a ; + dc.w $3333 ; + dc.w $7770 ; + dc.w $0008 ; + dc.w $7772 ; + dc.w $333c ; + dc.w $7776 ; + dc.w $000d ; yellow + dc.w $777e ; lgrey + dc.w $3331 ; dgrey + dc.w $7774 ; green + +;----------------------------------------- + +AdlibFilename + dc.b 'all.adl',0 + even + +TownSpritesFilename + dc.b 'sprites1.cmp',0 + even + +FontFilename + dc.b 'western.fnt',0 + even + +StructureFilename + dc.b 's.dat',0 + even + + + include 'MENUDATA.TXT',0 + + +;------------------ +TownFixedData ; a list on its own + dc.w TownPeopleData-TownFixedData ; 0 + dc.w TownData-TownFixedData ; 2 + dc.w SubPlotData-TownFixedData ; 4 + dc.w IdentikitPrototypes-TownFixedData ; 6 + + +IdentikitPrototypes +; For each person type we have a list of entries of the following +; form: +; .b First XZH (0 terminates person) +; .b Number of XZHs possible (1 upwards) +; .b First RasterOffset +; .b Number of Raster Offsets to choose from (0 upwards) + dc.w BlankPerson-TownFixedData * type 0 person + dc.w Type1Person-TownFixedData * tough cowboy + dc.w Type2Person-TownFixedData * mexican + dc.w Type3Person-TownFixedData + dc.w Type4Person-TownFixedData + dc.w Type5Person-TownFixedData + dc.w Type6Person-TownFixedData + dc.w Type7Person-TownFixedData + dc.w Type8Person-TownFixedData + dc.w Type9Person-TownFixedData + dc.w Type10Person-TownFixedData + dc.w Type11Person-TownFixedData + dc.w Type12Person-TownFixedData + dc.w Type13Person-TownFixedData + dc.w Type14Person-TownFixedData + dc.w Type15Person-TownFixedData + dc.w Type16Person-TownFixedData + dc.w Type17Person-TownFixedData + dc.w Type18Person-TownFixedData ; sick man etc. + dc.w Type19Person-TownFixedData ; mex peasant. + dc.w Type20Person-TownFixedData ; soldier + dc.w Type21Person-TownFixedData ; Clint, with cape. + +BlankPerson +* used for people like Indian chief, prospector who +* are already shown in the picture, so don't need to be +* shown separately + dc.b 0,0,0,0 + +Type1Person +* Cowboy, jerkin, black hat, moustache +* As used in room 430 (Santa Fe) + dc.b 24,1,0,1 ; neck: closed, for string tie + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: not greying +; no sideburns +; no waistcoat + dc.b 27,1,3,1 ; trouser: blue jeans + dc.b 29,1,0,1 ; gunbelt + + dc.b 25,1,0,1 ; shirt + + dc.b 33,1,0,0 ; string tie +; dealer's armbands not used. + dc.b 35,1,0,1 ; jacket + dc.b 38,1,0,1 ; hands + dc.b 42,1,1,1 ; hat: always the same. + dc.b 0,0,0,0 + +Type2Person +* Mexican cross-breed, as used in 431 (Santa Fe) + dc.b 23,1,0,1 ; neck - open + dc.b 19,1,0,1 ; mexican neck overlay + dc.b 1,1,0,18 ; face + dc.b 20,1,4,1 ; top of head + dc.b 21,1,0,4 ; hair +;; dc.b 22,1,0,2 ; sideburn + dc.b 27,1,2,1 ; trousers: brown + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 47,1,0,1 ; bandolero +;; dc.b 35,2,0,1 ; jacket + dc.b 45,1,0,1 ; Mexican hands + dc.b 42,1,1,2 ; hat, one of two brown ones. + dc.b 0,0,0,0 + +Type3Person +* Old male American, as used in 433 Santa Fe. + dc.b 23,1,0,1 ; neck - open collar + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,9,1 ; hair - white beard +; no sideburn + dc.b 27,1,2,1 ; trouser +; no belt + dc.b 25,1,0,1 ; shirt +; no braces + dc.b 26,1,0,1 ; brown waistcoat +; no tie +; no jacket + dc.b 38,1,0,1 ; hands + dc.b 42,1,2,1 ; hat: brown felt + dc.b 0,0,0,0 + +Type4Person +* Old male in dungarees + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,8,8 ; hair - greying + dc.b 25,1,0,1 ; shirt + dc.b 31,1,0,1 ; Dungarees + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type5Person +* General tough guy - used for cowboys around town, where +* I haven't put in a specific prototype for them. + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 35,3,0,1 ; jacket: brown or grey. + dc.b 38,1,0,1 ; hands + dc.b 42,1,0,3 ; hat, any. + dc.b 0,0,0,0 + +Type6Person +* tough guy for 434 Santa Fe + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; no sideburns + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 37,1,0,1 ; jacket: grey. + dc.b 38,1,0,1 ; hands + dc.b 42,1,2,1 ; hat: brown felt + dc.b 0,0,0,0 + +Type7Person +; hostess for santa fe + dc.b 52,1,1,1 * body - yellow + dc.b 2,1,0,3 * face - reduced from choice of 7 to ensure youth! +;; dc.b 53,1,0,1 * skirt +; dc.b 54,1,0,1 * belt + dc.b 61,1,0,1 * hand with tray. + dc.b 51,1,0,1 * hair - yellow + dc.b 0,0,0,0 + +Type8Person +; older woman +; dc.b 57,1,0,2 * blouse + dc.b 52,1,0,1 * body - blue + dc.b 2,1,0,7 * face +; dc.b 56,1,0,1 * skirt +; dc.b 54,1,0,1 * belt + dc.b 63,1,0,1 * both hands - for 57 blouse + dc.b 51,1,2,1 * hair - greying + dc.b 0,0,0,0 + +Type9Person +; woman in green + dc.b 52,0,2,1 * body +; dc.b 58,1,0,1 * blouse - fits over body + dc.b 2,1,0,3 * face * reduced from 7 to reduce age +;; dc.b 59,1,0,1 * skirt + dc.b 60,1,0,1 * both hands + dc.b 51,1,0,4 * hair - any + dc.b 0,0,0,0 + +Type10Person +; Mexican with big Sombrero + dc.b 24,1,0,1 ; neck - buttoned (so can't see pink skin underneath) +;; dc.b 23,1,0,1 ; neck - open + dc.b 19,1,0,1 ; mexican neck overlay + dc.b 1,1,180,1 ; face - Mexican + dc.b 20,1,4,1 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 46,1,0,1 ; Neckerchief or similar. 1 only, else can see +; the pink skin underneath! + dc.b 35,3,0,1 ; jacket: brown or grey. + dc.b 45,1,0,1 ; Mexican hands + dc.b 41,1,0,1 ; big Sombrero + dc.b 0,0,0,0 + +Type11Person +; Shop man, soberly dressed. + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,16 ; hair: any + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 28,1,0,1 ; belt + dc.b 25,1,0,1 ; shirt + dc.b 32,1,0,2 ; tie +; dealer's armbands not used. + dc.b 37,1,0,1 ; jacket: suit + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type12Person +; shop man, randomly dressed. + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,16 ; hair: any + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 28,1,0,1 ; belt + dc.b 25,1,0,1 ; shirt + dc.b 32,2,0,2 ; tie + dc.b 26,1,0,2 ; waistcoat + +; dealer's armbands not used. + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type13Person +; clerk with visor, for wire/bank + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,16 ; hair: any + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 28,1,0,1 ; belt + dc.b 25,1,0,1 ; shirt + dc.b 32,1,0,2 ; tie + dc.b 26,1,0,2 ; waistcoat +; dealer's armbands not used. + dc.b 38,1,0,1 ; hands + dc.b 40,1,0,1 ; visor +; no hat + dc.b 0,0,0,0 + +Type14Person +; lady in green skirt, as walking all over the place. + dc.b 52,1,2,1 * body +; dc.b 58,1,0,1 * green blouse - fits over body + dc.b 2,1,0,7 * face +;; dc.b 59,1,0,1 * skirt + dc.b 60,1,0,1 * both hands + dc.b 51,1,0,4 * hair - any + dc.b 0,0,0,0 + +Type15Person +; lady in blue skirt, as walking all over the place. + dc.b 52,1,0,1 * body + dc.b 58,1,0,1 * blouse - fits over body + dc.b 2,1,0,7 * face +;; dc.b 59,1,0,1 * skirt + dc.b 60,1,0,1 * both hands + dc.b 51,1,0,4 * hair - any + dc.b 0,0,0,0 + +Type16Person +; barman (e.g. Santa Fe) + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any non-greying + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 25,1,0,1 ; shirt + dc.b 30,1,0,1 ; braces + dc.b 32,2,0,2 ; tie + dc.b 34,1,0,1 ; dealer's armbands (around elbow). Must be before waistcoat + dc.b 26,1,0,1 ; waistcoat: brown + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + + +Type17Person +* tough guy in saloon for 560 Santa Fe + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; no sideburns + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 37,1,0,1 ; jacket: grey. + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type18Person +* sick man or poor peasant - e.g. in desert + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,8,7 ; hair: any greying. + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,2,2 ; trousers: brown/blue + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 35,1,0,1 ; jacket: jerkin + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type19Person +* mexican peasant - e.g. in desert. + dc.b 24,1,0,1 ; neck - buttoned (so can't see pink skin underneath) + dc.b 19,1,0,1 ; mexican neck overlay + dc.b 1,1,180,1 ; face + dc.b 20,1,4,1 ; top of head + dc.b 21,1,0,7 ; hair: any not greying. +; no sideburns + dc.b 27,1,2,2 ; trousers: brown/blue + dc.b 25,1,0,1 ; shirt + dc.b 45,1,0,1 ; Mexican's hands + dc.b 46,1,0,1 ; Neckerchief or similar. 1 only, else can see +; the pink skin underneath! +; dealer's armbands not used. + dc.b 35,1,0,1 ; jacket: jerkin + dc.b 45,1,0,1 ; Mexican hands + dc.b 41,1,0,1 ; big Sombrero + dc.b 0,0,0,0 + +Type20Person +; Soldier for forts + dc.b 44,1,0,1 ; complete corporal except face + dc.b 1,1,0,18 ; face + dc.b 0,0,0,0 + +Type21Person +* Clint Eastwood look alike - with cape. e.g. 436 Santa Fe. + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; no sideburns + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt + dc.b 49,1,0,1 ; cape + dc.b 38,1,0,1 ; hands + dc.b 42,1,2,1 ; hat: brown felt + dc.b 0,0,0,0 + + + +; + dc.b 0,0,0,0 + + +; people type is only currently used to give people +; a name of the right sex. + +YAM equ 0 ; young american male +OAM equ 1 ; old american male +YAF equ 2 ; young american female +OAF equ 3 ; old american female + +YMM equ 4 ; young Mexican male +OMM equ 5 ; old Mexican male +YMF equ 6 ; young Mexican female +OMF equ 7 ; old Mexican female + +YIM equ 8 ; young Indian male +OIM equ 9 ; old Indian male +YIF equ 10 ; young Indian female +OIF equ 11 ; old Indian female + +TownPeopleData +; 8 bytes per person: initial data for all people. +; Because people who have small versions need to go +; into Hires() at run-time: it is important to fit +; all these people into the first 50-or-so objects. +; Otherwise the amount of memory required for ObjectTable() is going +; to increase. + +ML equ 200 +; Room number is either: +; - room number in walkabout section - e.g. 30..50 for Santa Fe +; - or for map locations: ML+"LOCATION". These are mutually exclusive + + +PB equ 620 * base for people's xzh objects +DefaultMenu equ 0 * menu number divided by 2 +Default2ndMenu equ 0 * menu number divided by 2: this is +* the menu it goes to if we get back to the default menu +NoPerson equ 254 ; room number for a person which doesn't exist + +; Names - at message 1000+number specified +WhiskeyPete equ 160 +JoeDunn equ 161 +NedParkin equ 162 +KarlBekkert equ 163 +JackShoe equ 164 +BenDavis equ 165 +WarrenOaks equ 166 +WayneRodgers equ 167 +AshUpton equ 168 +ChiefHow equ 169 +RickSands equ 170 +RickRider equ 171 + +LauraPicket equ 210 +WilmaKatz equ 211 +MissRosy equ 212 +LaviniaStrumpet equ 213 ;**** not present. +MrsMcSween equ 214 +girlfriend equ 215 + +NoName equ 0 + +; person 0 (not used...) + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations / 2 + dc.b 1 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 1 430 Santa Fe: Jerkin guy leaning S. + dc.b 30 ; room number in which person appears =255 for end of this table. + dc.b 620-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations / 2 + dc.b 1 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 2 431 Santa Fe: Waistcoat guy sitting S + dc.b 31 ; room number in which person appears =255 for end of this table. + dc.b 621-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 2 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 3 433 Santa Fe: Old guy Waistcoat, sitting S. + dc.b 33 ; room number in which person appears =255 for end of this table. + dc.b 622-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 3 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 4 434 Santa Fe Guy Leaning S, flipping coin. + dc.b 34 ; room number in which person appears =255 for end of this table. + dc.b 623-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 6 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 5 - 435 Santa Fe: Mexican sitting S + dc.b 35 ; room number in which person appears =255 for end of this table. + dc.b 628-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 10 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 6 436 Santa Fe: Clint, leaning E + dc.b 36 ; room number in which person appears =255 for end of this table. + dc.b 623-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 21 ; identikit type prototype to use - caped! + dc.b Default2ndMenu,NoName,0,YAM + +; person 7 437 Santa Fe: Guy sitting E. + dc.b 37 ; room number in which person appears =255 for end of this table. + dc.b 622-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 8: 432 Santa Fe: lady green skirt + dc.b 32 ; room number in which person appears =255 for end of this table. + dc.b 640-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 14 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 9: 450 El Paso: Lady standing S. + dc.b 50 ; room number in which person appears =255 for end of this table. + dc.b 638-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 8 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAF + +; person 10: 451 El Paso: Rocker + dc.b 51 ; room number in which person appears =255 for end of this table. + dc.b 635-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 11: 453 El Paso: Mexican Sitting S + dc.b 53 ; room number in which person appears =255 for end of this table. + dc.b 628-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 10 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 12: 455 El Paso: Mexican Sitting S + dc.b 55 ; room number in which person appears =255 for end of this table. + dc.b 628-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 10 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 13: 470 Roswell: Guy sitting E + dc.b 70 ; room number in which person appears =255 for end of this table. + dc.b 632-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 14: 472 Roswell: Lady green Skirt. + dc.b 72 ; room number in which person appears =255 for end of this table. + dc.b 640-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 14 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 15: 473 Roswell: Lady standing S. + dc.b 73 ; room number in which person appears =255 for end of this table. + dc.b 638-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 8 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAF + +; person 16: 501 Lincoln City: Lady standing S. + dc.b 101 ; room number in which person appears =255 for end of this table. + dc.b 638-PB ; xzh number used to represent person (0 if none, or any +; xzh + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 8 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAF + +; person 17: 502 Lincoln City: Rocker + dc.b 102 ; room number in which person appears =255 for end of this table. + dc.b 15 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 18: 504 Lincoln City: Lady Blue Skirt + dc.b 104 ; room number in which person appears =255 for end of this table. + dc.b 641-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b WidowWomanMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 19: 504 Lincoln City: rocker + dc.b 104 ; room number in which person appears =255 for end of this table. + dc.b 636-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 20: 522 Mesilla: Lady Green Skirt + dc.b 122 ; room number in which person appears =255 for end of this table. + dc.b 640-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b WidowWomanMenu/2 ; Current menu to use in conversations + dc.b 14 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 21: 523 Mesilla: Guy leaning S, flipping a coin. + dc.b 4 ; room number in which person appears =255 for end of this table. + dc.b 624-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 6 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 22: 540 White Oaks: Rocker + dc.b 140 ; room number in which person appears =255 for end of this table. + dc.b 635-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 3 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 23: Undertaker Santa Fe + dc.b 1 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 24: Undertaker El Paso + dc.b 2 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 25: Undertaker Roswell + dc.b 3 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 26: Wire office man Santa Fe + dc.b 5 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 27: Wire Office man El Paso + dc.b 6 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 28: News office man Santa Fe + dc.b 8 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 29: News office man El Paso + dc.b 9 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 30: News office man White oaks + dc.b 10 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 31: bank Santa Fe + dc.b 12 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 32: bank El Paso + dc.b 13 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 33: bank Roswll + dc.b 14 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 34: bank Lincoln City + dc.b 15 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 35: bank Mesilla + dc.b 16 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 36: bank White Oaks + dc.b 17 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 37: Livery person Santa Fe + dc.b 19 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 38: Livery person El Paso + dc.b 20 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 39: Livery person Licoln City + dc.b 21 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 40: Livery person White Oaks + dc.b 22 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 41: Doctors El Paso + dc.b 24 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 42: Doctors Mesilla + dc.b 25 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 43: Store man El Paso + dc.b 60 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 44: Murphy Dolan Man in Lincoln + dc.b 62 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 156/2 ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 45: Store Man Roswell - Ash Upton + dc.b 61 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b AshUptonMenu/2 ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,AshUpton,0,YAM + +; person 46: Store man White Oaks + dc.b 63 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 47: unused + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 48: Laura Picket at Hotel in El Paso + dc.b 66 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b LauraPicketMenu/2 ; Current menu to use in conversations + dc.b 9 ; identikit type prototype to use + dc.b Default2ndMenu,LauraPicket,0,YAM + +; person 49: girl in house/Lincoln City + dc.b 69 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b GirlFriendMenu/2 ; Current menu to use in conversations + dc.b 9 ; identikit type prototype to use + dc.b Default2ndMenu,Girlfriend,0,YAF + +; person 50: hostess in Santa Fe Saloon (560) + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 639-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 14/2 ; Current menu to use in conversations + dc.b 7 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + + +; person 51: Store man Santa Fe + dc.b 64 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 52: barman in Santa Fe. + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 12/2 ; Current menu to use in conversations + dc.b 16 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + + + + +; people to meet at random in desert have room numbers 190..197 + + + + +; people that either Pat or Billy can meet... +; person 53: person to meet at random in desert by Anglo farmers. +; peasant being run off land + dc.b 190 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 50/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (Mexican peasant) + dc.b Default2ndMenu,NoName,0,YAM + +; person 54: person to meet at random in desert. +; mexican being picked on. + dc.b 191 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 58/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (peasant) + dc.b Default2ndMenu,NoName,0,YAM + +; person 55: person to meet at random in desert. +; sick man + dc.b 192 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 58/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (Mexican) + dc.b Default2ndMenu,NoName,0,YAM + +; person 56: person to meet at random in desert. + dc.b 193 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 62/2 ; Current menu to use in conversations + dc.b 18 ; identikit type prototype to use (sick man) + dc.b Default2ndMenu,NoName,0,YAM + + + + + +; people that only Billy can meet... +; person 57: person to meet at random in desert. +; peasant wants help nursing his family + dc.b 194 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 104/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (peasant with sick family) + dc.b Default2ndMenu,NoName,0,YAM + + + +; person 58: person to meet at random in desert. +++UNUSED+++ + dc.b NoPerson ; 195 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; people that only Pat can meet... +; person 59: person to meet at random in desert. +; Texan possee + dc.b 196 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 76/2 ; Current menu to use in conversations + dc.b 6 ; identikit type prototype to use (Possee representative) + dc.b Default2ndMenu,NoName,0,YAM + +; person 60: person to meet at random in desert. +; Barney Mason + dc.b 197 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 80/2 ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use (Barney Mason) + dc.b Default2ndMenu,NoName,0,YAM + +; person 61: person to meet at random in desert. +++UNUSED+++ + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 62: person to meet at random in desert. +++UNUSED+++ + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 63: woman being bothered by a gunslinger in saloon. El Paso 2 + dc.b 168 ; room number in which person appears =255 for end of this table. + dc.b 637-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 54/2 ; Current menu to use in conversations + dc.b 9 ; identikit type prototype to use (young Woman Green Skirt) + dc.b Default2ndMenu,NoName,0,YAF + +; person 64 560 Santa Fe (Saloon): guy drinking at bar. Shirt/brown trousers +; Ned Parkin + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 630-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b NedParkinMenu/2 ; Current menu to use in conversations / 2 + dc.b 1 ; identikit type prototype to use + dc.b Default2ndMenu,NedParkin,0,YAM + +; person 65 560 Santa Fe (Saloon): guy at table. Grey jack/jeans + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b BenDavisMenu/2 ; Current menu to use in conversations / 2 + dc.b 17 ; identikit type prototype to use + dc.b Default2ndMenu,BenDavis,0,YAM + +; person 66 562 Santa Fe (Saloon): guy at table. Grey jack/brown trousers + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 17 ; identikit type prototype to use + dc.b Default2ndMenu,KarlBekkert,0,YAM + +; person 67 soldier at Fort Stanton + dc.b ML+19 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 20 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 68 soldier at Fort Sumner + dc.b ML+20 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 66/2 ; Current menu to use in conversations: army being cheated + dc.b 20 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 69 - at Bitter lake ranch + dc.b ML+24 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 70 - at Fritz Ranch + dc.b ML+25 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 71 - at Chisum Ranch + dc.b ML+26 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 72 - Dedrick Ranch + dc.b ML+27 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations - Indians not getting beef + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 73 - at Beckwith Ranch + dc.b ML+28 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 74 - Mrs McSween - at Tunstall Ranch + dc.b ML+29 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 134/2 ; Current menu to use in conversations - Indians not getting beef + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,MrsMcSween,0,OAF + + +; person 75 - at Reed Ranch + dc.b ML+30 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 76 - Indian chief at Mescalero + dc.b ML+35 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 92/2 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,ChiefHow,0,OIM + + +; person 77 - prospector + dc.b ML+48 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b ProspectorMenu/2 ; Current menu to use in conversations - prospector + dc.b 0 ; identikit type prototype to use + dc.b 136/2,WhiskeyPete,0,YAM + +; person 78 - Joe Grant. +; appears in saloon in Santa Fe (triggered by WALKABOUT.TXT) + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 128/2 ; Current menu to use in conversations - Indians not getting beef + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; A few special objects which you can select in town - e.g. +; the wanted posters. +; person - 79 - wanted poster. Not Very talkative! + dc.b 0 ; room number in which person appears =255 for end of this table. + dc.b 642-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 80 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 81 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 82 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 83 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person 84 - gambler + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 1 ; object number used to represent person (should be 2658) + dc.b CardGameMenu/2 ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,0,0,OAF + + + +; person 85 - Jose Miguel thingy +; interrupts player looking at map + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; default menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 86 - guy at bar in Santa Fe 2 (LHS): +; grey jacket, blue jeans, brown hat, blue neckerchief + dc.b 170 ; room number in which person appears =255 for end of this table. + dc.b 631-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SpillDrinkMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 87 - guy at bar in Santa Fe 2 (LHS): +; Grey jacket, brown waistcoat, grey jacket. Cigarette in mouth +;' grey hat + dc.b 170 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; default menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 88 - guy at bar in El Paso 1 (LHS): +; Grey jacket, blue jeans, blue neckerchief, brown hat + dc.b 166 ; room number in which person appears =255 for end of this table. + dc.b 631-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b JackShoeMenu/2 ; default menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,JackShoe,0,YAM + + +; person 89 - guy at bar in El Paso 1 (LHS): +; Grey jacket, brown waistcoat, grey jacket. Cigarette in mouth +;' grey hat + dc.b 166 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 90 566 El Paso (Saloon): guy at table. Grey jack/blue trousers + dc.b 166 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SpillDrinkMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 91 568 El Paso (Saloon 2): guy at table. Grey jack/brown trousers + dc.b 168 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,RickSands,0,YAM + + +; person 92 574 Roswell (Saloon): guy at bar. Brown jacket, grey +; trousers, white neckerchief, brown hat. + dc.b 174 ; room number in which person appears =255 for end of this table. + dc.b 630-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b BenDavisMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 93 574 Roswell (Saloon): guy at table +; trousers, white neckerchief, brown hat. + dc.b 174 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 94 573 Roswell (Saloon): guy at table +; tbrown trousers, grey jacket, blue neckerchief, brown hat + dc.b 173 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b RickRiderMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,RickRider,0,YAM + +; person 95 573 Roswell (Saloon): guy at table +; grey trousers, grey jacket, brown waistcoat, grey hat + dc.b 173 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 95 565 Lincoln city (Saloon): guy at table +; blue trousers, grey jacket, grey hat + dc.b 165 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 96 565 Lincoln city (Saloon): guy at table +; grey trousers, grey jacket, brown waistcoat, grey hat + dc.b 165 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 97 565 Lincoln city (Saloon): guy at bar +; grey trousers, brown jacket, brown hat + dc.b 165 ; room number in which person appears =255 for end of this table. + dc.b 630-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SpillDrinkMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 98 569 Mesilla (Saloon): guy at table +; blue trousers, grey jacket, grey hat + dc.b 169 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,WarrenOaks,0,YAM + + +; person 99 572 White Oaks (Saloon): guy at table +; grey trousers, brown jacket, brown hat +; Slightly Mexican appearance, with big black moustache + dc.b 172 ; room number in which person appears =255 for end of this table. + dc.b 634-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,WayneRodgers,0,YAM + + +; person 100 Tom O'Foliard +; grey trousers, grey jacket, brown waistcoat, grey hat + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + + +; person 101 - Wilma Katz - at Katz farmhouse (31) + dc.b ML+31 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b WilmaKatzMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,WilmaKatz,0,OAF + +; person 102 - at Dunn Farmhouse (32) + dc.b ML+32 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b LonelyFarmhouseMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,MrsMcSween,0,OAF + +; person 103 - at Rose Farmhosue (33) + dc.b ML+33 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b LonelyFarmhouseMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,MissRosy,0,OAF + + + dc.b 255 ; end of table. + + + +TownData +; 16 bytes per town +; town 10: Santa Fe + dc.w 10 ; increase in gold per time unit. + dc.w 200 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 11: White Oaks + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 12: Lincoln City + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 13: Mesilla + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 14: Roswll + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 15: El Paso + dc.w 8 ; increase in gold per time unit. + dc.w 150 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + + +SubPlotData +; There is a table containing all the bits of information +; people may want to know about: in TownVarData. +; This is initialised from a table of identical format +; in TownFixedData (except that offsets are relative to the +; start of this little table, wheras in TownVarData they +; are relative to TownVarData). The copy routine makes the +; appropriate conversion. +; +; 10 pointers at start... + dc.w EndSubPlotData-SubPlotData + dc.w SPMoney-SubPlotData ; .w Offset of "Money Location" information. + dc.w SPDeputies-SubPlotData ; .w Offset of "Deputies Location" information. + dc.w SPGangs-SubPlotData ; .w Offset of "Gang Location" information + dc.w SPRobbery-SubPlotData ; .w Offset of "Recent robbery" information + dc.w SPSubPlots-SubPlotData ; .w Offset of sub-plot table. + dc.w SPHidden-SubPlotData ; .w Offset of "Hidden things" table for map + dc.w CommsInfo-SubPlotData ; .w offset of "things the other computer wants +; to know about. + dc.w 0 + dc.w 0 + dc.w 0 + +CommsInfo + dc.b 0 * not used + dc.b 0 * LOCATION of pat + dc.b 0 * LOCATION of Billy + + even + +SPHidden +; table for map containing one byte for every object on map. +; If zero, it will be displayed (unless overridden elsewhere) +; If one, it will be hidden. This is used for making e.g. +; farmhouses disappear after we've used their subplots + dc.b 0,0,0,0,0,0,0,0 ; 0..7 + dc.b 0,0,0,0,0,0,0,0 ; 8..15 + dc.b 0,0,0,0,0,0,0,0 ; 16..23 + dc.b 0,0,0,0,0,0,0,0 ; 24..31 + dc.b 0,0,0,0,0,0,0,0 ; 32..39 + dc.b 0,0,0,0,0,0,0,0 ; 40..47 + dc.b 0,0,0,0,0,0,0,0 ; 48..55 + + +; First word in every entry is 0 if nothing to know. +; 255. if hidden (doesn't appear on map) but can be told to player, +; 254. if hidden (doesn't appear on map) and cannot be told to player. +; non-zero if there is some piece +; of information that may be required. +; Second word is a numerical parameter for several of the +; items. These are coded specially. +; Third and fourth words unused presently. +; fourth to seventh words are four message numbers to print, +; in order. If =FFFF print the numeric parameter. +; If <10, print the appropriate paramter, numbered from +; 2 in steps of 2. - it will be a location name, to choose the message +; from 1000... + +SPMoney + dc.w 1,1000,0,0,966,1010,0,0 ; .w,.w Gold in Bank at town 0 + dc.w 1,400,0,0,966,1011,0,0 ; .w,.w Gold in Bank at town 1 + dc.w 1,400,0,0,966,1012,0,0 ; .w,.w Gold in Bank at town 2 + dc.w 1,400,0,0,966,1013,0,0 ; .w,.w Gold in Bank at town 3 + dc.w 1,400,0,0,966,1014,0,0 ; .w,.w Gold in Bank at town 4 + dc.w 1,400,0,0,966,1015,0,0 ; .w,.w Gold in Bank at town 5 + dc.w -1,-1 + +SPDeputies + dc.w 1,2,0,0,972,$ffff,973,1010 ; .w,.w Number of deputies in town 0 + dc.w 1,0,0,0,972,$ffff,973,1011 ; .w,.w Number of deputies in town 1 + dc.w 1,0,0,0,972,$ffff,973,1012 ; .w,.w Number of deputies in town 2 + dc.w 1,0,0,0,972,$ffff,973,1013 ; .w,.w Number of deputies in town 3 + dc.w 1,0,0,0,972,$ffff,973,1014 ; .w,.w Number of deputies in town 4 + dc.w 1,0,0,0,972,$ffff,973,1015 ; .w,.w Number of deputies in town 5 + dc.w -1,-1 + +SPGangs + dc.w 1,0,0,0,962,1041,965,1010 ; .w,.w Gang location 0 + dc.w 255,1,0,0,962,1042,965,1011 ; .w,.w Gang location 1 + dc.w 255,2,0,0,962,1043,965,1012 ; .w,.w Gang location 2 + dc.w 255,3,0,0,962,1044,965,1013 ; .w,.w Gang location 3 + dc.w 255,4,0,0,962,1045,965,1014 ; .w,.w Gang location 4 + dc.w 255,5,0,0,962,1046,965,1015 ; .w,.w Gang location 5 + dc.w -1,-1 + +SPRobbery + dc.w 41,10,0,0,962,2,963,4 ; default - cooper gang/Santa Fe. + dc.w -1,-1 + +SPSubPlots +; .w,.w Sub-plot? + dc.w 0,0,0,0,0,0,0,0 + dc.w -1,-1 + + +EndSubPlotData + +;----------------- + +ENDTABLE +;--------- + END + diff --git a/l9dev/regress/games.l9/billy.l9/pcconst.txt b/l9dev/regress/games.l9/billy.l9/pcconst.txt new file mode 100644 index 0000000..39edd72 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/pcconst.txt @@ -0,0 +1,10 @@ +; Machine constants +; MCONST.TXT +const + st=0 ; conditional assembly + ReallyST=0 + Amiga=0 + pc=1 + notPc=0 + Scrolling=1 + AllowMusic=1 diff --git a/l9dev/regress/games.l9/billy.l9/print.txt b/l9dev/regress/games.l9/billy.l9/print.txt new file mode 100644 index 0000000..7b881db --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/print.txt @@ -0,0 +1,340 @@ +; PRINT.TXT for Billy The Kid +; +; Mike Austin July 1990 +; +; Copyright (C) 1990 Level 9 Computing Ltd +; +; +const + TextBufferNumber=24 ; where characters are put by MESSAGE commands + FontListNumber=26 +; LoLongTextBufferOffset=166 +; ArcBigWindowRaster=840 +; ArcBigWindowDO=50 + +table +;; TextBuffer=24 + FontList=26 + +var +; PrintRasterNum +; FirstAsciiInFont +; FontHeight ; character height, in pixels +; PrintX PrintY + +begin + +;------------ +;.CopyFilename +;; from IntroTables(v1) to list17(8) +; v2=8 +;.CF2 +; v3=IntroTables(v1) +; list17(v2)=v3 +; add v1,c1 +; add v2,c1 +; if v3<>0 then CF2 +; return +;---- +.vAllocateAndLoadFont + &x1=longws(HiLongFreeWorkspace) + &list11(96)=x1 ; set up list24 - used for text print buffer + &x1=longws(LOLongFreeWorkspace) + &list11(98)=x1 ; set up list24 + v1=520 ; reserve space for list 24 - used for text print buffer +; Big enough for 6.5 lines 80 characters across + gosub @MCReserveMemory + + + &x1=longws(HiLongFreeWorkspace) + &list11(104)=x1 ; set up list26 + &x1=longws(LOLongFreeWorkspace) + &list11(106)=x1 ; set up list26 + v1=2280 ; reserve space for list 26 - used for font file + gosub @MCReserveMemory + &v1=IntroTables(28) ; offset of filename within IntroTables +; from IntroTables(v1) to list17(8) + gosub @CopyFilename + v1=FontListNumber + v2=0 + gosub @MCLoadFile ; at v2 bytes into listv1() + v1=FontListNumber + v2=0 + v3=0 + gosub @MCSetPrintFont +; v1=list number, v2=offset, v3=CGA palette code (mono machines only) + +; Format of font header (same as PC, of course) is: +;0 .w Offset of "Information" +;2 .w Offset of "width table" +;4 .w offset of "font definition" +; +; "Information" table contains: +; .b Version. Ignored at present +; .b SystemWorkspace (0) To allow us to tell if we've done initialise +; .b First Ascii char +; .b Last Ascii char +; .b character width(pixels) divided down to give bytes +; .b character height (pixels) +; .b Number of bit-planes. Normally 1 +; .b Non-zero if compressed (?) + &x1=FontList(0) + add x1,c2 + FirstAsciiInFont=FontList(x1) + add x1,c3 + FontHeight=FontList(x1) + return +;-------------- +;.DoNotePadMessage +; v1=NotepadRaster ; =1726 (use 430 to display) +;; flag display system to show this box +; TextBoxDisplayed=430 ; reset flag to indicate no text printed + +;.DoTextWindow +;; text raster is number 1725 +; v1=CurrentPrintRaster ; =1725 (use 431 to display) +;; flag display system to show this box +;; TextBoxDisplayed=ArcBigWindowDO +; TextBoxWidth=DefaultTextWidth ; 224in Grange Arcades. ; width of main window box +; +;.BoxMessageM1 +;; print message m1 into text raster v1, clearing it to white first +; gosub @SetupPrintRaster +; PrintX=LeftMargin +; PrintY=TopMargin +; code - +; gosub @iMessageM1 +; code + +; return +;---------- + code - +.iStartPrinting +; CALL THIS BEFORE DOING A SERIES OF MESSAGE COMMANDS + goto @iStartPrintToBuffer +;-------------- +.iMessageM1 +; print Message M1 at current cursor pos + gosub @iStartPrintToBuffer + message m1 +; drop through to iEndPrinting... + +;--- +.iEndPrinting +; CALL THIS AFTER DOING A SERIES OF MESSAGE COMMANDS + message cr ; ensure buffer is flushed etc. + + gosub @iEndPrintToBuffer +; text has been printed between TextBuffer(2..v7) + + PrintX=LeftMargin + code + + PrintY=TopMargin + + if CurrentPrintRaster<>3361 then NotMapRaster ; 3361 is 10x2 print raster + PrintX=0 ; for Binoculars raster, print at top left. + PrintY=0 + +.NotMapRaster + + +;; push CurrentPrintRaster +;; push CurrentDO + push ForegroundColour + if v7<95 then iEPCurrentBox ; was 80 for a while + gosub @SetBigBox +; ForeGroundColour=7 ; black ; black text for big box (not +;; transparent), cause there's no black box behind it. + + +.iEPCurrentBox + if MaxHighlightEntry>1 then iEPNotBlack +; bar removed - e.g. for result message +; if HighlightY<32000 then iEPNotBlack ; bar removed - e.g. for result message +;; if MaxHighlightEntry>1 then iepNotBlack +; only one option - don't bother with highlight. +.iepBlack + ForeGroundColour=7 ; black ; black text for big box (not +; transparent), cause there's no black box behind it. + +.iepNotBlack + + v1=CurrentPrintRaster ; =1725 (use 431 to display) + gosub @SetupPrintRaster + code - + gosub iDisplayBufferedText ; copy from buffer onto raster. + code + + pop ForegroundColour +;; pop CurrentDO +;; pop CurrentPrintRaster + code - + return +;------------ +.iDisplayBufferedText +; called from menu etc. where several messages are to be put +; into one text box +code + + if v7>5 then iBoxV1SomeText ; slightly higher than ideal (2) +; because stray spaces, carriage returns etc. tend to get shoved +; out from time to time. + +; nothing printed - flag display system to not show this box + TextBoxDisplayed=0 ; reset flag to indicate no text printed + +.iBoxV1SomeText + v6=FontHeight ;copy into a variable int mode can access + &x6=FontList(2) ; get offset of width table + sub x6,FirstAsciiInFont ; so FontList(x6+v3) is width for char v3 + + x1=2 ; position in buffer + v4=ForegroundColour ; foreground color (7) + v5=BackGroundColour ; background color (1) + v2=PrintY ; y pos + v1=PrintX ; x pos +code - + goto RasterPrintXLoop + +.RasterPrintYLoop + v1=LeftMargin ; x position ; left margin + +.RasterPrintXLoop + x3=TextBuffer(x1) ; ascii code + gosub TranslateX3 + v3=x3 + add x1,c1 ; step on to next character in buffer + if v3=96 then @NeedCR ;'`' (next to BS) + if v3=32 then RPLCheckWordWrap + if v3<>13 then RPL1 +.RPLCheckWordWrap +; check if next word to be printed will fit on this line + v3=32 ; convert cr, control codes to spaces + x2=x1 + x4=0 ; cumulative width so far +.CWW1 + x3=TextBuffer(x2) + gosub TranslateX3 + if x3<33 then CWW2 ; space,cr,end of message + if x3=96 then CWW2 ; "`" + add x3,x6 ; offset of width table + x3=FontList(x3) + add x4,x3 ; add on width + add x2,c1 ; next char + goto CWW1 +;-- +.TranslateX3 +; translate ascii code x3 to allow for peculiar things in the +; font - e.g. foreign character symbols +; x5 is available as workspace + if x3=225 then TranslateBeta +; cif TranslateExtraChars + if x3>31 then NoShiftedHighChar + if x3=13 then NoShiftedHighChar ; carriage return +; chars 128.. in the original text get inserted here as chars +; 0.., so add on 128 to them + x5=128 + add x3,x5 + +.NoShiftedHighChar +; cend + + return + +.TranslateBeta + x3=158 + return +;-- +.CWW2 +; x4 is cumulative width in pixels of next word to be printed + add x4,v1 ; add on to current x position + if x4122 then RPL1a ; 'z' + x4=32 + sub v3,x4 ; convert it to upper case + +.RPL1a +cend + + +code + + push v4 ; save foreground colour + if v4<>16 then RPLNotTransparent +; printing transparent - in Billy, printing transparent +; onto big text box gives problem cause black background is +; only 10 cells wide. + if v1<160 then RPLNotTransparent + v4=7 ; turn to black beyond this point + +.RPLNotTransparent + gosub @MCRasterPrintCharacter + + pop v4 ; foreground colour +code - +; v1=x pos v2=y pos, v3=ascii code, v4=foreground colour (0..16) +; v5=background colour (0..16) +; returns v1=x,v2=y position after print + if x12 indicates that something has been +; printed. + message cr ; ensure buffer is flushed + code + + &v7=WordWS(WordTextBufferOffset) + &WordWS(WordTextBufferOffset)=c0 +; all future text printing +; to this offset within list TextBuffer(), please + code - + sub v7,c1 ;********** + return +;------------------- + code + +.SetUpPrintRaster +; prepare to print message m1 into text raster v1, clearing it to white first + &WordWS(WordRasterOffset)=c0 + push v1 ; changed by MCSetPrintRaster? + gosub @MCSetPrintRaster + pop v1 +.SetUpPrintRaster2 +; clear raster before printing onto it +;; v1=destination raster + &WordWS(WordRasterOffset)=c0 + v2=BackgroundColour ; clear color. 1=white + v3=0 ; use default palette. + v5=0 ; clear to color + goto @MCRasterHandler + +;---------------- diff --git a/l9dev/regress/games.l9/billy.l9/readfont.txt b/l9dev/regress/games.l9/billy.l9/readfont.txt new file mode 100644 index 0000000..6931a0b --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/readfont.txt @@ -0,0 +1,10 @@ +Parameters for FONT.BBC are + +Neo Filename: WESTERN.NEO +Fnt Filename: WESTERN.FNT +ASCII Start : 32 +ASCII End : 163 +X Pixels : 16 +Y Pixels : 9 +Column : 16 + diff --git a/l9dev/regress/games.l9/billy.l9/s.dat b/l9dev/regress/games.l9/billy.l9/s.dat new file mode 100644 index 0000000..bfe33fe Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/s.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/spaniob.txt b/l9dev/regress/games.l9/billy.l9/spaniob.txt new file mode 100644 index 0000000..4714b56 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/spaniob.txt @@ -0,0 +1,225 @@ +begin + +;----------------------------------------------------------- +.SpecialAniObject +; this is a standard routine, myaniobject is the specific bit +; parameters: num object number, dv2,dv3,dv4, xzh coords +; ACBHeader +; useful variables: + if dv5<>dPlot then SAORet + push dv1 + push dv2 + push dv3 + push dv4 + push num + push objectnumber + gosub myaniobject + pop objectnumber + pop num + pop dv4 + pop dv3 + pop dv2 + pop dv1 + + if Num<>2069 then SAORet +; 2069 is an invisible frame at end of dismount - used +; to trigger some code in the main SAO routine. Replace +; it with the last visible frame... + num=101 ; display Billy standing. Raster offset is set up. + +.SAORet + if num<2530 then MAONotSmallBilly + if num>2554 then MAONotSmallBilly + x1=2530 + goto MAOToGeneric + +.MAONotSmallBilly + if num<2420 then MAONotSmallPat + if num>2447 then MAONotSmallPat + x1=2420 +.MAOToGeneric +; turn small draw figure into generic outlaw - unless we're +; involved in the final duel + if EnemyName<>255 then MAONotSmallPat ; =Pat, Billy or $ff for other + + sub num,x1 ; get offset of small draw figure from base, + x1=20 ; base of generic gunfighter + add num,x1 + +.MAONotSmallPat + return +;------------------------------------------------------------- + +;------------------------------------------------------------- +.myaniobject +; x2,x3,x4 can be used as workspace... + + + if StructureFile<>IntroStructures then maoNotIntro + if num=1144 then introShot ; being pursued out of town + if num=798 then IntroShot ; guy shooting from window (In town) + if num=800 then IntroShot ; guy shooting beside window (In town) +;; if num=921 then IntroShot ; lightning in Canyon - gives intermittent gun shot + if num=1244 then IntroShot ; pigeon-shooting scene + if num=952 then IntroShot ; shoot blacksmith, and assinate Tunstall + if num<>922 then maoNotGunFlash ; frame of horseman in canyon + code - + random x1 + code + + if x1>30 then maoNotGunFlash ; only occasionally in canyon + +.IntroShot + v1=0 ; colt45 sample + gosub @HiPriPlaySample + +.maoNotGunFlash +.maoNotIntro + if num<1 then MAONotWalkabout + if num>199 then MAONotWalkabout +; reset playerAcb record, cause sometimes it +; gets lost when playing as Pat. + PlayerACB=ACBHeader + +.MAONotWalkabout + if num<>2069 then @MAONotDismount ; last frame of dismount + PlayerACB=ACBHeader + PlayerDirection=1 + PlayerWalking=false + ObjectNumber=3410 ; stand in direction + add ObjectNumber,PlayerDirection + dx4=PlayerACB + gosub @ChangeACBDx4 + + Rasteroffset=100 ; Billy + if PlayersName=Billy then MAODismount2 + RasterOffset=200 ; Pat +.MAODismount2 + x2=ACBRasterOffset + add x2,PlayerACB + if x2>ACBListSize then @MAOBug ;****** + &ACBList(x2)=RasterOffset ; ACBList(ACBRasterOffset) + x2=ACBLastHeightAdjust + add x2,PlayerACB + if x2>ACBListSize then @MAOBug ;****** + ACBList(x2)=c0 ; reset last adjustment + x1=ACBCumulativeShift ; word - for Walkabout: keeps track +; of how far we've shifted vertically - to allow the up/down +; movement as we walk to be cancelled when change animation. + add x1,PlayerACB + &ACBList(x1)=c0 ; reset continuous height shift + + + return + +.MAOBug ;****** + break ;******* + return ;******* + +.MAONotDismount + if num<>2511 then MAONotHorse +; a frame of standing horse + HorseX=dv2 + HorseZ=dv3 + HorseH=dv4 + +.MAONotHorse + if CurrentScreen<>BankGame then SAONotBank + if num<>329 then SAOBankNotPlayerLeft ; arm at left - initial condition. + PlayerACB=ACBHeader + x2=840 ; ani sequence for arm at left - for ARCADE.TXT checking + if ACBHeader>ACBListSize then @MAOBug ;****** + &ACBList(ACBHeader)=x2 + +.SAOBankNotPlayerLeft + if num<>332 then SAOBankNotPlayerRight ; arm at right + x2=841 ; ani sequence for arm at right - for ARCADE.TXT checking + if ACBHeader>ACBListSize then @MAOBug ;****** + &ACBList(ACBHeader)=x2 + +.SAOBankNotPlayerRight +.SAONotBank + + if CurrentScreen<>GameMap then MAONotGameMap + if num<340 then MAONotCows + if num<350 then MAOCows + if num<>3304 then MAOMapNotTrain ; one frame of the train +.MAOCows +; record the current coords for firing at. + push dv1 + dv1=num + gosub @ScanObjectTables + pop dv1 + +.MAOMapNotTrain +.maoNotCows + if num<2730 then MAOMapNotWagon + if num>2736 then MAOMapNotWagon +; record the current coords for firing at. + dv1=2730 ; first wagon + gosub @ScanObjectTables + +.MAOMapNotWagon + return +;-------------------------- +.MAONotGameMap + if PlayingDuel=0 then @MAONotDuel + if DuelStatus=0 then @MAONotDuel + +if duelstatus <> 2 then maonextstatus + if num <> bellraster then @maoDuel2 + duelstatus = 3 ; allow player to draw. + if TwoPlayerMode=true then maoDuel2 ; in two player mode, +; the opponent draws when we receive the message from the other +; computer + dx4 = enemyacb + ObjectNumber=11 + add ObjectNumber,DuelOpponentBase + +.maoDraw1 + gosub @changeacbdx4 + goto maoDuel2 ; theend +.maonextstatus + if num=2539 then ShootPlayer ;15Jan1991 + if num=28 then ShootPlayer ;15Jan1991 + if num=29 then ShootPlayer ;15Jan1991 + if num=32 then ShootPlayer ;15Jan1991 + if num <> 2429 then notenemyfire +.ShootPlayer +;code- +; random x1 +;code+ +; if x1 >50 then notenemyfire + v1=0 ; colt45 sample + gosub @PlaySample + duelstatus = 7 ; player is dying +.NotEnemyfire + if EnemyStatus<>0 then NotEnemyDraw ; to fix two player mode + if num <> 2426 then notenemydraw + enemystatus = 1 +.NotEnemyDraw +if duelstatus <> 4 then maoDuel2 + if num <> BillDrawn then maoDuel2 + duelstatus = 5 + +.maoDuel2 + + + +;-------------- +.maoTheEnd + return +;--------------------- +.MAONotDuel + if PersonDisplayed=false then maoNotPerson + return ; no sao stuff is relevant + + +.maoNotPerson + if num<1300 then MAONotMovingPerson + if num>1349 then MAONotMovingPerson + x1=MovingPersonHires + gosub @RecordCoordinates ; at Hires(x1) + +.MAONotMovingPerson + return +;--------------- diff --git a/l9dev/regress/games.l9/billy.l9/squash.dat b/l9dev/regress/games.l9/billy.l9/squash.dat new file mode 100644 index 0000000..aa922ec Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/squash.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/acode.acd b/l9dev/regress/games.l9/billy.l9/st.l9/acode.acd new file mode 100644 index 0000000..caaf7ab Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/st.l9/acode.acd differ diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/compile.bat b/l9dev/regress/games.l9/billy.l9/st.l9/compile.bat new file mode 100644 index 0000000..4bca291 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/st.l9/compile.bat @@ -0,0 +1,27 @@ +1../firstvar.txt +1mconst.txt +1../aahead.txt +1../language.txt +1../aaconst.txt +1../aavars.txt +1../demo.txt +1../standard.txt +1../menu.txt +1../walkabou.txt +1../fx.txt +1../arcade.txt +1../vectors.txt +1../strategy.txt +1../comms.txt +1../floors.txt +1../goal.txt +1../cache.txt +1../duel.txt +1../fire.txt +1../movecurs.txt +1../spaniob.txt +1../music.txt +1../display.txt +1../print.txt +1../intro.txt +2B40 diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/exit.txt b/l9dev/regress/games.l9/billy.l9/st.l9/exit.txt new file mode 100644 index 0000000..8463fd1 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/st.l9/exit.txt @@ -0,0 +1,583 @@ +; Dummy Exits File for Hero +; +; EXIT.TXT, data for the game exits. The numeric values for the +; directions is as follows: +; +; 1 up=9 in=11 cross=13 climb=14 jump=15 +; 8 2 down=10 +; ! +; 7 --+-- 3 +; ! +; 6 4 +; 5 +; +; Room 1 - Santa Fe Undertaker +1000 0 0 + +; Room 2 - bank +1000 0 0 + +; Room 3 - bank +1000 0 0 + +; Room 4 - bank +1000 0 0 + +; Room 5 - Santa Fe Wire Office +1000 0 0 + +; Room 6 - bank +1000 0 0 + +; Room 7 +1000 0 0 + +; Room 8 - Santa Fe News Office +1000 0 0 + +; Room 9 +1000 0 0 + +; Room 10 +1000 0 0 + +; Room 11 +1000 0 0 + +; Room 12 - Santa Fe Bank +1000 0 0 + +; Room 13 +1000 0 0 + +; Room 14 +1000 0 0 + +; Room 15 +1000 0 0 + +; Room 16 +1000 0 0 + +; Room 17 +1000 0 0 + +; Room 18 +1000 0 0 + +; Room 19 +1000 0 0 + +; Room 20 +1000 0 0 + +; Room 21 +1000 0 0 + +; Room 22 +1000 0 0 + +; Room 23 +1000 0 0 + +; Room 24 +1000 0 0 + +; Room 25 +1000 0 0 + +; Room 26 +1000 0 0 + +; Room 27 +1000 0 0 + +; Room 28 +1000 0 0 + +; Room 29 +1000 0 0 + +; room 30 - Santa Fe +0001 1 1 ; to undertaker +0001 2 5 ; to wire +1001 3 31 ; to street + +; room 31 - Santa Fe +0001 5 36 ; to other street +0001 1 8 ; to news +0001 2 64 ; to store +1001 3 32 ; to street + +; room 32 - Santa Fe +0001 1 12 ; to bank +1001 3 33 ; to street + +; room 33 - Santa Fe +0001 1 160 ; to saloon +0001 2 0 ; to train station +1001 3 34 ; to street + +; room 34 - Santa Fe +0001 1 80 ; to jail Sheriff's office +0000 5 38 ; south to other street +1001 2 65 ; to store + +; room 35 - Santa Fe (Street 2) +0001 1 171 ; to saloon +1001 3 36 ; to street + +; room 36 - Santa Fe +0001 2 190 ; to courthouse CLOSED +1001 3 37 ; to street + +; room 37 - Santa Fe +0001 1 190 ; CLOSED +0001 2 190 ; CLOSED +1001 3 38 ; to street + +; room 38 - Santa Fe +0001 1 190 ; to other street +0001 2 34 ; to other street +1001 3 39 ; to street + +; room 39 - Santa Fe +1001 1 19 ; to livery stables + +; 40 +1000 0 0 + +; 41 +1000 0 0 +; 42 +1000 0 0 +; 43 +1000 0 0 +; 44 +1000 0 0 +; 45 +1000 0 0 +; 46 +1000 0 0 +; 47 +1000 0 0 +; 48 +1000 0 0 +; 49 +1000 0 0 + +; 50 - El Paso +0001 3 51 +0001 1 168 ; to saloon +1001 2 24 ; to doctors + +; 51 +0001 3 52 +0000 2 55 ; NE goes to other street +1001 1 66 ; to hotel + +; 52 +0001 3 53 +1001 1 13 ; to bank + +; 53 +0001 3 54 +0001 1 6 ; to telegraph office +1001 2 56 ; to other street + +; 54 +1001 1 20 ; to stable + +; 55 El Paso second street. +0001 3 56 +0000 5 51 ; south goes back to southern street +0001 1 167 ; to saloon +1001 2 60 ; to store + +; 56 +0001 3 57 +0001 2 81 ; to sheriff's office +0001 7 55 ; west to saloon/store +0000 5 53 ; south goes back to southern street +1001 1 9 ; to El Paso Sun + +; 57 +1001 1 2 ; to Undertakers + +; 58 +1000 0 0 + +; 59 unused +1000 0 0 + +; 60 store +1000 0 0 + +; 61 +1000 0 0 + +; 62 +1000 0 0 + +; 63 +1000 0 0 + +; 64 Store +1000 0 0 + +; 65 store Zang's (Santa Fe) +1000 0 0 + +; 66 hotel +1000 0 0 + +; 67 Not USED +1000 0 0 + +; 68 +1000 0 0 + +; 69 +1000 0 0 + +; 70 Roswell. +0001 3 71 +1001 1 82 ; to Sheriff's office + +; 71 +0001 3 72 +1001 1 3 ; to undertakers + +; 72 +0001 3 73 +0001 2 61 ; to hardware store +1001 1 173 ; 67 ; to hotel + +; 73 +0001 1 190 ; CLOSED. to post office +1000 0 0 + +; 74 +1000 0 0 + +; 75 +1000 0 0 + +; 76 +1000 0 0 + +; 77 +1000 0 0 + +; 78 +1000 0 0 + +; 79 +1000 0 0 + +; 80 Sheriff's Office (Santa Fe) +1000 0 0 + +; 81 Sheriff's Office (El Paso) +1000 0 0 + +; 82 Sheriff's Office (Roswell) +1000 0 0 + +; 83 Sheriff's Office (Lincoln City) +1000 0 0 + +; 84 Sheriff's Office (Mesilla) +1000 0 0 + +; 85 Sheriff's Office (White Oaks) +1000 0 0 + +; 86 +1000 0 0 + +; 87 +1000 0 0 + +; 88 +1000 0 0 + +; 89 +1000 0 0 + +; 90 +1000 0 0 + +; 91 +1000 0 0 + +; 92 +1000 0 0 + +; 93 +1000 0 0 + +; 94 +1000 0 0 + +; 95 +1000 0 0 + +; 96 +1000 0 0 + +; 97 +1000 0 0 + +; 98 +1000 0 0 + +; 99 +1000 0 0 + +; 100 Lincoln City +0001 7 21 ; to corral / Torreon? +0001 3 101 +1001 1 165 ; to saloon + +; 101 +0001 3 102 +1001 1 62 ; to store + +; 102 +0001 3 103 ; east along street +1001 1 83 ; to sheriff's office + +; 103 +0001 3 104 +1001 1 15 ; to bank + +; 104 +0001 3 105 +1001 1 69 ; to house + +; 105 +1000 1 190 ; CLOSED to courts/jail + +; 106 +1000 0 0 + +; 107 +1000 0 0 + +; 108 +1000 0 0 + +; 109 +1000 0 0 + +; 110 +1000 0 0 + +; 111 +1000 0 0 + +; 112 +1000 0 0 + +; 113 +1000 0 0 + +; 114 +1000 0 0 + +; 115 +1000 0 0 + +; 116 +1000 0 0 + +; 117 +1000 0 0 + +; 118 +1000 0 0 + +; 119 +1000 0 0 + +; 120 +1000 0 0 + +; 121 Mesilla +;; 0001 7 120 ; west to empty desert +0001 3 122 +1001 1 25 ; doctor's + +; 122 +0001 3 123 +1001 1 16 ; to bank + +; 123 +0001 3 124 +0000 2 191 ; NE goes to nowhere +1001 1 169 ; saloon + +; 124 +0000 2 191 ; goes nowhere +1001 1 190 ; CLOSED + +; 125 +1000 0 0 + +; 126 +1000 0 0 + +; 127 +1000 0 0 + +; 128 +1000 0 0 + +; 129 +1000 0 0 + +; 130 +1000 0 0 + +; 131 +1000 0 0 + +; 132 +1000 0 0 + +; 133 +1000 0 0 + +; 134 +1000 0 0 + +; 135 +1000 0 0 + +; 136 +1000 0 0 + +; 137 +1000 0 0 + +; 138 +1000 0 0 + +; 139 +1000 0 0 + +; 140 White Oaks +0001 3 141 +0001 5 142 ; to other street +1001 1 63 ; to store + +; 141 +1001 1 17 ; to bank + +; 142 +0001 3 143 +0000 2 140 ; NE to other street +1001 1 172 ; to saloon + +; 143 +0001 3 144 +1001 1 10 ; to news office + +; 144 +1001 1 22 ; to livery stables + +; 145 +1000 0 0 + +; 146 +1000 0 0 + +; 147 +1000 0 0 + +; 148 +1000 0 0 + +; 149 +1000 0 0 + +; 150 +1000 0 0 + +; 151 +1000 0 0 + +; 152 +1000 0 0 + +; 153 +1000 0 0 + +; 154 +1000 0 0 + +; 155 +1000 0 0 + +; 156 +1000 0 0 + +; 157 +1000 0 0 + +; 158 +1000 0 0 + +; 159 +1000 0 0 + +; 160 ; saloon right (Santa Fe 1) +1001 7 162 + +; 161 +1000 0 0 + +; 162 ; saloon left (Santa Fe 1) +1000 5 33 ; south back to street + +; 163 +1000 0 0 + +; 164 +1000 0 0 + +; 165 ; big single saloon in Lincoln City +1000 0 0 + +; 166 ; left El Paso 1 +1000 5 55 ; south back to street + +; 167 ; right El Paso 1 +1001 7 166 + +; 168 ; single El Paso 2 +1000 0 0 + +; 169 ; single Mesilla +1000 0 0 + +; 170 Left Santa Fe 2 +1000 5 35 ; south back to street + +; 171 Right Santa Fe 2 +1001 7 170 + +; 172 Single White Oaks +1000 0 0 + +; 173 Left Roswell +1001 5 72 ; south back to street + +; 174 Right Roswell +1001 7 173 + +1000 0 0 +0000 0 0 + + diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/gamedata.dat b/l9dev/regress/games.l9/billy.l9/st.l9/gamedata.dat new file mode 100644 index 0000000..48dfe61 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/st.l9/gamedata.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/mconst.txt b/l9dev/regress/games.l9/billy.l9/st.l9/mconst.txt new file mode 100644 index 0000000..56fddcf --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/st.l9/mconst.txt @@ -0,0 +1,10 @@ +; Machine constants +; MCONST.TXT +const + st=1 ; conditional assembly + ReallyST=1 + Amiga=0 + pc=0 + notPc=1 + Scrolling=1 + AllowMusic=0 diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/message.txt b/l9dev/regress/games.l9/billy.l9/st.l9/message.txt new file mode 100644 index 0000000..0e2508e --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/st.l9/message.txt @@ -0,0 +1,1200 @@ +; MESSAGE.TXT +; +; Messages for Billy The Kid Map/Strategy Games +; +; Copyright (C) 1991 Level 9 Computing Ltd. +; +; +; ||| are changes since initial text sent to Ocean for translation +; œœœ are changes since final text sent to Ocean for translation 8 Dec 90 +; (Corrections of obvious spelling and punctuation errors are not +; marked - but additions to punctuations are). +; &&& are additional things +; ^^^ are changes from 1991 onwards. +;l *********** what about copyright message???? +; +[1:Pat ] +[2:Billy ] ; names for "PLAYERSNAME" variable. +[3:`] +[5:%] +[6:% %] +[7:. ] ; dot +[8: ] ; space ; ^^^^ + +[11:Sheriff Pat Garrett ] ; full name for Pat, e.g. for +; when introduced to people. +[12:Billy The Kid ] ; full name for Billy, e.g. for +; when introduced to people. + + + +;||| messages 21..102 moved to other parts of the game... +;[21:Billy spread the map and figured on it a while. He'd gotta +;make a move and he'd gotta make it right... ] +;[22:Billy drove off the herd and started the long drive to Mexico... ] +;[23:Outside, a man shouted, "Come on out with your hands in the air, +;fella. We've gotcha surrounded!" ] +;[24:The Kid was trapped! The law was all over the place, and he hadn't +;got nuthin' but his ol' 6-gun. ] +[25:The plan was perfect. The train'd have to slow when it hit the +incline. And that'd be the chance to catch onto it. ] + +[26:Run alongside, jump over the rocks, then climb up the ladder +and jump onto the fuel wagon. Stop that train! ] ; œœœinstructions +; added. Also "Billy" replaced with "the" + +; +; Duel messages. Both follow Player's name ||| +[101:had won by a whisker. His opponent collapsed to the floor. ] ;^^^ +;It seemed best to hightail it outa there before anyone started +;to ask awkward questions about who fired first. ] ;||| +[102:went down in agony. The last thing he remembered +was friendly hands dragging him onto a horse... ] ;||| + + +; Brawl messages ||| +[300:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew that he would +have to fight his way to the door if he wanted to escape in one +piece. ] ;Billy is on the right. ] ; Billy ||| œœœ(mentions group of thugs) +[301:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew he'd +have to fight his way to the door if he wanted to escape in one +piece. You are on the right. ] ; Pat |||œœœ(mentions group of thugs) +[302:"I reckon you jogged ma +elbow and spilled my beer there Mister. Get me another drink, +if you know what's good for you". ] ;||| Ned Parkin +[303:"I don't like +the way you're looking at me, son. Reckon you'd best take +you're liquor elsewhere". ] ;||| Jack Shoe +[304:"We don't like your sort in this bar, Mister. +Maybe you'd better find another place to drink your sasparilla!" ] ;||| Ben Davis +[305:"Hey Mister, some guys other there +were talking about jumping you. You gonna stand there and take +that?" ] ;||| Lavinia Strumpet + + +; invitations to card game in saloon +[320:"They say +you're pretty good with a deck, Mister. But how about a game +with the grown-ups?" ] ;||| Rick Sands +[321:"Sorry Mister, I must have mistaken you for a man!" ] ;||| + +; encounters elsewhere in town, or others +[330:"You look the type who might aid an honest godfearing woman, +Sir. My respectable boarding house has been taken over by ruffians. Can +you drive them off for me?" ] ;||| Laura Picket +[331:"Hey mister. Some drifter friends of +the local Judge have taken over my homestead. You've got an honest +face - can't you help me?" ] ;||| œœœno longer mentions name. +[332:"I guess you think you can strut around this town like you +own the place, Stranger. Well there's only room for one tough +guy in this town. Draw or git!" ] ; Rick "Two Fingers" Rider. ;||| +[333:"Hey mister, they say you're pretty good with those shootin' +irons of yours. Won'cha help me out - some of Murphy's mob have +taken over my claim. Move 'em out and I'll cut you in for a share!" ] ;||| +[334:"Why hello again, dear. I'd love to talk to ya some more, +but I've just gotta wash my hair..." ] ;||| visit girlfriend! œœœpunc + + + +; references to people elsewhere who need help. +[340:"Hey mister, a friend of mine needs help... ] ; before 342..349 ;||| +[341:Might be able to help ya in return, too! ] ; after 342..349 ;||| +[342:It's Whiskey Pete the prospector out at his claim. ] ;||| +[343:Laura Picket at the El Paso hotel has got big trouble. ] ;||| +; ^^^ now at El Paso + +[344:Wilma Dunn out at the Dunn ranch. ] ;||| +[345:Joe Dunn out at his ranch. ] ;||| +[346:lil' ol' Miss Rose, out at her old place. ] ;||| + + + +[360:"Hey mister, someone was looking for you... ] ; before 362..369 +[361:why not get over there and look 'em up?" ] ; after 362..369 +[362:Joe Grant was the name. He was hanging out in the Santa +Fe Saloon. ] +[363:Karl Bekkert was the name. He was hanging out in the Santa Fe +Saloon. ] +[364:Jack Shoe was his name. Saw him in the El Paso Saloon. ] +[365:Ben Davis, I think. Saw him in the Santa Fe Saloon. ] +[366:Warren Oaks, I think. He hangs out in the Mesilla saloon. ] +[367:lil' ol' Miss Rose, out at her old place. ] ;||| +;[367:Wayne Rogers, so I'm told. He hangs out in the +;White Oaks saloon. ] ;||| + + + +; 400+location number is press stories about the most common events +; that happen at places... ||| +[410:Pat Garrett has been made Sheriff of Santa Fe ] +[411:Pat Garrett has been made Sheriff of White Oaks ] +[412:Pat Garrett has been made Sheriff of Lincoln City ] +[413:Pat Garrett has been made Sheriff of Mesilla ] +[414:Pat Garrett has been made Sheriff of Roswell ] +[415:Pat Garrett has been made Sheriff of El Paso ] + +[424:the Bitter Lake Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ +[425:the Fritz Ranch, of the Murphy-Dolan's, has gone broke. ] ;||| œœœ +[426:the Chisum Ranch has gone out of business. ] ;||| œœœ +[427:the Dedrick Ranch, of the Murphy-Dolan's, has closed down. ] ;||| œœœ +[428:the Beckwiths, associates of Murphy and Dolan, have closed their +ranch and left the state. ] ;||| œœœ +[429:the Tunstall Ranch has gone out of business. ] ;||| +[430:the Reed Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ + +[431:only another ] ;œœœ (Followed by number of ranches left, then 432) +[432: of those Murphy-Dolan swine to get. Keep at it, Billy] ;œœœ + +; text for Pat to control deputies etc.;||| +[450:WHERE ARE DEPUTIES `] ;|||menu option ;||| +[451:HIRE DEPUTY `] ; |||menu option +[452:FIRE DEPUTY `] ; |||menu option +[453:deputy ] ; for reporting number +[454:deputies ] +[455:people are ] ; followed by happiness: 456..464 +[456:rioting. ] +[457:very angry. ] +[458:angry. ] +[459:displeased. ] +[460:restless. ] +[461:content. ] +[462:happy. ] +[463:ecstatic. ] +[464:money: $] ;||| +[465:`income next month: $] ;||| +[466:`costs next month: $] ;||| +[467:`(] ; 467, number, 468 || +[468: Texan Deputies working for nothing). ] ||| + +; menu option versions of town names... +[470:Santa Fe `] +[471:White Oaks `] +[472:Lincoln City `] +[473:Mesilla `] +[474:Roswell `] +[475:El Paso `] + + +;||| Full stops removed from messages 500..548 +[501:a herd of longhorns ] ; 0 +[502:a herd of longhorns ] ; 0 +[503:a herd of longhorns ] ; 0 +[504:a herd of longhorns ] ; 0 +[505:a herd of longhorns ] ; 0 + +[510:Santa Fe ] ; dc.w 3345 ; Santa Fe 10 +[511:White Oaks ] ; dc.w 3346 ; Albe'que 11 +[512:Lincoln City ] ; dc.w 3347 ; Lincoln City 12 +[513:Mesilla ] ; dc.w 588 ; Las Cruces 13 +[514:Roswell ] ; dc.w 589 ; Roswell 14 +[515:El Paso ] ; dc.w 0 ; spare town 15 +[516:Frontier Town ] ; dc.w 0 ; spare town 16 +[517:Frontier Town ] ; dc.w 0 ; spare town 17 +[518:Frontier Town ] ; dc.w 0 ; spare town 18 +[519:Fort Stanton ] ; dc.w 3351 ; Fort Stanton 19 +[520:Fort Sumner ] ; dc.w 3352 ; Fort Sumner 20 +[521:A New Fort ] ; dc.w 0 ; spare fort 21 +[522:A New Fort ] ; dc.w 0 ; spare fort 22 +[523:A New Fort ] ; dc.w 0 ; spare fort 23 +[524:Bitter Lake ] ; dc.w 581 ; +[525:the Fritz Ranch ] ; dc.w 582 ; +[526:the Chisum Ranch ] ; dc.w 583 ; +[527:the Dedrick Ranch ] ; dc.w 584 +[528:the Beckwith Ranch ] ; dc.w 585 +[529:the Tunstall Ranch ] ; dc.w 586 ; +[530:the Reed Ranch ] ; dc.w 587 + + + + + + + + + + + + + +; one of these should be Blazer's Mill, nr Mescalero Apache... +; See P.10 design +[531:the Dunn farmhouse ] ; 31 +[532:the Dunn farmhouse ] ; 32 +[533:the Rose homestead ] ; 33 +[534:a farmhouse ] ; 34 + + +[535:Mescalero Apache Reservation ] ; dc.w 3356 ; Mescalero Apache +settlement 35 +[536:Wild Apache Settlement ] ; dc.w 0 ; spare indians 36 +[537:Wild Apache Settlement ] ; dc.w 0 ; spare indians 37 +[538:Wild Apache Settlement ] ; dc.w 0 ; spare indians 38 +[539:the Santa Fe express ] ; 39 +[540:a wagon train ] ; 40 +; outlaw hideout names... +[541:The Cooper Gang hideout ] ; 41 Santa Fe +[542:Socorro Vaqueros ] ; 42 White Oaks Run by Pete Stewart ||| +[543:The Seven Rivers Gang hideout ] ; 43 Lincoln City +[544:The Dona Ana Bunch hideout ] ; 44 Mesilla +[545:The Jesse Evans gang hideout ] ; 45 Roswell +[546:The fugitives' hideout ] ; 46 El Paso +[547:The regulators' hideout ] ; 47 ; Los Portales, NE of Fort Sumner. ||| +[548:a prospector ] ; 48 + +;|||[598:Billy ] +;|||[599:Pat ] +; Menu messages start at 600... +; general message ranges: +; MM+1..MM+49: involve spending money +; MM+50..MM+99: are the menu options themselves +; MM+100..MM+149: involve chaining to a new overlay + +; menu options involving spending money... +[601:BUY ROUND OF DRINKS ($5) `] +[602:GO UPSTAIRS WITH THE GIRL ($25) `] +[603:OFFER A BRIBE ($15) `] +[604:GIVE $20 `] +; drinks on offer at bar... +[605:NOTHING `] +[606:RED-EYE ($1) `] +[607:BEER ($1) `] + +; menu options not involving spending money... +[650:LEAVE TOWN. `] +[651:DO NOTHING. `] ; menu option +[652:GO THERE. `] ; menu option +;; [653:think about it. `] ; menu option ****** +[654:YES. `] +[655:NO. `] +[656:RAISE HELL. `] ; option in bar ||| +[657:Yeehaa... ] ; response to 656. ||| + +;[656:ROB THE TRAIN. `] ; option when click on train. +;[657:meet the wagon train. `] ; option when click on wagons +;[658:go visit the Apaches. `] ; option when click on apache ; +;settlement. +; standard menu for talking to people. +[659:GREET. `] ; ||| HULLO. `] +[660:TALK. `] +[661:THREATEN. `] +[662:MOVE ON. `] +; menu for when challenged to a duel... +[663:ACCEPT. `] +[664:BACK DOWN. `] ; try to pacify person. +[665:ROB THE BANK. `] +[666:STEAL COWS. `] +[667:TAKE COWS TO APACHES. `] + +; SYSTEM menu options... +[668:SAVE GAME `] ;||| +[669:RESTORE `] ;||| +[670:RESTART `] ;||| + +[671:English `] ; menu option +[672:Deutsch `] ; menu option +[673:Fran‡ais `] ; menu option + + +;600+100..129: arcades overlay games +;600+130..159: intermission overlay games +;600+160..189: scrolling overlay games +;[700:rode off to intercept the train. ] +;[701:rode off to the ranch... ] +;[702:rode off to the ranch... ] +;[703:rode off to the ranch... ] +;[704:rode off to the ranch... ] +;[705:rode off to the ranch... ] +;[706:rode off to the ranch... ] + +;[730:rode off to meet the wagon train. ] +;[731:rode off to visit the Apache settlement. ] + +[760:set off to steal the steers. ] +[761:Get behind them longhorns +and drive 'em south. Press fire to switch between the +members of your gang. ] ; rustling game. œœœinstructions added. +[762:track the gang southwards. Press fire when near a clue +to see what it means. Don't take too long! ] ;œœœadded. +[763:when the bell goes, push forwards to draw, and then steer +the gunsight onto the other guy. Press FIRE to shoot him. ] ;œœœ +;[761:set off to hunt down the gang. ] ; tracking game +;[762:escaped from the bank. ] ; Billy bank escape +;[763:set off to ambush Billy. ] ; prevent Bank robbery game. +[764:set off to take the cows to the Indians. ] ;|||| +[765:Press fire and down to duck, fire and up to raise your +head above the barricade. Shoot as many of the bad guys as +you can. You can't shoot or be shot so long as you keep your +head down. ] ;œœœ +[766:Press right//left to move sticks of dynamite, and press +FIRE to light the fuse. But how many do you need? ] ;œœœ + +; responses... +;[851:rode off. Press fire. ] ; result of 652 +;[852:had finally come to a decision, and rode into town. ] +;; result of 652 under other circumstances (***debugging) +[853:called for drinks on the house. That sure made him popular. ] +[854:went upstairs with the saloon girl... ] +[855:offered the bribe. ] +[856:handed over some money. ] +[857:Billy headed back to the hideout to round up the gang, +and burst into the bank in force... ] +[858:Billy started to draw his gun, but realised that without +a gang to back him up he hadn't a hope. ] ;||| try to rob bank +; without having contacted a gang first. +[859:Billy started to ride off, but realised that without +a gang free to back him up he hadn't a hope. ] ;||| try to rob train +; without having contacted a gang first. + + +; invitation to train robbery (less common, so one only)... +[867:"There's gonna be a whole heap of gold on that train tomorrow. +Why, if a body had a mind to, he could catch it real easy at the +gradient". ] ; œœœ punc +[868:the safe contained ] ; followed by amount of gold, 869. +[869: dollars in gold. ] +[870:"We've been robbed by Billy The Kid - so don't ask to make +a big withdrawal! "] +; when Billy goes into a bank he's recently robbed. +[871:"We've been robbed. I hope you've come to make a deposit". ] ; œœœ punc +; when Billy goes into a bank another gang has recently robbed + +; GENERAL MESSAGES ||| +[872:owned $] ;preceded by PlayersName, followed by amount, 873 ||| +[873:. ] ; after 872/amount. ||| +[874:A voice called out "Get outa here - we're closed!" ] ;||| +; try to go into buildings which are just scenery. +[875:Billy decided not to go into the Sheriffs office, just +to be on the safe side. ] ; ||| +[876:"You deaf or something, boy?" ] ; œœœ ask same person a second +; question ; œœœ punc +[877:"I said, YOU DEAF OR SOMETHING, BOY?" ] ; œœœ ask same person a second +; question ; œœœ punc +[878:"Can't stand around jawing all day. Be seeing ya". ] ;œœœ ; œœœ punc + + + + + + +; Saloon bits and pieces... +[899:"Prepare to draw, varmit". ] ;||| challenged to duel whilst outside. ; œœœ punc +[900:"I hear you play Monte. D'you want to deal?" ] ; œœœ reworded +[901:"Some other time, pard." ] ; refuse to play monte. ; œœœ punc +[902:Accuse the varmit of cheating. ] ; Monte +[903:Forget it. ] ; After Monte game +[904:"I'll meet you on the street". ] ; what Billy says if he decides +; to fight the duel. +[905:"OK, Yellabelly. Just crawl outa here fast, or I'll plug you". ] ; œœœ punc +; climb down instead of fighting duel. +[906:"Yeh, well... I guess I'll help ya... ] ;|||trailing quote removed +; threaten, agrees to give info. ; œœœ punc +[907:"Gee, I'd surely like to help ya, but I don't know nuthin'!" ] ; œœœ punc +; threaten, but doesn't know anything. +[908:"You trying to push me around, you saddle bum? Let's settle this +right now, gun-to-gun". ] ; |||no longer mentions outside ; œœœ punc +[909:"What'll it be, friend?" ] ; barman offers drinks ; œœœ punc +[910:"Wanna place a bet, friend?" ] ; roulette ; œœœ punc +[911:put his money on the table. The wheel span, and as it stopped +the ball sprang sideways into 00. That table surely was crooked! ] +[912:Accuse the croupier of cheating. ] ; roulette table. +[913:Forget it. ] ; roulette table. +;|||[914:I'll see you outside. ] ; what Billy says if he decides +;; to challenge +[915:"I'm ] ; then player's full name +[916:", the reply came back: "I'm ] ; name chosen from 1000... +[917:". ] ; after 916, name. +[918:"Nobody tells me nuthin'." ] ; unthreatened, just knows nothing +[919:"I ain't telling you nuthin' about anythin', bud!" ] ; refuses +; to tell Player, in response to "talk" option on menu + +; MESSAGES FOR FIRST MEETING VARIOUS TYPE OF PEOPLE... +; a group of 10 messages from a cowardly person... +; a group of 10 messages from a greedy person... +; a group of 10 messages from anyone else... +; +; cowardly meeting... +[920:"Why, hello stranger". ] ; œœœ punc +[921:"Well, howdy mister". ] ; œœœ punc +[922:"Welcome, stranger". ] ; œœœ punc +[923:"Er, greetings stranger". ] ; œœœ punc +[924:"Er, howdoo young fella". ] ; œœœ punc +[925:"Er, hello pardner". ] ; œœœ punc +[926:"Er, howdoo stranger". ] ; œœœ punc +[927:"Er, good day to you, pardner". ] ; œœœ punc +[928:"Er, howdoo stranger". ] ; œœœ punc +[929:"Er, hello young Sir". ] ; œœœ punc + +; greedy meeting... +[930:"Hello stranger". ] ; œœœ punc +[931:"Howdoo stranger". ] ; œœœ punc +[932:"Hi there, stranger". ] ; œœœ punc +[933:"Good day, pardner". ] ; œœœ punc +[934:"Hello stranger". ] ; œœœ punc +[935:"Hello friend. You new around here?" ] ; œœœ punc +[936:"Hello there, boy. You want anything from me?" ] ; œœœ punc +[937:"Greetings stranger. You wanting something?" ] ; œœœ punc +[938:"Hello stranger. Can I help you some?" ] ; œœœ punc +[939:"Howdy pardner. You needing some help?" ] ; œœœ punc +; +; normal, well-balanced people... +[940:"Hello pardner". ] ; œœœ punc +[941:"Howdoo stranger". ] ; œœœ punc +[942:"Hi stranger". ] ; œœœ punc +[943:"Greetings stranger". ] ; œœœ punc +[944:"Howdoo stranger". ] ; œœœ punc +[945:"Hello pardner". ] ; œœœ punc +[946:"Howdy stranger". ] ; œœœ punc +[947:"Goodday stranger". ] ; œœœ punc +[948:"Howdoo friend". ] ; œœœ punc +[949:"Hello stranger". ] ; œœœ punc + +[950:"Howdy Pat". ] ; œœœ punc +[951:"Howdy Billy". ] ; meet someone again. ; œœœ punc +[952:Sheriff Pat Garrett`] ;œœœ last bit moved to 975ish + +[953:Billy The Kid`] ; copy of message 2||| MENU OPTION +[954:Who do you want to play?` `(Press FIRE or SPACE). ] ; |||opening question. œœœ reworded +[955:Pat, you must track down and capture all the outlaw gangs. Talk +to people for information. And when in a sheriffs office, check your +deputies are where they're wanted.` `(Press FIRE or SPACE). ] ;||| œœœ reworded +[956:Billy, you must try to bankrupt the Murphy-Dolan gang. Rob +their banks and steal their cows. Talk to people for information. +And try to steer clear of the law.` `(Press FIRE or SPACE). ] +;||| œœœ reworded +[957:"Oh, it's you again". ] ; ||| meet someone again that you +; haven't been introduced to. ; œœœ punc +[958:"Clear off buster, I don't associate with your kind". ] ;||| +; meet someone again who we didn't get on with last time! + + +;[951:"I don't deal with your kind, lawman". ] ; Pat tries to talk to +;; someone he is very unpopular with. +;[952:"I don't have nothing to do with outlaws". ] +; likewise Billy. +; +;[953:"What can I do for you, stranger. ] ; either player +;; talks to someone for the first time, when they are not +;; very well known (i.e. at the start of the game). + +;[954:Ain't you Billy the Kid? Anything I can do to oblige you? ] +;; meet's someone for the first time when better known +;[955:well, if it isn't Sheriff Garrett. What can I do for you, sir? ] +;; meet's someone for the first time when better known + +;; meet someone who is inclined towards/neutral towards player + + +[960:] ; header for 960..990 messages. |||quote removed +[961:." ] ; terminator for 960..990 messages. +[962:I hear ] ; always followed by gang name. +[963:just robbed the bank in ] ; followed by town name +[964:just rustled some cows from ] ; followed by ranch name +[965:hideout is right near ] ; preceded by gang name, followed by town +; name. +[966:Folks tell me there's a pile of money at the bank in ] +;|||moved to 972. [967:I hear say there are x deputies stationed at ] +[968:"There's a widow woman over at ] ; œœœ punc +[969:who needs help". ] ; œœœ punc +[970:"I'm being run off my land by Murphy. I need help!" ] ; œœœ punc +[971:"That gunslinger over there is threatening me and my folks. +Kill him, won't ya?" ] ; œœœ punc +[972:there are ] ; followed by number, 973||| +[973: deputies stationed at ] ; after 972/number, before town name.||| +[974:2-PLAYER GAME (Use UP//DOWN to select, +then press FIRE or SPACE). ] ; œœœcopy of message 1||| MENU OPTION AT START OF GAME +[975:Trying serial connection. ];^^^ (press FIRE to give up). ] ;œœœ œœœ punc + + + +; 1000+Location number for various places that people can +; mention things happening. Events can include train + +; contents, contents of banks, number of deputies in +; various towns, gang locations, recent robberies, +; subplot hints: e.g. Widow women needing help(!) +[1010:Santa Fe. ] ; Santa Fe 10 +[1011:White Oaks. ] ; Albe'que 11 +[1012:Lincoln City. ] ; Lincoln City 12 +[1013:Mesilla. ] ; Las Cruces 13 +[1014:Roswell. ] ; Roswell 14 +[1015:El Paso. ] ; 15 + +[1039:the express train. ] ; 39 +[1040:the wagon train. ] ; 40 + +; messages where someone tells one of the players +; about various robberies, train/bank, that are +; planned during the next little while. +[1041:the Cooper Gang] ; 41 Santa Fe ; œœœ punc +[1042:Socorro Vaqueros] ; 42 White Oaks ||| ; œœœ punc +[1043:the Seven Rivers Gang] ; 43 Lincoln City ; œœœ punc +[1044:the Dona Ana Bunch] ; 44 Mesilla ; œœœ punc +[1045:the Jesse Evans gang] ; 45 Roswell ; œœœ punc +[1046:the fugitives] ; 46 El Paso ; œœœ punc +[1047:the Regulators] ; 47 Near Fort Sumner ||| ; œœœ punc +; +; names for white American Males (young/old)... +; other possible formula names are... +; ... the rat + +[1100:honest Jake] ; œœœ punc +[1101:cookhouse Charlie] ; œœœ punc +[1102:Jericho Jake] ; œœœ punc +[1103:little Joe] ; œœœ punc +[1104:Black Jake] ; œœœ punc +[1105:Trapper John] ; œœœ punc +[1106:Prairie John] ; œœœ punc +[1107:long tall John] ; œœœ punc +[1108:Johnny Reb] ; œœœ punc +[1109:Omaha John] ; œœœ punc + +[1110:Sam Peckinpaw] ; œœœ punc +; ** also name on a grave in Fistful of Dollars ** +[1111:Cornish Sam] ; œœœ punc +[1112:snake-eyes Sam] ; œœœ punc +[1113:Yosemite Sam] ; œœœ punc +[1114:slippery Sam] ; œœœ punc +[1115:Ledger Bill] ; œœœ punc +[1116:Arkansas Will] ; œœœ punc +[1117:Hotel Bill] ; œœœ punc +[1118:Bronco Bill] ; œœœ punc +[1119:Tom Destry] ; œœœ punc +; ** as in Destry Rides Again + +[1120:Rowdy Yates] ; œœœ punc +; ** Clint Eastwood's role in Rawhide + +[1121:mad Mike] ; œœœ punc +[1122:Texas Mike] ; œœœ punc +[1123:mustang Mike] ; œœœ punc +[1124:Howard Johnson] ; œœœ punc +; ** as in Blazing Saddles +[1125:mule-skinner Jim] ; œœœ punc +[1126:Louis L'Amour] ; œœœ punc +; ** Western novelist +[1127:cool-hand Jim] ; œœœ punc +[1128:the Swede] ; œœœ punc +[1129:Bernardo O'Riley] ; œœœ punc +; ** Bronson's role in the Magnificent Seven +; +[1130:Slim Pickins] ; œœœ punc +[1131:Mexico Pete] ; œœœ punc +[1132:Two-gun Pete] ; œœœ punc +[1133:Billy-Joe Bob] ; œœœ punc +; ** character in Fresno +[1134:Teacher Pete] ; œœœ punc +[1135:Red River Nick] ; œœœ punc +[1136:Nebraska Nick] ; œœœ punc +[1137:tricky Nick] ; œœœ punc +[1138:lucky Luke] ; œœœ punc +; ** Goscinny & Uderzo hero +[1139:Navaho Nick] ; œœœ punc +; +[1140:honest Dave] ; œœœ punc +[1141:dead-eye Dick] ; œœœ punc +[1142:Kansas Dave] ; œœœ punc +[1143:dainty Dave] ; œœœ punc +[1144:dynamite Dave] ; œœœ punc +[1145:red-eye Bert] ; œœœ punc +[1146:bull-whip Bert] ; œœœ punc +[1147:slick Bert] ; œœœ punc +[1148:Frenchie Dupont] ; œœœ punc +[1149:Duke Wayne] ; œœœ punc +; ** John Wayne nicknamed Duke +; + +; new names for extra subplots... +[1160:Whiskey Pete] ;||| ; œœœ punc +[1161:Joe Dunn] ;||| ; œœœ punc +[1162:Joe Grant] ;||| ; œœœ punc +[1163:Karl Bekkert] ;||| ; œœœ punc +[1164:Jack Shoe] ;||| ; œœœ punc +[1165:Ben Davis] ;||| ; œœœ punc +[1166:Warren Oaks] ;||| ; œœœ punc +[1167:Wayne Rodgers] ;||| ; œœœ punc +[1168:Ash Upton] ;||| ; œœœ punc +[1169:Chief How] ;********* at Mescalero Apache ;||| +[1170:Rick Sands] ;||| ; œœœ punc +[1171:Rick "Two Fingers" Rider] ;||| œœœ ; œœœ punc +; +; names for American Females... +; call girls (10)... +[1200:Honey Bun] ; œœœ punc +[1201:Sarah Jane] ; œœœ punc +[1202:Fast Sally] ; œœœ punc +[1203:Long tall Kerri] ; œœœ punc +[1204:Saucy Miss Cockwell] ; original wording at Kerri's request! +[1205:Sweet Charity] ; œœœ punc +[1206:li'l Mabel] ; œœœ punc +[1207:Nice Nelly] ; American slang for excessive propriety +[1208:Annabel Lee] ; œœœ punc +[1209:Dizzy Lizzie] ; œœœ punc +; + +[1210:Laura Picket] ;||| ; œœœ punc +[1211:Wilma Dunn] ;||| ; œœœ punc +[1212:Miss Rosy] ;||| ; œœœ punc +[1213:Lavinia Strumpet] ;||| ; œœœ punc +[1214:Mrs McSween] ;||| ; œœœ punc +[1215:Paulita Maxwell] ; Billy/Pat's girlfriend. +;------------ +; subplot messages + +[1490:Barney Mason rode up and said, "] +[1491:Pat, it's the end of the month, and the wages just arrived. +We've doling them out now, but you can change the budget for +next month if you like. Just come into the sheriff's office in +Lincoln and see how we're spending the money". ] ;œœœ + + +; Mexican peasant going to be run off his land by Anglo ranchers +[1500:"The Greengo ranchers, they try to drive me off my farm! Help me +fight them!" ] +[1501:"May the Blessed Virgin bring a thousand curses upon you". ] ; no to 1500 + +; lady in saloon being pestered by notorious gunslinger +[1503:"There's a gunslinger over there who don't know how to treat +a lady right. Teach him a lesson, Big Boy and I could show you +a good time". ] ;œœœ reworded from... ; œœœ punc +;; "This gunslinger don't know how to treat a lady right. Will you teach him +;; a lesson, Big Boy?" ] + +[1504:the lady looked disappointed. ] ; no to 1503 + + + + + + + + + + + + + +; Mexican picked on by cowboys... +[1506:"These cowboys, they picking on me. You make them stop, Senor?" ] +[1507:The Mexican looked disappointed. ] ; no to 1506 +[1508:The cowboys walked off, saying, "We're gonna get you for this" ] +; yes to 1506 ; œœœ punc + +; sick man in desert... +[1509:"Help me - my horse is dead, I'm out of water and plumb near dead". ] +;|||mentions reason for being in trouble. ; œœœ punc + +[1510:The man collapsed in despair. ] ; no to 1509 +;|||1511 moved to 1700 ; œœœ punc + + +; army being cheated by MD's subplot +[1511:"Howdoo pardner. I'm Ash Upton. How can I be of service?" ] ;||| Store +; in Lincoln ; œœœ punc +; Soldier at Fort Sumner - army are being cheated by Murphy- +; Dolan's +[1512:"The army are being cheated by the Murphy-Dolans on the meat +contract". ] ; œœœ punc +[1513:"What the heck brung you here? Draw, you son of a bitch". ] ; œœœ punc +; Billy goes into store whilst MDs present +[1514:"Get out of here, lawman. You ain't welcome". ] ; ; œœœ punc +; Pat goes into store whilst MDs present. +[1515:hunted through some papers and came up with the real account +books for the Murphy-Dolans. Now to show them to Colonel Baxter... ] +; pat/billy goes into the MD store whilst they're away. +[1516:showed the books to Colonel Baxter. He was livid and vowed to +prosecute the Murphy-Dolan's with the full force of the law. ] +; go to Fort Sumner with books. +[1517:"I can't go to the Colonel until I got proof - maybe you could +get hold of their books from the store in Lincoln?" ] +[1518:SEARCH FOR BOOKS. `] ; menu option in MD store +;;||| [1519:found the books and hid them in his jacket. ] ; find books in store +[1519:The store was deserted. ] ;||| go there when MD's / Ash not there + +; Pat is about to defeat a gang in a shootout, +; their leader calls a truce and barters their escape +[1520:The gang leader waved a white flag and called out: ] ; +; followed by one of 1521..1523 +[1521:"Pat - let us go and we'll tell you when Billy's planning the +next robbery". ] +[1522:"Pat - let us go and we'll leave the territory". ] +[1523:"Pat - let us go and we'll tell you where there is a stash of +gold buried". ] +; and responses to 1521..1523 if Pat accepts the offer... +[1524:"Thanks Pat - we'll be seeing you". They rode off. ] ; œœœ punc +[1525:"Buenos dias Senor. Now we head for Mexico". ] ; œœœ punc +[1526:"It's on the east side of the Pecos, at a deserted prospector's +camp". They rode off. ] +[1527:"Then we fight to the death". ] ; œœœ punc + +; Pat meets Texan posse in desert. Player can choose to +; lie that Billy has stolen Texan cattle. +[1529:Pat met a Texan posse looking for rustlers. What did he tell +them about Billy? ] ; intro message +[1530:HE STEALS TEXAN CATTLE `] ; menu option|||upper case +[1531:HE IS AN OUTLAW `] ; menu options - keep short. |||upper case +[1532:the posse offered to ride along as deputies, for the time +being. ] ; Pat lies about Billy stealing Texan cattle + + +[1533:The posse wished Pat good luck, and were right sorry +they couldn't help. ] ; Pat says Billy is an outlaw only. +[1534:Barney Mason rode up and said, "Pat, another man from that Texan +posse had to high-tail it outa town. You'd better get into +town and check the budget". ] ; |||now mentions Barney Mason, budget + +; Barney Mason reports the escape of an outlaw +; from Santa Fe - Pat can track him unaided for a reward. +[1535:Barney Mason rode up. "Pat - an outlaw's just busted out from +Santa Fe. Ride with me now, and I'll put you on his trail. "] +[1536:Barney rode off. ] ; no to 1535 +[1537:Barney lead Pat at a gallop to the head of a winding valley, +then left him to track the fugitive on his own. ] ; yes to 1535 +[1538:Pat took the outlaw in and claimed the $100 reward. ] +; get the outlaw. + + +; shootout message groups: intro/win/lose 1540..1569 +[1540:"Hurry! We must fight them!" ] ; yes to 1500 +[1541:"Muchos gracias, Senor. Now my farm is safe". ] ; œœœ punc +[1542:The peasant had been hit by a bullet. He died without saying a +word. ] ; œœœ punc + + + + +; duel message groups: intro/win/lose 1570..1599 + +; gunslinger bothering lady (1503) +[1570:The gunslinger slowly turned around and started to head for the +door... ] ; yes to 1503 +[1571:The gunslinger slumped to the floor... ] +[1572:the bullet struck home, bringing merciful blackness. ] +; invitations to duel in saloon + +[1573:"So you're the guy that drilled my +kid brother in the back, Mister Big Shot. Wanna settle this +outside?" ] ;||| Warren Oaks +[1574:"They say you're pretty fancy with +that six-gun of yours, Mister. But I reckon you ain't. Wanna take +me on outside?" ] ;||| Wayne Rodgers +[1575:"I seeze you undressin' my Mary-Jane +with your eyes, buster! Wanna settle this like a Man?" ] ;||| Karl Bekkert + + +; +; Pat is accosted by a local mayor with request for more protection +[1600:a pompous mayor walked up and shouted, "Sheriff Garrett, +this town's gotta have more protection. I want at least one more +deputy here before you leave us.] ;||| now mentions appearance ; œœœ punc +[1601:"OK, I guess that'll have to do". ] ; œœœ punc +[1602:"The people of this town ain't gonna be happy about this". ] ; œœœ punc + +; The same mayor asks Pat to run a vagrant out of town +; to enforce a bogus claim against the prospector (?) +[1605:A pompous mayor walked up and shouted, "Sheriff Garrett, there's +a vagrant I want run outa town. The varmit says he owns a claim +that one of my friends has a mind to". ] ; œœœ punc +[1606:Pat helped the mayor, and drove the vagrant out of town. But he +surely didn't feel good about doing it. ] +[1607:Pat refused, saying that even a vagrant has his rights. ] + +; Pat encounters an outlaw whilst tracking +; ++ In scrolling game ++ + +; At Siege, Carlyle runs in. +; ++ In arcades game ++ + +; Pat meets outlaw gang in an old Building. +; ++ In arcades game ++ + + + + + + + + + + + + + +; Billy Only encounters... +[1610:"Paleface, we greet you. Beef promised us by treaty, +Murphy-Dolans send us scraps. My people starve". ] ;|||no longer mentions Billy +; comment from Indian chief. +[1611:do you want to try to take these cows to the Indian Reservation? ] ; +; when double-click on Longhorns, after seeing 1610. +;[1612:the Indian chief rode up: "How, red man's friend?". He thanked +;Billy for the beef and offered to fake an uprising, if needed, to +;distract Pat in the future. ] ; +++ Moved to scrolling games |||| +[1613:FAKE UPRISING. `] ; extra MENU option. +[1614:"Yes paleface, for you we make lawman think we on warpath". ] ; œœœ punc + ;^^^ Billy->paleface + +; meet Widow Woman who wants ALL BILLY'S MONEY (quel surprise) +[1620:"Oh Sir, I'm jest a poor widow woman. If I can't pay the bank, +I'll be thrown off my little farm and have to go a-begging in the +streets. It ain't no more than $1000] ; followed by amount of gold +[1621:; that surely ain't nothing to a rich man like you". ] +[1622:"O thank you sir. I'll always be a-thinking on you". ] +; yes to 1620 +[1623:"O no! My last hope is gone - I'll be in the poorhouse till the +end of my days". ] ; no to 1620 + +; Desert peasant meets Billy and entices him to his house +; with story that family is sick. While Billy stays there, +; an outlaw arrives wit news of a gold consignment at +; the local bank, but it's a bluff - if Billy leaves to +; travel there, he gets challenged in the street by a bounty +; hunter. (Note: there may or may not be gold in then bank) +[1630:A peasant rode up: "Senor Billy, my family are sick. I no can +make them better. Please, you come try and help them". ] +[1631:he rode off with the peasant and stayed at his farmhouse; +fetching and boiling water and cooking for the family. +After a few days, they were recovering and was +about to leave when there come a knocking at the door... ] +; yes to 1630 (|This is Followed by 1633) +[1632:"Oh pity me, my family will surely die". ] ; no to 1630 +; 1633 moved to 1701||| +[1634:a bounty hunter was lying in wait. "Gotcha! you dumb +saddlebum - you've been set up! I'm gonna take you in, +dead or alive! Draw! ] +; meet Bounty hunter in town, after 1630/1631/1633 + + + + +; ambush by Buckshot Roberts +[1640:As he rode near a farmhouse, a huge man stepped out from +behind a rock: "There's folks as wants to talk to ya. I'm takin' you +in. The name's Roberts - +Buckshot Roberts. I'm a bounty hunter - an' I've taken in fifty scum +like you already, and you're gonna make it fifty-one. ] +;||| removed: You coming quiet? ] + +;|||moved to arcades.[1641:although Buckshot Roberts must have stopped half a dozen +;|||bullets, he still found strength to climb onto a horse and ride off. ] + + + + + + + + + + + + +; win gunfight +++ Move to arcades? + + +; Seven Rivers gang ambushes Billy/Pat in town. +[1645:Suddenly shots started to ring out. He dove for cover. On the +other side of the street, gunslingers hired by the Murphy-Dolan gang were +shooting at him! ] ; |||no longer mentions Billy ^^^now murphy-dolan, +; not seven-rivers + +; Jesse Evans gang ambushes Billy in town. +[1646:Suddenly the air rang to the crack of gunshot. He leapt for +cover. Across the street, he could see some badmen +throwing lead at him! ] ;|||no longer mentions Billy ^^^no longer +; mentions Jesse Evans Gang + +; Tom Cooper offers Billy lots of counterfeit money +; instead of his share in a robbery. +[1650:Tom Cooper said, "Billy, how'd you like 5 times your share of +this robbery - in counterfeit bills. There's a tenderfoot called +Duncan, spreading it around. It's a good looking paper. Won't give you +no problems if you spend it careful. What d'you say". ] +[1651:Cooper smiled: "Say, that's great. Here's the sack of money". +Billy pondered on it. How could he use it most easily? ] +[1652:BUY CATTLE WITH IT. `] ; menu option after 1651 +[1653:SPEND IT NORMALLY. `] ; menu option after 1651 +[1654:Cooper counted out Billy's share and rode off. ] ; no to 1650 + +; when Billy is in Lincoln City Saloon, he overhears that Sheriff +; Brady is on his way to ambush McSween. +[1660:he heard something that made him prick up his ears."You +know that no-good sheriff Brady's gonna run Mrs McSween off her ranch. +Ain't that the devil! But what can we do?" ] +[1661:Good Mrs McSween! An old friend, and a friend of the late +lamented Tunstall! One of the last alive to stand against the Murphy- +Dolans! What now? ] ; after 1660 ;œœœ no longer mentions Billy +[1662:DO NOTHING. `] ; menu option. +[1663:STOP BRADY. ] ; menu option. ->1664 + +[1664:he ran from the saloon and found Brady heading out of town. +He caught up with him and pulled him from his horse. Brady got up, +shaking with anger. It was obvious he was going to draw. ] +; stop brady from 1663 + +; Jose Miguel Sedillo, a friend of Billy's from way back, tells +; him of an attempted horse-robbery on Tunstall Ranch, +; while this is being run by Mrs McSween. +[1670:Jose Miguel Sedillo - an old and +trusted friend - rode up. "You must go help Mrs McSween - the +Murphy-Dolan's are there right now. They try to steal her cattle".] +;||| wording changed to make non-Billy specific + +; do nothing or... +[1671:GO THERE. `] +[1672:they rode off and got ready to fight... ] ; selects 1671: +;goes into shootout. + +; meet Joe Grant,. drunk in a saloon. + + + + + + + + + + + + + +[1674:Joe Grant staggered out of a back room, plainly drunk. "Hey Kid! +You know I'm the fastest gun in the West now. Lookee here at this +pearl-handled pistol I just - er - got gived". ] +[1675:He handed over the +pistol. It surely was pretty, but wouldn't be powerful enough to stop +a mosquito. Only three chambers were loaded. What did he do? ] +; nothing or... +[1676:ROTATE THE BARREL TO AN EMPTY CHAMBER. `] ; menu option +[1677:he turned the barrel and handed the gun back. ] +[1678:Joe Grant was waiting outside. He seemed to have gotten sober +real quick. He snarled "Draw, you prairie dog". ] +[1679:he handed the gun back. ] ; don't play with chambers + +[1680:"Beat it, we don't want none of Tunstall's men hereabouts". ] +; Billy meets hostile soldier + +; meet Mrs McSween +[1681:"Why hello old friend - how're you keeping". ] ;|||no longer mentions billy +[1682:"Gotta get going. This place keeps a body busy". ] +; follows 1681 + +; meet prospector +[1683:"What do you want, stranger? You another claim jumper?" ] + +; take sick man to santa fe +[1684:when they arrived with the sick man clinging to the horse, +he said "thanks for the ride Pard" and staggered off. ] |||^^^no longer +; mentions Billy + +; take sick man somewhere other than Santa Fe + +[1685:when they arrived with the sick man clinging to his horse, +the sick man cursed him for not going to Santa Fe and +staggered off on his own. ] ||| + +[1686:"Sheriff, can you come back later. We're real busy right now". ] +; Pat meets hostile soldier/rancher. ||| copied, slightly changed from 1680 + + + +; messages which result in player being thrown back to map... 1700..1729 +[1700:the man struggled onto the horse, and clung on weakly. He +gasped "Take me to Santa Fe, Mister. I got folks there". ] ; |||now mentions Santa Fe. +; yes to 1509 +; if visit Santa Fe next, get 1684, otherwise get 1685. +[1701:An outlaw burst through the door, brandishing a gun! He saw +Billy and dropped it in terror. "Billy the Kid! Don't kill me please, +I didn't mean ya no harm. Look, I'll help ya. The bank at White Oaks +just had a big payroll for a ranch thereabouts. Git +down there now, ya can pick up a whole load of money". ] ; follows +; 1631 ;||| moved from 1633 + + + +; Pat's strategy game messages... +; Go into sheriff's office... +;|||[1800:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||can I do for you?" ] +;|||[1801:move deputy to reserve. `] ; take deputy away from town +;|||[1802:move deputy to town. `] ; station deputy in this town. +;|||[1803:ok. ] +;|||[1804:there are ] ; followed by number of deputies +;|||[1805: deputies in town. ] ; follows 1804/digit +;|||[1806: deputies in reserve. ] ; follows 1804/digit +;|||[1807:Pat got a reward of ] ; followed by number: amount of dollars +;|||[1808: dollars. ] ; follows number. +;|||[1809:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||are you going to do to calm down the people in this here town?" ] +; people are upset about level of crime. +[1810:"the people sure are not gonna be happy about this." ] +[1811:And so the west was won. Pat had brought Law to +his domain, and was respected throughout the land. ] ; win message +[1812:And so Pat died in obscurity - known only by a few +historians who read dusty books about the Wild West. ] ; lose message + +[1813:Barney Mason rode up: "Pat, the county has run out of money. +I took temporary charge while you were away, but I had to fire +some deputies. You'd better get into town real quick and sort +it out". He rode off again. ] ; ||| +[1814:Barney Mason rode up: "Pat, there's trouble brewing. +People are saying you're doing no good as sheriff. You'd +better get into the office and do something". ] ;||| +[1815:Barney Mason rode up: "Pat, you finally got it wrong. You've +lost the election. Sorry old friend, you're no longer Sheriff". ] ; ||| + +;Billy strategy messages + +[1850:And so Billy became a legend. His reputation was known +throughout the world, and his story was oft repeated +by people of all countries. ] ; win message +[1851:And so Billy died in obscurity - known only by a few +historians who read dusty books about the wild west. ] ; lose message + +[1852:WANTED! Billy The Kid, Dead or Alive. Reward $]|||| +[1853:. ] ; after 1852/number||| +[1854:was stopped on the way. He pulled up his horse +and dismounted... ] ; Actors name, 1854. Used when +; get a random event whilst trying to go somewhere from map. |||| +; messages to do with meeting a gang... + +[1855:"Hey Billy, come share some coffee"... ] ;||| then 1856 ; œœœ punc +[1856:Billy sat down with the gang and talked of daring deeds +and famous crimes. Then he asked the crucial question... +"I've got a real sweet job planned. You want in?". The gang +looked at Billy. Should they trust this young hotblood? ] ;||| +; 1856, 1857 ||| +[1857:their leader spoke "Sure, but we'll want a good big cut. Now get out of +here before I change my mind". ] ;||| +[1858:Billy and the gang went over and over the targets they +could hit, but they couldn't agree which should be next... ] ; ||| visit gang again +;œœœ made "meaner" + + +; get spotted by a deputy in a lawful town... +[1859:down the street, a deputy called out, "Billy The Kid - hold it +right there. You gonna come quietly?" ] ;||| ; œœœ punc +[1860:RUN AWAY `] ; ||| menu option +[1861:IGNORE HIM `] ; ||| menu option +[1862:Billy fled the town. ] ; run away ||| +[1863:"Go for your gun, outlaw." ] ;||| + +[1864:woke to see his ex-girlfriend Paulita Maxwell tending +his injuries. "You should take more care, my love. Next time +could be your last". With her loving care, he was soon ready to go +again. ] ;&&& note either Billy/Pat. Preceded by Players Name +[1865:Suddenly, Pat Garrett burst in. ] ;&&& +[1866:"Billy, you know I can't +take you in. They'd hang ya like a dog, and I can't stand by and let that +happen. We'll have to settle this now, gun-to-gun. Draw, +outlaw". ] ;&&& +[1867:Billy and Pat approached other and exchanged glances. +Both knew that they were sworn enemies, but also old friends. +Was this to be the end for one of them? ] ;&&& +[1868:CHALLENGE TO DUEL. `] ; menu option &&& +[1869:AVOID CONFLICT. `] ; menu option &&& + + +; messages which occasionally replace the standard greetings +[1870:"Hey, it's Pat Garrett. I hear you polled ] ;||| for Pat ; œœœ punc +[1871:"Hey, it's Billy the Kid. I hear your reward is now $] ; |||| ; œœœ punc +[1872: votes". ] ;||| follows 1870 ; œœœ punc +[1873:". ] ; ||| follows 1871/amount of money ; œœœ punc + +[1880:"Hey, It's Billy The Kid! Get him boys!" ] ; occasionally +; when you go into a bank, or other law-abiding place +; in town. Leads to escape game. ||| +[1881:(lawful) ] ; added to town name on map +[1882:the place was completely deserted. ] ; ||| visit a ranch +; etc. which has gone bust, or similar. + + +; messages Billy gets when gangs go out of business +[1890:Tom O'Foliard rode up and said, "hello old friend, ] ;||| ^^^ +; now now longer mentions Billy + +[1891:the Cooper Gang have been brought to justice". ] ;||| +[1892:the Socorro Vaqueros gang has been brought to justice". ] +[1893:the Seven Rivers Gang gang has been brought to justice". ] +[1894:the Dona Ana Bunch gang has been brought to justice". ] +[1895:the Jesse Evans gang has been brought to justice". ] +[1896:the fugitives' gang has been brought to justice". ] +[1897:the regulators' gang has been brought to justice". ] + +[1900:"Ain't nuthin going on around here". ] ; knows of no ||| +; relevant events in this town. +; Tom O'Foliard's comments on Billy's progress. +[1901:you've gotta hurry up. The Murphy-Dolans are taking over +the county, and you've gotta stop 'em". ] ; œœœ punc +[1902:you've got the Murphy-Dolans on the run. Keep going +ol' buddy". ] ; œœœ punc +[1903:you've almost nailed the Murphy-Dolans, my friend. But +Pat's almost got the territory cleaned up, so you'd better pull +off some pretty big heists to finish 'em off". ] ; œœœ punc +[1904:Billy, you've stolen a total of $] ;^^^Billy added at start (not +; an important change) +[1905: which has bankrupted ] +[1906:of their ranches, but ] +[1907:of the 6 important gangs have been wiped out". ] ; œœœ punc + +; ratings added ^^^^ +[1920:Billy's final reward was $] +[1921: out of a maximum of about $15000, and he will ] ;^^^^ + +[1922:not be remembered. ] +[1923:be a dim memory. ] +[1924:be a figure of fun. ] +[1925:be remembered by many. ] +[1926:be remembered by most. ] +[1927:be a minor hero. ] +[1928:be a popular hero. ] +[1929:be a household name till the end of time. ] + +; ratings added ^^^^ +[1930:Pat's final popularity was ] +[1931: votes out of a maximum of about 4000, and he will ] ;^^^^ + + +;------------------ +;; [2000:Billy The Kid Intro screens. ] +[2001:"Well if it ain't momma's boy Billy! Let's see how good you are +now. Draw, Kid!" ] +[2002:Tunstall Ranch in Lincoln County, across the state line. ] +[2003:"...Murphy and Dolan are dangerous men, Mr Tunstall." ] +[2004:"I ain't gonna let their threats worry me, Sheriff Garrett. I'm +too riled up about the way they're cheating honest farmers." ] +[2005:"Hey now! Here's someone who might be a help. Where've you +been these past years, Billy? John Tunstall, meet the Kid, an old +friend of mine and a good man in a fight." ] +[2006:"I'd like you to join my men, Billy. Here's my lucky Silver +Dollar on account. Keep it safe." ] +[2007:"Pat, Billy, there goes dinner!" ] +[2008:"Another good man dead! I swear I'll bring order to Lincoln +County and hunt down every last outlaw in it." ] +[2009:"You're wrong, Pat, you can't play it by their rules. If you +mean what you said, you'll be hunting me too. Because I vow to do +whatever I must to avenge this murder, inside or outside the law." ] +[2010:"The Legend of Billy The Kid" is an authentic Western for +one or two players. ] +[2011:As Billy, you might tie up your horse on Main Street, +swagger into the saloon, meet an outlaw gang at cards, and go +on to rob the bank... ] +[2012:...or raise money to help a poor widow by rustling a herd +of cows and driving them to Mexico. ] +[2013:As Pat you might learn of a planned train robbery from +the local drunk... ] +[2014:...and lead a posse after the outlaws, track them to their lair, +and shoot it out with the gang. ] + + + + + + + + +-------- + diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/ref/acode.acd b/l9dev/regress/games.l9/billy.l9/st.l9/ref/acode.acd new file mode 100644 index 0000000..caaf7ab Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/st.l9/ref/acode.acd differ diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/ref/gamedata.dat b/l9dev/regress/games.l9/billy.l9/st.l9/ref/gamedata.dat new file mode 100644 index 0000000..48dfe61 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/st.l9/ref/gamedata.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/ref/message.txt b/l9dev/regress/games.l9/billy.l9/st.l9/ref/message.txt new file mode 100644 index 0000000..0e2508e --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/st.l9/ref/message.txt @@ -0,0 +1,1200 @@ +; MESSAGE.TXT +; +; Messages for Billy The Kid Map/Strategy Games +; +; Copyright (C) 1991 Level 9 Computing Ltd. +; +; +; ||| are changes since initial text sent to Ocean for translation +; œœœ are changes since final text sent to Ocean for translation 8 Dec 90 +; (Corrections of obvious spelling and punctuation errors are not +; marked - but additions to punctuations are). +; &&& are additional things +; ^^^ are changes from 1991 onwards. +;l *********** what about copyright message???? +; +[1:Pat ] +[2:Billy ] ; names for "PLAYERSNAME" variable. +[3:`] +[5:%] +[6:% %] +[7:. ] ; dot +[8: ] ; space ; ^^^^ + +[11:Sheriff Pat Garrett ] ; full name for Pat, e.g. for +; when introduced to people. +[12:Billy The Kid ] ; full name for Billy, e.g. for +; when introduced to people. + + + +;||| messages 21..102 moved to other parts of the game... +;[21:Billy spread the map and figured on it a while. He'd gotta +;make a move and he'd gotta make it right... ] +;[22:Billy drove off the herd and started the long drive to Mexico... ] +;[23:Outside, a man shouted, "Come on out with your hands in the air, +;fella. We've gotcha surrounded!" ] +;[24:The Kid was trapped! The law was all over the place, and he hadn't +;got nuthin' but his ol' 6-gun. ] +[25:The plan was perfect. The train'd have to slow when it hit the +incline. And that'd be the chance to catch onto it. ] + +[26:Run alongside, jump over the rocks, then climb up the ladder +and jump onto the fuel wagon. Stop that train! ] ; œœœinstructions +; added. Also "Billy" replaced with "the" + +; +; Duel messages. Both follow Player's name ||| +[101:had won by a whisker. His opponent collapsed to the floor. ] ;^^^ +;It seemed best to hightail it outa there before anyone started +;to ask awkward questions about who fired first. ] ;||| +[102:went down in agony. The last thing he remembered +was friendly hands dragging him onto a horse... ] ;||| + + +; Brawl messages ||| +[300:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew that he would +have to fight his way to the door if he wanted to escape in one +piece. ] ;Billy is on the right. ] ; Billy ||| œœœ(mentions group of thugs) +[301:A group of thugs entered the bar and said, "Hombre, we're +gonna cream you good". He knew he'd +have to fight his way to the door if he wanted to escape in one +piece. You are on the right. ] ; Pat |||œœœ(mentions group of thugs) +[302:"I reckon you jogged ma +elbow and spilled my beer there Mister. Get me another drink, +if you know what's good for you". ] ;||| Ned Parkin +[303:"I don't like +the way you're looking at me, son. Reckon you'd best take +you're liquor elsewhere". ] ;||| Jack Shoe +[304:"We don't like your sort in this bar, Mister. +Maybe you'd better find another place to drink your sasparilla!" ] ;||| Ben Davis +[305:"Hey Mister, some guys other there +were talking about jumping you. You gonna stand there and take +that?" ] ;||| Lavinia Strumpet + + +; invitations to card game in saloon +[320:"They say +you're pretty good with a deck, Mister. But how about a game +with the grown-ups?" ] ;||| Rick Sands +[321:"Sorry Mister, I must have mistaken you for a man!" ] ;||| + +; encounters elsewhere in town, or others +[330:"You look the type who might aid an honest godfearing woman, +Sir. My respectable boarding house has been taken over by ruffians. Can +you drive them off for me?" ] ;||| Laura Picket +[331:"Hey mister. Some drifter friends of +the local Judge have taken over my homestead. You've got an honest +face - can't you help me?" ] ;||| œœœno longer mentions name. +[332:"I guess you think you can strut around this town like you +own the place, Stranger. Well there's only room for one tough +guy in this town. Draw or git!" ] ; Rick "Two Fingers" Rider. ;||| +[333:"Hey mister, they say you're pretty good with those shootin' +irons of yours. Won'cha help me out - some of Murphy's mob have +taken over my claim. Move 'em out and I'll cut you in for a share!" ] ;||| +[334:"Why hello again, dear. I'd love to talk to ya some more, +but I've just gotta wash my hair..." ] ;||| visit girlfriend! œœœpunc + + + +; references to people elsewhere who need help. +[340:"Hey mister, a friend of mine needs help... ] ; before 342..349 ;||| +[341:Might be able to help ya in return, too! ] ; after 342..349 ;||| +[342:It's Whiskey Pete the prospector out at his claim. ] ;||| +[343:Laura Picket at the El Paso hotel has got big trouble. ] ;||| +; ^^^ now at El Paso + +[344:Wilma Dunn out at the Dunn ranch. ] ;||| +[345:Joe Dunn out at his ranch. ] ;||| +[346:lil' ol' Miss Rose, out at her old place. ] ;||| + + + +[360:"Hey mister, someone was looking for you... ] ; before 362..369 +[361:why not get over there and look 'em up?" ] ; after 362..369 +[362:Joe Grant was the name. He was hanging out in the Santa +Fe Saloon. ] +[363:Karl Bekkert was the name. He was hanging out in the Santa Fe +Saloon. ] +[364:Jack Shoe was his name. Saw him in the El Paso Saloon. ] +[365:Ben Davis, I think. Saw him in the Santa Fe Saloon. ] +[366:Warren Oaks, I think. He hangs out in the Mesilla saloon. ] +[367:lil' ol' Miss Rose, out at her old place. ] ;||| +;[367:Wayne Rogers, so I'm told. He hangs out in the +;White Oaks saloon. ] ;||| + + + +; 400+location number is press stories about the most common events +; that happen at places... ||| +[410:Pat Garrett has been made Sheriff of Santa Fe ] +[411:Pat Garrett has been made Sheriff of White Oaks ] +[412:Pat Garrett has been made Sheriff of Lincoln City ] +[413:Pat Garrett has been made Sheriff of Mesilla ] +[414:Pat Garrett has been made Sheriff of Roswell ] +[415:Pat Garrett has been made Sheriff of El Paso ] + +[424:the Bitter Lake Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ +[425:the Fritz Ranch, of the Murphy-Dolan's, has gone broke. ] ;||| œœœ +[426:the Chisum Ranch has gone out of business. ] ;||| œœœ +[427:the Dedrick Ranch, of the Murphy-Dolan's, has closed down. ] ;||| œœœ +[428:the Beckwiths, associates of Murphy and Dolan, have closed their +ranch and left the state. ] ;||| œœœ +[429:the Tunstall Ranch has gone out of business. ] ;||| +[430:the Reed Ranch, of the Murphy-Dolan's, has gone out of +business. ] ;||| œœœ + +[431:only another ] ;œœœ (Followed by number of ranches left, then 432) +[432: of those Murphy-Dolan swine to get. Keep at it, Billy] ;œœœ + +; text for Pat to control deputies etc.;||| +[450:WHERE ARE DEPUTIES `] ;|||menu option ;||| +[451:HIRE DEPUTY `] ; |||menu option +[452:FIRE DEPUTY `] ; |||menu option +[453:deputy ] ; for reporting number +[454:deputies ] +[455:people are ] ; followed by happiness: 456..464 +[456:rioting. ] +[457:very angry. ] +[458:angry. ] +[459:displeased. ] +[460:restless. ] +[461:content. ] +[462:happy. ] +[463:ecstatic. ] +[464:money: $] ;||| +[465:`income next month: $] ;||| +[466:`costs next month: $] ;||| +[467:`(] ; 467, number, 468 || +[468: Texan Deputies working for nothing). ] ||| + +; menu option versions of town names... +[470:Santa Fe `] +[471:White Oaks `] +[472:Lincoln City `] +[473:Mesilla `] +[474:Roswell `] +[475:El Paso `] + + +;||| Full stops removed from messages 500..548 +[501:a herd of longhorns ] ; 0 +[502:a herd of longhorns ] ; 0 +[503:a herd of longhorns ] ; 0 +[504:a herd of longhorns ] ; 0 +[505:a herd of longhorns ] ; 0 + +[510:Santa Fe ] ; dc.w 3345 ; Santa Fe 10 +[511:White Oaks ] ; dc.w 3346 ; Albe'que 11 +[512:Lincoln City ] ; dc.w 3347 ; Lincoln City 12 +[513:Mesilla ] ; dc.w 588 ; Las Cruces 13 +[514:Roswell ] ; dc.w 589 ; Roswell 14 +[515:El Paso ] ; dc.w 0 ; spare town 15 +[516:Frontier Town ] ; dc.w 0 ; spare town 16 +[517:Frontier Town ] ; dc.w 0 ; spare town 17 +[518:Frontier Town ] ; dc.w 0 ; spare town 18 +[519:Fort Stanton ] ; dc.w 3351 ; Fort Stanton 19 +[520:Fort Sumner ] ; dc.w 3352 ; Fort Sumner 20 +[521:A New Fort ] ; dc.w 0 ; spare fort 21 +[522:A New Fort ] ; dc.w 0 ; spare fort 22 +[523:A New Fort ] ; dc.w 0 ; spare fort 23 +[524:Bitter Lake ] ; dc.w 581 ; +[525:the Fritz Ranch ] ; dc.w 582 ; +[526:the Chisum Ranch ] ; dc.w 583 ; +[527:the Dedrick Ranch ] ; dc.w 584 +[528:the Beckwith Ranch ] ; dc.w 585 +[529:the Tunstall Ranch ] ; dc.w 586 ; +[530:the Reed Ranch ] ; dc.w 587 + + + + + + + + + + + + + +; one of these should be Blazer's Mill, nr Mescalero Apache... +; See P.10 design +[531:the Dunn farmhouse ] ; 31 +[532:the Dunn farmhouse ] ; 32 +[533:the Rose homestead ] ; 33 +[534:a farmhouse ] ; 34 + + +[535:Mescalero Apache Reservation ] ; dc.w 3356 ; Mescalero Apache +settlement 35 +[536:Wild Apache Settlement ] ; dc.w 0 ; spare indians 36 +[537:Wild Apache Settlement ] ; dc.w 0 ; spare indians 37 +[538:Wild Apache Settlement ] ; dc.w 0 ; spare indians 38 +[539:the Santa Fe express ] ; 39 +[540:a wagon train ] ; 40 +; outlaw hideout names... +[541:The Cooper Gang hideout ] ; 41 Santa Fe +[542:Socorro Vaqueros ] ; 42 White Oaks Run by Pete Stewart ||| +[543:The Seven Rivers Gang hideout ] ; 43 Lincoln City +[544:The Dona Ana Bunch hideout ] ; 44 Mesilla +[545:The Jesse Evans gang hideout ] ; 45 Roswell +[546:The fugitives' hideout ] ; 46 El Paso +[547:The regulators' hideout ] ; 47 ; Los Portales, NE of Fort Sumner. ||| +[548:a prospector ] ; 48 + +;|||[598:Billy ] +;|||[599:Pat ] +; Menu messages start at 600... +; general message ranges: +; MM+1..MM+49: involve spending money +; MM+50..MM+99: are the menu options themselves +; MM+100..MM+149: involve chaining to a new overlay + +; menu options involving spending money... +[601:BUY ROUND OF DRINKS ($5) `] +[602:GO UPSTAIRS WITH THE GIRL ($25) `] +[603:OFFER A BRIBE ($15) `] +[604:GIVE $20 `] +; drinks on offer at bar... +[605:NOTHING `] +[606:RED-EYE ($1) `] +[607:BEER ($1) `] + +; menu options not involving spending money... +[650:LEAVE TOWN. `] +[651:DO NOTHING. `] ; menu option +[652:GO THERE. `] ; menu option +;; [653:think about it. `] ; menu option ****** +[654:YES. `] +[655:NO. `] +[656:RAISE HELL. `] ; option in bar ||| +[657:Yeehaa... ] ; response to 656. ||| + +;[656:ROB THE TRAIN. `] ; option when click on train. +;[657:meet the wagon train. `] ; option when click on wagons +;[658:go visit the Apaches. `] ; option when click on apache ; +;settlement. +; standard menu for talking to people. +[659:GREET. `] ; ||| HULLO. `] +[660:TALK. `] +[661:THREATEN. `] +[662:MOVE ON. `] +; menu for when challenged to a duel... +[663:ACCEPT. `] +[664:BACK DOWN. `] ; try to pacify person. +[665:ROB THE BANK. `] +[666:STEAL COWS. `] +[667:TAKE COWS TO APACHES. `] + +; SYSTEM menu options... +[668:SAVE GAME `] ;||| +[669:RESTORE `] ;||| +[670:RESTART `] ;||| + +[671:English `] ; menu option +[672:Deutsch `] ; menu option +[673:Fran‡ais `] ; menu option + + +;600+100..129: arcades overlay games +;600+130..159: intermission overlay games +;600+160..189: scrolling overlay games +;[700:rode off to intercept the train. ] +;[701:rode off to the ranch... ] +;[702:rode off to the ranch... ] +;[703:rode off to the ranch... ] +;[704:rode off to the ranch... ] +;[705:rode off to the ranch... ] +;[706:rode off to the ranch... ] + +;[730:rode off to meet the wagon train. ] +;[731:rode off to visit the Apache settlement. ] + +[760:set off to steal the steers. ] +[761:Get behind them longhorns +and drive 'em south. Press fire to switch between the +members of your gang. ] ; rustling game. œœœinstructions added. +[762:track the gang southwards. Press fire when near a clue +to see what it means. Don't take too long! ] ;œœœadded. +[763:when the bell goes, push forwards to draw, and then steer +the gunsight onto the other guy. Press FIRE to shoot him. ] ;œœœ +;[761:set off to hunt down the gang. ] ; tracking game +;[762:escaped from the bank. ] ; Billy bank escape +;[763:set off to ambush Billy. ] ; prevent Bank robbery game. +[764:set off to take the cows to the Indians. ] ;|||| +[765:Press fire and down to duck, fire and up to raise your +head above the barricade. Shoot as many of the bad guys as +you can. You can't shoot or be shot so long as you keep your +head down. ] ;œœœ +[766:Press right//left to move sticks of dynamite, and press +FIRE to light the fuse. But how many do you need? ] ;œœœ + +; responses... +;[851:rode off. Press fire. ] ; result of 652 +;[852:had finally come to a decision, and rode into town. ] +;; result of 652 under other circumstances (***debugging) +[853:called for drinks on the house. That sure made him popular. ] +[854:went upstairs with the saloon girl... ] +[855:offered the bribe. ] +[856:handed over some money. ] +[857:Billy headed back to the hideout to round up the gang, +and burst into the bank in force... ] +[858:Billy started to draw his gun, but realised that without +a gang to back him up he hadn't a hope. ] ;||| try to rob bank +; without having contacted a gang first. +[859:Billy started to ride off, but realised that without +a gang free to back him up he hadn't a hope. ] ;||| try to rob train +; without having contacted a gang first. + + +; invitation to train robbery (less common, so one only)... +[867:"There's gonna be a whole heap of gold on that train tomorrow. +Why, if a body had a mind to, he could catch it real easy at the +gradient". ] ; œœœ punc +[868:the safe contained ] ; followed by amount of gold, 869. +[869: dollars in gold. ] +[870:"We've been robbed by Billy The Kid - so don't ask to make +a big withdrawal! "] +; when Billy goes into a bank he's recently robbed. +[871:"We've been robbed. I hope you've come to make a deposit". ] ; œœœ punc +; when Billy goes into a bank another gang has recently robbed + +; GENERAL MESSAGES ||| +[872:owned $] ;preceded by PlayersName, followed by amount, 873 ||| +[873:. ] ; after 872/amount. ||| +[874:A voice called out "Get outa here - we're closed!" ] ;||| +; try to go into buildings which are just scenery. +[875:Billy decided not to go into the Sheriffs office, just +to be on the safe side. ] ; ||| +[876:"You deaf or something, boy?" ] ; œœœ ask same person a second +; question ; œœœ punc +[877:"I said, YOU DEAF OR SOMETHING, BOY?" ] ; œœœ ask same person a second +; question ; œœœ punc +[878:"Can't stand around jawing all day. Be seeing ya". ] ;œœœ ; œœœ punc + + + + + + +; Saloon bits and pieces... +[899:"Prepare to draw, varmit". ] ;||| challenged to duel whilst outside. ; œœœ punc +[900:"I hear you play Monte. D'you want to deal?" ] ; œœœ reworded +[901:"Some other time, pard." ] ; refuse to play monte. ; œœœ punc +[902:Accuse the varmit of cheating. ] ; Monte +[903:Forget it. ] ; After Monte game +[904:"I'll meet you on the street". ] ; what Billy says if he decides +; to fight the duel. +[905:"OK, Yellabelly. Just crawl outa here fast, or I'll plug you". ] ; œœœ punc +; climb down instead of fighting duel. +[906:"Yeh, well... I guess I'll help ya... ] ;|||trailing quote removed +; threaten, agrees to give info. ; œœœ punc +[907:"Gee, I'd surely like to help ya, but I don't know nuthin'!" ] ; œœœ punc +; threaten, but doesn't know anything. +[908:"You trying to push me around, you saddle bum? Let's settle this +right now, gun-to-gun". ] ; |||no longer mentions outside ; œœœ punc +[909:"What'll it be, friend?" ] ; barman offers drinks ; œœœ punc +[910:"Wanna place a bet, friend?" ] ; roulette ; œœœ punc +[911:put his money on the table. The wheel span, and as it stopped +the ball sprang sideways into 00. That table surely was crooked! ] +[912:Accuse the croupier of cheating. ] ; roulette table. +[913:Forget it. ] ; roulette table. +;|||[914:I'll see you outside. ] ; what Billy says if he decides +;; to challenge +[915:"I'm ] ; then player's full name +[916:", the reply came back: "I'm ] ; name chosen from 1000... +[917:". ] ; after 916, name. +[918:"Nobody tells me nuthin'." ] ; unthreatened, just knows nothing +[919:"I ain't telling you nuthin' about anythin', bud!" ] ; refuses +; to tell Player, in response to "talk" option on menu + +; MESSAGES FOR FIRST MEETING VARIOUS TYPE OF PEOPLE... +; a group of 10 messages from a cowardly person... +; a group of 10 messages from a greedy person... +; a group of 10 messages from anyone else... +; +; cowardly meeting... +[920:"Why, hello stranger". ] ; œœœ punc +[921:"Well, howdy mister". ] ; œœœ punc +[922:"Welcome, stranger". ] ; œœœ punc +[923:"Er, greetings stranger". ] ; œœœ punc +[924:"Er, howdoo young fella". ] ; œœœ punc +[925:"Er, hello pardner". ] ; œœœ punc +[926:"Er, howdoo stranger". ] ; œœœ punc +[927:"Er, good day to you, pardner". ] ; œœœ punc +[928:"Er, howdoo stranger". ] ; œœœ punc +[929:"Er, hello young Sir". ] ; œœœ punc + +; greedy meeting... +[930:"Hello stranger". ] ; œœœ punc +[931:"Howdoo stranger". ] ; œœœ punc +[932:"Hi there, stranger". ] ; œœœ punc +[933:"Good day, pardner". ] ; œœœ punc +[934:"Hello stranger". ] ; œœœ punc +[935:"Hello friend. You new around here?" ] ; œœœ punc +[936:"Hello there, boy. You want anything from me?" ] ; œœœ punc +[937:"Greetings stranger. You wanting something?" ] ; œœœ punc +[938:"Hello stranger. Can I help you some?" ] ; œœœ punc +[939:"Howdy pardner. You needing some help?" ] ; œœœ punc +; +; normal, well-balanced people... +[940:"Hello pardner". ] ; œœœ punc +[941:"Howdoo stranger". ] ; œœœ punc +[942:"Hi stranger". ] ; œœœ punc +[943:"Greetings stranger". ] ; œœœ punc +[944:"Howdoo stranger". ] ; œœœ punc +[945:"Hello pardner". ] ; œœœ punc +[946:"Howdy stranger". ] ; œœœ punc +[947:"Goodday stranger". ] ; œœœ punc +[948:"Howdoo friend". ] ; œœœ punc +[949:"Hello stranger". ] ; œœœ punc + +[950:"Howdy Pat". ] ; œœœ punc +[951:"Howdy Billy". ] ; meet someone again. ; œœœ punc +[952:Sheriff Pat Garrett`] ;œœœ last bit moved to 975ish + +[953:Billy The Kid`] ; copy of message 2||| MENU OPTION +[954:Who do you want to play?` `(Press FIRE or SPACE). ] ; |||opening question. œœœ reworded +[955:Pat, you must track down and capture all the outlaw gangs. Talk +to people for information. And when in a sheriffs office, check your +deputies are where they're wanted.` `(Press FIRE or SPACE). ] ;||| œœœ reworded +[956:Billy, you must try to bankrupt the Murphy-Dolan gang. Rob +their banks and steal their cows. Talk to people for information. +And try to steer clear of the law.` `(Press FIRE or SPACE). ] +;||| œœœ reworded +[957:"Oh, it's you again". ] ; ||| meet someone again that you +; haven't been introduced to. ; œœœ punc +[958:"Clear off buster, I don't associate with your kind". ] ;||| +; meet someone again who we didn't get on with last time! + + +;[951:"I don't deal with your kind, lawman". ] ; Pat tries to talk to +;; someone he is very unpopular with. +;[952:"I don't have nothing to do with outlaws". ] +; likewise Billy. +; +;[953:"What can I do for you, stranger. ] ; either player +;; talks to someone for the first time, when they are not +;; very well known (i.e. at the start of the game). + +;[954:Ain't you Billy the Kid? Anything I can do to oblige you? ] +;; meet's someone for the first time when better known +;[955:well, if it isn't Sheriff Garrett. What can I do for you, sir? ] +;; meet's someone for the first time when better known + +;; meet someone who is inclined towards/neutral towards player + + +[960:] ; header for 960..990 messages. |||quote removed +[961:." ] ; terminator for 960..990 messages. +[962:I hear ] ; always followed by gang name. +[963:just robbed the bank in ] ; followed by town name +[964:just rustled some cows from ] ; followed by ranch name +[965:hideout is right near ] ; preceded by gang name, followed by town +; name. +[966:Folks tell me there's a pile of money at the bank in ] +;|||moved to 972. [967:I hear say there are x deputies stationed at ] +[968:"There's a widow woman over at ] ; œœœ punc +[969:who needs help". ] ; œœœ punc +[970:"I'm being run off my land by Murphy. I need help!" ] ; œœœ punc +[971:"That gunslinger over there is threatening me and my folks. +Kill him, won't ya?" ] ; œœœ punc +[972:there are ] ; followed by number, 973||| +[973: deputies stationed at ] ; after 972/number, before town name.||| +[974:2-PLAYER GAME (Use UP//DOWN to select, +then press FIRE or SPACE). ] ; œœœcopy of message 1||| MENU OPTION AT START OF GAME +[975:Trying serial connection. ];^^^ (press FIRE to give up). ] ;œœœ œœœ punc + + + +; 1000+Location number for various places that people can +; mention things happening. Events can include train + +; contents, contents of banks, number of deputies in +; various towns, gang locations, recent robberies, +; subplot hints: e.g. Widow women needing help(!) +[1010:Santa Fe. ] ; Santa Fe 10 +[1011:White Oaks. ] ; Albe'que 11 +[1012:Lincoln City. ] ; Lincoln City 12 +[1013:Mesilla. ] ; Las Cruces 13 +[1014:Roswell. ] ; Roswell 14 +[1015:El Paso. ] ; 15 + +[1039:the express train. ] ; 39 +[1040:the wagon train. ] ; 40 + +; messages where someone tells one of the players +; about various robberies, train/bank, that are +; planned during the next little while. +[1041:the Cooper Gang] ; 41 Santa Fe ; œœœ punc +[1042:Socorro Vaqueros] ; 42 White Oaks ||| ; œœœ punc +[1043:the Seven Rivers Gang] ; 43 Lincoln City ; œœœ punc +[1044:the Dona Ana Bunch] ; 44 Mesilla ; œœœ punc +[1045:the Jesse Evans gang] ; 45 Roswell ; œœœ punc +[1046:the fugitives] ; 46 El Paso ; œœœ punc +[1047:the Regulators] ; 47 Near Fort Sumner ||| ; œœœ punc +; +; names for white American Males (young/old)... +; other possible formula names are... +; ... the rat + +[1100:honest Jake] ; œœœ punc +[1101:cookhouse Charlie] ; œœœ punc +[1102:Jericho Jake] ; œœœ punc +[1103:little Joe] ; œœœ punc +[1104:Black Jake] ; œœœ punc +[1105:Trapper John] ; œœœ punc +[1106:Prairie John] ; œœœ punc +[1107:long tall John] ; œœœ punc +[1108:Johnny Reb] ; œœœ punc +[1109:Omaha John] ; œœœ punc + +[1110:Sam Peckinpaw] ; œœœ punc +; ** also name on a grave in Fistful of Dollars ** +[1111:Cornish Sam] ; œœœ punc +[1112:snake-eyes Sam] ; œœœ punc +[1113:Yosemite Sam] ; œœœ punc +[1114:slippery Sam] ; œœœ punc +[1115:Ledger Bill] ; œœœ punc +[1116:Arkansas Will] ; œœœ punc +[1117:Hotel Bill] ; œœœ punc +[1118:Bronco Bill] ; œœœ punc +[1119:Tom Destry] ; œœœ punc +; ** as in Destry Rides Again + +[1120:Rowdy Yates] ; œœœ punc +; ** Clint Eastwood's role in Rawhide + +[1121:mad Mike] ; œœœ punc +[1122:Texas Mike] ; œœœ punc +[1123:mustang Mike] ; œœœ punc +[1124:Howard Johnson] ; œœœ punc +; ** as in Blazing Saddles +[1125:mule-skinner Jim] ; œœœ punc +[1126:Louis L'Amour] ; œœœ punc +; ** Western novelist +[1127:cool-hand Jim] ; œœœ punc +[1128:the Swede] ; œœœ punc +[1129:Bernardo O'Riley] ; œœœ punc +; ** Bronson's role in the Magnificent Seven +; +[1130:Slim Pickins] ; œœœ punc +[1131:Mexico Pete] ; œœœ punc +[1132:Two-gun Pete] ; œœœ punc +[1133:Billy-Joe Bob] ; œœœ punc +; ** character in Fresno +[1134:Teacher Pete] ; œœœ punc +[1135:Red River Nick] ; œœœ punc +[1136:Nebraska Nick] ; œœœ punc +[1137:tricky Nick] ; œœœ punc +[1138:lucky Luke] ; œœœ punc +; ** Goscinny & Uderzo hero +[1139:Navaho Nick] ; œœœ punc +; +[1140:honest Dave] ; œœœ punc +[1141:dead-eye Dick] ; œœœ punc +[1142:Kansas Dave] ; œœœ punc +[1143:dainty Dave] ; œœœ punc +[1144:dynamite Dave] ; œœœ punc +[1145:red-eye Bert] ; œœœ punc +[1146:bull-whip Bert] ; œœœ punc +[1147:slick Bert] ; œœœ punc +[1148:Frenchie Dupont] ; œœœ punc +[1149:Duke Wayne] ; œœœ punc +; ** John Wayne nicknamed Duke +; + +; new names for extra subplots... +[1160:Whiskey Pete] ;||| ; œœœ punc +[1161:Joe Dunn] ;||| ; œœœ punc +[1162:Joe Grant] ;||| ; œœœ punc +[1163:Karl Bekkert] ;||| ; œœœ punc +[1164:Jack Shoe] ;||| ; œœœ punc +[1165:Ben Davis] ;||| ; œœœ punc +[1166:Warren Oaks] ;||| ; œœœ punc +[1167:Wayne Rodgers] ;||| ; œœœ punc +[1168:Ash Upton] ;||| ; œœœ punc +[1169:Chief How] ;********* at Mescalero Apache ;||| +[1170:Rick Sands] ;||| ; œœœ punc +[1171:Rick "Two Fingers" Rider] ;||| œœœ ; œœœ punc +; +; names for American Females... +; call girls (10)... +[1200:Honey Bun] ; œœœ punc +[1201:Sarah Jane] ; œœœ punc +[1202:Fast Sally] ; œœœ punc +[1203:Long tall Kerri] ; œœœ punc +[1204:Saucy Miss Cockwell] ; original wording at Kerri's request! +[1205:Sweet Charity] ; œœœ punc +[1206:li'l Mabel] ; œœœ punc +[1207:Nice Nelly] ; American slang for excessive propriety +[1208:Annabel Lee] ; œœœ punc +[1209:Dizzy Lizzie] ; œœœ punc +; + +[1210:Laura Picket] ;||| ; œœœ punc +[1211:Wilma Dunn] ;||| ; œœœ punc +[1212:Miss Rosy] ;||| ; œœœ punc +[1213:Lavinia Strumpet] ;||| ; œœœ punc +[1214:Mrs McSween] ;||| ; œœœ punc +[1215:Paulita Maxwell] ; Billy/Pat's girlfriend. +;------------ +; subplot messages + +[1490:Barney Mason rode up and said, "] +[1491:Pat, it's the end of the month, and the wages just arrived. +We've doling them out now, but you can change the budget for +next month if you like. Just come into the sheriff's office in +Lincoln and see how we're spending the money". ] ;œœœ + + +; Mexican peasant going to be run off his land by Anglo ranchers +[1500:"The Greengo ranchers, they try to drive me off my farm! Help me +fight them!" ] +[1501:"May the Blessed Virgin bring a thousand curses upon you". ] ; no to 1500 + +; lady in saloon being pestered by notorious gunslinger +[1503:"There's a gunslinger over there who don't know how to treat +a lady right. Teach him a lesson, Big Boy and I could show you +a good time". ] ;œœœ reworded from... ; œœœ punc +;; "This gunslinger don't know how to treat a lady right. Will you teach him +;; a lesson, Big Boy?" ] + +[1504:the lady looked disappointed. ] ; no to 1503 + + + + + + + + + + + + + +; Mexican picked on by cowboys... +[1506:"These cowboys, they picking on me. You make them stop, Senor?" ] +[1507:The Mexican looked disappointed. ] ; no to 1506 +[1508:The cowboys walked off, saying, "We're gonna get you for this" ] +; yes to 1506 ; œœœ punc + +; sick man in desert... +[1509:"Help me - my horse is dead, I'm out of water and plumb near dead". ] +;|||mentions reason for being in trouble. ; œœœ punc + +[1510:The man collapsed in despair. ] ; no to 1509 +;|||1511 moved to 1700 ; œœœ punc + + +; army being cheated by MD's subplot +[1511:"Howdoo pardner. I'm Ash Upton. How can I be of service?" ] ;||| Store +; in Lincoln ; œœœ punc +; Soldier at Fort Sumner - army are being cheated by Murphy- +; Dolan's +[1512:"The army are being cheated by the Murphy-Dolans on the meat +contract". ] ; œœœ punc +[1513:"What the heck brung you here? Draw, you son of a bitch". ] ; œœœ punc +; Billy goes into store whilst MDs present +[1514:"Get out of here, lawman. You ain't welcome". ] ; ; œœœ punc +; Pat goes into store whilst MDs present. +[1515:hunted through some papers and came up with the real account +books for the Murphy-Dolans. Now to show them to Colonel Baxter... ] +; pat/billy goes into the MD store whilst they're away. +[1516:showed the books to Colonel Baxter. He was livid and vowed to +prosecute the Murphy-Dolan's with the full force of the law. ] +; go to Fort Sumner with books. +[1517:"I can't go to the Colonel until I got proof - maybe you could +get hold of their books from the store in Lincoln?" ] +[1518:SEARCH FOR BOOKS. `] ; menu option in MD store +;;||| [1519:found the books and hid them in his jacket. ] ; find books in store +[1519:The store was deserted. ] ;||| go there when MD's / Ash not there + +; Pat is about to defeat a gang in a shootout, +; their leader calls a truce and barters their escape +[1520:The gang leader waved a white flag and called out: ] ; +; followed by one of 1521..1523 +[1521:"Pat - let us go and we'll tell you when Billy's planning the +next robbery". ] +[1522:"Pat - let us go and we'll leave the territory". ] +[1523:"Pat - let us go and we'll tell you where there is a stash of +gold buried". ] +; and responses to 1521..1523 if Pat accepts the offer... +[1524:"Thanks Pat - we'll be seeing you". They rode off. ] ; œœœ punc +[1525:"Buenos dias Senor. Now we head for Mexico". ] ; œœœ punc +[1526:"It's on the east side of the Pecos, at a deserted prospector's +camp". They rode off. ] +[1527:"Then we fight to the death". ] ; œœœ punc + +; Pat meets Texan posse in desert. Player can choose to +; lie that Billy has stolen Texan cattle. +[1529:Pat met a Texan posse looking for rustlers. What did he tell +them about Billy? ] ; intro message +[1530:HE STEALS TEXAN CATTLE `] ; menu option|||upper case +[1531:HE IS AN OUTLAW `] ; menu options - keep short. |||upper case +[1532:the posse offered to ride along as deputies, for the time +being. ] ; Pat lies about Billy stealing Texan cattle + + +[1533:The posse wished Pat good luck, and were right sorry +they couldn't help. ] ; Pat says Billy is an outlaw only. +[1534:Barney Mason rode up and said, "Pat, another man from that Texan +posse had to high-tail it outa town. You'd better get into +town and check the budget". ] ; |||now mentions Barney Mason, budget + +; Barney Mason reports the escape of an outlaw +; from Santa Fe - Pat can track him unaided for a reward. +[1535:Barney Mason rode up. "Pat - an outlaw's just busted out from +Santa Fe. Ride with me now, and I'll put you on his trail. "] +[1536:Barney rode off. ] ; no to 1535 +[1537:Barney lead Pat at a gallop to the head of a winding valley, +then left him to track the fugitive on his own. ] ; yes to 1535 +[1538:Pat took the outlaw in and claimed the $100 reward. ] +; get the outlaw. + + +; shootout message groups: intro/win/lose 1540..1569 +[1540:"Hurry! We must fight them!" ] ; yes to 1500 +[1541:"Muchos gracias, Senor. Now my farm is safe". ] ; œœœ punc +[1542:The peasant had been hit by a bullet. He died without saying a +word. ] ; œœœ punc + + + + +; duel message groups: intro/win/lose 1570..1599 + +; gunslinger bothering lady (1503) +[1570:The gunslinger slowly turned around and started to head for the +door... ] ; yes to 1503 +[1571:The gunslinger slumped to the floor... ] +[1572:the bullet struck home, bringing merciful blackness. ] +; invitations to duel in saloon + +[1573:"So you're the guy that drilled my +kid brother in the back, Mister Big Shot. Wanna settle this +outside?" ] ;||| Warren Oaks +[1574:"They say you're pretty fancy with +that six-gun of yours, Mister. But I reckon you ain't. Wanna take +me on outside?" ] ;||| Wayne Rodgers +[1575:"I seeze you undressin' my Mary-Jane +with your eyes, buster! Wanna settle this like a Man?" ] ;||| Karl Bekkert + + +; +; Pat is accosted by a local mayor with request for more protection +[1600:a pompous mayor walked up and shouted, "Sheriff Garrett, +this town's gotta have more protection. I want at least one more +deputy here before you leave us.] ;||| now mentions appearance ; œœœ punc +[1601:"OK, I guess that'll have to do". ] ; œœœ punc +[1602:"The people of this town ain't gonna be happy about this". ] ; œœœ punc + +; The same mayor asks Pat to run a vagrant out of town +; to enforce a bogus claim against the prospector (?) +[1605:A pompous mayor walked up and shouted, "Sheriff Garrett, there's +a vagrant I want run outa town. The varmit says he owns a claim +that one of my friends has a mind to". ] ; œœœ punc +[1606:Pat helped the mayor, and drove the vagrant out of town. But he +surely didn't feel good about doing it. ] +[1607:Pat refused, saying that even a vagrant has his rights. ] + +; Pat encounters an outlaw whilst tracking +; ++ In scrolling game ++ + +; At Siege, Carlyle runs in. +; ++ In arcades game ++ + +; Pat meets outlaw gang in an old Building. +; ++ In arcades game ++ + + + + + + + + + + + + + +; Billy Only encounters... +[1610:"Paleface, we greet you. Beef promised us by treaty, +Murphy-Dolans send us scraps. My people starve". ] ;|||no longer mentions Billy +; comment from Indian chief. +[1611:do you want to try to take these cows to the Indian Reservation? ] ; +; when double-click on Longhorns, after seeing 1610. +;[1612:the Indian chief rode up: "How, red man's friend?". He thanked +;Billy for the beef and offered to fake an uprising, if needed, to +;distract Pat in the future. ] ; +++ Moved to scrolling games |||| +[1613:FAKE UPRISING. `] ; extra MENU option. +[1614:"Yes paleface, for you we make lawman think we on warpath". ] ; œœœ punc + ;^^^ Billy->paleface + +; meet Widow Woman who wants ALL BILLY'S MONEY (quel surprise) +[1620:"Oh Sir, I'm jest a poor widow woman. If I can't pay the bank, +I'll be thrown off my little farm and have to go a-begging in the +streets. It ain't no more than $1000] ; followed by amount of gold +[1621:; that surely ain't nothing to a rich man like you". ] +[1622:"O thank you sir. I'll always be a-thinking on you". ] +; yes to 1620 +[1623:"O no! My last hope is gone - I'll be in the poorhouse till the +end of my days". ] ; no to 1620 + +; Desert peasant meets Billy and entices him to his house +; with story that family is sick. While Billy stays there, +; an outlaw arrives wit news of a gold consignment at +; the local bank, but it's a bluff - if Billy leaves to +; travel there, he gets challenged in the street by a bounty +; hunter. (Note: there may or may not be gold in then bank) +[1630:A peasant rode up: "Senor Billy, my family are sick. I no can +make them better. Please, you come try and help them". ] +[1631:he rode off with the peasant and stayed at his farmhouse; +fetching and boiling water and cooking for the family. +After a few days, they were recovering and was +about to leave when there come a knocking at the door... ] +; yes to 1630 (|This is Followed by 1633) +[1632:"Oh pity me, my family will surely die". ] ; no to 1630 +; 1633 moved to 1701||| +[1634:a bounty hunter was lying in wait. "Gotcha! you dumb +saddlebum - you've been set up! I'm gonna take you in, +dead or alive! Draw! ] +; meet Bounty hunter in town, after 1630/1631/1633 + + + + +; ambush by Buckshot Roberts +[1640:As he rode near a farmhouse, a huge man stepped out from +behind a rock: "There's folks as wants to talk to ya. I'm takin' you +in. The name's Roberts - +Buckshot Roberts. I'm a bounty hunter - an' I've taken in fifty scum +like you already, and you're gonna make it fifty-one. ] +;||| removed: You coming quiet? ] + +;|||moved to arcades.[1641:although Buckshot Roberts must have stopped half a dozen +;|||bullets, he still found strength to climb onto a horse and ride off. ] + + + + + + + + + + + + +; win gunfight +++ Move to arcades? + + +; Seven Rivers gang ambushes Billy/Pat in town. +[1645:Suddenly shots started to ring out. He dove for cover. On the +other side of the street, gunslingers hired by the Murphy-Dolan gang were +shooting at him! ] ; |||no longer mentions Billy ^^^now murphy-dolan, +; not seven-rivers + +; Jesse Evans gang ambushes Billy in town. +[1646:Suddenly the air rang to the crack of gunshot. He leapt for +cover. Across the street, he could see some badmen +throwing lead at him! ] ;|||no longer mentions Billy ^^^no longer +; mentions Jesse Evans Gang + +; Tom Cooper offers Billy lots of counterfeit money +; instead of his share in a robbery. +[1650:Tom Cooper said, "Billy, how'd you like 5 times your share of +this robbery - in counterfeit bills. There's a tenderfoot called +Duncan, spreading it around. It's a good looking paper. Won't give you +no problems if you spend it careful. What d'you say". ] +[1651:Cooper smiled: "Say, that's great. Here's the sack of money". +Billy pondered on it. How could he use it most easily? ] +[1652:BUY CATTLE WITH IT. `] ; menu option after 1651 +[1653:SPEND IT NORMALLY. `] ; menu option after 1651 +[1654:Cooper counted out Billy's share and rode off. ] ; no to 1650 + +; when Billy is in Lincoln City Saloon, he overhears that Sheriff +; Brady is on his way to ambush McSween. +[1660:he heard something that made him prick up his ears."You +know that no-good sheriff Brady's gonna run Mrs McSween off her ranch. +Ain't that the devil! But what can we do?" ] +[1661:Good Mrs McSween! An old friend, and a friend of the late +lamented Tunstall! One of the last alive to stand against the Murphy- +Dolans! What now? ] ; after 1660 ;œœœ no longer mentions Billy +[1662:DO NOTHING. `] ; menu option. +[1663:STOP BRADY. ] ; menu option. ->1664 + +[1664:he ran from the saloon and found Brady heading out of town. +He caught up with him and pulled him from his horse. Brady got up, +shaking with anger. It was obvious he was going to draw. ] +; stop brady from 1663 + +; Jose Miguel Sedillo, a friend of Billy's from way back, tells +; him of an attempted horse-robbery on Tunstall Ranch, +; while this is being run by Mrs McSween. +[1670:Jose Miguel Sedillo - an old and +trusted friend - rode up. "You must go help Mrs McSween - the +Murphy-Dolan's are there right now. They try to steal her cattle".] +;||| wording changed to make non-Billy specific + +; do nothing or... +[1671:GO THERE. `] +[1672:they rode off and got ready to fight... ] ; selects 1671: +;goes into shootout. + +; meet Joe Grant,. drunk in a saloon. + + + + + + + + + + + + + +[1674:Joe Grant staggered out of a back room, plainly drunk. "Hey Kid! +You know I'm the fastest gun in the West now. Lookee here at this +pearl-handled pistol I just - er - got gived". ] +[1675:He handed over the +pistol. It surely was pretty, but wouldn't be powerful enough to stop +a mosquito. Only three chambers were loaded. What did he do? ] +; nothing or... +[1676:ROTATE THE BARREL TO AN EMPTY CHAMBER. `] ; menu option +[1677:he turned the barrel and handed the gun back. ] +[1678:Joe Grant was waiting outside. He seemed to have gotten sober +real quick. He snarled "Draw, you prairie dog". ] +[1679:he handed the gun back. ] ; don't play with chambers + +[1680:"Beat it, we don't want none of Tunstall's men hereabouts". ] +; Billy meets hostile soldier + +; meet Mrs McSween +[1681:"Why hello old friend - how're you keeping". ] ;|||no longer mentions billy +[1682:"Gotta get going. This place keeps a body busy". ] +; follows 1681 + +; meet prospector +[1683:"What do you want, stranger? You another claim jumper?" ] + +; take sick man to santa fe +[1684:when they arrived with the sick man clinging to the horse, +he said "thanks for the ride Pard" and staggered off. ] |||^^^no longer +; mentions Billy + +; take sick man somewhere other than Santa Fe + +[1685:when they arrived with the sick man clinging to his horse, +the sick man cursed him for not going to Santa Fe and +staggered off on his own. ] ||| + +[1686:"Sheriff, can you come back later. We're real busy right now". ] +; Pat meets hostile soldier/rancher. ||| copied, slightly changed from 1680 + + + +; messages which result in player being thrown back to map... 1700..1729 +[1700:the man struggled onto the horse, and clung on weakly. He +gasped "Take me to Santa Fe, Mister. I got folks there". ] ; |||now mentions Santa Fe. +; yes to 1509 +; if visit Santa Fe next, get 1684, otherwise get 1685. +[1701:An outlaw burst through the door, brandishing a gun! He saw +Billy and dropped it in terror. "Billy the Kid! Don't kill me please, +I didn't mean ya no harm. Look, I'll help ya. The bank at White Oaks +just had a big payroll for a ranch thereabouts. Git +down there now, ya can pick up a whole load of money". ] ; follows +; 1631 ;||| moved from 1633 + + + +; Pat's strategy game messages... +; Go into sheriff's office... +;|||[1800:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||can I do for you?" ] +;|||[1801:move deputy to reserve. `] ; take deputy away from town +;|||[1802:move deputy to town. `] ; station deputy in this town. +;|||[1803:ok. ] +;|||[1804:there are ] ; followed by number of deputies +;|||[1805: deputies in town. ] ; follows 1804/digit +;|||[1806: deputies in reserve. ] ; follows 1804/digit +;|||[1807:Pat got a reward of ] ; followed by number: amount of dollars +;|||[1808: dollars. ] ; follows number. +;|||[1809:the deputy looked up and said, "Howdy Sheriff Garrett. What +;|||are you going to do to calm down the people in this here town?" ] +; people are upset about level of crime. +[1810:"the people sure are not gonna be happy about this." ] +[1811:And so the west was won. Pat had brought Law to +his domain, and was respected throughout the land. ] ; win message +[1812:And so Pat died in obscurity - known only by a few +historians who read dusty books about the Wild West. ] ; lose message + +[1813:Barney Mason rode up: "Pat, the county has run out of money. +I took temporary charge while you were away, but I had to fire +some deputies. You'd better get into town real quick and sort +it out". He rode off again. ] ; ||| +[1814:Barney Mason rode up: "Pat, there's trouble brewing. +People are saying you're doing no good as sheriff. You'd +better get into the office and do something". ] ;||| +[1815:Barney Mason rode up: "Pat, you finally got it wrong. You've +lost the election. Sorry old friend, you're no longer Sheriff". ] ; ||| + +;Billy strategy messages + +[1850:And so Billy became a legend. His reputation was known +throughout the world, and his story was oft repeated +by people of all countries. ] ; win message +[1851:And so Billy died in obscurity - known only by a few +historians who read dusty books about the wild west. ] ; lose message + +[1852:WANTED! Billy The Kid, Dead or Alive. Reward $]|||| +[1853:. ] ; after 1852/number||| +[1854:was stopped on the way. He pulled up his horse +and dismounted... ] ; Actors name, 1854. Used when +; get a random event whilst trying to go somewhere from map. |||| +; messages to do with meeting a gang... + +[1855:"Hey Billy, come share some coffee"... ] ;||| then 1856 ; œœœ punc +[1856:Billy sat down with the gang and talked of daring deeds +and famous crimes. Then he asked the crucial question... +"I've got a real sweet job planned. You want in?". The gang +looked at Billy. Should they trust this young hotblood? ] ;||| +; 1856, 1857 ||| +[1857:their leader spoke "Sure, but we'll want a good big cut. Now get out of +here before I change my mind". ] ;||| +[1858:Billy and the gang went over and over the targets they +could hit, but they couldn't agree which should be next... ] ; ||| visit gang again +;œœœ made "meaner" + + +; get spotted by a deputy in a lawful town... +[1859:down the street, a deputy called out, "Billy The Kid - hold it +right there. You gonna come quietly?" ] ;||| ; œœœ punc +[1860:RUN AWAY `] ; ||| menu option +[1861:IGNORE HIM `] ; ||| menu option +[1862:Billy fled the town. ] ; run away ||| +[1863:"Go for your gun, outlaw." ] ;||| + +[1864:woke to see his ex-girlfriend Paulita Maxwell tending +his injuries. "You should take more care, my love. Next time +could be your last". With her loving care, he was soon ready to go +again. ] ;&&& note either Billy/Pat. Preceded by Players Name +[1865:Suddenly, Pat Garrett burst in. ] ;&&& +[1866:"Billy, you know I can't +take you in. They'd hang ya like a dog, and I can't stand by and let that +happen. We'll have to settle this now, gun-to-gun. Draw, +outlaw". ] ;&&& +[1867:Billy and Pat approached other and exchanged glances. +Both knew that they were sworn enemies, but also old friends. +Was this to be the end for one of them? ] ;&&& +[1868:CHALLENGE TO DUEL. `] ; menu option &&& +[1869:AVOID CONFLICT. `] ; menu option &&& + + +; messages which occasionally replace the standard greetings +[1870:"Hey, it's Pat Garrett. I hear you polled ] ;||| for Pat ; œœœ punc +[1871:"Hey, it's Billy the Kid. I hear your reward is now $] ; |||| ; œœœ punc +[1872: votes". ] ;||| follows 1870 ; œœœ punc +[1873:". ] ; ||| follows 1871/amount of money ; œœœ punc + +[1880:"Hey, It's Billy The Kid! Get him boys!" ] ; occasionally +; when you go into a bank, or other law-abiding place +; in town. Leads to escape game. ||| +[1881:(lawful) ] ; added to town name on map +[1882:the place was completely deserted. ] ; ||| visit a ranch +; etc. which has gone bust, or similar. + + +; messages Billy gets when gangs go out of business +[1890:Tom O'Foliard rode up and said, "hello old friend, ] ;||| ^^^ +; now now longer mentions Billy + +[1891:the Cooper Gang have been brought to justice". ] ;||| +[1892:the Socorro Vaqueros gang has been brought to justice". ] +[1893:the Seven Rivers Gang gang has been brought to justice". ] +[1894:the Dona Ana Bunch gang has been brought to justice". ] +[1895:the Jesse Evans gang has been brought to justice". ] +[1896:the fugitives' gang has been brought to justice". ] +[1897:the regulators' gang has been brought to justice". ] + +[1900:"Ain't nuthin going on around here". ] ; knows of no ||| +; relevant events in this town. +; Tom O'Foliard's comments on Billy's progress. +[1901:you've gotta hurry up. The Murphy-Dolans are taking over +the county, and you've gotta stop 'em". ] ; œœœ punc +[1902:you've got the Murphy-Dolans on the run. Keep going +ol' buddy". ] ; œœœ punc +[1903:you've almost nailed the Murphy-Dolans, my friend. But +Pat's almost got the territory cleaned up, so you'd better pull +off some pretty big heists to finish 'em off". ] ; œœœ punc +[1904:Billy, you've stolen a total of $] ;^^^Billy added at start (not +; an important change) +[1905: which has bankrupted ] +[1906:of their ranches, but ] +[1907:of the 6 important gangs have been wiped out". ] ; œœœ punc + +; ratings added ^^^^ +[1920:Billy's final reward was $] +[1921: out of a maximum of about $15000, and he will ] ;^^^^ + +[1922:not be remembered. ] +[1923:be a dim memory. ] +[1924:be a figure of fun. ] +[1925:be remembered by many. ] +[1926:be remembered by most. ] +[1927:be a minor hero. ] +[1928:be a popular hero. ] +[1929:be a household name till the end of time. ] + +; ratings added ^^^^ +[1930:Pat's final popularity was ] +[1931: votes out of a maximum of about 4000, and he will ] ;^^^^ + + +;------------------ +;; [2000:Billy The Kid Intro screens. ] +[2001:"Well if it ain't momma's boy Billy! Let's see how good you are +now. Draw, Kid!" ] +[2002:Tunstall Ranch in Lincoln County, across the state line. ] +[2003:"...Murphy and Dolan are dangerous men, Mr Tunstall." ] +[2004:"I ain't gonna let their threats worry me, Sheriff Garrett. I'm +too riled up about the way they're cheating honest farmers." ] +[2005:"Hey now! Here's someone who might be a help. Where've you +been these past years, Billy? John Tunstall, meet the Kid, an old +friend of mine and a good man in a fight." ] +[2006:"I'd like you to join my men, Billy. Here's my lucky Silver +Dollar on account. Keep it safe." ] +[2007:"Pat, Billy, there goes dinner!" ] +[2008:"Another good man dead! I swear I'll bring order to Lincoln +County and hunt down every last outlaw in it." ] +[2009:"You're wrong, Pat, you can't play it by their rules. If you +mean what you said, you'll be hunting me too. Because I vow to do +whatever I must to avenge this murder, inside or outside the law." ] +[2010:"The Legend of Billy The Kid" is an authentic Western for +one or two players. ] +[2011:As Billy, you might tie up your horse on Main Street, +swagger into the saloon, meet an outlaw gang at cards, and go +on to rob the bank... ] +[2012:...or raise money to help a poor widow by rustling a herd +of cows and driving them to Mexico. ] +[2013:As Pat you might learn of a planned train robbery from +the local drunk... ] +[2014:...and lead a posse after the outlaws, track them to their lair, +and shoot it out with the gang. ] + + + + + + + + +-------- + diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/ref/squash.dat b/l9dev/regress/games.l9/billy.l9/st.l9/ref/squash.dat new file mode 100644 index 0000000..aa922ec Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/st.l9/ref/squash.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/squash.dat b/l9dev/regress/games.l9/billy.l9/st.l9/squash.dat new file mode 100644 index 0000000..aa922ec Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/st.l9/squash.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/table.dat b/l9dev/regress/games.l9/billy.l9/st.l9/table.dat new file mode 100644 index 0000000..9e00cfd Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/st.l9/table.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/st.l9/table.txt b/l9dev/regress/games.l9/billy.l9/st.l9/table.txt new file mode 100644 index 0000000..e6b93ff --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/st.l9/table.txt @@ -0,0 +1,2150 @@ +;;;LaviniaStrumpetMenu equ 204 + +; Billy The Kid source, copyright (C) 1990 Level 9 Computing. +; +; TABLE.TXT, assembler format data for tables, a.k.a lists/arrays. +; (Save the assembled data as TABLE.DAT). +; +; You must start all DEFWs on EVEN boundaries, else subsequent code +; seems to be padded to make it even (according to the GENST listing, +; anyway). The EVEN directive inserts a padding byte if appropriate. +; + ORG 0 +starttables + dc.l ObjectTable-starttables ; object positions etc. + dc.l $FFFF ; HiresTable() Set up in AllocateWorkspaceLists + dc.l $FFFF ; + dc.l LIST4-starttables + dc.l NPCINITIAL-starttables ; npc initial and 'floor pointers' + dc.l TownFixedData-startTables ; + dc.l $FFFF ; 7: TownVarData: variable town stuff (AllocateWorkspaceLists) + dc.l list8-starttables ; 8 - assorted fixed system tables + dc.l IntroTables-startTables ; 9 - input table,object table + dc.l ENDTABLE-starttables +;--- +; +;--- +ObjectTable +; list giving the graphics objects which are important +; to the game. This is divided up by section: i.e. +; the map is separate from the various Sierra-style rooms, +; this separation being handled by the table at the start. + dc.w MapObjects-ObjectTable + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w MapToNewScreen-ObjectTable ; 10 + +; now the object tables themselves. These objects can +; be either xzh or rasters, and their order is critically +; important to the program. If you want to add new objects, +; just add them on the end. If you need to delete an object, +; replace it with a 0 or some new number. DON'T DELETE IT. +; The table ends with -1 + +MapObjects + dc.w 0 ; 0 + dc.w 340 ; 1 cows + dc.w 341 ; 2 cows + dc.w 342 ; 3 cows + dc.w 343 ; 4 cows + dc.w 344 ; 5 cows + dc.w 0 ; 6 + dc.w 0 ; 7 + dc.w 0 ; 8 + dc.w 0 ; 9 + dc.w 3345 ; Santa Fe 10 + dc.w 3346 ; White Oaks 11 + dc.w 592 ; Lincoln City 12 was 3347 + dc.w 588 ; Mesilla 13 + dc.w 589 ; Roswell 14 + dc.w 591 ; 3349 ; El Paso 15 + dc.w 0 ; spare town 16 + dc.w 0 ; spare town 17 + dc.w 0 ; spare town 18 + dc.w 3351 ; Fort Stanton 19 + dc.w 3352 ; Fot Sumner 20 + dc.w 0 ; spare fort 21 + dc.w 0 ; spare fort 22 + dc.w 0 ; spare fort 23 + dc.w 581 ; Unknown ranch near Bitter Lake 24 + dc.w 582 ; Fritz Ranch 25 + dc.w 583 ; Chisum Ranch 26 + dc.w 584 ; Dedrick Ranch 27 + dc.w 585 ; Beckwith Ranch 28 + dc.w 586 ; Reed ranch 29 + dc.w 587 ; unknown ranch 30 + dc.w 576 ; Katz farmhouse 31 + dc.w 577 ; Dunn farmhouse 32 + dc.w 578 ; Rose farmhouse 33 + dc.w 0 ; farmhouse 34 + dc.w 330 ; Mescalero Apache settlement 35 + dc.w 0 ; spare indians 36 (3356 might work) + dc.w 0 ; spare indians 37 + dc.w 0 ; spare indians 38 + dc.w 3304 ; train 39 + dc.w 2730 ; wagon train 40 + dc.w 331; outlaw hideout 41 + dc.w 332 ; outlaw hideout 42 + dc.w 333 ; outlaw hideout 43 + dc.w 334 ; outlaw hideout 44 + dc.w 335 ; outlaw hideout 45 + dc.w 336 ; outlaw hideout 46 + dc.w 0 ; outlaw hideout 47 + dc.w 337 ; prospector's camp 48 + dc.w 329 ; system + dc.w -1 ; end of table + + + + +MapToNewScreen +; for each object picked up in map, this table +; gives the corresponding screen number that it will +; invoke, or 0 if none. + + +; First byte: overlay letter to call. +; Second byte: screen number within that overlay. +; (for map, addition to 400, unsigned) +; (for scrolling games, = map number) +MO equ 69 * 'E' map overlay +SO equ 50 * '2' scrolling overlay +AO equ 51 * '3' arcade overlay, train +IO equ 52 * '4' intermission overlay - separate structure file, +* at least. + +; values for Game variable... +EscapeGame equ 21 +PositionPeopleGame equ 25 +PatWalkGame equ 30 ; drop into pat walking around shooting section. +MinTrackingGame equ 127 ; lowest number a game using the +; tracking maps/cd tables can have +TrackingGame equ 128 +RustlingGame equ 140 + + dc.b MO,0 ; 0 + dc.b SO+0,RustlingGame ; 1 - cows + dc.b SO+0,RustlingGame ; 2 + dc.b SO+0,RustlingGame ; 3 + dc.b SO+0,RustlingGame ; 4 + dc.b SO+0,RustlingGame ; 5 + dc.b SO+0,RustlingGame ; 6 + dc.b MO,0 ; 7 + dc.b MO,0 ; 8 + dc.b MO,0 ; 9 + dc.b MO,430-400 ; Santa Fe 10 + dc.b MO,540-400 ; White Oaks 11 + dc.b MO,500-400 ; Lincoln City 12 + dc.b MO,521-400 ; Mesilla 13 + dc.b MO,470-400 ; Roswell 14 + dc.b MO,450-400 ; El Paso 15 + dc.b MO,0 ; spare town 16 + dc.b MO,0 ; spare town 17 + dc.b MO,0 ; spare town 18 + dc.b IO+0,6 ; Fort Stanton 19 + dc.b IO+0,6 ; Fot Sumner 20 + dc.b IO+0,6 ; spare fort 21 + dc.b IO+0,6 ; spare fort 22 + dc.b IO+0,6 ; spare fort 23 + dc.b AO+0,1 ; Unknown ranch near Bitter Lake 24 + dc.b AO+0,1 ; Fritz Ranch25 + dc.b AO+0,1 ; Chisum Ranch 26 + dc.b AO+0,1 ; Dedrick Ranch 27 + dc.b AO+0,1 ; Beckwith Ranch 28 + dc.b AO+0,1 ; Reed ranch 29 + dc.b AO+0,1 ; unknown ranch 30 + dc.b AO+0,1 ; spare ranch 31 + dc.b AO+0,1 ; spare ranch 32 + dc.b AO+0,1 ; spare ranch 33 + dc.b AO+0,1 ; spare ranch 34 + dc.b IO+0,15 ; Mescalero Apache settlement 35 + dc.b IO+0,15 ; spare indians 36 + dc.b IO+0,15 ; spare indians 37 + dc.b IO+0,15 ; spare indians 38 + dc.b AO+0,21 ; train 39 + dc.b IO+0,5 ; wagon train 40 + dc.b SO+0,TrackingGame ; gang hideout: near santa fe 41 + dc.b SO+0,TrackingGame ; gang hideout: nr White Oaks 42 + dc.b SO+0,TrackingGame ; gang hideout: nr Lincoln Cit#y 43 + dc.b SO+0,TrackingGame ; gang hideout: nr Mesilla 44 + dc.b SO+0,TrackingGame ; gang hideout: nr Roswell 45 + dc.b SO+0,TrackingGame ; gang hideout: nr El Paso 46 + dc.b 0,0 ; 47 + dc.b IO+0,3 ; Prospector 48 + dc.b MO+0,0 ; 48 + dc.b MO+0,0 ; 49 + + + + +;--- + even +ENDOBJECTS +;terraintable +list8 +; +;--------- + even +NPCINITIAL +list5 +LIST4 +; new stuff added for AA + +; Menu text, etc. +; First, ptrs for all uses... + dc.w 0 ;MenuText-List4 0 + dc.w 0 ;MenuData-list4 2 + dc.w 0 ;HiresCoords-list4 4 + dc.w 0 ;ExitOffsets-list4 6 + dc.w 0 ;ObjectGraphics-list4 8 + dc.w 0 ;IntroText-list4 10 + dc.w 0 ;NounVerbTable-list4 12 + dc.w PCpalette-list4 14 + dc.w STpalette-list4 16 + dc.w 0 ;kerri-list4 18 + dc.w CGA2Palettes-list4 20 + dc.w CGA4Palettes-list4 ; 22 + dc.w 0 ; 24 + dc.w 0 ; 26 + dc.w 0 ; 28 + dc.w 0 ; 30 + dc.w 0 ; 32 + dc.w 0 ; 34 + dc.w HeightTable-list4 ; 36 + +CGA2Palettes + dc.b $0,$f,$2,$3,$4,$5,$6,$0,$8,$9,$a,$b,$c,$d,$e,$a ; 2 colour text printing + +; All these palettes have had to be modified because +; colour 6 is used for the highlight bar, so cannot be black. +; dc.b $0,$F,$F,$F,$F,$F,$0,$0,$F,$0,$9,$F,$F,$F,$0,$F ; 2 color map + dc.b $0,$F,$F,$F,$F,$F,$3,$0,$F,$0,$9,$F,$F,$F,$0,$F ; 2 color map + +; dc.b $0,$F,$F,$1,$F,$F,$1,$1,$7,$0,$F,$0,$F,$F,$9,$0 ; 2 Pat, Billy & Barbrawl + dc.b $0,$F,$F,$1,$F,$F,$1,$1,$7,$0,$F,$0,$F,$F,$9,$0 ; 2 Pat, Billy & Barbrawl + +; dc.b $0,$F,$7,$1,$F,$9,$1,$0,$7,$0,$F,$F,$F,$F,$A,$F ; 2 Outside Buildings + dc.b $0,$F,$7,$1,$F,$9,$1,$0,$7,$0,$F,$F,$F,$F,$A,$F ; 2 Outside Buildings + + dc.b $0,$F,$9,$0,$0,$0,$F,$0,$A,$A,$F,$F,$F,$F,$7,$F ; 2 Saloons + + +CGA4Palettes + dc.b $0,$F,$2,$3,$4,$5,$7,$0,$8,$9,$a,$b,$c,$d,$e,$a ; 4 colour text printing + dc.b $0,$F,$0,$F,$A,$5,$2,$0,$F,$5,$7,$0,$A,$F,$A,$A ; 4 color map + dc.b $0,$F,$F,$0,$F,$0,$0,$0,$A,$0,$5,$0,$F,$F,$5,$0 ; 4 Pat, Billy & Barbrawl + dc.b $0,$F,$A,$1,$A,$0,$F,$0,$A,$5,$5,$F,$F,$F,$A,$D ; 4 Outside Buildings + dc.b $0,$D,$A,$0,$A,$1,$F,$0,$A,$5,$5,$0,$F,$F,$D,$7 ; 4 Saloons + + +HeightTable +; used in walkabout code to go from the floor map "height adjust" +; packed byte to a value in pixels: kindof an exponential table. + dc.w -12 ;0 + dc.w -8 + dc.w -4 + dc.w 0 + dc.w 4 ;4 + dc.w 8 + dc.w 12 + dc.w 16 + dc.w 20 ;8 + dc.w 24 + dc.w 28 + dc.w 32 + dc.w 36 ;12 + dc.w 40 + dc.w 44 + dc.w 48 + + + + + + +; dc.b 0,$f,$e,$7,$f,$0,$7,$0,$8,$0,$f,$f,$f,$a,$8,$f ; town +; dc.b 0,$f,$f,$f,$0,$0,$a,$0,$8,$a,$8,$0,$0,$9,$0,$f ; people +; dc.b 0,$f,$0,$f,$0,$0,$7,$0,$a,$8,$f,$0,$e,$f,$7,$7 ; train + + +STpalette; also used for VGA +;commonm colours... +transparent equ $0000 ; ok +white equ $666F ; ok +flesh equ $6339 ;light red +Cyan equ $0346 ; ok +Violet equ $203a ; ok +Iblue equ $0263 ;light blue ok +black equ $0000 ;ok +Red equ $2008 ;dark brown ok +Blue equ $0042 ;dark blue ok +Brown equ $320C ;light brown ok +yellow equ $762D ;ok +Lgrey equ $444e; +Dgrey equ $2221 ;ok +Green equ $0304 ;dark green ok +Lgreen equ $1735; +pink equ $526c;orange 520C ;770a +Lcyan equ $0677; Pete 11/9/90 + + +;additional colours, for 'variable colours' only... + +PaleBlue1 equ $2254 +Vyellow equ $770a +;These colours must have IBM equivalents... +BlueGrey equ $223d ;(Mgrey?) +PaleBlue2 equ $3454 +PaleWhite equ $5671 + + + +PcPalette + + dc.w transparent,white,flesh,cyan + dc.w lgreen + dc.w Dgrey ; is Purple in other games. + dc.w iblue,black,Red,Blue,Brown + dc.w lcyan ; >> Pete 11/9/90 + dc.w yellow,Lgrey,Dgrey,Green + + + + + +IntroTables +; filenames for music, and other random stuff. Not necessarily +; just to do with the intro, but called that for compatability +; with the Grange intro sequence + dc.w SystemPalette-IntroTables ; 0 MapMusic-IntroTables ; 0 + dc.w SaveFilename-IntroTables ; 2 + dc.w 0 ; GunfightMusic-IntroTables ; 4 + dc.w 0 ; TrainMusic-IntroTables ; 6 + dc.w 0 ; MapMusic-IntroTables ; 8 + dc.w 0 ; 10 + dc.w StructureFilename-IntroTables ; 12 + dc.w 0 ; 14 + dc.w 0 ; 16 + dc.w AdlibFilename-IntroTables ; 18 + dc.w ExponentTableName-IntroTables ; 20 + dc.w 0 ; 22 + dc.w 0 ; 24 + dc.w 0 ; 26 + dc.w FontFilename-IntroTables ; 28 Font filename + dc.w 0 ; 30 + dc.w MenuStructures-IntroTables ; 32 + dc.w TownSpritesFilename-IntroTables ; map/town sprites filename 34 + dc.w 0 ; ScrollingSpritesFilename-IntroTables ; offset 36 + dc.w ArcadeSpritesFilename-IntroTables ; arcade games sprites filename offset 38 + dc.w 0 ; reserved for fourth sprites filename offset 40 + dc.w 0 ; MenuStructures-IntroTables ; offset 42 + dc.w ArcadeStructureFIlename-IntroTables ; 44 + dc.w 0 ; 46 + dc.w 0 ; 48 + dc.w 0 ; 50 + dc.w 0 ; 52 + dc.w 0 ; 54 + dc.w 0 ; 56 + dc.w 0 ; 58 + dc.w 0 ; 60 + dc.w 0 ; 62 + dc.w 0 ; 64 + dc.w 0 ; 66 + dc.w 0 ; 68 + dc.w LinkingSprites-IntroTables ; offset 70 + dc.w LinkingStructures-IntroTables ; offset 72 + dc.w IntroSprites-IntroTables ; offset 74 + dc.w IntroStructures-IntroTables ; offset 76 + dc.w 0 ; IdentikitSprites-IntroTables ; offset 78 + dc.w IdentikitStructures-IntroTables ; offset 80 + dc.w 0 ; 82 + dc.w 0 ; 84 + dc.w 0 + dc.w 0 + dc.w ScreenInfo-IntroTables ; offset 90 + dc.w 0 ; 92 + dc.w 0 ; 94 + dc.w 0 ; 96 + dc.w 0 ; 98 + dc.w ambushMusic-IntroTables ; 100 + dc.w BankJobMusic-IntroTables ; 102 + dc.w BarBrawlMusic-IntroTables ; 104 + dc.w CardMusic-IntroTables ; 106 + dc.w ChaseMusic-IntroTables ; 108 + dc.w DuelMusic-IntroTables ; 110 + dc.w Generic1Music-IntroTables ; 112 + dc.w Generic2Music-IntroTables ; 114 + dc.w Generic3Music-IntroTables ; 116 + dc.w Generic4Music-IntroTables ; 118 + dc.w Generic5Music-IntroTables ; 120 + dc.w GetawayMusic-IntroTables ; 122 + dc.w HoeDown1Music-IntroTables ; 124 + dc.w HoeDown2Music-IntroTables ; 126 + dc.w 0 ; HonkyMusic-IntroTables ; 128 + dc.w 0 ; Rag3Music-IntroTables ; 130 + dc.w RagTimeMusic-IntroTables ; 132 + dc.w ShockMusic-IntroTables ; 134 + dc.w ShootOutMusic-IntroTables ; 136 + dc.w ThemeMusic-IntroTables ; 138 + dc.w TrainMusic-IntroTables ; 140 + dc.w ShootOut2Music-IntroTables ; 142 + dc.w ShootOut3Music-IntroTables ; 144 + dc.w 0 ; 146 + dc.w 0 ; 148 +UghSampleNum equ 150 + dc.w UghSample-IntroTables ; 150 +Colt45SampleNum equ 152 + dc.w Colt45Sample-IntroTables ; 152 + dc.w 0 ; 154 + dc.w 0 ; 156 + dc.w 0 ; 158 + dc.w 0 ; 160 + dc.w 0 ; 162 + dc.w 0 ; 164 + dc.w 0 ; 166 + dc.w 0 ; 168 + dc.w 0 ; 170 + dc.w 0 ; 172 + dc.w 0 ; 174 + dc.w 0 ; 176 + dc.w 0 ; 178 + dc.w ShootoutSamples-IntroTables ; 180 + dc.w DuelSamples-IntroTables ; 182 + dc.w RustlingSamples-IntroTables ; 184 + dc.w TrackingSamples-IntroTables ; 186 + dc.w EscapeSamples-IntroTables ; 188 + dc.w BankJobSamples-IntroTables ; 190 + dc.w CardSamples-IntroTables ; 192 + dc.w BrawlSamples-IntroTables ; 194 + dc.w IntroSamples-IntroTables ; 196 + +ExponentTableName + dc.b 'exponent.025',0 + even + + +IntroSamples + dc.b Colt45SampleNum/2 + dc.b 0 + +ShootOutSamples +; list of sample pointers needed for shootout + dc.b Colt45SampleNum/2 + dc.b 0 + +DuelSamples + dc.b Colt45SampleNum/2 + dc.b 0 * 182 +RustlingSamples + dc.b 0 *184 +TrackingSamples + dc.b 0 ; 186 +EscapeSamples + dc.b Colt45SampleNum/2 + dc.b 0 ; 188 +BankJobSamples + dc.b 0 ; 190 +CardSamples + dc.b 0 ; 192 +BrawlSamples + dc.b UghSampleNum/2 + dc.b 0 ; 180 + +Colt45Sample dc.b 'colt45.spl',0 + even +UghSample dc.b 'ugh.spl',0 + even + + +SaveFilename dc.b 'billy.sav',0 + even + +ambushMusic dc.b 'ambushv2.mid',0 + even +BarBrawlMusic dc.b 'barbrawl.mid',0 + even +CardMusic dc.b 'cardv2.mid',0 + even +ChaseMusic dc.b 'Chasev2.mid',0 + even +DuelMusic dc.b 'duel.mid',0 + even +Generic1Music dc.b 'generic.mid',0 + even +Generic2Music dc.b 'gen2v3.mid',0 + even +Generic3Music dc.b 'generic3.mid',0 + even +Generic4Music dc.b 'generic4.mid',0 + even +Generic5Music dc.b 'generic5.mid',0 + even +HoeDown1Music dc.b 'hoedown1.mid',0 + even +HoeDown2Music dc.b 'hoedown2.mid',0 + even +;;HonkyMusic dc.b 'honky1v2.mid',0 + even +;Rag3Music dc.b 'rag3.mid',0 +; even +RagTimeMusic dc.b 'ragtime.mid',0 + even +ShockMusic dc.b 'shockv2.mid',0 + even +ShootOutMusic dc.b 'shootout.mid',0 + even +ShootOut2Music dc.b 'shootut2.mid',0 + even +ShootOut3Music dc.b 'shootut3.mid',0 + even +ThemeMusic dc.b 'map.mid',0 + even +GetawayMusic dc.b 'Getwayv3.mid',0 + even +BankJobMusic dc.b 'BankJbV2.mid',0 + even +TrainMusic dc.b 'train.mid',0 + even + + + +ArcadeSpritesFilename + dc.b 'arcades1.cmp',0 + even + +ArcadeStructureFilename + dc.b 's3.dat',0 * 'desert7.fnt',0 + even + + + +IntroSprites + dc.b 'introsp1.cmp',0 + even +IntroStructures + dc.b 'intros.dat',0 + even + +NoDelay equ 2 +LongTime equ 3000 +DefaultX equ 32 +DefaultY equ 32 +LowY equ 112 +dInsert equ 0 +dInsertR equ 2 +dRemove equ -1 +ScreenInfo +; for intro sequence: contains which picture to display, +; and for how many frames. +; parameters are: +; pic num, frames, soundtrack, repeat count for music + dc.w 99,100,HoeDown2Music-IntroTables,0 * title picture + dc.w 100, 230, RagTimeMusic-IntroTables, 0 ; street scene outside dance hall + dc.w 101, 50, music1, 0 ; blacksmith + dc.w 2001, NoDelay, DefaultX,DefaultY,dInsert + dc.w 102, 200, ChaseMusic-IntroTables, 0 ; street scene, scrolls after half time + dc.w 103, 210, music1, 0 ; possee in valley + + dc.w 104, 110, HoeDown1Music-IntroTables, 0 ; hoe down scene, dancers + dc.w 2002, NoDelay, DefaultX,DefaultY,dInsert + + dc.w 105, 300, 0, 0 ; talk 1 (inside) + dc.w 2003, NoDelay, DefaultX+16,LowY,dInsert + dc.w 2003, 79, DefaultX+16,LowY,dRemove + dc.w 2004, 100, DefaultX-16,LowY,dInsertR + dc.w 2004, 190, DefaultX-16,LowY,dRemove + dc.w 2005, 220, DefaultX+16,LowY,dInsertR + + dc.w 106, 95, HoeDown2Music-IntroTables, 0 ; talk outside + dc.w 2006, NoDelay, DefaultX+48,LowY+32,dInsert + + dc.w 107, 150, 0, 0 ; buggy from distance, scrolls. + dc.w 2007, 90, DefaultX,DefaultY,dInsertR + dc.w 2007, 100,DefaultX,DefaultY,dRemove + + dc.w 108, 70, ShootOutMusic-IntroTables, 0 ; buggy, bandit in F/G + + dc.w 109, 250, 0, 0 ; Tunstall propped on wheel + dc.w 2008, NoDelay, DefaultX,LowY,dInsert + dc.w 2008, 80, DefaultX,LowY,dRemove + dc.w 2009, 100, DefaultX,LowY,dInsertR + +; dc.w 2300, 50, RagTimeMusic-IntroTables,0 ; town scene walkabout in front of bank +; dc.w 2010, NoDelay, DefaultX,DefaultY,dInsert ; Generic text +; dc.w 2304, 50, RagTimeMusic-IntroTables,0 ; dancers +; dc.w 2011, NoDelay, DefaultX,DefaultY+16,dInsert ; Billy text +; +; dc.w 2303, 50, RagTimeMusic-IntroTables,0 ; shootout1 +; dc.w 2012, NoDelay, DefaultX,DefaultY,dInsert ; Billy Text 2 +; +; dc.w 2301, 50, RagTimeMusic-IntroTables,0 ; shop +; dc.w 2013, NoDelay, DefaultX,DefaultY,dInsert ; Pat Text 1 +; dc.w 2302, 50, RagTimeMusic-IntroTables,0 ; shootout2 +; dc.w 2014, NoDelay, DefaultX,DefaultY,dInsert ; Pat Text 2 + dc.w -1,-1,-1 + +music1 equ 0 * no music at present + + +IdentikitStructures + dc.b 'identiks.dat',0 + even + +LinkingSprites + dc.b 'linking1.cmp',0 + even + +LinkingStructures + dc.b 'linkings.dat',0 + even + + +SystemPalette +; palette for returning to system on ST ONLY +; to the ega colors. + dc.w $777f ; 0000 ; transparent/black + dc.w $0000 ; 777f ; white + dc.w $3330 ; + dc.w $0000 ; 777f ; + dc.w $0004 ; + dc.w $777a ; + dc.w $3333 ; + dc.w $7770 ; + dc.w $0008 ; + dc.w $7772 ; + dc.w $333c ; + dc.w $7776 ; + dc.w $000d ; yellow + dc.w $777e ; lgrey + dc.w $3331 ; dgrey + dc.w $7774 ; green + +;----------------------------------------- + +AdlibFilename + dc.b 'all.adl',0 + even + +TownSpritesFilename + dc.b 'sprites1.cmp',0 + even + +FontFilename + dc.b 'western.fnt',0 + even + +StructureFilename + dc.b 's.dat',0 + even + + + include 'MENUDATA.TXT',0 + + +;------------------ +TownFixedData ; a list on its own + dc.w TownPeopleData-TownFixedData ; 0 + dc.w TownData-TownFixedData ; 2 + dc.w SubPlotData-TownFixedData ; 4 + dc.w IdentikitPrototypes-TownFixedData ; 6 + + +IdentikitPrototypes +; For each person type we have a list of entries of the following +; form: +; .b First XZH (0 terminates person) +; .b Number of XZHs possible (1 upwards) +; .b First RasterOffset +; .b Number of Raster Offsets to choose from (0 upwards) + dc.w BlankPerson-TownFixedData * type 0 person + dc.w Type1Person-TownFixedData * tough cowboy + dc.w Type2Person-TownFixedData * mexican + dc.w Type3Person-TownFixedData + dc.w Type4Person-TownFixedData + dc.w Type5Person-TownFixedData + dc.w Type6Person-TownFixedData + dc.w Type7Person-TownFixedData + dc.w Type8Person-TownFixedData + dc.w Type9Person-TownFixedData + dc.w Type10Person-TownFixedData + dc.w Type11Person-TownFixedData + dc.w Type12Person-TownFixedData + dc.w Type13Person-TownFixedData + dc.w Type14Person-TownFixedData + dc.w Type15Person-TownFixedData + dc.w Type16Person-TownFixedData + dc.w Type17Person-TownFixedData + dc.w Type18Person-TownFixedData ; sick man etc. + dc.w Type19Person-TownFixedData ; mex peasant. + dc.w Type20Person-TownFixedData ; soldier + dc.w Type21Person-TownFixedData ; Clint, with cape. + +BlankPerson +* used for people like Indian chief, prospector who +* are already shown in the picture, so don't need to be +* shown separately + dc.b 0,0,0,0 + +Type1Person +* Cowboy, jerkin, black hat, moustache +* As used in room 430 (Santa Fe) + dc.b 24,1,0,1 ; neck: closed, for string tie + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: not greying +; no sideburns +; no waistcoat + dc.b 27,1,3,1 ; trouser: blue jeans + dc.b 29,1,0,1 ; gunbelt + + dc.b 25,1,0,1 ; shirt + + dc.b 33,1,0,0 ; string tie +; dealer's armbands not used. + dc.b 35,1,0,1 ; jacket + dc.b 38,1,0,1 ; hands + dc.b 42,1,1,1 ; hat: always the same. + dc.b 0,0,0,0 + +Type2Person +* Mexican cross-breed, as used in 431 (Santa Fe) + dc.b 23,1,0,1 ; neck - open + dc.b 19,1,0,1 ; mexican neck overlay + dc.b 1,1,0,18 ; face + dc.b 20,1,4,1 ; top of head + dc.b 21,1,0,4 ; hair +;; dc.b 22,1,0,2 ; sideburn + dc.b 27,1,2,1 ; trousers: brown + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 47,1,0,1 ; bandolero +;; dc.b 35,2,0,1 ; jacket + dc.b 45,1,0,1 ; Mexican hands + dc.b 42,1,1,2 ; hat, one of two brown ones. + dc.b 0,0,0,0 + +Type3Person +* Old male American, as used in 433 Santa Fe. + dc.b 23,1,0,1 ; neck - open collar + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,9,1 ; hair - white beard +; no sideburn + dc.b 27,1,2,1 ; trouser +; no belt + dc.b 25,1,0,1 ; shirt +; no braces + dc.b 26,1,0,1 ; brown waistcoat +; no tie +; no jacket + dc.b 38,1,0,1 ; hands + dc.b 42,1,2,1 ; hat: brown felt + dc.b 0,0,0,0 + +Type4Person +* Old male in dungarees + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,8,8 ; hair - greying + dc.b 25,1,0,1 ; shirt + dc.b 31,1,0,1 ; Dungarees + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type5Person +* General tough guy - used for cowboys around town, where +* I haven't put in a specific prototype for them. + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 35,3,0,1 ; jacket: brown or grey. + dc.b 38,1,0,1 ; hands + dc.b 42,1,0,3 ; hat, any. + dc.b 0,0,0,0 + +Type6Person +* tough guy for 434 Santa Fe + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; no sideburns + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 37,1,0,1 ; jacket: grey. + dc.b 38,1,0,1 ; hands + dc.b 42,1,2,1 ; hat: brown felt + dc.b 0,0,0,0 + +Type7Person +; hostess for santa fe + dc.b 52,1,1,1 * body - yellow + dc.b 2,1,0,3 * face - reduced from choice of 7 to ensure youth! +;; dc.b 53,1,0,1 * skirt +; dc.b 54,1,0,1 * belt + dc.b 61,1,0,1 * hand with tray. + dc.b 51,1,0,1 * hair - yellow + dc.b 0,0,0,0 + +Type8Person +; older woman +; dc.b 57,1,0,2 * blouse + dc.b 52,1,0,1 * body - blue + dc.b 2,1,0,7 * face +; dc.b 56,1,0,1 * skirt +; dc.b 54,1,0,1 * belt + dc.b 63,1,0,1 * both hands - for 57 blouse + dc.b 51,1,2,1 * hair - greying + dc.b 0,0,0,0 + +Type9Person +; woman in green + dc.b 52,0,2,1 * body +; dc.b 58,1,0,1 * blouse - fits over body + dc.b 2,1,0,3 * face * reduced from 7 to reduce age +;; dc.b 59,1,0,1 * skirt + dc.b 60,1,0,1 * both hands + dc.b 51,1,0,4 * hair - any + dc.b 0,0,0,0 + +Type10Person +; Mexican with big Sombrero + dc.b 24,1,0,1 ; neck - buttoned (so can't see pink skin underneath) +;; dc.b 23,1,0,1 ; neck - open + dc.b 19,1,0,1 ; mexican neck overlay + dc.b 1,1,180,1 ; face - Mexican + dc.b 20,1,4,1 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 46,1,0,1 ; Neckerchief or similar. 1 only, else can see +; the pink skin underneath! + dc.b 35,3,0,1 ; jacket: brown or grey. + dc.b 45,1,0,1 ; Mexican hands + dc.b 41,1,0,1 ; big Sombrero + dc.b 0,0,0,0 + +Type11Person +; Shop man, soberly dressed. + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,16 ; hair: any + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 28,1,0,1 ; belt + dc.b 25,1,0,1 ; shirt + dc.b 32,1,0,2 ; tie +; dealer's armbands not used. + dc.b 37,1,0,1 ; jacket: suit + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type12Person +; shop man, randomly dressed. + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,16 ; hair: any + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 28,1,0,1 ; belt + dc.b 25,1,0,1 ; shirt + dc.b 32,2,0,2 ; tie + dc.b 26,1,0,2 ; waistcoat + +; dealer's armbands not used. + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type13Person +; clerk with visor, for wire/bank + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,16 ; hair: any + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 28,1,0,1 ; belt + dc.b 25,1,0,1 ; shirt + dc.b 32,1,0,2 ; tie + dc.b 26,1,0,2 ; waistcoat +; dealer's armbands not used. + dc.b 38,1,0,1 ; hands + dc.b 40,1,0,1 ; visor +; no hat + dc.b 0,0,0,0 + +Type14Person +; lady in green skirt, as walking all over the place. + dc.b 52,1,2,1 * body +; dc.b 58,1,0,1 * green blouse - fits over body + dc.b 2,1,0,7 * face +;; dc.b 59,1,0,1 * skirt + dc.b 60,1,0,1 * both hands + dc.b 51,1,0,4 * hair - any + dc.b 0,0,0,0 + +Type15Person +; lady in blue skirt, as walking all over the place. + dc.b 52,1,0,1 * body + dc.b 58,1,0,1 * blouse - fits over body + dc.b 2,1,0,7 * face +;; dc.b 59,1,0,1 * skirt + dc.b 60,1,0,1 * both hands + dc.b 51,1,0,4 * hair - any + dc.b 0,0,0,0 + +Type16Person +; barman (e.g. Santa Fe) + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any non-greying + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 25,1,0,1 ; shirt + dc.b 30,1,0,1 ; braces + dc.b 32,2,0,2 ; tie + dc.b 34,1,0,1 ; dealer's armbands (around elbow). Must be before waistcoat + dc.b 26,1,0,1 ; waistcoat: brown + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + + +Type17Person +* tough guy in saloon for 560 Santa Fe + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; no sideburns + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 37,1,0,1 ; jacket: grey. + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type18Person +* sick man or poor peasant - e.g. in desert + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,8,7 ; hair: any greying. + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,2,2 ; trousers: brown/blue + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 35,1,0,1 ; jacket: jerkin + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type19Person +* mexican peasant - e.g. in desert. + dc.b 24,1,0,1 ; neck - buttoned (so can't see pink skin underneath) + dc.b 19,1,0,1 ; mexican neck overlay + dc.b 1,1,180,1 ; face + dc.b 20,1,4,1 ; top of head + dc.b 21,1,0,7 ; hair: any not greying. +; no sideburns + dc.b 27,1,2,2 ; trousers: brown/blue + dc.b 25,1,0,1 ; shirt + dc.b 45,1,0,1 ; Mexican's hands + dc.b 46,1,0,1 ; Neckerchief or similar. 1 only, else can see +; the pink skin underneath! +; dealer's armbands not used. + dc.b 35,1,0,1 ; jacket: jerkin + dc.b 45,1,0,1 ; Mexican hands + dc.b 41,1,0,1 ; big Sombrero + dc.b 0,0,0,0 + +Type20Person +; Soldier for forts + dc.b 44,1,0,1 ; complete corporal except face + dc.b 1,1,0,18 ; face + dc.b 0,0,0,0 + +Type21Person +* Clint Eastwood look alike - with cape. e.g. 436 Santa Fe. + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; no sideburns + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt + dc.b 49,1,0,1 ; cape + dc.b 38,1,0,1 ; hands + dc.b 42,1,2,1 ; hat: brown felt + dc.b 0,0,0,0 + + + +; + dc.b 0,0,0,0 + + +; people type is only currently used to give people +; a name of the right sex. + +YAM equ 0 ; young american male +OAM equ 1 ; old american male +YAF equ 2 ; young american female +OAF equ 3 ; old american female + +YMM equ 4 ; young Mexican male +OMM equ 5 ; old Mexican male +YMF equ 6 ; young Mexican female +OMF equ 7 ; old Mexican female + +YIM equ 8 ; young Indian male +OIM equ 9 ; old Indian male +YIF equ 10 ; young Indian female +OIF equ 11 ; old Indian female + +TownPeopleData +; 8 bytes per person: initial data for all people. +; Because people who have small versions need to go +; into Hires() at run-time: it is important to fit +; all these people into the first 50-or-so objects. +; Otherwise the amount of memory required for ObjectTable() is going +; to increase. + +ML equ 200 +; Room number is either: +; - room number in walkabout section - e.g. 30..50 for Santa Fe +; - or for map locations: ML+"LOCATION". These are mutually exclusive + + +PB equ 620 * base for people's xzh objects +DefaultMenu equ 0 * menu number divided by 2 +Default2ndMenu equ 0 * menu number divided by 2: this is +* the menu it goes to if we get back to the default menu +NoPerson equ 254 ; room number for a person which doesn't exist + +; Names - at message 1000+number specified +WhiskeyPete equ 160 +JoeDunn equ 161 +NedParkin equ 162 +KarlBekkert equ 163 +JackShoe equ 164 +BenDavis equ 165 +WarrenOaks equ 166 +WayneRodgers equ 167 +AshUpton equ 168 +ChiefHow equ 169 +RickSands equ 170 +RickRider equ 171 + +LauraPicket equ 210 +WilmaKatz equ 211 +MissRosy equ 212 +LaviniaStrumpet equ 213 ;**** not present. +MrsMcSween equ 214 +girlfriend equ 215 + +NoName equ 0 + +; person 0 (not used...) + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations / 2 + dc.b 1 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 1 430 Santa Fe: Jerkin guy leaning S. + dc.b 30 ; room number in which person appears =255 for end of this table. + dc.b 620-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations / 2 + dc.b 1 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 2 431 Santa Fe: Waistcoat guy sitting S + dc.b 31 ; room number in which person appears =255 for end of this table. + dc.b 621-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 2 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 3 433 Santa Fe: Old guy Waistcoat, sitting S. + dc.b 33 ; room number in which person appears =255 for end of this table. + dc.b 622-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 3 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 4 434 Santa Fe Guy Leaning S, flipping coin. + dc.b 34 ; room number in which person appears =255 for end of this table. + dc.b 623-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 6 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 5 - 435 Santa Fe: Mexican sitting S + dc.b 35 ; room number in which person appears =255 for end of this table. + dc.b 628-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 10 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 6 436 Santa Fe: Clint, leaning E + dc.b 36 ; room number in which person appears =255 for end of this table. + dc.b 623-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 21 ; identikit type prototype to use - caped! + dc.b Default2ndMenu,NoName,0,YAM + +; person 7 437 Santa Fe: Guy sitting E. + dc.b 37 ; room number in which person appears =255 for end of this table. + dc.b 622-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 8: 432 Santa Fe: lady green skirt + dc.b 32 ; room number in which person appears =255 for end of this table. + dc.b 640-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 14 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 9: 450 El Paso: Lady standing S. + dc.b 50 ; room number in which person appears =255 for end of this table. + dc.b 638-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 8 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAF + +; person 10: 451 El Paso: Rocker + dc.b 51 ; room number in which person appears =255 for end of this table. + dc.b 635-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 11: 453 El Paso: Mexican Sitting S + dc.b 53 ; room number in which person appears =255 for end of this table. + dc.b 628-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 10 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 12: 455 El Paso: Mexican Sitting S + dc.b 55 ; room number in which person appears =255 for end of this table. + dc.b 628-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 10 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 13: 470 Roswell: Guy sitting E + dc.b 70 ; room number in which person appears =255 for end of this table. + dc.b 632-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 14: 472 Roswell: Lady green Skirt. + dc.b 72 ; room number in which person appears =255 for end of this table. + dc.b 640-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 14 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 15: 473 Roswell: Lady standing S. + dc.b 73 ; room number in which person appears =255 for end of this table. + dc.b 638-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 8 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAF + +; person 16: 501 Lincoln City: Lady standing S. + dc.b 101 ; room number in which person appears =255 for end of this table. + dc.b 638-PB ; xzh number used to represent person (0 if none, or any +; xzh + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 8 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAF + +; person 17: 502 Lincoln City: Rocker + dc.b 102 ; room number in which person appears =255 for end of this table. + dc.b 15 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 18: 504 Lincoln City: Lady Blue Skirt + dc.b 104 ; room number in which person appears =255 for end of this table. + dc.b 641-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b WidowWomanMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 19: 504 Lincoln City: rocker + dc.b 104 ; room number in which person appears =255 for end of this table. + dc.b 636-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 20: 522 Mesilla: Lady Green Skirt + dc.b 122 ; room number in which person appears =255 for end of this table. + dc.b 640-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b WidowWomanMenu/2 ; Current menu to use in conversations + dc.b 14 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 21: 523 Mesilla: Guy leaning S, flipping a coin. + dc.b 4 ; room number in which person appears =255 for end of this table. + dc.b 624-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 6 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 22: 540 White Oaks: Rocker + dc.b 140 ; room number in which person appears =255 for end of this table. + dc.b 635-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 3 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 23: Undertaker Santa Fe + dc.b 1 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 24: Undertaker El Paso + dc.b 2 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 25: Undertaker Roswell + dc.b 3 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 26: Wire office man Santa Fe + dc.b 5 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 27: Wire Office man El Paso + dc.b 6 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 28: News office man Santa Fe + dc.b 8 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 29: News office man El Paso + dc.b 9 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 30: News office man White oaks + dc.b 10 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 31: bank Santa Fe + dc.b 12 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 32: bank El Paso + dc.b 13 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 33: bank Roswll + dc.b 14 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 34: bank Lincoln City + dc.b 15 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 35: bank Mesilla + dc.b 16 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 36: bank White Oaks + dc.b 17 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 37: Livery person Santa Fe + dc.b 19 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 38: Livery person El Paso + dc.b 20 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 39: Livery person Licoln City + dc.b 21 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 40: Livery person White Oaks + dc.b 22 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 41: Doctors El Paso + dc.b 24 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 42: Doctors Mesilla + dc.b 25 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 43: Store man El Paso + dc.b 60 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 44: Murphy Dolan Man in Lincoln + dc.b 62 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 156/2 ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 45: Store Man Roswell - Ash Upton + dc.b 61 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b AshUptonMenu/2 ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,AshUpton,0,YAM + +; person 46: Store man White Oaks + dc.b 63 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 47: unused + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 48: Laura Picket at Hotel in El Paso + dc.b 66 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b LauraPicketMenu/2 ; Current menu to use in conversations + dc.b 9 ; identikit type prototype to use + dc.b Default2ndMenu,LauraPicket,0,YAM + +; person 49: girl in house/Lincoln City + dc.b 69 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b GirlFriendMenu/2 ; Current menu to use in conversations + dc.b 9 ; identikit type prototype to use + dc.b Default2ndMenu,Girlfriend,0,YAF + +; person 50: hostess in Santa Fe Saloon (560) + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 639-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 14/2 ; Current menu to use in conversations + dc.b 7 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + + +; person 51: Store man Santa Fe + dc.b 64 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 52: barman in Santa Fe. + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 12/2 ; Current menu to use in conversations + dc.b 16 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + + + + +; people to meet at random in desert have room numbers 190..197 + + + + +; people that either Pat or Billy can meet... +; person 53: person to meet at random in desert by Anglo farmers. +; peasant being run off land + dc.b 190 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 50/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (Mexican peasant) + dc.b Default2ndMenu,NoName,0,YAM + +; person 54: person to meet at random in desert. +; mexican being picked on. + dc.b 191 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 58/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (peasant) + dc.b Default2ndMenu,NoName,0,YAM + +; person 55: person to meet at random in desert. +; sick man + dc.b 192 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 58/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (Mexican) + dc.b Default2ndMenu,NoName,0,YAM + +; person 56: person to meet at random in desert. + dc.b 193 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 62/2 ; Current menu to use in conversations + dc.b 18 ; identikit type prototype to use (sick man) + dc.b Default2ndMenu,NoName,0,YAM + + + + + +; people that only Billy can meet... +; person 57: person to meet at random in desert. +; peasant wants help nursing his family + dc.b 194 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 104/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (peasant with sick family) + dc.b Default2ndMenu,NoName,0,YAM + + + +; person 58: person to meet at random in desert. +++UNUSED+++ + dc.b NoPerson ; 195 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; people that only Pat can meet... +; person 59: person to meet at random in desert. +; Texan possee + dc.b 196 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 76/2 ; Current menu to use in conversations + dc.b 6 ; identikit type prototype to use (Possee representative) + dc.b Default2ndMenu,NoName,0,YAM + +; person 60: person to meet at random in desert. +; Barney Mason + dc.b 197 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 80/2 ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use (Barney Mason) + dc.b Default2ndMenu,NoName,0,YAM + +; person 61: person to meet at random in desert. +++UNUSED+++ + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 62: person to meet at random in desert. +++UNUSED+++ + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 63: woman being bothered by a gunslinger in saloon. El Paso 2 + dc.b 168 ; room number in which person appears =255 for end of this table. + dc.b 637-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 54/2 ; Current menu to use in conversations + dc.b 9 ; identikit type prototype to use (young Woman Green Skirt) + dc.b Default2ndMenu,NoName,0,YAF + +; person 64 560 Santa Fe (Saloon): guy drinking at bar. Shirt/brown trousers +; Ned Parkin + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 630-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b NedParkinMenu/2 ; Current menu to use in conversations / 2 + dc.b 1 ; identikit type prototype to use + dc.b Default2ndMenu,NedParkin,0,YAM + +; person 65 560 Santa Fe (Saloon): guy at table. Grey jack/jeans + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b BenDavisMenu/2 ; Current menu to use in conversations / 2 + dc.b 17 ; identikit type prototype to use + dc.b Default2ndMenu,BenDavis,0,YAM + +; person 66 562 Santa Fe (Saloon): guy at table. Grey jack/brown trousers + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 17 ; identikit type prototype to use + dc.b Default2ndMenu,KarlBekkert,0,YAM + +; person 67 soldier at Fort Stanton + dc.b ML+19 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 20 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 68 soldier at Fort Sumner + dc.b ML+20 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 66/2 ; Current menu to use in conversations: army being cheated + dc.b 20 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 69 - at Bitter lake ranch + dc.b ML+24 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 70 - at Fritz Ranch + dc.b ML+25 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 71 - at Chisum Ranch + dc.b ML+26 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 72 - Dedrick Ranch + dc.b ML+27 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations - Indians not getting beef + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 73 - at Beckwith Ranch + dc.b ML+28 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 74 - Mrs McSween - at Tunstall Ranch + dc.b ML+29 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 134/2 ; Current menu to use in conversations - Indians not getting beef + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,MrsMcSween,0,OAF + + +; person 75 - at Reed Ranch + dc.b ML+30 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 76 - Indian chief at Mescalero + dc.b ML+35 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 92/2 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,ChiefHow,0,OIM + + +; person 77 - prospector + dc.b ML+48 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b ProspectorMenu/2 ; Current menu to use in conversations - prospector + dc.b 0 ; identikit type prototype to use + dc.b 136/2,WhiskeyPete,0,YAM + +; person 78 - Joe Grant. +; appears in saloon in Santa Fe (triggered by WALKABOUT.TXT) + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 128/2 ; Current menu to use in conversations - Indians not getting beef + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; A few special objects which you can select in town - e.g. +; the wanted posters. +; person - 79 - wanted poster. Not Very talkative! + dc.b 0 ; room number in which person appears =255 for end of this table. + dc.b 642-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 80 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 81 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 82 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 83 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person 84 - gambler + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 1 ; object number used to represent person (should be 2658) + dc.b CardGameMenu/2 ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,0,0,OAF + + + +; person 85 - Jose Miguel thingy +; interrupts player looking at map + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; default menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 86 - guy at bar in Santa Fe 2 (LHS): +; grey jacket, blue jeans, brown hat, blue neckerchief + dc.b 170 ; room number in which person appears =255 for end of this table. + dc.b 631-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SpillDrinkMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 87 - guy at bar in Santa Fe 2 (LHS): +; Grey jacket, brown waistcoat, grey jacket. Cigarette in mouth +;' grey hat + dc.b 170 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; default menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 88 - guy at bar in El Paso 1 (LHS): +; Grey jacket, blue jeans, blue neckerchief, brown hat + dc.b 166 ; room number in which person appears =255 for end of this table. + dc.b 631-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b JackShoeMenu/2 ; default menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,JackShoe,0,YAM + + +; person 89 - guy at bar in El Paso 1 (LHS): +; Grey jacket, brown waistcoat, grey jacket. Cigarette in mouth +;' grey hat + dc.b 166 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 90 566 El Paso (Saloon): guy at table. Grey jack/blue trousers + dc.b 166 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SpillDrinkMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 91 568 El Paso (Saloon 2): guy at table. Grey jack/brown trousers + dc.b 168 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,RickSands,0,YAM + + +; person 92 574 Roswell (Saloon): guy at bar. Brown jacket, grey +; trousers, white neckerchief, brown hat. + dc.b 174 ; room number in which person appears =255 for end of this table. + dc.b 630-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b BenDavisMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 93 574 Roswell (Saloon): guy at table +; trousers, white neckerchief, brown hat. + dc.b 174 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 94 573 Roswell (Saloon): guy at table +; tbrown trousers, grey jacket, blue neckerchief, brown hat + dc.b 173 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b RickRiderMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,RickRider,0,YAM + +; person 95 573 Roswell (Saloon): guy at table +; grey trousers, grey jacket, brown waistcoat, grey hat + dc.b 173 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 95 565 Lincoln city (Saloon): guy at table +; blue trousers, grey jacket, grey hat + dc.b 165 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 96 565 Lincoln city (Saloon): guy at table +; grey trousers, grey jacket, brown waistcoat, grey hat + dc.b 165 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 97 565 Lincoln city (Saloon): guy at bar +; grey trousers, brown jacket, brown hat + dc.b 165 ; room number in which person appears =255 for end of this table. + dc.b 630-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SpillDrinkMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 98 569 Mesilla (Saloon): guy at table +; blue trousers, grey jacket, grey hat + dc.b 169 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,WarrenOaks,0,YAM + + +; person 99 572 White Oaks (Saloon): guy at table +; grey trousers, brown jacket, brown hat +; Slightly Mexican appearance, with big black moustache + dc.b 172 ; room number in which person appears =255 for end of this table. + dc.b 634-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,WayneRodgers,0,YAM + + +; person 100 Tom O'Foliard +; grey trousers, grey jacket, brown waistcoat, grey hat + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + + +; person 101 - Wilma Katz - at Katz farmhouse (31) + dc.b ML+31 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b WilmaKatzMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,WilmaKatz,0,OAF + +; person 102 - at Dunn Farmhouse (32) + dc.b ML+32 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b LonelyFarmhouseMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,MrsMcSween,0,OAF + +; person 103 - at Rose Farmhosue (33) + dc.b ML+33 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b LonelyFarmhouseMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,MissRosy,0,OAF + + + dc.b 255 ; end of table. + + + +TownData +; 16 bytes per town +; town 10: Santa Fe + dc.w 10 ; increase in gold per time unit. + dc.w 200 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 11: White Oaks + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 12: Lincoln City + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 13: Mesilla + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 14: Roswll + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 15: El Paso + dc.w 8 ; increase in gold per time unit. + dc.w 150 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + + +SubPlotData +; There is a table containing all the bits of information +; people may want to know about: in TownVarData. +; This is initialised from a table of identical format +; in TownFixedData (except that offsets are relative to the +; start of this little table, wheras in TownVarData they +; are relative to TownVarData). The copy routine makes the +; appropriate conversion. +; +; 10 pointers at start... + dc.w EndSubPlotData-SubPlotData + dc.w SPMoney-SubPlotData ; .w Offset of "Money Location" information. + dc.w SPDeputies-SubPlotData ; .w Offset of "Deputies Location" information. + dc.w SPGangs-SubPlotData ; .w Offset of "Gang Location" information + dc.w SPRobbery-SubPlotData ; .w Offset of "Recent robbery" information + dc.w SPSubPlots-SubPlotData ; .w Offset of sub-plot table. + dc.w SPHidden-SubPlotData ; .w Offset of "Hidden things" table for map + dc.w CommsInfo-SubPlotData ; .w offset of "things the other computer wants +; to know about. + dc.w 0 + dc.w 0 + dc.w 0 + +CommsInfo + dc.b 0 * not used + dc.b 0 * LOCATION of pat + dc.b 0 * LOCATION of Billy + + even + +SPHidden +; table for map containing one byte for every object on map. +; If zero, it will be displayed (unless overridden elsewhere) +; If one, it will be hidden. This is used for making e.g. +; farmhouses disappear after we've used their subplots + dc.b 0,0,0,0,0,0,0,0 ; 0..7 + dc.b 0,0,0,0,0,0,0,0 ; 8..15 + dc.b 0,0,0,0,0,0,0,0 ; 16..23 + dc.b 0,0,0,0,0,0,0,0 ; 24..31 + dc.b 0,0,0,0,0,0,0,0 ; 32..39 + dc.b 0,0,0,0,0,0,0,0 ; 40..47 + dc.b 0,0,0,0,0,0,0,0 ; 48..55 + + +; First word in every entry is 0 if nothing to know. +; 255. if hidden (doesn't appear on map) but can be told to player, +; 254. if hidden (doesn't appear on map) and cannot be told to player. +; non-zero if there is some piece +; of information that may be required. +; Second word is a numerical parameter for several of the +; items. These are coded specially. +; Third and fourth words unused presently. +; fourth to seventh words are four message numbers to print, +; in order. If =FFFF print the numeric parameter. +; If <10, print the appropriate paramter, numbered from +; 2 in steps of 2. - it will be a location name, to choose the message +; from 1000... + +SPMoney + dc.w 1,1000,0,0,966,1010,0,0 ; .w,.w Gold in Bank at town 0 + dc.w 1,400,0,0,966,1011,0,0 ; .w,.w Gold in Bank at town 1 + dc.w 1,400,0,0,966,1012,0,0 ; .w,.w Gold in Bank at town 2 + dc.w 1,400,0,0,966,1013,0,0 ; .w,.w Gold in Bank at town 3 + dc.w 1,400,0,0,966,1014,0,0 ; .w,.w Gold in Bank at town 4 + dc.w 1,400,0,0,966,1015,0,0 ; .w,.w Gold in Bank at town 5 + dc.w -1,-1 + +SPDeputies + dc.w 1,2,0,0,972,$ffff,973,1010 ; .w,.w Number of deputies in town 0 + dc.w 1,0,0,0,972,$ffff,973,1011 ; .w,.w Number of deputies in town 1 + dc.w 1,0,0,0,972,$ffff,973,1012 ; .w,.w Number of deputies in town 2 + dc.w 1,0,0,0,972,$ffff,973,1013 ; .w,.w Number of deputies in town 3 + dc.w 1,0,0,0,972,$ffff,973,1014 ; .w,.w Number of deputies in town 4 + dc.w 1,0,0,0,972,$ffff,973,1015 ; .w,.w Number of deputies in town 5 + dc.w -1,-1 + +SPGangs + dc.w 1,0,0,0,962,1041,965,1010 ; .w,.w Gang location 0 + dc.w 255,1,0,0,962,1042,965,1011 ; .w,.w Gang location 1 + dc.w 255,2,0,0,962,1043,965,1012 ; .w,.w Gang location 2 + dc.w 255,3,0,0,962,1044,965,1013 ; .w,.w Gang location 3 + dc.w 255,4,0,0,962,1045,965,1014 ; .w,.w Gang location 4 + dc.w 255,5,0,0,962,1046,965,1015 ; .w,.w Gang location 5 + dc.w -1,-1 + +SPRobbery + dc.w 41,10,0,0,962,2,963,4 ; default - cooper gang/Santa Fe. + dc.w -1,-1 + +SPSubPlots +; .w,.w Sub-plot? + dc.w 0,0,0,0,0,0,0,0 + dc.w -1,-1 + + +EndSubPlotData + +;----------------- + +ENDTABLE +;--------- + END + diff --git a/l9dev/regress/games.l9/billy.l9/standard.txt b/l9dev/regress/games.l9/billy.l9/standard.txt new file mode 100644 index 0000000..e57ad6e --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/standard.txt @@ -0,0 +1,403 @@ +; STANDARD.TXT +; +; Some useful routines for animated games - mostly input handling +; +; Mike Austin. 3rd May 1990 +; +; There is a sample mouse-based cursor movement routine at +; the end of this file. +; +const + SmallMouse=3 ; minimum mouse movement emulated as a joystick response + NegSmallMouse=65533 ; minimum mouse movement emulated as a joystick response + +var +; FireKey +;; FireKeyChange LastFireKey + +begin +;------------------- +.vsGetControls + gosub @GetControls + HourglassState=0 ; kill hourglass + LeftKey=x4 + RightKey=x2 + UpKey=x1 + DownKey=x3 + XSpeed=x5 + YSpeed=x6 + if x7=0 then NoWantedDir + WantedDirection=x7 + +.NoWantedDir +; v1=77 ; cursor right ;*** +; gosub @MCKeyDown ;***8 +; if v1=0 then NoBug5 +; if RightKey<>0 then NoBug5 ;**** +; break ;******* +; +;.NoBug5 + + + +; PlayerSX=x5*2,PlayerSY=x6*2 +; and for directions, returns: +; x1 +; x4 x2 +; x3 +; Non-zero means trying to move in that direction +; and x5=x offset (single pixel movement), signed +; x6=y offset (single pixel movement), signed +; x7=direction number in standard adventure format + gosub @KeyScan ; check for key 'press' from keyboard buffer, +; returns in v1/v2 in same format as MCOsrdch: +; i.e. v1 is ascii code, v2 is scan code. + gosub @KeyScan ; check for key 'press' from keyboard buffer, +; returns in v1/v2 in same format as MCOsrdch: +; i.e. v1 is ascii code, v2 is scan code. + gosub @KeyScan ; check for key 'press' from keyboard buffer, +; returns in v1/v2 in same format as MCOsrdch: +; i.e. v1 is ascii code, v2 is scan code. + return +;---------- + + +;----------------- +.CheckFireKey +; may be called from VBL - so save everything carefully! +; FireKeyChange is reset when GetControls is called, +; or may be reset elsewhere in the user program, if required. + push v1 + push v2 + push x1 + FireKey=0 + v1=107 ; check for fire (5) + gosub @MCKeyDown + x1=v1 + v1=57 ; check for fire (space) + gosub @MCKeyDown + add x1,v1 + v1=76 ; check for fire on some PC keyboards + gosub @MCKeyDown + add x1,v1 + + v1=ByteWS(ByteJoystickStatus) + v2=JoyF ; " " " Joystick/Mouse buttons (fire is bit6) + and v1,v2 + add x1,v1 + + FireKey=x1 + gosub GDFireKey + LastFireKey=FireKey + pop x1 + pop v2 + pop v1 + return +;------------ +.GDFireKey + if FireKey<2 then GDGotFireKey +.RegisterFireKey + FireKey=1 +.GDGotFireKey + if FireKey=LastFireKey then GDNoFireChange + FireKeyChange=1 + +.GDNoFireChange + return +;---------- +.KeyScan + gosub @MCOsrdch + if v1=3 then @Escape ; control-C + if PlayersName=0 then KS1 + if v1=27 then @ReturnToMap ; escape - abandons current game +.KS1 +; cif TownOverlay +; if v1=68 then @ToCardGame +; if v1=69 then @SubPlotShootout ;******* +; cend +; if v1=65 then Cheat ;************ +; if v1=66 then FirstTune ; ********* +; if v1=67 then NextTune ; ********* + if v2=25 then @KSPauseLoop ; 'p' or 'P' + if v1=80 then @KSPauseLoop ; 'P' + + if v2=31 then ToggleSound ;'s' or 'S' + if v1=83 then ToggleSound ; 'S' + if v1=115 then ToggleSound ; 'S' + + if v2=50 then ToggleMusic ; 'm' or 'M' + if v1=77 then ToggleMusic ; 'M' + if v1=109 then ToggleMusic ; 'M' + + if v1=13 then @RegisterFireKey ; CR + if v1=32 then @RegisterFireKey + if v1=53 then @RegisterFireKey + return +;--------------- +.ToggleSound + x1=1 + if SoundOn=0 then TogS2 + x1=0 + +.TogS2 + SoundOn=x1 + return +;------------- +.ToggleMusic + LastTunePlayed=0 ; ensure that next 'toggle on' re-starts the tune + x1=1 + if MusicOn=0 then TogM2 + x1=0 + v1=0 ; score 0 for everything at the moment. +; v2 not needed + v3=2 ; stop + gosub @MCPlayScore + +.TogM2 + MusicOn=x1 + return +;---------- +.FirstTune + NextMusic=100 + return +;----- +.NextTune + add NextMusic,c2 + return +;------ +.Cheat + x1=100 + add PlayerIncome,x1 + add TicksSinceLawful,c16 ; make another town lawful as well + cif TownOverlay + gosub @PatIntelligence ; necessary for cheat to work in two player mode + cend + goto @ReturnToMap +;------------- +.KSPauseLoop +; wait for user to press a key, or joystick fire button. + gosub @GetControls + if FireKey<>0 then KSPL2 + gosub @MCOsrdch + if v2=0 then KSPauseLoop +.KSPL2 + return +;-------- +.GetControls +; look at kbd/joystick/mouse and return +; dir as new movement direction in standard adventure format +; and FireKey=0 if not pressed, 1 if pressed. +; and FireKeyChange=1 if pressed/released this turn + +; and for directions, returns: +; x1 +; x4 x2 +; x3 +; Non-zero means trying to move in that direction +; and x5=x offset (single pixel movement), signed +; x6=y offset (single pixel movement), signed +; x7=direction number in standard adventure format +; i.e. 1 +; 8 2 +; 7 3 +; 6 4 +; 5 + FireKeyChange=0 + gosub @CheckFireKey + &v5=WordWS(WordMouseXDistance) + &v6=WordWS(WordMouseYDistance) + + code - + gosub @GDDirections + x5=0 ; sx + x6=0 ; sh + x7=0 ; direction + if x1=0 then GDNoUp + x1=1 + add x6,c1 ; sh+=1 + x7=1 ; north(1) +.GDNoUp + if x2=0 then GDNoRight + x2=1 + add x5,c1 ; sx+=1 + if x7=0 then GDNotNE + x7=2 ; NE + goto GDNoRight + +.GDNotNE + x7=3 ; E + +.GDNoRight + if x3=0 then GDNoDown + x3=1 ; -1 + sub x6,c1 ; sh-=1 + if x7=0 then GDNotSE + x7=4 ; SE + goto GDNoDown + +.GDNotSE + x7=5 ; S=5 + +.GDNoDown + if x4=0 then GDNoLeft + x4=65535 ; -1 + sub x5,c1 ; sx-=1 + if x7=0 then GDNoSW + x7=6 ; SW + goto GDNoLeft +.GDNoSW + x7=7 ; W + +.GDNoLeft + if x6<>1 then GDNoNW ; up? + if x5<>65535 then GDNoNW ; left? + x7=8 ; NW + +.GDNoNW + + + code + +; returns: +; x1 +; x4 x2 +; x3 +; Non-zero means trying to move in that direction +; and x5=x offset (single pixel movement), signed +; x6=y offset (single pixel movement), signed + return +;----------- + code - +.GDKeyDown +; INT MODE + code + + gosub @MCKeyDown + code - + return +;------ +.GDDirections +; INT MODE. Entry: &v5=WordWS(MouseX), &v6=WordWS(MouseY) +; produce x1=up key state, x2=right key state, x3=down key state +; x4=left key state. +; 0=not-pressed, non-zero means pressed + +; up? + v1=104 ; keypad 8 + gosub GDKeyDown + x1=v1 ; if v1<>0, key is pressed + v1=72 ; cursor up (PC) + gosub GDKeyDown + add x1,v1 ; if v1<>0, key is pressed + if v6<32767 then gddMouseY1 ; positive mouse? + if v6>NegSmallMouse then gddMouseY1 + x1=1 +.gddMouseY1 + + +; right? + v1=77 ; cursor right + gosub GDKeyDown + x2=v1 ; if v1<>0, key is pressed + v1=108 ; keypad 6 + gosub GDKeyDown + add x2,v1 ; if v1<>0, key is pressed + if v5>32767 then gddMouseX1 + if v50, key is pressed + v1=80 ; cursor down + gosub GDKeyDown + add x3,v1 ; if v1<>0, key is pressed + if v6>32767 then gddMouseY2 + if v60, key is pressed + v1=75 ; cursor left + gosub GDKeyDown + add x4,v1 ; if v1<>0, key is pressed + if v5<32767 then gddMouseX2 + if v5>NegSmallMouse then gddMouseX2 + x4=1 +.gddMouseX2 + +; now tests for diagonal keys + + v1=73 ; keypad 9 + gosub @GDKeyDown + add x1,v1 ; up state + add x2,v1 ; right state + v1=105 ; keypad 9 + gosub @GDKeyDown + add x1,v1 ; up state + add x2,v1 ; right state + + v1=81 ; keypad 3 + gosub @GDKeyDown + add x2,v1 ; right state + add x3,v1 ; down state + v1=111 ; keypad 3 + gosub @GDKeyDown + add x2,v1 ; right state + add x3,v1 ; down state + + v1=79 ; keypad 1 + gosub @GDKeyDown + add x3,v1 ; down state + add x4,v1 ; left state + v1=109 ; keypad 1 + gosub @GDKeyDown + add x3,v1 ; down state + add x4,v1 ; left state + + v1=71 ; keypad 7 + gosub @GDKeyDown + add x4,v1 ; left state + add x1,v1 ; up state + v1=103 ; keypad 7 + gosub @GDKeyDown + add x4,v1 ; left state + add x1,v1 ; up state + + + code + + v3=ByteWS(ByteJoystickStatus) + v4=JoyU + and v4,v3 + add x1,v4 + v4=JoyR + and v4,v3 + add x2,v4 + v4=JoyD + and v4,v3 + add x3,v4 + v4=JoyL + and v4,v3 + add x4,v4 + code - + + return +;------- +; &X1=WordWS(WordMouseXDistance) ; signed distance mouse has moved l/r +; &X2=WordWS(WordMouseYDistance) ; signed distance mouse has moved u/d +; &WordWS(WordMouseXDistance)=c0 +; &WordWS(WordMouseYDistance)=c0 +; add CursorX,X1 +; sub CursorH,X2 +; or x1,x2 ; did mouse move in either direction? +; if x1>0 then @mgcRepositionCursor +;; +; +; +; JoyL=4 ; " " " " Left +; JoyR=8 ; " " " " Right +; JoyF=192 ; " " " Joystick/Mouse buttons (fire is bit6) +; diff --git a/l9dev/regress/games.l9/billy.l9/status.dat b/l9dev/regress/games.l9/billy.l9/status.dat new file mode 100644 index 0000000..9f25aa7 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/status.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/stconst.txt b/l9dev/regress/games.l9/billy.l9/stconst.txt new file mode 100644 index 0000000..56fddcf --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/stconst.txt @@ -0,0 +1,10 @@ +; Machine constants +; MCONST.TXT +const + st=1 ; conditional assembly + ReallyST=1 + Amiga=0 + pc=0 + notPc=1 + Scrolling=1 + AllowMusic=0 diff --git a/l9dev/regress/games.l9/billy.l9/strategy.txt b/l9dev/regress/games.l9/billy.l9/strategy.txt new file mode 100644 index 0000000..3e9db0d --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/strategy.txt @@ -0,0 +1,1760 @@ +; STRATEGY.TXT for Billy The Kid +; +; Mike Austin August 1990. +; +; Copyright (C) 1990 Level 9 Computing Ltd. +; +; +const + CostDeputy=20 ; cost per month + +begin + +.ClockTick +; called every time the player goes back to the map. +; Handle the game's sense of time here... + gosub @TownIntelligence + gosub @GangIntelligence + if TwoPlayerMode<>false then CT3 + gosub @PatIntelligence +.CT2 +.CT3 + code - + if PlayersName<>Pat then CTNotPat + code + + gosub @CountLawfulTowns +; return x4 as number of lawful towns. x1..x5 corrupted, at least + if x4>5 then @ToFinalDuel ;***WinGame + code - + +; increase Pat's wealth due to the law enforcement budget + gosub @iCalcCostOfDeputies ; gets running cost in x3 +; and gets income in x5 + sub x5,x3 + add PlayerGold,x5 + if PlayerGold<32000 then CTPat2 + x1=0 + sub x1,PlayerGold + gosub @iBudgetShortfallX1 + NextMeetingMenu=178 ; Pat - we've run out of money + PlayerGold=0 + +.CTPat2 + +.CTNotPat + if PlayersName<>Billy then CTNotBilly + code + + gosub @CheckPlayerGang ; see if gang has been wiped out. + gosub @CountBustRanches +; return x4 as number of lawful towns. x1..x5 corrupted, at least + if x4>5 then @ToFinalDuel ;****WinGame + code - + +.CTNotBilly + gosub @iSubPlotTimeOuts + + code + + + return +;---------- + code - +.iSubPlotTimeOuts +; handle subplots timing out + x1=SPFTexanPosseeAvailable ; number of members (byte) + x2=SubPlotFlags + add x1,x2 + x2=TownVarData(x1) ; number of deputies working for nothing + if x2=0 then iSPT2 + sub x2,c1 + if x1>TownVarDataSize then @iStratBug ;****** + TownVarData(x1)=x2 +; every 4th possee member who leaves triggers a warning message + if PlayersName<>Pat then iSPT2 + x1=3 + code + + and x1,x2 + code - + if x1<>0 then iSPT2 + NextMeetingMenu=184 ; Pat - another of that possee left + +.iSPT2 + return + +.iStratBug + code + ;******* + break ;******** + code - ;**** + return ;********* + + code + + +;--------- +.InitStrategy +; set up strategy game tables: +; for town, people. + TellOtherPlayer=0 + RobberyTillMDGoesBust=0 ; amount of money that Billy still +; needs to steal before the next Murphy-Dolan ranch goes bust. + + PlayerIncome=0 ; amount of gold earned by player since last +; screen - used mainly for Billy robbing things, to determine +; when another Murphy Dolan ranch goes out of business. + ExtraNewsStory=0 ; message number of extra news stories... e.g. +; ranches going out of business etc. Commonly in range + +; set up town table (16 bytes per town) + v1=0 ; offset to update + v2=0 ; value to write in. + x4=0 ; town number being written + +.InitStrategyLoop + gosub @UpdateVarDataWordInc ; lawless, no time since last robbed + gosub @UpdateVarDataWordInc ; + gosub @UpdateVarDataWordInc ; + gosub @UpdateVarDataWordInc ; + gosub @UpdateVarDataWordInc ; + gosub @UpdateVarDataWordInc ; + gosub @UpdateVarDataWordInc ; + gosub @UpdateVarDataWordInc ; + add x4,c1 + if x4=128 if bad guy +; bit 0 set if cowardly, bit 1 set if greedy. +; what name shall we give this person? + gosub @ChooseName + gosub @UpdateVarDataByteInc ; 6 name + + code - + random v2 + code + + x1=7 + and v2,x1 ; 4 types of information. Top bit is set +; if person knows about latest event of appropriate type. + if v2<4 then TVDInfo2 + v2=2 ; half the people know about gang locations + +.TVDInfo2 + gosub @UpdateVarDataByteInc ; 7 Information type this person finds out about +; .w Offset of "Money Location" information. (type 0) +; .w Offset of "Deputies Location" information. (type 1) +; .w Offset of "Gang Location" information (type 2) +; .w Offset of "Recent robbery" information (type 3) + + + x1=TFDMenuoffset ; offset of menu number in TFD + add x1,x4 ; get initial menu (particularly for people with subplots) + v2=TownFixedData(x1) + add v2,v2 ; double to get menu offset + if v2<>0 then ISGotMenu + v2=28 ; meet Billy for the first time menu. + +;7 jan 91 removed to allow the appropriate bank intro to come +; through +; if PersonNumber<31 then ISNotBank +; if PersonNumber>36 then ISNotBank +; v2=26 ; bank menu +; goto ISGotMenu + +.ISNotBank + if PersonNumber<>50 then ISNotHostess + v2=14 ; hostess/call girl menu + goto ISGotMenu + +.ISNotHostess + if PersonNumber<>52 then ISNotBarman + v2=12 ; barman menu + +.ISNotBarman +.ISGotMenu +; v2=menu to use when meet Billy + gosub @UpdateVarDataWordInc ; 8 Current Menu offset for talking to Billy +; v2=menu to use when meet Pat + gosub @UpdateVarDataWordInc ; 10 Current Menu offset for talking to Pat + v2=0 + gosub @UpdateVarDataWordInc ; 12 + gosub @UpdateVarDataWordInc ; 14 + add PersonNumber,c1 + add x4,c8 ; offset in TFD + if PersonNumber0 then InitSubPlotsLoop1 + +.InitSubPlotsLoop2 + &v2=TownFixedData(v4) ; pointer, relative to v4 in TFD + add v4,c2 + gosub @UpdateVarDataWordInc ; write into TVD + if v40 then InitSubPlotsLoop3 + +; set up the flags used by the subplots +; These are referenced by arbitrary offsets defined in AACONST + v2=0 ; clear the table! + x3=200 + SubPlotFlags=v1 +.InitSubPlotsLoop4 + gosub @UpdateVarDataByteInc + sub x3,c1 + if x3>0 then InitSubPlotsLoop4 + + gosub @InitTowns + gosub @SetPeoplesKnowledge ; - randomly set about half the +; people to know something (of the type they are likely +; to know anything about). + return +;-------------- +.InitTowns +; Each town has the following variable table +; which is part of ObjectsInformation: 8 bytes each +; (i.e. 8 bytes per object, including e.g. cows, gangs) +; TVD(x1+LawfulOffset=0) .b 0 if lawless, 1 if lawful +; TVD(x1+HappinessOffset=1) .b How happy the town is: starts at 128 (moderately happy) +; to 0 (completely unhappy) and up to 255 (ecstatic) +; TVD(x1+DeputiesOffset=2) .b Number of deputies stationed + x4=SantaFe; (10) +.InitTownsLoop + gosub @GetLocationData ; is town object x4 (10..15) lawful? +; x2=TVD(x1) + v1=x1 + add v1,c1 ; on to happiness offset + v2=128 ; happiness + gosub @UpdateVarDataByteInc + v2=2 ; default number of deputies + if x4<13 then ITL2 + v2=1 ; reduced number for later towns + +.ITL2 + gosub @UpdateVarDataByte + add x4,c1 + if x4<16 then InitTownsLoop + return +;------------- +.ChooseName + code - + x1=TFDPersonTypeOffset ; offset of person type in TownFixedData() + add x1,x4 ; add to base in TFD + x1=TownFixedData(x1) +; bit 1 will be clear if male + x2=2 + code + + + and x2,x1 + code - + + if x2<>0 then ChooseFemaleName +.ChooseMale2 + random v2 + if v2>49 then ChooseMale2 ; numbmer of male names available + goto GotName + +.ChooseFemaleName + random v2 + if v2>9 then ChooseFemaleName + + x2=100 + add v2,x2 ; female names are 100.109 +.GotName + code + + return +;------------- +code - +.iRandomLimitX2 +; get x3 as a random number less than x2 +; i.e. there will be x2 possible values. + random x3 + if x30 then iRL0 ; in case we're asked for zero options. + x3=0 + return + +.iRL0 + code + ; compile it for speed. +.iRL1 + sub x3,x2 + if x3>x2 then iRL1 + if x3=x2 then iRL1 + code - + +.iRLEnd + return +;---------- +.iDesignPerson +; person number PersonNumber + x6=0 ; offset within this person's 32-byte "components" table. +; that we are going to assemble... + code + + &x4=TownFixedData(0) ; offset of fixed people data + x1=PersonNumber ; person number being designed + add x1,x1 ; times 8 - 8 bytes per person in TownFixedData(*0) + add x1,x1 + add x1,x1 + add x1,x4 + add x1,c3 ; get identikit prototype number to use. + x1=TownFixedData(x1) + add x1,x1 ; double to get offset in tables. + &x4=TownFixedData(6) ; pointer table to identikit people prototypes + add x4,x1 ; get identikit appropriate prototype + &x4=TownFixedData(x4) ; get offset of identikit itself. + code - + +.iDPLoop + v2=TownFixedData(x4) ; first XZH + v5=v2 ; save xzh number + add x4,c1 + if v2=0 then iDPEnd + add x6,c2 ; increase number of 2-byte entries we've written +; into TVD. + x2=TownFixedData(x4) ; number of XZHs to choose from + add x4,c1 + if x2=1 then IDPSingleXZH + gosub @iRandomLimitx2 ; gets x3 as a random number + add v2,x3 ; vary xzh number. + +.IDPSingleXZH + code + + gosub @UpdateVarDataByteInc ; 0: xzh number for component. + code - + + v2=TownFixedData(x4) ; first raster offset + add x4,c1 + x2=TownFixedData(x4) ; number of raster offsets to choose from + add x4,c1 + if x2=1 then IDPSingleRO +.idpChooseRO + gosub @iRandomLimitx2 ; gets x3 as a random number + + if v5=2 then idpFemaleFace + if v5<>1 then idpNotFace ; what was xzh number? +; faces have much bigger raster offsets - 10 between each. +; Also, for Men, offsets 20 and 50 don't work - and I haven't +; time to fix them. So just prevent them happening. + if x3=2 then idpChooseRO + if x3=5 then idpChooseRO +.idpFemaleFace +; multiply x3 by 10 + add x3,x3 ; times 2 + v5=x3 ; save times 2 + add x3,x3 ; times 4 + add x3,x3 ; times 8 + add x3,v5 ; plus times 2-> times 10. + +.idpNotFace + + add v2,x3 ; vary RO. + +.IDPSingleRO + code + + gosub @UpdateVarDataByteInc ; 1: raster offset for component. + code - + goto @iDPLoop + +.iDPEnd + code + +.iDPEnd1 + if x6>31 then iDPEnd2 + gosub @UpdateVarDataWordInc + add x6,c2 + goto iDPEnd1 + +.iDPEnd2 + code - + return + code + +;------------- +.GenerateEvent +; of type x4: come up with a new event of one type +; or another. Possible types are: +; 1 + Contents of banks +; 2 + Number of deputies in a particular town +; 3 + Contents of train +; 4 + Locations of gangs +; 5 + Recent Robberies +; 6 + Sub-plot hint. + + return +;---------- +.MoveMoneyAround +; increase the amount of money in all the banks except Santa Fe. +; This is special because the bank gets filled when the train +; arrives from the east. + + return +;--------- +.GangIntelligence +; Process all the gangs: if they're overripe for a new +; robbery, make them take out the most lucrative target +; without Billy's help... +; If Pat is playing single-player, randomly allocate Billy +; to one of the robberies... + x4=ObjectsInformation + x3=41 ; gang number we're processing: go from 41 to 46 +; TownVarData(x4) contains an 8-byte workspace area for +; this gang. Its format is determined mostly by this routine. +; It is initialised entirely to 0 at the start of the game. +; .w Amount of money possessed by gang. +; .w +; .w +; .w +.GILoop + &x1=TownVarData(x4) ; got any money? + if x1=0 then GIDoRobbery + if x1>32767 then GIDoRobbery ; got an overdraft. + x2=10 ; rate at which gang spends money + sub x1,x2 + if x4>TownVarDataSize then @StratBug ;****** + &TownVarData(x4)=x1 +.GINext + add x4,c8 ; next gang + add x3,c1 + if x3<47 then GILoop + return + +.StratBug ;******** + break ;******** + return ;****** + +.GIDoRobbery +; the gang will rob the local bank, if it has +; a noticeable amount of money. Otherwise they may +; rob the train. + x2=x3 ; gang object + x5=31 ; convert from gang (41..) into town (10..) + sub x2,x5 ; x2 is now town number + + push x2 + x1=x2 ; 10..15 +; go to 31..36 for bank clerk number + x2=21 + add x1,x2 + MenuNumber=34 ; "we've been robbed by someone other than Billy" menu + gosub @NewMenuForPerson +; next time Player talks to person x1, use menu MenuNumber + pop x2 + + gosub @GetMoneyInBank + if x2<500 then @GIAfterRobbery + if x5>TownVarDAtaSize then @StratBug ;***** + &TownVarData(x5)=c0 ; clear out the bank! +; x1 was amount of money owned by the gang + add x1,x2 + if x4>TownVarDAtaSize then @StratBug ;***** + &TownVarData(x4)=x1 ; give the gang some money! +; and now update the "last robbery" information... + x1=SPRobberyOffset + add x1,SubPlotsoffset ; pointer to this subplot area + &x1=TownVarData(x1) ; get this subplot area itself + if x1>TownVarDAtaSize then @StratBug ;***** + &TownVarData(x1)=x3 ; save gang name involved. + add x1,c2 +; convert from gang name (41.. to town name 10..) + x2=31 + sub x3,x2 + if x3>TownVarDAtaSize then @StratBug ;***** + &TownVarData(x1)=x3 ; write in town that was hit. + +; make town annoyed at Pat + x1=x3 ; x1:=town robbed. + x5=10 + sub x1,x5 ; go from town name 10.. to TVD offset 0.. + add x1,x1 + add x1,x1 + add x1,x1 + add x1,x1 ; 16 bytes per town at start of TVD + x2=4 ; opinion of Pat offset + add x1,x2 + &x2=TownVarData(x1) ; current opinion + x3=100 ; change in opinion caused by robbery + sub x2,x3 + if x1>TownVarDAtaSize then @StratBug ;***** + &TownVarData(x1)=x2 + +.GIAfterRobbery + goto @GINext +;-------------- +.GetMoneyInBank +; return x2=TVD(x5) as amount of money in bank at town x2 (10..) + x5=10 + sub x2,x5 ; go from location (10..) to entry in TVD (0..) + add x2,x2 + add x2,x2 + add x2,x2 ; times 8: bytes per entry in SPD table. + &x5=TownVarData(SubPlotsOffset) ; "money location" table. + add x5,x2 + add x5,c2 +; &TVD(x5) is amount of money in local bank + &x2=TownVarData(x5) + return +;------------- +;.GetBestTarget +; return TVD(x1) as the SubPlotData entry for the +; most tempting robbery target. This should be the bank +; with the most money that is unguarded, or guarded +; by less than 5 deputies. +; Or the train, if it has loads of cash. +; &x1=TownVarData(SubPlotsOffset) ; "money location" table. +; x2=SPDeputiesOffset +; add x2,SubPlotsOffset +; &x2=TownVarData(x2) ; "deputies" information. + +;------------- +.TownIntelligence +; The towns need to decide if they are unhappy with the +; way Pat is running things. I think this can work by just +; setting a flag when a robbery is attempted. When Pat positions +; some deputies, this flag is reduced by the number of deputes +; there each time interval. When the number reaches 0, the +; town is happy. +; Every town that has been made law-abiding is happier: and +; so makes a positive contribution to Pat's number of votes. +; (Wealth of town? - would make it well worth while protecting +; a big pot of gold in one town) + x4=10 ; town being considered (as TOWN variable) +.TownIntelligence1 + push x4 + x2=x4 + gosub @GetMoneyInBank +; (returns x2=TVD(x5) as amount of money in bank at town x2 (10..)) + add x2,c32 ; make Banks get rich much quicker... + if x5>TownVarDAtaSize then @StratBug ;***** + &TownVarData(x5)=x2 + pop x4 + + + gosub @GetLocationData ; is town object x4 (10..15) lawful? +; Each town has the following variable table +; which is part of ObjectsInformation: 8 bytes each +; (i.e. 8 bytes per object, including e.g. cows, gangs) +; TVD(x1+LawfulOffset=0) .b 0 if lawless, 1 if lawful +; TVD(x1+HappinessOffset=1) .b How happy the town is: starts at 128 (moderately happy) +; to 0 (completely unhappy) and up to 255 (ecstatic) +; TVD(x1+DeputiesOffset=2) .b Number of deputies stationed + x2=DeputiesOffset + add x2,x1 + x3=TownVarData(x2) ; number of deputies + sub x3,c2 ; if >2 deputies, get happier each turn. Else get less happy + add x3,x3 + add x3,x3 + add x3,x3 + add x3,x3 + add x3,x3 ; times 32, so 0 deputies means happiness goes down a full +; division every month + push x4 + gosub @ChangeHappiness + pop x4 + + add x4,c1 + if x4<16 then @TownIntelligence1 + + return +;------------- +.ChangeHappiness +; change happiness for town with data TVD(x1) +; by x3: signed word + x2=HappinessOffset + add x2,x1 + x4=TownVarData(x2) + add x4,x3 ; add on change in happiness + if x4<500 then TINotBottomLimit + x4=0 + if PlayersName<>Pat then TINotBottomLimit + x1=3 + and x1,PatWarnings + if x1<>0 then TINotBottomLimit ; get warning every 4th time into town + NextMeetingMenu=182 ; Barney said "sorry, old chum. You;re out" (1815) +; (See this next time we leave the map) + add PatWarnings,c1 + if PatWarnings>5 then TINotBottomLimit + NextMeetingMenu=180 ; Pat - people are revolting! + +.TINotBottomLimit + if x4<256 then TINotTopLimit + x4=255 + +.TINotTopLimit + if x2>TownVarDAtaSize then @StratBug ;***** + TownVarData(x2)=x4 ; write back happiness + return +;------------- +; menu options for sheriff's office +; when finished, Jump back to MeetDoMenu with MenuNUmber set +; or jump to BackToWalkabout if don't want anything else. +.WhereAreDeputies + code - + gosub @iStartPrinting + x4=10 ; town being considered +.WhereADLoop + m1=500 ; base for names + add m1,x4 + message m1 ; print town name. + code + + gosub @GetLocationData ; is town object x4 (10..15) lawful? +; Each town has the following variable table +; which is part of ObjectsInformation: 8 bytes each +; (i.e. 8 bytes per object, including e.g. cows, gangs) +; TVD(x1+LawfulOffset=0) .b 0 if lawless, 1 if lawful +; TVD(x1+HappinessOffset=1) .b How happy the town is: starts at 128 (moderately happy) +; to 0 (completely unhappy) and up to 255 (ecstatic) +; TVD(x1+DeputiesOffset=2) .b Number of deputies stationed + add x1,c1 + x2=TownVarData(x1) ; get happiness + asr x2 + asr x2 + asr x2 + asr x2 + asr x2 ; divide by 32 to give 0..7 as happiness rating + code - + add x1,c1 + x3=TownVarData(x1) ; x3=number of deputies + print x3 + message dot + message ForceCR + m1=456 ; base for happiness messages + add m1,x2 + message 455 ; people are + message m1 ; rebelling->ecstatic + message ForceCR + add x4,c1 + if x4<16 then @WhereADLoop ; next town + gosub @iEndPrinting + code + + gosub @TTPDI2 ; DisplayInstructions2 ; using text on raster already +.SheriffMenu + MenuNumber=174 ; what now? + goto @MeetDoMenu + +.HireDeputy + MenuNumber=176 ; get town number + gosub @PrettyMenu +; result=town number (10..15) + x4=result + gosub @GetLocationData + x2=DeputiesOffset + add x2,x1 + x3=TownVarData(x2) + add x3,c1 + if x2>TownVarDAtaSize then @StratBug ;***** + TownVarData(x2)=x3 + goto SheriffMenu + +.FireDeputy + MenuNumber=176 ; get town number + gosub @PrettyMenu +; result=town number (10..15) + x4=result + gosub @GetLocationData + x2=DeputiesOffset + add x2,x1 + x3=TownVarData(x2) + if x3=0 then @SheriffMenu + sub x3,c1 + if x2>TownVarDAtaSize then @StratBug ;***** + TownVarData(x2)=x3 + goto @SheriffMenu + + + + +;------------------ + code - +.iCalcCostOfDeputies ; gets running cost in x3 +; and gets income in x5 + x4=10 ; town being considered + x3=0 ; cost so far + x5=200 ; income so far +.iCCOD1 + code + + gosub @GetLocationData ; is town object x4 (10..15) lawful? +; Each town has the following variable table +; which is part of ObjectsInformation: 8 bytes each +; (i.e. 8 bytes per object, including e.g. cows, gangs) +; TVD(x1+LawfulOffset=0) .b 0 if lawless, 1 if lawful +; TVD(x1+HappinessOffset=1) .b How happy the town is: starts at 128 (moderately happy) +; to 0 (completely unhappy) and up to 255 (ecstatic) +; TVD(x1+DeputiesOffset=2) .b Number of deputies stationed + x2=DeputiesOffset + add x2,x1 + dx2=TownVarData(x2) + dx1=CostDeputy + gosub @Multdx1dx2 + x2=dx1 ; cost per month + add x3,x2 ; add on to running cost + code - + x2=TownVarData(x1) ; LawfulOffset + add x2,x2 + add x2,x2 + add x2,x2 + add x2,x2 + add x2,x2 ; each lawful town brings income of 32 + add x5,x2 ; add on to income + + add x4,c1 + if x4<16 then ICCOD1 + + x1=SPFTexanPosseeAvailable ; number of members (byte) + x2=SubPlotFlags + add x1,x2 + dx1=TownVarData(x1) ; number of deputies working for nothing + dx2=CostDeputy +code + + gosub @MultDX1DX2 +code - + sub x3,dx1 + if x3<32000 then ICCOD2 + x3=0 ; cost has gone negative, so limit to zero + +.ICCOD2 + return +;-------------- +.iBudgetShortfallX1 +; oh dear - Pat is trying to spend x1 gold more than +; he's got + x4=15 ; town being considered + x3=x1 ; cost still to save +.iBS1 + code + + gosub @GetLocationData ; get TVD(x1) for x4 +; Each town has the following variable table +; which is part of ObjectsInformation: 8 bytes each +; (i.e. 8 bytes per object, including e.g. cows, gangs) +; TVD(x1+LawfulOffset=0) .b 0 if lawless, 1 if lawful +; TVD(x1+HappinessOffset=1) .b How happy the town is: starts at 128 (moderately happy) +; to 0 (completely unhappy) and up to 255 (ecstatic) +; TVD(x1+DeputiesOffset=2) .b Number of deputies stationed + code - + x2=DeputiesOffset + add x2,x1 +.iBS2 + x1=TownVarData(x2) +; x1 deputies currently at this town. Take them away! + if x1=0 then iBS3 + sub x1,c1 + if x2>TownVarDAtaSize then @iStratBug ;***** + TownVarData(x2)=x1 + x5=CostDeputy + sub x3,x5 ; take off from shortfall + if x3>32000 then iBSEnd ; have saved enough money + goto iBS2 + +.iBS3 + sub x4,c1 + if x4>9 then iBS1 +.iBSEnd + return + + code + +;-------------- +.SetPeoplesKnowledge +; go through people tables and randomly make people +; know things (as and when there is information of +; the right type for them to know). + v1=TVDInfoByte + add v1,PeopleVarData + x3=NumberOfPeople ; countdown +.SPKLoop + v2=TownVarData(v1) + x1=127 ; mask off top bit + and v2,x1 +; code - +; random x1 +; code + +; if x1>127 then SPKKnowNothing + x1=128 + or v2,x1 ; know something! + +.SPKKnowNothing + gosub @UpdateVarDataByte ; write v2 into TVD(v1) + add v1,c16 ; size of peopleData entries in TVD + sub x3,c1 ; reduce number + if x3>0 then @SPKLoop + return +;-------- +.PurgeIdentikitCells +; purge cells that will be used by identikits (7500..8900) + v1=7100 + v5=dPurgeObject +.DClear1 + gosub @MCDrawObjectV1 + add v1,c1 + if v1<8900 then DClear1 + return + +;--------- +.FullDisplayPerson +; display person with data at TVD(ThisPersonVarData) +; who is person number PersonNumber +; DO AN INITACBS BEFORE calling this routine. + gosub @PutUpHourglass + push x1 + gosub @OpenIdentikitStructures + pop x1 +; gosub @PurgeIdentikitCells ; purge cells common to identikits +; and town sprites file. + +.FDP1 + push x1 + gosub @DisplayPerson + pop x1 + return + +;--------- +.DisplayPerson +; display person with data TVD(ThisPersonVarData) +; who is number PersonNumber + cif pc + v1=0 + v2=0 + gosub @SafeScrollDirection + gosub @SafePlotLogical + cend + gosub @MCDisplayRoom +;; gosub @DisplayEverythingSprites ; display acbs, text box etc. + PersonDisplayed=true ; stop SpecialAniObj problems with funny acbs +; set up for the person conflicting with e.g. what SAO thinks +; is the player's acb in the walkabout code. + x4=IdentikitTableBase ; 32 bytes per person. + x1=PersonNumber + add x1,x1 + add x1,x1 + add x1,x1 + add x1,x1 + add x1,x1 ; x1=PersonNumber*32 + add x4,x1 + + dv2=32 ; x + dv3=616 ; z + dv4=600 ; h + dv6=0 ; non-reversed. + x3=0 ; offset within table. + + dv5=dMarkPreload + push x4 + gosub @DPLoop + pop x4 + gosub @MCPreloadCells + + x3=0 ; offset within table. + dv5=1 ; draw type + +.DPLoop +; sixteen two-byte entries: first byte is xzh, +; second byte is Raster Offset + dv1=TownVarData(x4) + add x4,c1 + x1=TownVarData(x4) + add x4,c1 + &WordWS(WordRasterOffset)=x1 + RasterOffset=x1 ; for setting up acbs + add dv3,c1 ; make each plane by one higher than the last, + add dv4,c1 ; to make sure the acb handler gets them in the right order. + push x3 + push x4 + push dv3 + push dv4 + gosub DPDO + pop dv4 + pop dv3 + pop x4 + pop x3 + add x3,c2 + if x3<32 then @DPLoop + gosub @MCCopyScreenToBuffer +; cif pc +; gosub @MCUpdateScreen +; gosub @MCUnplotScreen +; cend + +.DPDORet + return +;------------ +.DPDO + if dv5<>1 then @MCDrawObjectDV1 ; preload + ObjectNumber=dv1 + + if dv1>2 then @DPDONotFace + if dv1=0 then DPDORet +; for face, set up animation directly. + push ObjectNumber + push dv1 + push dv3 + push dv4 + if dv1=1 then DPDOMaleFace + add dv3,c16 + ObjectNumber=710 + push dv4 + sub dv4,c32 ; move mouth down + gosub @DPSFA2 + pop dv4 + ObjectNumber=712 + gosub @DPSFA2 + goto DPDOAfterFace + +.DPDOMaleFace + add dv3,c32 + add dv4,c32 + ObjectNumber=700 + gosub @DPSFA2 + ObjectNumber=703 + gosub @DPSFA2 + +.DPDOAfterFace + pop dv4 + pop dv3 + pop dv1 + pop ObjectNumber + +.DPDONotFace + dx1=240 ; make hair be much further forward, so + if dv1=22 then DPDOSideBurn ; men's sideburns. + if dv1=51 then DPDOSideBurn ; women's hair + if dv1<>21 then DPDONotHair + dx1=250 ; make hair be much further forward, so +.DPDOSideBurn +; mouth animates behind it. + add dv3,dx1 + add dv4,dx1 + goto DPSFA2 ; do as acb, so it appears in front of mouth + +.DPDONotHair + if dv1<40 then DPDONotHat + if dv1>42 then DPDONotHat + dx1=260 ; make hat be in front of hair/beard + add dv3,dx1 + add dv4,dx1 + goto DPSFA2 ; do as acb, so it appears in front of mouth + +.DPDONotHat +; drop through to DPSFA + +.DPSFA +; draw objectNumber (will be CopyScreenToBuffered) + push dv2 + push dv3 + push dv4 + push RasterOffset ; zeroed by StartFreeACB + dv5=dPlot + dv6=0 ; reversal + &WordWS(WordRasterOffset)=RasterOffset + gosub @MCDrawObjectDV1 + &WordWS(WordRasterOffset)=c0 + pop RasterOffset + pop dv4 + pop dv3 + pop dv2 + return + +.DPSFA2 +; start ObjectNumber as an ACB + push dv2 + push dv3 + push dv4 + push RasterOffset ; zeroed by StartFreeACB + gosub @StartFreeACB + pop RasterOffset + pop dv4 + pop dv3 + pop dv2 + return +;-------- +.NewsOffice +; display newspaper headlines - called from walkabout when +; go into the news room. +; No need to swap overlay, cause we don't show a person here. + push CurrentPrintRaster + push CurrentDo + CurrentPrintRaster=2744 ; newspaper print raster. + CurrentDO=391 ; 391:epitath newspaper with Billy's photo (390 is without) + Newspaper=true + gosub @MCEmptyRoom + gosub @MCBuildROom + gosub @InitACBs + x2=3 +; .w Offset of "Money Location" information. (type 0) +; .w Offset of "Deputies Location" information. (type 1) +; .w Offset of "Gang Location" information (type 2) +; .w Offset of "Recent robbery" information (type 3) +; .w Offset of sub-plot table. + gosub @TTPScanInformation +; what information of type x2 is known? +; Return: information is at TownVarData(x4). Or if result=false, +; no information on this topic is available + code - + gosub @iStartPrinting + message ExtraNewsStory ; e.g. ranch going out of business + message cr + code + + PersonDisplayed=0 ; flag which also determines if "I hear.." printed at start + gosub @AddSPEntries ; also displays the text box +; code - +; gosub @iEndPrinting +; code + + NewScreen=CurrentScreen + pop CurrentDO + pop CurrentPrintRaster + Newspaper=false + goto @BuildNewScreen ; re-enter current outside room. +;---------- +.WantedPoster +; display newspaper headlines - called from walkabout when +; go into the news room. +; No need to swap overlay, cause we don't show a person here. + push CurrentPrintRaster + push CurrentDo + push TextBoxWidth + push BackgroundColour + CurrentPrintRaster=2743 ; newspaper print raster. + CurrentDO=392 ; 392:wanted poster + TextBoxWidth=100 + BackgroundColour=0 ; transparent + gosub @MCEmptyRoom + gosub @MCBuildROom + gosub @InitACBs + code - + gosub @iStartPrinting + message 1852 ; reward for Billy is +; x1=500 ; amount of gold in reward is $ + gosub @iPrintReputation + message 1853 ; . + gosub @iEndPrinting + code + + NewScreen=CurrentScreen + gosub @TTPDI2 ; DisplayInstructions2 ; using text on raster already + pop BackgroundColour + pop TextBoxWidth + pop CurrentDO + pop CurrentPrintRaster + goto @BuildNewScreen ; re-enter current outside room. +;---------------- +code - +.iPrintReputation + if PlayerReputation>2 then PrintRep2 + PlayerReputation=2 + +.PrintRep2 + print PlayerReputation + return +code + + +;------------ +.SpecialPrintMenu +; If talking to a person, they are described by TownVarData(ThisPersonVarData) +; M1 is message requested by menu code. +; Can also clear PersonDisplayed to false if want to get rid +; of the person from the location + result=m1 + x1=600 ; MM + sub result,x1 + gosub @GetCost +; get cost in x1, increase in reputation x2 +; from printing message MM(600)+result + if x1301 then SPMNotBrawl ; refuse to buy someone a drink +.SPMBrawl + result=300 ; Billy, we're gonna cream ya + if PlayersName=Billy then SPMNotBrawl + result=301 ; Pat, we're gonna cream ya + + +.SPMNotBrawl + x1=PersonNumber + x2=7 + and x1,x2 ; get variation between different people in town + code - + if m1<342 then SPMNotNeedsHelp + if m1>359 then SPMNotNeedsHelp ; first message available is 342, + if x1<5 then SPMNeedsHelp2 ; last message available is 346: minus 342 -> 4 + sub x1,c4 ; bring into range +.SPMNeedsHelp2 + message 340 ; a friend of mine needs help... + add m1,x1 + message m1 + m1=341 ; might be able to help ya too! + +.SPMNotNeedsHelp + if m1<362 then SPMNotLooking + if m1>379 then SPMNotLooking ; first message available is 362, + if x1<65 then SPMLooking2 ; last message available is 367: minus 362 -> 5 + sub x1,c4 +.SPMLooking2 + message 360 ; hey mister, someone was looking for ya + add m1,x1 + message m1 ; e.g. over in Santa Fe + m1=361 ; why not get over there and look em up + +.SPMNotLooking + if m1<>1519 then SPMNotAshUpton +;;; dc.w 1519-MM,MMenu+158 * the store was deserted... +; MD person has buggered off somewhere, to let player +; get hold of the forged accounts. + PersonDisplayed=0 + +.SPMNotAshUpton + if m1<>1516 then SPMNotDeliverBooks + message Playersname ; before 'showed the books to colonel...' + x1=68 ; soldier at fort Sumner + MenuNumber=16 ; default meeting menu + code + + gosub @NewMenuForPerson + code - + x1=100 + add PlayerReputation,x1 + +.SPMNotDeliverBooks + if m1<>1518 then SPMNotGotBooks +;;; dc.w 1518-MM,MPrintDoM1+1515-MM * get books + x1=68 ; soldier at fort Sumner + MenuNumber=168 ; menu to trigger player showed books to Colonel Mustard, etc. + code + + push MenuNumber + gosub @NewMenuForPerson + x1=44 ; Murphy Dolan guy at store + MenuNumber=16 ; back to default menu + gosub @NewMenuForPerson + pop MenuNumber + code - + PersonDisplayed=0 ; don't display person in store +; next time Player talks to person x1, use menu MenuNumber + +.SPMNotGotBooks +;[870:"we've been robbed by Billy The Kid - so don't ask to make +;a big withdrawal! "] +;; when Billy goes into a bank he's recently robbed. +;[871:"we've been robbed. I hope you've come to make a deposit. "] +;; when Billy goes into a bank another gang has recently robbed + x2=200 ; unlikely they won't recognize Billy! + if m1=870 then SPMRecognize ; recently robbed by Billy + x2=60 ; normal probability they'll recognize Billy + if m1<>871 then SPMDontRecognize +.SPMRecognize + gosub @iCheckRecognizeBilly + +.SPMDontRecognize + if m1<920 then @PMNotHello + if m1>951 then @PMNotHello +; person is just saying hello + if PlayersName<>Billy then SPMNotRecognize +; if in a lawful town, will Billy be recognized? + x2=60 ; normal probability they'll recognize Billy + gosub @iCheckRecognizeBilly + +.SPMNotRecognize + +; - occasionally add on the amount of reward, +; or the number of votes that Pat got +;[1870:Hey, I hear your reward is now $] ; |||| +;[1871:Hey, I hear you polled ] ;||| for Pat +;[1872:. ] ; ||| follows 1870/amount of money +;[1873:votes. ] ;||| follows 1871 + random x1 + if x1>35 then PMNotMentionReward + m1=1869 + add m1,PlayersName ; +1(Pat) or 2 (Billy) + message m1 + gosub @iPrintReputation ; print PlayerReputation + add m1,c2 +; m1 replaces normal greeting + +.PMNotMentionReward +.PMNothello + if m1<1891 then SPMNotGangBust + if m1>1897 then SPMNotGangBust +;[1890:Tom O'Foliard rode up and said "Billy, ] ;||| +;[1891:the Cooper Gang have been raided". ] ;||| +;[1892:the Socorro Varueros gang has been raided". ] +;[1893:the Seven Rivers Gang gang has been raided". ] +;[1894:the Dona Ana Bunch gang has been raided". ] +;[1895:the Jesse Evans gang has been raided". ] +;[1896:the fugitives' gang has been raided". ] +;[1897:the regulators' gang has been raided". ] + if PlayersName<>Pat then SPMNotBustPat + message 1490 ; [1490:Barney Mason rode up and said, "] + +.SPMNotBustPat + if PlayersName<>Billy then SPMNotGangBust + message 1890 ; add on header "Tom O'Foliard rode up and said" + +.SPMNotGangBust + + if PlayersName<>Pat then SPMNotPat +; SPECIALS FOR PAT GARRETT. + + if m1<>665 then SPMNotMenuRobBank +; menu option "ROB BANK" + m1=0 ; Pat can't rob the bank! + +.SPMNotMenuRobBank + if m1<>1680 then SPMNotBuzzOff +; soldier/rancher tells Billy to Buzz off. Slightly more polite to Pat + m1=1686 + +.SPMNotBuzzOff + +.SPMNotPat + if m1<920 then SPMNotGreeting + if m1>930 then SPMNotGreeting + x1=ThisPersonVarData + code + + gosub @GetGreetingMessage + gosub @GetPersonalGreeting + code - +; for person TownVarData(x1) +; return m1=personal greeting, if we've already met them. +; or leave m1 unchanged if we haven't met them. +; Also return x2=0 if they are strangers. +; person's data is at TownVarData(ThisPersonVarData) + +.SPMNotGreeting + + +code + + if m1<>904 then SPMNotDuel +; "I'll see you outside" -> "Draw, varmit" if already outside + if CurrentScreen>MaxOutside then SPMNotDuel + m1=899 ; "Draw, varmit" + +.SPMNotDuel + code - + + + +.SPMEnd + code + + return +;-------------------- + code - +.iCheckRecognizeBilly +; are just about to print message M1, usually whilst +; talking to the bank teller. If this is a lawful town, +; or if Billy has hit this bank before, he may get an +; escape game for his pains... +; x2 is prob. threshold of being recognized. + if PlayersName<>Billy then CRBNotRecognize + random x1 + if x1>x2 then CRB1 +; most of the time in a lawless time, Billy can rob the same +; bank again, but sometime they'll recognize him and chase him off... + if m1=870 then CRB2 ; just been robbed by Billy, so recognize him! + +.CRB1 +; in lawful towns, usually recognize him... + x4=town + code + + gosub @IsTownLawful ; x2=TVD(x1) is non-zero if lawful + code - + if x2=0 then CRBNotRecognize ; still lawless when 0 + random x1 + if x1>160 then CRBNotRecognize + +.CRB2 + m1=1880 ;[1880:hey, It's Billy The Kid! Get him boys! ] + code + + gosub @DisplayInstructions + goto @ToEscapeGame + code - +; +.CRBNotRecognize + return + code + +;------------- +.NewRoomSubPlotEncounters +; Player is going into a new room in the +; walkabout section. Is he going to meet anyone? +; (Moving from CurrentScreen->NewScreen + code - + if NewScreen>MaxOutside then @SPEEnd ; don't get shootouts when +; goin into saloon, etc. + + random x1 + if x1>80 then @SPEEnd ; make a decision one third of the +; times we leave first room. If decision made, that's it. +; Otherwise same probability on leaving each room until +; the decision HAS been made. + + + v2=255 ; default value to update flags (UpdateVarDataByte) + v1=SPFAmbushDecision + add v1,SubPlotFlags + x1=TownVarData(v1) + if x1<>0 then @SPEEnd ; decision already made in this town + gosub @iUpdateVarDataByte ; have now made decision + v1=SPFMeetBounterHunter + add v1,SubPlotFlags + x1=TownVarData(v1) ; due to meet bounty hunter? + if x1=0 then SPENotBountyHunter + m1=1634 ; bounty hunter waiting + goto @iDuel + +.SPENotBountyHunter + random x1 + if x1>40 then @SPEEnd ; proportion of towns -> encounter + + + v1=SPFSevenRiversAmbush + add v1,SubPlotFlags + x1=TownVarData(v1) + if x1<>0 then SPENotSevenRivers + gosub @iUpdateVarDataByte +.SevenRiversAmbush + m1=1645 ; seven rivers ambush + code + + gosub @DisplayInstructions + code - + goto @iSubPlotShootoutNoM1 + +.SPENotSevenRivers + v1=SPFJesseEvans + add v1,SubPlotFlags + x1=TownVarData(v1) + if x1<>0 then SPENotJesseEvans + gosub @iUpdateVarDataByte + m1=1646 ; Jesse Evans gang ambush + code + + gosub @DisplayInstructions + code - + goto @iSubPlotShootoutNoM1 + +.SPENotJesseEvans + v1=SPFJoeGrantMet + add v1,SubPlotFlags + x1=TownVarData(v1) + if x1=0 then SPENotJoeGrant + if x1>2 then SPENotJoeGrant + v2=255 ; duel fought + gosub @iUpdateVarDataByte +; x1=2 if Joe's gun won't fire + m1=1678 ; Joe Grant was waiting outside the saloon + goto @iDuel + +.SPENotJoeGrant +.SPEEnd + code + + return + + +.WalkingSubPlotEncounters +; Player is walking around. +; Is he going to meet anyone? + code - + v2=255 ; default value to update flags (UpdateVarDataByte) + if Town<>LincolnCity then wspNotMcSween + if Location<>165 then wspNotMcSween ; in saloon? + v1=SPFMcSweenStage + add v1,SubPlotFlags + x1=TownVarData(v1) + if x1<>1 then wSPNotMcSween ; Brady not waiting to murder McSween + v2=2 ; has done now + gosub @iUpdateVarDataByte ; have now made decision + MenuNumber=118 + gosub @iprettyMenu + if result=1064 then @isubPlotShootoutNoM1 ; 1664-MM + +.wspNotMcSween + if Town<>SantaFe then wspNotSantaFe + if Location<>160 then wspNotSantaFe ; in Santa Fe saloon? + if PlayersName<>Billy then wspNotSantaFe ; Billy-only subplot + v1=SPFJoeGrantMet + add v1,SubPlotFlags + x1=TownVarData(v1) + if x1<>0 then wSPNotJoeGrant ; have we met Joe Grant? + MenuNumber=128 ; come here Big Boy and look at my pistol. + x1=1248 ; 78*16 - i.e. Joe Grant person + code + + push v1 + gosub @TalkToPerson ; come here Big Boy and look at my pistol. + pop v1 + PlayingDuel=true ; have a duel when we leave saloon + code - + v2=2 ; turned gun to empty chamber + if result=1077 then joeGrantLeaves + v2=1 ; has done now - gun unmolested +.JoeGrantLeaves + gosub @iUpdateVarDataByte ; have now made decision + goto @iBackToWalkabout + +.wspNotJoeGrant +.wspNotSantaFe + + +; PAT'S ENCOUNTERS... +; Mayor accosts Pat... +;Menu84 +;Menu86 +;; Mayor accosts Pat... +;Menu88 +;Menu90 + if PlayersName<>Pat then wspNotPat + random x1 + if x1>10 then wspNotMayor + random x1 + MenuNumber=88 ; Mayor accosts Pat (2) + if x1>127 then wspMayor2 + MenuNumber=84 ; Mayor accosts Pat (1) +.wspMayor2 + code + + gosub @PrettyMenu + code - + +.wspNotMayor +.wspNotPat + + + code + + +; Billy gets challenged after a while in each room of a +; lawful town... + if CurrentScreen>MaxOutside then @wspNotLawful + if PlayersName<>Billy then @wspNotLawful + x4=town + gosub @IsTownLawful ; returns x2=TVD(x1) non-zero if lawful + if x2=0 then wspNotLawful +;[1859:down the street, a deputy called out "Billy The Kid - hold it +;right there. You gonna come quietly?" ] ;||| +;[1860:run away.` ] ; ||| menu option +;[1861:ignore him.` ] ; ||| menu option +;[1862:Billy fled the town. ] ; run away ||| +;[1863:"go for your gun, outlaw." ] ;||| + MenuNumber=160 ; you gonna come quietly? + gosub @PrettyMenu + if result=1262 then @ReturnToMap ; 1860-MM + goto @FightDuel ; 1863-MM + +.wspNotLawful + if location=160 then wspSaloon + if Location=165 then wspSaloon + if Location<170 then wspNotSaloon +.wspSaloon + code - + random x1 + code + + if x1>70 then wspNotSaloon + goto @ToBrawlGame +;.ToBrawl +; v4=BrawlScreen +; v1=ArcadeAcode ; '3' +; gosub @FireVisitPlace +; goto @BackToWalkabout ; in case we get back here, which is unlikely + +.wspNotSaloon + return +;----------- +.SetSubPlotFlags + code - + x1=SPFCowboysMet ; ; cowboys to ambush player in town? + if result=908 then @SPSetFlagToPlayer + x1=SPFSickManOnHorse ; sick man riding with Player? + if result=1100 then @SPSetFlagToPlayer + if result=910 then @SPSetFlagToFinished ; refuse to help + + x1=SPFAccountsRequested ; player been asked to fetch accounts? + if result=917 then @SPSetFlagToPlayer + x1=SPFAccountsGot ; player got accounts from store? + if result=919 then @SPSetFlagToPlayer + x1=SPFGangToGrassOnBilly ; gang name which has promised +; to grass on Billy + x2=41 ; gang name + if result=924 then @SPSetFlagTox2 ; name of person talking to (gang) + + x1=SPFTexanPosseeAvailable ; number of members (byte) + x2=8 ; number of deputies available + if result=932 then @SPSetFlagTox2 +; x1=SPFFreeDeputies ; number of deputies unallocated (byte) + + x1=SPFTrackingBarneysOutlaw ; tracking outlaw suggested by +; Barney Mason + if result=937 then @SPSetFlagToPlayer + x1=SPFBeefWanted ; beef asked for by Indian Chief? + if result=1010 then @SPSetFlagToPlayer + x1=SPFUprisingOffered ; number of uprisings available (byte) + x2=1 ; 1 uprising available + if result=1011 then @SPSetFlagTox2 + + x1=SPFMeetBountyHunter ; meet bounter hunter referred +; to in 1634. Name of town: byte + x2=13 ; Mesilla + if result=911 then @SPSetFlagTox2 + +; x1=SPFAmbushDecision ; cleared whenever go into new town, +;; set when program has made a decision about whether Billy +;; is to be ambushed here, or not. + + x1=SPFCounterfeitOffered ; set when Billy has been offered +; counterfeit money as his share in a robbery. + if result=1050 then @SPSetFlagToPlayer + if result=1053 then @SPsetFlagToPlayerLose ; spend counterfeit normally + + x1=SPFMcSweenStage ; set to the following values: +; 0=startup - Mrs McSween running Tunstall ranch, happy. +; 1=Billy has been offered chance to save McSween's cows. +; 2=Sheriff Brady has gone to attack McSween. This is set when +; Billy has been told of this. If player does nothing, then +; we go on to 3. Otherwise 2 is the final state. i.e. she is ok +; 3=McSween is dead, ranch stays deserted + x2=1 ; offered chance to save cows + if result=1070 then SPSetFlagToX2 + x2=3 ; McSween is dead, unless overridden by gunfight + if result=1060 then SPSetFlagTox2Lose + + x1=SPFJoeGrantMet ; met Joe Grant? Set to 1 if yes but his +; gun unmolested, set to 2 if gun turned to empty chamber. +; Set to FF if duel fought. + x2=1 + if result=1079 then SPSetFlagToPlayer + x2=2 + if result=1077 then SPSetFlagToPlayerGain + goto SPSetFlagToPlayer + +.SPSetFlagToPlayerGain + add PlayerReputation,c16 + goto SPSetFlagToPlayer + +.SPSetFlagToPlayerLose + sub PlayerReputation,c16 + goto SPSetFlagToPlayer + +.SPSetFlagTox2Lose + sub PlayerReputation,c16 + goto SPSetFlagToPlayer + +.SPSetFlagToFinished + x2=255 ; subplot is over + goto SPSetFlagToX2 + +.SPSetFlagToPlayer + x2=PlayersName +.SPSetFlagToX2 + v1=SubPlotFlags + add v1,x1 + v2=x2 + code + + gosub @UpdateVarDataByteInc ; TVD(V1)=V2 + return +;------------- +.PlayerNewScreen +; call this routine every time we switch to a new screen. +; Do various housekeeping tasks here, like adding the amount +; of gold stolen in robberies. + add TotalGoldStolen,PlayerIncome + add PlayerGold,PlayerIncome + sub RobberyTillMDGoesBust,PlayerIncome ; amount of money that Billy still +; needs to steal before the next Murphy-Dolan ranch goes bust. + PlayerIncome=0 + + if RobberyTillMDGoesBust<32000 then @PNS2 +; another Murphy-Dolan ranch goes bust... + RobberyTillMDGoesBust=ConstTillMDGoesBust + x4=24 ; object number for ranch (24..30, 29=Tunstall Ranch(McSween)) +.BustRanch1 + gosub @GetLocationData ; returns x2=TVD(x1) where x1=position in ObjectsInfo + if x2=0 then BustRanch2 +.BustRanchNext + add x4,c1 ; next ranch + if x4<31 then BustRanch1 +; all ranches are broke... Billy wins! + goto @ToFinalDuel ;****WinGame +; gosub @AnnounceWin ; tell other player +; m1=1850 ; And so the west was won, Billy was a legend... +; gosub @DisplayInstructions +; v1=19 ; linking picture : Billy/Girl +; gosub @DisplayLinkingPicture +; return + +.BustRanch2 + + if x4<>29 then @BustRanch3 +; Tunstall Ranch: is McSween still there? If so, she's +; still in charge, and therefore will not go bust... + push x1 ; + push x4 ; ranch number + x3=ML ; =400: base for LOCATION variable. + add x3,x4 + gosub @WhoIsAtX3 +; gets x1 as person number * 16 for room x3. + x2=x1 ; copy into x2 (x1 popped in a tick) + pop x4 + pop x1 + if x2=74 then BustRanchNext ; person 74 - Mrs McSween - at Tunstall Ranch + + +.BustRanch3 + if x1>TownVarDAtaSize then @StratBug ;***** + TownVarData(x1)=c1 ; this ranch is broke! + ExtraNewsStory=400 ; extra news story=Ranch goes bust + add ExtraNewsStory,x4 ; ranch which has gone broke +; if Playersname<>Billy then PNS2 +; NextMeetingMenu=254 ; ssage=ExtraNewsStory ; make Tom O'Foliard come +;; up and tell ya as well +; +.PNS2 + return +;--------- +.PatIntelligence +; For Billy single-player, Pat has to decide where +; to position his deputies. I suggest we do this by assigning +; 5 to either the most tempting robbery target, or the second +; most tempting, at random. +; Do we need to consider political problems? e.g. town +; demanding protection to pacify them? + +; ACTUALLY, we're just going to make another town +; lawful every N clock ticks... + if PlayersName=Pat then PI0a + add TicksSinceLawful,c1 +.PI0a + if TicksSinceLawful<8 then PIRet ;****15 + TicksSinceLawful=0 + +;SantaFe=10 +;WhiteOaks=11 +;LincolnCity=12 +;Mesilla=13 +;Roswell=14 +;ElPaso=15 + x4=10 ; SantaFe +.PI1 + gosub @IsTownLawful + if x2=0 then @BringLawToTown + add x4,c1 + if x4<16 then PI1 ; ElPaso+1 + +.PIRet + return +;------------ +.CountLawfulTowns +; return x4 as number of lawful towns. x1..x5 corrupted, at least + x4=10 ; SantaFe +.CLT1 + gosub @IsTownLawful + if x2=0 then CLTDone + add x4,c1 + if x4<16 then CLT1 ; ElPaso+1 +.CLTDone +; x4 is first lawless town + x1=10 + sub x4,x1 +; x4 is number of lawful towns + return +;--------- +.CountBustRanches +; return x4 as number of bust ranches, corrupts x1..x6 + x4=24 ; object number for ranch (24..30, 29=Tunstall Ranch(McSween)) +.CBR1 + gosub @GetLocationData ; returns x2=TVD(x1) where x1=position in ObjectsInfo + if x2=0 then BustRanchDone + add x4,c1 ; next ranch + if x4<31 then CBR1 +.BustRanchDone +; x4 is first operating ranch + x1=24 + sub x4,x1 +; x4 is number of bust ranches + return +;--------- +.BillyStatusReport + gosub @CountBustRanches ; x4 is number of bust ranches towns + code - + gosub @iStartPrinting + if MenuNumber=150 then BSR2 ; visiting gang - get status report anyway +; code + +; break ;**** +; code - + prs "Tom O'Foliard ...." +; prs "Tom's name here..." ;******** + message 1890 ; [1890:Tom O'Foliard rode up and said, "hello old friend, ] + m1=1901 ; [1901:you've gotta hurry up. The Murphy-Dolans are taking over + if x4<3 then BSR1 + m1=1902 ; [1902:you've got the Murphy-Dolans on the run. Keep going + if x4<5 then BSR1 + m1=1903 ; [1903:you've almost nailed the Murphy-Dolans, my friend. But +.BSR1 + message m1 +.BSR2 + message 1904 ; [1904:you've stolen a total of $] + print TotalGoldStolen + message 1905 ; [1905: which has bankrupted ] + code + + gosub @CountBustRanches + code - + print x4 + message space + message 1906 ; [1906:of their ranches, but ] + code + + gosub @CountLawfulTowns + code - + print x4 + message space + message 1907 ; [1907:of the 6 important gangs have been wiped out". ] ; œœœ punc + gosub @iEndPrinting + code + + goto @TTPDI2 ; DisplayInstructions2 ; using text on raster already +;--------------- diff --git a/l9dev/regress/games.l9/billy.l9/table.bin b/l9dev/regress/games.l9/billy.l9/table.bin new file mode 100644 index 0000000..43e9335 Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/table.bin differ diff --git a/l9dev/regress/games.l9/billy.l9/table.dat b/l9dev/regress/games.l9/billy.l9/table.dat new file mode 100644 index 0000000..9e00cfd Binary files /dev/null and b/l9dev/regress/games.l9/billy.l9/table.dat differ diff --git a/l9dev/regress/games.l9/billy.l9/table.txt b/l9dev/regress/games.l9/billy.l9/table.txt new file mode 100644 index 0000000..e6b93ff --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/table.txt @@ -0,0 +1,2150 @@ +;;;LaviniaStrumpetMenu equ 204 + +; Billy The Kid source, copyright (C) 1990 Level 9 Computing. +; +; TABLE.TXT, assembler format data for tables, a.k.a lists/arrays. +; (Save the assembled data as TABLE.DAT). +; +; You must start all DEFWs on EVEN boundaries, else subsequent code +; seems to be padded to make it even (according to the GENST listing, +; anyway). The EVEN directive inserts a padding byte if appropriate. +; + ORG 0 +starttables + dc.l ObjectTable-starttables ; object positions etc. + dc.l $FFFF ; HiresTable() Set up in AllocateWorkspaceLists + dc.l $FFFF ; + dc.l LIST4-starttables + dc.l NPCINITIAL-starttables ; npc initial and 'floor pointers' + dc.l TownFixedData-startTables ; + dc.l $FFFF ; 7: TownVarData: variable town stuff (AllocateWorkspaceLists) + dc.l list8-starttables ; 8 - assorted fixed system tables + dc.l IntroTables-startTables ; 9 - input table,object table + dc.l ENDTABLE-starttables +;--- +; +;--- +ObjectTable +; list giving the graphics objects which are important +; to the game. This is divided up by section: i.e. +; the map is separate from the various Sierra-style rooms, +; this separation being handled by the table at the start. + dc.w MapObjects-ObjectTable + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w MapToNewScreen-ObjectTable ; 10 + +; now the object tables themselves. These objects can +; be either xzh or rasters, and their order is critically +; important to the program. If you want to add new objects, +; just add them on the end. If you need to delete an object, +; replace it with a 0 or some new number. DON'T DELETE IT. +; The table ends with -1 + +MapObjects + dc.w 0 ; 0 + dc.w 340 ; 1 cows + dc.w 341 ; 2 cows + dc.w 342 ; 3 cows + dc.w 343 ; 4 cows + dc.w 344 ; 5 cows + dc.w 0 ; 6 + dc.w 0 ; 7 + dc.w 0 ; 8 + dc.w 0 ; 9 + dc.w 3345 ; Santa Fe 10 + dc.w 3346 ; White Oaks 11 + dc.w 592 ; Lincoln City 12 was 3347 + dc.w 588 ; Mesilla 13 + dc.w 589 ; Roswell 14 + dc.w 591 ; 3349 ; El Paso 15 + dc.w 0 ; spare town 16 + dc.w 0 ; spare town 17 + dc.w 0 ; spare town 18 + dc.w 3351 ; Fort Stanton 19 + dc.w 3352 ; Fot Sumner 20 + dc.w 0 ; spare fort 21 + dc.w 0 ; spare fort 22 + dc.w 0 ; spare fort 23 + dc.w 581 ; Unknown ranch near Bitter Lake 24 + dc.w 582 ; Fritz Ranch 25 + dc.w 583 ; Chisum Ranch 26 + dc.w 584 ; Dedrick Ranch 27 + dc.w 585 ; Beckwith Ranch 28 + dc.w 586 ; Reed ranch 29 + dc.w 587 ; unknown ranch 30 + dc.w 576 ; Katz farmhouse 31 + dc.w 577 ; Dunn farmhouse 32 + dc.w 578 ; Rose farmhouse 33 + dc.w 0 ; farmhouse 34 + dc.w 330 ; Mescalero Apache settlement 35 + dc.w 0 ; spare indians 36 (3356 might work) + dc.w 0 ; spare indians 37 + dc.w 0 ; spare indians 38 + dc.w 3304 ; train 39 + dc.w 2730 ; wagon train 40 + dc.w 331; outlaw hideout 41 + dc.w 332 ; outlaw hideout 42 + dc.w 333 ; outlaw hideout 43 + dc.w 334 ; outlaw hideout 44 + dc.w 335 ; outlaw hideout 45 + dc.w 336 ; outlaw hideout 46 + dc.w 0 ; outlaw hideout 47 + dc.w 337 ; prospector's camp 48 + dc.w 329 ; system + dc.w -1 ; end of table + + + + +MapToNewScreen +; for each object picked up in map, this table +; gives the corresponding screen number that it will +; invoke, or 0 if none. + + +; First byte: overlay letter to call. +; Second byte: screen number within that overlay. +; (for map, addition to 400, unsigned) +; (for scrolling games, = map number) +MO equ 69 * 'E' map overlay +SO equ 50 * '2' scrolling overlay +AO equ 51 * '3' arcade overlay, train +IO equ 52 * '4' intermission overlay - separate structure file, +* at least. + +; values for Game variable... +EscapeGame equ 21 +PositionPeopleGame equ 25 +PatWalkGame equ 30 ; drop into pat walking around shooting section. +MinTrackingGame equ 127 ; lowest number a game using the +; tracking maps/cd tables can have +TrackingGame equ 128 +RustlingGame equ 140 + + dc.b MO,0 ; 0 + dc.b SO+0,RustlingGame ; 1 - cows + dc.b SO+0,RustlingGame ; 2 + dc.b SO+0,RustlingGame ; 3 + dc.b SO+0,RustlingGame ; 4 + dc.b SO+0,RustlingGame ; 5 + dc.b SO+0,RustlingGame ; 6 + dc.b MO,0 ; 7 + dc.b MO,0 ; 8 + dc.b MO,0 ; 9 + dc.b MO,430-400 ; Santa Fe 10 + dc.b MO,540-400 ; White Oaks 11 + dc.b MO,500-400 ; Lincoln City 12 + dc.b MO,521-400 ; Mesilla 13 + dc.b MO,470-400 ; Roswell 14 + dc.b MO,450-400 ; El Paso 15 + dc.b MO,0 ; spare town 16 + dc.b MO,0 ; spare town 17 + dc.b MO,0 ; spare town 18 + dc.b IO+0,6 ; Fort Stanton 19 + dc.b IO+0,6 ; Fot Sumner 20 + dc.b IO+0,6 ; spare fort 21 + dc.b IO+0,6 ; spare fort 22 + dc.b IO+0,6 ; spare fort 23 + dc.b AO+0,1 ; Unknown ranch near Bitter Lake 24 + dc.b AO+0,1 ; Fritz Ranch25 + dc.b AO+0,1 ; Chisum Ranch 26 + dc.b AO+0,1 ; Dedrick Ranch 27 + dc.b AO+0,1 ; Beckwith Ranch 28 + dc.b AO+0,1 ; Reed ranch 29 + dc.b AO+0,1 ; unknown ranch 30 + dc.b AO+0,1 ; spare ranch 31 + dc.b AO+0,1 ; spare ranch 32 + dc.b AO+0,1 ; spare ranch 33 + dc.b AO+0,1 ; spare ranch 34 + dc.b IO+0,15 ; Mescalero Apache settlement 35 + dc.b IO+0,15 ; spare indians 36 + dc.b IO+0,15 ; spare indians 37 + dc.b IO+0,15 ; spare indians 38 + dc.b AO+0,21 ; train 39 + dc.b IO+0,5 ; wagon train 40 + dc.b SO+0,TrackingGame ; gang hideout: near santa fe 41 + dc.b SO+0,TrackingGame ; gang hideout: nr White Oaks 42 + dc.b SO+0,TrackingGame ; gang hideout: nr Lincoln Cit#y 43 + dc.b SO+0,TrackingGame ; gang hideout: nr Mesilla 44 + dc.b SO+0,TrackingGame ; gang hideout: nr Roswell 45 + dc.b SO+0,TrackingGame ; gang hideout: nr El Paso 46 + dc.b 0,0 ; 47 + dc.b IO+0,3 ; Prospector 48 + dc.b MO+0,0 ; 48 + dc.b MO+0,0 ; 49 + + + + +;--- + even +ENDOBJECTS +;terraintable +list8 +; +;--------- + even +NPCINITIAL +list5 +LIST4 +; new stuff added for AA + +; Menu text, etc. +; First, ptrs for all uses... + dc.w 0 ;MenuText-List4 0 + dc.w 0 ;MenuData-list4 2 + dc.w 0 ;HiresCoords-list4 4 + dc.w 0 ;ExitOffsets-list4 6 + dc.w 0 ;ObjectGraphics-list4 8 + dc.w 0 ;IntroText-list4 10 + dc.w 0 ;NounVerbTable-list4 12 + dc.w PCpalette-list4 14 + dc.w STpalette-list4 16 + dc.w 0 ;kerri-list4 18 + dc.w CGA2Palettes-list4 20 + dc.w CGA4Palettes-list4 ; 22 + dc.w 0 ; 24 + dc.w 0 ; 26 + dc.w 0 ; 28 + dc.w 0 ; 30 + dc.w 0 ; 32 + dc.w 0 ; 34 + dc.w HeightTable-list4 ; 36 + +CGA2Palettes + dc.b $0,$f,$2,$3,$4,$5,$6,$0,$8,$9,$a,$b,$c,$d,$e,$a ; 2 colour text printing + +; All these palettes have had to be modified because +; colour 6 is used for the highlight bar, so cannot be black. +; dc.b $0,$F,$F,$F,$F,$F,$0,$0,$F,$0,$9,$F,$F,$F,$0,$F ; 2 color map + dc.b $0,$F,$F,$F,$F,$F,$3,$0,$F,$0,$9,$F,$F,$F,$0,$F ; 2 color map + +; dc.b $0,$F,$F,$1,$F,$F,$1,$1,$7,$0,$F,$0,$F,$F,$9,$0 ; 2 Pat, Billy & Barbrawl + dc.b $0,$F,$F,$1,$F,$F,$1,$1,$7,$0,$F,$0,$F,$F,$9,$0 ; 2 Pat, Billy & Barbrawl + +; dc.b $0,$F,$7,$1,$F,$9,$1,$0,$7,$0,$F,$F,$F,$F,$A,$F ; 2 Outside Buildings + dc.b $0,$F,$7,$1,$F,$9,$1,$0,$7,$0,$F,$F,$F,$F,$A,$F ; 2 Outside Buildings + + dc.b $0,$F,$9,$0,$0,$0,$F,$0,$A,$A,$F,$F,$F,$F,$7,$F ; 2 Saloons + + +CGA4Palettes + dc.b $0,$F,$2,$3,$4,$5,$7,$0,$8,$9,$a,$b,$c,$d,$e,$a ; 4 colour text printing + dc.b $0,$F,$0,$F,$A,$5,$2,$0,$F,$5,$7,$0,$A,$F,$A,$A ; 4 color map + dc.b $0,$F,$F,$0,$F,$0,$0,$0,$A,$0,$5,$0,$F,$F,$5,$0 ; 4 Pat, Billy & Barbrawl + dc.b $0,$F,$A,$1,$A,$0,$F,$0,$A,$5,$5,$F,$F,$F,$A,$D ; 4 Outside Buildings + dc.b $0,$D,$A,$0,$A,$1,$F,$0,$A,$5,$5,$0,$F,$F,$D,$7 ; 4 Saloons + + +HeightTable +; used in walkabout code to go from the floor map "height adjust" +; packed byte to a value in pixels: kindof an exponential table. + dc.w -12 ;0 + dc.w -8 + dc.w -4 + dc.w 0 + dc.w 4 ;4 + dc.w 8 + dc.w 12 + dc.w 16 + dc.w 20 ;8 + dc.w 24 + dc.w 28 + dc.w 32 + dc.w 36 ;12 + dc.w 40 + dc.w 44 + dc.w 48 + + + + + + +; dc.b 0,$f,$e,$7,$f,$0,$7,$0,$8,$0,$f,$f,$f,$a,$8,$f ; town +; dc.b 0,$f,$f,$f,$0,$0,$a,$0,$8,$a,$8,$0,$0,$9,$0,$f ; people +; dc.b 0,$f,$0,$f,$0,$0,$7,$0,$a,$8,$f,$0,$e,$f,$7,$7 ; train + + +STpalette; also used for VGA +;commonm colours... +transparent equ $0000 ; ok +white equ $666F ; ok +flesh equ $6339 ;light red +Cyan equ $0346 ; ok +Violet equ $203a ; ok +Iblue equ $0263 ;light blue ok +black equ $0000 ;ok +Red equ $2008 ;dark brown ok +Blue equ $0042 ;dark blue ok +Brown equ $320C ;light brown ok +yellow equ $762D ;ok +Lgrey equ $444e; +Dgrey equ $2221 ;ok +Green equ $0304 ;dark green ok +Lgreen equ $1735; +pink equ $526c;orange 520C ;770a +Lcyan equ $0677; Pete 11/9/90 + + +;additional colours, for 'variable colours' only... + +PaleBlue1 equ $2254 +Vyellow equ $770a +;These colours must have IBM equivalents... +BlueGrey equ $223d ;(Mgrey?) +PaleBlue2 equ $3454 +PaleWhite equ $5671 + + + +PcPalette + + dc.w transparent,white,flesh,cyan + dc.w lgreen + dc.w Dgrey ; is Purple in other games. + dc.w iblue,black,Red,Blue,Brown + dc.w lcyan ; >> Pete 11/9/90 + dc.w yellow,Lgrey,Dgrey,Green + + + + + +IntroTables +; filenames for music, and other random stuff. Not necessarily +; just to do with the intro, but called that for compatability +; with the Grange intro sequence + dc.w SystemPalette-IntroTables ; 0 MapMusic-IntroTables ; 0 + dc.w SaveFilename-IntroTables ; 2 + dc.w 0 ; GunfightMusic-IntroTables ; 4 + dc.w 0 ; TrainMusic-IntroTables ; 6 + dc.w 0 ; MapMusic-IntroTables ; 8 + dc.w 0 ; 10 + dc.w StructureFilename-IntroTables ; 12 + dc.w 0 ; 14 + dc.w 0 ; 16 + dc.w AdlibFilename-IntroTables ; 18 + dc.w ExponentTableName-IntroTables ; 20 + dc.w 0 ; 22 + dc.w 0 ; 24 + dc.w 0 ; 26 + dc.w FontFilename-IntroTables ; 28 Font filename + dc.w 0 ; 30 + dc.w MenuStructures-IntroTables ; 32 + dc.w TownSpritesFilename-IntroTables ; map/town sprites filename 34 + dc.w 0 ; ScrollingSpritesFilename-IntroTables ; offset 36 + dc.w ArcadeSpritesFilename-IntroTables ; arcade games sprites filename offset 38 + dc.w 0 ; reserved for fourth sprites filename offset 40 + dc.w 0 ; MenuStructures-IntroTables ; offset 42 + dc.w ArcadeStructureFIlename-IntroTables ; 44 + dc.w 0 ; 46 + dc.w 0 ; 48 + dc.w 0 ; 50 + dc.w 0 ; 52 + dc.w 0 ; 54 + dc.w 0 ; 56 + dc.w 0 ; 58 + dc.w 0 ; 60 + dc.w 0 ; 62 + dc.w 0 ; 64 + dc.w 0 ; 66 + dc.w 0 ; 68 + dc.w LinkingSprites-IntroTables ; offset 70 + dc.w LinkingStructures-IntroTables ; offset 72 + dc.w IntroSprites-IntroTables ; offset 74 + dc.w IntroStructures-IntroTables ; offset 76 + dc.w 0 ; IdentikitSprites-IntroTables ; offset 78 + dc.w IdentikitStructures-IntroTables ; offset 80 + dc.w 0 ; 82 + dc.w 0 ; 84 + dc.w 0 + dc.w 0 + dc.w ScreenInfo-IntroTables ; offset 90 + dc.w 0 ; 92 + dc.w 0 ; 94 + dc.w 0 ; 96 + dc.w 0 ; 98 + dc.w ambushMusic-IntroTables ; 100 + dc.w BankJobMusic-IntroTables ; 102 + dc.w BarBrawlMusic-IntroTables ; 104 + dc.w CardMusic-IntroTables ; 106 + dc.w ChaseMusic-IntroTables ; 108 + dc.w DuelMusic-IntroTables ; 110 + dc.w Generic1Music-IntroTables ; 112 + dc.w Generic2Music-IntroTables ; 114 + dc.w Generic3Music-IntroTables ; 116 + dc.w Generic4Music-IntroTables ; 118 + dc.w Generic5Music-IntroTables ; 120 + dc.w GetawayMusic-IntroTables ; 122 + dc.w HoeDown1Music-IntroTables ; 124 + dc.w HoeDown2Music-IntroTables ; 126 + dc.w 0 ; HonkyMusic-IntroTables ; 128 + dc.w 0 ; Rag3Music-IntroTables ; 130 + dc.w RagTimeMusic-IntroTables ; 132 + dc.w ShockMusic-IntroTables ; 134 + dc.w ShootOutMusic-IntroTables ; 136 + dc.w ThemeMusic-IntroTables ; 138 + dc.w TrainMusic-IntroTables ; 140 + dc.w ShootOut2Music-IntroTables ; 142 + dc.w ShootOut3Music-IntroTables ; 144 + dc.w 0 ; 146 + dc.w 0 ; 148 +UghSampleNum equ 150 + dc.w UghSample-IntroTables ; 150 +Colt45SampleNum equ 152 + dc.w Colt45Sample-IntroTables ; 152 + dc.w 0 ; 154 + dc.w 0 ; 156 + dc.w 0 ; 158 + dc.w 0 ; 160 + dc.w 0 ; 162 + dc.w 0 ; 164 + dc.w 0 ; 166 + dc.w 0 ; 168 + dc.w 0 ; 170 + dc.w 0 ; 172 + dc.w 0 ; 174 + dc.w 0 ; 176 + dc.w 0 ; 178 + dc.w ShootoutSamples-IntroTables ; 180 + dc.w DuelSamples-IntroTables ; 182 + dc.w RustlingSamples-IntroTables ; 184 + dc.w TrackingSamples-IntroTables ; 186 + dc.w EscapeSamples-IntroTables ; 188 + dc.w BankJobSamples-IntroTables ; 190 + dc.w CardSamples-IntroTables ; 192 + dc.w BrawlSamples-IntroTables ; 194 + dc.w IntroSamples-IntroTables ; 196 + +ExponentTableName + dc.b 'exponent.025',0 + even + + +IntroSamples + dc.b Colt45SampleNum/2 + dc.b 0 + +ShootOutSamples +; list of sample pointers needed for shootout + dc.b Colt45SampleNum/2 + dc.b 0 + +DuelSamples + dc.b Colt45SampleNum/2 + dc.b 0 * 182 +RustlingSamples + dc.b 0 *184 +TrackingSamples + dc.b 0 ; 186 +EscapeSamples + dc.b Colt45SampleNum/2 + dc.b 0 ; 188 +BankJobSamples + dc.b 0 ; 190 +CardSamples + dc.b 0 ; 192 +BrawlSamples + dc.b UghSampleNum/2 + dc.b 0 ; 180 + +Colt45Sample dc.b 'colt45.spl',0 + even +UghSample dc.b 'ugh.spl',0 + even + + +SaveFilename dc.b 'billy.sav',0 + even + +ambushMusic dc.b 'ambushv2.mid',0 + even +BarBrawlMusic dc.b 'barbrawl.mid',0 + even +CardMusic dc.b 'cardv2.mid',0 + even +ChaseMusic dc.b 'Chasev2.mid',0 + even +DuelMusic dc.b 'duel.mid',0 + even +Generic1Music dc.b 'generic.mid',0 + even +Generic2Music dc.b 'gen2v3.mid',0 + even +Generic3Music dc.b 'generic3.mid',0 + even +Generic4Music dc.b 'generic4.mid',0 + even +Generic5Music dc.b 'generic5.mid',0 + even +HoeDown1Music dc.b 'hoedown1.mid',0 + even +HoeDown2Music dc.b 'hoedown2.mid',0 + even +;;HonkyMusic dc.b 'honky1v2.mid',0 + even +;Rag3Music dc.b 'rag3.mid',0 +; even +RagTimeMusic dc.b 'ragtime.mid',0 + even +ShockMusic dc.b 'shockv2.mid',0 + even +ShootOutMusic dc.b 'shootout.mid',0 + even +ShootOut2Music dc.b 'shootut2.mid',0 + even +ShootOut3Music dc.b 'shootut3.mid',0 + even +ThemeMusic dc.b 'map.mid',0 + even +GetawayMusic dc.b 'Getwayv3.mid',0 + even +BankJobMusic dc.b 'BankJbV2.mid',0 + even +TrainMusic dc.b 'train.mid',0 + even + + + +ArcadeSpritesFilename + dc.b 'arcades1.cmp',0 + even + +ArcadeStructureFilename + dc.b 's3.dat',0 * 'desert7.fnt',0 + even + + + +IntroSprites + dc.b 'introsp1.cmp',0 + even +IntroStructures + dc.b 'intros.dat',0 + even + +NoDelay equ 2 +LongTime equ 3000 +DefaultX equ 32 +DefaultY equ 32 +LowY equ 112 +dInsert equ 0 +dInsertR equ 2 +dRemove equ -1 +ScreenInfo +; for intro sequence: contains which picture to display, +; and for how many frames. +; parameters are: +; pic num, frames, soundtrack, repeat count for music + dc.w 99,100,HoeDown2Music-IntroTables,0 * title picture + dc.w 100, 230, RagTimeMusic-IntroTables, 0 ; street scene outside dance hall + dc.w 101, 50, music1, 0 ; blacksmith + dc.w 2001, NoDelay, DefaultX,DefaultY,dInsert + dc.w 102, 200, ChaseMusic-IntroTables, 0 ; street scene, scrolls after half time + dc.w 103, 210, music1, 0 ; possee in valley + + dc.w 104, 110, HoeDown1Music-IntroTables, 0 ; hoe down scene, dancers + dc.w 2002, NoDelay, DefaultX,DefaultY,dInsert + + dc.w 105, 300, 0, 0 ; talk 1 (inside) + dc.w 2003, NoDelay, DefaultX+16,LowY,dInsert + dc.w 2003, 79, DefaultX+16,LowY,dRemove + dc.w 2004, 100, DefaultX-16,LowY,dInsertR + dc.w 2004, 190, DefaultX-16,LowY,dRemove + dc.w 2005, 220, DefaultX+16,LowY,dInsertR + + dc.w 106, 95, HoeDown2Music-IntroTables, 0 ; talk outside + dc.w 2006, NoDelay, DefaultX+48,LowY+32,dInsert + + dc.w 107, 150, 0, 0 ; buggy from distance, scrolls. + dc.w 2007, 90, DefaultX,DefaultY,dInsertR + dc.w 2007, 100,DefaultX,DefaultY,dRemove + + dc.w 108, 70, ShootOutMusic-IntroTables, 0 ; buggy, bandit in F/G + + dc.w 109, 250, 0, 0 ; Tunstall propped on wheel + dc.w 2008, NoDelay, DefaultX,LowY,dInsert + dc.w 2008, 80, DefaultX,LowY,dRemove + dc.w 2009, 100, DefaultX,LowY,dInsertR + +; dc.w 2300, 50, RagTimeMusic-IntroTables,0 ; town scene walkabout in front of bank +; dc.w 2010, NoDelay, DefaultX,DefaultY,dInsert ; Generic text +; dc.w 2304, 50, RagTimeMusic-IntroTables,0 ; dancers +; dc.w 2011, NoDelay, DefaultX,DefaultY+16,dInsert ; Billy text +; +; dc.w 2303, 50, RagTimeMusic-IntroTables,0 ; shootout1 +; dc.w 2012, NoDelay, DefaultX,DefaultY,dInsert ; Billy Text 2 +; +; dc.w 2301, 50, RagTimeMusic-IntroTables,0 ; shop +; dc.w 2013, NoDelay, DefaultX,DefaultY,dInsert ; Pat Text 1 +; dc.w 2302, 50, RagTimeMusic-IntroTables,0 ; shootout2 +; dc.w 2014, NoDelay, DefaultX,DefaultY,dInsert ; Pat Text 2 + dc.w -1,-1,-1 + +music1 equ 0 * no music at present + + +IdentikitStructures + dc.b 'identiks.dat',0 + even + +LinkingSprites + dc.b 'linking1.cmp',0 + even + +LinkingStructures + dc.b 'linkings.dat',0 + even + + +SystemPalette +; palette for returning to system on ST ONLY +; to the ega colors. + dc.w $777f ; 0000 ; transparent/black + dc.w $0000 ; 777f ; white + dc.w $3330 ; + dc.w $0000 ; 777f ; + dc.w $0004 ; + dc.w $777a ; + dc.w $3333 ; + dc.w $7770 ; + dc.w $0008 ; + dc.w $7772 ; + dc.w $333c ; + dc.w $7776 ; + dc.w $000d ; yellow + dc.w $777e ; lgrey + dc.w $3331 ; dgrey + dc.w $7774 ; green + +;----------------------------------------- + +AdlibFilename + dc.b 'all.adl',0 + even + +TownSpritesFilename + dc.b 'sprites1.cmp',0 + even + +FontFilename + dc.b 'western.fnt',0 + even + +StructureFilename + dc.b 's.dat',0 + even + + + include 'MENUDATA.TXT',0 + + +;------------------ +TownFixedData ; a list on its own + dc.w TownPeopleData-TownFixedData ; 0 + dc.w TownData-TownFixedData ; 2 + dc.w SubPlotData-TownFixedData ; 4 + dc.w IdentikitPrototypes-TownFixedData ; 6 + + +IdentikitPrototypes +; For each person type we have a list of entries of the following +; form: +; .b First XZH (0 terminates person) +; .b Number of XZHs possible (1 upwards) +; .b First RasterOffset +; .b Number of Raster Offsets to choose from (0 upwards) + dc.w BlankPerson-TownFixedData * type 0 person + dc.w Type1Person-TownFixedData * tough cowboy + dc.w Type2Person-TownFixedData * mexican + dc.w Type3Person-TownFixedData + dc.w Type4Person-TownFixedData + dc.w Type5Person-TownFixedData + dc.w Type6Person-TownFixedData + dc.w Type7Person-TownFixedData + dc.w Type8Person-TownFixedData + dc.w Type9Person-TownFixedData + dc.w Type10Person-TownFixedData + dc.w Type11Person-TownFixedData + dc.w Type12Person-TownFixedData + dc.w Type13Person-TownFixedData + dc.w Type14Person-TownFixedData + dc.w Type15Person-TownFixedData + dc.w Type16Person-TownFixedData + dc.w Type17Person-TownFixedData + dc.w Type18Person-TownFixedData ; sick man etc. + dc.w Type19Person-TownFixedData ; mex peasant. + dc.w Type20Person-TownFixedData ; soldier + dc.w Type21Person-TownFixedData ; Clint, with cape. + +BlankPerson +* used for people like Indian chief, prospector who +* are already shown in the picture, so don't need to be +* shown separately + dc.b 0,0,0,0 + +Type1Person +* Cowboy, jerkin, black hat, moustache +* As used in room 430 (Santa Fe) + dc.b 24,1,0,1 ; neck: closed, for string tie + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: not greying +; no sideburns +; no waistcoat + dc.b 27,1,3,1 ; trouser: blue jeans + dc.b 29,1,0,1 ; gunbelt + + dc.b 25,1,0,1 ; shirt + + dc.b 33,1,0,0 ; string tie +; dealer's armbands not used. + dc.b 35,1,0,1 ; jacket + dc.b 38,1,0,1 ; hands + dc.b 42,1,1,1 ; hat: always the same. + dc.b 0,0,0,0 + +Type2Person +* Mexican cross-breed, as used in 431 (Santa Fe) + dc.b 23,1,0,1 ; neck - open + dc.b 19,1,0,1 ; mexican neck overlay + dc.b 1,1,0,18 ; face + dc.b 20,1,4,1 ; top of head + dc.b 21,1,0,4 ; hair +;; dc.b 22,1,0,2 ; sideburn + dc.b 27,1,2,1 ; trousers: brown + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 47,1,0,1 ; bandolero +;; dc.b 35,2,0,1 ; jacket + dc.b 45,1,0,1 ; Mexican hands + dc.b 42,1,1,2 ; hat, one of two brown ones. + dc.b 0,0,0,0 + +Type3Person +* Old male American, as used in 433 Santa Fe. + dc.b 23,1,0,1 ; neck - open collar + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,9,1 ; hair - white beard +; no sideburn + dc.b 27,1,2,1 ; trouser +; no belt + dc.b 25,1,0,1 ; shirt +; no braces + dc.b 26,1,0,1 ; brown waistcoat +; no tie +; no jacket + dc.b 38,1,0,1 ; hands + dc.b 42,1,2,1 ; hat: brown felt + dc.b 0,0,0,0 + +Type4Person +* Old male in dungarees + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,8,8 ; hair - greying + dc.b 25,1,0,1 ; shirt + dc.b 31,1,0,1 ; Dungarees + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type5Person +* General tough guy - used for cowboys around town, where +* I haven't put in a specific prototype for them. + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 35,3,0,1 ; jacket: brown or grey. + dc.b 38,1,0,1 ; hands + dc.b 42,1,0,3 ; hat, any. + dc.b 0,0,0,0 + +Type6Person +* tough guy for 434 Santa Fe + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; no sideburns + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 37,1,0,1 ; jacket: grey. + dc.b 38,1,0,1 ; hands + dc.b 42,1,2,1 ; hat: brown felt + dc.b 0,0,0,0 + +Type7Person +; hostess for santa fe + dc.b 52,1,1,1 * body - yellow + dc.b 2,1,0,3 * face - reduced from choice of 7 to ensure youth! +;; dc.b 53,1,0,1 * skirt +; dc.b 54,1,0,1 * belt + dc.b 61,1,0,1 * hand with tray. + dc.b 51,1,0,1 * hair - yellow + dc.b 0,0,0,0 + +Type8Person +; older woman +; dc.b 57,1,0,2 * blouse + dc.b 52,1,0,1 * body - blue + dc.b 2,1,0,7 * face +; dc.b 56,1,0,1 * skirt +; dc.b 54,1,0,1 * belt + dc.b 63,1,0,1 * both hands - for 57 blouse + dc.b 51,1,2,1 * hair - greying + dc.b 0,0,0,0 + +Type9Person +; woman in green + dc.b 52,0,2,1 * body +; dc.b 58,1,0,1 * blouse - fits over body + dc.b 2,1,0,3 * face * reduced from 7 to reduce age +;; dc.b 59,1,0,1 * skirt + dc.b 60,1,0,1 * both hands + dc.b 51,1,0,4 * hair - any + dc.b 0,0,0,0 + +Type10Person +; Mexican with big Sombrero + dc.b 24,1,0,1 ; neck - buttoned (so can't see pink skin underneath) +;; dc.b 23,1,0,1 ; neck - open + dc.b 19,1,0,1 ; mexican neck overlay + dc.b 1,1,180,1 ; face - Mexican + dc.b 20,1,4,1 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 46,1,0,1 ; Neckerchief or similar. 1 only, else can see +; the pink skin underneath! + dc.b 35,3,0,1 ; jacket: brown or grey. + dc.b 45,1,0,1 ; Mexican hands + dc.b 41,1,0,1 ; big Sombrero + dc.b 0,0,0,0 + +Type11Person +; Shop man, soberly dressed. + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,16 ; hair: any + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 28,1,0,1 ; belt + dc.b 25,1,0,1 ; shirt + dc.b 32,1,0,2 ; tie +; dealer's armbands not used. + dc.b 37,1,0,1 ; jacket: suit + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type12Person +; shop man, randomly dressed. + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,16 ; hair: any + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 28,1,0,1 ; belt + dc.b 25,1,0,1 ; shirt + dc.b 32,2,0,2 ; tie + dc.b 26,1,0,2 ; waistcoat + +; dealer's armbands not used. + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type13Person +; clerk with visor, for wire/bank + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,16 ; hair: any + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 28,1,0,1 ; belt + dc.b 25,1,0,1 ; shirt + dc.b 32,1,0,2 ; tie + dc.b 26,1,0,2 ; waistcoat +; dealer's armbands not used. + dc.b 38,1,0,1 ; hands + dc.b 40,1,0,1 ; visor +; no hat + dc.b 0,0,0,0 + +Type14Person +; lady in green skirt, as walking all over the place. + dc.b 52,1,2,1 * body +; dc.b 58,1,0,1 * green blouse - fits over body + dc.b 2,1,0,7 * face +;; dc.b 59,1,0,1 * skirt + dc.b 60,1,0,1 * both hands + dc.b 51,1,0,4 * hair - any + dc.b 0,0,0,0 + +Type15Person +; lady in blue skirt, as walking all over the place. + dc.b 52,1,0,1 * body + dc.b 58,1,0,1 * blouse - fits over body + dc.b 2,1,0,7 * face +;; dc.b 59,1,0,1 * skirt + dc.b 60,1,0,1 * both hands + dc.b 51,1,0,4 * hair - any + dc.b 0,0,0,0 + +Type16Person +; barman (e.g. Santa Fe) + dc.b 24,1,0,1 ; neck - buttoned + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any non-greying + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,0,2 ; trousers: grey/dark + dc.b 25,1,0,1 ; shirt + dc.b 30,1,0,1 ; braces + dc.b 32,2,0,2 ; tie + dc.b 34,1,0,1 ; dealer's armbands (around elbow). Must be before waistcoat + dc.b 26,1,0,1 ; waistcoat: brown + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + + +Type17Person +* tough guy in saloon for 560 Santa Fe + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; no sideburns + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 37,1,0,1 ; jacket: grey. + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type18Person +* sick man or poor peasant - e.g. in desert + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,8,7 ; hair: any greying. + dc.b 22,1,0,2 ; sideburn + dc.b 27,1,2,2 ; trousers: brown/blue + dc.b 25,1,0,1 ; shirt +; no tie +; dealer's armbands not used. + dc.b 35,1,0,1 ; jacket: jerkin + dc.b 38,1,0,1 ; hands +; no hat + dc.b 0,0,0,0 + +Type19Person +* mexican peasant - e.g. in desert. + dc.b 24,1,0,1 ; neck - buttoned (so can't see pink skin underneath) + dc.b 19,1,0,1 ; mexican neck overlay + dc.b 1,1,180,1 ; face + dc.b 20,1,4,1 ; top of head + dc.b 21,1,0,7 ; hair: any not greying. +; no sideburns + dc.b 27,1,2,2 ; trousers: brown/blue + dc.b 25,1,0,1 ; shirt + dc.b 45,1,0,1 ; Mexican's hands + dc.b 46,1,0,1 ; Neckerchief or similar. 1 only, else can see +; the pink skin underneath! +; dealer's armbands not used. + dc.b 35,1,0,1 ; jacket: jerkin + dc.b 45,1,0,1 ; Mexican hands + dc.b 41,1,0,1 ; big Sombrero + dc.b 0,0,0,0 + +Type20Person +; Soldier for forts + dc.b 44,1,0,1 ; complete corporal except face + dc.b 1,1,0,18 ; face + dc.b 0,0,0,0 + +Type21Person +* Clint Eastwood look alike - with cape. e.g. 436 Santa Fe. + dc.b 23,1,0,1 ; neck - open + dc.b 1,1,0,18 ; face + dc.b 20,1,0,4 ; top of head + dc.b 21,1,0,8 ; hair: any not greying. +; no sideburns + dc.b 27,1,0,4 ; trousers: any + dc.b 28,2,0,1 ; belt/gunbelt + dc.b 25,1,0,1 ; shirt + dc.b 49,1,0,1 ; cape + dc.b 38,1,0,1 ; hands + dc.b 42,1,2,1 ; hat: brown felt + dc.b 0,0,0,0 + + + +; + dc.b 0,0,0,0 + + +; people type is only currently used to give people +; a name of the right sex. + +YAM equ 0 ; young american male +OAM equ 1 ; old american male +YAF equ 2 ; young american female +OAF equ 3 ; old american female + +YMM equ 4 ; young Mexican male +OMM equ 5 ; old Mexican male +YMF equ 6 ; young Mexican female +OMF equ 7 ; old Mexican female + +YIM equ 8 ; young Indian male +OIM equ 9 ; old Indian male +YIF equ 10 ; young Indian female +OIF equ 11 ; old Indian female + +TownPeopleData +; 8 bytes per person: initial data for all people. +; Because people who have small versions need to go +; into Hires() at run-time: it is important to fit +; all these people into the first 50-or-so objects. +; Otherwise the amount of memory required for ObjectTable() is going +; to increase. + +ML equ 200 +; Room number is either: +; - room number in walkabout section - e.g. 30..50 for Santa Fe +; - or for map locations: ML+"LOCATION". These are mutually exclusive + + +PB equ 620 * base for people's xzh objects +DefaultMenu equ 0 * menu number divided by 2 +Default2ndMenu equ 0 * menu number divided by 2: this is +* the menu it goes to if we get back to the default menu +NoPerson equ 254 ; room number for a person which doesn't exist + +; Names - at message 1000+number specified +WhiskeyPete equ 160 +JoeDunn equ 161 +NedParkin equ 162 +KarlBekkert equ 163 +JackShoe equ 164 +BenDavis equ 165 +WarrenOaks equ 166 +WayneRodgers equ 167 +AshUpton equ 168 +ChiefHow equ 169 +RickSands equ 170 +RickRider equ 171 + +LauraPicket equ 210 +WilmaKatz equ 211 +MissRosy equ 212 +LaviniaStrumpet equ 213 ;**** not present. +MrsMcSween equ 214 +girlfriend equ 215 + +NoName equ 0 + +; person 0 (not used...) + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations / 2 + dc.b 1 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 1 430 Santa Fe: Jerkin guy leaning S. + dc.b 30 ; room number in which person appears =255 for end of this table. + dc.b 620-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations / 2 + dc.b 1 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 2 431 Santa Fe: Waistcoat guy sitting S + dc.b 31 ; room number in which person appears =255 for end of this table. + dc.b 621-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 2 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 3 433 Santa Fe: Old guy Waistcoat, sitting S. + dc.b 33 ; room number in which person appears =255 for end of this table. + dc.b 622-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 3 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 4 434 Santa Fe Guy Leaning S, flipping coin. + dc.b 34 ; room number in which person appears =255 for end of this table. + dc.b 623-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 6 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 5 - 435 Santa Fe: Mexican sitting S + dc.b 35 ; room number in which person appears =255 for end of this table. + dc.b 628-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 10 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 6 436 Santa Fe: Clint, leaning E + dc.b 36 ; room number in which person appears =255 for end of this table. + dc.b 623-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 21 ; identikit type prototype to use - caped! + dc.b Default2ndMenu,NoName,0,YAM + +; person 7 437 Santa Fe: Guy sitting E. + dc.b 37 ; room number in which person appears =255 for end of this table. + dc.b 622-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 8: 432 Santa Fe: lady green skirt + dc.b 32 ; room number in which person appears =255 for end of this table. + dc.b 640-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 14 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 9: 450 El Paso: Lady standing S. + dc.b 50 ; room number in which person appears =255 for end of this table. + dc.b 638-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 8 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAF + +; person 10: 451 El Paso: Rocker + dc.b 51 ; room number in which person appears =255 for end of this table. + dc.b 635-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 11: 453 El Paso: Mexican Sitting S + dc.b 53 ; room number in which person appears =255 for end of this table. + dc.b 628-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 10 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 12: 455 El Paso: Mexican Sitting S + dc.b 55 ; room number in which person appears =255 for end of this table. + dc.b 628-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 10 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 13: 470 Roswell: Guy sitting E + dc.b 70 ; room number in which person appears =255 for end of this table. + dc.b 632-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 14: 472 Roswell: Lady green Skirt. + dc.b 72 ; room number in which person appears =255 for end of this table. + dc.b 640-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 14 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 15: 473 Roswell: Lady standing S. + dc.b 73 ; room number in which person appears =255 for end of this table. + dc.b 638-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 8 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAF + +; person 16: 501 Lincoln City: Lady standing S. + dc.b 101 ; room number in which person appears =255 for end of this table. + dc.b 638-PB ; xzh number used to represent person (0 if none, or any +; xzh + dc.b SomeoneNeedsHelpMenu/2 ; Current menu to use in conversations + dc.b 8 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAF + +; person 17: 502 Lincoln City: Rocker + dc.b 102 ; room number in which person appears =255 for end of this table. + dc.b 15 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 18: 504 Lincoln City: Lady Blue Skirt + dc.b 104 ; room number in which person appears =255 for end of this table. + dc.b 641-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b WidowWomanMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 19: 504 Lincoln City: rocker + dc.b 104 ; room number in which person appears =255 for end of this table. + dc.b 636-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 20: 522 Mesilla: Lady Green Skirt + dc.b 122 ; room number in which person appears =255 for end of this table. + dc.b 640-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b WidowWomanMenu/2 ; Current menu to use in conversations + dc.b 14 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + +; person 21: 523 Mesilla: Guy leaning S, flipping a coin. + dc.b 4 ; room number in which person appears =255 for end of this table. + dc.b 624-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 6 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 22: 540 White Oaks: Rocker + dc.b 140 ; room number in which person appears =255 for end of this table. + dc.b 635-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 3 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,OAM + +; person 23: Undertaker Santa Fe + dc.b 1 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 24: Undertaker El Paso + dc.b 2 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 25: Undertaker Roswell + dc.b 3 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 26: Wire office man Santa Fe + dc.b 5 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 27: Wire Office man El Paso + dc.b 6 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 28: News office man Santa Fe + dc.b 8 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 29: News office man El Paso + dc.b 9 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 30: News office man White oaks + dc.b 10 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 31: bank Santa Fe + dc.b 12 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 32: bank El Paso + dc.b 13 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 33: bank Roswll + dc.b 14 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 34: bank Lincoln City + dc.b 15 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 35: bank Mesilla + dc.b 16 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 36: bank White Oaks + dc.b 17 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 26/2 ; Current menu to use in conversations + dc.b 13 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 37: Livery person Santa Fe + dc.b 19 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 38: Livery person El Paso + dc.b 20 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 39: Livery person Licoln City + dc.b 21 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 40: Livery person White Oaks + dc.b 22 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SomeoneWasLookingMenu/2 ; Current menu to use in conversations + dc.b 4 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 41: Doctors El Paso + dc.b 24 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 42: Doctors Mesilla + dc.b 25 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 11 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 43: Store man El Paso + dc.b 60 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 44: Murphy Dolan Man in Lincoln + dc.b 62 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 156/2 ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 45: Store Man Roswell - Ash Upton + dc.b 61 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b AshUptonMenu/2 ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,AshUpton,0,YAM + +; person 46: Store man White Oaks + dc.b 63 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 47: unused + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 48: Laura Picket at Hotel in El Paso + dc.b 66 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b LauraPicketMenu/2 ; Current menu to use in conversations + dc.b 9 ; identikit type prototype to use + dc.b Default2ndMenu,LauraPicket,0,YAM + +; person 49: girl in house/Lincoln City + dc.b 69 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b GirlFriendMenu/2 ; Current menu to use in conversations + dc.b 9 ; identikit type prototype to use + dc.b Default2ndMenu,Girlfriend,0,YAF + +; person 50: hostess in Santa Fe Saloon (560) + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 639-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 14/2 ; Current menu to use in conversations + dc.b 7 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAF + + +; person 51: Store man Santa Fe + dc.b 64 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations + dc.b 12 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 52: barman in Santa Fe. + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 12/2 ; Current menu to use in conversations + dc.b 16 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + + + + +; people to meet at random in desert have room numbers 190..197 + + + + +; people that either Pat or Billy can meet... +; person 53: person to meet at random in desert by Anglo farmers. +; peasant being run off land + dc.b 190 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 50/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (Mexican peasant) + dc.b Default2ndMenu,NoName,0,YAM + +; person 54: person to meet at random in desert. +; mexican being picked on. + dc.b 191 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 58/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (peasant) + dc.b Default2ndMenu,NoName,0,YAM + +; person 55: person to meet at random in desert. +; sick man + dc.b 192 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 58/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (Mexican) + dc.b Default2ndMenu,NoName,0,YAM + +; person 56: person to meet at random in desert. + dc.b 193 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 62/2 ; Current menu to use in conversations + dc.b 18 ; identikit type prototype to use (sick man) + dc.b Default2ndMenu,NoName,0,YAM + + + + + +; people that only Billy can meet... +; person 57: person to meet at random in desert. +; peasant wants help nursing his family + dc.b 194 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 104/2 ; Current menu to use in conversations + dc.b 19 ; identikit type prototype to use (peasant with sick family) + dc.b Default2ndMenu,NoName,0,YAM + + + +; person 58: person to meet at random in desert. +++UNUSED+++ + dc.b NoPerson ; 195 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; people that only Pat can meet... +; person 59: person to meet at random in desert. +; Texan possee + dc.b 196 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 76/2 ; Current menu to use in conversations + dc.b 6 ; identikit type prototype to use (Possee representative) + dc.b Default2ndMenu,NoName,0,YAM + +; person 60: person to meet at random in desert. +; Barney Mason + dc.b 197 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 80/2 ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use (Barney Mason) + dc.b Default2ndMenu,NoName,0,YAM + +; person 61: person to meet at random in desert. +++UNUSED+++ + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 62: person to meet at random in desert. +++UNUSED+++ + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 63: woman being bothered by a gunslinger in saloon. El Paso 2 + dc.b 168 ; room number in which person appears =255 for end of this table. + dc.b 637-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 54/2 ; Current menu to use in conversations + dc.b 9 ; identikit type prototype to use (young Woman Green Skirt) + dc.b Default2ndMenu,NoName,0,YAF + +; person 64 560 Santa Fe (Saloon): guy drinking at bar. Shirt/brown trousers +; Ned Parkin + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 630-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b NedParkinMenu/2 ; Current menu to use in conversations / 2 + dc.b 1 ; identikit type prototype to use + dc.b Default2ndMenu,NedParkin,0,YAM + +; person 65 560 Santa Fe (Saloon): guy at table. Grey jack/jeans + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b BenDavisMenu/2 ; Current menu to use in conversations / 2 + dc.b 17 ; identikit type prototype to use + dc.b Default2ndMenu,BenDavis,0,YAM + +; person 66 562 Santa Fe (Saloon): guy at table. Grey jack/brown trousers + dc.b 160 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 17 ; identikit type prototype to use + dc.b Default2ndMenu,KarlBekkert,0,YAM + +; person 67 soldier at Fort Stanton + dc.b ML+19 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 20 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 68 soldier at Fort Sumner + dc.b ML+20 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 66/2 ; Current menu to use in conversations: army being cheated + dc.b 20 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 69 - at Bitter lake ranch + dc.b ML+24 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 70 - at Fritz Ranch + dc.b ML+25 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 71 - at Chisum Ranch + dc.b ML+26 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 72 - Dedrick Ranch + dc.b ML+27 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b DefaultMenu ; Current menu to use in conversations - Indians not getting beef + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 73 - at Beckwith Ranch + dc.b ML+28 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 74 - Mrs McSween - at Tunstall Ranch + dc.b ML+29 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 134/2 ; Current menu to use in conversations - Indians not getting beef + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,MrsMcSween,0,OAF + + +; person 75 - at Reed Ranch + dc.b ML+30 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 132/2 ; Current menu to use in conversations: get lost + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 76 - Indian chief at Mescalero + dc.b ML+35 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 92/2 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,ChiefHow,0,OIM + + +; person 77 - prospector + dc.b ML+48 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b ProspectorMenu/2 ; Current menu to use in conversations - prospector + dc.b 0 ; identikit type prototype to use + dc.b 136/2,WhiskeyPete,0,YAM + +; person 78 - Joe Grant. +; appears in saloon in Santa Fe (triggered by WALKABOUT.TXT) + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 128/2 ; Current menu to use in conversations - Indians not getting beef + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; A few special objects which you can select in town - e.g. +; the wanted posters. +; person - 79 - wanted poster. Not Very talkative! + dc.b 0 ; room number in which person appears =255 for end of this table. + dc.b 642-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 80 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 81 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 82 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person - 83 - object + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations - Indians not getting beef + dc.b 0 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,0 + +; person 84 - gambler + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 1 ; object number used to represent person (should be 2658) + dc.b CardGameMenu/2 ; Current menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,0,0,OAF + + + +; person 85 - Jose Miguel thingy +; interrupts player looking at map + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; default menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 86 - guy at bar in Santa Fe 2 (LHS): +; grey jacket, blue jeans, brown hat, blue neckerchief + dc.b 170 ; room number in which person appears =255 for end of this table. + dc.b 631-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SpillDrinkMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 87 - guy at bar in Santa Fe 2 (LHS): +; Grey jacket, brown waistcoat, grey jacket. Cigarette in mouth +;' grey hat + dc.b 170 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; default menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 88 - guy at bar in El Paso 1 (LHS): +; Grey jacket, blue jeans, blue neckerchief, brown hat + dc.b 166 ; room number in which person appears =255 for end of this table. + dc.b 631-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b JackShoeMenu/2 ; default menu to use in conversations + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,JackShoe,0,YAM + + +; person 89 - guy at bar in El Paso 1 (LHS): +; Grey jacket, brown waistcoat, grey jacket. Cigarette in mouth +;' grey hat + dc.b 166 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 90 566 El Paso (Saloon): guy at table. Grey jack/blue trousers + dc.b 166 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SpillDrinkMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 91 568 El Paso (Saloon 2): guy at table. Grey jack/brown trousers + dc.b 168 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,RickSands,0,YAM + + +; person 92 574 Roswell (Saloon): guy at bar. Brown jacket, grey +; trousers, white neckerchief, brown hat. + dc.b 174 ; room number in which person appears =255 for end of this table. + dc.b 630-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b BenDavisMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 93 574 Roswell (Saloon): guy at table +; trousers, white neckerchief, brown hat. + dc.b 174 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 94 573 Roswell (Saloon): guy at table +; tbrown trousers, grey jacket, blue neckerchief, brown hat + dc.b 173 ; room number in which person appears =255 for end of this table. + dc.b 627-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b RickRiderMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,RickRider,0,YAM + +; person 95 573 Roswell (Saloon): guy at table +; grey trousers, grey jacket, brown waistcoat, grey hat + dc.b 173 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 95 565 Lincoln city (Saloon): guy at table +; blue trousers, grey jacket, grey hat + dc.b 165 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 96 565 Lincoln city (Saloon): guy at table +; grey trousers, grey jacket, brown waistcoat, grey hat + dc.b 165 ; room number in which person appears =255 for end of this table. + dc.b 633-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + +; person 97 565 Lincoln city (Saloon): guy at bar +; grey trousers, brown jacket, brown hat + dc.b 165 ; room number in which person appears =255 for end of this table. + dc.b 630-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b SpillDrinkMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + +; person 98 569 Mesilla (Saloon): guy at table +; blue trousers, grey jacket, grey hat + dc.b 169 ; room number in which person appears =255 for end of this table. + dc.b 629-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b CardGameMenu/2 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,WarrenOaks,0,YAM + + +; person 99 572 White Oaks (Saloon): guy at table +; grey trousers, brown jacket, brown hat +; Slightly Mexican appearance, with big black moustache + dc.b 172 ; room number in which person appears =255 for end of this table. + dc.b 634-PB ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,WayneRodgers,0,YAM + + +; person 100 Tom O'Foliard +; grey trousers, grey jacket, brown waistcoat, grey hat + dc.b NoPerson ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b 0 ; Current menu to use in conversations / 2 + dc.b 5 ; identikit type prototype to use + dc.b Default2ndMenu,NoName,0,YAM + + + +; person 101 - Wilma Katz - at Katz farmhouse (31) + dc.b ML+31 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b WilmaKatzMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,WilmaKatz,0,OAF + +; person 102 - at Dunn Farmhouse (32) + dc.b ML+32 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b LonelyFarmhouseMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,MrsMcSween,0,OAF + +; person 103 - at Rose Farmhosue (33) + dc.b ML+33 ; room number in which person appears =255 for end of this table. + dc.b 0 ; xzh number used to represent person (0 if none, or any +; xzh within range 620..650) + dc.b LonelyFarmhouseMenu/2 ; Current menu to use in conversations + dc.b 15 ; identikit type prototype to use + dc.b Default2ndMenu,MissRosy,0,OAF + + + dc.b 255 ; end of table. + + + +TownData +; 16 bytes per town +; town 10: Santa Fe + dc.w 10 ; increase in gold per time unit. + dc.w 200 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 11: White Oaks + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 12: Lincoln City + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 13: Mesilla + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 14: Roswll + dc.w 3 ; increase in gold per time unit. + dc.w 50 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + +; town 15: El Paso + dc.w 8 ; increase in gold per time unit. + dc.w 150 ; maximum level of gold in the bank. + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + dc.w 0 + + +SubPlotData +; There is a table containing all the bits of information +; people may want to know about: in TownVarData. +; This is initialised from a table of identical format +; in TownFixedData (except that offsets are relative to the +; start of this little table, wheras in TownVarData they +; are relative to TownVarData). The copy routine makes the +; appropriate conversion. +; +; 10 pointers at start... + dc.w EndSubPlotData-SubPlotData + dc.w SPMoney-SubPlotData ; .w Offset of "Money Location" information. + dc.w SPDeputies-SubPlotData ; .w Offset of "Deputies Location" information. + dc.w SPGangs-SubPlotData ; .w Offset of "Gang Location" information + dc.w SPRobbery-SubPlotData ; .w Offset of "Recent robbery" information + dc.w SPSubPlots-SubPlotData ; .w Offset of sub-plot table. + dc.w SPHidden-SubPlotData ; .w Offset of "Hidden things" table for map + dc.w CommsInfo-SubPlotData ; .w offset of "things the other computer wants +; to know about. + dc.w 0 + dc.w 0 + dc.w 0 + +CommsInfo + dc.b 0 * not used + dc.b 0 * LOCATION of pat + dc.b 0 * LOCATION of Billy + + even + +SPHidden +; table for map containing one byte for every object on map. +; If zero, it will be displayed (unless overridden elsewhere) +; If one, it will be hidden. This is used for making e.g. +; farmhouses disappear after we've used their subplots + dc.b 0,0,0,0,0,0,0,0 ; 0..7 + dc.b 0,0,0,0,0,0,0,0 ; 8..15 + dc.b 0,0,0,0,0,0,0,0 ; 16..23 + dc.b 0,0,0,0,0,0,0,0 ; 24..31 + dc.b 0,0,0,0,0,0,0,0 ; 32..39 + dc.b 0,0,0,0,0,0,0,0 ; 40..47 + dc.b 0,0,0,0,0,0,0,0 ; 48..55 + + +; First word in every entry is 0 if nothing to know. +; 255. if hidden (doesn't appear on map) but can be told to player, +; 254. if hidden (doesn't appear on map) and cannot be told to player. +; non-zero if there is some piece +; of information that may be required. +; Second word is a numerical parameter for several of the +; items. These are coded specially. +; Third and fourth words unused presently. +; fourth to seventh words are four message numbers to print, +; in order. If =FFFF print the numeric parameter. +; If <10, print the appropriate paramter, numbered from +; 2 in steps of 2. - it will be a location name, to choose the message +; from 1000... + +SPMoney + dc.w 1,1000,0,0,966,1010,0,0 ; .w,.w Gold in Bank at town 0 + dc.w 1,400,0,0,966,1011,0,0 ; .w,.w Gold in Bank at town 1 + dc.w 1,400,0,0,966,1012,0,0 ; .w,.w Gold in Bank at town 2 + dc.w 1,400,0,0,966,1013,0,0 ; .w,.w Gold in Bank at town 3 + dc.w 1,400,0,0,966,1014,0,0 ; .w,.w Gold in Bank at town 4 + dc.w 1,400,0,0,966,1015,0,0 ; .w,.w Gold in Bank at town 5 + dc.w -1,-1 + +SPDeputies + dc.w 1,2,0,0,972,$ffff,973,1010 ; .w,.w Number of deputies in town 0 + dc.w 1,0,0,0,972,$ffff,973,1011 ; .w,.w Number of deputies in town 1 + dc.w 1,0,0,0,972,$ffff,973,1012 ; .w,.w Number of deputies in town 2 + dc.w 1,0,0,0,972,$ffff,973,1013 ; .w,.w Number of deputies in town 3 + dc.w 1,0,0,0,972,$ffff,973,1014 ; .w,.w Number of deputies in town 4 + dc.w 1,0,0,0,972,$ffff,973,1015 ; .w,.w Number of deputies in town 5 + dc.w -1,-1 + +SPGangs + dc.w 1,0,0,0,962,1041,965,1010 ; .w,.w Gang location 0 + dc.w 255,1,0,0,962,1042,965,1011 ; .w,.w Gang location 1 + dc.w 255,2,0,0,962,1043,965,1012 ; .w,.w Gang location 2 + dc.w 255,3,0,0,962,1044,965,1013 ; .w,.w Gang location 3 + dc.w 255,4,0,0,962,1045,965,1014 ; .w,.w Gang location 4 + dc.w 255,5,0,0,962,1046,965,1015 ; .w,.w Gang location 5 + dc.w -1,-1 + +SPRobbery + dc.w 41,10,0,0,962,2,963,4 ; default - cooper gang/Santa Fe. + dc.w -1,-1 + +SPSubPlots +; .w,.w Sub-plot? + dc.w 0,0,0,0,0,0,0,0 + dc.w -1,-1 + + +EndSubPlotData + +;----------------- + +ENDTABLE +;--------- + END + diff --git a/l9dev/regress/games.l9/billy.l9/vector.txt b/l9dev/regress/games.l9/billy.l9/vector.txt new file mode 100644 index 0000000..760608d --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/vector.txt @@ -0,0 +1,86 @@ +;.MCInitGraphics data @Dummy,@Dummy,@Dummy ;45 +;.MCCalcMatrix data @Dummy,@Dummy,@Dummy ;46 +;.MCDrawVector data @Dummy,@Dummy,@Dummy ;47 + +const + WordVectorX=62 + WordVectorY=64 + WordVectorZ=60 + +var + VectorZSpeed VectorYSpeed VectorXSpeed + +begin + + +cif ST ;***** + +;--- +.VectorDemo + gosub @MCInitGraphics + VectorZSpeed=8 ;* 1 ; speed + VectorYSpeed=32 ;* 1 ; speed + VectorXSpeed=64 ;* 1 ; speed +.MikeLoop + gosub @DisplayEverything ;***** @BuildAndDisplayFrame ;***** + + &dx1=WordWS(WordVectorX) + add dx1,VectorXSpeed + &WordWS(WordVectorX)=dx1 + &dx1=WordWS(WordVectorZ) + add dx1,VectorZSpeed + &WordWS(WordVectorZ)=dx1 + &dx1=WordWS(WordVectorY) + add dx1,VectorYSpeed + &WordWS(WordVectorY)=dx1 + + gosub @MCOsrdch + if v2<>2 then NotIncreaseX + add VectorXSpeed,VectorXSpeed +.NotIncreaseX + if v2<>3 then NotIncreaseZ + add VectorZSpeed,VectorZSpeed +.NotIncreaseZ + if v2<>4 then NotIncreaseY + add VectorYSpeed,VectorYSpeed +.NotIncreaseY + if v2<>5 then NotResetSpeed + VectorXSpeed=1 + VectorZSpeed=1 + VectorYSpeed=1 + +.NotResetSpeed + +;*Joystick... + c8=8 + v1=ByteWS(BytejoystickStatus) + if v1<>4 then NotJLeft +; if VectorXspeed=c0 then NotJLeft + VectorXspeed=0 ; sub VectorXSpeed,c8 +.NotJLeft + if v1<>8 then NotJRight + VectorXSpeed=500 ; add VectorXSpeed,c8 +.NotJRight + + if v1<>2 then NotDown +; if VectorYspeed=c0 then NotDown + VectorYSpeed=0 ; sub VectorYSpeed,c8 +.NotDown + if v1<>1 then NotJUp + VectorYspeed=500 ; add VectorYSpeed,c8 +.NotJUp + + if v1<>130 then NotFireDown +; if VectorZspeed=c0 then NotFireDown + VectorZspeed=0 ; sub VectorZSpeed,c8 +.NotFireDown + if v1<>129 then NotFireUp + VectorZspeed=500 ; add VectorZSpeed,c8 +.NotFireUp + +; v2=hikey + if v2=1 then @Menu ;*** @MCCloseDown + if v2=0 then @MikeLoop + goto @MikeLoop + +cend ;***** \ No newline at end of file diff --git a/l9dev/regress/games.l9/billy.l9/vectors.txt b/l9dev/regress/games.l9/billy.l9/vectors.txt new file mode 100644 index 0000000..c38c002 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/vectors.txt @@ -0,0 +1,274 @@ +; VECTORS.TXT +; +; vectors to get over long-jump limitations. Compile +; as near to the middle of your program (by code size) +; as possible + begin +.MCHeroOnceOnlyInit goto @vMCHeroOnceOnlyInit +.MCHeroInit goto @vMCHeroInit +.MCClearScreen goto @vMCClearScreen + +.MCMoveScreen goto @vMCMoveScreen +.MCSpecials goto @vMCSpecials +.MCBuildBackground goto @vMCBuildBackground +.MCDisplayDestroyedWalls goto @vMCDisplayDestroyedWalls +.MCMoveAllSprites goto @vMCMoveAllSprites +.MCDisplayAllSprites goto @vMCDisplayAllSprites +.MCTrimEdges goto @vMCTrimEdges +.MCDisplayTextLine goto @vMCDisplayTextLine +.MCDisplayUpperTextLine goto @vMCDisplayUpperTextLine +.MCDoAllTimers goto @vMCDoAllTimers +.MCCalculateMemoryFree goto @vMCCalculateMemoryFree +.MCHeroInput goto @vMCHeroInput +.MCOswrchV1 goto @vMCOswrchV1 +.MCInvertedOswrchV1 goto @vMCInvertedOswrchV1 +.MCDestroyTempMoved goto @vMCDestroyTempMoved +.MCDestroyTempFixed goto @vMCDestroyTempFixed +.MCCloseDown goto @vMCCloseDown +.MCFindSprite goto @vMCFindSprite +.MCSetUpNewSprite goto @vMCSetUpNewSprite +.MCSprite goto @vMCSprite +.MCHandlePlayerInput goto @vMCHandlePlayerInput +.MCReturnFrameTime goto @vMCReturnFrameTime +.MCUpdateFrameTime goto @vMCUpdateFrameTime +.MCClearRectangle goto @vMCClearRectangle +.MCMapBuildBackground goto @vMCMapBuildBackground +.MCPreScrollMap goto @vMCPreScrollMap +.MCSpecialCheck goto @vMCSpecialCheck +.MCStartBigExplosion goto @vMCStartBigExplosion +.MCScrollTextLine goto @vMCScrollTextLine +.MCReCalcSpriteGraphics goto @vMCReCalcSpriteGraphics +.MCOsrdch goto @vMCOsrdch +.MCChecksum goto @vMCChecksum +.MCEmptyRoom +.MCInit3D goto @vMCEmptyRoom +.MCDrawObjectV1 goto @vMCDrawObjectV1 +.MCBuildRoom +.MCBuildViewMap goto @vMCBuildRoom + +.MCDisplayRoom +.MCDisplayViewMap goto @vMCDisplayRoom + +.MCInitBootPrg goto @vMCInitBootPrg +.MCReturnSpriteAddress goto @vMCReturnSpriteAddress +.MCNoClipSprite goto @vMCNoClipSprite +.MCCalcScreenAddress goto @vMCCalcScreenAddress +.MCSaveFile goto @vMCSaveFile +.MCLoadFile goto @vMCLoadFile +.MCCopy goto @vMCCopy +.MCAbsChangeListPtr goto @vMCAbsChangeListPtr +.MCLoadCells goto @vMCLoadCells +.MCSetUpPtrs goto @vMCSetUpPtrs +.MCParseInputWord goto @vMCParseInputWord +.MCInitTask goto @vMCInitTask +.MCSnooze goto @vMCSnooze +.MCAddToListPtr goto @vMCAddToListPtr +.MCReserveMemory goto @vMCReserveMemory +.MCSetUpVariablePtrs goto @vMCSetUpVariablePtrs +.MCPreLoadCells goto @vMCPreLoadCells +.MCPlotLogicalScreen goto @vMCPlotLogicalScreen +.MCPlotPhysicalScreen goto @vMCPlotPhysicalScreen +.MCUpdateScreen goto @vMCUpdateScreen +.MCUnPlotScreen goto @vMCUnPlotScreen +; returns v1=actual frame time in ms +.MCSetPalette goto @vMCSetPalette +.MCSetTextWIndow goto @vMCSetTextWIndow +.MCSetGraphicsWindow goto @vMCSetGraphicsWindow +.MCClearChangeMaps goto @vMCClearChangeMaps +.MCClearTextBuffer goto @vMCClearTextBuffer +.MCCopyTextBuffer goto @vMCCopyTextBuffer +.MCEnableTextBuffer goto @vMCEnableTextBuffer +.MCInitSound goto @vMCInitSound +.MCStartSound goto @vMCStartSound +.MCFindObj goto @vMCFindObj +.MCInitGraphics goto @vMCInitGraphics +.MCCalcMatrix goto @vMCCalcMatrix +.MCDrawVector goto @vMCDrawVector +.MCKeyDown goto @vMCKeyDown +.MCInitJoystick goto @vMCInitJoystick +.MCReserveChip goto @vMCReserveChip +.MCSaveProtect goto @vMCSaveProtect +.MCInitScrolling goto @vMCInitScrolling +.MCScrollDirection goto @vMCScrollDirection +.MCPurgeAllCells goto @vMCPurgeAllCells +; MCSetTextWindow = Allocate memory for text buffer +; v1=top screen line +; v2=number of screen lines +; MCSetGraphicsWindow = Set graphics clipping +; v1=Left X +; v2=Right X +; v3=Top Y +; v4=Bottom Y +; MCClearChangeMaps = (Rebuild physical screen from Buffer2) +; MCClearTextBuffer = Clear one character row of text buffer +; v1=buffer Y to clear +; MCCopyTextBuffer = Copy text buffer to physical screen +; v1=Buffer Y to top of text window +; MCEnableTextBuffer = Select character output +; v1=0, write to TextScreenBase +; v1=mask: 1=buffers, 2=Logical, 4=Physical + +.MCSetMaxFrameRate + goto @vMCSetMaxFrameRate + +; Paramters: +; V1 = 84; Time in milliseconds + +.MCSetPreloadPalette + goto @vMCSetPreloadPalette + + +.MCCopyScreenToBuffer + goto @vMCCopyScreenToBuffer + +; Copies the logical screen back to the buffer screen, thus adding +; any sprites on a semi-permament basis. goto @v +; insert/remove activity will corrupt these added sprites. goto @v +; these added sprites do not obey the 3D rules, so may give +; peculiar effects + +.MCRasterHandler + goto @vMCRasterHandler + +; /* Parameters: +; V1 = destination raster +; V2 = source raster or clear color +; V5 = 2; /+ copy raster +/ 0=clear to color + +.MCSetPrintRaster + goto @vMCSetPrintRaster + +; Parameter: V1=raster to print onto from now on. goto @v + + +.MCSetPrintFont + goto @vMCSetPrintFont + +; v1=list number, v2=offset, v3=CGA palette code (mono machines only) + + +.MCRasterPrintCharacter + goto @vMCRasterPrintCharacter + + +.MCPasteCell + goto @vMCPasteCell + + +.MCMobilityAbility + goto @vMCMobilityAbility + + +.MCLoadCellDataDirect + goto @vMCLoadCellDataDirect + +; /* V1=list #, v2=offset, v3=cell # */ + +.MCTransferParkedSprites + goto @vMCTransferParkedSprites + + +.MCDigitise + goto @vMCDigitise + +; /* Paramters: +; V5=0 Initialise +; V5=1 Terminate System +; V5=2 FindState Audio (returns V1=0 or 0FFFF) +; V5=3 Wait For Audio +; V5=4 Volume Control (V5=Volume) +; V5=5 Translate Sample (V1,V2 = sample, V6 = length, +; V3=Frequncy, V4=Volume) +; V5=6 Play Sample (V1,V2 = sample, V3=Frequency, +; V4=loop count, V6=Repeat count) +; V5=7 Terminate Sample +; */ + +.MCOnceOnlyMusicInit + goto @vMCOnceOnlyMusicInit + +; /* Returns V1,V2 = (driver) InfoWord +; V6 = 00000ABC +; A=1 Adlib sound driver +; B=1 Roland sound driver +; C=1 ReelTalk +; (Note: Adlib/Soundblaster requires a resident driver to be +; loaded before the game. goto @v +; error handler call occurs before V6 is returned) +; (Note: This is one of the few cases where error handlers +; could occur before SetUpVariablePtrs, so take care +; not to PRINT to the buffer screens) +; */ + +.MCInitialiseScore + goto @vMCInitialiseScore + +; /* Paramters: +; V1 list V2 offset Music Score +; V3 list V4 offset Adlib Instrument File +; V5 Score number (0-3) +; */ + +.MCPlayScore + goto @vMCPlayScore + +; /* Paramters: +; V1 Score number (0-3) +; V2 Repeat Flag (255=forever, 0=once, #=number of times) +; V3 Operation (0=restart, 1=resume, 2=stop) +; */ + +.MCMusicCloseDown + goto @vMCMusicCloseDown + + +.MCOpenSpriteFile + goto @vMCOpenSpriteFile + +; /* Paramters: +; V1 list V2 offset = first 7 chars of sprites file name +; */ + +.MCstopWithMessage + goto @vMCstopWithMessage + +; /* Parameters: +; V1 list V2 offset = 80 character error message +; As MCCloseDown but also prints message +; */ + +.MCJumpOverlay + goto @vMCJumpOverlay + +; v1 is ascii code: e.g. goto @vg. +; v2 is offset starting from 0 of routine within overlay + +.MCCallOverlay + goto @vMCCallOverlay + +.MCLoadGamedata goto @vMCLoadGamedata +; v1 is ascii code: e.g. gamedat1.dat +; Loads in gamedata but does not affect acode file. +; Remember that list1..9 pointers will be changed, +; with the exception that any pointers equal to 0 in the new +; table.txt/dat will not change the existing pointers + + +;---------------------- + cif TownOverlay +.AfterIntroStart goto @vAfterIntroStart +.DoWholeIntro goto @vDoWholeIntro +.DisplayEverything goto @vDisplayEverything +.SpecialACBKilled return +.HandleText goto @vHandleText +.CloseDown goto @vCloseDown +.LoadStructuresV1 goto @vLoadStructuresV1 +.SpecialAniShift goto @vSpecialAniShift +.PreloadAndInsertDV1 goto @vPreloadAndInsertDV1 +.BuildRoom goto @vBuildRoom +.setDefaultPalettes goto @vSetDefaultPalettes +.AllocateAndLoadFont goto @vAllocateAndLoadFont +.SelectLanguage goto @vSelectLanguage + cend +.sGetControls goto @vsGetControls +.KillACBHeader goto @vKillACBHeader diff --git a/l9dev/regress/games.l9/billy.l9/walkabou.txt b/l9dev/regress/games.l9/billy.l9/walkabou.txt new file mode 100644 index 0000000..8847df2 --- /dev/null +++ b/l9dev/regress/games.l9/billy.l9/walkabou.txt @@ -0,0 +1,1419 @@ +; WALKABOU.TXT +; +; Walkabout code for Billy The Kid +; +; Mike Austin July 1990 +; +var + InfoAlready ; local variable to TalkToPerson + +const + TVDOpinionBillyOffset=1 + TVDOpinionPatOffset=2 + TVDAlignmentByte=5 ; <128 if good, >=128 if bad + TVDNameOffset=6 ; information type this person will ever know about. +; Top bit set if they know about the current event of this type. + TVDInfoByte=7 + + begin + +; Check map square at dv2+dx2,dv3+dx3 +; V1=0 if square is vacant... +;--- +.TownControls + gosub @sGetControls ; still scan escape whilst riding + if PlayerACB=0 then @TCRet ; riding into town? + if PleaseSTopPlayer>1 then @TCStop +; look at kbd/joystick/mouse and return +; dir as new movement direction in standard adventure format +; and FireKey=0 if not pressed, 1 if pressed. +; and FireKeyChange=1 if pressed/released this turn + +; and for directions, returns: +; x1 +; x4 x2 +; x3 +; Non-zero means trying to move in that direction +; and x5=x offset (single pixel movement), signed +; x6=y offset (single pixel movement), signed +; x7=direction number in standard adventure format +; i.e. 1 +; 8 2 +; 7 3 +; 6 4 +; 5 + UpKey=x1 + RightKey=x2 + DownKey=x3 + LeftKey=x4 + XSpeed=x5 + YSpeed=x6 + MenuNumber=0 ; in case not changed elsewhere + if x7=0 then TCNoChangeDir + if PlayerWalking=false then TCCD1 + if x7=PlayerDirection then TCNoChangeDir +.TCCD1 + PlayerDirection=x7 +.TCSetUpPlayer + PlayerWalking=true + ObjectNumber=3400 ; walk in direction +.TCSetUpPlayer2 + add ObjectNumber,PlayerDirection ; walk in new direction + dx4=PlayerACB + RasterOffset=100 ; Billy + if PlayersName=Billy then TCSUP2 + RasterOffset=200 ; Pat +.TCSUP2 + gosub @ChangePersonACBdx4 + goto @ResetPlayerHeight + +.TCNoChangeDir + add TimeInRoom,c1 +; after a while in each room, check if anybody wants to +; talk to the player... +; (The time is set so as to JUST allow the player to +; walk across the screen, provided they don't stop on +; the way.) + if TimeInRoom<>70 then TCNotEncounters + gosub @WalkingSubPlotEncounters +.TCNotEncounters + + + + +; sub AccostCounter,c1 +; if AccostCounter>0 then TCNoAccost +; PosRange=4000 +; NegRange=60000 ; -20 +; cursorx=PlayerX +; cursory=PlayerY +; gosub @HiresCDRange ; anyone in room? +;; Returns result=true if found +;; and x1=offset in HiresTable +; if result=0 then TCNoAccost +; +;; an object - e.g. wanted poster? +; if x1<1264 then TCAccost2 ; 79*16 +; if x1<1345 then TCNoAccost ; 84*16+1 +; +;.TCAccost2 +;;;; add x1,PeopleVarData ; get offset in TVD +; break ;********* +; push x1 ;****** +; pop x1 ;********* +; goto @TalkToPerson ; use 'current' menu +;; gosub @GetGreetingMessage +;; gosub @GetPersonalGreeting ; also sets ThisPersonVarData=x1 +;; +;; gosub @TTPDisplayInstructions +;; fire pressed. +;; TextBoxDisplayed=0 +; +;; MenuNumber=16 ; hello, talk, threaten, bribe menu. +;; gosub @PrettyMenu +;;;; if result=DoNothing then @TCStop ; 'do nothing' selected +;; goto @TCStop ; after menu selection +; goto @MeetDoMenu ; gosub, return + +.TCNoAccost + if PleaseStopPlayer<>false then @TCStop + if FireKey=0 then @TCNoStop +; bring up menu + +; is player near to a person? + dx4=PlayerACB + gosub @ReadACBDX4 + cursorx=PlayerX + cursory=PlayerZ ; y=z-h + sub cursory,dv4 ; PlayerH + gosub @HiresCD ; check HiresTable(0..SizeHiresTable) +; for collision with thing at coordinates cursorx,cursory +; Returns result=true if found +; and x1=offset in HiresTable + if result=false then TCNotTalkPerson + +; an object - e.g. wanted poster? + if x1=1344 then TCTalk ; card table crew + if x1<1264 then TCTalk ; 79*16 + if x1=1264 then @WantedPoster + if x1<1680 then TCNotTalkPerson ; 84*16+1 20 dec90 was 1345 + +.TCTalk + push x1 ; x1 is person's offset in HiresTable() + WantCSTB=true ; set to true when want to do a COpyScreenToBuffer + gosub @DisplayEverything + pop x1 + gosub @TalkToPerson ; x1 is person offset in HiresTable:16 times +; person number + goto @BackToWalkabout ; TCStop ; after talk. + +.TCNotTalkPerson + x1=832 ; barman(52) times 16 + if Location=160 then TCTalk ; talk to barman + MenuNumber=0 ; move on/leave town menu + m1=0 + m2=0 + gosub @PrettyMenu + if result=DoNothing then TCDoNothing ; 'do nothing' selected + goto @ReturnToMap + + +.TCDoNothing +; v1=0 +; v2=0 +; gosub @MCBuildRoom ; remove black box CSTB'd onto screen + +.TCStop + if PleaseStopPlayer=0 then TCStop2 + sub PleaseStopPlayer,c1 +.TCStop2 + x4=ACBLastHeightAdjust + add x4,PlayerACB + x3=ACBList(x4) + x4=ACBHOffset + add x4,PlayerACB + x1=64 ; default player height + add x1,x3 ; add on last terrain height we noted + if x4>ACBListSize then @StratBug ;***** + &ACBList(x4)=x1 ; reset player height the hard way! + + + PlayerWalking=false + gosub @ResetPlayerHeight + ObjectNumber=3410 ; stop in direction + add ObjectNumber,PlayerDirection ; walk in new direction + dx4=PlayerACB + goto @ChangePersonACBdx4 ; gosub, return + +.TCNoStop +; going off walkable area in any direction? + gosub @CheckNewRoom +.TCRet + return +;--------- +.ChangePersonACBdx4 + gosub @ChangeACBDX4 + gosub @ReadACBDx4 ; get current coords + dx1=ACBCumulativeShift ; word - for Walkabout: keeps track +; of how far we've shifted vertically - to allow the up/down +; movement as we walk to be cancelled when change animation. + add dx1,dx4 + &dx5=ACBList(dx1) + if dx1>ACBListSize then @StratBug ;***** + &ACBList(dx1)=c0 + sub dv4,dx5 ; remove cumulative h shift from h coord + gosub @MoveACBdx4 +.SASTRet + return +;------- +.SpecialAniShiftTown +; acb ACBheader is moving from dv2,dv3,dv4 by dx2,dx3,dx4 pixels + if PlayerACB=0 then SASTRet ; e.g. riding into town + if ACBHeader<>PlayerACB then @SASTNotPlayer + dx1=ACBCumulativeShift ; word - for Walkabout: keeps track +; of how far we've shifted vertically - to allow the up/down +; movement as we walk to be cancelled when change animation. + add dx1,ACBHeader + &dx5=ACBList(dx1) + add dx5,dx4 + if dx1>ACBListSize then @StratBug ;***** + &ACBList(dx1)=dx5 + +.SetUpPlayerCoords + if BuildingRoom=true then @SUPCRet + PlayerX=dv2 + PlayerZ=dv3 +;; sub PlayerY,dv4 ; y=z-h + + CursorX=dv2 + CursorZ=dv3 + gosub @CheckCollision + if ReturnCode=0 then @SUPCRet ; currently standing on a non-walkable square + + CursorX=dv2 + CursorZ=dv3 + add CursorX,dx2 + add CursorZ,dx3 + push CursorX + push CursorZ + gosub @CheckCollision + pop CursorZ + pop CursorX + if ReturnCode=0 then @SUPCBlock +; walkable if non-zero +; add CursorX,c8 ; reflects width of player +; gosub @CheckCollision +; if ReturnCode=0 then SUPCBlock + push dx4 + dx4=ACBHeader + gosub @ResetPlayerHeight + pop dx4 + return +;----- +.ResetPlayerHeight +; player has ACB at dx4 + gosub @AdjustPersonHeight + if result=false then SASTNoAdjustHeight ; height not available, +; so leave it alone. +;***! if PlayerWalking=false then RPH2 + x4=ACBLastHeightAdjust + add x4,dx4 + x3=ACBList(x4) + if x3=x1 then SASTNoAdjustHeight ; height adjust? +.RPH2 + if x4>ACBListSize then @StratBug ;***** + ACBList(x4)=x1 + gosub @ReadACBdx4 + dv4=x2 ; height for this bit of terrain + if dv4<200 then SASTAH2 +; negative - clearly silly + dv4=64 ; default height + +.SASTAH2 + goto @MoveACBdx4 ; gosub, return + +.SASTNoAdjustHeight + return + +.SUPCRet + return + +.SUPCBlock +; PleaseStopPlayer=true + +;; get collision, height stuff for CURRENT position, not +;; where we were trying to move to. This is so ResetPlayerheight +;; can find the correct terrain height +; CursorX=dv2 +; CursorZ=dv3 +; gosub @CheckCollision + + PleaseStopPlayer=2 ; freeze player for 2 frames, to give +; system a change to realise we've stopped, and thus +; reset the height + + + dx2=0 + dx3=0 + dx4=0 + return +;------ +.SASTNotPlayer + return +;----------- +.CheckNewRoom + x1=0 ; direction to go in + if PlayerX>32000 then CNRNotGoRight ; slightly off LHS + if PlayerX<300 then CNRNotGoRight ;until 5 jan 91, was 316 + if PlayerDirection<2 then CNRNotGoRight + if PlayerDirection>4 then CNRNotGoRight +; leave this room, going east + x1=3 ; new direction + x5=3 ; direction we'll enter new room in + +.CNRNotGoRight + if PlayerX>4 then CNRNotGoLeft + if playerDirection<6 then CNRNotGoLeft + x1=7 ; new direction + x5=7 ; direction we'll enter new room in. + +.CNRNotGoLeft + if PlayerZ<194 then CNRNotGoSouth ; y=130 + if PlayerDirection<4 then CNRNotGoSouth + if PlayerDirection>6 then CNRNotGoSouth + x5=5 ; direction we'll enter new room in. + x1=5 ; new direction + if PlayerX<170 then CNRNotGoSouth + x1=4 ; SE: for door at RHS of screen + +.CNRNotGoSouth + if CurrentScreen>MaxOutside then @CNRNotGoNorth ; no north doors +; from inside rooms (Because they have a bigger walkable area) + code - + x2=120 ; z limit for a few strange rooms + if CurrentScreen=431 then CNRFarBack ; news office, Santa Fe + if CurrentScreen<435 then CNRFB1 ; 435-438 + if CurrentScreen<439 then CNRFarBack ; +.CNRFB1 + if CurrentScreen<451 then CNRFB1a + if CurrentScreen<454 then CNRFarBack +.CNRFB1a + if CurrentScreen<454 then CNRFB2 ; + if CurrentScreen<458 then CNRFarBack ; +.CNRFB2 +;; if CurrentScreen=472 then CNRFarBack ; Outside Roswell hotel + if CurrentScreen=473 then CNRFarBack ; + if CurrentScreen=500 then CNRFarBack ;Lincoln City Saloon + if CurrentScreen=503 then CNRFarBack ;Lincoln Bank + if CurrentScreen=505 then CNRFarBack ; Lincoln City + if CurrentScreen<543 then CNRFB3 ; + if CurrentScreen<545 then CNRFarBack ; + +.CNRFB3 + x2=138 ; z limit for 542 White Oaks + if CurrentScreen=542 then CNRFarBack + if CurrentScreen=472 then CNRFarBack ; Outside Roswell hotel + if CurrentScreen=430 then CNRFarBack ; Santa Fe first room + x2=150 ; z limit for outside Santa Fe Saloon + if CurrentScreen=433 then CNRFarBack + x2=144 ; z limit for most rooms + + + +.CNRFarBack + code + + + if PlayerZ>x2 then CNRNotGoNorth + if PlayerDirection=8 then CNRNorth + if PlayerDirection>2 then CNRNotGoNorth +.CNRNorth + x5=1 ; direction we'll enter new room in. + x1=1 ; new direction + x4=155 ; x limit for a few rooms where NE is near to centre + if CurrentScreen=453 then CNRFunnyNE + x4=100 + if CurrentScreen=438 then CNRFunnyNE + x4=170 ; x limit for most rooms +.CNRFunnyNE + if PlayerX0 then @CNRLeave +; no exit defined - we got a problem! +; our two "alternate" directions: NE and SE, map them +; back onto N and S in case there was only one exit in that direction + if x1<>2 then CNRNotNE + x1=1 + goto CNRCheck +.CNRNotNE + if x1<>4 then CNRReallyClosed ; @CNRNoLeave + x1=5 + goto CNRCheck + +.CNRReallyClosed +.CNRClosed + if x3<>190 then @CNRNoLeave +; shop is closed - print a message, put player back on the street + m1=874 ; get outa here! +.BTWM1 + gosub @DisplayInstructions + goto @BackToWalkabout + +.CNRLeave + NewScreen=TownRoomBase + add NewScreen,x3 + + + v4=40 ; plain shop + if x3<12 then @PersonInShop + v4=1 ; bank teller + if x3<19 then @PersonInShop ; display bank picture + v4=40 ; plain shop + if x3<30 then @PersonInShop + if x3<60 then CNRNewWalkabout + v4=4 ; pretty store + if x3<66 then @PersonInShop ; display store picture + v4=40 ; plain shop + if x3<70 then @PersonInShop + if x3<80 then NotSheriffsOffice + if x3>85 then NotSheriffsOffice + v4=561 ; display Sheriff's office from Town Structures + if PlayersName=Pat then @PersonInShop ;SheriffsOffice ;****** + m1=875 ; Billy decided not to go into Sheriffs Office + goto @BTWM1 ; print message, back to walkabout + + +.NotSheriffsOffice +.CNRNewWalkabout +; enter new room in direction x5 + PlayerDirection=x5 + dx4=PlayerACB + gosub @ReadACBdx4 + if PlayerDirection<>1 then PPNotN + add dv2,c32 ; TEMP for Santa Fe Saloon!!! *************** + dv3=PlayerInitialY ; z position + add dv3,dv4 ; z=y+h + +.PPNotN + if PlayerDirection<>3 then PPNotE + dv2=32 ; x position + +.PPNotE + if PlayerDirection<>5 then PPNotS + dv3=100 ; z position + add dv3,dv4 ; z=y+h + +.PPNotS + if PlayerDirection<>7 then PPNotW + dv2=280 ; x position + +.PPNotW + gosub @MoveACBDx4 + gosub @SetUpPlayerCoords ; copy into PlayerX,Y vars in case +; specialAniShift is not done before we next display a frame. + + gosub @NewRoomSubplotEncounters + +.CNRDontWantLeave + return + +.CNRNoLeave +; can't leave + gosub @TCStop + return +;---------- +.PersonInShop +; x3=room number of shop to briefly visit. +; Don't actually change LOCATION, as we are going +; straight back outside after we finish chatting. +; re-entering this shop. See correction in CNRNewWalkabout. + PleaseStopPlayer=true ; stop player ASAP, to avoid walking into +; shops or similar funnies. + if PlayerDirection=3 then DontTurn + if PlayerDirection=7 then DontTurn + PlayerDirection=5 + +.DontTurn +; gosub @MCCopyScreenToBuffer ; freeze the street scene, +;; for when we overlay it. + if x3=6 then @NewsOffice + if x3>11 then PISNotNews + if x3>7 then @NewsOffice + +.PISNotNews + if v4=0 then NoLinkingBackdrop ; a linking picture? + + push x3 + if v4<>561 then PISPic1 ; display Sheriff's office from Town Structures + dv1=v4 + gosub @BuildPicture ; + goto PISPic2 +.PISPic1 + gosub @DisplayLinkingPicture ; load linking structure file, + +.PISPic2 +; open sprites file, and build the picture we've asked for(v4). + pop x3 + push CurrentRoom + MenuNumber=174 ; Sheriff menu + x1=0 ; no person in Sheriff's office + if x3<80 then PISNotSheriff + if x3>84 then PISNotSheriff + gosub @MaybeForceTalkToPerson ; use MenuNumber + goto PIS3 + + +.PISNotSheriff +;Menu156 dc.w 1519-MM,MMenu+158 * the store was deserted... +; MenuNumber=156 ; menu to allow us to get books. + gosub @WhoIsAtX3 +; gets x1 as person number * 16 for room x3. +.PIS2 + gosub @TalkToPerson +.PIS3 + gosub @MCPurgeAllCells ; purge cells from linking picture. + +; break ;***** +; push PlayerX ;***** +; pop PlayerX ;******* +; x5=5 ; south +; gosub @CNRNewWalkabout ; make player appear at a sensible +; position in street, when we enter new room in direction x5 + gosub @LimitPlayerCoords + PlayerDirection=5 ; going south againd + PlayerWalking=true + goto @BackToWalkabout +;--------- + +.NoLinkingBackdrop + push CurrentRoom + gosub @MCEmptyRoom + gosub @MCBuildRoom + gosub @InitACBs + gosub @DisplayEverything ; display black quickly + gosub @WhoIsAtX3 + gosub @TalkToPerson + goto @BackToWalkabout +;------------------ +code - +.iBackToWalkabout + code + + gosub BackToWalkabout + code - + return +;------- +code + +.BackToWalkabout + if PlayingDuel<>0 then BTW1 ; about to fight duel (e.g. +; lady being bothered by gunslinger -> duel, immediately after talking to her) + if Location>199 then @ReturnToMap ; at Fort Sumner +; or somewhere, talking to person +.BTW1 + gosub @FreezeAndPutUpHourglass + PersonDisplayed=false +; back to map, or out onto street again. + gosub @OpenTownStructures ; load town structure again, if needed. +; v4=GameMap ; map + if CurrentScreen=GameMap then @ReturnToMap ; OverlayEntryPoint ; map + NewScreen=CurrentScreen + gosub @WaitFireRelease + + PlayerWalking=true ; false ; start Billy stationary + gosub LimitPlayerCoords + PlayerDirection=5 ; turn round to face south + goto @BuildNewScreen +;----------- +.LimitPlayerCoords + code - + if PlayerX>9 then BTW2 + PlayerX=10 ; limit X + +.BTW2 + if PlayerX<310 then BTW3 + PlayerX=308 ; limit x + +.BTW3 + if PlayerZ>141 then BTW4 ; y=71 then BTW4 + PlayerZ=165 ; limit y y=95 + +.BTW4 + If PlayerZ<189 then BTW5 ; y=125 + PlayerZ=184 ; limit y ; y=120 + +.BTW5 + code + + return +;-------------- +.MoveOffBlockedSquares + gosub LimitPlayerCoords + x2=4 ; x shift to try to get off + x3=4 ; z shift to try to get off + +.MOBS1 + CursorX=PlayerX + CursorZ=PlayerZ ; y=z-h, so z=y+h +; x1=64 +; add CursorZ,x1 + +.MOBSLoop + push x2 + push x3 + gosub @GDpointOnMap + if ReturnCode<>0 then NotOffMap + returnCode=39721 ; off map + goto OffMap1 + +.NotOffMap + gosub @CheckCollision + +.OffMap1 + pop x3 + pop x2 +; returnCode=0 if non-walkable + if ReturnCode=39721 then MOBSTryNewDir ; off map, so try new direction + if ReturnCode<>0 then MOBSGotIt +; currently standing on a non-walkable square + add CursorX,x2 + add CursorZ,x3 + if CursorZ>184 then MOBSTryNewDir + if CursorX<315 then MOBSLoop + +.MOBSTryNewDir + if x2>200 then MOBSGiveUp ; can't find anywhere + x2=65532 ; -4: x shift + x3=65532 ; -4: z shift + goto @MOBS1 ; start from original position, search in new direction + +.MOBSGotIt +; got position CursorX,Z which is unblocked + PlayerX=CursorX + PlayerZ=CursorZ ; y=z-h +; x1=64 ; h +; sub PlayerY,x1 + +.MOBSGiveUp + return + +;------------------ + code - +.iTalkToPerson + code + + gosub TalkToPerson + code - + return + code + +;------------ +.TalkToPerson +; handle conversation with person x1/16. +; Either return, to go back to walkabout, or +; jump off somewhere depending on the result of +; the conversation. + MenuNumber=0 ; don't force a menu (default) + +.MaybeForceTalkToPerson +; MenuNumber=forced menu for person + + PersonNumber=x1 + asr PersonNumber + asr PersonNumber + asr PersonNumber + asr PersonNumber + add x1,PeopleVarData ; get offset in TVD + ThisPersonVarData=x1 + InfoAlready=false ; haven't selected "talk" or "threaten" before + + push x3 ; location we're visiting.... + x4=PeoplePatMenuOffset +; if PlayersName=Pat then TTP1 +; x4=PeopleBillyMenuoffset +;.TTP1 + if PersonNumber=0 then TTP1b ; no person displayed. + add x4,ThisPersonVarData + if MenuNumber<>0 then ForcedMenu + &MenuNumber=TownVarData(x4) ; get current menu number in subplot +; for this person. +.ForcedMenu + gosub @OpenIdentikitStructures + +.TTP1b + gosub @PutUpMenu + if PersonNumber=0 then TTP2 ; no person shown in identikit form + push x4 + gosub @DisplayNewMenu ; display it to give an immediate response. + if MenuNumber=156 then TTP1c ; Menu156 is 'search for books' menu +; in Lincoln City store + gosub @FullDisplayPerson ; display identikit picture. + +.TTP1c + pop x4 +.TTP2 + pop x3 + +; identikit text print raster set up in menu print code. + gosub @TTPSub + return +;------------- + +.TTPSub +; visiting location x3, talking to person PersonNumber +; and x1=PersonNumber*16 and TownVarData(ThisPersonVarData) + gosub @SelectPrettyMenu ; like "PrettyMenu", but when already displayed + MenuNumber=24 ; excludes talk option - default menu to use from +; now on in conversation, unless changed by e.g. offering a bribe + goto MeetDoMenuDisplayed ; MenuNumber=current menu + +.TTPMainMenu + +.MeetDoMenu + gosub @PrettyMenu + +.MeetDoMenuDisplayed + if result=50 then @ReturnToMap ; 'leave town' + gosub @GetCost + if x1<>0 then @SpendMoney + + +; dc.w 450-MM,MDoIt+450-MM ; where are deputies? +; dc.w 451-MM,MDoIt+451-MM ; hire deputy +; dc.w 452-MM,MDoIt+452-MM ; fire deputy + if result=3946 then @WhereAreDeputies ; FF6A&0FFF => 0F6A + if result=3947 then @HireDeputy + if result=3948 then @FireDeputy + + code - + x1=65506 ; -30 + if result=LoseRepMessage then @iTTPAddX1ToReputation + if result=907 then @iTTPAddX1ToReputation + if result=910 then @iTTPAddX1ToReputation + if result=904 then @iTTPAddX1ToReputation + if result=901 then @iTTPAddX1ToReputation + if result=1023 then @iTTPAddX1ToReputation + if result=1032 then @iTTPAddX1ToReputation + if result=1053 then @iTTPAddX1ToReputation + if result=1062 then @iTTPAddX1ToReputation + if result=160 then @iTTPAddX1ToReputation + if result=1260 then @iTTPAddX1ToReputation + if result=1213 then @iTTPAddX1ToReputation + if result=1214 then @iTTPAddX1ToReputation + goto iTTPNoRep + +.iTTPAddX1ToReputation + gosub @iAddX1ToReputation + +.iTTPNoRep + code + + if result=907 then @MDMRet ; lose reputation message + if result=59 then @TTPIntroduce ; 'hello' + if result=60 then @TTPTalk ; 'talk' + if result=61 then @TTPThreaten ; 'threaten' + if result=257 then @BankRobbery ; 'rob' + if result=304 then @WantDuelSoon ; "let's settle this outside" + if result=300 then @ToCardGame +; x1=704 ; ThisPersonVarData +; add x1,PeopleVarData ; get offset in TVD + x1=AshUpton + MenuNumber=156 ; store was mysteriously deserted + if result=912 then @NewMenuForPerson ;TVDx1 ;[1512:"the army are being cheated by the Murphy-Dolans on the meat + if result=917 then @NewMenuForPerson ;TVDx1 ;[1512:"the army are being cheated by the Murphy-Dolans on the meat + if result=1257 then @GangRecruited ; "ok, we'll do a robbery with you" + if result=1281 then @ToEscapeGame ; "It's Billy, get him boys!" + +;[602:go upstairs with the girl ($25) `] +;[603:offer a bribe `] +;[604:give $20 `] +;; drinks on offer at bar... +;[605:nothing `] +;[606:red-eye ($1) `] +;[607:beer ($1) `] + if result=1215 then @LoseGame ; Barney Mason has told Pat he's out. + if result=1064 then @WantDuelSoon ; Stop Brady + if result=1268 then @ToFinalDuel ; to final duel + + if result=1052 then @ToRustlingGame ; steal cows + + x1=4065 ; -30&0fff: reputation + if result=1053 then @AddX1ToReputation ; spend counterfeit money normally + x1=1000 ; amount of gold + x2=200 ; increase in reputation + if result=1022 then @SpendMoney ; give money to widow woman + + gosub @SetSubPlotFlags + +;[1537:Barney lead Pat at high speed to the head of a winding +;valley, then left him to track the escapee on his own. ] ; yes to 1535 + if result=937 then @ToTrackingGame + + if result=3796 then @ToBrawlGame ; (300-600)&0fff + if result=3797 then @ToBrawlGame ; (301-600)&0fff + if result=57 then @ToBrawlGame ; 657-MM 'RAISE HELL' reply + + m1=111 ;[111:the prospector ] ; followed by 115 + m2=115 ;[115:came up and said "thanks pard, you've + if location=248 then @SubPlotShootout ; at prospector's place. + + m1=110 ;[110:the homesteader ] ; followed by 115 +;done me a right big favour and I'll be sure to tell everyone about you". ] ;œœœ + if result=940 then @SubPlotShootout ; mexican peasant etc. +;; [1540:"Hurry! We must fight them!" ] ; yes to 1500 + if result=0 then MDMNotHomestead ; 'do nothing' or 'clear off' + if Location<231 then MDMNotHomestead + if Location<234 then @SubPlotShootout ; help homesteader + +.MDMNotHomestead + push Location + Location=225 ; ranch + + if result<>970 then MDMNotTart +; tart/lady being bothered by gunslinger in saloon + CurrentScreen=450 ; move player outside so duel happens immediately +; MenuNumber=14 ; click on tart menu used from now on. +; x1=PersonNumber +; push result +; gosub @NewMenuForPerson ; gosub, return +; pop result + +; kill her... + x1=63 ; lady + gosub @KillPersonX1 + +.MDMNotTart + if result<970 then MDMNotDuel + if result<1000 then @WantDuelSoon + +.MDMNotDuel + m1=112 ;[112:Mrs McSween ] ; ; followed by 116 + m2=116 ;[116:came up and said "thanks old friend. That's +;stopped to the Murphy Dolans, at least for a while". ] + if result=1072 then @SubPlotShootout ; go to help McSween + + m1=113 ; Laura Picket, same m2 + if result=730 then @SubPlotShootout ; help Laura Picket + if result<940 then MDMNotShootout ; various subplots -> shootout + m1=0 ; no special result message + if result<970 then @SubPlotShootout + +.MDMNotShootout + pop Location +; 970..999 are duel subplots. + if Location>200 then @ReturnToMap ; do nothing/clear off etc. +; when e.g. visiting a ranch. +.MDMRet + return +;------------- +.GangRecruited + PlayerGang=Location + x1=231 ; base for locations - 10 (first town) + sub PlayerGang,x1 ; PlayerGang has values 10..15 + return +;-------- +.FightDuel +.WantDuelSoon +; gosub @SetToClearOffMenu + EnemyName=255 ; Pat, Billy or $ff for other + + PlayingDuel=true ; get duel next time we're outside + goto @BackToWalkabout +; if CurrentScreen254 then SpendMoney3 + gosub @CallLinkingOverlay ; 'went upstairs with the girl' + goto @BackToWalkabout + +.SpendMoney3 + return +;--------- + code - +.iAddX1ToReputation + code + + gosub AddX1ToReputation + code - + return + code + +;------- +.AddX1ToReputation + add PlayerReputation,x1 + if x1<32000 then ATR2 + PlayerReputation=0 +.ATR2 + if x1<32000 then ATR3 +; reduced reputation, so make person dislike you + gosub @SetToClearOffMenu +.ATR3 + return +;--------- +;----------- +.TTPIntroduce +; 'ello' to NPC: introduce player, maybe get some reaction. + x2=TownVarData(ThisPersonVarData) ; been introduced to Pat / Billy? + x3=1 ; Pat flag + if PlayersName=Pat then TTPI2 + x3=2 ; Billy flag +.TTPI2 + or x2,x3 + if ThisPersonVarData>TownVarDAtaSize then @StratBug ;***** + TownVarData(ThisPersonVarData)=x2 + + x1=ThisPersonVarData + MenuNumber=36 ; hello again (after hello Billy intro - coded) + gosub @NewMenuForPersonTVDx1 +; next time Player talks to person x1, use menu MenuNumber + + code - + gosub @iStartPrinting + message 915 ; I'm + x2=10 + add x2,PlayersName ; player's full name: e.g. Sheriff Pat Garrett + message x2 ; Billy The Kid + message 916 ; (other person's name is...) + x2=TVDNameOffset ; offset of NPC's name + add x2,ThisPersonVarData + x2=TownVarData(x2) ; get offset of NPC's name + x3=1100 ; base for NPC names + add x2,x3 + message x2 + message 917 ; ". etc. + gosub @iEndPrinting + code + + gosub @TTPDisplayInstructions2 ; using text on raster already + goto @TTPMainMenu + +.TTPMaybeInformation +.TTPTalk +; choose whether to give player information, false +; information, or refuse to talk. + if InfoAlready=0 then TTPTalkInfo2 + add InfoAlready,c1 + m1=876 ; you deaf or something, boy? + if InfoAlready<3 then @TTPGotReply + m1=878 ; Can't stand gibbering all day + if InfoAlready=3 then @TTPGotReply + m1=877 ; I said "YOU DEAF OR SOMETHING" + goto @TTPGotReply + +.TTPTalkInfo2 + m1=919 ; won't tell player, regardless of whether anything known. + gosub @GetOpinions ; doesn't corrupt ThisPersonVarData. + if result=true then TTPTalkInfo3 + add InfoAlready,c1 + goto @TTPGotReply + +.TTPTalkInfo3 +; likes player enough to tell them something, if known. + x2=TVDInfoByte ; offset of information to give byte + add x2,ThisPersonVarData + x2=TownVarData(x2) + m1=918 ; genuinely nothing known + if x2<128 then @TTPGotReply ; no information to give. + gosub @TTPScanInformation +; information is at TownVarData(x4). Or if result=false, +; no information on this topic is available + if result=false then TTPGotReply ; m1 set to not known message. + if x1<250 then TTPScan5 +; was hidden - make it appear on map etc. + if x4>TownVarDAtaSize then @StratBug ;***** + &TownVarData(x4)=c1 ; don't use UpdateVarData, cause this is private info +.TTPScan5 + gosub @PrintSPEntries + goto @TTPMainMenu + +.TTPGotReply +; message m1 is the reply to the player's conversation: +; drop's back to walkabout after printing this... + gosub @TTPDisplayInstructions + if InfoAlready>2 then @BackToWalkabout ; person is fed up with telling you + goto @TTPMainMenu + +;---------- +.TTPScanInformation +; what information of type x2 is known? +; Return: information is at TownVarData(x4). Or if result=false, +; no information on this topic is available + x1=127 ; mask off top bit + and x1,x2 + +; .w Offset of "Money Location" information. (type 0) +; .w Offset of "Deputies Location" information. (type 1) +; .w Offset of "Gang Location" information (type 2) +; .w Offset of "Recent robbery" information (type 3) + code - + random x2 + if x2>70 then TSI2 +; one third of the time you talk to a cooperative person, they'll +; tell you where a gang is. + x1=2 ; type of information - force to be about gangs!!! +.TSI2 + if PlayersName<>Pat then TSINotPat + if x1<>1 then TSIPat2 ; don't tell Pat about number of deputies, +; cause the information is often WRONG +.TSIRecentRobbery + x1=3 ; recent robbery info + +.TSIPat2 +.TSINotPat + if PersonDisplayed<>0 then TSINotNewspaper + if x1=2 then TSIRecentRobbery ; don't publish gang locations! + +.TSINotNewspaper + code + + + + add x1,x1 ; get offset from SubPlot tables in TownVarData + x2=x1 ; save offset used + add x1,SubPlotsOffset + &x4=TownVarData(x1) ; x4 is now start of subplot data word pairs +; that this NPC may have some knowledge about. +; Scan the words for a non-zero location/event that is +; not flagged as being hidden +; if x2=SPMoneyOffset then TTPSThisTownOnly +; if x2<>SPGangsOffset then @TTPScan2 +;.TTPSThisTownOnly +;; only report something which is in current town +; x1=Town +; x2=SantaFe +; sub x1,x2 +; add x1,x1 ; 8 words per entry, so times 8 +; add x1,x1 +; add x1,x1 +; add x1,x1 +; add x4,x1 +; &x1=TownVarData(x4) +; if x1=254 then TTPTTO1 ; hidden, and cannot be told to player. +; if x1>0 then TTPScan4 +;.TTPTTO1 +; m1=1900 ; sorry, nothing going on round here. +; goto @TTPNoInfo ; end of table - know nothing +;;------------ +.TTPScan2 + &x1=TownVarData(x4) ; event? + if x1=254 then TTPScan3 ; hidden, and cannot be told to player. + if x1=65535 then @TTPNoInfo ; end of table - know nothing + if x1>0 then TTPScan4 +; 0 - nothing of interest. + +.TTPScan3 + x1=16 ; 8 words per entry in SubPlots. + add x4,x1 + goto TTPScan2 + +.TTPScan4 +; information is at TownVarData(x4). Or if result=false, +; no information on this topic is available + result=true ; information ok! + return + +.TTPNoInfo + result=false + return + +;------- +.TTPDisplayInstructions2 +; using text already on raster + gosub @DisplayNewTextBox + goto TTPDI2 + +.TTPDisplayInstructions + gosub @DisplayTextNoWait + goto TTPDI2 ; scan keys before displaying frame again + +.TTPDI1 + gosub @DisplayEverything + +.TTPDI2 + gosub @sGetControls + if FireKey=0 then TTPDI1 + if FireKeyChange=0 then TTPDI1 + return +;---------- +.PrintSPEntries +; information is at TownVarData(x4) + code - + gosub @iStartPrinting + message 906 ; er, Ok I'll help ya + message 960 ; header... + code + + +.AddSPEntries ; to a text box already started (but not displayed) + code - + x3=8 ; offset from TownVarData(x4) of current item to print. +.PrintSPELoop + code + + push x3 + gosub PrintSPEntry + if PersonDisplayed<>0 then PSL2 + code - + message ForceCr ; in news office + message space + message cr + code + + +.PSL2 + pop x3 + code - + add x3,c2 + if x3<16 then PrintSPELoop + if PersonDisplayed=0 then PrintSPE2 ; news office? + message 961 ; ". etc. +.PrintSPE2 + gosub @iEndPrinting + code + + gosub @TTPDI2 ; DisplayInstructions2 ; using text on raster already + return +;------ +.PrintSPEntry +; information is at TownVarData(x4) +; x3 is offset from TownVarData(x4) of current item to print. + add x3,x4 + &x1=TownVarData(x3) + if x1=0 then @PSEDontPrint + if x1>10 then PSENotPrintArgument +; print TownVarData(x4+x1-2) + sub x1,c2 + add x1,x4 + &x1=TownVarData(x1) + code - + x2=1000 ; location /gang name. + IF X1<10 then PSPELimit + if x1<16 then PSPEOk1 + if x1<41 then PSPELimit + if x1<48 then PSPEOk1 +.PSPELimit + x1=10 ; limit to within range. + +.PSPEOk1 + add x1,x2 + message x1 + code + + return + +.PSENotPrintArgument + if x1<>65535 then PSENotPrintNumber +; print the number at TownVarData(x4+x3+2).w + add x3,x4 + add x3,c2 + &x1=TownVarData(x3) + if x1<10 then PSENP2 + x1=10 ; limit e.g. number of deputies + +.PSENP2 + if x1>0 then PSENP3 + x1=1 ; lower limit - e.g. minimum number of deputies is 1 +; (cause in lawful towns, a deputy challenges you, regardless +; of whether there's actually one there ) + +.PSENP3 + code - + print x1 + code + + return + +.PSENotPrintNumber + if PersonDisplayed<>false then PSENotNewspaper + if x1=962 then PSEDontPrint ; "I hear... " + +.PSENotNewspaper + code - + message x1 + code + +.PSEDontPrint + return + +;--------- +.TTPThreaten +; decide whether this NPC is going to: +; + Give Information +; + Give False Information +; + Challenge player to a duel + x1=PersonNumber + MenuNumber=ClearOffMenu ; clear off buster + gosub @NewMenuForPerson + + gosub @GetOpinionOfPlayer + if x3<20 then TTPT2 + sub x3,c16 ; reduce opinion + v1=x2 ; TownVarData(x2)=x3 + v2=x3 + gosub @UpdateVarDataByte + + + + +.TTPT2 + x2=TVDAlignmentByte ; offset of good guy / bad guy flag + add x2,ThisPersonVarData + x2=TownVarData(x2) ; good guy? + if x2<128 then @TTPTalk ; good guys don't fight. + x3=1 + and x3,x2 ; cowardly? + if x3<>0 then @TTPTalk ; cowards don't fight. + m1=908 ; let's settle this outside... + gosub @DisplayInstructions ; @TTPDI2 ; DisplayInstructions + MenuNumber=22 ; accept/climb down/try to fight + gosub @PrettyMenu + if result=304 then @ThreatenFightDuel ; "We'll settle this outside" + m1=905 ; lilly livered etc. + if result=64 then @TTPGotReply ; back to walkabout +; no other response should be possible - just exit + return + +.ThreatenFightDuel +; kill person - because we're fighting a duel with them, +; don't want to see them ever again. + v1=ThisPersonVarData + v2=TVDPeopleNameOffset + add v1,v2 + v2=0 ; code for missing person + gosub @UpdateVarDataByte + goto @FightDuel + +;---------- +.TTPBribe + gosub @GetOpinionOfPlayer + if x3>230 then TTPB3 + add x3,c16 ; add on some opinion, careful it doesn't wrap +; TownVarData(x2)=x3 + v1=x2 + v2=x3 + gosub @UpdateVarDataByte + +.TTPB3 + MenuNumber=10 ; to standard menu, without bribe option + goto @TTPMaybeInformation ; maybe give some information now. +;---------- +.GetOpinionOfPlayer +; get x3=TownVarData(x2) as opinion of +; npc TownVarData(ThisPersonVarData) of the player + x2=TVDOpinionBillyOffset + if PlayersName=Billy then TTPB2 + x2=TVDOpinionPatOffset +.TTPB2 + add x2,ThisPersonVarData + x3=TownVarData(x2) + return +;--------- +.GetOpinions +; get x2 as opinion of Billy, x3 as opinion of Pat +; for NPC with table at TownVarData(ThisPersonVarData) +; and set result=true if likes player more than opponent + x2=TVDOpinionBillyOffset + add x2,ThisPersonVarData + x2=TownVarData(x2) ; opinion of Billy + x3=TVDOpinionPatOffset + add x3,ThisPersonVarData + x3=TownVarData(x3) ; opinion of Pat + result=false + if PlayersName=Pat then GOPat +; Billy playing +;; if x2>x3 then GOTrue + if x2>60 then GOTrue ; return + +.GOPat + if x3>60 then GOTrue ; if x20 then GGMGot + x3=2 ; greedy? + m1=930 ; greedy greeting base + and x3,x2 + if x3<>0 then GGMGot + m1=940 ; other person greeting base + +.GGMGot + push x1 + gosub @GetVaryM1 + pop x1 + return +;-------- +.GetPersonalGreeting +; for person TownVarData(x1) +; return m1=personal greeting, if we've already met them. +; or leave m1 unchanged if we haven't met them. +; Also return x2=0 if they are strangers. +; person's data is at TownVarData(ThisPersonVarData) + x2=TownVarData(ThisPersonVarData) ; been introduced to Pat / Billy + x3=1 ; Pat flag + if PlayersName=Pat then GPG1 + x3=2 ; Billy flag +.GPG1 + and x2,x3 +;; m1=953 ; hello stranger + if x2=0 then GPG3 + m1=949 ; hello: 950/951 are messages for each player + add m1,PlayersName +.GPG3 + return +;------- +.GetVaryM1 +; get M1 as a choice of 10 messages, based on M1 + code - + random x1 + code + + x2=15 + and x1,x2 + if x1>9 then GetVaryM1 + add m1,x1 + return +;--------- +.WhoIsAtX3 +; who is at room x3? +; return x1 as the person number * 16 + &x4=TownFixedData(0) ; offset in TownFixedData() of peopleData. + x2=0 ; number of person being examined +.WIALoop + x1=TownFixedData(x4) ; room number + if x1<>x3 then WIA3 +; got a match - record it etc. + x1=x4 + &x2=TownFixedData(0) + sub x1,x2 * take off start of this table. + add x1,x1 ; get number times 16 from number times 8. + x2=65520 ; $fff0 ; remove bottom 4 bits. + and x1,x2 + return ; x1=person number times 16 + +.WIA3 + x1=8 ; 8 bytes per entry + add x4,x1 + add x2,c1 ; number of person being examined + if x2>Must be first variable + GAMESOLVED ;>>Must be second variable + B1 + C0 C1 C2 C3 ;Fixed constants + C4 C8 C9 + D1 D2 D3 D4 + E1 E2 E3 E4 E5 E6 + F1 F2 F3 F4 F6 F7 + I1 I2 I3 I4 + L1 L2 L3 L4 L6 + N3 N4 N5 + O1 O2 + R1 R2 R3 R4 + S1 S2 S3 S4 S5 S6 S7 + T1 T2 + W1 W2 W3 W4 W5 + X1 X2 X3 X4 + Y1 + PARSEX5 PARSEX6 ;>> Temporary variables + OOPSPOS OOPSPOSEND ;>> + +TABLE + LIST1=1 + LIST2=2 + LIST3=3 + LIST4=4 + LIST5=5 + LIST6=6 + LIST7=7 + LIST8=8 + LIST9=9 +;------------------------------------- +;---------------- diff --git a/l9dev/regress/games.l9/colossal.l9/acore.txt b/l9dev/regress/games.l9/colossal.l9/acore.txt new file mode 100644 index 0000000..7ffaa18 --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/acore.txt @@ -0,0 +1,408 @@ +;Parser for Triligy Conversions + +;Copyright (C) 1986 Level 9 Computing + +;B:ACORE.TXT + +VAR + DESCRIPTIONMODE WHEELFOUND + +BEGIN + GOTO @STARTGAME +;--- +;.DESCRIBEROOM +; LASTWORDPRINTED=DISABLEIT ; prevent printing of 'it' +; GOSUB @POSITIONSHADOWS +; GOSUB @CHECKIFLIGHT +; IF RESULT=TRUE THEN DESCROOPARSEM1 +; MESSAGE 2108 ; It's dark +; LASTPICTURE=0 +; CLS G ; clear graphics window +; +; RETURN +; +;.DESCROOPARSEM1 +; +; GOSUB @SPECIALPLAYER +; GOSUB @SETUPROOM +; SEARCHPOS=ROOM +; HISEARCHPOS=0 +; +; PARSEX1=500 ; base for pictures +; ADD PARSEX1,ROOM +; IF PARSEX1=LASTPICTURE THEN DESCROOM2 +; CLS G +; PICTURE PARSEX1 +; LASTPICTURE=PARSEX1 +; +;.DESCROOM2 +; PARSEX1=SHORTROOMDESCS +; ADD PARSEX1,ROOM +; MESSAGE PARSEX1 +; IF DESCRIPTIONMODE=IBRIEF THEN DESCROOM3 +; PARSEX1=LONGROOMDESCS +; ADD PARSEX1,ROOM +; MESSAGE PARSEX1 +;.DESCROOM3 +; MESSAGE DOT +; GOSUB PRINTEXITS +; SEARCHPOS=ROOM +; HISEARCHPOS=0 +; IF WHEELFOUND=TRUE THEN DESCROOM4A ; SPECIAL +; IF ROOM=66 THEN DESCROOM4 ; SPECIAL to Price of Magik +;.DESCROOM4A ; SPECIAL +; GOSUB @PRINTOBJECTS +;.DESCROOM4 ; SPECIAL to Price of Magik +; +; GOSUB DESCPLAYER +; GOSUB @SPECIALDESC +;.DESCROOMRET +; RETURN +;;--- +;.DESCPLAYER +;; Print any special messages for player +;; e.g. 'You are standing on the object' +; PARSEX1=HICURRENTPOS(PLAYER) +; IF PARSEX1=LIEON THEN DESCPLAY0 +; IF PARSEX1=SITON THEN DESCPLAY0 +; IF PARSEX1<>ON THEN DESCPLAY1 +;.DESCPLAY0 +; MESSAGE 370 ; you +; PARSEX2=76 +; ADD PARSEX1,PARSEX2 +; MESSAGE PARSEX1 ; are standing on / sitting on / lying on etc. +; GOTO DESCPLAY5 +;.DESCPLAY1 +; RETURN +;.DESCPLAY5 +; PARSEX1=CURRENTPOS(PLAYER) +; GOSUB @DESCTHEOBJPARSEX1 +; MESSAGE DOT +; RETURN +;;--- +.PRINTEXITS +; OWTYPE=OWEXITS + GOSUB @SETUPROOM ;>> + NUMEXITS=0 + DIR=1 ; current direction + OUTPUTWORD=0 ;>> +.PELOOP +; PRINT AN EXIT (IF VISIBLE) + FROM=ROOM + GOSUB @CHECKEXIT + WORD1=0 + WORD2=0 + WORD3=0 + WORD4=0 + IF EXITVISIBLE=FALSE THEN PENEXTDIR + WORD1=VERBOFFSET ;> EXITDESCBASE + ADD WORD1,DIR +; IF DOOR=0 THEN PENODOOR +; WORD2= ; base for door messages +; ADD WORD2,DOOROPEN +;.PENODOOR + ADD NUMEXITS,C1 + IF NUMEXITS<>2 THEN PE2 + MESSAGE 3020 ; EXITS ARE +.PE2 +; IF WORD2<>0 THEN PEDESC ; through a door, so don't describe destination +; WORD2=* ; to +; WORD3=SHORTROOMDESCS +; ADD WORD3,DEST + +;.PEDESC + GOSUB OUTWORD12 ;>> 34 +.PENEXTDIR + ADD DIR,C1 + IF DIR 14 +.PERET1 + IF NUMEXITS>1 THEN PERET2 + IF NUMEXITS=0 THEN PERET + MESSAGE 3021 ; ONLY EXIT IS +.PERET2 + WORD1=0 + WORD2=0 + GOSUB @OUTWORD12 +.PERET + GOTO @RESETSTACK ;>> RETURN +;--- +;.CHECKIFOBVIOUS +;; see if 'OBJECT' is immediately obvious +; OBVIOUS=TRUE +; PARSEX1=HICURRENTPOS(OBJECT) +; IF PARSEX1=0 THEN CIORET ; things on ground are always obvious +; PARSEX1=CURRENTPOS(OBJECT) +; IF PARSEX1=PLAYER THEN CIORET ; player's contents are obvious +; ADD PARSEX1,PARSEX1 +; ADD PARSEX1,C1 ; look at hi initial position of container +; PARSEX2=OBJECTSTART(PARSEX1) +; IF PARSEX2>127 THEN CIORET ; 'obvious' bit set +; IF SEARCHDEPTH=0 THEN CIORET +; OBVIOUS=FALSE +;; +;.CIORET +; RETURN +;;--- +;.PRINTOBJECTS +;; GO THROUGH CURRENT OBJECT POSITION LIST, +;; AND DISPLAY ALL THE OBJECTS AT (HISEARCHPOS,SEARCHPOS) +; OWTYPE=OWOBJECTS +; GOSUB @INITGETOBJ +; LASTWORDPRINTED=0 +; TOTALOBJECTFOUND=0 +;.PO1 +; GOSUB GETNEXTOBJECT +; IF OBJECT=0 THEN PO1A +; GOSUB CHECKIFOBVIOUS +; IF OBVIOUS=FALSE THEN PO3 +;; +; IF OBJECT>MAXOBJECTVISIBLE THEN PO3 +; IF OBJECT=PLAYER THEN PO3 +; +;.PO1A +; IF NUMOBJECTFOUND<>1 THEN PO2 +; ADD TOTALOBJECTFOUND,C1 +; WORD1=0 +; WORD2=0 +; GOSUB @OUTWORD12 ; output any buffered words +; GOSUB @PRINTCONTAINMENT ; PRINT CONTAINER ON FIRST OBJECT FOUND ONLY +;.PO2 +; WORD1=OBJECT +; WORD2=0 +; GOSUB @OUTWORD12 ; Output object name (delayed effect) +;.PO3 +; IF OBJECT<>0 THEN PO1 +; LASTWORDPRINTED=DISABLEIT +; RETURN +;;--- +;.GETNEXTOBJECT +;; RETURN OBJECT=OBJECT FOUND +;; SEARCHPOS=ROOM OR CONTAINER WHERE FOUND +;; HISEARCHPOS=TYPE OF CONTAINMENT (=0 FOR ROOMS) +;; +;; BEFORE FIRST CALL, MUST SP=0, GOSUB INITGETOBJ AND SETUP HI,SEARCHPOS +;; AT END OF SEARCH, ALL ZEROS ARE RETURNED +;; RETURN NUMOBJECTFOUND=NUMBER OF OBJECT FOUND IN THIS PASS +;; +;; ALSO ADD ON WEIGHT OF THIS OBJECT TO 'WEIGHT' +; PARSEX1=MAXOBJECTVISIBLE ;MAXOBJECT ?? +;.GETNEXTOBJPARSEX1 +; GETNEXT PARSEX1 HISEARCHPOS SEARCHPOS OBJECT NUMOBJECTFOUND SEARCHDEPTH +; IF OBJECT>PARSEX1 THEN GNOERR +;.GNORET +; RETURN +;.GNOERR +; OBJECT=0 +; NUMOBJECTFOUND=0 ; ?? +; RETURN +;;--- +; +;.INITGETOBJ +; SEARCHDEPTH=1 +; PARSEX1=0 +; GETNEXT PARSEX1 PARSEX1 PARSEX1 PARSEX1 PARSEX1 PARSEX1 +; RETURN +;;--- +;.PRINTCONTAINMENT +; PARSEX3=24 ; BASE FOR CONTAINMENT MESSAGES +; IF HISEARCHPOS=NONSPECIFIC THEN PCRET +; IF SEARCHPOS<>PLAYER THEN PPARSEC1 +; PARSEX3=60 ; BASE for 'You are wearing' and 'You are carrying' +;.PPARSEC1 +; ADD PARSEX3,HISEARCHPOS +; MESSAGE PARSEX3 +; IF HISEARCHPOS=0 THEN PCRET ; DON'T PRINT 'THE object' FOR 'YOU CAN SEE' +; PARSEX1=SEARCHPOS ; CONTAINER OBJECT NUMBER +; GOSUB @DESCTHEOBJPARSEX1 +; PARSEX1=16 +; ADD PARSEX3,PARSEX1 ; print second half of containment messages +; MESSAGE PARSEX3 +;.PCRET +; RETURN +;;--- +.OUTWORD12 + WORD3=0 + WORD4=0 +.OUTWORD1234 +; WE ARE OUTPUTING A LIST OF WORDS, SEPARATED BY COMMAS +; ETC. THIS ROUTINE TAKES A SERIES OF WORDS ONE AT A TIME +; AND OUTPUTS THEM. BEFORE CALLING, SET OUTPUTWORD=0 +; AT THE END OF THE LIST, CALL THIS ROUTINE WITH PARSEX1=0 AND THE LIST +; WILL BE FINISHED OFF WITH A FULL STOP ETC. + IF WORD1=0 THEN OWEND +; FIRST OR SECOND WORD - JUST ADD TO BUFFER + PARSEX4=OUTPUTWORD + VALUE=WORD1 + GOSUB WRITEOUTBUFFER + VALUE=WORD2 + GOSUB WRITEOUTBUFFER + VALUE=WORD3 + GOSUB WRITEOUTBUFFER + VALUE=WORD4 + GOSUB WRITEOUTBUFFER + OUTPUTWORD=PARSEX4 + IF OUTPUTWORD<>24 THEN OWRET +; +.OW1 +; THIRD TO SUBSEQUENT WORDS - print out oldest word +; in buffer, and shift the other two down + PARSEX4=0 ; index into OUTPUTBUFFER + GOSUB OWPRINT + PARSEX1=0 + PARSEX2=8 +.OW2 + PARSEX3=OUTPUTBUFFER(PARSEX2) + OUTPUTBUFFER(PARSEX1)=PARSEX3 + ADD PARSEX1,C1 + ADD PARSEX2,C1 + IF PARSEX1<16 THEN OW2 + MESSAGE COMMA + OUTPUTWORD=16 +.OWRET + RETURN + +.OWEND +; HAVE RECEIVED THE TERMINATOR + IF OUTPUTWORD=0 THEN OWRET ; NO WORDS OUTPUT AT ALL +; THERE MUST BE AT LEAST ONE WORD REMAINING IN BUFFER - SO OUTPUT IT + PARSEX4=0 ; index into OUTPUTBUFFER + GOSUB OWPRINT + IF OUTPUTWORD=8 THEN OWSTOP ; ONLY ONE WORD OUTPUT - SO THATS IT ! +; MUST HAVE OUTPUTWORD=2, SO 2 OR MORE WORDS OUTPUT. +; THEREFORE WANT TO FINISH OFF WITH "AND" + MESSAGE AND + PARSEX4=8 ; index into OUTPUTBUFFER + GOSUB OWPRINT +.OWSTOP + OUTPUTWORD=0 + MESSAGE DOT + RETURN +;--- +.OWPRINT +; Print words by message number starting at outputbuffer(PARSEX4) + PARSEX3=3 ; words to print +.OWPRINT1 + GOSUB READOUTBUFFER + PARSEX1=VALUE +;> IF OWTYPE=OWOBJECTS THEN DESCANOBJPARSEX1 + MESSAGE VALUE + SUB PARSEX3,C1 + IF PARSEX3>.DESCTHEOBJX1 +;>>; PRINT OUT 'THE ' +;>>; First check if can print 'it' +;>> IF PARSEX1<>LASTWORDPRINTED THEN DTOPARSEX2 +;>> MESSAGE 2002 ; 'it' +;>> RETURN +; +;>>.DTOPARSEX2 +;>> IF PARSEX1=USER THEN DTOXNOTHE ; PREVENT 'the you ...' +;>>; IF PARSEX1=MYGLAR THEN DTOXNOTHE +;>> MESSAGE THE +;>>.DTOXNOTHE +;>> GOTO DESCOBJPARSEX1 +;;--- +;.DOSOME +; MESSAGE 23 ; SOME +; GOTO DESCOBJPARSEX1 +;.DOAN +; MESSAGE 22 ; AN +;;--- +.DESCOBJPARSEX1 + LASTWORDPRINTED=PARSEX1 +;>>.DOPARSEX1A2 +;???* IF PARSEX1>MAXVISIBLEOBJECT THEN DESCOBJRET + IF PARSEX1>67 THEN DESCOBJCOLOSSAL + PARSEX2=OBJECTDESCBASE + ADD PARSEX2,PARSEX1 + MESSAGE PARSEX2 +.DESCOBJRET + RETURN +.DESCOBJCOLOSSAL ;>>MIKE 26/8/86 + IF PARSEX1>MAXOBJECT THEN DESCOBJRET + PARSEX2=1000 + ADD PARSEX2,PARSEX1 + MESSAGE PARSEX2 + RETURN +;;--- +.CHECKEXIT +; GOSUB ABSCHECKEXIT +; GOTO @SPECIALEXITS ; Exits conditional on game +;;--- +.ABSCHECKEXIT +; EXIT (From FROM diection DIR ) +; return DEST, DOOR, EXITVISIBLE + DOOR=FALSE + EXITVISIBLE=FALSE + EXIT FROM DIR STATUS DEST + IF DEST=0 THEN CERET +.CHECKEXITSTATUS + PARSEX1=STATUS + IF PARSEX1<4 THEN CE2 + DOOR=TRUE +;> CURRENTPOS(GENERALDOOR)=ROOM + SUB PARSEX1,C4 +.CE2 + IF PARSEX1>1 THEN CERET + EXITVISIBLE=TRUE +.CERET + RETURN +;;--- +;.CALCDIRECTION +;; given 'FROM', 'TO' as adjacent locations, +;; return 'DIR'=direction going from 'FROM' to 'TO' +; DIR=15 +;.CALCDIR1 +; SUB DIR,C1 +; GOSUB ABSCHECKEXIT +; IF DIR=0 THEN CALCDIRRET +; IF DEST<>TO THEN CALCDIR1 +;.CALCDIRRET +; RETURN +;;--- +.CRVARYMESSAGE + MESSAGE CR +.VARYMESSAGE +;; OUTPUT ONE OF THREE MESSAGES AT 'PARSEM1' +;; GOSUB RAND3 +;; ADD PARSEM1,NUMBER +; MESSAGE PARSEM1 +; RETURN + ADD CURRENTMESSAGE,C1 + IF CURRENTMESSAGE<3 THEN VMOK + CURRENTMESSAGE=0 +.VMOK + PARSEX1=PARSEM1 + ADD PARSEX1,CURRENTMESSAGE + MESSAGE PARSEX1 + RETURN +;--- +;------------------------------------- +;------------------------------------- +;--------------------------------- diff --git a/l9dev/regress/games.l9/colossal.l9/aparse.txt b/l9dev/regress/games.l9/colossal.l9/aparse.txt new file mode 100644 index 0000000..d11ec26 --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/aparse.txt @@ -0,0 +1,1476 @@ +;Parser for Converted Trilogies + +;B:APARSE.TXT + +;Copyright (C) 1986 Level 9 Computing + +;Mike Austin 23/6/86 9:15 + +;Created from Dungeon version, which in turn came +;from the Quest version. All these three versions are identical except +;for the following: +; code to prevent invisible key/compass in dungeon/quest +; various jumps for funnies (particularly in quest) +; TEMPLISTBASE value + +;B:APARSE.TXT + +CONST + SIGNIFICANT=244 + +VAR + CSAVEHISEARCHPOS EVENTUALPREP + WANTWHATNOW + +TABLE ;>> + TEMPLISTBASE=1 ;2 for Quest and Dungeon ;>> + +BEGIN +.CANCELINPUT +; something of great importance has happened - remove +; rest of input from line + GOSUB @CLEARINPUT + NOUN1=NULLOBJECT ;>> + EVERYTHING=FALSE ;>> + CURRENTOBJECT=NULLOBJECT ;>> + GOTO @RESETSTACK +; +;--- +.PRESENTMULTIPLE +; GIVEN VERB,PREP,NOUN2 AND OBJECTTABLE, +; CALL VERB ONCE FOR EACH OBJECT SPECIFIED BY OBJECTTABLE +; EVERYTHING, IT ETC. ARE HANDLED HERE +; Work down from top so static objects, containers come first + MESSAGE CR + DIR=C0 ; prevent some SPECIALMOVES being triggered +; GOSUB @CONVERTVERB + + IF VERB=C0 THEN NOAGAIN1 + AGAINVERB=VERB +.NOAGAIN1 + + GOSUB @SELECTOBJECTPOS +; +;; ??? as a kludge - test here to see if NOUN2 is present +; IF NOUN2=NULLOBJECT THEN PM1 +; OBJECT=NOUN2 +; GOSUB CHECKIFPRESENT +; IF RESULT=FALSE THEN CANTSEEIT + +;>>.PM1 + IF EVERYTHING=TRUE THEN PMEVERYTHING +; handle individual objects + CURRENTOBJECT=C1 ; pointer into OBJECTTABLE +.PMSINGLE1 + OBJECT=OBJECTTABLE(CURRENTOBJECT) + IF OBJECT=C0 THEN PMSINGLEEND + +; GOSUB @CHECKIFACCESSIBLE +; IF RESULT=TRUE THEN PMSINGLE2 +; GOSUB @OBJECTNOTHERE +; HAVECALLEDVERB=TRUE +; GOTO PMSINGLENEXT +;.PMSINGLE2 + NOUN1=OBJECT + HAVECALLEDVERB=TRUE + GOTO CALLVERB ;>> was GOSUB + +.PMSINGLENEXT + ADD CURRENTOBJECT,C1 + GOTO PMSINGLE1 + +.PMSINGLEEND + IF HAVECALLEDVERB=TRUE THEN @GETNEWINPUT ;>> was PMSINGLERET + NOUN1=NULLOBJECT + GOTO CALLVERB ;>> was GOSUB + +;--- +.PMEVERYTHING + CURRENTOBJECT=MAXOBJECTVISIBLE + NOUN1=NULLOBJECT +.PMEV1 +; +; check if object if forbidden +; + OBJECT=CURRENTOBJECT + +;>>> IF OBJECT=153 THEN PMEV3 ;>> For Dungeon. Exclude 'KEY' from 'ALL' +;>>> IF OBJECT=61 THEN PMEV3 ;>>For Quest. Exclude 'COMPASS' from 'ALL' + + GOSUB @CHECKIFACCESSIBLE + + IF RESULT=FALSE THEN PMEV3 + +; SEARCHDEPTH=1 +; GOSUB @CHECKIFOBVIOUS +; IF OBVIOUS=FALSE THEN PMEV3 + + GOSUB @CHECKIFFORBIDDEN + IF RESULT=TRUE THEN PMEV3 + + NOUN1=CURRENTOBJECT + HAVECALLEDVERB=TRUE + GOTO CALLVERB ;>> was GOSUB + +.PMEV3 + SUB CURRENTOBJECT,C1 + IF CURRENTOBJECT>MINOBJECT THEN PMEV1 + NOUN1=NULLOBJECT ;>> added + IF HAVECALLEDVERB=TRUE THEN @GETNEWINPUT ;>>was PMRET + GOTO CALLVERB ;>> was GOSUB + +;--- +.CALLVERB +; GIVEN VERB,PREP,NOUN1,NOUN2, +; DO THE JUMP-TABLE INDEXING ON THE VERB + + MESSAGE CR +; CSAVEHISEARCH=HISEARCHPOS + + IF NOUN1=NULLOBJECT THEN CALLVERBNODESC + IF EVERYTHING=TRUE THEN CALLVERBDESC + IF VERBSTOCALLUSER THEN CALLVERBNODESC + + IF EVERYTHING=FALSE THEN NOXXX ;>>> + ITWORD=NOUN1 ;>>> +.NOXXX ;>>> + + IF NOUN1=SIGNIFICANT THEN CALLVERBNODESC ;>> + PARSEX1=NOUN1 + GOSUB @DESCOBJPARSEX1 + MESSAGE COLON + +.CALLVERBNODESC + GOTO @GETEND1 ;>> was GOSUB ABSCALLVERB + +; HISEARCHPOS=CSAVEHISEARCH +; RETURN +;;--- +.CHECKIFACCESSIBLE +; return RESULT=TRUE if OBJECT is accessible to VERB +; objects must be present in way HISEARCHPOS + IF OBJECTHINUMBEROFFSET THEN CIANOTNUMBER + PARSEX1=NUMBEROFFSET +; OBJECT=BUTTONS + +.CIANOTNUMBER + IF OBJECT>MAXOBJECT THEN @CHECKIFSCENERYHERE +; + IF HISEARCHPOS<>NONSPECIFIC THEN CIANOTNS + GOSUB @ISOBJECTHERE + IF RESULT=TRUE THEN CIAHAVECHECKED + GOTO CIAISITOWNED + +.CIANOTNS + IF HISEARCHPOS<>NOUNCARRIED THEN CIANOTCARRIED +.CIAISITOWNED + GOSUB @ISOBJECTCARRIED + GOTO CIAHAVECHECKED + +.CIANOTCARRIED + GOSUB @ISOBJECTHERE +; +.CIAHAVECHECKED + RETURN +;--- +.PRINTINPUTWORD + MESSAGE QUOTE + PRINTINPUT + MESSAGE QUOTE + RETURN +;--- +.PARSENOTKNOWN ; WORD NOT RECOGNIZED + MESSAGE 2005 ; I don't know the word + GOSUB PRINTINPUTWORD + PARSEM1=C0 + GOTO PARSEERROR +;--- +.SECONDPREP +.PARSENOVERB +.CANTUSEHERE +; IF PLAYER<>USER THEN NPCNOTUNDERSTOOD + MESSAGE 2003 + GOSUB PRINTINPUTWORD + PARSEM1=2004 + GOTO PARSEERROR +;--- +.NOTCLEAR +; User has referred to a piece of scenery which is not nearby +; IF PLAYER<>USER THEN NPCNOTUNDERSTOOD + PROCESSED=TRUE ;>> MIKE 21/6/86 + ITWORD=NULLOBJECT + OBJECT=C0 + HAVECALLEDVERB=TRUE +; >>MIKE 9/9/86 - "I can't see a mention of .." code +; PRINTINPUT +; MESSAGE COLON + MESSAGE 2020 ; I can't see a mention of " + PRINTINPUT + MESSAGE 2021 ; " here. + RETURN +;--- +.DONTUNDERSTAND +; general error message when the parsing has borken +; down for some reason + PARSEM1=2010 +; drop through to PARSEERROR +;- +.PARSEERROR +; IF PLAYER<>USER THEN NPCNOTUNDERSTOOD + MESSAGE PARSEM1 + MESSAGE DOTCR + GOTO @CANCELINPUT +;--- +.PARSEINPUT +; CONVERT INPUT TO VERB, PREP, OBJECT FORM FOR +; EASY UNDERSTANDING BY THE REST OF THE PROGRAM + + HAVECALLEDVERB=FALSE + GOSUB @GETNEXTWORD + VERB=C0 + IF EOL=TRUE THEN @PIEND; NOTHING ENTERED ! +; +;; is player trying to talk to someone ? +; SEARCHTYPE=NOUNTYPE +; GOSUB @CHECKTYPE +; IF VALUENPCMAX THEN PINOTNPC +;; yes, so is the target here ? +; OBJECT=VALUE +; GOSUB CHECKIFPRESENT +; IF RESULT=TRUE THEN PINPC +; MESSAGE 2060 ; talking to yourself ? +; GOTO CLEARINPUT +; +;>>.PINOTNPC + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE<>C0 THEN PI0 + + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + IF VALUE>NEGATIVE THEN @PARSENOVERB ;>> + IF VALUE>IGARBAGE THEN PARSEINPUT ; CONJUNCTION ENTERED, SO TRY AGAIN + GOTO @PARSENOVERB ; Wrong type of word found + +.PI0 + IF VALUE<>IAGAIN THEN PI0A + + VERB=AGAINVERB + GOTO @PIEND ;>> IF LASTVERBVALID=TRUE THEN @PIEND + +;>>.LASTVERBINVALID +; IF PLAYER<>USER THEN NPCNOTUNDERSTAND +;>> PARSEM1=2050 ; last verb not valid +;>> GOSUB @VARYMESSAGE +;>> GOTO @CANCELINPUT + +.PI0A + VERB=VALUE + + IF VERB=C0 THEN NOAGAIN2 + AGAINVERB=VERB +.NOAGAIN2 + +;>>.VERBPLUS + OBJECTTABLE(C0)=C0 + OBJECTTABLE(C1)=C0 + EVERYTHING=FALSE ; EVERYTHING NOT DETECTED YET + EXCEPT=FALSE ; EXCEPT NOT DETECTED YET + PREP=C0 + EVENTUALPREP=C0 + NOUN1=NULLOBJECT ; NEEDED ? + NOUN2=NULLOBJECT + VERBSTOCALL=C0 + LASTVERBVALID=FALSE + +; IF VERB=IGETME THEN @GETME ;*** + IF VERB<9 THEN PIEND ; directions have no objects, but +; things like IN, CLIMB CAN have objects e.g. ON TABLE + +; VERB MAY BE FOLLOWED BY SOMETHING ELSE +; GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS + +.PINEXT +;>>.PIANOTHERNOUN + GOSUB @GETNEXTWORD + + IF SEPARATOR=TRUE THEN PINEXT + IF EOL=TRUE THEN PIEND +;>>.PINEXT1 + +; IF VERB=ISAY THEN @SAY +; IF VERB=IDROP THEN PINOTPREP ; DROP BENCH AND ON + + SEARCHTYPE=PREPTYPE + GOSUB @CHECKTYPE + +;"LOOK AT" = "EXAMINE" + IF VALUE=C0 THEN PINOTPREP ;>> + IF VERB<>ILOOK THEN PIPREP ;>> + VERB=IEXAMINE ;>> + VALUE=C0 ;>> +;>> IF VALUE<>C0 THEN PIPREP + +.PINOTPREP + OBJECT=VALUE + GOSUB @CHECKNOUN + + IF OBJECT<>C0 THEN PIEXAMINENOUN + IF PROCESSED=TRUE THEN PINEXT + + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF VALUE=ICOMMA THEN PINEXT + IF VALUE<>C0 THEN PINEXT + + SEARCHTYPE=NUMBTYPE + GOSUB @CHECKTYPE + IF VALUE=C0 THEN PINOTNUMBER + +; OBJECT=BUTTONS + ADD VERBSTOCALL,C1 + GOTO PINEXT + +.PINOTNUMBER +; ANYTHING ELSE (CONJ, VERBS ETC.) TERMINATE THIS SENTENCE + GOSUB @GOBACK ; STORE (VERB?) FOR FUTURE ANALYSIS + +.PIEND + IF EVENTUALPREP=C0 THEN PIRET + PREP=EVENTUALPREP +.PIRET + RETURN + +.PIPREP + IF PREP<>C0 THEN @SECONDPREP ; GOT A SECOND PREP + PREP=VALUE +; GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS + GOTO PINEXT + +.PIEXAMINENOUN + IF OBJECT<>IIT THEN PINOTIT + OBJECT=ITWORD + IF OBJECTUSER THEN NPCNOTUNDERSTAND + MESSAGE 2053 ; it's not clear what IT refers to here + GOTO @CANCELINPUT + +.PINOTIT + IF PREP<>C0 THEN @PINOUN2 + IF OBJECT=IEVERYTHING THEN PIEVERYTHING + IF OBJECT=IEXCEPT THEN @PIEXCEPT +; GOT AN ORDINARY NOUN SPECIFIED + ITWORD=OBJECT + IF OBJECTHINUMBEROFFSET THEN PION0 + + NOUN2=OBJECT ;>>Dungeon wants I3 as the number keyword + + GOTO @PINEXT +; +.PION0 + PARSEX1=NOUNFORBIDDEN ; mark noun as forbidden + IF EXCEPT=TRUE THEN PIMARK ; DON'T CHECK IT'S HERE (YET) +; mark ordinary noun + PARSEX1=NOUNSPECIFIED +.PIMARK + NOUN1=OBJECT + GOSUB MARKOBJECT ; MARK NOUN AS SPECIFICALLY REQUESTED + GOTO @PINEXT +; +.PIEVERYTHING + EVERYTHING=TRUE + GOTO @PINEXT + +;--- +.STRIPX1 +; STRIP OFF TOP TWO BITS OF PARSEX1. + IF PARSEX1<64 THEN STRIPX1RET + PARSEX2=64 + SUB PARSEX1,PARSEX2 + GOTO STRIPX1 +.STRIPX1RET + RETURN +;--- +.CHECKIFSCENERYHERE +; given OBJECT as a noun requested by user (relative to NOUNOFFSET) +; see if it is part of a room description, and +; if so, return RESULT=TRUE if in current room +;> PARSEX1=NOUNOFFSET +;> ADD PARSEX1,OBJECT +;> IF OBJECT>1999 THEN RETURNTRUE ;>2000, so a random output message + GOSUB @SETUPROOM ;>> only needed for early games + PARSEX1=OBJECT ;>> only needed when room descs are before objects + PARSEX2=SHORTROOMDESCS + SUB PARSEX1,PARSEX2 + IF PARSEX1=ROOM THEN RETURNTRUE +; PARSEX2=300 ; LONGROOMDESCS-SHORTROOMDESCS ;>> +; SUB PARSEX1,PARSEX2 ;>> +; IF PARSEX1<>ROOM THEN RETURNFALSE ;>> + GOTO RETURNFALSE ;>> +; drop through to return TRUE +.RETURNTRUE + RESULT=TRUE + RETURN +.RETURNFALSE + RESULT=FALSE + RETURN +;--- +.MARKOBJECT +; mark object as PARSEX1 + PARSEX2=OBJECTTABLE(C0) + IF PARSEX2=C0 THEN MARKOBJ1 + IF PARSEX1<>PARSEX2 THEN @DONTUNDERSTAND ; have had both mark and prevent types +.MARKOBJ1 + PARSEX2=C1 +.MARKOBJ2 + PARSEX3=OBJECTTABLE(PARSEX2) + IF PARSEX3=OBJECT THEN MARKOBJRET ; already marked + IF PARSEX3=C0 THEN MARKOBJ3 + ADD PARSEX2,C1 + GOTO MARKOBJ2 + +.MARKOBJ3 + IF PARSEX2>60 THEN @DONTUNDERSTAND ; OBJECTTABLE OVERFLOW + ADD VERBSTOCALL,C1 + OBJECTTABLE(C0)=PARSEX1 + OBJECTTABLE(PARSEX2)=OBJECT + ADD PARSEX2,C1 + OBJECTTABLE(PARSEX2)=C0 +.MARKOBJRET + RETURN +;--- +.CHECKIFFORBIDDEN + RESULT=FALSE + PARSEX1=OBJECTTABLE(C0) + IF PARSEX1<>NOUNFORBIDDEN THEN CIFRET + PARSEX2=C1 +.CIF1 + PARSEX1=OBJECTTABLE(PARSEX2) + ADD PARSEX2,C1 + IF PARSEX1=C0 THEN CIFRET + IF PARSEX1<>OBJECT THEN CIF1 + RESULT=TRUE +.CIFRET + RETURN +;--- +.SCENERY +; Have got a noun which is in a room description or similar, +; so it is just scenery. Print an appropriate message. +; IF PLAYER<>USER THEN NPCNOTUNDERSTAND +; + PROCESSED=FALSE +; +; +;>> this section of code is the most incredible kludge +;>> ever seen in one of our adventure games. Frankly, it is +;>> amazing to me that it works as well as it does. However, +;>> it appears to be the only way of allowing scenery objects +;>> to be interacted with without actually adding them +;>> as specific objects (which is difficult where the same +;>> thing occurs in several places - e.g. piles of rocks etc. + GOSUB @SETUPROOM + IF VERB=27 THEN SCEN1 ;>>MIKE 18/8/86 - READ(27):=EXAMINE for colossal + IF VERB<>IEXAMINE THEN FUNNIES ; always allow them to happen +.SCEN1 +; but examine usually wants to sometimes tell player it is 'just scenery' +; where the scenery is important, and 'scenery' would be out of place, +; put in a jump to FUNNIES. +;>QUEST ONLY IF ROOM=60 THEN FUNNIES ; pile of rocks +;>QUEST ONLY IF ROOM=41 THEN FUNNIES ; examining stone slab +;>QUEST ONLY IF ROOM=7 THEN FUNNIES ; >> appalling kludge - MIKE 21/6/86 +;>QUEST ONLY IF ROOM=8 THEN FUNNIES ; >> " +;>QUEST ONLY IF ROOM=44 THEN FUNNIES +;>QUEST ONLY IF ROOM<82 THEN FUN3 ; underwater range +;>QUEST ONLY IF ROOM<98 THEN FUNNIES ; underwater range +;>QUEST ONLY.FUN3 +; +; +; + PROCESSED=TRUE ;>> MIKE 21/6/86 + ITWORD=NULLOBJECT + HAVECALLEDVERB=TRUE +;>>MIKE 9/9/86 PRINTINPUT +;>>MIKE 9/9/86 MESSAGE COLON + + OBJECT=C0 + + PARSEM1=2030 ; just scenery group + GOSUB @VARYMESSAGE + RETURN +;--- +.FUNNIES +;>> MIKE 21/6/86 +; if player is referring to scenery in a room +; where the scenery may be useful +; e.g. water, oil, piles of rocks etc. + OBJECT=SIGNIFICANT + PROCESSED=TRUE +;>> HAVECALLEDVERB=TRUE + RETURN +;--- + +.PIEXCEPT + EXCEPT=TRUE + GOTO @PINEXT + +.PINOUN2 +; another noun in input, not part of any multiple noun + IF NOUN2<>NULLOBJECT THEN @DONTUNDERSTAND +; + NOUN2=OBJECT + GOTO @PINEXT +;--- + +.CHECKTYPE +; SEE IF THERE IS A WORD OF WORDTYPE 'SEARCHTYPE' IN CURRENT WORD +; IF NOT, RETURN VALUE=0 +; IF THERE IS RETURN ITS WORD NUMBER IN VALUE + INDEX=0 + +.CHECKTYPEMORE + + GOSUB @READINPUTLIST + IF VALUE=0 THEN CHECKTYPERET ;>>MIKE 18/6/86 + IF WORDTYPE<>NUMBTYPE THEN CTNOTNUMBER + ADD INDEX,C2 ; numbers are 4 byte values + +.CTNOTNUMBER + ADD INDEX,C2 +;>>MIKE 18/6/86 IF VALUE=C0 THEN CHECKTYPERET + SOMETHINGPROCESSED=TRUE +; IF VALUE=IRUDE THEN @RUDEWORD + IF WORDTYPE<>SEARCHTYPE THEN CHECKTYPEMORE +; should maybe re-enable this IF WORDTYPE<>NOUNTYPE THEN CHECKTYPERET +; IF VALUE<470 THEN CHECKTYPERET +; IF VALUE>699 THEN CHECKTYPERET +; an examine message +; PARSEX1=470 +; SUB VALUE,PARSEX1 + +.CHECKTYPERET + RETURN +;--- + +.CHECKNOUN +;Check if noun if present in list 9. + +;Alternatives are checked in priority. It is very dangerous to do all +;checking in combined tests (this may not work for all conversions) +;so each alternative is isolated. Order of checks is: +; if not defined anywhere as "^N xxx" then return as 'not found' +; if it's 'noise' (4000-4001) +; if it's a keyword not originally in the game but which might have +; been added in anywhere (such as 'IT' 'ALL' and 'BUT') +; if it's a keyword for an object in the current room or worn/carried +; if it's scenery in the current room +; if it's a keyword for an object elsewhere +; if it's scenery elsewhere. + + IF PREP=C0 THEN CHECKNOUN1 + HISEARCHPOS=NONSPECIFIC +.CHECKNOUN1 + + GOSUB @CHECKNOUNDEFINED ;Check if any noun(s) exist in LIST 9. + IF RESULT=TRUE THEN CHECKNOUN2 +;Not defined anywhere as noun + PROCESSED=FALSE ;>> (Otherwise doesn't do TAKE xxx DROP xxx.) + OBJECT=C0 + RETURN + +.CHECKNOUN2 + GOSUB CHECKNOUNGARBAGE + IF RESULT=FALSE THEN CHECKNOUN3 +;Garbage word + PROCESSED=TRUE + OBJECT=C0 + RETURN + +.CHECKNOUN3 + GOSUB CHECKNOUNANYWHERE + IF RESULT=FALSE THEN CHECKNOUN4 +;Word like IT ALL BUT THEN.. + PROCESSED=FALSE + OBJECT=VALUE + RETURN + +.CHECKNOUN4 +;Must either be scenery (in a room description) or a keyword + + GOSUB @CHECKNOUNKEYWORD +; returns RESULT=TRUE if an actual object is referred to and present +; and OBJECT = value + IF RESULT=FALSE THEN CHECKNOUN5 +;Object +;>>MIKE 21/6/86 PROCESSED=TRUE +;>>MIKE 21/6/86 OBJECT=VALUE + RETURN + +;Must be scenery.. +.CHECKNOUN5 +;>; first check if it is a word that is always present +;> INDEX=0 +;>.CHECKNOUN5A +;> GOSUB CHECKTYPEMORE +;> IF VALUE=0 THEN CHECKNOUN5B +;> IF VALUE<850 THEN CHECKNOUN5A +;> IF VALUE>870 THEN CHECKNOUN5A +;> PROCESSED=FALSE +;> OBJECT=0 +;> RETURN ; something which is always present + +;.CHECKNOUN5B +; must be some type of scenery +; + GOSUB @CHECKNOUNROOM ; >> MOVED FROM BELOW + IF RESULT=TRUE THEN @SCENERY +; + GOSUB @CHECKNOUNSTATUS + IF RESULT=FALSE THEN CHECKNOUN6 +;Status noun + GOTO @SCENERY ;>> + +.CHECKNOUN6 + IF OBJECT>255 THEN @NOTCLEAR ;>>MIKE 8/7/86 +; + RETURN ;>> not found, so let the game itself decide + GOTO @NOTCLEAR ;Scenery elsewhere + +;>> MIKE 21/6/86.CHECKNOUN4A ;>> +;;Keyword not around and/or scenery not around, return keyword +; PROCESSED=TRUE ;>> +; OBJECT=VALUE ;>> +; RETURN ;>> +; +;----- +; +.CHECKNOUNGARBAGE +;Check if one of the possible nouns in LIST 9 is a garbage word. + SEARCHTYPE=NOUNTYPE + INDEX=C0 + GOSUB CHECKTYPE + OBJECT=C0 + +.CHECKGAR1 + IF VALUE=C0 THEN CHECKGAR2 + + IF VALUE<3000 THEN CHECKGAR2A ;>> NICK 22/07/86 + IF VALUE> NICK 22/07/86 +;>> NICK 22/07/86 IF VALUE=3000 THEN CHECKGAR3 +;>> NICK 22/07/86 IF VALUE=3001 THEN CHECKGAR3 + +.CHECKGAR2A ;>> NICK 22/07/86 + GOSUB @CHECKTYPEMORE + GOTO CHECKGAR1 + +.CHECKGAR2 + RESULT=FALSE + RETURN + +.CHECKGAR3 + RESULT=TRUE + RETURN + +;----- + +.CHECKNOUNANYWHERE +;Check if one of the possible nouns if LIST 9 is one of a +;group of keyword nouns which could be anywhere in the message file. +;(Because of possible clashes with other messages in the converted +;game these nouns may violate the rules on keyword numbering.) + + SEARCHTYPE=NOUNTYPE + INDEX=C0 + GOSUB @CHECKTYPE + OBJECT=C0 +.CHECKSPEC1 + + IF VALUE=C0 THEN CHECKSPEC1A + + IF VALUE=IIT THEN CHECKSPEC2 +;>> IF VALUE=ITHEN THEN CHECKSPEC2 + IF VALUE=IEXCEPT THEN CHECKSPEC2 + IF VALUE=IEVERYTHING THEN CHECKSPEC2 + IF VALUE=ISAVE THEN CHECKSPEC2 ;>> + IF VALUE=IRESTORE THEN CHECKSPEC2 ;>> + + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPEMORE + + GOTO CHECKSPEC1 + +.CHECKSPEC1A + OBJECT=C0 + RESULT=FALSE + RETURN + +.CHECKSPEC2 + OBJECT=VALUE + RESULT=TRUE + RETURN + +;----- + +.CHECKNOUNKEYWORD +;Check if there is a noun in LIST 9 which is in the range +;MINOBJECT thru MAXOBJECT. + + RESULT=TRUE + SEARCHTYPE=NOUNTYPE + INDEX=C0 +;>> MIKE 21/6/86 GOSUB CHECKTYPE + OBJECT=C0 + +.CHECKKEY1 + GOSUB @CHECKTYPEMORE ;>> MIKE 21/6/86 + IF VALUE=0 THEN CHECKKEYFALSE + +;Value will already have been 'adjusted' if it +;lies in the range MINADJUST..MAXADJUST + + IF VALUE>MAXOBJECT THEN CHECKKEY1 ;>> MIKE 21/6/86 + IF VALUE> MIKE 21/6/86 + + OBJECT=VALUE + GOSUB @CHECKIFACCESSIBLE ;>> MIKE 21/6/86 + IF RESULT=FALSE THEN CHECKKEY1 ;>> MIKE 21/6/86 +;>> MIKE 21/6/86 RESULT=TRUE + RETURN + +;>>MIKE 21/6/86.CHECKKEY2 +;>> GOSUB CHECKTYPEMORE +;>> GOTO CHECKKEY1 + +.CHECKKEYFALSE + RESULT=FALSE + RETURN + +;----- + +.CHECKNOUNSTATUS ;>> +;Check if nount in LIST 9 is present in a status message. + + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + + GOSUB @SETUPROOM + +.CHECKSTAT1 + IF VALUE=C0 THEN CHECKSTAT3 + + PARSEX1=VALUE + PARSEX2=NOUNOFFSET + ADD PARSEX1,PARSEX2 + IF PARSEX1MAXSTATUS THEN CHECKSTAT2 + RESULT=TRUE + RETURN + +.CHECKSTAT2 + GOSUB @CHECKTYPEMORE + GOTO CHECKSTAT1 + +.CHECKSTAT3 + RESULT=FALSE + RETURN + +;----- + +.CHECKNOUNROOM +;Check if noun is present in list 9. +;which corresponds to scenery of the current room location. + + SEARCHTYPE=NOUNTYPE + INDEX=C0 +;>>MKE21/6/86 GOSUB CHECKTYPE + + GOSUB @SETUPROOM ;Set ROOM=R1 + +.CHECKROOM1 + GOSUB @CHECKTYPEMORE ;>>MIKE 21/6/86 + IF VALUE=C0 THEN CHECKROOM2 + + PARSEX1=VALUE + PARSEX2=SHORTROOMDESCS + SUB PARSEX1,PARSEX2 + OBJECT=VALUE + RESULT=TRUE + IF PARSEX1=ROOM THEN CHECKROOM3 + GOTO CHECKROOM1 ;>>MIKE 21/6/86 +;>>MIKE 21/6/86 GOSUB CHECKTYPEMORE +;>>MIKE 21/6/86 IF VALUE<>C0 THEN CHECKROOM1 + +.CHECKROOM2 + RESULT=FALSE + +.CHECKROOM3 + RETURN + +;----- + +.CHECKNOUNDEFINED +;Check if there is a noun in LIST 9. + + SEARCHTYPE=NOUNTYPE +;>> INDEX=C0 + GOSUB @CHECKTYPE + + IF VALUE<>0 THEN CHECKSCENE1 + + OBJECT=VALUE + RESULT=FALSE + RETURN + +.CHECKSCENE1 + RESULT=TRUE + RETURN + +;----- + +.CLEARINPUT +; called after any errors - remove rest of input from line + IF NOMOREINPUT=TRUE THEN CLEARINPEND ;>> + INDEX=C0 + GOSUB READINPUTLIST + IF VALUE=C0 THEN CLEARINPEND + SUPRESSCHECKING=TRUE ; don't check words for validity + GOSUB GETNEXTWORD + GOTO CLEARINPUT +.CLEARINPEND + SUPRESSCHECKING=FALSE + RETURN + +;----- + +.GETNEXTWORD +; GET NEXT WORD IN LINPUT +; set EOL=TRUE if get ".", eol, etc. +; Set SEPARATOR=TRUE if get "." "," + IF NOMOREINPUT=TRUE THEN GNWEND + IF WORDNOTPROCESSED=TRUE THEN GNWEND ; HAVE USED GOBACK TO RETRIEVE + +; PARSEX1=C0 ;>> +;.CLEARLIST9 ;>> +; IF PARSEX1>33 THEN ENDCLEAR ;>> +; LIST9(PARSEX1)=C0 ;>> +; ADD PARSEX1,C1 ;>> +; GOTO CLEARLIST9 ;>> +;.ENDCLEAR ;>> + + INPUT PARSEX1 PARSEX1 PARSEX1 PARSEX1 + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF VALUE<33 THEN GNW1 + IF VALUE<38 THEN GETNEXTWORD +.GNW1 + GOSUB CHECKEOL ; CHECK FOR "." "THEN" etc. +.GNWEND + WORDNOTPROCESSED=FALSE +.CIGRET + RETURN + +;----- + +.CHECKEOL + INDEX=C0 + GOSUB READINPUTLIST + SEPARATOR=FALSE + EOL=FALSE + IF VALUE=C0 THEN SETNOTHINGMORE + SEARCHTYPE=CONJTYPE + GOSUB @CHECKTYPE + IF VALUE=ITHEN THEN SETEOL + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF SUPRESSCHECKING=TRUE THEN CHECKEOL1 + IF VALUE=128 THEN @PARSENOTKNOWN ; WORD NOT UNDERSTOOD +.CHECKEOL1 + IF VALUE=ICOMMA THEN SETSEPARATOR + IF VALUE=IDOT THEN SETEOL + RETURN +.SETSEPARATOR + SEPARATOR=TRUE + GOTO SETEOL + +.SETNOTHINGMORE +; There is no more input to come on this line + NOMOREINPUT=TRUE +.SETEOL + EOL=TRUE + RETURN +;--- +.GOBACK +; MARK CURRENT WORD AS UNPROCESSED, SO A SUBSEQUENT INPUT ROUTINE +; CAN GET A CHANCE AT READING IT + INDEX=C0 + GOSUB READINPUTLIST + IF VALUE=C0 THEN GOBACKRET + WORDNOTPROCESSED=TRUE +.GOBACKRET + RETURN +;--- +.READINPUTLIST + ; VALUE:=@INPUT(INDEX) 16 BIT. PARSEX1,PARSEX2 corrupted + VALUE=LINPUT(INDEX) + IF VALUE<>C1 THEN RILNOTNUMBER + WORDTYPE=NUMBTYPE + PARSEX1=INDEX + ADD PARSEX1,C1 + VALUE=LINPUT(PARSEX1) ; returns low order of number + RETURN + +.RILNOTNUMBER + WORDTYPE=VALUE +; STRIP OFF TOP THREE ( WORDTYPE ) BITS + PARSEX1=32 +.RIL1 + IF VALUE<32 THEN RIL2 + SUB VALUE,PARSEX1 + GOTO RIL1 +.RIL2 + GOSUB VALUETIMES256 + PARSEX1=C1 + ADD PARSEX1,INDEX + PARSEX2=LINPUT(PARSEX1) + ADD VALUE,PARSEX2 +; Separate out WORDTYPE = top three bits + PARSEX2=WORDTYPE + WORDTYPE=ASCITYPE + PARSEX1=ASCIOFFSET + IF PARSEX2<32 THEN RILRET + WORDTYPE=VERBTYPE + PARSEX1=VERBOFFSET + IF PARSEX2<64 THEN RILRET + WORDTYPE=CONJTYPE + PARSEX1=CONJOFFSET + IF PARSEX2<96 THEN RILRET + WORDTYPE=PREPTYPE + PARSEX1=PREPOFFSET + IF PARSEX2<128 THEN RILRET + WORDTYPE=NOUNTYPE + PARSEX1=NOUNOFFSET + IF PARSEX2<160 THEN RILRET + WORDTYPE=ADJETYPE + PARSEX1=ADJEOFFSET + IF PARSEX2<192 THEN RILRET + WORDTYPE=MATCHTYPE + PARSEX1=MATCHOFFSET + IF PARSEX2<224 THEN RILRET + WORDTYPE=7 + PARSEX1=C0 +.RILRET + IF WORDTYPE<>NOUNTYPE THEN NOADJUST ;>> + IF VALUE> + IF VALUE>MAXNOUNADJUST THEN NOADJUST ;>> + PARSEX1=ADJUSTOFFSET ;>> +.NOADJUST ;>> + SUB VALUE,PARSEX1 ; SUBTRACT OFFSET +;>>> IF VALUE>60000 THEN RILRET1 + RETURN +;>>.RILRET1 +;>> VALUE=C0 +;>> RETURN +;--- +.VALUETIMES256 + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + RETURN +;--- +.VALUEDIV256 +; divide VALUE by 256 +; must preserve PARSEX4 + PARSEX1=C0 + PARSEX2=256 +.VD256 + SUB VALUE,PARSEX2 + IF VALUE>NEGATIVE THEN VDEND + ADD PARSEX1,C1 + GOTO VD256 + +.VDEND + VALUE=PARSEX1 + RETURN +;--- + +.GETCOMMAND + I1=C0 ;>> + I2=C0 ;>> + I3=C0 ;>> + I4=C0 ;>> + WANTWHATNOW=TRUE + GOTO GI0 + +;--- + +.GETI1I2I3I4 ;>> +;Request input and return first two verbs in I1 and I2 + I1=C0 + I2=C0 + I3=C0 + I4=C0 + +.GETI1 + NOMOREINPUT=FALSE + WORDNOTPROCESSED=FALSE + SUPRESSCHECKING=TRUE + + GOSUB @GETNEXTWORD + + INDEX=C0 + GOSUB @READINPUTLIST + IF VALUE=C0 THEN GETI2 + IF I4>C1 THEN GETI1 ;Already found two verbs ? + + SEARCHTYPE=VERBTYPE ; Check if it's a verb + GOSUB @CHECKTYPE + IF VALUE=C0 THEN GETI1 + + ADD I4,C1 ;Number of verbs found + IF I4=C1 THEN GETI3 + I2=VALUE ;Save second verb + GOTO GETI1 +.GETI3 + I1=VALUE ;Save first verb + GOTO GETI1 + +.GETI2 + IF I4=C0 THEN GETI1I2I3I4 + SUPRESSCHECKING=FALSE + RETURN + +;----- + +;>> WANTWHATNOW=FALSE +;>> SUPRESSCHECKING=TRUE ; prevent bombing out on garbage input +;>> GOSUB GI0 ; get input +;>> IF VERB=C0 THEN GETI1I2I3I4 +;>> RETURN + +.GI0 + I1=C0 + I2=C0 + I3=C0 + IF NOUN1=NULLOBJECT THEN GETNEWINPUT +; in middle of presentmultiple + IF EVERYTHING=TRUE THEN @PMEV3 + GOTO @PMSINGLENEXT + +.GETNEWINPUT +;>> VERB=C0 ;>> 24/5/86 to fix 'TAKE ALL (cr) (cr)' problem + + NOUN1=NULLOBJECT + IF NOMOREINPUT=FALSE THEN GNI1 + NOMOREINPUT=FALSE + IF SOMETHINGPROCESSED=FALSE THEN GNI1 ; prevent CR giving WHAT NOW + SOMETHINGPROCESSED=FALSE + + IF WANTWHATNOW=FALSE THEN GNI1 + MESSAGE WHATNOW + +.GNI1 + EVERYTHING=FALSE ;?? + NOUN1=FALSE ;>>> + GOSUB @PARSEINPUT + if verb=0 then getnewinput ;>>mike 22/9/86 + GOTO @PRESENTMULTIPLE + +.GETEND1 + IF VERB=IEXITS THEN @PRINTEXITS + I1=VERB + IF VERB=C0 THEN GETEND5 ;>> +;>> IF PREP=C0 THEN GETEND2 + I2=PREP +.GETEND2 + IF NOUN1=NULLOBJECT THEN GETEND3 + I2=NOUN1 +.GETEND3 + IF NOUN2=NULLOBJECT THEN GETEND4 + I3=NOUN2 +.GETEND4 + I4=C3 + IF I3<>C0 THEN GOTIT + I4=C2 + IF I2<>C0 THEN GOTIT + I4=C1 + IF I1<>C0 THEN GOTIT +.GETEND5 ;>> + I4=C0 +.GOTIT +; MESSAGE CR ;*** +; PRINT I1 ;*** +; MESSAGE SPACE ;*** +; PRINT I2 ;*** +; MESSAGE SPACE ;*** +; PRINT I3 ;*** +; MESSAGE SPACE ;*** +; PRINT I4 ;*** +; MESSAGE DOTCR ;** + RETURN +;--- +.GETVALUE + GOSUB @GETNEXTWORD + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE<>C0 THEN GOTIT + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + RETURN +;--- +.INITPARSER + CURRENTOBJECT=NULLOBJECT + NOUN1=NULLOBJECT + NOUN2=NULLOBJECT + NOMOREINPUT=TRUE + SOMETHINGPROCESSED=TRUE ; allow WHAT NOW to be printed + ITWORD=NULLOBJECT ;>> +; and clear out OBJECTTABLE + PARSEX1=C0 +.IP1 +;>> OBJECTTABLE(PARSEX1)=C0 + TEMPLISTBASE(PARSEX1)=C0 ;>> + ADD PARSEX1,C1 + IF PARSEX1<512 THEN IP1 ;>> +;>> IF PARSEX1<60 THEN IP1 + RETURN +;--- +.SELECTOBJECTPOS ;Is this code complete? + HISEARCHPOS=NOUNCARRIED + IF VERB=IDROP THEN SOPRET +;>>MIKE22/6/86 IF VERB=ITHROW THEN SOPRET + HISEARCHPOS=NOUNONGROUND + IF VERB=ITAKE THEN SOPRET + HISEARCHPOS=NONSPECIFIC +.SOPRET + RETURN + +;--- + +;.GETCOMMAND +; GOSUB @TICKCLOCK +;.GPARSEC0 +; STACK +;.GPARSEC1 +;; before printing What now?, check if any more commands waiting +; IF NOMOREINPUT=FALSE THEN GPARSEC3 ; still something left on line +; NOMOREINPUT=FALSE ; disable flag which is set on getting 0 from input +; IF SOMETHINGPROCESSED=FALSE THEN GPARSEC3 ; prevent CR producing 'WHAT NOW' +; MESSAGE 17 ; WHAT NOW ?% +; RANDOM PARSEX1 ; kick random number generator +; SOMETHINGPROCESSED=FALSE +; PLAYER=USER +; GOSUB SETUPROOM +;.GPARSEC3 +; GOSUB @PARSEINPUT +; IF VERB<>0 THEN GPARSEC4 +; GOTO GPARSEC0 +; +;.GPARSEC4 +; GOSUB @PRECOMMAND +; GOSUB PRESENTMULTIPLE ; HANDLE MULTIPLE OBJECTS, CALLING VERB REPEATEDLY +; GOTO @POSTCOMMAND +;--- +;>>.PMSINGLERET +;>> GOTO GETNEWINPUT ;>> was RETURN +;--- +;.PMRET +; GOTO GETNEWINPUT ;>> was RETURN +;--- +;.ABSCALLVERB +; +;; Come here to call verb without printing desc first +; LASTVERBVALID=TRUE +; OBJECT=NOUN1 +; HISEARCHPOS=NONSPECIFIC +; RESULT=TRUE +; GOSUB @FUNNIES +; IF RESULT=TRUE THEN @CVRET +; OBJECT=NOUN2 +; GOSUB @OBJECTTRIGGER +; IF RESULT=TRUE THEN @CVRET +; OBJECT=NOUN1 +; GOSUB @OBJECTTRIGGER ; TRIGGERS FOR ANY VERB ON OBJECT +; IF RESULT=TRUE THEN @CVRET ; FLAG NOT RESET, SO COMMAND PROCESSED +; +;; Do jump-table type indexing +;; Flow will return to PRESENTMULTIPLE when the verb has finished +; +;; IF VERB=ICLIMB THEN @CLIMB +;; IF VERB=IJUMP THEN @JUMP +;; IF VERB<16 THEN @MOVE +;; IF VERB=22 THEN @INVENTORY +;; IF VERB=IRESTORE THEN @RESTORE +;; IF VERB=ISAVE THEN @SAVE +;; IF VERB=IQUIT THEN @QUIT +; IF VERB=ILOOK THEN @DESCRIBEROOM +;; IF VERB=ILISTEN THEN @HEAR +;; IF VERB=ISMELL THEN @SMELL +;IF VERB=IWAIT THEN @WAIT +; IF VERB=ISLEEP THEN @SLEEP +; IF VERB=IVHELLO THEN @HELLO +; IF VERB=IKNOCK THEN @KNOCK +; +; IF VERB=IPICTURE THEN @PICTURE +; IF VERB=IWORDS THEN @WORDS +; IF VERB=ISTAND THEN @STAND +; IF VERB=ILIE THEN @LIE +; IF VERB=ISIT THEN @SIT +; IF VERB=ISCORE THEN @SCORE +; IF VERB=IVERBOSE THEN @VERBOSE +; IF VERB=IBRIEF THEN @BRIEF +; +; IF VERB=IGOTO THEN @GOTO ; ****** +; IF NOUN1<>NULLOBJECT THEN CVGOTNOUN +; IF PLAYER<>USER THEN NPCNOTUNDERSTAND +; M1=2033 ; must supply an object group +; GOTO @VARYMESSAGE + +;.CVGOTNOUN +; IF VERB<41 THEN TOOCOMPLEX +; IF VERB=IOPEN THEN @OPEN +; IF VERB=ITAKE THEN @TAKE +; IF VERB=IPICK THEN @TAKE +; IF VERB=IWEAR THEN @WEAR +; IF VERB=IDROP THEN @DROP +; IF VERB=IPUT THEN @PUT +; IF VERB=IEXAMINE THEN @EXAMINE +; IF VERB=IATTACK THEN @ATTACK +; IF VERB=ICUT THEN @CUT +; IF VERB=IREMOVE THEN @REMOVE +; IF VERB=ITHROW THEN @THROW +; IF VERB=IEAT THEN @EAT +; IF VERB=IPUSH THEN @PUSH +; IF VERB=IPULL THEN @PULL +; IF VERB=IRING THEN @VRING +; IF VERB=IGIVE THEN @GIVE +; IF VERB=IWAKE THEN @WAKE +; IF VERB=ISQUEEZE THEN @SQUEEZE +; IF VERB=ICAST THEN @CAST +; IF VERB=IFASTEN THEN @FASTEN +; IF VERB=IRUB THEN @RUB +;IF VERB=ILIGHT THEN @LIGHT +;IF VERB=IEXTINGUISH THEN @EXTINGUISH +; MESSAGE 2036 ; don't understand verb +;.CVRET +; RETURN +;;--- +;.TOOCOMPLEX +; MESSAGE 2039 ; sentence is too complex +; RETURN +;;--- +;>>.PARSETOOMUCH ; TOO MUCH ENTERED +;>> PARSEM1=2001 +;>> GOTO PARSEERROR +;--- +;>>.PARSENOOBJECT +;>> PARSEM1=2002 +;>> GOTO PARSEERROR +;--- +;.NPCLOOKSFORSOMETHING +; GOSUB ISNPCVISIBLE +; IF RESULT=FALSE THEN NPCLFSRET +; PARSEX1=PLAYER +; GOSUB @DESCTHEOBJPARSEX1 +; MESSAGE 2065 ; looks around as if looking for something +;.NPCLFSRET +; RETURN +;;--- +;.NPCNOTUNDERSTOOD +; an NPC (variable PLAYER) is trying to do something which it can't +;; PARSEX1=CURRENTPOS(USER) +;; PARSEX2=CURRENTPOS(PLAYER) +;; IF PARSEX1<>PARSEX2 THEN NCRET +; GOSUB ISNPCVISIBLE +; IF RESULT=FALSE THEN NPCLFSRET +; PARSEX1=PLAYER +; GOSUB DESCTHEOBJPARSEX1 +; M1=2062 ; looks puzzled +; GOSUB VARYMESSAGE +; GOTO CANCELINPUT +;--- +;.NPCCONFUSED +;; NPC has been instructed to do something which it can't +;; but, don't want to stop, so print a message like +;; 'the frak looks around, as if searching for something' +;; and then carry on with processing the rest of the command (if any) +; M1=2065 ; NPC is confused +; GOTO PRINTM1 +;--- +;.OBJECTNOTHERE +; THE OBJECT IS NOT AVAILBALE TO THE COMMAND +; THIS ERROR RETURNS AS IT IS USED IN PRESENTMULTIPLE +; IF OBJECT=C0 THEN ONTRET +; IF PLAYER<>USER THEN NPCLOOKSFORSOMETHING +; IF HISEARCHPOS=NOUNONGROUND THEN ONT1 +; IF HISEARCHPOS=NONSPECIFIC THEN CANTSEEIT +; MESSAGE 2012 ; don't have.. +;.ONTERROR +; MESSAGE THE +; PARSEX1=OBJECT +; GOSUB @DESCTHEOBJX1 +; MESSAGE DOT +; GOTO @CANCELINPUT + +;.ONT1 +; POS=PLAYER +; HIPOS=NONSPECIFIC +; GOSUB @CHECKOBJECTPOS +;>> GOSUB ISOBJECTCARRIED +;>> IF RESULT=TRUE THEN ONT2 +;>>.CANTSEEIT +;>> IF OBJECT=IEVERYTHING THEN CANTUSEHERE ; EVERYTHING as NOUN2 +;>> GOSUB ISOBJECTCARRIED +; POS=PLAYER +; HIPOS=NONSPECIFIC +; GOSUB @CHECKOBJECTPOS +;>> IF RESULT=TRUE THEN ONT2 +;>> MESSAGE 2011 ; Can't see .. +;>> GOTO ONTERROR +;>>.ONT2 +;>> IF VERB=ISTAND THEN ONTDROPFIRST +;>> MESSAGE 2013 ; Already have .. +;>> GOTO ONTERROR + +;>>.ONTDROPFIRST +;>> MESSAGE 2014 ; have to drop it first +;>>.ONTRET +;>> RETURN +;---- +;>>.ITSNOTTHERE +; user asked for NOUN1 in NOUN2 or similar +; but NOUN1 is not contained by NOUN2 +;>> MESSAGE 2017 ; it's not there +;>> RETURN +;--- +;.PARSEINPUT +; CONVERT INPUT TO VERB, PREP, OBJECT FORM FOR +; EASY UNDERSTANDING BY THE REST OF THE PROGRAM +; HAVECALLEDVERB=FALSE +; GOSUB @GETNEXTWORD +; VERB=C0 +; IF EOL=TRUE THEN @PIEND; NOTHING ENTERED ! +; +;; is player trying to talk to someone ? +; SEARCHTYPE=NOUNTYPE +; GOSUB @CHECKTYPE +; IF VALUENPCMAX THEN PINOTNPC +;; yes, so is the target here ? +; OBJECT=VALUE +; GOSUB CHECKIFPRESENT +; IF RESULT=TRUE THEN PINPC +; MESSAGE 2060 ; talking to yourself ? +; GOTO CLEARINPUT +; +;.CANTTALKTOSEVERAL +;; can't talk to more than one person +; MESSAGE 2061 +; GOTO CLEARINPUT +; +;.PINPC +;; set up conversation target as player +; IF PLAYER<>USER THEN CANTTALKTOSEVERAL +; PLAYER=VALUE +; GOSUB SETUPROOM +; GOSUB GETNEXTWORD ; first word of what's said +; GOTO SAY +; +;>>.LASTVERBINVALID +; IF PLAYER<>USER THEN NPCNOTUNDERSTAND +;>> PARSEM1=2050 ; last verb not valid +;>> GOSUB @VARYMESSAGE +;>> GOTO @CANCELINPUT + +;.PI0A +;>> IF VALUE<>IRAM THEN PI0B ;>> +;>> GOSUB @GETNEXTWORD ;>> +;>> I2=VALUE ;>> +;>> GOTO @RAMCOMMAND ;>> + +; +;.PION0 +; IF OBJECTSPELLMAXPLUSONE THEN PION1 +; SPELL=OBJECT +; GOTO PINEXT + +;.PION1 +;; hold on a moment. There are certain constructs where +;; the first noun can be the destination +;; e.g. "GIVE ME THE MANDRAKE" +; IF VERB<>IGIVE THEN PION2 +; IF OBJECT=USER THEN PIGIVE +; IF OBJECT>NPCMAX THEN PION2 +; IF OBJECT>NPCBASE THEN PIGIVE +; +;>>.PIGIVE +;>> IF PREP<>C0 THEN DONTUNDERSTAND +;>> NOUN2=OBJECT +;>> EVENTUALPREP=ITO +;>> GOTO @PINEXT +;--- +;>>.CNNOTCLEAR1 +;>>; OBJECT>MAXOBJECT, see if it is valid +;>> IF OBJECT=IEVERYTHING THEN CHECKNNORMAL +;>> IF OBJECT=IIT THEN CHECKNNORMAL +;>> IF OBJECT=IEXCEPT THEN CHECKNNORMAL +;>> GOTO @NOTCLEAR +; +;.CHECKNOUNEND +; IF OBJECTSPELLMAXPLUSONE THEN CNENSPELL +; GOTO CHECKNNORMAL +;--- +; .CHECKOBJECTPOS +; Return RESULT=TRUE if 'OBJECT' is +; at 'HIPOS', 'POS' +; if POS=0, it is treated as NONSPECIFIC +; likewise, HIPOS=NONSPECIFIC is handled +; return PARSEX4=lo position of object (or object if on ground) +; PARSEX4=OBJECT +;.COP1 +; IF POS=C0 THEN COPHI +; PARSEX1=CURRENTPOS(PARSEX4) +; IF PARSEX1<>POS THEN @COPNOTYET +;.COPHI +; lo address is same, now check hi address +; PARSEX1=HICURRENTPOS(PARSEX4) +; IF PARSEX1=C0 THEN COPHI1 +; IF HIPOS=NONSPECIFIC THEN COPFOUND ; provided object is contained +;.COPHI1 +; IF PARSEX1<>HIPOS THEN COPNOTYET +;.COPFOUND +; RESULT=TRUE +; RETURN +;.COPNOTFOUND +; RESULT=FALSE; +; RETURN +; +;.COPNOTYET +; PARSEX1=HICURRENTPOS(PARSEX4) +; IF PARSEX1=C0 THEN COPNOTFOUND +; PARSEX4=CURRENTPOS(PARSEX4) +; GOTO COP1 +;--- +;.CHECKIFPRESENT +;; is OBJECT in same room as player ? +; SAVEHISEARCHPOS=HISEARCHPOS +; HISEARCHPOS=NONSPECIFIC +; GOSUB CHECKIFACCESSIBLE +; HISEARCHPOS=SAVEHISEARCHPOS +; RETURN + +;----- +;------------------------------------- +;------------------------------ diff --git a/l9dev/regress/games.l9/colossal.l9/apconst.txt b/l9dev/regress/games.l9/colossal.l9/apconst.txt new file mode 100644 index 0000000..90b8bb5 --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/apconst.txt @@ -0,0 +1,168 @@ +;Parser constants, variables and lists for Converted Trilogies + +;Copyright (C) 1986 Level 9 Computing + +;B:APCONST.TXT + +;----- + +; Most constants are game-specific. + +CONST + +;Values allowed in 'VERSION': + GAMECODE=1 ;Unique game number + PREVIOUSGAMECODE=0 ;Only required for second/final part + +;Values allowed in 'GAMESOLVED': + JUSTPLAYING=0 ;Not solved previous part(s), Not an end position + ENDPOSITION=1 ;End position for game. + SOLVING=2 ;Solved previous part(s), Not an end position + + FIRSTPART=1 ;If non-zero prevents RESTORE from chaining + FINALPART=0 ;If non-zero at end of game does not SAVE + + WHATNOW=13 + +;----- + +; NOW CONSTANTS FOR COMMON MESSAGES + + OK=2006 ;>>MIKE 23/6/86 + + SPACE=3011 + COMMA=3000 + CR=3003 + AND=3010 + DOTCR=3004 + DOT=3001 +; THE=3009 + COLON=3002 + QUOTE=3008 + + NONSPECIFIC=31 ; USE IN POSITION SEARCH WHERE TYPE UNKNOWN + +; Bases for text blocks + + OBJECTDESCBASE=515 ;Same as ADJUSTOFFSET + SHORTROOMDESCS=64636 ;65536-(NOUNOFFSET-100) Start of room descriptions + + MAXOBJECTVISIBLE=70 ;>>MIKE 23/6/86 + MINOBJECT=34 ;actually MINOBJECT-1 + MAXOBJECT=104 ;>> 100 + + MINSTATUS=1 ; change to 100 to fix bug in squasher which + MAXSTATUS=2 ; 328 prevents all nouns being reported + + NUMDIRECTIONS=16 ;Exits 0 thru 15 + +; Keyword values: + + INORTH=1 + ICROSS=13 + ITAKE=16 + IDROP=17 + ITHROW=18 + IQUIT=31 + IYES=75 + INO=76 + ILOOK=78 + ISAVE=92 + IRESTORE=93 + IEXAMINE=95 + IRAM=96 + IOOPS=97 + IEXITS=240 + IAGAIN=241 + IEVERYTHING=250 ; EVERYTHING-NOUNOFFSET + IEXCEPT=251 + IIT=252 + ITHEN=385 + +; SAYINGS (RELATIVE TO NOUNOFFSET) + + IGARBAGE=2999 + NULLOBJECT=255 +; NULLNUMBER=65535 + +; WORD TYPE VALUES + + ASCITYPE=0 + VERBTYPE=2 ; V + CONJTYPE=4 ; J + PREPTYPE=6 ; P + NOUNTYPE=8 ; N + ADJETYPE=10 ; A + MATCHTYPE=12 ; C - used for matching with particular words - + ; e.g. was a reference to scenery the word 'panel' + NUMBTYPE=14 + ASCIOFFSET=0 + VERBOFFSET=1000 + CONJOFFSET=0 + PREPOFFSET=1000 + NOUNOFFSET=1000 + ADJEOFFSET=0 + MATCHOFFSET=4300 ;used for matching with particular words + NUMBEROFFSET=1 ;offset within NOUNOFFSET + HINUMBEROFFSET=0 ;highest number offset + + MINNOUNADJUST=550 ;Lowest 'INV' object message + MAXNOUNADJUST=582 ;Highest + ADJUSTOFFSET=515 ;NOUNOFFSET-MINNOUNOFFSET + +; ASCII VALUES + + ICOMMA=44 + IDOT=46 + +;----- + + FALSE=0 + TRUE=1 + +; Constants for Objecttable assignments + + NOUNCARRIED=1 + NOUNONGROUND=2 + NOUNSPECIFIED=128 + NOUNFORBIDDEN=192 + + NEGATIVE=50000 + +;----- + +VAR + LASTOOPSROOM NEXTOOPSPOS NEXTOOPSEND + PARSEX1 PARSEX2 PARSEX3 PARSEX4 + VERB PREP NOUN1 NOUN2 INUMBER + VALUE + INDEX + FROM DEST STATUS ROOM DIR NUMEXITS + EXITVISIBLE + CURRENTOBJECT OBJECT HISEARCHPOS + LASTWORDPRINTED + OUTPUTWORD + RESULT + WORD1 WORD2 WORD3 WORD4 + PARSEM1 + LASTPICTURE + SEARCHTYPE WORDTYPE EXCEPT + WORDNOTPROCESSED EOL SEPARATOR EVERYTHING NOMOREINPUT + PROCESSED SUPRESSCHECKING + ITWORD ITNUMBER AGAINVERB + VERBSTOCALL HAVECALLEDVERB SOMETHINGPROCESSED LASTVERBVALID + CURRENTMESSAGE + DOOR + OOPSFL ; >> ANDY 26/6/86 + +;----- + +TABLE + OUTPUTBUFFER=7 + OBJECTTABLE=8 ; USED FOR EVERYTHING AND SIMILAR WORDS + LINPUT=9 + +;----- +;-------------------------------------------------- +;--------------------------------------------------- +;---------------------------------------------------- diff --git a/l9dev/regress/games.l9/colossal.l9/aspecial.txt b/l9dev/regress/games.l9/colossal.l9/aspecial.txt new file mode 100644 index 0000000..b42e233 --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/aspecial.txt @@ -0,0 +1,1957 @@ +;Colossal Adventure 27/05/86 +;Converted from version on 17/01/84 +; +;>> extra messages 694,695,696 added at 27/8/86 by MJA +;>> (for the 16bit versions). If the small text games are re-issued, +;>> we will have to make the appropriate changes in their text +; +CONST + LIST3MAX=33 ;>>MIKE 27/8/86 + +BEGIN +;Copyright (C) 1984,1986 Level 9 Computing +.STARTGAME + CLEAR ;>> moved from L70 +; C0=0 ;>> + C1=1 ;>> + C2=2 ;>> + C3=3 ;>> + VERSION=GAMECODE ;>>Must be before 'RETURNTOSTART' + GAMESOLVED=JUSTPLAYING ;>> + +.RETURNTOSTART ;>> Only for 'CHAIN' + + SCREEN G C0 ;>> NICK 1/7/86 + CLS G ;>> NICK 1/7/86 + LASTPICTURE=501 ;>> NICK 1/7/86 + PICTURE LASTPICTURE ;>> NICK 1/7/86 + + GOSUB @INITPARSER ;>> +; +;>.L10 +;.L20 +;.L40 +;>> .L50 GOTO L70 ;COLD START +;>> .L60 GOTO @L450 ;WARM +;>> moved to STARTGAME .L70 CLEAR +;>>.L80 +;>> C1=1 ;moved to STARTGAME +;>>.L85 +;>> C2=2 ;moved to STARTGAME +;>> C3=3 ;moved to STARTGAME + C8=255 + +; X1=C0 ;>> +;.CLEARALL ;>> +; IF X1>255 THEN CLEAREND ;>> +; LIST1(X1)=C0 ;>> +; ADD X1,C1 ;>> +; GOTO CLEARALL ;>> +;.CLEAREND ;>> + + X1=C1 +.L120 X2=LIST2(X1) ;OBJECT ROOMS + LIST3(X1)=X2 + LIST5(X1)=C9 + LIST1(X1)=C9 + ADD X1,C1 + IF X1<34 THEN L120 ;Only 33 bytes long (?) +.L180 LIST1(X1)=C9 + ADD X1,C1 + IF X1<110 THEN L180 + T1=120 ;TIME LEFT + ;M1=0 ;NO. OF MOVES LEFT + ;F1=0 ;BOTTLE CONTENTS + ;F2=0 ;CAGE + F3=C2 ;BEAR CHAINED + ;D1=0 ;NUMDIE + W1=30 ;WITT'S END PROB. + ;D2=0 ;FIRST DWARF + D3=C2 ;DWARF ANGRY + ;D4=0 ;NO DWARVES IN ROOM + ;F4=0 ;TROLL LURKING + ;F5=0 ;CLAM + ;F6=0 ;PLANT SMALL + ;F7=0 ;FEE FLAG +;>> .L350 +;L1=0 ;LAMP OFF +;L2=0 ;LAMP MOVES +;S1=0 ;HALL MIST VISITED? +;E5=0 ;NORTH CHAINED ELVES +;E6=0 ;SOUTH CHAINED ELVES +;E4=0 ;NO KING +;S2=0 ;NO QUIT YET + S6=C1 ;NO SAVE YET + ;S3=0 ;ENDGAME SCORE + S5=216 ;SPIDER ROOM + ;T2=0 ;NOT IN ENDGAME + ;E1=0 ;NO BLAST YET + ;E2=0 ;SKELETONS + ;B1=0 ;NO ENDGAME BRIDGE YET + ;E3=0 ;ENDGAME DOOR OPEN + MESSAGE C1 ;Copyright message + MESSAGE 12 ;CR + R1=C1 + GOSUB @INITOOPS ;>> +.L450 GOTO @L4000 +.L500 GOSUB @L22000 ;CHECK IF ROOM IS WATERED + W5=W4 + IF R1<>50 THEN L505 + S1=C1;HALL OF MISTS +.L505 IF R1>165 THEN L510 + IF R1>49 THEN L530 +.L510 D4=C0 ;NO DWARVES + GOTO L650 +.L530 RANDOM X1 + IF X1>5 THEN L650 + IF X1C0 THEN L600 + ; FIRST DWARF + MESSAGE 91 + LIST3(26)=R1 ;AXE APPEARS + GOTO L630 +.L600 ; ANOTHER DWARF + MESSAGE 92 + ADD D4,C1 ;ANOTHER DWARF IN ROOM +.L630 ADD D2,C1 ;NO. OF DWARVES SEEN +.L650 + GOSUB @L33000 ;LAMP OUT ? +.L655 GOSUB @L32500 ;VOICE SAYS PLUGH +.L659 ;>> MESSAGE 13 ; WHAT NOW ? +.L660 +.RESETSTACK + STACK + GOSUB @OOPSCHECK ;>> + +.I4CHECK ;>> + GOSUB @GETCOMMAND ;>> INPUT I1 I2 I3 I4 + IF I4=C0 THEN I4CHECK ;>> + +.L665 GOSUB @L32000 ;HANDLE FEE ETC. PART 1 +.L670 IF I4=C0 THEN L660 +.L690 ; + JUMP @L800 I1 + +.L700 ; PIRATE + X1=LIST5(24) ;HAS CHEST BEEN SEEN + IF X1=C1 THEN L550 + R2=C8 + R3=C8 + GOSUB @L11000 + IF N3=C0 THEN L550 + R3=115 ;CHEST + LIST3(24)=R3 ;CHEST APPEARS IN MAZE + GOSUB @L11000 ;TREASURE + MESSAGE 93 + GOTO L650 +.L800 DATA @L1100,@L2000,@L2000,@L2000,@L2000 ;1-4 + DATA @L2000,@L2000,@L2000,@L2000,@L2000 ;5-9 + DATA @L2000,@L2000,@L2000,@L2000,@L2000 ;10-14 + DATA @L2000,@L5000,@L5500,@L6000,@L6500 ;15-19 + DATA @L23000,@L7000,@L7100,@L7200,@L7500 ;20-24 + DATA @L7900,@L8000,@L8600,@L7800,@L7600 ;25-29 + DATA @L8700,@L9500,@L9600,@L9700,@L9800 ;30-34 + DATA @LIGHT,@EXTINGUISH,@TURN,@L1300,@L1300 ;35-39 + DATA @L1300,@L1300,@L1300,@L27000,@L1300 ;40-44 + DATA @L1300,@L1300,@L1300,@L1300,@L1300 ;45-49 + DATA @L1300,@L1300,@L1300,@L1300,@L1300 ;50-54 + DATA @L1300,@L1300,@L1300,@L1300,@L1300 ;55-59 + DATA @L1300,@L1300,@L1300,@L1300,@L1300 ;60-64 + DATA @L1300,@L1300,@L1300,@L15800,@L1300 ;65-69 + DATA @L1300,@L4500,@L1300,@L1300,@L15900 ;70-74 + DATA @L1300,@L1300,@L16500,@LOOK,@L16200 ;75-79 + DATA @L16200,@L16200,@L16200,@L19000,@L19500 ;80-84 + DATA @L1300,@L1300,@L15000,@L15400,@L15700 ;85-89 + DATA @L16000,@L1100,@L29000,@RESTORE,@L27500 ;90-94 + DATA @EXAMINE,@RAMCOMMAND,@OOPS,@WORDS,@PICTURES ;95-99 + DATA @STARTGAME,@AUTHORS,@ILLEGALCOMMAND,@ILLEGALCOMMAND ;100-103 + DATA @ILLEGALCOMMAND,@HELP ; 104-105 + +.ILLEGALCOMMAND + GOSUB @CANCELINPUT +.ENDCOMMAND ;>> +.L1000 ; AFTER PLAYER ACTION, + GOSUB @L20000 ;ENDGAME BITS+PIECES +.L1010 ; TRY THE EVIL LITTLE DWARVES + IF R1<50 THEN @L500 + IF D4=C0 THEN @L500 + RANDOM X1 + IF X1>80 THEN @L500 ;DONT THROW KNIVES + MESSAGE 94 ;Knife thrown + X1=20 + IF D3=C0 THEN L1070 + X1=50 +.L1070 IF D4=C1 THEN L1090 + ADD X1,X1 +.L1090 RANDOM X2 + IF X2>X1 THEN L1098 ;MISSES + MESSAGE 95 ;Hits + GOTO L1500 ;DIE +.L1098 MESSAGE 96 ;Misses + GOTO @L500 +.L1100 MESSAGE 5 ;Don't understand + GOTO ILLEGALCOMMAND ;>>L1000 + +.L1200 + MESSAGE 6 ;Be specific + GOTO L1000 +.SPECIALALL + MESSAGE 2022 ; doesn't seem to be anything here + GOTO L1000 + +.L1250 MESSAGE 100 ;Can't + GOTO ILLEGALCOMMAND ;>>L1000 +.L1300 MESSAGE 7 ;What ? + GOTO ILLEGALCOMMAND ;>>L1000 +.L1350 MESSAGE 8 ;I don't see it here + GOTO L1000 +.L1400 MESSAGE 9 ;I don't have it + GOTO L1000 +.L1450 MESSAGE 77 ;Nothing to attack + GOTO L1000 +;----- +.L1500 ; DEATH COMES HERE + R2=R1 + R1=19 ;HEAVEN + IF T2>C0 THEN L1700 ;ENDGAME + ADD D1,C1 + X1=52 + ADD X1,D1 + MESSAGE X1 ;Sarcastic comment +.L1551 + MESSAGE 664 ;RESSURECT? + + GOSUB @ASKINPUT ;>> + IF RESULT=FALSE THEN L1551 ;>> + + GOSUB @L18000 ;GET YES/NO RESPONSE + IF Y1=C2 THEN L1551 + IF Y1=C0 THEN L1700 ;NO + IF D1> +.L1700 MESSAGE 82 ;You scored + GOSUB @L9000 ;CALCULATE SCORE + PRINT S4 + MESSAGE 81 ;out of 1000 + MESSAGE S7 ;RATING + IF S7<>682 THEN @QUITPLAYAGAIN ;>> 676 + GOTO @ASKFINAL ;>>Option to SAVE then QUITPLAYAGAIN + +;===== + +;>>.L19030 +;>> MESSAGE 13;REALLY QUIT? +;>> INPUT I1 I2 I3 I4 +;>> IF I1=C1 THEN @L3000;NO! +;>> IF I1=29 THEN @L51000;ANOTHER GAME +;>> MESSAGE 9;YES OR NO! +;>> GOTO L19030 + +;----- + +.EXAMINE ;>> + IF I4=C2 THEN EXAMINE1 + IF EVERYTHING=TRUE THEN SPECIALALL ; MIKE 9/9/86 + MESSAGE 6 ;I don't understand + GOTO @L1000 +.EXAMINE1 + + IF I2<>69 THEN NOTEXAMINEDWARF ;>> NICK 15/7/86 + IF D4=C0 THEN NOTEXAMINEDWARF ;>> NICK 15/7/86 + MESSAGE 1633 ;>> NICK 15/7/86 notices your gaze + GOTO @L1000 ;>> NICK 15/7/86 +.NOTEXAMINEDWARF ;>> NICK 15/7/86 + IF I2<>29 THEN EXAMINENWATER + MESSAGE 1700 ; water message + GOTO AFTEREXAMINE + +.EXAMINENWATER + IF I2<>28 THEN EXAMINENOIL + MESSAGE 1701 ; oil examine message + GOTO AFTEREXAMINE + +.EXAMINENOIL + OBJECT=I2 + GOSUB @CHECKFIXEDOBJECT + IF RESULT=FALSE THEN EXAMINE2 + GOSUB @L5300 ;Convert object number + GOTO EXAMINE4 + +.EXAMINE2 + GOSUB @L5300 ;Convert I2 to object number + IF I2>LIST3MAX THEN @SILLY + X1=LIST3(I2) + IF X1=R1 THEN EXAMINE4 ;on floor + IF X1=C8 THEN EXAMINE4 ;carried + MESSAGE 8 ;I don't see it here + GOTO @L1000 + +.EXAMINE4 + X1=1599 ;1600=Start of examine messages + ADD I2,X1 + MESSAGE I2 +.AFTEREXAMINE + MESSAGE DOT + GOTO @L1000 + +;----- +.L2000 ; MOVE +;>>MIKE 9/7/86 GOSUB @SAVEOOPS ;>> + EXIT R1 I1 X1 R2 + IF R1=77 THEN @L3300 ;WITT'S END + IF R1>165 THEN L2022 ;DIFF MAZE FORMULA + IF R1<145 THEN L2022 + IF R2<>C0 THEN L2022 + R2=R1 + ADD R2,I1 +.L2017 IF R2<166 THEN L2022 + X1=21 + SUB R2,X1 + GOTO L2017 +.L2022 + GOSUB @L26000 ;ENDGAME SPECIAL CASES + IF R2=C0 THEN L2070 + IF X1110 THEN L2100 + X2=LIST1(R1) + IF X2=C1 THEN L2100 ;GRATES OPEN + GOSUB L2300 ;SPECIAL CASES 1 + GOTO @L1000 +.L2070 MESSAGE 4 ;Notpos + GOTO @L1000 +.L2100 IF R2<>C8 THEN L2110 + MESSAGE 28 ;DIES + GOTO @L1500 +.L2110 GOSUB @L12000 ;LIGHT IN R1:L3=1,R2:L4=1 + IF L3=C1 THEN L2200 + IF L4=C1 THEN L2200 + RANDOM X1 + IF X1>85 THEN L2200 + MESSAGE 52 ;Die + GOTO @L1500 +.L2200 + GOSUB L2500 ;SPECIAL CASES 2 +.L2210 + + IF R1<>33 THEN NOTLENSMOVE ;>> + IF R2<>34 THEN NOTLENSMOVE ;>> + GOSUB @LENSLOKAPPOLOGY ;>>MIKE 15/9/86 MESSAGE 2330 ; sorry about this! + GOSUB @LENSLOK ;>> + IF RESULT=FALSE THEN @L4000 ;>> +.NOTLENSMOVE ;>> + GOSUB @SAVEOOPS ;>> MIKE 9/7/86 + R1=R2 + GOTO @L4000 ;DESC ROOM +.L2300 ; MESSAGES FOR GRATES ETC. + IF R1<>4 THEN L2340 + IF R2<>17 THEN L2340 +.L2330 MESSAGE 16 ;Grate locked + GOTO @L1000 +.L2340 + IF R1<>17 THEN L2370 + IF R2=4 THEN L2330 ;GRATE LOCKED +.L2370 + IF R1<>52 THEN L2390 + MESSAGE 32 ;SNAKE +.L2390 + IF R1<>58 THEN L2420 + IF R2<>59 THEN L2420 +.L2410 GOTO L2070 ;NOTPOS-CRYSTAL BRIDGE +.L2420 + IF R1<>59 THEN L2430 + IF R2=58 THEN L2410 ;CRYSTAL BRIDGE +.L2430 IF R1<>92 THEN L2440 + IF R2<>94 THEN L2440 + MESSAGE 57 ;NOPLANT +.L2440 IF R1<>107 THEN L2450 + IF R2<>71 THEN L2450 + MESSAGE 58 ;GATE +.L2450 + RETURN +.L2500 ; SPECIAL CASES + GOSUB @L28100 ;SPIDER SPECIAL CASES + X1=LIST3(8) ;GOLD + IF X1<>C8 THEN L2600 + IF R1<>50 THEN L2560 + IF R2<>31 THEN L2560 + MESSAGE 56 ;DOME UNCLIMABLE + GOTO @L1000 +.L2560 IF R1<>31 THEN L2600 + IF R2<>50 THEN L2600 + MESSAGE 28 ;DIE + GOTO @L1500 + ; +.L2600 IF R2<>244 THEN L2700 ;RANDOM BEDQUILT +.L2610 RANDOM X1 + IF X1>9 THEN L2610 + R2=97 + ADD R2,X1 + RETURN + ; +.L2700 + IF R1<>104 THEN L2800 + IF R2<>101 THEN L2750 +.L2720 RANDOM X2 ;SWISS TO ORIENTAL + IF X2<120 THEN @L2070 ;NOTPOS + RETURN + ; +.L2750 IF R2=85 THEN L2720 ;SWISS-TALL EW + ; +.L2800 IF R1=78 THEN L2820 ;ALCOVE + IF R1<>18 THEN L2900 +.L2820 IF R2=18 THEN L2835 + IF R2<>78 THEN L2900 +.L2835 R4=R2 + R2=C8 + R3=C8 + GOSUB @L11000 ;OBJECT COUNT + IF N5=C0 THEN L2895 ;POSSIBLE INDEED! + IF N5>C1 THEN L2897 ;NOTPOS + X1=LIST3(14) ;EGG JEWEL + IF X1<>C8 THEN L2897 ;NOTPOS +.L2895 R2=R4 + RETURN +.L2897 MESSAGE 649 ;SOMETHING TOO BIG + R2=R1 + RETURN +.L2900 ; WEST FROM SW REPOSITORY + IF R2<>252 THEN L3000 + IF E1<>C1 THEN @L2070 ;NOTPOS + R2=171 ;CORRIDOR + RETURN +.L3000 ; TROLL BRIDGE + IF R1=93 THEN L3030 + IF R1<>32 THEN L3500 ;NOT TROLL B. +.L3030 IF R2=32 THEN L3050 + IF R2<>93 THEN L3500 ;NOT TROLL B. +.L3050 IF F4=C0 THEN L3100 ;TROLL APPEARS + IF F4=C1 THEN L3150 ;BLOCKS WAY + X1=LIST3(12) ;BEAR + IF X1=C8 THEN L3200 + IF F4<>C2 THEN L3090 + F4=C0 +.L3090 RETURN + ; +.L3100 ; TROLL APPEARS + MESSAGE 62 + F4=C1 + LIST1(93)=C1 + LIST1(32)=C1 + GOTO @L1000 + ; +.L3150 ; TROLL ALREADY THERE + MESSAGE 63 + GOTO @L1000 + ; +.L3200 ; CARRYING BEAR OVER TROLL BRIDGE + MESSAGE 90 ;Bridge collapses + LIST3(12)=C9 ;KILL BEAR + GOTO @L1500 ;DEATH + ; +.L3300 ; WITT'S END + IF R1<>77 THEN @L2110 + IF R2<>254 THEN L3360 + W1=180 +.L3340 MESSAGE 43 ;Maze,NoGo + GOTO @L1000 +.L3360 IF R2<>76 THEN L3340 + RANDOM X1 + IF X1>178 THEN L3340 ;>> +;>> IF X1>100 THEN L3340 + GOTO @L2210 ;MOVE +;----- +.L3500 ; OUT OF GRATE IN ENDGAME + IF E1=C0 THEN L3090 ;RETURN + IF R1<>17 THEN L3090 ;RETURN + IF R2<>4 THEN L3090 ;RETURN + E4=C1 ;MET KING + MESSAGE 687 ;ELVES WAITING FOR YOU + CLS G ;>> PETE 7/7/86 + LASTPICTURE=501 ;>> DRAW TREES AT GAME END. PETE 7/7/86 + PICTURE LASTPICTURE ;>> PETE 7/7/86 + GOTO @L1700 ;END GAME +;----- +.LOOK ;>> + IF I2<>2900 THEN L4000 ;preposition ? + I2=I3 + I3=0 + SUB I4,C1 + GOTO @EXAMINE +;----- + +.DESCRIBE ;>> +.L4000 ; DESCRIBE + GOSUB @L12000 ;LIGHT DETECTION + IF L3<>C0 THEN L4050 + CLS G ;>> + LASTPICTURE=0 ;>>Redraw picture if user moves back to previous room + PICTURE LASTPICTURE ;>>MIKE 2/8/86 + MESSAGE 59 ;Dark +; and go to a black screen... + X1=19 + LIST9(C0)=X1 + LIST9(C1)=C0 + LIST9(C2)=C0 + DRIVER + + GOTO @L1000 +.L4050 + + X1=500 ;>> + ADD X1,R1 ;>> + IF LASTPICTURE=X1 THEN SAMEPICTURE ;>> + CLS G ;>> + PICTURE X1 ;>> + LASTPICTURE=X1 ;>> +.SAMEPICTURE ;>> + + X1=100 + ADD X1,R1 + MESSAGE X1 ;Room description + MESSAGE DOT ;>> + MESSAGE 12 ;CR + ; MESSAGE DESCRIPTION FOR FEATURE + IF R1<>199 THEN L4109 + IF E3=C1 THEN L4105 + MESSAGE 672 ;DOOR OPEN + GOTO L4109 +.L4105 MESSAGE 673 ;DOOR LOCKED +.L4109 IF R1>110 THEN L4200 + X1=LIST1(R1) + X2=330 ;GATES ETC. CLOSED + IF X1<>C1 THEN L4150 + X2=440 ;GATES ETC. OPEN +.L4150 ADD X2,R1 + MESSAGE X2 +; + IF R1<>92 THEN L4200 ;PLANT ROOM + X4=642 + IF F6=C0 THEN L4190 + X4=643 + IF F6<>C1 THEN L4200 +.L4190 MESSAGE X4;INTERMEDIATE PLANT DESCRIPTIONS +.L4200 IF R1=195 THEN L4202 + IF R1<>197 THEN L4205 +.L4202 IF B1=C0 THEN L4205 + MESSAGE 498 ;CRYSTAL BRIDGE IS THERE +.L4205 IF R1<>191 THEN L4209 ;ELVES + IF E2=C1 THEN L4209 + MESSAGE 663 ;PILES OF SKELETONS +.L4209 GOSUB @L28500 ;CHAINED ELVES DESCR. + ; LIST ANY OBJECTS LYING AROUND + MESSAGE 12 ;CR + R3=R1 +.L4220 X1=C1 +.L4250 GOSUB @L13000 ;DESCRIBE OBJECT + ADD X1,C1 + IF X1<33 THEN L4250 + ; + ; DESCRIBE ANY DWARVES + GOSUB @L28400 ;MESSAGE SPIDER DESC + IF R1<50 THEN @L1000 + IF D4=C0 THEN @L1000 + IF D4>C1 THEN L4350 + MESSAGE 97 ;ONE DWARF HERE + GOTO @L1000 +.L4350 MESSAGE 98 ;There are + PRINT D4 + MESSAGE 99 ;Dwarves here + GOTO @L1000 + ; +.L4500 ; INVENTORY + MESSAGE 10 ;You have + MESSAGE 12 ;CR + R2=C8 + R3=C8 + GOSUB @L11000 ;OBJECT COUNT + IF N5>C0 THEN L4220 ;LIST OBJECTS + MESSAGE 11 ;Nothing at all ! + GOTO @L1000 +;----- +.L5000 ; TAKE OBJECT + IF I2<>C0 THEN L5040 + IF I4=C2 THEN L5035 ;2 ARGS GIVEN + IF EVERYTHING=TRUE THEN @SPECIALALL ;>>MIKE 9/9/86 + MESSAGE 5 ;DON'T UNDERSTAND + GOTO @L1000 +.L5035 ; SECOND OF TWO ARGS NOT UNDERSTOOD + MESSAGE 60 ;NO-OBJ + GOTO @L1000 +.L5040 + + IF I2<>69 THEN NOTTAKEDWARF ;>> NICK 15/7/86 + IF D4=C0 THEN NOTTAKEDWARF ;>> NICK 15/7/86 + MESSAGE 78 ;>> NICK 15/7/86 Too agile + GOTO @L1000 ;>> NICK 15/7/86 +.NOTTAKEDWARF ;>> NICK 15/7/86 + + GOSUB @L5300 ;CONVERT I2 + IF R1<>40 THEN L5049 ;BEAR ROOM + IF F3<>C2 THEN L5049 ;BEAR PLACID + MESSAGE 47 ;BEAR SNAPS ETC. + GOTO @L1000 +.L5049 + IF I2>LIST3MAX THEN @SILLY ;>>MIKE 27/8/86 + X1=LIST3(I2) + IF X1=R1 THEN L5120 + IF X1<>C8 THEN L5090 +.ALREADYHAVEIT + MESSAGE 61 ;Already have it + GOTO @L1000 +.L5090 MESSAGE 8 ;Don't see it + GOTO @L1000 +.L5120 IF I2<>7 THEN L5150 ;NOT BIRD + IF F2=C0 THEN L5150 + GOTO ALREADYHAVEIT ;>>MIKE 26/8/86 - L5090 ;CAN'T GET BIRD IF CAGED +.L5150 LIST5(I2)=C1 ;OBJECT SEEN + GOSUB @L21000 ;SEE IF ALL OBJECTS FOUND + R2=C8 + R3=C8 + GOSUB @L11000 ;COUNT OBJECTS + IF N5<4 THEN L5250 + MESSAGE 46 ;Hands full + GOTO @L1000 +.L5250 GOSUB @L17000 ;BIRD IS SPECIAL + LIST3(I2)=C8 ;CARRIED + MESSAGE ok ;>>mike 19/9/86 - was 648 ;I HAVE IT NOW + GOTO @L1000 + ; +.L5300 ; TRANSLATE I2 TO OBJECT NO. + GOSUB @CONVERTI2 ;>> + IF I2=65529 THEN @L1200 ;BE MORE SPECIFIC + RETURN +;----- +.L5500 ; DROP OBJECT + GOSUB L5300 ;CONVERT I2 + IF I2>LIST3MAX THEN @SILLY ;>>MIKE 27/8/86 + X1=LIST3(I2) + IF X1=C8 THEN L5650 + MESSAGE 9 ;I don't have it + GOTO @L1000 + ; +.L5600 ; ACTUALLY DROP IT + MESSAGE 645 ;Dropped +.SILENTDROP LIST3(I2)=R1 + GOTO @L1000 + +.L5650 ; BIRD + IF S5<>C8 THEN L5663 + IF R1=209 THEN @L28300 ;SPIDER EATS HIM +.L5663 IF I2<>7 THEN L5700 ;BIRD + F2=C0 + IF R1=68 THEN L5695 ;DRAG? + IF R1<>52 THEN L5600 ;KINGS + MESSAGE 34 ;BIRD ATTACKS + LIST1(52)=C1 + GOTO SILENTDROP ;>>L5600 +.L5695 X1=LIST1(R1) + IF X1=C8 THEN L5600 + MESSAGE 39 ;BIRD GETS EATEN + LIST3(7)=C9 + GOTO @L1000 +.L5700 ; BEAR+TROLL + IF I2<>12 THEN L5750 + IF R1<>32 THEN L5600 + IF F4>1 THEN L5600 ;TROLL NOT THERE + MESSAGE 50 ;Bear attacks + LIST1(32)=C9 + LIST1(93)=C9 + F4=C3 ;TROLL GONE + GOTO SILENTDROP ;>>L5600 +.L5750 ; MING VASE + IF I2<>17 THEN L5850 + X1=LIST3(16) ;PILLOW + IF X1=R1 THEN L5600 + IF R1=84 THEN L5600 ;SOFT ROOM + MESSAGE 45 ;VASE BREAKS + LIST3(17)=C9 ;GET RID OF VASE + GOTO @L1000 + ; +.L5850 ; COINS + IF I2<>21 THEN L5900 + IF R1<>145 THEN L5600 ;VENDING M/C + L2=C8 ;NEW BATTERIES IN LAMP + LIST3(21)=C9 ;KILL COINS + MESSAGE 650 ;TELL HIM ABOUT IT + GOTO @L1000 + ; +.L5900 ; CAGE + IF I2<>5 THEN L5950 ;CAGE + IF F2=C0 THEN L5950 ;CAGE EMPTY + LIST3(7)=R1 + GOTO @L5600 +.L5950 ; ELIXIR + IF I2<>29 THEN L5990 + IF R1<>191 THEN L5970 + MESSAGE 662 ;ELVES ARISE + E2=C1 ;ELVES FREE +.L5965 LIST3(29)=C9 ;KILL ELIXIR + GOTO @L1000 +.L5970 MESSAGE 661 + GOTO L5965 +.L5990 ; LITTER IN PICNIC SPOT + IF R1<>13 THEN @L5600 + MESSAGE 683 ;LIGHTENING GETS YOU + GOTO @L1500 +;----- +.L6000 ; THROW + IF R1<>40 THEN L6000A ;>>MIKE 9/7/86 + IF I2=38 THEN @FEEDBEAR ;>> "THROW FOOD" = "FEED BEAR" +.L6000A ;>>MIKE 9/7/86 + GOSUB @L5300 ;CONVERT I2 + O1=I2 + GOSUB @L14000 ;CHECK O1 CARRIED + GOSUB @L31000 ;DIE IN REPOSITORY + IF O1=28 THEN @L28200 ;JADE SPIDER +.L6040 + IF R1=93 THEN L6250 ;TROLL + IF R1=32 THEN L6250 ;TROLL + IF R1=68 THEN L6350 ;DRAGON + IF I2<>26 THEN @L5650;NOT AXE,SO DROP IT +.L6080 + IF D4=C0 THEN THROWATDRAGON ;>>MIKE 27/8/86 -@L5650 ;NO DWARVES TO KILL + ; KILL DWARVES + RANDOM X1 + IF X1>30 THEN L6140 + MESSAGE 65 ;Missed + GOTO @SILENTDROP ;>> @L5650 ;DROP AXE +.L6140 X1=66 ;THE DWARF DIES + IF D4=C1 THEN L6170 + X1=67 ;ONE OF THE DWARVES +.L6170 MESSAGE X1 + SUB D4,C1 ;ONE LESS DWARF + D3=C1 ;DWARVES MAD + GOTO @SILENTDROP ;>> @L5650 ;DROP AXE + ; +.THROWATDRAGON ; throw axe at or snake or bear, if here. +; no dwarves around. + X1=LIST1(R1) + IF X1<>C0 THEN @L5650 ; drop it + IF R1=52 THEN THROWSNAKE + IF R1=68 THEN THROWSNAKE + GOTO @L5650 ; drop it +.THROWSNAKE + MESSAGE 696 ; bounces off + GOTO @SILENTDROP +;--- +.L6250 ; TROLL + IF F4<>C1 THEN L6080 ;NO TROLL + IF I2=12 THEN @L5700 ;BEAR + IF I2<>26 THEN L6300 + MESSAGE 64 ;TROLL RETURNS AXE + GOTO @L1000 + ; +.L6300 X1=LIST4(I2) + IF X1=C0 THEN L6345 ;WORTHLESS + LIST3(I2)=C9 ;TROLL GETS TREASURE + MESSAGE 89 ;TROLL THANKS YOU + F4=2 + LIST1(93)=C9 + LIST1(32)=C9 + GOTO @L1000 +.L6345 MESSAGE 88 ;NOT WORTH ANYTHING + GOTO @L1000 + ; +.L6350 ; DRAGON + IF I2<>26 THEN @L5650 ;NOT AXE + X1=LIST1(R1) + IF X1<>C0 THEN @L5650 ;NO DRAGON + MESSAGE 40 ;AXE BOUNCES OFF SCALES + GOTO @SILENTDROP ;>> @L5600 +.L6500 ; OPEN,UNLOCK + IF I2=65 THEN @L15700 ;SESAME + IF R1=193 THEN @L6950 ;N ELVES + IF R1=194 THEN @L6970 ;S ELVES + IF I2<>35 THEN L6650 ;GRATE + IF R1=4 THEN L6550 + IF R1=17 THEN L6550 + GOTO @L1250;CAN'T +.L6550 X1=LIST3(C1) + IF X1=C8 THEN L6600 +.L6570 MESSAGE 19 ;NOKEYS + GOTO @L1000 + ; +.L6600 ; UNLOCK THAT GRATE NOW + LIST1(4)=C1 + LIST1(17)=C1 + MESSAGE 17 ;TELL HIM ABOUT IT + GOTO @L1000 + ; +.L6650 ; CHAIN + IF I2=47 THEN L6665 ;BEAR + IF I2<>57 THEN L6800;CHAIN +.L6665 IF R1<>40 THEN L6800 + X1=LIST3(C1) + IF X1<>C8 THEN L6570 + IF F3<>C2 THEN L6690 + MESSAGE 47 ;CAN'T GET TO CHAIN + GOTO @L1000 +.L6690 ; CHAIN APPEARS + F3=C0 ;BEAR PASSIVE + X1=40 + LIST3(22)=X1 ;CHAIN + MESSAGE 48 ;CHAIN CLICKS OPEN + GOTO @L1000 + ; +.L6800 ; CLAM + IF I2<>85 THEN @L1250;CAN'T + IF R1<>103 THEN @L1350 + X1=LIST1(103) + IF X1=C0 THEN L6870 + MESSAGE 68 ;It's already open + GOTO @L1000 +.L6870 X1=LIST3(18) ;TRIDENT + IF X1=C8 THEN L6910 + MESSAGE 41 ;Won't open + GOTO @L1000 +.L6910 MESSAGE 42 ;CLAM OPENS + X1=81 ;CUL-DE-SAC + LIST3(19)=X1 + LIST1(103)=C1 ;CLAM=OYSTER NOW + GOTO @L1000 + ; +.L6950 ; UNLOCK N ELVES + IF E5=C1 THEN @L1000 + MESSAGE 689 ;ELVES RUSH OFF + E5=C1 + GOTO @L1000 +.L6970 ; UNLOCK S ELVES + IF E6=C1 THEN @L1000 + MESSAGE 689 ;ELVES RUSH OFF + E6=C1 + GOTO @L1000 +;----- +.TURN +; e.g. TURN LAMP ON/OFF + IF NOUN1=37 THEN TURNLAMP + IF NOUN2<>37 THEN @NOTHINGHAPPENS +.TURNLAMP + IF PREP=2901 THEN L7000 ; on + IF PREP=2906 THEN L7100 ; off + GOTO @NOTHINGHAPPENS +;--- +.EXTINGUISH + IF NOUN1=37 THEN L7100 ; lamp off + GOTO @NOTHINGHAPPENS +;--- +.LIGHT + IF PREP=2906 THEN L7100 ; light off + IF PREP=2901 THEN L7000 ; light on + IF NOUN1<>37 THEN @NOTHINGHAPPENS ; not lamp +; drop through to light lamp +.L7000 ; LIGHT ON + O1=C2 + GOSUB @L14000 ;CHECK OBJECT CARIED + IF L2=254 THEN @L1250;CAN'T. LAMP DEAD + L1=C1 + MESSAGE 14;LAMP NOW ON + GOTO @DESCRIBE ;>> GOTO @L1000 + ; +.L7100 ; LIGHT OFF + O1=C2 + GOSUB @L14000 ;CHECK OBJECT CARRIED + L1=C0 + MESSAGE 15;LAMP NOW OFF + GOTO @DESCRIBE ;>> @L1000 Clear graphics if now dark + ; +.L7200 ; FILL + GOSUB @L5300 ;CONVERT I2 + O1=4 ;BOTTLE + IF I2<>O1 THEN @L1100 + GOSUB @L14000 ;CHECK OBJECT CARRIED + IF R1<4 THEN L7300 + IF R1=70 THEN L7300 ;RESERVOIR + IF R1=73 THEN L7300 ;LITTLE PIT + IF R1=71 THEN L7300 ;MAG CAVERN + IF R1=90 THEN L7350 ;OIL WELL + MESSAGE 69 ;NO FLUIDS + GOTO @L1000 +.L7300 ; FILL WITH WATER + MESSAGE OK ;>>MIKE 23/6/86 + F1=C1 + GOTO @L1000 +.L7350 ; FILL WITH OIL + MESSAGE OK ;>>MIKE 23/6/86 + F1=C2 + GOTO @L1000 +;----- +.L7500 ; EMPTY + GOSUB @L5300 ;CONVERT I2 + O1=4 + IF O1<>I2 THEN @L1100;DON'T UNDERSTAND + GOSUB @L14000 ;CHECK O1 CARRIED + IF F1=C1 THEN L7600 + IF F1=C2 THEN L7800 + MESSAGE 70 ;ALREADY EMPTY + GOTO @L1000 + ; +.L7600 ; WATER + IF F1<>C1 THEN L7930 ;HAVE NONE + IF R1<>92 THEN L7720 + IF F6=C0 THEN L7660 ;PLANT STATUS + IF F6=C1 THEN L7690 + MESSAGE 74 ;SHRIVELS + F6=C0 + LIST1(92)=C9 ;KILL ROOM STATUS + GOTO L7730 +.L7660 MESSAGE 72 ;PLANT GROWS + F6=C1 + GOTO L7730 +.L7690 MESSAGE 73 ;PLANT FINISHES GROWS + F6=C2 + LIST1(92)=C1 ;SET ROOM STATUS + GOTO L7730 +.L7720 MESSAGE 21 ;WATER ON GROUND +.L7730 F1=C0 ;BOTTLE EMPTY + GOTO @L1000 + ; +.L7800 ; OIL + IF F1<>C2 THEN L7930 ;NO OIL + IF R1<>107 THEN L7850 + MESSAGE 75 ;GATE OPENS + LIST1(107)=C1 + LIST1(71)=C1 + GOTO L7730 +.L7850 IF R1<>92 THEN L7880 + MESSAGE 76 ;PLANT+OIL + GOTO L7730 +.L7880 MESSAGE 22 ;OIL ONGROUND + GOTO L7730 +;----- +.L7900 ; POUR WATER/OIL + X1=LIST3(4) + IF X1=C8 THEN L7950 +.L7930 MESSAGE 71 ;HAVEN'T GOT ANY + GOTO @L1000 +.L7950 IF I2=29 THEN L7980 ;WATER + IF I2<>28 THEN @L1100 ;NOT OIL + IF F1<>C2 THEN L7930 + GOTO L7800 +.L7980 IF F1<>C1 THEN L7930 + GOTO L7600 +;----- +.L8000 ; ATTACK + GOSUB @L31000 ;DIE IN REPOSITORY + IF I2<>42 THEN L8100 ;BIRD + X1=LIST3(7) + IF X1<>R1 THEN @L1450 + MESSAGE 26 ;BIRD DIES + LIST3(7)=C9 ;AND VANISHES + GOTO @L1000 + ; +.L8100 IF I2<>73 THEN L8200 ;SNAKE + IF R1<>52 THEN @L1450 ;KINGS +.L8120 X1=LIST1(R1) + IF X1<>C0 THEN @L1450 + MESSAGE 33;Dont bother attacking snake + GOTO @L1000 + ; +.L8200 IF I2<>72 THEN L8300 ;DRAGON + IF R1<>68 THEN @L1450 ;SECRET NS +.L8220 X1=LIST1(R1) + IF X1<>C0 THEN @L1450 + +.ASKDRAGON ;>> + MESSAGE 693 ;>>With bare hands ? + GOSUB @ASKINPUT ;>> + IF RESULT=FALSE THEN ASKDRAGON ;>> + IF I1=INO THEN @L1000 ;>> + IF I1=INORTH THEN @L1000 ;>> + IF I1<>IYES THEN ASKDRAGON ;>> + + MESSAGE 38 ;KILL DRAGON WITH BARE HANDS + LIST1(R1)=C1 + LIST3(23)=R1 + GOTO @L1000 + ; +.L8300 IF I2<>47 THEN L8400 ;BEAR + X1=LIST3(12) + IF X1=C8 THEN L8340 + IF X1<>R1 THEN @L1450 +.L8340 MESSAGE 49 ;BEAR DODGES + GOTO @L1000 + ; +.L8400 IF I2<>69 THEN L8500 ;DWARF + IF D4=C0 THEN @L1450 +.L8420 MESSAGE 78 ;DWARVES EVADE YOU + D3=C1 + GOTO @L1000 + ; +.L8500 IF I2<>C0 THEN @L1250;CAN'T + IF R1=52 THEN L8120 + IF R1=68 THEN L8220 + IF D4<>C0 THEN L8420 + GOTO @L1450 + ; +.L8600 ; READ +; IF I2=?? THEN @EXAMINE ;>>MIKE 18/8/86 + IF I2<>55 THEN @L1250;CAN'T + X1=LIST3(20) ;MAG + IF X1<>C8 THEN @L1400;DON'T HAVE IT + MESSAGE 79 ;magazine message + GOTO @L1000 + ; +.L8700 ; SCORE + MESSAGE 80 ;If you were to stop now, + GOSUB L9000 ;CALCULATE SCORE + PRINT S4 + MESSAGE 81 ;OUT OF A MAX OF 350 + GOTO @L1000 +;----- +.L9000 ; SCORING + S4=30 + X1=D1 ;NUMDIE + ADD X1,X1 ;X1:=D1*10 + X2=X1 + ADD X2,X2 + ADD X2,X2 + ADD X2,X1 + SUB S4,X2 + ; + IF S1<>C1 THEN L9130 + X1=30;TO MISTS + ADD S4,X1 +.L9130 ; + IF S2<>C0 THEN L9170 + X1=9 ;HE QUIT + ADD S4,X1 +.L9170 ; HAS ENDGAME CLOCK BEEN STARTED? + IF T2=C0 THEN L9210 + X1=50 + ADD S4,X1 +.L9210 X1=LIST3(20) ;MAGAZINE + IF X1<>77 THEN L9240 ;WITT'S END + X1=5 + ADD S4,X1 +.L9240 ; HAS HE SAVED/RESTORED?1 LESS IF SO + ADD S4,S6 + ; ADD ENDGAME SCORE (IF ANY) + ADD S4,S3 + ; + ; NOW THE TREASURES + ; 5 POINTS FOR SEEING EACH + ; 10 FOR TAKING BACK TO BUILDING + X1=C1 +.L9340 X2=LIST4(X1);VALUE + IF X2=C0 THEN L9440 + X2=LIST5(X1) ;HAS IT BEEN FOUND ? + IF X2=C0 THEN L9440 + IF X1>28 THEN L9400 ;NO FOUND FOR CROWNS + X3=5 + ADD S4,X3 +.L9400 + X2=LIST3(X1) ; list3 is always within range + IF X2=C8 THEN L9420 ;CARRIED + IF X2<>14 THEN L9440 ;BUILDING +.L9420 X3=10 + IF X1<30 THEN L9430 + X3=50 ;SCORE FOR CROWN JEWELS +.L9430 ADD S4,X3 +.L9440 ADD X1,C1 + IF X1<33 THEN L9340 + ; HAS HE FREED THE ELVES? + X3=100 + IF E2=C0 THEN L9464 + ADD S4,X3 +.L9464 IF E5=C0 THEN L9466 + ADD S4,X3 +.L9466 IF E6=C0 THEN L9468 + ADD S4,X3 +.L9468 IF E4=C0 THEN L9470 ;ELVEN KING ? + ADD S4,X3 +.L9470 ; + GOSUB @L30000;CALCULATE RATING + RETURN + +;----- + +.L9500 ; QUIT + MESSAGE 83;REALLY QUIT? +;>> INPUT I1 I2 I3 I4 + GOSUB @ASKINPUT ;>> + IF RESULT=FALSE THEN L9500 ;>> + IF I1=INORTH THEN @ENDCOMMAND ;North + IF I1=INO THEN @ENDCOMMAND ;No + IF I1=IYES THEN @ABORTGAME ;Play again + MESSAGE 2312;YES OR NO! + GOTO L9500 + +;----- + +;>>.L9500 ; QUIT +;>> MESSAGE 83 ;Really want to quit now ? +;>>.L9512 +;>> GOSUB @CLEARINPUT ;>> +;>> GOSUB GETI1I2I3I4 ;>> INPUT I1 I2 I3 I4 +;>> GOSUB @L18000 ;GET YES/NO RESPONSE +;>> IF Y1=C2 THEN L9512 +;>> IF Y1=C0 THEN @L1000 ;NO +;>> ;MUST BE YES +;>> S2=C1 ;HE QUIT +;>> GOTO @L1700 ;SCORE+STOP + +;----- + +.L9600 ; PLUGH +;>>MIKE 9/7/86 GOSUB @SAVEOOPS ;>> + GOSUB @L31000 ;DIE IN REPOSITORY + IF T2>C0 THEN L9670 + IF R1<>14 THEN L9640 ;BUILDING + R1=55 +.L9630 + GOTO @L4000 ;DESCRIBE +.L9640 IF R1<>55 THEN L9670 ;Y2 + R1=14 + GOTO L9630 +.L9670 MESSAGE 23 ;Nothing happens + GOTO @L1000 + ; +.L9700 ; XYZZY + GOSUB @L31000 ;DIE IN REPOSITORY + IF T2>C0 THEN L9670 + IF R1<>14 THEN L9740 ;BUILDING + R1=28 + GOTO L9630 +.L9740 IF R1<>28 THEN L9670 ;DEBRIS ROOM + R1=14 + GOTO L9630 + ; +.L9800 ; PLOVER + GOSUB @L31000 ;DIE IN REPOSITORY + IF T2>C0 THEN L9670 ;ENDGAME + R3=R1 + IF R1<>55 THEN L9840 ;Y2 + R1=18 + GOTO L9860 +.L9840 IF R1<>18 THEN L9670 ;NOTHING HAPPENS + R1=55 +.L9860 R2=C8 + O1=LIST3(13) ;PYRAMID + GOSUB L11000 ;DROP TRASURE + LIST3(13)=O1 + GOTO L9630 + ; SET UP CONSTANTS + C1=1 + C2=2 + C8=255 + C9=C0 + RETURN +;----- +.L11000 ; ALL OBJECTS CARRIED GO TO R2 + ; TREASURE GOES TO R3 + ; RETURNS N3=NO. OF TREASURES + ; RETURNS N4=NO. OBJECTS,ALLOWING FOR + ; BIRD + ; RETURNS N5=TOTAL NO. CARRIED + X1=C1 + N3=C0 + N4=C0 +.L11070 IF X1=7 THEN L11150 ;BIRD + X2=LIST3(X1) ; list3 is always within range + IF X2<>C8 THEN L11150 + X2=LIST4(X1) ;VALUE OF OBJECT + IF X2=C0 THEN L11140 ;WORTHLESS + ADD N3,C1 ;ANOTHER TREASURE + LIST3(X1)=R3 + GOTO L11150 +.L11140 ADD N4,C1 ;ANOTHER OBJECT + LIST3(X1)=R2 +.L11150 ADD X1,C1 + IF X1<33 THEN L11070 + N5=N3 + ADD N5,N4 + RETURN +;----- +.L12000 ; IF LIGHT IN R1,L3=1 + ; IF LIGHT IN R2,L4=1 + R3=R1 + GOSUB L12500 + L3=L6 + R3=R2 + GOSUB L12500 + L4=L6 + RETURN + ; +.L12500 ; CHECK IF LIGHT IN R3,L6=1 + IF R3<26 THEN L12600 ;NATURALLY LIGHT + IF R3>225 THEN L12600 ;NATURALLY LIGHT + IF R3<166 THEN L12520 + IF R3<169 THEN L12600 ;NATURALLY LIGHT +.L12520 L6=LIST3(C2) ;LAMP + IF L6=C8 THEN L12590 + IF L6=R3 THEN L12590 + ; NO LAMP +.L12560 ; ROOM DARK + L6=LIST3(28) ;PENTACLE + IF L6=C8 THEN L12610 +.L12570 L6=C0 + RETURN +.L12590 IF L1=C0 THEN L12560 ;LIGHT OFF +.L12600 ; ROOM IS LIGHT (HOORAY !) + L6=LIST3(28) ;PENTACLE + IF L6=C8 THEN L12570 ;ROOM DARK +.L12610 L6=C1 + RETURN +;----- +.L13000 ; MESSAGE DESCRIPTION OF OBJECT X1 + ; IN ROOM R3 + R2=LIST3(X1) ; prbably always in range + IF R2=R3 THEN L13050 + RETURN +.L13050 LIST5(X1)=C1 ;OBJECT HAS BEEN SEEN + ;X4=550;OBJECTS WHEN CARRIED + ;IF R3=C8 THEN L13056 + ;X4=585;OBJECTS ON GROUND +.L13056 IF F2=C0 THEN L13150 ;CAGE EMPTY + IF X1=7 THEN L13080 ;BIRD + IF X1<>5 THEN L13150 + RETURN;NO DESC FOR OCCUPIED CAGE +.L13080 X4=631 ;BIRD IN CAGE ON FLOOR + IF R3<>C8 THEN L13110 + X4=630 ;IN HAND +.L13110 GOTO L13650 + ; +.L13150 IF X1<>12 THEN L13250 ;BEAR + IF F3=C0 THEN L13600 ;NOTHING SPECIAL + X4=632 + ADD X4,F3 + GOTO L13650 ;MESSAGE DESC + RETURN + ; +.L13250 ; MING VASE ON THE PILLOW + IF X1=17 THEN L13300 ;VASE + IF X1=16 THEN L13300 ;PILLOW + GOTO L13400 + ; +.L13300 X2=LIST3(17) ;VASE ROOM + X3=LIST3(16) ;PILLOW ROOM + IF X2<>X3 THEN L13600 ;NO SPECIAL + IF X2=C8 THEN L13600 + IF X1=16 THEN L13660 ;NO DESC FOR PILOW + X4=635 ;VASE ON PILLOW + GOTO L13650 +.L13400 ; BOTTLE + IF X1<>4 THEN L13500 + X4=636 ;CARRIED + IF R2=C8 THEN L13440 + X4=639 ;ON GROUND +.L13440 ADD X4,F1 ;CONTENTS OF BOTTLE + GOTO L13650 + ; +.L13500 ; LAMP +.L13600 ; MESSAGE 'NORMAL' DESCRIPTION + X4=550;OBJECTS WHEN CARRIED + IF R3=C8 THEN L13640 + X4=585;OBJECTS ON GROUND +.L13640 ADD X4,X1 ;CALCULATE DESCRIPTION NO. +.L13650 MESSAGE X4 + MESSAGE DOTCR ;>> 12 ;CR +.L13660 RETURN + ; +;----- +.L14000 ; CHECK OBJECT O1 IS CARRIED + IF O1>LIST3MAX THEN @SILLY ;>>MIKE 27/8/86 + O2=LIST3(O1) + IF O2<>C8 THEN @L1400 ;DONT HAVE IT + RETURN +;----- +.FEEDBEAR ;>>> + I2=47 ;>>> + +.L15000 ; FEED + X1=LIST3(3) ;FOOD + IF X1=C8 THEN L15050 + MESSAGE 71 ;HAVEN'T GOT ANY + GOTO @L1000 +.L15050 + IF I2=72 THEN L15100 ;DRAGON + IF I2=73 THEN L15150 ;SNAKE + IF I2=42 THEN L15200 ;BIRD + IF I2=47 THEN L15250 ;BEAR + IF I2=38 THEN L15250 ; FEED FOOD->FEED BEAR >>MIKE 28/8/86 + IF I2<>C0 THEN @L1250;CAN'T + GOTO @L1100 ;DON'T UNDERSTAND + ; +.L15100 X1=LIST1(68) ;DRAGON + IF R1<>68 THEN @L1350 ;NOT HERE +.L15120 IF X1=C1 THEN @L1350 + MESSAGE 37 ;NOT HUNGRY + GOTO @L1000 + ; +.L15150 X1=LIST1(52) ;SNAKE + IF R1<>52 THEN @L1350 ;NOT HERE + GOTO L15120 + ; +.L15200 X1=LIST3(7) ;BIRD + IF X1<>R1 THEN @L1350 ;NOT HERE + MESSAGE 27 ;NOT HUNGRY + GOTO @L1000 + ; +.L15250 ; BEAR + IF R1<>40 THEN @L1350 ;NOT HERE + LIST3(3)=C9 ;FOOD DISAPPEARS + F3=C1 ;BEAR PASSIVE + MESSAGE 84 ;BEAR EATS IT ! + GOTO @L1000 +;----- +.L15400 ; WAVE + IF I2=41 THEN L15500 ;ROD +; IF I2<>C0 THEN L15450 ;SILLY + IF R1=56 THEN L15650 ;WINDOW + IF R1=108 THEN L15650 ;WINDOW +.L15450 +.NOTHINGHAPPENS ;>> + MESSAGE 23 ;NOTHING HAPPENS + GOTO @L1000 + ; +.L15500 ; (WAVE) ROD + O1=6 ;ROD + GOSUB @L14000 ;CHECK IT'S CARRIED + IF R1=195 THEN L15635 + IF R1=197 THEN L15635 + IF R1=58 THEN L15510 + IF R1<>59 THEN L15450 +.L15510 X1=LIST1(58) + IF X1=C0 THEN L15590 + ; BRIDGE THERE + X1=C0 + MESSAGE 31 ;VANISHES +.L15560 LIST1(58)=X1 + LIST1(59)=X1 + GOTO @L1000 +.L15590 ; BRIDGE NOT THERE + X1=C1 + MESSAGE 30 ;BRIDGE APPEARS + GOTO L15560 + ; +.L15635 ; ROD IN ENDGAME AT FISSURE + IF B1=C0 THEN L15645 + B1=C0 + MESSAGE 31 ;VANISHES + GOTO @L1000 +.L15645 B1=C1 + MESSAGE 30 ;APPEARS + GOTO @L1000 +.L15650 ; WINDOW + MESSAGE 36 ;FIGURE WAVES BACK + GOTO @L1000 +;----- +.L15700 ; SESAME ETC. + GOSUB @L31000 ;DIE IN REPOSITORY + MESSAGE 23 ;NOTHING HAPPENS + GOTO @L1000 + ; +.L15800 ; SMASH + GOSUB @L31000 ;DIE IN REPOSITORY + IF I2<>86 THEN @L1250;CAN'T + MESSAGE 85;CAN'T BE REACHED (MIRROR) + GOTO @L1000 + ; +.L15900 ; EAT + IF I2<>38 THEN @L1250;CAN'T + X1=LIST3(3) + IF X1<>C8 THEN L16030 + LIST3(3)=C9 ;GET RID OF FOOD +.L15950 MESSAGE 3 ;THANKS + GOTO @L1000 + ; +.L16000 ; DRINK + X1=LIST3(4) ;BOTTLE + IF X1=C8 THEN L16050 +.L16030 MESSAGE 71 ;HAVEN'T GOT ANY + GOTO @L1000 +.L16050 IF F1=C0 THEN L16030 ;BOTTLE EMPTY + IF F1<>C1 THEN L16100 + IF I2<>29 THEN L16030 ;WATER + F1=C0 + GOTO L15950 ;THANKS +.L16100 IF I2<>28 THEN L16030 ;OIL + MESSAGE 86 ;NO THANKS! + GOTO @L1000 +;----- +.L16200 ; FEE,FIE,FOE,FOO + ;X1=79 + ;SUB I1,X1 + ;IF I1=F7 THEN L16300 + ;MESSAGE 44;GET IT RIGHT + ;F7=0 + ;GOTO L1000 + ; +.L16300 ADD F7,C1 + IF F7<4 THEN @L1000 + ; MOVE EGGS BACK TO GIANT ROOM + F7=C0 + X1=LIST3(15) + IF X1=C8 THEN L16338 + IF X1<>R1 THEN L16340 +.L16338 MESSAGE 647 ;EGGS VANISH +.L16340 X1=95 + LIST3(15)=X1 + IF X1<>R1 THEN L16360 + MESSAGE 646 ;EGGS REAPPEAR +.L16360 GOTO @L1000 +;----- +.L16500 ; GIVE (TO TROLL) + IF R1=93 THEN @L6000 ;THROW + IF R1=32 THEN @L6000 ;THROW + IF R1<>40 THEN L16500A ;>>MIKE 9/7/86 + IF I2=38 THEN @FEEDBEAR ;>> "GIVE FOOD" = "FEED BEAR" +.L16500A + MESSAGE 87 ;TO WHOM ? + GOTO @L1000 +;----- +.L17000 ; BIRD BEING PICKED UP IS AWKWARD + IF I2<>7 THEN L17500 + X1=LIST3(5) ;CAGE + IF X1=C8 THEN L17100 + MESSAGE 24;CAN'T CATCH THE BIRD + GOTO @L1000 +.L17100 X1=LIST3(6) + IF X1=C8 THEN L17200 + F2=C1 + RETURN +.L17200 ; OH DEAR, HE'S GOT THE ROD + MESSAGE 25 ;BIRD FLIES AWAY + GOTO @L1000 +.L17500 IF I2<>12 THEN L17600 ;BEAR + IF F3<>C2 THEN L17550 + MESSAGE 47 ;CAN'T GET NEAR IT + GOTO @L1000 +.L17550 IF F3<>C1 THEN L17600 + MESSAGE 51 ;BEAR CHAINED + GOTO @L1000 +.L17600 IF I2<>5 THEN L17700 ;CAGE + IF F2=C0 THEN L17700 + LIST3(7)=C8 +.L17700 RETURN + +.L18000 ; GET YES/NO RESPONSE + ; IF YES,Y1=1. NO,Y1=0 + Y1=C0 + MESSAGE 12 ;CR + IF I1=75 THEN L18100 ;YES + IF I1=76 THEN L18150 ;NO + IF I1=C1 THEN L18150 ;NO(RTH) + MESSAGE 5 ;DON'T UNDERSTAND + Y1=C2 ;ERROR + RETURN +.L18100 Y1=C1 +.L18150 RETURN + +.L19000 ; RUB + IF I2<>37 THEN L19520 ;NOT LAMP + O1=C2 ;LAMP + GOSUB @L14000 ;CHECK LAMP CARRIED + MESSAGE 2 ;RUBBING LAMP IS BORING + GOTO @L1000 +.L19500 ; BLAST + IF T2>C0 THEN L19550 +.L19520 MESSAGE 23;NOTHING HAPPENS + GOTO @L1000 +.L19550 IF E1=C1 THEN L19520 + ; GIVE A BONUS FOR BLASTING + S3=20 + MESSAGE 651 ;DYMANITE EXPLODES + R2=LIST3(27) ;DYNAMITE + IF R2=R1 THEN L19800 ;KILLS YOU + IF R2=C8 THEN L19800 + IF R2<>170 THEN L19700 + ; DWARVES ARISE + MESSAGE 652 + MESSAGE 653 ;ROOF KILLS DWARVES + X1=80 ;KILL DWARVES + ADD S3,X1 + GOTO @L24000 ;DEATH +.L19700 ; NOW HOLE IN WALL,ETC. + E1=C1 + X1=180 ;KILLED DWARVES+LIVED! + ADD S3,X1 + MESSAGE 654 ;DWARVES DEAD ETC. + W2=169 ;WATER AT NE END + W3=C1 ;WHICH IS FULL OF WATER + GOTO @L1000 +.L19800 ; SAME ROOM AS DYNAMITE + MESSAGE 652 ;DWARVES WAKE + KILL YOU + MESSAGE 653 ;ROOF KILLS YOU + GOTO @L24000 +.L20000 ; ENDGAME-PICTUREED FROM 1000 + IF T2>C0 THEN L20050 + RETURN +.L20050 ADD T2,C1 + IF T2<>6 THEN L20100 + ; ANOUNCE CLOSING + MESSAGE 632 +.L20090 RETURN +.L20100 IF T2<>20 THEN L20700 + ; NOW WE CATAPULT HIM INTO ENDGAME + ; FIRST ASK HIM + MESSAGE 667 ;ELF APPEARS +.L20113 +;>> INPUT I1 I2 I3 I4 + GOSUB @ASKINPUT ;>> + IF RESULT=FALSE THEN L20113 ;>> + GOSUB @L18000 ;GET YES/NO + IF Y1=C1 THEN L20121 ;YES + IF Y1=C0 THEN L20119 ;NO + GOTO L20113 +.L20119 MESSAGE 668 ;REFUSED ! + GOTO @L1700 ;STOP GAME +.L20121 MESSAGE 669 ;ACCEPTED + ; DROP/KILL TREASURE, + ; OBJECTS INTO SW REPOSITORY + X1=C1 +.L20160 X2=LIST4(X1) ;VALUE + IF X2=C1 THEN L20200 + IF X1=20 THEN L20300;GAZETTE (WIITS END) + X2=170 ;REPOSITORY +.L20190 LIST3(X1)=X2 ; always in range + GOTO L20300 +.L20200 ; TREASURE + X2=LIST3(X1) ; always in range + IF X2<>C8 THEN L20250 + X2=14 ;TO BUILDING IF CARRIED + GOTO L20190 ;DROP IT +.L20250 IF X2=14 THEN L20300 ;IN BUILDING + X2=C0 + GOTO L20190 ;KILL TREASURE IF NOT + ; IN BUILDING +.L20300 ADD X1,C1 + IF X1<28 THEN L20160 + ; NOW KILL BIRD+CAGE,BEAR,BOTTLE + LIST3(7)=C9 ;BIRD + LIST3(5)=C9 ;CAGE + LIST3(12)=C9 ;BEAR + LIST3(4)=C9 ;BOTTLE + ; NOW INTO ENDGAME + R1=170 + ; NOW TELL HIM WHAT'S GOING ON + MESSAGE 644 + ; LAMP HAS NEW BATTERIES NOW + L2=C8 + L1=C1 + GOTO @L1010 ;INPUT CLEAR STACK +.L20700 IF E1=C0 THEN L20090 ;NO WATER YET + GOSUB L22000 ;CHECK IF HE DROWNS + IF W4=C0 THEN L20710 + IF W5=C0 THEN L20710;NOT WATERED BEFORE + MESSAGE 658 ;DROWNS + GOTO @L24000 ;DIES +.L20710 ; NOW THE WATER STARTS TO RISE + IF W2=197 THEN L20910 ;STOPPED RISING + ADD W3,C1 + IF W3C2 THEN L20850 + X1=R1 + SUB X1,C1 + IF X1<>W2 THEN L20850 + ; ROOM NEXT DOOR IS FLOODED + MESSAGE 655 + RETURN +.L20850 GOSUB L22000 ;W4=1 IF DROWNING LIKELY + IF W4=C0 THEN L20900 + MESSAGE 656 ;ROOM FULL OF WATER + RETURN +.L20900 IF W2C0 THEN L21200 ;IN ENDGAME + ; IF SO, START ENDGAME CLOCK + X1=C1 +.L21030 X2=LIST4(X1) ;VALUE + IF X2=C0 THEN L21100 ;WORTHLESS + X2=LIST5(X1) ;HAS IT BEEN FOUND? + IF X2=C0 THEN L21200 ;NO +.L21100 ADD X1,C1 + IF X1<28 THEN L21030 + ; GOT THEM ALL !!! + T2=C1 +.L21200 RETURN +.L22000 ; W4=1 IF DROWNING LIKELY + W4=C0 + IF W2C2 THEN L22100 + W4=C1 +.L22100 RETURN +.L23000 ; 'LOCK' + IF E3=C1 THEN @L1250 + X1=LIST3(C1) ;KEYS + IF X1=C8 THEN L23050 + MESSAGE 19 ;NOKEYS + GOTO @L1000 +.L23050 IF I2<>91 THEN @L1250;CAN'T + IF R1<>199 THEN @L1350 ;NOT SEEN + E3=C1 + MESSAGE 18 ;SHUTS + GOTO @L1000 +.L24000 ; ENDGAME DEATH + GOTO @L1700 +.L24500 ; LAVA BLOWS UP + W3=C2 ;WATER LEVEL + IF E3=C1 THEN L24600 + MESSAGE 660 ;DIES IN BLAST + GOTO L24000 ;DEATH +.L24600 MESSAGE 659 ;SURVIVES BLAST + GOTO @L1010 +.L24700 ; WEB TEARS + MESSAGE 674 ;FALL TO DEATH + GOTO L24000 +.L26000 ; ENDGAME SPECIAL MOVEMENT + IF B1=C0 THEN L26100 ;NO BRIDGE + IF R1<>197 THEN L26020 ;W BANK + IF I1=15 THEN L26010 ;CROSS + IF I1<>C3 THEN L26100 ;EAST +.L26010 R2=195 + RETURN +.L26020 IF R1<>195 THEN L26100 + IF I1=7 THEN L26030 + IF I1<>15 THEN L26100 ;CROSS +.L26030 R2=197 + RETURN +.L26100 ; ENDGAME DOOR + IF R1<>199 THEN L26200 + IF R2<>198 THEN L26200 + IF E3=C1 THEN @L2070 ;NOTPOS +.L26200 ; WEB CAVERN + RETURN +.L27000 ; GOLD (GO) + I1=I2 + I2=I3 + I3=45 ;JEWELRY + GOTO @L690 +.L27500 ; SAY + GOSUB @L31000 ;DIE IN REPOSITORY + IF I2=32 THEN @L9600 ;PLUGH + IF I2=33 THEN @L9700 ;XYZZY + IF I2=34 THEN @L9800 ;PLOVER + MESSAGE 23 ;NOTHING HAPPENS + GOTO @L1000 + ; SPIDER CODE HENCEFORTH +.L28100 ; CAN'T GO UP WEB WHILE SPIDER LIVES + IF R1<>216 THEN L28150 ;NOT WEB + IF S5=C0 THEN L28150 ;SPIDER GONE + IF R2<>219 THEN L28150 + IF S5=C8 THEN L24700 ;WEB TEARS + MESSAGE 684 ;CAN'T GET PAST SPIDER + GOTO @L1000 +.L28150 RETURN +.L28200 ; THROW JADE SPIDER + IF S5<>C8 THEN @L6040 + IF R1<>209 THEN L28300 ;NOT PINNACLE + ; SPIDER GOES OVER THE SIDE + LIST3(28)=C9 ;KILL JADE SPIDER + S5=C0 ;KILL BIG SPIDER + MESSAGE 685 ;TELL HIM ABOUT IT + GOTO @L1000 +.L28300 ; SPIDER EATS HIM + MESSAGE 686 ;HO HO + GOTO @L24000 ;ENDGAME +.L28400 ; MESSAGE DESCRIPTION FOR SPIDER + IF S5=C8 THEN L28430 + IF R1=S5 THEN L28460 ;? + RETURN +.L28430 MESSAGE 675 ;SPIDER HERE WITH EYES + RETURN +.L28460 X1=LIST3(28) ;SPIDER + IF X1<>C8 THEN L28465 + S5=C8 +.L28465 MESSAGE 671 ;SPIDER HERE + RETURN +.L28500 ; MESSAGE DESCRIPTIONS FOR CHAINED ELVES + IF R1<>193 THEN L28600 + IF E5=C1 THEN L28550 + MESSAGE 688 +.L28550 RETURN +.L28600 IF R1<>194 THEN L28550 + IF E6=C1 THEN L28550 + MESSAGE 688 + RETURN +.L29000 ; SAVE WORKSPACE + S6=C0 + SAVE + GOTO @L1000 +.RESTORE ; RESTORE WORKSPACE + MESSAGE 2328 ; YES or NO please >>MIKE 3/7/86 + GOSUB @ASKINPUT ;>>MIKE 3/7/86 + IF RESULT=FALSE THEN RESTORE ;>>MIKE 3/7/86 + GOSUB @L18000 ;>>MIKE 3/7/86 + IF Y1=0 THEN @L1000 ; NO >>MIKE 3/7/86 + IF Y1<>1 THEN RESTORE ;>>MIKE 3/7/86 + GOSUB @LENSLOK + IF RESULT=FALSE THEN @L1000 + RESTORE + GOTO @AFTERRESTORE ;>> @L4000 +.L30000 ; RETURN RATING IN S7 + IF S4>60 THEN L30200 + S7=676 ;GET BACK TO FARM + RETURN +.L30200 IF S4>120 THEN L30300 + S7=677 ;NOVICE + RETURN +.L30300 IF S4>200 THEN L30400 + S7=678 ;PLAYER + RETURN +.L30400 IF S4>350 THEN L30500 + S7=679 ;GOOD PLAYER + RETURN +.L30500 IF S4>750 THEN L30600 + S7=680 ;ADVENTURER + RETURN +.L30600 IF S4>1099 THEN L30700 + S7=681 ;MASTER ADVENTURER + RETURN +.L30700 S7=682 ;GRAND MASTER ADVENTURER + RETURN +.L31000 ; KILL HIM IF IN REPOSITORY + IF W2>168 THEN L31030 + IF R1=170 THEN L31100 + IF R1=169 THEN L31100 +.L31030 RETURN +.L31100 MESSAGE 692 ;NOISE ECHOES + GOTO @L1700 +.L32000 ; HANDLE FEE,FIE PART 1 + IF F7=C0 THEN L32100 + X1=I1 + X2=79 + SUB X1,X2 + IF X1=F7 THEN L32100 + MESSAGE 44 ;GET IT RIGHT DUMMY + F7=C0 ;STACK FEE FLAG + I4=C0 ;KILL INPUT +.L32100 RETURN +;----- +.L32500 ; VOICE AT Y2 + IF R1<>55 THEN L32600 ;Y2 + RANDOM X1 + IF X1>20 THEN L32600 + MESSAGE 35 ;VOICE SAYS PLUGH +.L32600 RETURN +;----- +.L33000 ; HANDLE LAMP GOING OUT + X2=LIST3(C2) ;LAMP ROOM + IF L2<>252 THEN L33040 + L2=256 ;SKIP 254,255 +.L33040 IF L2=C8 THEN L33200 + IF L1<>C1 THEN L33200 + ADD L2,C1 ;LAMP CONTINUES TO DIE + IF L2<>265 THEN L33100 + IF X2<>C8 THEN L33200;NO LAMP + MESSAGE 690 ;LAMP GOING DIM +.L33100 IF L2<>300 THEN L33200 + L1=C0 ;LAMP OFF + L2=254 ;LAMP DEAD + IF X2<>C8 THEN L33200 ;NO LAMP + MESSAGE 691 ;LAMP GOES OUT + GOTO @L659 +.L33200 + RETURN +;----- +.ISOBJECTHERE +; return RESULT=TRUE if OBJECT is on floor in current room + I2=OBJECT ;>> +.IOHI2 + GOSUB @CONVERTI2 ;>> + + GOSUB CHECKFIXEDOBJECT ;>> + IF RESULT=TRUE THEN L33200 ;RETURN + + IF I2>LIST3MAX THEN @IOMFALSE ;>>** List 3 is only 33 long (?) + + IF I2=65529 THEN @IOMFALSE + RESULT=LIST3(I2) ;>> + +;>> IF OBJECT> IF OBJECT>MAXOBJECT THEN IOMFALSE +;>>; IF OBJECT>153 THEN IOTUNTAKEABLE +;>> PARSEX2=OBJECT +;>> PARSEX1=35 +;>> SUB PARSEX2,PARSEX1 +;>> RESULT=LIST3(PARSEX2) + + IF RESULT=R1 THEN @IOMTRUE +;>> IF RESULT=C8 THEN IOMTRUE ;> Object carried + GOTO @IOMFALSE +; +;----- +; +.CHECKFIXEDOBJECT ;>> +; for things in particular rooms, set PARSEX1=ROOM, and jump to CHECKROOM + IF OBJECT=103 THEN @IOMTRUE ;>>Spider + PARSEX1=32 ;>>Bridge + IF OBJECT=102 THEN CHECKBRIDGE ;>> + PARSEX1=92 ;Plant + IF OBJECT=70 THEN CHECKROOM + PARSEX1=93 ;Troll + IF OBJECT=94 THEN CHECKTROLL + PARSEX1=52 ;Snake + IF OBJECT=73 THEN CHECKSNAKE + PARSEX1=68 ;Dragon + IF OBJECT=72 THEN CHECKDRAGON + PARSEX1=103 ;Clam + IF OBJECT=85 THEN CHECKROOM + PARSEX1=69 ;Mirror + IF OBJECT=86 THEN CHECKROOM + PARSEX1=199 ;Door + IF OBJECT=91 THEN CHECKROOM + PARSEX1=71 ;Gate + IF OBJECT=100 THEN CHECKGATE + PARSEX1=4 ;Grate + IF OBJECT=35 THEN CHECKGRATE + GOTO @IOMFALSE + +.CHECKBRIDGE ;>> + IF B1=C1 THEN @IOMTRUE ;>>Engame bridge + IF R1=58 THEN @IOMTRUE ;>> + IF R1=59 THEN @IOMTRUE ;>> + IF R1=93 THEN @IOMTRUE ;>> + GOTO CHECKROOM ;>> + +.CHECKSNAKE + PARSEX2=LIST1(52) ;Driven off ? + IF PARSEX2=C1 THEN @IOMFALSE + GOTO CHECKROOM + +.CHECKDRAGON + PARSEX2=LIST1(68) ;Killed ? + IF PARSEX2=C1 THEN IOMFALSE + GOTO CHECKROOM + +.CHECKTROLL + PARSEX2=LIST1(93) ;Troll at bridge ? + IF PARSEX2<>C1 THEN IOMFALSE + IF R1=32 THEN IOMTRUE + GOTO CHECKROOM + +.CHECKGRATE + IF R1=17 THEN IOMTRUE + GOTO CHECKROOM + +;.CHECKMIRROR +; IF R1=56 THEN IOMTRUE +; GOTO CHECKROOM + +.CHECKGATE + IF R1=107 THEN IOMTRUE +.CHECKROOM + IF R1=PARSEX1 THEN IOMTRUE + GOTO IOMFALSE + +;----- +;.IOTUNTAKEABLE +; RESULT=LIST1(OBJECT) +; IF RESULT=R1 THEN IOMTRUE +; GOTO IOMFALSE +;----- +.SILLY ;>>MIKE 27/8/86 + IF I2=69 THEN UNWISE ; dwarf + IF I2=72 THEN UNWISE ; dragon + IF I2=73 THEN UNWISE ; snake + MESSAGE 694 ; don't be absurd + GOTO @L1000 +.UNWISE + MESSAGE 695 ; that sounds positively lethal + GOTO @L1000 +;--- +.CONVERTI2 + +; IF I2<>69 THEN NOTDWARF ;>> NICK 15/7/86 +; IF D4=C0 THEN INVALIDOBJECT ;>> NICK 15/7/86 +;.NOTDWARF ;>> NICK 15/7/86 + + IF I2>104 THEN INVALIDOBJECT ;>> + IF I2>101 THEN OBJECTOK ;>> + IF I2=100 THEN OBJECTOK ;gate + IF I2=94 THEN OBJECTOK + IF I2=91 THEN OBJECTOK + IF I2>86 THEN INVALIDOBJECT + IF I2>84 THEN OBJECTOK + IF I2>78 THEN INVALIDOBJECT ;>>** + IF I2> + MESSAGE 2319 ;>> + GOTO @ENDCOMMAND ;>> +;----- +.HELP + IF R1=226 THEN HELPFOREST + IF R1<8 THEN HELPNFOREST + IF R1>12 THEN HELPNFOREST +.HELPFOREST + MESSAGE 1821 ; there is SOMETHING in the forest + GOTO @ENDCOMMAND + +.HELPNFOREST + IF R1<>4 THEN HELPNGRATE + MESSAGE 1822 ; can open the grate + GOTO @ENDCOMMAND + +.HELPNGRATE + IF R1<>52 THEN HELPNSNAKE + MESSAGE 1823 ; snake can be scared off + GOTO @ENDCOMMAND + +.HELPNSNAKE + IF R1<>58 THEN HELPNBRIDGE + MESSAGE 1824 ; magic might help + GOTO @ENDCOMMAND + +.HELPNBRIDGE + IF R1=62 THEN HELPMAZE + IF R1<>60 THEN HELPNMAZE +.HELPMAZE + MESSAGE 1825 ; mazes can be mapped + GOTO @ENDCOMMAND + +.HELPNMAZE + IF R1<>77 THEN HELPNWITT + MESSAGE 1826 ; go south out of Witt's end + GOTO @ENDCOMMAND + +.HELPNWITT + MESSAGE 1820 ; on your own + GOTO @authors ;>>mike 21/9/86 ENDCOMMAND +;--- +;------------------------------------- +;------------------------------------- +;------------------------------------- +;------------------------------------- diff --git a/l9dev/regress/games.l9/colossal.l9/book.txt b/l9dev/regress/games.l9/colossal.l9/book.txt new file mode 100644 index 0000000..49963c8 --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/book.txt @@ -0,0 +1,242 @@ + +; Code for book protection system +; +; Copyright (C) 1986 Level 9 Computing +; +; For Colossal +; +; 2/9/86 +; +; table of comparison words start at 4300 (MATCHOFFSET) + +CONST + MaxChapter=20 + MaxParagraph=12 + MaxWord=8 + MaxAttemptsPerWord=3 + TotalWords=100 + +VAR + CHAPTER + PARAGRAPH +; LINE + WORD + RANDOMSEED + COUNT TESTCOUNT SAVECOUNT + ATTEMPTS + +BEGIN +;.LENSLOK +;.TRYALLWORDS +; TESTCOUNT=1 +;.TAW1 +; COUNT=TESTCOUNT +; GOSUB @GETWORDCOUNT +; IF CHAPTER=0 THEN TAW2 +; COUNT=TESTCOUNT +; GOSUB @DISPLAYWORD +; COUNT=TESTCOUNT +; GOSUB COMPAREPROTECTIONWORD +; IF VALUE=0 THEN TAW1 +;.TAW2 +; ADD TESTCOUNT,C1 +; GOTO TAW1 +;--- +.COMPAREPROTECTIONWORD +; return VALUE=word entered, or zero if failed +.CPWGETWORD + NOMOREINPUT=FALSE + WORDNOTPROCESSED=FALSE + SUPRESSCHECKING=TRUE + GOSUB @GETNEXTWORD + INDEX=0 + GOSUB @READINPUTLIST + IF VALUE=0 THEN CPWGETWORD +.CPW1 + SEARCHTYPE=MATCHTYPE + GOSUB @CHECKTYPEMORE + IF VALUE=0 THEN CPWFAIL + IF VALUE=COUNT THEN CPWOK + GOTO CPW1 +.CPWFAIL + VALUE=0 + SUPRESSCHECKING=FALSE + RETURN +.CPWOK + SUPRESSCHECKING=FALSE + RETURN +;--- +;.TEST +; C1=1 +; TESTCOUNT=1 +;.TEST1 +; COUNT=TESTCOUNT +; GOSUB GETWORDCOUNT +; IF CHAPTER=0 THEN TEST2 ; some problem, so skip over it +; GOSUB @DISPLAYWORD +;.TEST2 +; ADD TESTCOUNT,C1 +; IF TESTCOUNT0 THEN TESTUSER1 + GOSUB GETRANDOMWORD ; only pick a new word on startup, or on success + TESTCOUNT=COUNT + +.TESTUSER1 + ATTEMPTS=0 +; GOSUB GETRANDOMWORD +; TESTCOUNT=COUNT + MESSAGE 4200 ; whatsit appears +.TESTUSER2 + GOSUB @DISPLAYWORD + COUNT=TESTCOUNT + GOSUB @COMPAREPROTECTIONWORD + IF VALUE<>0 THEN TESTUSEROK + ADD ATTEMPTS,C1 + IF ATTEMPTS0 THEN GWC1 +; now get chapter number +.GETCHAPTERNUMBER + GOSUB RANDOM + X2=MAXCHAPTER + GOSUB @X1MODX2 + CHAPTER=X1 + IF CHAPTER=0 THEN GETCHAPTERNUMBER + + GOSUB RANDOM + X2=MAXPARAGRAPH + GOSUB @X1MODX2 + PARAGRAPH=X1 + + GOSUB RANDOM + X2=MAXWORD + GOSUB @X1MODX2 + WORD=X1 +; ok, now check for validity - SPECIAL to different books + IF CHAPTER<>2 THEN NCHAP2 + IF PARAGRAPH>8 THEN CHECKFAIL +.NCHAP2 + IF CHAPTER<>5 THEN NCHAP5 + IF PARAGRAPH>7 THEN CHECKFAIL +.NCHAP5 + IF CHAPTER<>19 THEN NCHAP19 + IF PARAGRAPH>10 THEN CHECKFAIL +.NCHAP19 + RETURN + +.CHECKFAIL + CHAPTER=0 + PARAGRAPH=0 + WORD=0 + RETURN +;--- +.DISPLAYWORD + X1=4210 ; number table + ADD X1,WORD + MESSAGE X1 ; nth + MESSAGE 4201 ; word from the + X1=4210 ; number table + ADD X1,PARAGRAPH + + MESSAGE X1 ; nth + MESSAGE 4203 ; paragraph of chapter + PRINT CHAPTER + MESSAGE 4204 ; ." + RETURN +;--- +.RANDOM +; return X1=random number + X1=RANDOMSEED + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + +; now replace low-order byte with 10. + X2=10 + ADD X1,X2 + + SUB X1,RANDOMSEED + ADD X1,X1 + ADD X1,X1 + ADD X1,RANDOMSEED + X2=1 + ADD X1,X2 + RANDOMSEED=X1 +; and return low-order of seed as a random number + X2=31 + LIST9(X2)=X1 + X1=LIST9(X2) + RETURN +;--- +.X1MODX2 + IF X1>not needed for BOOK protection +;------------------------------------------------ +;------------------------------------------------ +;------------------------------------------------- diff --git a/l9dev/regress/games.l9/colossal.l9/chain.txt b/l9dev/regress/games.l9/colossal.l9/chain.txt new file mode 100644 index 0000000..eb1b7dc --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/chain.txt @@ -0,0 +1,159 @@ +; Lenslok code +; +; 27/05/86 +; + VAR + GAMEOVER ;>> + + BEGIN +;----- + +.SOLVEDPREVIOUS +;For use in SCORE message. + IF C0<>FIRSTPART THEN SOLVED1 ;No previous game ? + + IF GAMESOLVED<>SOLVING THEN SOLVED1 ;>> +;>> IF VERSION<>GAMECOMPLETE THEN SOLVED1 + MESSAGE 2315 ;You have solved the previous game(s) +.SOLVED1 + RETURN +; +;----- + +.ASKFINAL +;Called when current game is complete + +;Second and final parts are continuation of previous parts +;if 'complete' flag already set. + IF C0<>FIRSTPART THEN ASK2A +;>> IF VERSION<>GAMECOMPLETE THEN QUITPLAYAGAIN + IF GAMESOLVED<>SOLVING THEN QUITPLAYAGAIN ;>> +.ASK2 +;If the final part and solved previous parts then win entire trilogy + IF C0<>FINALPART THEN SOLVEDALL + +.ASK2A ;>> + MESSAGE 2313 ;Do you want to SAVE final position ? + GOSUB ASKINPUT + IF RESULT=FALSE THEN ASK2A ;>> +;>> IF RESULT=FALSE THEN ASK2 + IF I1=IYES THEN SAVEFINAL + IF I1=INO THEN QUITPLAYAGAIN + IF I1=INORTH THEN QUITPLAYAGAIN + GOTO ASK2A ;>> +;>> GOTO ASKFINAL +.SAVEFINAL + GAMESOLVED=ENDPOSITION ;>> +;(Don't return to game play after here) +;>>VERSION=GAMECOMPLETE + SAVE + GOTO ASK2A ;>> +;>> GOTO ASKFINAL +.SOLVEDALL + MESSAGE 2316 ;You have solved the entire trilogy + GOTO QUITPLAYAGAIN + +;----- + +.ASKINPUT + GOSUB @CLEARINPUT + GOSUB @GETI1I2I3I4 + IF I1=IRAM THEN ASKIN2 + IF I1=IOOPS THEN ASKIN3 + IF I1=IRESTORE THEN ASKIN1 + RESULT=TRUE + RETURN + +.ASKIN1 + GOSUB @LENSLOK + IF RESULT=FALSE THEN ASKIN4 + RESTORE + IF GAMEOVER=TRUE THEN @STARTGAME ;>>Trap bug on TORCH driver + GOTO @AFTERRESTORE + +.ASKIN2 + NOMOREINPUT=TRUE + GOTO @RAMLOAD + +.ASKIN3 + GOSUB @TRYOOPS + IF RESULT=TRUE THEN @AFTERRESTORE ;>> ENDCOMMAND + +.ASKIN4 + RESULT=FALSE + RETURN + +;----- + +.QUITPLAYAGAIN + GAMEOVER=TRUE ;>> + MESSAGE 2311 ;Quit or Restore ? + GOSUB ASKINPUT + IF RESULT=FALSE THEN QUITPLAYAGAIN + IF I1=IQUIT THEN @STARTGAME + GOTO QUITPLAYAGAIN + +;----- + +.ABORTGAME + MESSAGE 2310 ;Press space + +.WAITFORSPACE ;Variables may be corrupted + C0=0 + C1=1 + C3=3 + LINPUT(C0)=C3 + DRIVER + X1=LINPUT(C1) + IF X1<>32 THEN WAITFORSPACE + GOTO @STARTGAME + +;----- + +.WORDS + SCREEN T + GOTO @ENDCOMMAND + +;----- + +.PICTURES + SCREEN G C0 + LASTPICTURE=0 + GOTO @DESCRIBE ;Re-describe room + +;----- + +.AFTERRESTORE +;After a RESTORE or RAMLOAD or PICTURES + + LASTPICTURE=0 ; >>MIKE 24/6/86 + C0=0 ;>> +;Solved current game of previous game? + IF GAMESOLVED<>ENDPOSITION THEN AFTER2 ;>> + + IF VERSION=GAMECODE THEN @DIE ;>>Solved current game + IF C0<>FIRSTPART THEN AFTER2 ;First part can't be a chain + IF VERSION<>PREVIOUSGAMECODE THEN AFTER2 ;>> +;Solved previous game. +;>> IF VERSION<>PREVIOUSGAMECOMPLETE THEN AFTER2 +;Mark as having solved all previous parts: + CLEAR ;>> + VERSION=GAMECODE ;>> + GAMESOLVED=SOLVING ;>> +;>> VERSION=GAMECOMPLETE + GOTO @RETURNTOSTART + +.AFTER2 +;>> IF VERSION=GAMECOMPLETE THEN @DIE ;Already solved this game ? + + IF VERSION<>GAMECODE THEN WRONGPOSITION ;Wong game restored + IF C1<>1 THEN WRONGPOSITION + IF C2<>2 THEN WRONGPOSITION + IF C3=3 THEN @DESCRIBE +.WRONGPOSITION + MESSAGE 2314 ;Bad restored position + GOTO @ABORTGAME + +;----- +;------------------------------------- +;----------- diff --git a/l9dev/regress/games.l9/colossal.l9/compile.bat b/l9dev/regress/games.l9/colossal.l9/compile.bat new file mode 100644 index 0000000..5f961ae --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/compile.bat @@ -0,0 +1,10 @@ +7 +1aconst.txt +1apconst.txt +1acore.txt +1aparse.txt +1aspecial.txt +1chain.txt +1oops.txt +1book.txt +2340 diff --git a/l9dev/regress/games.l9/colossal.l9/exit.txt b/l9dev/regress/games.l9/colossal.l9/exit.txt new file mode 100644 index 0000000..4bff111 --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/exit.txt @@ -0,0 +1,670 @@ +;New Colossal Advent exits +;MJAustin 1982 +;19:55 on 4/7/82 +;Room 1 +0001 11 14 +0001 1 21 +0001 3 14 +1001 4 2 +;Room 2 +0001 4 3 +0001 3 8 +0000 2 8 +0001 9 8 +1000 7 7 +;Room 3 +0001 4 4 +0000 3 9 +1000 7 10 +;Room 4 +0001 4 5 +0000 3 7 +0010 11 17 +1010 10 17 +;Room 5 +0001 4 6 +0000 7 7 +1000 3 7 +;Room 6 +0000 7 7 +0000 4 255 +0000 13 255 +1000 3 7 +;Room 7 +0000 7 7 +0001 4 166 +0000 3 7 +0001 1 8 +1001 9 166 +;Room 8 +0001 2 9 +1001 1 9 +;Room 9 +0000 1 9 +0000 7 10 +0000 5 9 +0001 3 10 +1000 4 13 +;Room 10 +0000 4 11 +1000 1 10 +;Room 11 +0000 1 226 +0000 9 12 +0000 14 12 +1000 4 13 +;Room 12 +1000 10 10 +;Room 13 +0000 3 8 +0000 4 4 +0000 6 4 +0000 7 2 +0000 8 1 +1000 1 1 +;Room 14 +0001 3 15 +0001 10 41 +1001 14 41 +;Room 15 +0001 3 16 +1000 4 10 +;Room 16 +1000 13 255 +;Room 17 +0001 7 27 +0010 12 4 +1010 9 4 +;Room 18 +1000 2 26 +;Room 19 +1000 13 20 +;Room 20 +1000 0 0 +;Room 21 +0000 7 21 +0000 1 21 +1001 3 22 +;Room 22 +0000 1 22 +1001 3 23 +;Room 23 +0001 4 15 +0001 3 24 +1000 1 25 +;Room 24 +0001 4 16 +0001 1 25 +1000 3 24 +;Room 25 +0000 1 25 +0000 7 23 +1000 3 25 +;Room 26 +1000 4 18 +;Room 27 +1001 7 28 +;Room 28 +1001 7 29 +;Room 29 +1001 7 30 +;Room 30 +1001 7 31 +;Room 31 +1001 10 50 +;Room 32 +1000 2 33 +;Room 33 +0000 7 32 +1001 3 34 +;Room 34 +0000 2 35 +0000 5 38 +1001 10 38 +;Room 35 +0000 4 34 +0001 3 36 +1001 1 37 +;Room 36 +1000 0 0 +;Room 37 +1000 13 255 +;Room 38 +0000 1 34 +0000 4 39 +1001 10 39 +;Room 39 +0001 3 40 +1001 11 40 +;Room 40 +1000 0 0 +;Room 41 +1000 14 14 ; climb ladder back up to surface +;Room 42 +1000 0 0 +;Room 43 +1000 0 0 +;Room 44 +1000 0 0 +;Room 45 +1000 0 0 +;Room 46 +1000 0 0 +;Room 47 +1000 0 0 +;Room 48 +1000 0 0 +;Room 49 +1000 0 0 +;Room 50 +0001 4 51 +0001 7 58 +0000 1 52 +0000 3 31 +1000 14 31 +;Room 51 +1000 0 0 +;Room 52 +0010 4 53 +0010 7 65 +0010 1 54 +0000 3 50 +0010 6 66 +1001 9 50 +;Room 53 +1000 1 52 +;Room 54 +0000 4 52 +0001 1 55 +1001 10 98 +;Room 55 +0001 7 56 +1000 3 57 +;Room 56 +1001 13 255 +;Room 57 +0000 10 55 +1000 9 50 +;Room 58 +0011 15 59 +1011 7 59 +;Room 59 +0001 7 60 +1000 1 60 +;Room 60 +0000 1 59 +0001 7 61 +0000 4 138 +1000 9 146 +;Room 61 +0000 9 60 +0001 7 62 +0000 1 63 +1000 10 63 +;Room 62 +0000 4 146 +1001 1 63 +;Room 63 +0000 7 63 +0001 1 64 +1001 3 65 +;Room 64 +1000 0 0 +;Room 65 +1000 3 52 +;Room 66 +0000 3 52 +0001 7 68 +1001 10 87 +;Room 67 +0001 1 69 +1001 10 106 +;Room 68 +1001 1 67 +;Room 69 +1001 1 70 +;Room 70 +1000 0 0 +;Room 71 +0000 7 74 +1000 9 74 +;Room 72 +0001 10 73 +1001 7 98 +;Room 73 +1000 14 72 +;Room 74 +0000 10 100 +1000 1 71 +;Room 75 +1000 7 78 +;Room 76 +0000 3 77 +0001 9 102 +1000 7 82 +;Room 77 +1000 4 76 +;Room 78 +0000 8 75 +1001 3 18 +;Room 79 +1000 0 0 +;Room 80 +1001 10 81 +;Room 81 +1000 0 0 +;Room 82 +0000 7 104 +0000 1 244 +0000 2 244 +0000 5 244 +0000 4 244 +0000 6 244 +0000 8 244 +0000 9 244 +0000 10 244 +0000 11 244 +0000 12 244 +0000 13 244 +0000 14 244 +1001 3 102 +;Room 83 +1000 0 0 +;Room 84 +1000 0 0 +;Room 85 +0000 1 104 +0000 7 86 +1000 3 87 +;Room 86 +1000 4 85 +;Room 87 +0000 1 85 +1001 4 88 +;Room 88 +1000 0 0 +;Room 89 +0000 10 100 +1000 1 93 +;Room 90 +1000 0 0 +;Room 91 +0001 10 92 +1000 7 106 +;Room 92 +1010 14 94 +;Room 93 +0000 6 89 +0001 2 32 +1001 15 32 +;Room 94 +0000 3 92 +0000 10 92 +1000 7 95 +;Room 95 +0000 4 94 +0001 3 96 +1001 1 107 +;Room 96 +1000 0 0 +;Room 97 +0001 1 109 +0001 4 110 +1000 3 82 +;Room 98 +1001 7 99 +;Room 99 +1001 10 102 +;Room 100 +0000 5 101 +0000 6 89 +1001 1 83 +;Room 101 +0001 1 75 +0000 9 75 +0000 7 100 +1000 5 104 +;Room 102 +0001 1 103 +1000 3 76 +;Room 103 +0001 9 79 +1001 10 80 +;Room 104 +0000 2 82 +0001 4 85 +0001 3 84 +0001 7 105 +1000 8 101 +;Room 105 +0001 10 90 +1001 7 91 +;Room 106 +0000 1 82 +1000 4 91 +;Room 107 +1011 1 71 +;Room 108 +1000 7 109 +;Room 109 +0000 1 108 +1000 5 82 +;Room 110 +1000 10 116 +;Room 111 +1000 0 0 +;Room 112 +1000 0 0 +;Room 113 +1000 0 0 +;Room 114 +1000 0 0 +;Room 115 +1000 0 0 +;Room 116 +0000 4 134 +0000 10 30 +0000 3 139 +1001 1 137 +;Room 117 +1000 0 0 +;Room 118 +0000 1 140 +0001 3 119 +0001 9 117 +0001 10 117 +1000 4 120 +;Room 119 +1000 0 0 +;Room 120 +1000 3 118 +;Room 121 +1000 0 0 +;Room 122 +1000 0 0 +;Room 123 +0000 7 123 +0000 4 123 +0001 3 122 +1000 1 138 +;Room 124 +0000 3 140 +0001 1 121 +0001 10 125 +1000 4 126 +;Room 125 +1000 0 0 +;Room 126 +0000 3 124 +0001 7 127 +0001 9 128 +1000 4 129 +;Room 127 +1000 7 128 +;Room 128 +0000 7 127 +0000 4 130 +1000 3 129 +;Room 129 +0000 7 126 +0001 4 130 +0000 1 135 +0000 3 128 +1001 10 132 +;Room 130 +0000 7 128 +1000 4 131 +;Room 131 +1000 7 130 +;Room 132 +1000 0 0 +;Room 133 +1000 9 135 +;Room 134 +1000 3 116 +;Room 135 +0000 7 129 +0000 10 133 +1001 3 116 +;Room 136 +1000 0 0 +;Room 137 +1001 7 136 +;Room 138 +0001 1 60 +0000 9 60 +0001 3 140 +1000 7 123 +;Room 139 +0000 1 116 +0001 8 115 +1001 7 137 +;Room 140 +0000 4 124 +1000 3 118 +;Room 141 +1000 0 0 +;Room 142 +1000 0 0 +;Room 143 +1000 0 0 +;Room 144 +1000 0 0 +;Room 145 +1000 0 0 +;Room 146 +1000 9 62 +;Room 147 +1000 0 0 +;Room 148 +1000 0 0 +;Room 149 +1000 0 0 +;Room 150 +1000 10 62 +;Room 151 +1000 7 62 +;Room 152 +1000 3 62 +;Room 153 +1000 0 0 +;Room 154 +1000 0 0 +;Room 155 +1000 0 0 +;Room 156 +1000 0 0 +;Room 157 +1000 0 0 +;Room 158 +1000 0 0 +;Room 159 +1000 0 0 +;Room 160 +1000 0 0 +;Room 161 +1000 0 0 +;Room 162 +1000 0 0 +;Room 163 +1000 0 0 +;Room 164 +1000 0 0 +;Room 165 +1000 0 0 +;Room 166 +0001 4 167 +1001 9 167 +;Room 167 +0001 4 168 +1001 9 168 +;Room 168 +1000 0 0 +;Room 169 +0001 7 170 +0001 6 170 +1001 4 170 +;Room 170 +1000 7 252 +;Room 171 +0000 3 170 +1001 7 172 +;Room 172 +1000 0 0 +;Room 173 +0001 3 172 +0001 7 174 +1001 9 175 +;Room 174 +1000 0 0 +;Room 175 +1001 9 176 +;Room 176 +1001 9 177 +;Room 177 +1000 0 0 +;Room 178 +0001 10 177 +1001 9 179 +;Room 179 +0001 7 180 +0000 4 180 +0000 3 183 +1000 1 186 +;Room 180 +0000 4 180 +0000 7 182 +1001 1 182 +;Room 181 +1000 0 0 +;Room 182 +0000 7 182 +0000 1 182 +1000 3 186 +;Room 183 +0000 7 186 +0000 4 187 +0000 3 179 +1001 10 188 +;Room 184 +1000 1 186 +;Room 185 +0000 3 187 +1001 4 187 +;Room 186 +0000 4 180 +0000 3 186 +0000 1 184 +0001 3 185 +0001 4 183 +1000 7 186 +;Room 187 +0000 7 183 +1000 4 179 +;Room 188 +0001 3 189 +1001 7 190 +;Room 189 +1000 0 0 +;Room 190 +0001 1 191 +1001 7 192 +;Room 191 +1000 0 0 +;Room 192 +0001 1 193 +0001 4 194 +1001 7 195 +;Room 193 +1000 0 0 +;Room 194 +1000 0 0 +;Room 195 +1000 0 0 +;Room 196 +1000 0 0 +;Room 197 +1001 7 198 +;Room 198 +1001 7 199 +;Room 199 +1001 9 203 +;Room 200 +1001 9 199 +;Room 201 +1001 9 200 +;Room 202 +1001 9 201 +;Room 203 +1001 9 204 +;Room 204 +1001 9 205 +;Room 205 +1001 9 206 +;Room 206 +1001 9 207 +;Room 207 +1001 9 208 +;Room 208 +1001 9 209 +;Room 209 +1000 0 0 +;Room 210 +0001 1 218 +0001 4 211 +1001 7 206 +;Room 211 +1000 0 0 +;Room 212 +0001 7 211 +1001 3 213 +;Room 213 +1000 0 0 +;Room 214 +0001 1 215 +1001 4 213 +;Room 215 +1000 0 0 +;Room 216 +0001 1 217 +0001 2 215 +0001 3 214 +0001 5 213 +0001 4 212 +0001 6 211 +0001 7 210 +0001 8 218 +1001 9 219 +;Room 217 +0001 7 218 +1001 3 215 +;Room 218 +1000 0 0 +;Room 219 +1001 9 220 +;Room 220 +1001 7 221 +;Room 221 +1001 7 222 +;Room 222 +1001 7 223 +;Room 223 +1001 7 224 +;Room 224 +0001 1 225 +1000 7 227 +;Room 225 +1000 0 0 +;Room 226 +0000 1 9 +0000 3 9 +1000 4 11 +;Room 227 +0000 9 70 +1000 12 70 +;Room 228 +0000 0 0 +;------------------------------------- +;------------------------------------- +;------------------------------------- +;-------------------------- diff --git a/l9dev/regress/games.l9/colossal.l9/license.txt b/l9dev/regress/games.l9/colossal.l9/license.txt new file mode 100644 index 0000000..9c355e1 --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/license.txt @@ -0,0 +1,2 @@ +These files are covered by the license to be found in https://github.com/MikeTheTechie/Level9-Public/blob/main/License.txt +All other rights are reserved. diff --git a/l9dev/regress/games.l9/colossal.l9/oops.txt b/l9dev/regress/games.l9/colossal.l9/oops.txt new file mode 100644 index 0000000..9f1b803 --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/oops.txt @@ -0,0 +1,216 @@ +;'RAM' and 'OOPS' for Converted Trilogies + +;Copyright (C) 1986 Level 9 Computing + +;B:OOPS.TXT + +;----- + +VAR + SAVEL90 + SAVEL91 + SAVEL92 + SAVEL93 + +BEGIN + +;'RAM SAVE or 'RAM LOAD' + +.RAMCOMMAND + VALUE=I2 + IF VALUE=IRESTORE THEN RAMLOAD + +;Otherwise it's a RAM SAVE: + + PARSEX2=C0 ; first position + GOSUB @RAMWRITE +.RAMSAVEEND + IF RESULT<>C0 THEN NOTAVBLE;>>>=C0 THEN @ENDCOMMAND ;>>> ANDY 26/6/86 + MESSAGE OK ;>>> ANDY 26/6/86 + GOTO @ENDCOMMAND ;>>> ANDY 26/6/86 +.NOTAVBLE ;>>> ANDY 26/6/86 + MESSAGE 2300 ;Not available + GOTO @CANCELINPUT + +;'RAM' keyword followed by LOAD/RESTORE + +.RAMLOAD + PARSEX2=C0 ; first position + GOSUB @RAMREAD + IF RESULT<>C0 THEN NOTAVBLE1 ;>>>=C0 THEN @AFTERRESTORE;>>>ANDY 26/6/86 + MESSAGE OK ;>>> ANDY 26/6/86 + MESSAGE CR ;>>> ANDY 26/6/86 + GOTO @AFTERRESTORE ;>>> ANDY 26/6/86 +.NOTAVBLE1 ;>>> ANDY 26/6/86 + MESSAGE 2300 ;Not available + GOTO @CANCELINPUT + +;----- + +.INITOOPS +; count number of oops positions available + LASTOOPSROOM=C0 + OOPSPOSEND=C0 + OOPSPOS=C0 + NEXTOOPSPOS=C0 + NEXTOOPSEND=C0 + + PARSEX2=C1 + GOSUB @RAMWRITE + IF RESULT=C0 THEN INITOOPS1 + + PARSEX2=C0 + GOSUB @RAMWRITE + IF RESULT<>C0 THEN INITOOPSRET ;No RAM SAVE + MESSAGE 2301 ;Only RAM SAVE available + GOTO INITOOPS2 + +.INITOOPS1 + OOPSPOS=C1 + NEXTOOPSPOS=C1 + MESSAGE 2302 ; ram and oops available + +; now go through and write 'certified garbage' to all positions +.INITOOPS2 + C2=65000 ; show that positions are invalid +.INITOOPS3 + GOSUB @RAMWRITE + ADD PARSEX2,C1 + IF RESULT=C0 THEN INITOOPS3 + C2=2 ; restore C2 +.INITOOPSRET + RETURN + +;----- + +.OOPS + GOSUB TRYOOPS + IF RESULT=TRUE THEN @AFTERRESTORE + GOTO @ENDCOMMAND + +.TRYOOPS +; OOPSPOS points to next free position in ram save area +; go back some positions if they are available + IF OOPSPOS<>C0 THEN OOPS1 + MESSAGE 2300 ;Not available + RESULT=FALSE + RETURN + +.OOPS1 + IF OOPSPOS<>C1 THEN OOPS3 +; have gone to position 0, so need to wrap round to end of ram area + IF OOPSPOSEND<>C0 THEN OOPS2 + + MESSAGE 2304 ;No OOPS position found + RESULT=FALSE + RETURN + +.OOPS2 + OOPSPOS=OOPSPOSEND ; first invalid position + +.OOPS3 + OOPSFL=1 ; >> ANDY 26/6/86 + SUB OOPSPOS,C1 + PARSEX2=OOPSPOS + GOSUB RAMREAD + NOMOREINPUT=TRUE + RESULT=TRUE + RETURN + +;----- + +.SAVEOOPS +; OOPSPOS points to the next free position in ram save area +; this routine called on EVERY movement +; try writing to current position + + IF OOPSPOS=C0 THEN SAVEOOPSRET ;OOPS not available + + LASTOOPSROOM=R1 + NEXTOOPSPOS=OOPSPOS + NEXTOOPSEND=OOPSPOSEND + +.SAVEOOPS1 + PARSEX2=NEXTOOPSPOS + GOSUB RAMWRITE + IF RESULT=C0 THEN SAVEOOPSOK ; fine, inc pointer and finish +; something went wrong. +; if we are in the first position, tell the user +; that it is not available here + IF NEXTOOPSPOS<2 THEN SAVEOOPSRET ; keep quiet, ignore the error +; ok, so have some saved positions. Rotate round cyclically + NEXTOOPSEND=NEXTOOPSPOS ; save first invalid position + NEXTOOPSPOS=C1 + GOTO SAVEOOPS1 + +.SAVEOOPSOK + ADD NEXTOOPSPOS,C1 +.SAVEOOPSRET + RETURN + +;----- + +.OOPSCHECK + IF R1=LASTOOPSROOM THEN SAMEROOM + OOPSPOS=NEXTOOPSPOS + OOPSPOSEND=NEXTOOPSEND + LASTOOPSROOM=R1 +.SAMEROOM + RETURN + +;----- + +.RAMREAD + PARSEX1=23 ; code for ramload + GOSUB RAMOPERATION + IF C2<>2 THEN RAMERROR ;Do not use C2. Check for corrupted variables + RETURN + +.RAMERROR + IF OOPSFL<>1 THEN RAMERROR1 + MESSAGE 2304 ; >> Can't Oops back any further: ANDY 26/6/86 + OOPSFL=0 ; >> ANDY 26/6/86 + GOTO @ABORTGAME ; >> ANDY 26/6/86 +.RAMERROR1 ; >> ANDY 26/6/86 + MESSAGE 2303 ; Must RAM SAVE first + GOTO @ABORTGAME + +;----- + +.RAMWRITE + PARSEX1=22 ; code for ramsave +; drop through to RAMOPERATION + +.RAMOPERATION +; write to position PARSEX2, return RESULT=0 if OK + SAVEL90=LINPUT(C0) ;>> + SAVEL91=LINPUT(C1) ;>> + SAVEL92=LINPUT(C2) ;>> + SAVEL93=LINPUT(C3) ;>> + + LINPUT(C0)=PARSEX1 + LINPUT(C1)=PARSEX2 ; position number + LINPUT(C2)=C0 + DRIVER + C0=0 ;In case variables are corrupted. + RESULT=LINPUT(C0) + +;Now restore LIST 9. However variables may have been corrupted. + LINPUT(0)=SAVEL90 ;>> +; C1=1 ;>> +; ADD C0,C1 ;>> + LINPUT(1)=SAVEL91 ;>> (C0=1) +; ADD C0,C1 ;>> + LINPUT(2)=SAVEL92 ;>> (C0=2) +; ADD C0,C1 ;>> + LINPUT(3)=SAVEL93 ;>> (C0=3) +; C0=0 ;>> + RETURN +; +.NOTAVAILABLE + MESSAGE 2300 ;Feature not implemented + RETURN + +;----- +;------------------------------------- +;--------------- diff --git a/l9dev/regress/games.l9/colossal.l9/ref/table.dat b/l9dev/regress/games.l9/colossal.l9/ref/table.dat new file mode 100644 index 0000000..2c08c06 Binary files /dev/null and b/l9dev/regress/games.l9/colossal.l9/ref/table.dat differ diff --git a/l9dev/regress/games.l9/colossal.l9/st.l9/gamedata.dat b/l9dev/regress/games.l9/colossal.l9/st.l9/gamedata.dat new file mode 100644 index 0000000..b5e9bc9 Binary files /dev/null and b/l9dev/regress/games.l9/colossal.l9/st.l9/gamedata.dat differ diff --git a/l9dev/regress/games.l9/colossal.l9/st.l9/ref/gamedata.dat b/l9dev/regress/games.l9/colossal.l9/st.l9/ref/gamedata.dat new file mode 100644 index 0000000..b5e9bc9 Binary files /dev/null and b/l9dev/regress/games.l9/colossal.l9/st.l9/ref/gamedata.dat differ diff --git a/l9dev/regress/games.l9/colossal.l9/st.l9/ref/squash.dat b/l9dev/regress/games.l9/colossal.l9/st.l9/ref/squash.dat new file mode 100644 index 0000000..2b04d07 Binary files /dev/null and b/l9dev/regress/games.l9/colossal.l9/st.l9/ref/squash.dat differ diff --git a/l9dev/regress/games.l9/colossal.l9/st.l9/squash.dat b/l9dev/regress/games.l9/colossal.l9/st.l9/squash.dat new file mode 100644 index 0000000..2b04d07 Binary files /dev/null and b/l9dev/regress/games.l9/colossal.l9/st.l9/squash.dat differ diff --git a/l9dev/regress/games.l9/colossal.l9/table.dat b/l9dev/regress/games.l9/colossal.l9/table.dat new file mode 100644 index 0000000..2c08c06 Binary files /dev/null and b/l9dev/regress/games.l9/colossal.l9/table.dat differ diff --git a/l9dev/regress/games.l9/colossal.l9/table.txt b/l9dev/regress/games.l9/colossal.l9/table.txt new file mode 100644 index 0000000..cce0d82 --- /dev/null +++ b/l9dev/regress/games.l9/colossal.l9/table.txt @@ -0,0 +1,88 @@ +;LIST INITIAL VALUES +; for COLOSSAL +;Copyright (C) 1982 MJ.Austin. +; 18:40 on 23/5/86 +; + ORG 0 +start + dc.l $8000 + dc.l LIST2-start-1 + dc.l $8070 + dc.l LIST4-start-1 + dc.l $8093 ;>> $8091 + dc.l 0 ;LIST 6 + dc.l $8140 ; LIST 7 + dc.l $8180 ; LIST 8 + dc.l $81C0 ; LIST 9 + dc.l LASTPTR-start +; +LIST2 + dc.b 14 ;KEYS + dc.b 14 ;LAMP + dc.b 13 ;FOOD + dc.b 14 ;BOTTLE + dc.b 27 ;CAGE + dc.b 28 ;ROD + dc.b 30 ;BIRD + dc.b 51 ;GOLD + dc.b 54 ;SILVER + dc.b 53 ;JEWELRY + dc.b 59 ;DIAMONDS + dc.b 40 ;BEAR + dc.b 26 ;PLATINUM PYRAMID + dc.b 18 ;EGG JEWEL + dc.b 95 ;EGGS + dc.b 84 ;PILLOW + dc.b 101 ;MING VASE + dc.b 71 ;TRIDENT + dc.b 0 ;PEARL + dc.b 76 ;MAGAZINE + dc.b 41 ;COINS + dc.b 0 ;CHAIN + dc.b 0 ;RUG + dc.b 0 ;CHEST + dc.b 36 ;SPICES + dc.b 0 ;AXE + dc.b 170 ;DYNAMITE + dc.b 202 ;JADE SPIDER + dc.b 202 ;ELIXIR + dc.b 218 ;ORB + dc.b 215 ;SCEPTRE + dc.b 213 ;CROWN +;--------- +;NOW OBJECT VALUE +LIST4 + dc.b 0 + dc.b 0 + dc.b 0 + dc.b 0 + dc.b 0 + dc.b 0 + dc.b 0 + dc.b 1 ;GOLD + dc.b 1 + dc.b 1 + dc.b 1 + dc.b 0 + dc.b 1 + dc.b 1 + dc.b 1 + dc.b 0 + dc.b 1 + dc.b 1 + dc.b 1 + dc.b 0 + dc.b 1 + dc.b 1 + dc.b 1 + dc.b 1 + dc.b 1 + dc.b 0 + dc.b 0 + dc.b 0 ;JADE SPIDER + dc.b 0 ;ELIXIR + dc.b 1 ;ORB + dc.b 1 ;SCEPTRE + dc.b 1 ;CROWN +;-------- +LASTPTR diff --git a/l9dev/regress/games.l9/eden.l9/acode.acd b/l9dev/regress/games.l9/eden.l9/acode.acd new file mode 100644 index 0000000..19291ab Binary files /dev/null and b/l9dev/regress/games.l9/eden.l9/acode.acd differ diff --git a/l9dev/regress/games.l9/eden.l9/aconst.txt b/l9dev/regress/games.l9/eden.l9/aconst.txt new file mode 100644 index 0000000..53e7e00 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/aconst.txt @@ -0,0 +1,48 @@ + +; DUNGEON VARIABLES MODIFIED FROM VERSION 24/8/84 +; 28/2/86 M.J.Austin +CONST + WHATNOW=28 + +VAR + VERSION ;>> Must be first variable + GAMESOLVED ;>>Must be second + A0 A1 A5 A6 A7 A8 A9 + B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 + C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 + D1 D2 D4 D5 D8 D9 + E1 E2 E3 E4 E5 + F0 + G0 G1 G2 + H0 + I1 I2 I3 I4 I5 I6 I7 I8 + K1 + L0 L1 L3 + M0 M1 M2 M3 M4 + O1 O2 O3 O4 O5 + P0 P1 P3 P4 P5 P9 + R0 R1 R2 R3 R5 R6 R7 + S1 S2 S3 S4 S5 S6 S9 + T0 T1 T2 T3 T4 T7 T8 T9 + U0 U1 U2 U3 + V0 V1 V2 V3 + W0 W1 W4 W5 W7 W9 + X0 X1 X2 X3 X4 X5 + Y1 + OOPSPOS + NEXTPOSEND + ; + +TABLE + LIST1=1 + LIST2=2 + LIST3=3 + LIST4=4 + LIST5=5 + LIST6=6 + LIST7=7 + LIST8=8 + LIST9=9 +;------------------------------------------------ +;-------------------------------------------------- +;-------------------------------------------------------- diff --git a/l9dev/regress/games.l9/eden.l9/acore.txt b/l9dev/regress/games.l9/eden.l9/acore.txt new file mode 100644 index 0000000..b54b5d7 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/acore.txt @@ -0,0 +1,407 @@ +;Parser for Triligy Conversions + +;Copyright (C) 1986 Level 9 Computing + +;B:ACORE.TXT + +VAR + DESCRIPTIONMODE WHEELFOUND + +BEGIN + GOTO @STARTGAME +;--- +;.DESCRIBEROOM +; LASTWORDPRINTED=DISABLEIT ; prevent printing of 'it' +; GOSUB @POSITIONSHADOWS +; GOSUB @CHECKIFLIGHT +; IF RESULT=TRUE THEN DESCROOPARSEM1 +; MESSAGE 2108 ; It's dark +; LASTPICTURE=0 +; CLS G ; clear graphics window +; +; RETURN +; +;.DESCROOPARSEM1 +; +; GOSUB @SPECIALPLAYER +; GOSUB @SETUPROOM +; SEARCHPOS=ROOM +; HISEARCHPOS=0 +; +; PARSEX1=500 ; base for pictures +; ADD PARSEX1,ROOM +; IF PARSEX1=LASTPICTURE THEN DESCROOM2 +; CLS G +; PICTURE PARSEX1 +; LASTPICTURE=PARSEX1 +; +;.DESCROOM2 +; PARSEX1=SHORTROOMDESCS +; ADD PARSEX1,ROOM +; MESSAGE PARSEX1 +; IF DESCRIPTIONMODE=IBRIEF THEN DESCROOM3 +; PARSEX1=LONGROOMDESCS +; ADD PARSEX1,ROOM +; MESSAGE PARSEX1 +;.DESCROOM3 +; MESSAGE DOT +; GOSUB PRINTEXITS +; SEARCHPOS=ROOM +; HISEARCHPOS=0 +; IF WHEELFOUND=TRUE THEN DESCROOM4A ; SPECIAL +; IF ROOM=66 THEN DESCROOM4 ; SPECIAL to Price of Magik +;.DESCROOM4A ; SPECIAL +; GOSUB @PRINTOBJECTS +;.DESCROOM4 ; SPECIAL to Price of Magik +; +; GOSUB DESCPLAYER +; GOSUB @SPECIALDESC +;.DESCROOMRET +; RETURN +;;--- +;.DESCPLAYER +;; Print any special messages for player +;; e.g. 'You are standing on the object' +; PARSEX1=HICURRENTPOS(PLAYER) +; IF PARSEX1=LIEON THEN DESCPLAY0 +; IF PARSEX1=SITON THEN DESCPLAY0 +; IF PARSEX1<>ON THEN DESCPLAY1 +;.DESCPLAY0 +; MESSAGE 370 ; you +; PARSEX2=76 +; ADD PARSEX1,PARSEX2 +; MESSAGE PARSEX1 ; are standing on / sitting on / lying on etc. +; GOTO DESCPLAY5 +;.DESCPLAY1 +; RETURN +;.DESCPLAY5 +; PARSEX1=CURRENTPOS(PLAYER) +; GOSUB @DESCTHEOBJPARSEX1 +; MESSAGE DOT +; RETURN +;;--- +;**.PRINTEXITS +;**; OWTYPE=OWEXITS +;** GOSUB @SETUPROOM ;>> +;** NUMEXITS=0 +;** DIR=1 ; current direction +;** OUTPUTWORD=0 ;>> +;**.PELOOP +;**; PRINT AN EXIT (IF VISIBLE) +;** FROM=ROOM +;** GOSUB @CHECKEXIT +;** WORD1=0 +;** WORD2=0 +;** WORD3=0 +;** WORD4=0 +;** IF EXITVISIBLE=FALSE THEN PENEXTDIR +;** WORD1=VERBOFFSET ;> EXITDESCBASE +;** ADD WORD1,DIR +;**; IF DOOR=0 THEN PENODOOR +;**; WORD2= ; base for door messages +;**; ADD WORD2,DOOROPEN +;**;.PENODOOR +;** ADD NUMEXITS,C1 +;** IF NUMEXITS<>2 THEN PE2 +;** MESSAGE 3020 ; EXITS ARE +;**.PE2 +;**; IF WORD2<>0 THEN PEDESC ; through a door, so don't describe destination +;**; WORD2=* ; to +;**; WORD3=SHORTROOMDESCS +;**; ADD WORD3,DEST +;** +;**;.PEDESC +;** GOSUB OUTWORD12 ;>> 34 +;**.PENEXTDIR +;** ADD DIR,C1 +;** IF DIR 14 +;**.PERET1 +;** IF NUMEXITS>1 THEN PERET2 +;** IF NUMEXITS=0 THEN PERET +;** MESSAGE 3021 ; ONLY EXIT IS +;**.PERET2 +;** WORD1=0 +;** WORD2=0 +;** GOSUB @OUTWORD12 +;**.PERET +;** GOTO @RESETSTACK ;>> RETURN +;--- +;.CHECKIFOBVIOUS +;; see if 'OBJECT' is immediately obvious +; OBVIOUS=TRUE +; PARSEX1=HICURRENTPOS(OBJECT) +; IF PARSEX1=0 THEN CIORET ; things on ground are always obvious +; PARSEX1=CURRENTPOS(OBJECT) +; IF PARSEX1=PLAYER THEN CIORET ; player's contents are obvious +; ADD PARSEX1,PARSEX1 +; ADD PARSEX1,C1 ; look at hi initial position of container +; PARSEX2=OBJECTSTART(PARSEX1) +; IF PARSEX2>127 THEN CIORET ; 'obvious' bit set +; IF SEARCHDEPTH=0 THEN CIORET +; OBVIOUS=FALSE +;; +;.CIORET +; RETURN +;;--- +;.PRINTOBJECTS +;; GO THROUGH CURRENT OBJECT POSITION LIST, +;; AND DISPLAY ALL THE OBJECTS AT (HISEARCHPOS,SEARCHPOS) +; OWTYPE=OWOBJECTS +; GOSUB @INITGETOBJ +; LASTWORDPRINTED=0 +; TOTALOBJECTFOUND=0 +;.PO1 +; GOSUB GETNEXTOBJECT +; IF OBJECT=0 THEN PO1A +; GOSUB CHECKIFOBVIOUS +; IF OBVIOUS=FALSE THEN PO3 +;; +; IF OBJECT>MAXOBJECTVISIBLE THEN PO3 +; IF OBJECT=PLAYER THEN PO3 +; +;.PO1A +; IF NUMOBJECTFOUND<>1 THEN PO2 +; ADD TOTALOBJECTFOUND,C1 +; WORD1=0 +; WORD2=0 +; GOSUB @OUTWORD12 ; output any buffered words +; GOSUB @PRINTCONTAINMENT ; PRINT CONTAINER ON FIRST OBJECT FOUND ONLY +;.PO2 +; WORD1=OBJECT +; WORD2=0 +; GOSUB @OUTWORD12 ; Output object name (delayed effect) +;.PO3 +; IF OBJECT<>0 THEN PO1 +; LASTWORDPRINTED=DISABLEIT +; RETURN +;;--- +;.GETNEXTOBJECT +;; RETURN OBJECT=OBJECT FOUND +;; SEARCHPOS=ROOM OR CONTAINER WHERE FOUND +;; HISEARCHPOS=TYPE OF CONTAINMENT (=0 FOR ROOMS) +;; +;; BEFORE FIRST CALL, MUST SP=0, GOSUB INITGETOBJ AND SETUP HI,SEARCHPOS +;; AT END OF SEARCH, ALL ZEROS ARE RETURNED +;; RETURN NUMOBJECTFOUND=NUMBER OF OBJECT FOUND IN THIS PASS +;; +;; ALSO ADD ON WEIGHT OF THIS OBJECT TO 'WEIGHT' +; PARSEX1=MAXOBJECTVISIBLE ;MAXOBJECT ?? +;.GETNEXTOBJPARSEX1 +; GETNEXT PARSEX1 HISEARCHPOS SEARCHPOS OBJECT NUMOBJECTFOUND SEARCHDEPTH +; IF OBJECT>PARSEX1 THEN GNOERR +;.GNORET +; RETURN +;.GNOERR +; OBJECT=0 +; NUMOBJECTFOUND=0 ; ?? +; RETURN +;;--- +; +;.INITGETOBJ +; SEARCHDEPTH=1 +; PARSEX1=0 +; GETNEXT PARSEX1 PARSEX1 PARSEX1 PARSEX1 PARSEX1 PARSEX1 +; RETURN +;;--- +;.PRINTCONTAINMENT +; PARSEX3=24 ; BASE FOR CONTAINMENT MESSAGES +; IF HISEARCHPOS=NONSPECIFIC THEN PCRET +; IF SEARCHPOS<>PLAYER THEN PPARSEC1 +; PARSEX3=60 ; BASE for 'You are wearing' and 'You are carrying' +;.PPARSEC1 +; ADD PARSEX3,HISEARCHPOS +; MESSAGE PARSEX3 +; IF HISEARCHPOS=0 THEN PCRET ; DON'T PRINT 'THE object' FOR 'YOU CAN SEE' +; PARSEX1=SEARCHPOS ; CONTAINER OBJECT NUMBER +; GOSUB @DESCTHEOBJPARSEX1 +; PARSEX1=16 +; ADD PARSEX3,PARSEX1 ; print second half of containment messages +; MESSAGE PARSEX3 +;.PCRET +; RETURN +;;--- +.OUTWORD12 + WORD3=0 + WORD4=0 +.OUTWORD1234 +; WE ARE OUTPUTING A LIST OF WORDS, SEPARATED BY COMMAS +; ETC. THIS ROUTINE TAKES A SERIES OF WORDS ONE AT A TIME +; AND OUTPUTS THEM. BEFORE CALLING, SET OUTPUTWORD=0 +; AT THE END OF THE LIST, CALL THIS ROUTINE WITH PARSEX1=0 AND THE LIST +; WILL BE FINISHED OFF WITH A FULL STOP ETC. + IF WORD1=0 THEN OWEND +; FIRST OR SECOND WORD - JUST ADD TO BUFFER + PARSEX4=OUTPUTWORD + VALUE=WORD1 + GOSUB WRITEOUTBUFFER + VALUE=WORD2 + GOSUB WRITEOUTBUFFER + VALUE=WORD3 + GOSUB WRITEOUTBUFFER + VALUE=WORD4 + GOSUB WRITEOUTBUFFER + OUTPUTWORD=PARSEX4 + IF OUTPUTWORD<>24 THEN OWRET +; +.OW1 +; THIRD TO SUBSEQUENT WORDS - print out oldest word +; in buffer, and shift the other two down + PARSEX4=0 ; index into OUTPUTBUFFER + GOSUB OWPRINT + PARSEX1=0 + PARSEX2=8 +.OW2 + PARSEX3=OUTPUTBUFFER(PARSEX2) + OUTPUTBUFFER(PARSEX1)=PARSEX3 + ADD PARSEX1,C1 + ADD PARSEX2,C1 + IF PARSEX1<16 THEN OW2 + MESSAGE COMMA + OUTPUTWORD=16 +.OWRET + RETURN + +.OWEND +; HAVE RECEIVED THE TERMINATOR + IF OUTPUTWORD=0 THEN OWRET ; NO WORDS OUTPUT AT ALL +; THERE MUST BE AT LEAST ONE WORD REMAINING IN BUFFER - SO OUTPUT IT + PARSEX4=0 ; index into OUTPUTBUFFER + GOSUB OWPRINT + IF OUTPUTWORD=8 THEN OWSTOP ; ONLY ONE WORD OUTPUT - SO THATS IT ! +; MUST HAVE OUTPUTWORD=2, SO 2 OR MORE WORDS OUTPUT. +; THEREFORE WANT TO FINISH OFF WITH "AND" + MESSAGE AND + PARSEX4=8 ; index into OUTPUTBUFFER + GOSUB OWPRINT +.OWSTOP + OUTPUTWORD=0 + MESSAGE DOT + RETURN +;--- +.OWPRINT +; Print words by message number starting at outputbuffer(PARSEX4) + PARSEX3=3 ; words to print +.OWPRINT1 + GOSUB READOUTBUFFER + PARSEX1=VALUE +;> IF OWTYPE=OWOBJECTS THEN DESCANOBJPARSEX1 + MESSAGE VALUE + SUB PARSEX3,C1 + IF PARSEX3>.DESCTHEOBJX1 +;>>; PRINT OUT 'THE ' +;>>; First check if can print 'it' +;>> IF PARSEX1<>LASTWORDPRINTED THEN DTOPARSEX2 +;>> MESSAGE 2002 ; 'it' +;>> RETURN +; +;>>.DTOPARSEX2 +;>> IF PARSEX1=USER THEN DTOXNOTHE ; PREVENT 'the you ...' +;>>; IF PARSEX1=MYGLAR THEN DTOXNOTHE +;>> MESSAGE THE +;>>.DTOXNOTHE +;>> GOTO DESCOBJPARSEX1 +;;--- +;.DOSOME +; MESSAGE 23 ; SOME +; GOTO DESCOBJPARSEX1 +;.DOAN +; MESSAGE 22 ; AN +;;--- +.DESCOBJPARSEX1 + LASTWORDPRINTED=PARSEX1 +;>>.DOPARSEX1A2 +;???* IF PARSEX1>MAXVISIBLEOBJECT THEN DESCOBJRET + if parsex1>239 then dop1 + PARSEX2=OBJECTDESCBASE + ADD PARSEX2,PARSEX1 + MESSAGE PARSEX2 +.DESCOBJRET + RETURN +.dop1 ; for colours etc. + parsex2=1000 + add parsex2,parsex1 + message parsex2 + return +;;--- +.CHECKEXIT +; GOSUB ABSCHECKEXIT +; GOTO @SPECIALEXITS ; Exits conditional on game +;;--- +.ABSCHECKEXIT +; EXIT (From FROM diection DIR ) +; return DEST, DOOR, EXITVISIBLE + DOOR=FALSE + EXITVISIBLE=FALSE + EXIT FROM DIR STATUS DEST + IF DEST=0 THEN CERET +.CHECKEXITSTATUS + PARSEX1=STATUS + IF PARSEX1<4 THEN CE2 + DOOR=TRUE +;> CURRENTPOS(GENERALDOOR)=ROOM + SUB PARSEX1,C4 +.CE2 + IF PARSEX1>1 THEN CERET + EXITVISIBLE=TRUE +.CERET + RETURN +;;--- +;.CALCDIRECTION +;; given 'FROM', 'TO' as adjacent locations, +;; return 'DIR'=direction going from 'FROM' to 'TO' +; DIR=15 +;.CALCDIR1 +; SUB DIR,C1 +; GOSUB ABSCHECKEXIT +; IF DIR=0 THEN CALCDIRRET +; IF DEST<>TO THEN CALCDIR1 +;.CALCDIRRET +; RETURN +;;--- +.CRVARYMESSAGE + MESSAGE CR +.VARYMESSAGE +;; OUTPUT ONE OF THREE MESSAGES AT 'PARSEM1' +;; GOSUB RAND3 +;; ADD PARSEM1,NUMBER +; MESSAGE PARSEM1 +; RETURN + ADD CURRENTMESSAGE,C1 + IF CURRENTMESSAGE<3 THEN VMOK + CURRENTMESSAGE=0 +.VMOK + PARSEX1=PARSEM1 + ADD PARSEX1,CURRENTMESSAGE + MESSAGE PARSEX1 + RETURN +;--- +;--------------------------------------------------------- +;---------------------------------------------------------- +;------------------------------- diff --git a/l9dev/regress/games.l9/eden.l9/aparse.txt b/l9dev/regress/games.l9/eden.l9/aparse.txt new file mode 100644 index 0000000..3216161 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/aparse.txt @@ -0,0 +1,1676 @@ +;Parser for Converted Trilogies + +;Copyright (C) 1986 Level 9 Computing + +;B:APARSE.TXT + +;>> NICK 1/7/86 "MARKOBJECT" changed to allowed optionally coloured +;>> NICK 1/7/86 buttons + +CONST + SIGNIFICANT=235 + +VAR + CSAVEHISEARCHPOS EVENTUALPREP + WANTWHATNOW + alreadyprintedscenery + colour + +TABLE ;>> + TEMPLISTBASE=2 ;>> + +BEGIN +.CANCELINPUT +; something of great importance has happened - remove +; rest of input from line + GOSUB @CLEARINPUT + NOUN1=NULLOBJECT ;>> + EVERYTHING=FALSE ;>> + CURRENTOBJECT=NULLOBJECT ;>> + GOTO @RESETSTACK +; +;--- +.PRESENTMULTIPLE +; GIVEN VERB,PREP,NOUN2 AND OBJECTTABLE, +; CALL VERB ONCE FOR EACH OBJECT SPECIFIED BY OBJECTTABLE +; EVERYTHING, IT ETC. ARE HANDLED HERE +; Work down from top so static objects, containers come first + MESSAGE CR + DIR=C0 ; prevent some SPECIALMOVES being triggered + GOSUB @CONVERTVERB + + IF VERB=C0 THEN NOAGAIN1 + AGAINVERB=VERB +.NOAGAIN1 + + GOSUB @SELECTOBJECTPOS +; +;; ??? as a kludge - test here to see if NOUN2 is present +; IF NOUN2=NULLOBJECT THEN PM1 +; OBJECT=NOUN2 +; GOSUB CHECKIFPRESENT +; IF RESULT=FALSE THEN CANTSEEIT + +;>>.PM1 + IF EVERYTHING=TRUE THEN PMEVERYTHING +; handle individual objects + CURRENTOBJECT=C1 ; pointer into OBJECTTABLE +.PMSINGLE1 + OBJECT=OBJECTTABLE(CURRENTOBJECT) + + IF OBJECT=C0 THEN PMSINGLEEND + +; GOSUB @CHECKIFACCESSIBLE +; IF RESULT=TRUE THEN PMSINGLE2 +; GOSUB @OBJECTNOTHERE +; HAVECALLEDVERB=TRUE +; GOTO PMSINGLENEXT +;.PMSINGLE2 + NOUN1=OBJECT + HAVECALLEDVERB=TRUE + GOTO CALLVERB ;>> was GOSUB + +.PMSINGLENEXT + ADD CURRENTOBJECT,C1 + GOTO PMSINGLE1 + +.PMSINGLEEND + IF HAVECALLEDVERB=TRUE THEN @GETNEWINPUT ;>> was PMSINGLERET + NOUN1=NULLOBJECT + GOTO CALLVERB ;>> was GOSUB + +;--- +.PMEVERYTHING + CURRENTOBJECT=MAXOBJECTVISIBLE + NOUN1=NULLOBJECT +.PMEV1 +; +; check if object if forbidden +; + OBJECT=CURRENTOBJECT + +;>>> IF OBJECT=153 THEN PMEV3 ;>> For Dungeon. Exclude 'KEY' from 'ALL' +;>> IF OBJECT=61 THEN PMEV3 ;>>For Quest. Exclude 'COMPASS' from 'ALL' +;>> IF OBJECT=95 THEN PMEV3 ;>> NICK 2/7/86 Exclude coffin + + GOSUB @CHECKIFACCESSIBLE + + IF RESULT=FALSE THEN PMEV3 + +; SEARCHDEPTH=1 +; GOSUB @CHECKIFOBVIOUS +; IF OBVIOUS=FALSE THEN PMEV3 + + GOSUB @CHECKIFFORBIDDEN + IF RESULT=TRUE THEN PMEV3 + + NOUN1=CURRENTOBJECT + HAVECALLEDVERB=TRUE + GOTO CALLVERB ;>> was GOSUB + +.PMEV3 + SUB CURRENTOBJECT,C1 + IF CURRENTOBJECT>MINOBJECT THEN PMEV1 + NOUN1=NULLOBJECT ;>> added + IF HAVECALLEDVERB=TRUE THEN @GETNEWINPUT ;>>was PMRET + GOTO CALLVERB ;>> was GOSUB + +;--- +.CALLVERB +; GIVEN VERB,PREP,NOUN1,NOUN2, +; DO THE JUMP-TABLE INDEXING ON THE VERB + + MESSAGE CR +; CSAVEHISEARCH=HISEARCHPOS + + IF NOUN1=NULLOBJECT THEN CALLVERBNODESC + IF EVERYTHING=TRUE THEN CALLVERBDESC + IF VERBSTOCALLUSER THEN CALLVERBNODESC + + IF EVERYTHING=FALSE THEN NOXXX ;>>> + ITWORD=NOUN1 ;>>> +.NOXXX ;>>> + + IF NOUN1=SIGNIFICANT THEN CALLVERBNODESC ;>> + PARSEX1=NOUN1 + GOSUB @DESCOBJPARSEX1 + MESSAGE COLON + +.CALLVERBNODESC + GOTO @GETEND1 ;>> was GOSUB ABSCALLVERB + +; HISEARCHPOS=CSAVEHISEARCH +; RETURN +;;--- +.CHECKIFACCESSIBLE +; return RESULT=TRUE if OBJECT is accessible to VERB +; objects must be present in way HISEARCHPOS + IF OBJECTHINUMBEROFFSET THEN CIANOTNUMBER + PARSEX1=NUMBEROFFSET +; OBJECT=BUTTONS + +.CIANOTNUMBER + IF OBJECT>MAXOBJECT THEN @CHECKIFSCENERYHERE +; + IF HISEARCHPOS<>NONSPECIFIC THEN CIANOTNS + GOSUB @ISOBJECTHERE + IF RESULT=TRUE THEN CIAHAVECHECKED + GOTO CIAISITOWNED + +.CIANOTNS + IF HISEARCHPOS<>NOUNCARRIED THEN CIANOTCARRIED +.CIAISITOWNED + GOSUB @ISOBJECTCARRIED + GOTO CIAHAVECHECKED + +.CIANOTCARRIED + GOSUB @ISOBJECTHERE +; +.CIAHAVECHECKED + RETURN +.CIATRUE ;>>MIKE 28/7/86 + RESULT=TRUE ;>>MIKE 28/7/86 + RETURN ;>>MIKE 28/7/86 +;--- +.PRINTINPUTWORD + MESSAGE QUOTE + PRINTINPUT + MESSAGE QUOTE + RETURN +;--- +.PARSENOTKNOWN ; WORD NOT RECOGNIZED + MESSAGE 2005 ; I don't know the word + GOSUB PRINTINPUTWORD + PARSEM1=C0 + GOTO PARSEERROR +;--- +.SECONDPREP +.PARSENOVERB +.CANTUSEHERE +; IF PLAYER<>USER THEN NPCNOTUNDERSTOOD + MESSAGE 2003 + GOSUB PRINTINPUTWORD + PARSEM1=2004 + GOTO PARSEERROR +;--- +.NOTCLEAR +; User has referred to a piece of scenery which is not nearby +; IF PLAYER<>USER THEN NPCNOTUNDERSTOOD + PROCESSED=TRUE ;>> MIKE 21/6/86 + ITWORD=NULLOBJECT + OBJECT=C0 + HAVECALLEDVERB=TRUE + message 2020 ; I can find no mention of " + PRINTINPUT +; MESSAGE COLON + MESSAGE 2021 ; "here >>mike 8/9/86 + RETURN +;--- +.DONTUNDERSTAND +; general error message when the parsing has borken +; down for some reason + PARSEM1=2010 +; drop through to PARSEERROR +;- +.PARSEERROR +; IF PLAYER<>USER THEN NPCNOTUNDERSTOOD + MESSAGE PARSEM1 + MESSAGE DOTCR + GOTO @CANCELINPUT +;--- +.PARSEINPUT +; CONVERT INPUT TO VERB, PREP, OBJECT FORM FOR +; EASY UNDERSTANDING BY THE REST OF THE PROGRAM + + HAVECALLEDVERB=FALSE + GOSUB @GETNEXTWORD + VERB=C0 +; NOUN1=C0 ;>>* +; EVERYTHING=C0 ;>>* +; HAVECALLEDVERB=FALSE ;>>* + IF EOL=TRUE THEN @PIEND; NOTHING ENTERED ! +; +;; is player trying to talk to someone ? +; SEARCHTYPE=NOUNTYPE +; GOSUB @CHECKTYPE +; IF VALUENPCMAX THEN PINOTNPC +;; yes, so is the target here ? +; OBJECT=VALUE +; GOSUB CHECKIFPRESENT +; IF RESULT=TRUE THEN PINPC +; MESSAGE 2060 ; talking to yourself ? +; GOTO CLEARINPUT +; +;>>.PINOTNPC + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE<>C0 THEN PI0 + + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + IF VALUE>NEGATIVE THEN @PARSENOVERB ;>> + IF VALUE>IGARBAGE THEN PARSEINPUT ; CONJUNCTION ENTERED, SO TRY AGAIN + GOTO @PARSENOVERB ; Wrong type of word found + +.PI0 + IF VALUE<>IAGAIN THEN PI0A + + VERB=AGAINVERB + GOTO @PIEND ;>> IF LASTVERBVALID=TRUE THEN @PIEND + +;>>.LASTVERBINVALID +; IF PLAYER<>USER THEN NPCNOTUNDERSTAND +;>> PARSEM1=2050 ; last verb not valid +;>> GOSUB @VARYMESSAGE +;>> GOTO @CANCELINPUT + +.PI0A + VERB=VALUE + + IF VERB=C0 THEN NOAGAIN2 + AGAINVERB=VERB +.NOAGAIN2 + +;>>.VERBPLUS + OBJECTTABLE(C0)=C0 + OBJECTTABLE(C1)=C0 + EVERYTHING=FALSE ; EVERYTHING NOT DETECTED YET + EXCEPT=FALSE ; EXCEPT NOT DETECTED YET + PREP=C0 + EVENTUALPREP=C0 + NOUN1=NULLOBJECT ; NEEDED ? + NOUN2=NULLOBJECT + VERBSTOCALL=C0 + LASTVERBVALID=FALSE + +; IF VERB=IGETME THEN @GETME ;* + IF VERB<9 THEN PIEND ; directions have no objects, but +; things like IN, CLIMB CAN have objects e.g. ON TABLE + +; VERB MAY BE FOLLOWED BY SOMETHING ELSE + GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS + +.PINEXT +;>>.PIANOTHERNOUN + GOSUB @GETNEXTWORD + + IF SEPARATOR=TRUE THEN PINEXT + IF EOL=TRUE THEN PIEND +;>>.PINEXT1 + +; IF VERB=ISAY THEN @SAY +; IF VERB=IDROP THEN PINOTPREP ; DROP BENCH AND ON + + if room<>28 then picouldbeprep ; in house plant + if verb=itake then pinotprep ; take fish fungus and out + +.picouldbeprep + + SEARCHTYPE=PREPTYPE + GOSUB @CHECKTYPE + +;>>MIKE 29/7/86;"LOOK AT" = "EXAMINE" +;>>MIKE 29/7/86 IF VALUE=C0 THEN PINOTPREP ;>> +;>>MIKE 29/7/86 IF VERB<>ILOOK THEN PIPREP ;>> +;>>MIKE 29/7/86 VERB=IEXAMINE ;>> +;>>MIKE 29/7/86 VALUE=C0 ;>> + IF VALUE<>C0 THEN PIPREP + +.PINOTPREP + OBJECT=VALUE + GOSUB @CHECKNOUN + + IF OBJECT<>C0 THEN PIEXAMINENOUN + IF PROCESSED=TRUE THEN PINEXT + + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF VALUE=ICOMMA THEN PINEXT + IF VALUE<>C0 THEN PINEXT + + SEARCHTYPE=NUMBTYPE + GOSUB @CHECKTYPE + IF VALUE=C0 THEN PINOTNUMBER + +; OBJECT=BUTTONS + ADD VERBSTOCALL,C1 + GOTO PINEXT + +.PINOTNUMBER +; ANYTHING ELSE (CONJ, VERBS ETC.) TERMINATE THIS SENTENCE + GOSUB @GOBACK ; STORE (VERB?) FOR FUTURE ANALYSIS + +.PIEND + IF EVENTUALPREP=C0 THEN PIRET + PREP=EVENTUALPREP +.PIRET + RETURN + +.PIPREP + IF PREP<>C0 THEN @SECONDPREP ; GOT A SECOND PREP + PREP=VALUE + GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS + GOTO PINEXT + +.PIEXAMINENOUN + IF OBJECT<>IIT THEN PINOTIT + OBJECT=ITWORD + IF OBJECTUSER THEN NPCNOTUNDERSTAND + MESSAGE 2053 ; it's not clear what IT refers to here + GOTO @CANCELINPUT + +.PINOTIT + IF PREP<>C0 THEN @PINOUN2 + IF OBJECT=IEVERYTHING THEN PIEVERYTHING + IF OBJECT=IEXCEPT THEN @PIEXCEPT +; GOT AN ORDINARY NOUN SPECIFIED + ITWORD=OBJECT +;>> IF OBJECT> IF OBJECT>HINUMBEROFFSET THEN PION0 +; +;>> NOUN2=OBJECT ;>>Dungeon wants I3 as the number keyword +; +;>> GOTO @PINEXT +;; +.PION0 + PARSEX1=NOUNFORBIDDEN ; mark noun as forbidden + IF EXCEPT=TRUE THEN PIMARK ; DON'T CHECK IT'S HERE (YET) +; mark ordinary noun + PARSEX1=NOUNSPECIFIED +.PIMARK + NOUN1=OBJECT + GOSUB MARKOBJECT ; MARK NOUN AS SPECIFICALLY REQUESTED + GOTO @PINEXT +; +.PIEVERYTHING + EVERYTHING=TRUE + GOTO @PINEXT + +;--- +.STRIPX1 +; STRIP OFF TOP TWO BITS OF PARSEX1. + IF PARSEX1<64 THEN STRIPX1RET + PARSEX2=64 + SUB PARSEX1,PARSEX2 + GOTO STRIPX1 +.STRIPX1RET + RETURN +;--- +.CHECKIFSCENERYHERE +; given OBJECT as a noun requested by user (relative to NOUNOFFSET) +; see if it is part of a room description, and +; if so, return RESULT=TRUE if in current room +;> PARSEX1=NOUNOFFSET +;> ADD PARSEX1,OBJECT +;> IF OBJECT>1999 THEN RETURNTRUE ;>2000, so a random output message + GOSUB @SETUPROOM ;>> only needed for early games + PARSEX1=OBJECT ;>> only needed when room descs are before objects + PARSEX2=SHORTROOMDESCS + SUB PARSEX1,PARSEX2 + IF PARSEX1=ROOM THEN RETURNTRUE +; PARSEX2=300 ; LONGROOMDESCS-SHORTROOMDESCS ;>> +; SUB PARSEX1,PARSEX2 ;>> +; IF PARSEX1<>ROOM THEN RETURNFALSE ;>> + GOTO RETURNFALSE ;>> +; drop through to return TRUE +.RETURNTRUE + RESULT=TRUE + RETURN +.RETURNFALSE + RESULT=FALSE + RETURN +;--- +.MARKOBJECT +; mark object as PARSEX1 + if object>255 then @scenery ;>>mike 25/10/86 + PARSEX2=OBJECTTABLE(C0) + IF PARSEX2=C0 THEN MARKOBJ1 + IF PARSEX1<>PARSEX2 THEN @DONTUNDERSTAND ; have had both mark and prevent types +.MARKOBJ1 + PARSEX2=C1 +.MARKOBJ2 + PARSEX3=OBJECTTABLE(PARSEX2) + +; after .markobj2, parsex3=objecttable(parsex2) +;>>MIKE 25/8/85 - see below IF PARSEX3=OBJECT THEN MARKOBJRET ; already marked + +;>> NICK 1/7/86 +;>> For Eden: Convert "verb colour BUTTON" to "verb colour" + if verb=isay then notbutton ; treat normally + if verb=iexamine then notbutton ; treat normally + if verb<>ipush then notpush + IF OBJECT=IBUTTON THEN MARKOBJRET ;>> NICK 1/7/86 + GOTO COLOUR1 ;>>MIKE 25/8/86 - a coloured button, allow multiple refs. + +.notpush + IF object<240 THEN NOTCOLOUR1 ;>> NICK 1/7/86 + IF object>249 THEN NOTCOLOUR1 ;>> NICK 1/7/86 + colour=object + parsex4=240 + sub colour,parsex4 + return ; don't mark it + +.NOTCOLOUR1 ;>> NICK 1/7/86 +; if object<102 then notform +; if object>105 then notform +;; should have colour in COLOUR +; if colour<2 then notform +; if colour>5 then notform +; object=100 ; base for forms - colour=2..5 +; add object,colour +;; now object=object number of appropriate form +;.notform +; +; if object<>121 then notticket +; if colour<>2 then notredticket +; object=121 ; red ticket +;.notredticket +; if colour<>5 then notticket +; object=122 ; green ticket +; +;.notticket +; if object<>ibutton then notbutton +; object=colour +; parsex4=240 +; add object,parsex4 ; make "press green button" be "press green" +; +.notbutton + + IF PARSEX3=OBJECT THEN MARKOBJRET ;>>MIKE 25/8/86 +;>> - moved here to allow multiple buttons of same colour +.COLOUR1 + +;>>mike 15/10/86 - IF PARSEX3=OBJECT THEN MARKOBJRET ; already marked + + IF PARSEX3=C0 THEN MARKOBJ3 + ADD PARSEX2,C1 + GOTO MARKOBJ2 + +.MARKOBJ3 + IF PARSEX2>60 THEN @DONTUNDERSTAND ; OBJECTTABLE OVERFLOW + ADD VERBSTOCALL,C1 + OBJECTTABLE(C0)=PARSEX1 + OBJECTTABLE(PARSEX2)=OBJECT + ADD PARSEX2,C1 + OBJECTTABLE(PARSEX2)=C0 +.MARKOBJRET + RETURN +;--- +.CHECKIFFORBIDDEN + RESULT=FALSE + PARSEX1=OBJECTTABLE(C0) + IF PARSEX1<>NOUNFORBIDDEN THEN CIFRET + PARSEX2=C1 +.CIF1 + PARSEX1=OBJECTTABLE(PARSEX2) + ADD PARSEX2,C1 + IF PARSEX1=C0 THEN CIFRET + IF PARSEX1<>OBJECT THEN CIF1 + RESULT=TRUE +.CIFRET + RETURN +;--- +.SCENERY +; Have got a noun which is in a room description or similar, +; so it is just scenery. Print an appropriate message. +; IF PLAYER<>USER THEN NPCNOTUNDERSTAND +; +; x1=objecttable(0) ;>>mike 25/10/86 +; if x1<>0 then examplat1 ;do nothing - because have a valid +;; object to process in the same command - >>mike 25/10/86 + + PROCESSED=FALSE + GOSUB @SETUPROOM + IF VERB<>IEXAMINE THEN FUNNIES ; always allow them to happen + + if alreadyprintedscenery=true then examplat1 + alreadyprintedscenery=true + +; examine - special for platform rooms + if room=101 then examineplatform + if room=102 then examineplatform + if room<40 then notplatform + if room<46 then examineplatform +.notplatform + +; but examine wants to sometimes tell player it is 'just scenery' +; more detailed comments in DUNGEON version which was derived +; from this parser +; IF ROOM=60 THEN FUNNIES ; pile of rocks +; IF ROOM=41 THEN FUNNIES ; examining stone slab +; IF ROOM=7 THEN FUNNIES ; >> appalling kludge - MIKE 21/6/86 +; IF ROOM=8 THEN FUNNIES ; >> " +; IF ROOM=44 THEN FUNNIES +; IF ROOM=110 THEN FUNNIES ; elf +; IF ROOM=73 THEN FUNNIES ; dark shape flailing at you +; IF ROOM=223 THEN FUNNIES ; demon lord (at end) +; IF ROOM=224 THEN FUNNIES ; demon lord (at end) +; IF ROOM=207 THEN FUNNIES ; demon lord (almost at end) +; IF ROOM<82 THEN FUN3 ; underwater range +; IF ROOM<98 THEN FUNNIES ; underwater range +; IF ROOM=178 THEN FUNNIES ; padded cell - machine +.FUN3 +; +;>>mike 8/9/86 PRINTINPUT +;>>mike 8/9/86 MESSAGE COLON + +; GOSUB @FUNNIES ; Print out any special messages + + if room=4 then cantsaymore + if room=18 then cantsaymore + if room=21 then cantsaymore + if room=51 then cantsaymore + if room=89 then cantsaymore + if room=101 then cantsaymore + if room=102 then cantsaymore + if room=153 then cantsaymore + if room=110 then cantsaymore + if room=122 then cantsaymore + if room=147 then cantsaymore + if room<40 then csmnotplatform + if room<46 then cantsaymore +.csmnotplatform + + PARSEM1=2030 ; just scenery group + GOSUB @VARYMESSAGE +.examplat1 + OBJECT=C0 + PROCESSED=TRUE ;>> MIKE 21/6/86 + ITWORD=NULLOBJECT + HAVECALLEDVERB=TRUE + RETURN +;--- +.cantsaymore + m1=2023 ; sorry, I can't say any more... + if verb=iexamine then csmprint + m1=2024 ; you can't dot that +.csmprint + message m1 + goto examplat1 +;--- +.examineplatform + message 856 ; platfrom description + goto examplat1 +;--- +.FUNNIES +; >> MIKE 21/6/86 +; is player referring to scenery in a room +; where the scenery may be useful +; e.g. water, oil, piles of rocks etc. +; if so, print 'name:' and try calling the game + PROCESSED=TRUE + OBJECT=SIGNIFICANT + PROCESSED=TRUE + RETURN +;--- + +.PIEXCEPT + EXCEPT=TRUE + GOTO @PINEXT + +.PINOUN2 +; another noun in input, not part of any multiple noun + if noun2=object then pinoun2ok ;>>mike 6/12/86 +; multiple references to noun2, +; so ok to use. + + IF NOUN2<>NULLOBJECT THEN @DONTUNDERSTAND +; +.pinoun2ok + NOUN2=OBJECT + GOTO @PINEXT +;--- + +.CHECKTYPE +; SEE IF THERE IS A WORD OF WORDTYPE 'SEARCHTYPE' IN CURRENT WORD +; IF NOT, RETURN VALUE=0 +; IF THERE IS RETURN ITS WORD NUMBER IN VALUE + INDEX=0 + +.CHECKTYPEMORE + + GOSUB @READINPUTLIST + IF VALUE=0 THEN CHECKTYPERET ;>>MIKE 18/6/86 + IF WORDTYPE<>NUMBTYPE THEN CTNOTNUMBER + ADD INDEX,C2 ; numbers are 4 byte values + +.CTNOTNUMBER + ADD INDEX,C2 +;>>MIKE 18/6/86 IF VALUE=C0 THEN CHECKTYPERET + SOMETHINGPROCESSED=TRUE +; IF VALUE=IRUDE THEN @RUDEWORD + IF WORDTYPE<>SEARCHTYPE THEN CHECKTYPEMORE +;* should maybe re-enable this IF WORDTYPE<>NOUNTYPE THEN CHECKTYPERET +; IF VALUE<470 THEN CHECKTYPERET +; IF VALUE>699 THEN CHECKTYPERET +; an examine message +; PARSEX1=470 +; SUB VALUE,PARSEX1 + +.CHECKTYPERET + RETURN +;--- + +.CHECKNOUN +;Check if noun if present in list 9. + +;Alternatives are checked in priority. It is very dangerous to do all +;checking in combined tests (this may not work for all conversions) +;so each alternative is isolated. Order of checks is: +; if not defined anywhere as "^N xxx" then return as 'not found' +; if it's 'noise' (4000-4001) +; if it's a keyword not originally in the game but which might have +; been added in anywhere (such as 'IT' 'ALL' and 'BUT') +; if it's a keyword for an object in the current room or worn/carried +; if it's scenery in the current room +; if it's a keyword for an object elsewhere +; if it's scenery elsewhere. + + IF PREP=C0 THEN CHECKNOUN1 + HISEARCHPOS=NONSPECIFIC +.CHECKNOUN1 + + GOSUB @CHECKNOUNDEFINED ;Check if any noun(s) exist in LIST 9. + IF RESULT=TRUE THEN CHECKNOUN2 +;Not defined anywhere as noun + PROCESSED=FALSE ;>> (Otherwise doesn't do TAKE xxx DROP xxx.) + OBJECT=C0 + RETURN + +.CHECKNOUN2 + GOSUB CHECKNOUNGARBAGE + IF RESULT=FALSE THEN CHECKNOUN3 +;Garbage word + PROCESSED=TRUE + OBJECT=C0 + RETURN + +.CHECKNOUN3 + GOSUB CHECKNOUNANYWHERE + IF RESULT=FALSE THEN CHECKNOUN4 +;Word like IT ALL BUT THEN.. + PROCESSED=FALSE + OBJECT=VALUE + RETURN + +.CHECKNOUN4 +;Must either be scenery (in a room description) or a keyword + + GOSUB CHECKNOUNKEYWORD +; returns RESULT=TRUE if an actual object is referred to and present +; and OBJECT = value + IF RESULT=FALSE THEN CHECKNOUN5 +;Object +;>>MIKE 21/6/86 PROCESSED=TRUE +;>>MIKE 21/6/86 OBJECT=VALUE + RETURN + +;Must be scenery.. +.CHECKNOUN5 +;>; first check if it is a word that is always present +;> INDEX=0 +;>.CHECKNOUN5A +;> GOSUB CHECKTYPEMORE +;> IF VALUE=0 THEN CHECKNOUN5B +;> IF VALUE<850 THEN CHECKNOUN5A +;> IF VALUE>870 THEN CHECKNOUN5A +;> PROCESSED=FALSE +;> OBJECT=0 +;> RETURN ; something which is always present + +;.CHECKNOUN5B +; must be some type of scenery +; + GOSUB @CHECKNOUNROOM ; >> MOVED FROM BELOW + IF RESULT=TRUE THEN @SCENERY +; + GOSUB @CHECKNOUNSTATUS + IF RESULT=FALSE THEN CHECKNOUN6 +;Status noun +;>> MIKE 21/6/86 PROCESSED=TRUE + RETURN ;>>MIKE 28/7/86 + +.CHECKNOUN6 + IF OBJECT>255 THEN @NOTCLEAR ;>> NICK 1/7/86 + RETURN ;>>MIKE22/6/86 not found, so let the game itself decide +; +;----- +; +.CHECKNOUNGARBAGE +;Check if one of the possible nouns in LIST 9 is a garbage word. + SEARCHTYPE=NOUNTYPE + INDEX=C0 + GOSUB CHECKTYPE + OBJECT=C0 + +.CHECKGAR1 + IF VALUE=C0 THEN CHECKGAR2 + + IF VALUE<3000 THEN CHECKGAR2 ;>>MIKE 23/7/86 + IF VALUE<3100 THEN CHECKGAR3 ;>>MIKE 23/7/86 +; IF VALUE=3000 THEN CHECKGAR3 +; IF VALUE=3001 THEN CHECKGAR3 + + GOSUB CHECKTYPEMORE + GOTO CHECKGAR1 + +.CHECKGAR2 + RESULT=FALSE + RETURN + +.CHECKGAR3 + RESULT=TRUE + RETURN + +;----- + +.CHECKNOUNANYWHERE +;Check if one of the possible nouns if LIST 9 is one of a +;group of keyword nouns which could be anywhere in the message file. +;(Because of possible clashes with other messages in the converted +;game these nouns may violate the rules on keyword numbering.) + + SEARCHTYPE=NOUNTYPE + INDEX=C0 + GOSUB @CHECKTYPE + OBJECT=C0 +.CHECKSPEC1 + + IF VALUE=C0 THEN CHECKSPEC1A + + IF VALUE=IIT THEN CHECKSPEC2 +;>> IF VALUE=ITHEN THEN CHECKSPEC2 + IF VALUE=IEXCEPT THEN CHECKSPEC2 + IF VALUE=IEVERYTHING THEN CHECKSPEC2 + IF VALUE=ISAVE THEN CHECKSPEC2 ;>> + IF VALUE=IRESTORE THEN CHECKSPEC2 ;>> + + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPEMORE + + GOTO CHECKSPEC1 + +.CHECKSPEC1A + OBJECT=C0 + RESULT=FALSE + RETURN + +.CHECKSPEC2 + OBJECT=VALUE + RESULT=TRUE + RETURN + +;----- + +.CHECKNOUNKEYWORD +;Check if there is a noun in LIST 9 which is in the range +;MINOBJECT thru MAXOBJECT. + + RESULT=TRUE + SEARCHTYPE=NOUNTYPE + INDEX=C0 +;>> MIKE 21/6/86 GOSUB CHECKTYPE + OBJECT=C0 + +.CHECKKEY1 + GOSUB @CHECKTYPEMORE ;>> MIKE 21/6/86 + IF VALUE=0 THEN CHECKKEYFALSE + +;Value will already have been 'adjusted' if it +;lies in the range MINADJUST..MAXADJUST + + IF VALUE>MAXOBJECT THEN CHECKKEY1 ;>> MIKE 21/6/86 + IF VALUE> MIKE 21/6/86 + + OBJECT=VALUE + GOSUB @CHECKIFACCESSIBLE ;>> MIKE 21/6/86 + IF RESULT=FALSE THEN CHECKKEY1 ;>> MIKE 21/6/86 +;>> MIKE 21/6/86 RESULT=TRUE + RETURN + +;>>MIKE 21/6/86.CHECKKEY2 +;>> GOSUB CHECKTYPEMORE +;>> GOTO CHECKKEY1 + +.CHECKKEYFALSE + RESULT=FALSE + RETURN + +;----- + +.CHECKNOUNSTATUS ;>> +;Check if nount in LIST 9 is present in a status message. + + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + + GOSUB @SETUPROOM + +.CHECKSTAT1 + IF VALUE=C0 THEN CHECKSTAT3 + + PARSEX1=VALUE + PARSEX2=NOUNOFFSET + ADD PARSEX1,PARSEX2 + IF PARSEX1MAXSTATUS THEN CHECKSTAT2 + RESULT=TRUE + RETURN + +.CHECKSTAT2 + GOSUB @CHECKTYPEMORE + GOTO CHECKSTAT1 + +.CHECKSTAT3 + RESULT=FALSE + RETURN + +;----- + +.CHECKNOUNROOM +;Check if noun is present in list 9. +;which corresponds to scenery of the current room location. + + SEARCHTYPE=NOUNTYPE + INDEX=C0 + +;>> MIKE 21/6/86 GOSUB CHECKTYPE + + GOSUB @SETUPROOM ;Set ROOM=R1 + +.CHECKROOM1 + GOSUB @CHECKTYPEMORE ;>>MIKE 21/6/86 + IF VALUE=C0 THEN CHECKROOM2 + + PARSEX1=VALUE + PARSEX2=SHORTROOMDESCS + SUB PARSEX1,PARSEX2 + OBJECT=VALUE + RESULT=TRUE + IF PARSEX1=ROOM THEN CHECKROOM3 + GOTO CHECKROOM1 ;>>MIKE 21/6/86 +;>>MIKE 21/6/86 GOSUB CHECKTYPEMORE +;>>MIKE 21/6/86 IF VALUE<>C0 THEN CHECKROOM1 + +.CHECKROOM2 + RESULT=FALSE + +.CHECKROOM3 + RETURN + +;----- + +.CHECKNOUNDEFINED +;Check if there is a noun in LIST 9. + + SEARCHTYPE=NOUNTYPE +;>> INDEX=C0 + GOSUB @CHECKTYPE + + IF VALUE<>0 THEN CHECKSCENE1 + + OBJECT=VALUE + RESULT=FALSE + RETURN + +.CHECKSCENE1 + RESULT=TRUE + RETURN + +;----- + +.CLEARINPUT +; called after any errors - remove rest of input from line + IF NOMOREINPUT=TRUE THEN CLEARINPEND ;>> + INDEX=C0 + GOSUB READINPUTLIST + IF VALUE=C0 THEN CLEARINPEND + SUPRESSCHECKING=TRUE ; don't check words for validity + GOSUB GETNEXTWORD + GOTO CLEARINPUT +.CLEARINPEND + SUPRESSCHECKING=FALSE + RETURN + +;----- + +.GETNEXTWORD +; GET NEXT WORD IN LINPUT +; set EOL=TRUE if get ".", eol, etc. +; Set SEPARATOR=TRUE if get "." "," + IF NOMOREINPUT=TRUE THEN GNWEND + IF WORDNOTPROCESSED=TRUE THEN GNWEND ; HAVE USED GOBACK TO RETRIEVE + + INPUT PARSEX1 PARSEX1 PARSEX1 PARSEX1 + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF VALUE<33 THEN GNW1 + IF VALUE<38 THEN GETNEXTWORD +.GNW1 + GOSUB CHECKEOL ; CHECK FOR "." "THEN" etc. +.GNWEND + WORDNOTPROCESSED=FALSE +.CIGRET + RETURN + +;----- + +.CHECKEOL + INDEX=C0 + GOSUB READINPUTLIST + SEPARATOR=FALSE + EOL=FALSE + IF VALUE=C0 THEN SETNOTHINGMORE + SEARCHTYPE=CONJTYPE + GOSUB @CHECKTYPE + IF VALUE=ITHEN THEN SETEOL + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF SUPRESSCHECKING=TRUE THEN CHECKEOL1 + IF VALUE=128 THEN @PARSENOTKNOWN ; WORD NOT UNDERSTOOD +.CHECKEOL1 + IF VALUE=ICOMMA THEN SETSEPARATOR + IF VALUE=IDOT THEN SETEOL + RETURN +.SETSEPARATOR + SEPARATOR=TRUE + GOTO SETEOL + +.SETNOTHINGMORE +; There is no more input to come on this line + NOMOREINPUT=TRUE +.SETEOL + EOL=TRUE + RETURN +;--- +.GOBACK +; MARK CURRENT WORD AS UNPROCESSED, SO A SUBSEQUENT INPUT ROUTINE +; CAN GET A CHANCE AT READING IT + INDEX=C0 + GOSUB READINPUTLIST + IF VALUE=C0 THEN GOBACKRET + WORDNOTPROCESSED=TRUE +.GOBACKRET + RETURN +;--- +.READINPUTLIST + ; VALUE:=@INPUT(INDEX) 16 BIT. PARSEX1,PARSEX2 corrupted + VALUE=LINPUT(INDEX) + IF VALUE<>C1 THEN RILNOTNUMBER + WORDTYPE=NUMBTYPE + PARSEX1=INDEX + ADD PARSEX1,C1 + VALUE=LINPUT(PARSEX1) ; returns low order of number + RETURN + +.RILNOTNUMBER + WORDTYPE=VALUE +; STRIP OFF TOP THREE ( WORDTYPE ) BITS + PARSEX1=32 +.RIL1 + IF VALUE<32 THEN RIL2 + SUB VALUE,PARSEX1 + GOTO RIL1 +.RIL2 + GOSUB VALUETIMES256 + PARSEX1=C1 + ADD PARSEX1,INDEX + PARSEX2=LINPUT(PARSEX1) + ADD VALUE,PARSEX2 +; Separate out WORDTYPE = top three bits + PARSEX2=WORDTYPE + WORDTYPE=ASCITYPE + PARSEX1=ASCIOFFSET + IF PARSEX2<32 THEN RILRET + WORDTYPE=VERBTYPE + PARSEX1=VERBOFFSET + IF PARSEX2<64 THEN RILRET + WORDTYPE=CONJTYPE + PARSEX1=CONJOFFSET + IF PARSEX2<96 THEN RILRET + WORDTYPE=PREPTYPE + PARSEX1=PREPOFFSET + IF PARSEX2<128 THEN RILRET + WORDTYPE=NOUNTYPE + PARSEX1=NOUNOFFSET + IF PARSEX2<160 THEN RILRET + WORDTYPE=ADJETYPE + PARSEX1=ADJEOFFSET + IF PARSEX2<192 THEN RILRET + WORDTYPE=MATCHTYPE + PARSEX1=MATCHOFFSET + IF PARSEX2<224 THEN RILRET + WORDTYPE=7 + PARSEX1=C0 +.RILRET + IF WORDTYPE<>NOUNTYPE THEN NOADJUST ;>> + IF VALUE> + IF VALUE>MAXNOUNADJUST THEN NOADJUST ;>> + PARSEX1=ADJUSTOFFSET ;>> +.NOADJUST ;>> + SUB VALUE,PARSEX1 ; SUBTRACT OFFSET +;>>> IF VALUE>60000 THEN RILRET1 + RETURN +;>>.RILRET1 +;>> VALUE=C0 +;>> RETURN +;--- +.VALUETIMES256 + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + RETURN +;--- +.VALUEDIV256 +; divide VALUE by 256 +; must preserve PARSEX4 + PARSEX1=C0 + PARSEX2=256 +.VD256 + SUB VALUE,PARSEX2 + IF VALUE>NEGATIVE THEN VDEND + ADD PARSEX1,C1 + GOTO VD256 + +.VDEND + VALUE=PARSEX1 + RETURN +;--- + +.GETCOMMAND + I1=C0 ;>> + I2=C0 ;>> + I3=C0 ;>> + I4=C0 ;>> + WANTWHATNOW=TRUE + GOTO GI0 + +;--- + +.GETI1I2I3I4 ;>> +;Request input and return first two verbs in I1 and I2 + I1=C0 + I2=C0 + I3=C0 + I4=C0 + +.GETI1 + NOMOREINPUT=FALSE + WORDNOTPROCESSED=FALSE + SUPRESSCHECKING=TRUE + + GOSUB @GETNEXTWORD + + INDEX=C0 + GOSUB @READINPUTLIST + IF VALUE=C0 THEN GETI2 + IF I4>C1 THEN GETI1 ;Already found two verbs ? + + SEARCHTYPE=VERBTYPE ; Check if it's a verb + GOSUB @CHECKTYPE + IF VALUE=C0 THEN GETI1 + + ADD I4,C1 ;Number of verbs found + IF I4=C1 THEN GETI3 + I2=VALUE ;Save second verb + GOTO GETI1 +.GETI3 + I1=VALUE ;Save first verb + GOTO GETI1 + +.GETI2 + IF I4=C0 THEN GETI1I2I3I4 + SUPRESSCHECKING=FALSE + RETURN + +;----- + +.GI0 + I1=C0 + I2=C0 + I3=C0 + IF NOUN1=NULLOBJECT THEN GETNEWINPUT +; in middle of presentmultiple + IF EVERYTHING=TRUE THEN @PMEV3 + GOTO @PMSINGLENEXT + +.GETNEWINPUT +;>> VERB=C0 ;>> 24/5/86 to fix 'TAKE ALL (cr) (cr)' problem + + NOUN1=NULLOBJECT + IF NOMOREINPUT=FALSE THEN GNI1 + NOMOREINPUT=FALSE + IF SOMETHINGPROCESSED=FALSE THEN GNI1 ; prevent CR giving WHAT NOW + SOMETHINGPROCESSED=FALSE + + IF WANTWHATNOW=FALSE THEN GNI1 + MESSAGE WHATNOW + alreadyprintedscenery=false + +.GNI1 + EVERYTHING=FALSE ;?? + NOUN1=FALSE ;>>>* + GOSUB @PARSEINPUT + if verb=0 then getnewinput + GOTO @PRESENTMULTIPLE + +.GETEND1 + IF VERB=IEXITS THEN @PRINTEXITS + I1=VERB + IF VERB=C0 THEN GETEND5 ;>> +;>> IF PREP=C0 THEN GETEND2 + I2=PREP +.GETEND2 + IF NOUN1=NULLOBJECT THEN GETEND3 + I2=NOUN1 +.GETEND3 + IF NOUN2=NULLOBJECT THEN GETEND4 + if i2<>0 then getendi3 ;>>mike 22/8/86 - allow "PUSH 1" etc. + i2=noun2 + goto getend4 +.getendi3 + I3=NOUN2 +.GETEND4 + I4=C3 + IF I3<>C0 THEN GOTIT + I4=C2 + IF I2<>C0 THEN GOTIT + I4=C1 + IF I1<>C0 THEN GOTIT +.GETEND5 ;>> + I4=C0 +.GOTIT + +;; replace 121 (red ticket) with i2=red,i3=ticket +; if i2<>121 then gnotredticket +;; i2=121 ; ticket +; i3=202 ; red +;.gnotredticket +; if i2<>122 then gnotgreenticket +; i3=205 ; green +;.gnotgreenticket +; if i2<102 then gnotform +; if i2>105 then gnotform +; i3=i2 +; parsex1=100 +; add i3,parsex1 ; numbers are 202..205 for forms 102..105 (red..green) +;.gnotform + if verb<>ipush then gnotpush + if i2<>0 then gnotpush + i2=ibutton + +.gnotpush + + +;***** Please do not delete the next 9 debugging instructions: +; MESSAGE CR ;***** +; PRINT I1 ;***** +; MESSAGE SPACE ;***** +; PRINT I2 ;***** +; MESSAGE SPACE ;***** +; PRINT I3 ;***** +; MESSAGE SPACE ;***** +; PRINT I4 ;***** +; MESSAGE DOTCR ;***** + + RETURN +;--- +.GETVALUE + GOSUB @GETNEXTWORD + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE<>C0 THEN GOTIT + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + RETURN +;--- +.INITPARSER + CURRENTOBJECT=NULLOBJECT + NOUN1=NULLOBJECT + NOUN2=NULLOBJECT + NOMOREINPUT=TRUE + SOMETHINGPROCESSED=TRUE ; allow WHAT NOW to be printed + ITWORD=NULLOBJECT ;>>*** +; and clear out OBJECTTABLE + PARSEX1=C0 +.IP1 +;>> OBJECTTABLE(PARSEX1)=C0 + TEMPLISTBASE(PARSEX1)=C0 ;>> + ADD PARSEX1,C1 + IF PARSEX1<512 THEN IP1 ;>> +;>> IF PARSEX1<60 THEN IP1 + RETURN +;--- +.SELECTOBJECTPOS ;Is this code complete? + HISEARCHPOS=NOUNCARRIED + IF VERB=IDROP THEN SOPRET + IF VERB=ITHROW THEN SOPRET + HISEARCHPOS=NOUNONGROUND + IF VERB=ITAKE THEN SOPRET + HISEARCHPOS=NONSPECIFIC +.SOPRET + RETURN + +;--- + +;.GETCOMMAND +; GOSUB @TICKCLOCK +;.GPARSEC0 +; STACK +;.GPARSEC1 +;; before printing What now?, check if any more commands waiting +; IF NOMOREINPUT=FALSE THEN GPARSEC3 ; still something left on line +; NOMOREINPUT=FALSE ; disable flag which is set on getting 0 from input +; IF SOMETHINGPROCESSED=FALSE THEN GPARSEC3 ; prevent CR producing 'WHAT NOW' +; MESSAGE 17 ; WHAT NOW ?% +; RANDOM PARSEX1 ; kick random number generator +; SOMETHINGPROCESSED=FALSE +; PLAYER=USER +; GOSUB SETUPROOM +;.GPARSEC3 +; GOSUB @PARSEINPUT +; IF VERB<>0 THEN GPARSEC4 +; GOTO GPARSEC0 +; +;.GPARSEC4 +; GOSUB @PRECOMMAND +; GOSUB PRESENTMULTIPLE ; HANDLE MULTIPLE OBJECTS, CALLING VERB REPEATEDLY +; GOTO @POSTCOMMAND +;--- +;>>.PMSINGLERET +;>> GOTO GETNEWINPUT ;>> was RETURN +;--- +;.PMRET +; GOTO GETNEWINPUT ;>> was RETURN +;--- +;.ABSCALLVERB +; +;; Come here to call verb without printing desc first +; LASTVERBVALID=TRUE +; OBJECT=NOUN1 +; HISEARCHPOS=NONSPECIFIC +; RESULT=TRUE +; GOSUB @FUNNIES +; IF RESULT=TRUE THEN @CVRET +; OBJECT=NOUN2 +; GOSUB @OBJECTTRIGGER +; IF RESULT=TRUE THEN @CVRET +; OBJECT=NOUN1 +; GOSUB @OBJECTTRIGGER ; TRIGGERS FOR ANY VERB ON OBJECT +; IF RESULT=TRUE THEN @CVRET ; FLAG NOT RESET, SO COMMAND PROCESSED +; +;; Do jump-table type indexing +;; Flow will return to PRESENTMULTIPLE when the verb has finished +; +;; IF VERB=ICLIMB THEN @CLIMB +;; IF VERB=IJUMP THEN @JUMP +;; IF VERB<16 THEN @MOVE +;; IF VERB=22 THEN @INVENTORY +;; IF VERB=IRESTORE THEN @RESTORE +;; IF VERB=ISAVE THEN @SAVE +;; IF VERB=IQUIT THEN @QUIT +; IF VERB=ILOOK THEN @DESCRIBEROOM +;; IF VERB=ILISTEN THEN @HEAR +;; IF VERB=ISMELL THEN @SMELL +;IF VERB=IWAIT THEN @WAIT +; IF VERB=ISLEEP THEN @SLEEP +; IF VERB=IVHELLO THEN @HELLO +; IF VERB=IKNOCK THEN @KNOCK +; +; IF VERB=IPICTURE THEN @PICTURE +; IF VERB=IWORDS THEN @WORDS +; IF VERB=ISTAND THEN @STAND +; IF VERB=ILIE THEN @LIE +; IF VERB=ISIT THEN @SIT +; IF VERB=ISCORE THEN @SCORE +; IF VERB=IVERBOSE THEN @VERBOSE +; IF VERB=IBRIEF THEN @BRIEF +; +; IF VERB=IGOTO THEN @GOTO ; ****** +; IF NOUN1<>NULLOBJECT THEN CVGOTNOUN +; IF PLAYER<>USER THEN NPCNOTUNDERSTAND +; M1=2033 ; must supply an object group +; GOTO @VARYMESSAGE + +;.CVGOTNOUN +; IF VERB<41 THEN TOOCOMPLEX +; IF VERB=IOPEN THEN @OPEN +; IF VERB=ITAKE THEN @TAKE +; IF VERB=IPICK THEN @TAKE +; IF VERB=IWEAR THEN @WEAR +; IF VERB=IDROP THEN @DROP +; IF VERB=IPUT THEN @PUT +; IF VERB=IEXAMINE THEN @EXAMINE +; IF VERB=IATTACK THEN @ATTACK +; IF VERB=ICUT THEN @CUT +; IF VERB=IREMOVE THEN @REMOVE +; IF VERB=ITHROW THEN @THROW +; IF VERB=IEAT THEN @EAT +; IF VERB=IPUSH THEN @PUSH +; IF VERB=IPULL THEN @PULL +; IF VERB=IRING THEN @VRING +; IF VERB=IGIVE THEN @GIVE +; IF VERB=IWAKE THEN @WAKE +; IF VERB=ISQUEEZE THEN @SQUEEZE +; IF VERB=ICAST THEN @CAST +; IF VERB=IFASTEN THEN @FASTEN +; IF VERB=IRUB THEN @RUB +;IF VERB=ILIGHT THEN @LIGHT +;IF VERB=IEXTINGUISH THEN @EXTINGUISH +; MESSAGE 2036 ; don't understand verb +;.CVRET +; RETURN +;;--- +;.TOOCOMPLEX +; MESSAGE 2039 ; sentence is too complex +; RETURN +;;--- +;>>.PARSETOOMUCH ; TOO MUCH ENTERED +;>> PARSEM1=2001 +;>> GOTO PARSEERROR +;--- +;>>.PARSENOOBJECT +;>> PARSEM1=2002 +;>> GOTO PARSEERROR +;--- +;.NPCLOOKSFORSOMETHING +; GOSUB ISNPCVISIBLE +; IF RESULT=FALSE THEN NPCLFSRET +; PARSEX1=PLAYER +; GOSUB @DESCTHEOBJPARSEX1 +; MESSAGE 2065 ; looks around as if looking for something +;.NPCLFSRET +; RETURN +;;--- +;.NPCNOTUNDERSTOOD +; an NPC (variable PLAYER) is trying to do something which it can't +;; PARSEX1=CURRENTPOS(USER) +;; PARSEX2=CURRENTPOS(PLAYER) +;; IF PARSEX1<>PARSEX2 THEN NCRET +; GOSUB ISNPCVISIBLE +; IF RESULT=FALSE THEN NPCLFSRET +; PARSEX1=PLAYER +; GOSUB DESCTHEOBJPARSEX1 +; M1=2062 ; looks puzzled +; GOSUB VARYMESSAGE +; GOTO CANCELINPUT +;--- +;.NPCCONFUSED +;; NPC has been instructed to do something which it can't +;; but, don't want to stop, so print a message like +;; 'the frak looks around, as if searching for something' +;; and then carry on with processing the rest of the command (if any) +; M1=2065 ; NPC is confused +; GOTO PRINTM1 +;--- +.OBJECTNOTHERE +; THE OBJECT IS NOT AVAILBALE TO THE COMMAND +; THIS ERROR RETURNS AS IT IS USED IN PRESENTMULTIPLE +; IF OBJECT=C0 THEN ONTRET +; IF PLAYER<>USER THEN NPCLOOKSFORSOMETHING +; IF HISEARCHPOS=NOUNONGROUND THEN ONT1 +; IF HISEARCHPOS=NONSPECIFIC THEN CANTSEEIT +; MESSAGE 2012 ; don't have.. +;.ONTERROR +; MESSAGE THE +; PARSEX1=OBJECT +; GOSUB @DESCTHEOBJX1 +; MESSAGE DOT +; GOTO @CANCELINPUT + +;.ONT1 +; POS=PLAYER +; HIPOS=NONSPECIFIC +; GOSUB @CHECKOBJECTPOS +;>> GOSUB ISOBJECTCARRIED +;>> IF RESULT=TRUE THEN ONT2 +;>>.CANTSEEIT +;>> IF OBJECT=IEVERYTHING THEN CANTUSEHERE ; EVERYTHING as NOUN2 +;>> GOSUB ISOBJECTCARRIED +; POS=PLAYER +; HIPOS=NONSPECIFIC +; GOSUB @CHECKOBJECTPOS +;>> IF RESULT=TRUE THEN ONT2 +;>> MESSAGE 2011 ; Can't see .. +;>> GOTO ONTERROR +;>>.ONT2 +;>> IF VERB=ISTAND THEN ONTDROPFIRST +;>> MESSAGE 2013 ; Already have .. +;>> GOTO ONTERROR + +;>>.ONTDROPFIRST +;>> MESSAGE 2014 ; have to drop it first +;>>.ONTRET +;>> RETURN +;---- +;>>.ITSNOTTHERE +; user asked for NOUN1 in NOUN2 or similar +; but NOUN1 is not contained by NOUN2 +;>> MESSAGE 2017 ; it's not there +;>> RETURN +;--- +;.PARSEINPUT +; CONVERT INPUT TO VERB, PREP, OBJECT FORM FOR +; EASY UNDERSTANDING BY THE REST OF THE PROGRAM +; HAVECALLEDVERB=FALSE +; GOSUB @GETNEXTWORD +; VERB=C0 +; IF EOL=TRUE THEN @PIEND; NOTHING ENTERED ! +; +;; is player trying to talk to someone ? +; SEARCHTYPE=NOUNTYPE +; GOSUB @CHECKTYPE +; IF VALUENPCMAX THEN PINOTNPC +;; yes, so is the target here ? +; OBJECT=VALUE +; GOSUB CHECKIFPRESENT +; IF RESULT=TRUE THEN PINPC +; MESSAGE 2060 ; talking to yourself ? +; GOTO CLEARINPUT +; +;.CANTTALKTOSEVERAL +;; can't talk to more than one person +; MESSAGE 2061 +; GOTO CLEARINPUT +; +;.PINPC +;; set up conversation target as player +; IF PLAYER<>USER THEN CANTTALKTOSEVERAL +; PLAYER=VALUE +; GOSUB SETUPROOM +; GOSUB GETNEXTWORD ; first word of what's said +; GOTO SAY +; +;>>.LASTVERBINVALID +; IF PLAYER<>USER THEN NPCNOTUNDERSTAND +;>> PARSEM1=2050 ; last verb not valid +;>> GOSUB @VARYMESSAGE +;>> GOTO @CANCELINPUT + +;.PI0A +;>> IF VALUE<>IRAM THEN PI0B ;>> +;>> GOSUB @GETNEXTWORD ;>> +;>> I2=VALUE ;>> +;>> GOTO @RAMCOMMAND ;>> + +; +;.PION0 +; IF OBJECTSPELLMAXPLUSONE THEN PION1 +; SPELL=OBJECT +; GOTO PINEXT + +;.PION1 +;; hold on a moment. There are certain constructs where +;; the first noun can be the destination +;; e.g. "GIVE ME THE MANDRAKE" +; IF VERB<>IGIVE THEN PION2 +; IF OBJECT=USER THEN PIGIVE +; IF OBJECT>NPCMAX THEN PION2 +; IF OBJECT>NPCBASE THEN PIGIVE +; +;>>.PIGIVE +;>> IF PREP<>C0 THEN DONTUNDERSTAND +;>> NOUN2=OBJECT +;>> EVENTUALPREP=ITO +;>> GOTO @PINEXT +;--- +;>>.CNNOTCLEAR1 +;>>; OBJECT>MAXOBJECT, see if it is valid +;>> IF OBJECT=IEVERYTHING THEN CHECKNNORMAL +;>> IF OBJECT=IIT THEN CHECKNNORMAL +;>> IF OBJECT=IEXCEPT THEN CHECKNNORMAL +;>> GOTO @NOTCLEAR +; +;.CHECKNOUNEND +; IF OBJECTSPELLMAXPLUSONE THEN CNENSPELL +; GOTO CHECKNNORMAL +;--- +; .CHECKOBJECTPOS +; Return RESULT=TRUE if 'OBJECT' is +; at 'HIPOS', 'POS' +; if POS=0, it is treated as NONSPECIFIC +; likewise, HIPOS=NONSPECIFIC is handled +; return PARSEX4=lo position of object (or object if on ground) +; PARSEX4=OBJECT +;.COP1 +; IF POS=C0 THEN COPHI +; PARSEX1=CURRENTPOS(PARSEX4) +; IF PARSEX1<>POS THEN @COPNOTYET +;.COPHI +; lo address is same, now check hi address +; PARSEX1=HICURRENTPOS(PARSEX4) +; IF PARSEX1=C0 THEN COPHI1 +; IF HIPOS=NONSPECIFIC THEN COPFOUND ; provided object is contained +;.COPHI1 +; IF PARSEX1<>HIPOS THEN COPNOTYET +;.COPFOUND +; RESULT=TRUE +; RETURN +;.COPNOTFOUND +; RESULT=FALSE; +; RETURN +; +;.COPNOTYET +; PARSEX1=HICURRENTPOS(PARSEX4) +; IF PARSEX1=C0 THEN COPNOTFOUND +; PARSEX4=CURRENTPOS(PARSEX4) +; GOTO COP1 +;--- +;.CHECKIFPRESENT +;; is OBJECT in same room as player ? +; SAVEHISEARCHPOS=HISEARCHPOS +; HISEARCHPOS=NONSPECIFIC +; GOSUB CHECKIFACCESSIBLE +; HISEARCHPOS=SAVEHISEARCHPOS +; RETURN + +;----- +;.CONVERTVERB +; IF VERB<>ITAKE THEN CVNTAKE +;; GET ON etc. +; IF PREP<>ON THEN CVNGETON +; VERB=UP +; PREP=0 +;.CVNGETON +;.CVNTAKE +; RETURN +;--- + + +;--- +.CONVERTVERB +; Given VERB,PREP, convert to standard forms of certain commands +; e.g. LOOK AT => EXAMINE ; GET ON => STAND ON ; GET OFF => LEAVE +; This is called as soon as the first noun is found - so +; if it is necessary to separate prepositions before+after nouns, +; this is a good place to do it + + GOSUB @SETUPROOM + + IF VERB<>ILOOK THEN CVNOTLOOK + IF PREP=0 THEN CVNOTLOOK + VERB=IEXAMINE + PREP=0 + +.CVNOTLOOK + IF VERB<>IGET THEN CVNGETON + IF PREP<>IPON THEN CVNGETON +.CVUP + VERB=11 ; on autoscythe + PREP=0 + +.CVNGETON + IF VERB<>IGET THEN CVNGETOFF + IF PREP<>IPOFF THEN CVNGETOFF + VERB=12 ; off autoscythe + PREP=0 + +.CVNGETOFF +; IF VERB<>IVON THEN CVNOTON +; PREP=IPON +; VERB=ISTAND +; +;.CVNOTON +; IF VERB<>IVOFF THEN CVNOTOFF +; PREP=IPOFF +; VERB=ISTAND +;.CVNOTOFF + +.CVNOTONOFF +; this code doesn't seem to work, so it is commented out at present: +; IF VERB<>IDROP THEN CVNDROP +; IF PREP=0 THEN CVNDROP +; IF NOUN2=NULLOBJECT THEN CVNDROP ; ignore PREP if no second noun +;; DROP noun1 PREP noun2 +;; probably equivalent to PUT noun PREP noun2 +; VERB=IPUT + +.CVNDROP + IF VERB<>ITAKE THEN CVNTAKE +; take off something (REMOVE something) + IF PREP<>IPOFF THEN CVNTAKE + IF NOUN1<>NULLOBJECT THEN CVNTAKE +; VERB=IREMOVE +; just TAKE ... + PREP=0 + +.CVNTAKE + IF VERB<>IPUT THEN CVNPUT +; put on something (WEAR something) + IF PREP<>IPON THEN CVNPUTON + IF NOUN1<>NULLOBJECT THEN CVNPUT + VERB=IWEAR + PREP=0 + RETURN +.CVNPUTON +; IF PREP<>IPOUT THEN CVNPUT +;; put out => extinguish +; VERB=IEXTINGUISH ; put candle out +; IF NOUN1<>NULLOBJECT THEN CVNPUT +; NOUN1=NOUN2 ; put out candle +; +.CVNPUT +; IF VERB<>IGET THEN CVNGET +; VERB=ITAKE + +.CVNGET + RETURN +;--- +;-------------------------------------------------------- +;-------------------------------------------------------- +;-------------------------------------------------------- diff --git a/l9dev/regress/games.l9/eden.l9/apconst.txt b/l9dev/regress/games.l9/eden.l9/apconst.txt new file mode 100644 index 0000000..8454e04 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/apconst.txt @@ -0,0 +1,185 @@ + +;Parser constants, variables and lists for Converted Trilogies + +;Copyright (C) 1986 Level 9 Computing + +;B:APCONST.TXT + +;----- + +; Most constants are game-specific. + +CONST + +;----- + ibutton=164 + + MINSTATUS=1 + MAXSTATUS=2 + GAMECODE=5 ;Unique game number + previousgamecode=4 + GAMECOMPLETE=133 ;GAMECODE+128 + PREVIOUSGAMECOMPLETE=132 ;Only required for second/final part + + FIRSTPART=0 ;If non-zero prevents RESTORE from chaining + FINALPART=0 ;If non-zero at end of game does not SAVE + + justplaying=0 + endposition=1 + solving=2 +;--- + + MINNOUNADJUST=80 ;Lowest 'INV' object message + MAXNOUNADJUST=234 ;>> MIKE 30/7/86 - was 149 ;Highest + ADJUSTOFFSET=0 ;>>NOUNOFFSET-MINNOUNOFFSET + +;----- + +; NOW CONSTANTS FOR COMMON MESSAGES + SPACE=3011 + COMMA=3000 + CR=3003 + AND=3010 + DOTCR=3004 + DOT=3001 + COLON=3002 + QUOTE=3008 + OK=2006 + + NONSPECIFIC=31 ; USE IN POSITION SEARCH WHERE TYPE UNKNOWN + +; Bases for text blocks + OBJECTDESCBASE=0 ;>> 1000 + SHORTROOMDESCS=64936 ;>>MIKE 29/7/86 - 64694 ;>> 65461 ;>> 400 + + MAXOBJECTVISIBLE=148 ;>> ANDY 23/7/86 + MINOBJECT=79 ;>> 69 ; actually MINOBJECT-1 + MAXOBJECT=233 ;>>197 + +; Now verb definitions + + ISAVE=28 + INORTH=1 + ICROSS=11 ;>> Highest direction for EXIT command. + IAGAIN=20 + IQUIT=26 + IRESTORE=27 + IYES=30 + INO=31 + IEXAMINE=35 +; ILOOK=37 + IEXITS=39 +; ITAKE=40 + IDROP=41 + ITHROW=43 + ipush=53 + isay=65 + IOOPS=13 ;>> 68 + IRAM=14 ;>>69 + IEVERYTHING=250 + IEXCEPT=251 + IIT=252 + ITHEN=253 + +; SAYINGS (RELATIVE TO NOUNOFFSET) + + IGARBAGE=2999 + + NULLOBJECT=255 + +; WORD TYPE VALUES + + ASCITYPE=0 + VERBTYPE=2 ; V + CONJTYPE=4 ; J + PREPTYPE=6 ; P + NOUNTYPE=8 ; N + ADJETYPE=10 ; A + MATCHTYPE=12 ; C - used for matching with particular words - + ; e.g. was a reference to scenery the word 'panel' + NUMBTYPE=14 + + ASCIOFFSET=0 + VERBOFFSET=1000 + CONJOFFSET=1000 ; ??? + PREPOFFSET=3900 + NOUNOFFSET=1000 + ADJEOFFSET=0 ; ??? + MATCHOFFSET=4300 ; used for matching with particular words + NUMBEROFFSET=240 ; offset within NOUNOFFSET + HINUMBEROFFSET=249 ; highest number offset + +; ASCII VALUES + ICOMMA=44 + IDOT=46 + +;----- + + FALSE=0 + TRUE=1 + +; Constants for Objecttable assignments + + NOUNCARRIED=1 + NOUNONGROUND=2 + NOUNSPECIFIED=128 + NOUNFORBIDDEN=192 + + NEGATIVE=50000 + +;----- + +VAR + PARSEX1 PARSEX2 PARSEX3 PARSEX4 PARSEX5 PARSEX6 + VERB PREP NOUN1 NOUN2 + VALUE + INDEX + FROM DEST STATUS ROOM DIR NUMEXITS + NUMDIRECTIONS + EXITVISIBLE + CURRENTOBJECT OBJECT ;>>** HIPOS POS SEARCHPOS ;***** + HISEARCHPOS + LASTWORDPRINTED + OUTPUTWORD + RESULT + WORD1 WORD2 WORD3 WORD4 + PARSEM1 + LASTPICTURE + + SEARCHTYPE WORDTYPE EXCEPT + + WORDNOTPROCESSED EOL SEPARATOR EVERYTHING NOMOREINPUT + PROCESSED SUPRESSCHECKING + ITWORD + AGAINVERB + VERBSTOCALL HAVECALLEDVERB SOMETHINGPROCESSED LASTVERBVALID + + CURRENTMESSAGE + DOOR + LASTOOPSROOM + OOPSPOSEND + NEXTOOPSPOS NEXTOOPSEND +;----- + +TABLE + OUTPUTBUFFER=7 + OBJECTTABLE=8 ; USED FOR EVERYTHING AND SIMILAR WORDS + LINPUT=9 + +;----- +CONST ;>> All these MIKE 30/7/86 + ILOOK=37 + IGET=40 + ITAKE=40 + IWEAR=42 + IPON=12 + IPOFF=7 + IPUT=66 + UP=9 + DOWN=10 +;-------------------------------------------------------- +;------------------------------------------------------------ +;------------------------------------------------------------ +;-------------------------------------------------------- +;--------------------------------------------------------------------- +;---------------------------------------------------------------------- diff --git a/l9dev/regress/games.l9/eden.l9/aspecial.txt b/l9dev/regress/games.l9/eden.l9/aspecial.txt new file mode 100644 index 0000000..6f4dd9f --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/aspecial.txt @@ -0,0 +1,2810 @@ +;Converted Return to Eden + +;B:ASPECIAL.TXT + +;Copyright (C) 1986 Level 9 Computing + +; last change 6/12/86 +; +; CBM 64 version of Silicon Dreams finalised about 30/10/86 +; +; Changes after CBM version... +; +; 31/10/86 - .l40000 - dot printed after examine messages >>mike +; in most (any?) released versions +; 6/12/86 - code added in isobjecthere +; and in parser to permit mutiple references to the same +; object for noun2 +; to fix l63800 to fix "EXAMINE BIG ROBOT" and +; "GIVE CARD TO BIG ROBOT" bugs + + +CONST + edendoor=234 + +BEGIN +.STARTGAME + CLEAR + C1=1 + C2=2 + C3=3 + C4=4 + GOSUB @INITPARSER + VERSION=GAMECODE ;>> + gamesolved=justplaying ;>>mike 26/10/86 + +.RETURNTOSTART + SCREEN G C1 ;>> + CLS G ;>> + P9=743 ;>> + PICTURE P9 ;>> + + +; RETURN TO EDEN 22/8/84 +; COPYRIGHT (C) 1984 LEVEL 9 COMPUTING. +;>> SCREEN G C1 +;>>.L1000 ; + + ; START + M3=400 + T4=C0 + B7=20 + B8=20 + B9=171 + C1=1;SET CONSTANTS + C2=2 + C3=3 + C4=4 + C5=254 + C6=255 + C7=253 + C8=252 + R1=243;STARTING ROOM + P4=42 + P5=43 + A6=12 + A7=2 + B0=5 + S9=50 + D4=7 ; last move - so that BACK takes player into the cupboard + E1=80;SET OBJECT START POSITIONS +.L1110 E2=LIST1(E1) + LIST2(E1)=E2 + ADD E1,C1 + IF E1<234 THEN L1110 + O4=4 +.L1300 RANDOM X0 + IF X0>8 THEN L1300 + G1=660 + ADD G1,X0 + ; + ; RESTART + MESSAGE 255;WELCOME + GOSUB @INITOOPS ;>> + I5=37;LOOK +;>>mike 24/9/86 SCREEN G C0 +.L3000 ; + GOSUB @L8100 + GOSUB @L8221 +.DESCRIBE +.L3010 ; print ROOM DESC + IF A9<>C1 THEN L3015 + MESSAGE 370 +.L3015 + IF A8<>C1 THEN L3030 + MESSAGE 369 +.L3030 R2=R1 + GOSUB @L54000;STATUS + GOSUB @L55000;LIGHT? + IF L3>C0 THEN L3200 + MESSAGE 48;IT'S DARK + CLS G; + P9=C0 ;last picture=0 +; and go to dark screen + x1=19 ; chgcol dcode + list9(c0)=x1 + list9(c1)=c0 + list9(c2)=c0 + driver + GOTO L3300 +.L3200 + GOSUB @L48000;MESSAGE R2 DETAILS +.L3300 MESSAGE S1 + MESSAGE 5 + MESSAGE S2 + MESSAGE 5 + ;DESC SPECIAL CASES + IF R2<>51 THEN L3420 + IF V0<>C1 THEN L3420 + MESSAGE 338 +.L3420 ; +.L4000 ; + ; INROOM PRE-COMMAND + IF R1<>R2 THEN L4039 + IF U2=C0 THEN L4030 + X0=805 + ADD X0,U2 + MESSAGE X0 + IF X0=810 THEN @L49000 + ADD U2,C1 +.L4030 IF R1<235 THEN L4039 + IF R2>241 THEN L4039 + ADD U3,C1 + IF U3<12 THEN L4039 + MESSAGE 817 + GOTO @L49000 +.L4039 + R2=R1 + GOSUB @L54000;STATUS + ADD T1,C1 + ADD T3,C1 + ADD B0,C1 + IF B0<>4 THEN L4120 + MESSAGE 283 +.L4120 IF B1=C0 THEN L4140 + ADD B1,C1 +.L4140 IF A1=C0 THEN L4150 + ADD A1,C1 +.L4150 ; + ; + ADD T2,C1 + IF T212 THEN L4300 + ;CAN YOU SEE SKYHOOK? + IF R2>6 THEN L4300 + MESSAGE 274;SKYHOOK DESCENDS +.L4300 IF T1<>19 THEN L4400 + IF R2=18 THEN @L45000 +.L4320 MESSAGE 261;BLASTED + GOTO @L49000 + ; +.L4400 IF T1<>13 THEN L4450 + IF R2>6 THEN L4430 + MESSAGE 275;LIGHTNING +.L4430 MESSAGE 276;THUNDER +.L4450 IF T1<>14 THEN L4500 + IF R2>6 THEN L4500 + MESSAGE 277;ASCENDS +.L4500 IF R2<>18 THEN L4600 + IF T1>33 THEN L4600 + IF T3<>C1 THEN L4550 + MESSAGE 259 +.L4550 IF T3=2 THEN @L45000 +.L4600 ; + ;RANDOM EVENTS IN FOREST + IF R2<30 THEN L5100 + IF R2>68 THEN L5100 + RANDOM X0 + IF X0>50 THEN L4900 + M1=290 + GOSUB @L64500 + X0=LIST2(117);RADSUIT + IF X0<>255 THEN L4900 + MESSAGE 293 + ADD A0,C1 + IF A020 THEN L5100 + IF P0=C1 THEN L5100 + ;PARROT + GOSUB @L11500 + IF I2=C0 THEN L5100 + GOSUB @L57500 + X0=26 + LIST2(I2)=X0 + MESSAGE 282 + LIST2(156)=X0 + ; +.L5100 +;>>mike 26/8/86 - this code added to make +; bird appear on moving into sward room +; make bird appear if at sward, and not already here + if r2<>59 then notbirdappear + x1=list2(196) ; bird here? + if x1=r2 then notbirdappear +; pea eaten? + x1=list2(105) + if x1=c8 then notbirdappear ; yes + message 284 ; bird appears overhead + list2(196)=r2 +.notbirdappear +;>>mike 26/10/86 - the following lines removed + +;>> IF B1=2 THEN L5150 +;>> IF B1> IF B1<10 THEN L5200 +;>> IF B1<>10 THEN L5300 +;>> MESSAGE 285 +;>> GOTO L5280 ;KILL BIRD +;>>.L5150 +;>> MESSAGE 284 ; bird appears +;>>.L5200 +;>> LIST2(196)=R2 +;>> X0=LIST2(105) +;>> IF X0<>R2 THEN L5300 +;>> MESSAGE 286 ;BIRD EATS +;>> I2=105 +;>> GOSUB @L57500 +;>> LIST2(99)=R2 +;>>.L5280 LIST2(196)=C8 +;>> B1=100 +.L5300 IF R2<>59 THEN L5350 + IF B2=C1 THEN L5350 + IF T3<>4 THEN L5350 + MESSAGE 305 + B2=C1 + LIST2(205)=R2 + LIST2(108)=R2 +.L5350 + IF P1=C1 THEN L5400 + IF T1<>150 THEN L5370 + MESSAGE 308 + GOTO L5400 +.L5370 IF T1<>155 THEN L5380 + MESSAGE 309 + GOTO L5400 +.L5380 IF T1<>160 THEN L5400 + MESSAGE 310 ; radiation sickness + GOTO @L49000 +.L5400 IF R2<26 THEN L5500 + IF R2>74 THEN L5500 + ;GUNSHIP? + IF G0<>C1 THEN L5450 + MESSAGE 312 + G0=C0 + RANDOM X0 + IF X0>40 THEN L5500 + IF T3>C1 THEN L5500 + MESSAGE 313 + GOTO @L49000 +.L5450 RANDOM X0 + IF X0>30 THEN L5500 + MESSAGE 311 + G0=C1 +.L5500 IF A1=C0 THEN L5520 + IF A1<>8 THEN L5504 + MESSAGE 351 + GOTO L5520 +.L5504 IF A1<12 THEN L5510 + GOSUB @L44185 + GOTO L5520 +.L5510 MESSAGE 349 + LIST2(204)=R2 + ; +.L5520 IF R2<84 THEN L5540 + IF R2>98 THEN L5540 + X0=LIST2(83) + IF X0=255 THEN L5540 + MESSAGE 362 + GOTO @L49000 + ; +.L5540 IF R2<76 THEN L5570 + IF R2>82 THEN L5570 + ADD W4,C1 + X0=LIST2(90) + IF X0<>254 THEN L5555 + MESSAGE 375 + GOTO L5560 +.L5555 X0=372 + IF W4<4 THEN L5560 + if w4<7 then drowningok ;>>mike 23/8/86 + w4=4 ; reset drowning flag, cause out of range +.drowningok + ADD X0,W4 + MESSAGE X0 + IF X0=378 THEN @L49000 +.L5560 GOTO L5580 +.L5570 W4=0 +.L5580 IF R2<84 THEN L5600 + IF R2>87 THEN L5600 + M1=381 + GOSUB @L64500 + IF R2=87 THEN L5595 + IF R2=84 THEN L5595 + IF A9=C1 THEN L5595 + IF A8=C1 THEN L5595 + RANDOM X0 + IF X0>180 THEN L5595 + MESSAGE 384 + GOTO @L49000 +.L5595 MESSAGE 385 +.L5600 IF R2<84 THEN L5610 + IF R2>100 THEN L5610 + RANDOM X0 + IF X0>20 THEN L5610 + M1=387 + GOSUB @L64500 + ; +.L5610 ; + ; + IF R1<137 THEN L5650 + IF R1>139 THEN L5650 + X0=LIST2(218) + IF X0<250 THEN L5642 + RANDOM X0 + IF X0>40 THEN L5660 + MESSAGE 653 + LIST2(218)=R1 + GOTO L5660 +.L5642 ; + RANDOM X0 + IF X0>80 THEN L5660 + MESSAGE 654 + GOTO @L49000 +.L5650 LIST2(218)=C8 + ; +.L5660 IF R2<>152 THEN L5670 + X0=LIST2(107) + IF X0=254 THEN L5668 + MESSAGE 656 + GOTO @L49000 +.L5668 MESSAGE 657 +.L5670 ; + ;PARKS + ; + ; + IF R2<>150 THEN L5810 + RANDOM X0 + IF X0>80 THEN L5810 + M1=675 + GOSUB @L64500 + ; +.L5810 X0=LIST2(131) + IF X0<>254 THEN L5840 + IF R2<>114 THEN L5815 + MESSAGE 754 + GOTO L5840 +.L5815 RANDOM X0 + IF X0>80 THEN L5840 + IF X0>20 THEN L5830 + GOSUB @L11500;KLEPTO + MESSAGE 753 + IF I2=C0 THEN L5840 + GOSUB @L57500 + X0=185 + LIST2(I2)=X0 + MESSAGE 756 + GOTO L5840 +.L5830 M1=750 + GOSUB @L64500 + ; +.L5840 GOSUB @L9700;RIVERBOAT + ; + IF R2<>124 THEN L5860 + MESSAGE 767 + ; +.L5860 GOSUB @L10500 + ; + IF R2<>124 THEN L5880 + ADD B5,C1 + ; +.L5880 IF T1<>U0 THEN L5890 + MESSAGE 792 + ADD S6,S9 + ; +.L5890 IF R2<>233 THEN L5900 + X0=LIST2(132) + IF X0=233 THEN L5895 + MESSAGE 795 + GOTO L5900 +.L5895 MESSAGE 798 + IF T1<>U1 THEN L5899 + MESSAGE 802 + GOTO @L49000 +.L5899 ; +.L5900 IF R2<235 THEN L5910 + IF R2>241 THEN L5910 + M1=814 + GOSUB @L64500 + D2=C1 + ; +.L5910 IF R2<>211 THEN L5930 + X0=LIST2(142) + IF X0<>255 THEN L5920 + IF V2=C1 THEN L5930 + V2=C1 + V3=823 ;>> Default to intro selection, BUG FIX 10/06/86 + MESSAGE 821 ;The screen lights + MESSAGE 823 ;Screen menu + GOTO L5930 +.L5920 IF V2=C0 THEN L5930 + MESSAGE 822 ;The screen fades + V2=C0 +.L5930 ; + ; + ;-- +.L6000 ; + ; COMMAND +.RESETSTACK + STACK;CLEAR STACK + GOSUB @L6033;SET UP RETURN ADDR + GOTO @L8000 +.L6033 + GOSUB @OOPSCHECK ;>> mike 8/11/86 - moved up from below + +.i4check ;>>mike 8/11/86 + O2=C1;OK + R2=R1 + ; +;>> MESSAGE 28;WHAT NOW? +;>>mike 8/11/86 GOSUB @OOPSCHECK ;>> + GOSUB @GETCOMMAND ;>> GOSUB @L56500;INPUT +;>>mike 8/11/86 - was GOSUB @SAVEOOPS ;>> + IF I4=C0 THEN i4check ;>> mike 8/11/86 - was L6033 ;>> + ;GOSUB @L55500;MESSAGE I1,I2,I3,I4 +.L6070 IF I1=C0 THEN @L64000;WOT? + IF I1<>20 THEN L6090;AGAIN + I1=I5 + GOTO L6165 + ; +.L6090 ; + IF I4=C1 THEN L6101 + IF I1=21 THEN L6110 + IF I1=35 THEN L6110 +.L6101 IF I1<40 THEN L6200;INTRANS + IF I1=65 THEN L6200 + IF I1<70 THEN L6110 ;WAS I1<80 - FIX FOR COMPUTE RADCOM BUG 13/10/84 + I2=I1 + MESSAGE 67;DO WHAT WITH + GOTO @L64650;I2 . CR +.L6110 IF I2>79 THEN L6160;OK OBJECT + IF I48 THEN @L64300;TOO COMPLEX + GOTO @L64200;BAD OBJECT + ; +.L6160 IF I2=250 THEN L6165;IT + IF I3<>250 THEN L6170 +.L6165 I2=I6 + I3=I7 + I4=I8 + GOTO L6070 + ; +.L6170 +;>>unsigned, undated <21/1/86 - IF I2=251 THEN L6200;EVERYTHING + IF I1=65 THEN L6200;SAY + GOSUB @L61500;OBJECT HERE/CARRIED? +.L6200 ; + ; + ; + ; + ; + ; ACT ON COMMAND + GOSUB @L47000;SAVE ENTERED CMD + ; +;unsigned, undated, before 21/8/86 IF I2=251 THEN @L11000;EVERYTHING + ; + IF I1>67 THEN @L64000;WOT? >>mike 20/8/86 - was 79 (WAS WRONG!) + JUMP @L7120 I1 +.L7120 DATA @L64000,@L14000,@L14000,@L14000,@L14000,@L14000 ;0-5 + DATA @L14000,@L14000,@L14000,@L14000,@L14000 ;6-10 +;>> DATA @L14000,@L14000,@L14000,@L14000,@L65300 ;11-15 + DATA @L14000,@L14000,@OOPS,@RAMCOMMAND,@L65300 ;11-15 ;>> + DATA @L14000,@L14000,@L35000,@L14000,@L14000 ;16-20 + DATA @L15000,@L16000,@L16500,@L26000,@L26500 ;21-25 + DATA @L18000,@L18500,@L19000,@L20000,@L19500 ;26-30 +;>> @AUTHORS was @L64000 + DATA @L19500,@L21000,@AUTHORS,@L64000,@L39000 ;31-35 + DATA @L65300,@L17000,@L63300,@PRINTEXITS,@L22000 ;36-40 + DATA @L23000,@L24000,@L25000,@L41000,@L63500 ;41-45 + DATA @L63500,@L27000,@L28000,@L29000,@L64000 ;46-50 + DATA @L64000,@L64000,@L31000,@L32000,@L64000 ;51-55 + DATA @L33500,@L34000,@L64000,@L13500,@L64000 ;56-60 + DATA @L36000,@L37500,@L35500,@L38000,@L13000 ;61-65 + DATA @MAKE,@catapult ;66-67 - MIKE 21/8/86 +;>> DATA L64000,L64000,OOPS,RAMCOMMAND ;>>66-69 +.L8000 ; + ; IN-ROOM POST-COMMAND + MESSAGE 5;CR + GOSUB L8100 + IF A9=C1 THEN @L3010 + IF A8=C1 THEN @L3010 + GOTO @L4000 + ;SPECIAL CASES BEFORE DESCRIPTION +.L8100 X3=200; MOVE AUTOSC & WEEDER + A5=A9 + X2=A7 + M1=363 + GOSUB @L10000;AUTOSCYTHE + A7=X2 + A9=A5 + X3=201 + M1=364 + X2=A6 + A5=A8 + GOSUB @L10000;WEEDER + A6=X2 + A8=A5 + ; + IF R1=71 THEN L8210 + IF R1=73 THEN L8210 + IF R1<>75 THEN L8220 +.L8210 IF L0=C1 THEN L8220 + LIST2(207)=R1 + ; +.ENDCOMMAND ;>> +.L8220 RETURN +.L8221 IF R1=99 THEN L8230 + IF R1<>100 THEN L8240 +.L8230 IF F0=C1 THEN L8240 + LIST2(170)=R1 +.L8240 IF R1<>112 THEN L8250 + MESSAGE 835 + X0=179 + GOSUB @L21500 +.L8250 + IF R1=P4 THEN L8255 + IF R1<>P5 THEN L8260 +.L8255 MESSAGE 854 +.L8260 ; + RETURN +.L9700 ; RIVERBOAT + ADD T4,C1 + IF T4<20 THEN L9710 + T4=C0 +.L9710 X0=LIST2(186) + X1=126 + IF X0<>126 THEN L9750 + X1=124 +.L9750 X2=X0 + IF T4=C0 THEN L9765 + IF T4<>10 THEN L9770 +.L9765 X2=X1 +.L9770 ; + IF X0=X2 THEN L9800 + IF X0<>R2 THEN L9790 + MESSAGE 763 +.L9790 IF X1<>R2 THEN L9800 + MESSAGE 762 +.L9800 LIST2(186)=X2 + RETURN + +.L10000 ;PROGRAMMED MOVEMENTS +;>>unsigned, undated, before 21/8/86 GOSUB @SAVEOOPS ;>> + ;M1=NAME OF OBJECT + ;X2=OFFSET IN LIST 4 + ;X3=OBJECT NUMBER + X4=LIST2(X3) + ADD X2,C1 + X5=LIST4(X2) + IF X5<>C0 THEN L10020 + ADD X2,C1 + X2=LIST4(X2) +.L10020 X5=LIST4(X2) + LIST2(X3)=X5 + IF X4=R2 THEN L10030 + IF X5<>R2 THEN L10070 +.L10030 IF A5=C1 THEN L10032 + MESSAGE M1 +.L10032 IF X4<>X5 THEN L10040 + IF A5=C1 THEN L10035 + MESSAGE 371;WAITS +.L10035 GOSUB L10200 + GOTO L10070 +.L10040 IF A5=C1 THEN L10070 + IF X4<>R2 THEN L10050 + MESSAGE 366;LEAVES + GOTO L10070 +.L10050 IF X5<>R2 THEN L10070 + MESSAGE 365;ARRIVES + ; +.L10070 ;SHOULD PLAYER MOVE WITH IT? + IF A5<>C1 THEN L10080 + R1=X5 +.L10080 ; + RETURN + +.L10200 ;SHOULD IT TIP UP RUBBISH? + IF X4<>87 THEN L10250 + MESSAGE 367 ;tips rubbish... + IF A5=C0 THEN L10250 + MESSAGE 368 ;...including you +;>>unsigned, undated, before 21/8/86 GOSUB @SAVEOOPS ;>> + R1=84 + A5=C0 + R2=R1 +.L10250 RETURN + ;--- +.L10500 ;TRAIN + IF T8<>169 THEN L10525 + ADD T0,C1 + IF T0169 THEN L10600 + IF T9<>C3 THEN L10580 + IF T7<>C2 THEN L10580 + IF R2=172 THEN L10550 + IF R2<>170 THEN L10600 +.L10550 IF R2=170 THEN L10580 + M1=777;GOES PAST + GOSUB L10900 + GOTO L10525 +.L10580 ; + M1=774;TRAIN GLIDES IN + GOSUB L10900 + IF R2=T8 THEN hitbytrain +.L10600 ; + ; + ; + ; + RETURN + ;--- +.hitbytrain ;>>mike 22/8/86 + message 797 ; train hits you while you're waiting + goto @l49000 +;---- +.L10900 IF R2=172 THEN L10920 + IF R2<>170 THEN L10950 + IF T7<>R7 THEN L10950 +.L10920 MESSAGE M1 +.L10950 RETURN + +;>>all these unsigned, undated, before 21/8/86 .L11000 ; +; EVERYTHING +;>> IF I1=40 THEN L11100;TAKE +;>> IF I1=41 THEN L11200;DROP +;>> GOTO @L63500;CAN'T DO THAT +; +;>>.L11100 E4=80 +;>>.L11110 E2=LIST2(E4) +;>> IF E2<>R1 THEN L11150 +;>> I2=E4 +;>> GOSUB @L51000;GAIN (HELD) +;>>.L11150 ADD E4,C1 +;>> IF E4<150 THEN L11110 +;>> RETURN + ; +.L11200 E4=80 +.L11210 E2=LIST2(E4) + IF E2<>C5 THEN L11250 + I2=E4 + GOSUB @L53000;DROP +.L11250 ADD E4,C1 + IF E4<150 THEN L11210 + RETURN + ; +.L11500 ;KLEPTO CREATURES + X0=81 +.L11502 X1=LIST2(X0) + IF X1<>254 THEN L11600 + IF X0=131 THEN L11600 + IF X0=93 THEN L11600 + IF X0=94 THEN L11600 + IF X0=123 THEN L11600 + IF X0=102 THEN L11600 + IF X0=108 THEN L11600 + IF X0=105 THEN L11600 + I2=X0 + GOSUB @L57500 + RETURN +.L11600 ADD X0,C1 + IF X0<130 THEN L11502 + I2=C0 + RETURN +.L12000 ; COUNT MONEY + IF M3<60000 THEN L12010 + M3=C0 +.L12010 X0=LIST2(124) + IF X0=254 THEN L12100 + M4=C0 + RETURN +.L12100 M4=M3 + RETURN + ; + ;---- +.L13000 ; SAY I2 + X0=LIST2(124) + IF X0<>254 THEN L13200 + IF R2<>132 THEN L13200 + IF G2>8 THEN L13033 + GOSUB L13150 + IF I2<>G1 THEN L13100 + MESSAGE 396;RIGHT ! + X0=100 + ADD M3,X0 + ;NEXT RIDDLE + ADD G2,C1 + IF G2<9 THEN L13040 +.L13033 MESSAGE 398;RUN OUT + RETURN +.L13040 ADD G1,C1 + IF G1<669 THEN L13045 + G1=660 +.L13045 ; + IF G1<>G2 THEN L13070 + MESSAGE 398 + RETURN +.L13070 MESSAGE 399 + MESSAGE G1 + RETURN +.L13100 MESSAGE 395;WRONG + X0=100 + SUB M3,X0 + IF M3<50000 THEN L13120 + MESSAGE 397 + GOTO @L49000 +.L13120 MESSAGE G1 + RETURN + ;-- +.L13150 ;COMPARE I2 WITH G1 + IF I2<>86 THEN L13155 + I2=71 +.L13155 IF I2<>171 THEN L13160 + I2=78;FIRE +.L13160 X0=71 + SUB I2,X0 + X0=660 + ADD I2,X0 + RETURN +.L13200 IF R2<>124 THEN L13300 + IF I2<>178 THEN L13210 + X0=769 + X1=770 + GOTO L13220 +.L13210 IF I2<>179 THEN L13300 + X0=770 + X1=769 + IF M3>35000 THEN L13224 +.L13220 MESSAGE 768 ;Wheel spins + IF B5<8 THEN L13250 +.L13224 ;LOSE + MESSAGE X1 + MESSAGE 772 ;You loose + X0=1000 + SUB M3,X0 + IF M3>64000 THEN L13290 + RETURN +.L13250 MESSAGE X0 + MESSAGE 771 ;You win! + X0=5000 + ADD M3,X0 + RETURN +.L13290 +;>> GOSUB @SAVEOOPS ;>> + MESSAGE 766 ;Bankrupt + M3=C0 + R1=126 + RETURN +.L13300 ; + GOTO @L64400 + ;--- +.L13500 ; SQUEEZE I2 + IF I2<>87 THEN L13590 + I2=100 + GOSUB @L60000 + IF O2=C0 THEN @L64400 + GOSUB @L57500 + I2=87 + GOSUB @L57500 + MESSAGE 321 + ADD S6,S9 + LIST2(91)=R2 + RETURN +.L13590 MESSAGE 320 ;Can't squeeze + RETURN + +.L14000 ; + ; MOVE C +;>>unsigned, undated, before 21/8/86 GOSUB @SAVEOOPS ;>> + IF I1<>14 THEN L14050;CLIMB + I1=9;UP + IF I2<>10 THEN L14050 + I1=I2 + ; +.L14050 IF I1<>15 THEN L14060;JUMP + I1=10;DOWN + IF I2<>9 THEN L14060 + I1=I2 + ; +.L14060 IF I1<15 THEN L14100 + IF I1=17 THEN L14070;FORWARD + GOSUB @L58500;RIGHT TURN + IF I1=19 THEN L14070;RIGHT + GOSUB @L58500;RIGHT TURN + IF I1=16 THEN L14070;BACKWARDS + GOSUB @L58500;RIGHT TURN + ; +.L14070 I1=D4 + ; +.L14100 D1=I1 + GOSUB @L47500;EXIT + GOSUB @L44000;MOVE MODIFIERS + gosub @saveoops ;>>mike 8/11/86 - moved from input area + IF R3>C0 THEN L14120 + MESSAGE 61;NO WAY + RETURN +.L14120 IF S4=C0 THEN L14140 + IF D2>C0 THEN L14130 + MESSAGE 62;DOOR IN WAY + RETURN +; +.L14130 MESSAGE 63;DOOR CLOSES BEHIND YOU +; +.L14140 ; CHECK IF GEIGER + IF R3<>7 THEN L14250 + IF T1>100 THEN L14250 + X0=LIST2(126) + IF X0<>254 THEN L14200 + M1=279 + GOSUB @L56000;CONFIRM M1 + IF Y1>C0 THEN L14220 +.L14200 ;NO -SO KILL HIM + MESSAGE 281 + GOTO @L49000 +.L14220 MESSAGE 280;SAFE NOW + T1=101 +.L14250 ; +;>>unsigned, undated, before 21/8/86 GOSUB @SAVEOOPS ;>> + D4=I1 + R2=R3 + GOTO @L50000;NEW LOCATION +.L15000 ; + ; ATTACK C + if i2=141 then @startstarbike ;>>mike 22/8/86 - kick starter + + IF R2<>231 THEN L15015 + IF I2=182 THEN L15070 +.L15015 IF R2=151 THEN L15040 + IF I2=139 THEN L15060 + if i2=165 then attackcable + GOSUB @L61500;HERE/WORN/CARRIED + IF O2<>S3 THEN L15400 + ;ATTACK SPECIAL CASES +.L15040 IF I2<>173 THEN L15400 +.L15041 X1=LIST2(173) + X0=LIST2(125) + IF X1>250 THEN @L63200 + IF X0<>254 THEN L15048 + MESSAGE 671 + LIST2(173)=C8 + RETURN +.L15048 MESSAGE 670 + RETURN + ; +.attackcable + message 318 ; the cable is well armoured + return +;--- +.L15060 ; attack POWDER + MESSAGE 757 + ADD S6,S9 + I2=139 + GOSUB @L57500 + LIST2(136)=R2 + RETURN + ; +.L15070 X0=LIST2(132) + IF X0<>253 THEN @L64400 + MESSAGE 803 + LIST2(132)=R2 + RETURN + GOSUB @L57500;KILL + MESSAGE 69;SCARE OFF + GOTO @L64650;I2 . CR +.L15400 MESSAGE 68;SHOULDN'T ATTACK + GOTO @L64650;I2 . CR +.L15500 ;ELEVATOR B7,B8,I2 + MESSAGE 782 + D2=C1 + X1=C0 + X0=100 + IF B7>10 THEN L15550 +.L15532 IF B7=C0 THEN L15550 + SUB B7,C1 + ADD X1,X0 + GOTO L15532 +.L15550 X0=10 + IF B8>10 THEN L15600 +.L15553 IF B8=C0 THEN L15600 + SUB B8,C1 + ADD X1,X0 + GOTO L15553 +.L15600 ADD X1,I2 + B8=20 + B7=20 + IF X1<>C0 THEN L15710 + B9=171 + RETURN +.L15710 X0=C0 +.L15720 B9=LIST5(X0) + IF B9=X1 THEN L15780 + ADD X0,C1 + IF X0<14 THEN L15720 +.L15740 B9=189 + RETURN +.L15780 B9=177 + IF X0=5 THEN L15740 + ADD B9,X0 + RETURN +.L15900 ;INIT ELEVATOR + X0=C1 + X1=C0 +.L15905 RANDOM X2 + IF X2=C0 THEN L15905 + IF X2>20 THEN L15905 + ADD X0,X2 + LIST5(X1)=X0 + ADD X1,C1 + IF X0>250 THEN L15900 + IF X1<14 THEN L15905 + LIST5(7)=C0 + LIST5(10)=C0 + RETURN + ;--- +.L16000 ; + ; INVENTORY C + MESSAGE 25;YOU OWN + M1=2;NULL + R2=C5;CARRIED + GOSUB @L57000;LIST OBJ + IF O5>C0 THEN L16100 + MESSAGE 60;NOTHING + ; +.L16100 M1=26;AND YOU'RE WEARING + R2=C6;WORN + GOSUB @L57000;LIST OBJ + ; + RETURN +.L16500 ; + ; LISTEN C + IF R2<>123 THEN L16540 + MESSAGE 841 + X0=178 + GOTO @L21500 +.L16540 ; + MESSAGE 256;HEAR NOTHING SPECIAL + RETURN +.L17000 ; + ; LOOK C +;>>unsigned, undated IF I2<>21 THEN L17030;"LOOK ATTACK" -> "EXAMINE" +;>>before 21/8/86 I1=35;EXAMINE +;>> GOTO @L46000;ADJUST INPUT + ; +.L17030 ; + GOTO @L3000 + +.L18000 ; + ; QUIT C + M1=53;REALLY stop? + GOSUB @L46500;PLEASE CONFIRM M1 + GOSUB @L20500;SCORE + GOTO @abortgame ;PLAY AGAIN? +.L18500 ; + +; RESTORE C + M1=55;REALLY RESTORE? + GOSUB @L46500;PLEASE CONFIRM M1 + GOSUB @LENSLOK ;>> + RESTORE + GOTO @AFTERRESTORE ;>> +;>> MESSAGE 5 ;CR +;>> SCREEN G C0;FIX 16/10/84 +;>> P9=C0 +;>> GOTO @L3000 + +.L19000 ; + ; SAVE C + SAVE + GOTO @L3000 +.L19500 ; + ; YES C / NO C + MESSAGE 238;DIDN'T EXPECT THAT + RETURN + +.L20000 ; + ; SCORE C + GOSUB @L20500;SCORE? + RETURN + +.L20500 ; +;>>mike 26/10/86 - GOSUB @SOLVEDPREVIOUS ;>> + ; CALCULATE SCORE + MESSAGE 57;YOU SCORED + PRINT S6;SCORE + MESSAGE 58;OUT OF N, WITH A RANK OF + M1=250;BEGINNER + IF S6<100 THEN L20980 + M1=251;PLAYER + IF S6<400 THEN L20980 + M1=252;ADVENTURER + IF S6<800 THEN L20980 + M1=253;EXPERIENCED ADVENTURER + IF S6<1000 THEN L20980 + M1=254;GRANDMASTER +.L20980 MESSAGE M1;RANK + MESSAGE DOT ;>> + GOSUB @SOLVEDPREVIOUS ;>> mike 26/10/86 + RETURN + +.L21000 ; + ; WAIT C + MESSAGE 258;TIME PASSES + X1=C0 +.L21110 X2=C0 +.L21120 ADD X2,C1 + IF X2<250 THEN L21120 + MESSAGE 4;DOT SPACE + ADD X1,C1 + IF X1<5 THEN L21110 + RETURN +.L21500 ;MESSAGE ELEVATOR NUMBER FOR ROOM X0 + X1=177 + SUB X0,X1 + MESSAGE 831 + X1=LIST5(X0) + PRINT X1 + message dot ; >>mike 12/10/86 + RETURN + +.L22000 ; +; TAKE C + if i2=97 then @pullballoons + +.takenotscenery + IF I2>149 THEN @L63600;SILLY + E2=LIST2(I2) + IF E2=C5 THEN @L63400;ALREADY HAVE I2. + ; + IF I2<>124 THEN L22300 + IF R2<>140 THEN L22300 + X0=LIST2(221) + IF X0>250 THEN L22300 + if b3<>c1 then l22300 ; don't steal card until big robot bribed + MESSAGE 400 ;Stolen by droid + LIST2(I2)=C8 + GOTO @L8000 + +.L22300 ; + IF I2<>105 THEN nottakepea ; take pea + MESSAGE 286 ;BIRD EATS + I2=105 + GOSUB @L57500 ; kill pea + LIST2(99)=R2 ; make brick appear + LIST2(196)=C8 ; (=252) kill bird (?) + return + +.nottakepea + GOTO @L51000;TAKE + +.L23000 ; + ; DROP C + GOSUB @L62500;CARRIED? + MESSAGE OK;>>Dropped + GOTO @L53000;DROP + +.L24000 ; + ; WEAR C + IF I2=85 THEN L24040 + IF I2=83 THEN L24040 + if i2=134 then l24040 ;>>mike 22/8/86 - screwfinger + IF I2=142 THEN L24040 + IF I2<110 THEN @L63600 + IF I2>119 THEN @L63600;SILLY +.L24040 E2=LIST2(I2) + IF E2=C6 THEN @L63400;ALREADY HAVE I2. + R2=C6;WORN + GOTO @L52000;TAKE (TO R2) +;--- +.catapult + i3=122 ; catapult + if i2=84 then checkcatapult ;poppy + goto @l63900 ; can't do that to i2 +;--- +.L25000 ; + ; THROW C + GOSUB @L62500;CARRIED? + IF I2<>109 THEN L25060 + IF R2<>51 THEN L25060 + V0=C1 + MESSAGE 331 ; throw vine over branch + goto @l53000 ; drop + ; +.L25060 IF I2<>84 THEN L25100 + IF I3<>122 THEN L25080 +.checkcatapult + I2=I3 +.L25066 + GOSUB @L61500 ; check catapult is here + MESSAGE 356;CATAPULT POPPY into centre of minefield + message 357 ; destroying all the mines +;>>mike 26/10/86 IF R2=97 THEN L25071 +;>>mike 26/10/86 IF R2<>98 THEN L25075 +;>>mike 26/10/86.L25071 + M0=C1 + ADD S6,S9 +.L25075 ;BLOW UP POPPY + I2=84 + GOSUB @L57500 + GOTO @L8000 + +.L25080 MESSAGE 355 + GOTO L25075 + ; +.L25100 X0=LIST2(218) + IF X0>250 THEN L25110 + MESSAGE 655 + LIST2(218)=C8 + ; +.L25110 IF I2<>128 THEN L25150 +.L25112 IF R2<142 THEN L25120 + IF R2>144 THEN L25120 + MESSAGE 302 + I2=128 + GOTO @L57500 +.L25120 IF R2<>145 THEN L25150 + MESSAGE 303 + I2=128 + GOSUB @L57500 + LIST2(124)=R2 + LIST2(221)=C8 + RETURN +.L25150 ; + ; + message ok ;>>mike 21/8/86 + GOTO @L53000;DROP +;--- +.L26000 ; + ; WORDS C + message ok ;>>mike 21/8/86 + SCREEN T + RETURN +;--- +.L26500 ; +; PICTURES + if prep=7 then l26000 ;>> picture off = words + message ok ;>>mike 21/8/86 + message cr ;* - fix " K." bug + SCREEN G C0 + P9=C0 + GOTO @L3000 +;--- +.L27000 ; + ; OPEN C + if i2=139 then @l15060 ; washing powder + IF I2<>edendoor THEN L27100 ;DOOR? + IF R2=230 THEN @L63500 + IF R2=176 THEN L27060 + IF R2=175 THEN L27060 + IF R2<>233 THEN L27035 + X0=LIST2(132) + IF X0=233 THEN L27060 +.L27035 ; + IF D2>C0 THEN @L63000;ALREADY OPEN + MESSAGE 236;THE DOOR OPENS + D2=C1 + RETURN +.L27060 MESSAGE 784 + RETURN +.L27100 IF I2=173 THEN @L15041 + IF I2<>175 THEN L27150 + X0=LIST2(134) + IF X0=255 THEN L27120 + IF X0<>254 THEN @L63500 +.L27120 X0=LIST2(132) + IF X0=R2 THEN L27124 + MESSAGE 801 + RETURN +.L27124 + MESSAGE 799 ;Open grill with screwfinger + ADD S6,S9 + R1=234 + GOTO @L3000 +.L27150 ; + GOTO @L63900;CAN'T DO THAT TO I2 . CR +.L28000 ; + ; CLOSE C + IF I2<>175 THEN L28060;DOOR? + IF D2=C0 THEN @L63100;ALREADY CLOSED + MESSAGE 237;THE DOOR CLOSES + D2=C0 + RETURN +.L28060 ; + GOTO @L63900;CAN'T DO THAT TO I2 . CR +.L29000 ; + ; EAT C + IF I2<>80 THEN L29100 + GOSUB @L57500 + O4=10 + MESSAGE 260 + RETURN +.L29100 IF I2<>106 THEN L29150 + GOSUB @L57500 + P1=C1 + MESSAGE OK ;>> ANDY 23/7/86 + ADD S6,S9 + RETURN +.L29150 IF I2<>86 THEN L29200 + MESSAGE 269 + GOTO @L57500 +.L29200 ; + MESSAGE 235;YEUCH! NO THANKS! + RETURN +.L31000 ; +; PRESS/PUSH C + if i2=141 then @startstarbike ;>>mike 22/8/86 + + IF R2<>175 THEN L31020 + IF I2<>164 THEN L31020 + I2=I3 +.L31020 IF I2<>164 THEN L31100 + IF R2=176 THEN L31200 +.L31100 IF R2<>153 THEN L31120 + IF P3=C1 THEN @L63200 + MESSAGE 304 + P3=C1 + LIST2(224)=R2 + LIST2(232)=R2 + RETURN +.L31120 IF R2<>175 THEN L31200 + ;BUTTONS + IF I2<240 THEN L31200 + IF I2>249 THEN L31200 + X0=240 + SUB I2,X0 + ;I2 IS VALID 0-9 + IF B8<20 THEN @L15500 + IF B7<20 THEN L31160 + B7=I2 + GOTO L31170 +.L31160 B8=I2 +.L31170 MESSAGE 781 + RETURN +.L31200 IF R2<>176 THEN L31220 + IF I2<>164 THEN L31220 + IF D2<>C0 THEN L31990 + MESSAGE 783 + D2=C1 + RETURN + ; +.L31220 ; +.L31990 GOTO @L64400;NOTHING HAPPENS +.MAKE +; e.g. MAKE CATAPULT + if i2<>122 then l32150 ; can't do that to i2 + i1=0 ; prevent objects always being here + i2=98 ; rubber band + gosub @l61500 ; check it's here + i2=103 ; wishbone + gosub @l61500 ; check it's here + goto makecatapult + +.L32000 ; + + ; TIE C + IF I2<>98 THEN L32150 ;RUBBER BAND + IF I3<>103 THEN L32120 + I2=I3 + GOSUB @L61500 + +.makecatapult + GOSUB @L57500 + I2=98 + GOSUB @L57500 + I2=122 + LIST2(I2)=R2;CATAPULT APPEARS + GOSUB @L51000 + message 361 ; tie wishbone to rubber band, making catapult + RETURN +.L32120 MESSAGE 360 ;Tie into knots + RETURN +.L32150 ; + GOTO @L63900;CAN'T DO THAT TO I2. CR + +.L33500 ; +; PLAY C + IF I2<>92 THEN L33620 + I2=95 + GOSUB @L61500 + MESSAGE 347 + IF R2<>50 THEN L33620 + MESSAGE 348 + A1=C1 +.L33620 RETURN + GOTO @L64400;NOTHING HAPPENS + ;---------- +.L34000 ; + ; BURY C + IF I2<>99 THEN @L63500 + IF R2<>59 THEN @L63500 + MESSAGE 287 + ADD S6,S9 + LIST2(154)=R2 + ; + GOTO @L57500;KILL I2 +.L35000 ; DIG + IF R2=4 THEN L35200 + X0=LIST2(135) + IF X0<>254 THEN L35170 + IF R2=21 THEN L35250 + IF R2=47 THEN L35300 + IF R2=129 THEN L35350 + MESSAGE 271;NO DIGGING ALLOWED + RETURN +.L35170 MESSAGE 270;NO SPADE + RETURN + ; +.L35200 IF D9>C0 THEN @L63200 + ADD S6,S9 + MESSAGE 272 + D9=C1 + RETURN +.L35250 IF D9>C1 THEN @L63200 + IF T1<36 THEN @L4320 + MESSAGE 273 + D9=2 + RETURN +.L35300 + IF D8=C1 THEN @L63200 + d8=1 ; stop digging again >>mike 26/10/86 + MESSAGE 333 + LIST2(107)=R2 + RETURN +.L35350 MESSAGE 672 + X0=LIST2(83) + IF X0=255 THEN L35370 + I2=110 +.L35357 X0=LIST2(110) + IF X0=255 THEN L35370 + ADD I2,C1 + IF I2<119 THEN L35357 +;>>unsigned, undated, before 21/8/86 GOSUB @SAVEOOPS ;>> + MESSAGE 674 ;sponsored by Lost Property + R1=128 + X0=185 + GOTO @L21500 +.L35370 MESSAGE 673 ;Thrown out + RETURN + ;---- +.L35500 ; + ; SHOOT C + GOTO @L63500;CAN'T DO THAT +.L36000 ; + ; INSERT C + IF I2<>124 THEN L36150 + IF R2<>108 THEN L36150 + IF M3<50 THEN L36120 + I2=LIST2(131) + IF I2=253 THEN L36110 + MESSAGE 296;OUT OF ORDER + RETURN +.L36110 MESSAGE 297 + ADD S6,S9 + LIST2(131)=R2 + X0=50 + SUB M3,X0 + RETURN +.L36120 MESSAGE 298 + RETURN +.L36150 ; + GOTO @L63600;SILLY! + ; + ; TURN C + GOTO @L64400;NOTHING HAPPENS +.L37500 ; GLUE I2 + IF I2<>155 THEN L37550 + I2=81 + GOSUB @L60000 + IF O2=C0 THEN @L63500 + IF R2<>45 THEN L37550 + IF B6=C1 THEN @L63200 + MESSAGE 334 + ADD S6,S9 + B6=C1 + RETURN + +.L37550 ; +.L38000 ; + ; PULL C + IF I2=173 THEN @L15041;ROOM 151 GRATE + IF I2<>97 THEN L38160 +.pullballoons ;>>mike 23/8/86 + MESSAGE 340 ;pull balloons + M1=341 + GOSUB @L56000 + IF Y1=C0 THEN L38140 + MESSAGE 342 ;Carried by balloons + GOSUB @L21000;TIME PASSES + MESSAGE 344 ;Banch breaks + R1=56 + GOTO @L8000 +.L38140 ; +; don't want to hang on + message 346 ; balloons float away into the distance + RETURN + ; +.L38160 IF I2<>185 THEN L38180 + MESSAGE 658 + ADD S6,S9 + LIST2(185)=C8 + LIST2(220)=C8 + X0=140 + LIST2(124)=X0 + RETURN + ; +.L38180 IF I2<>168 THEN L38190 + IF T8<>169 THEN L38188 + T0=C0 + T9=10 + MESSAGE 779 + RETURN +.L38188 MESSAGE 775 + RETURN +.L38190 IF I2<>162 THEN L38200 + MESSAGE 805 ;Bad decor behind machine + RETURN +.L38200 IF I2<>182 THEN L38210 + MESSAGE 804 ;Nothing behind machine + RETURN +.L38210 IF I2<>141 THEN L38220 +.startstarbike + MESSAGE 811 ;starbike goes to Snowball 9. + R1=240 + U3=C1 + ADD S6,S9 + GOTO @L3000 + ; +.L38220 IF I2<>157 THEN L38300 + IF R2=101 THEN L38230 + IF R2<>102 THEN L38300 +.L38230 R5=101 + GOSUB @L42500 + W5=W1 + R5=102 + GOSUB @L42500 + IF W5=W1 THEN @L64400;NOTHING HAPPENS + IF W5119 then nothinghappens + e2=list2(i2) + if e2<>c6 then @l63900 ; not worn, so can't remove it + r2=c5 ; carried + goto @l52000 ; take to r2 (remove i2) + +.nothinghappens + GOTO @L64400;NOTHING HAPPENS +.L39000 ; + ; SEARCH/EXAMINE C + IF I2<241 THEN L39030 + IF I2>249 THEN L39030 + IF R2<>211 THEN L39030 + IF V2=C0 THEN L39030 + MESSAGE 830 + V3=583 + ADD V3,I2 + RETURN +.L39030 IF I4=C1 THEN L39500;NO OBJECT->SEARCH + IF I2>149 THEN L39100;ODD OBJ->CAN'T HELP + IF I2>79 THEN @L40000;EXAMINE +.L39100 MESSAGE 59;CAN'T HELP + RETURN +.L39500 ; +; SEARCH + IF R2<>110 THEN L39530 + MESSAGE 833 + X0=181 + GOTO @L21500 +.L39530 IF R2<>121 THEN L39540 + MESSAGE 834 + X0=180 + GOTO @L21500 +.L39540 IF R2<>119 THEN L39550 + MESSAGE 836 + X0=177 + GOTO @L21500 +.L39550 IF R2=106 THEN L39552 + IF R2<>107 THEN L39560 +.L39552 MESSAGE 837 + X0=183 + GOTO @L21500 +.L39560 IF R2<>122 THEN L39570 + MESSAGE 839 + X0=188 + GOTO @L21500 +.L39570 ; + I2=C9 + MESSAGE 66;FIND + MESSAGE 60;NOTHING + RETURN +.L40000 ; + ; EXAMINE + GOSUB @L61500 + M1=600 + ADD M1,I2 + MESSAGE M1;DETAILS OF I2 + message dot ;>>mike 31/10/86 + ; + ; + ;SPECIAL CASES FOR EXAMINE + ; + ; + IF I2<>124 THEN L40260 + MESSAGE 651 + PRINT M3 + MESSAGE 652 + ; +.L40260 IF I2<>96 THEN L40270 + MESSAGE 838 + X0=186 + GOTO @L21500 +.L40270 ; + RETURN +.L41000 ; + ; GIVE C + GOSUB @L62500;HAVE I2? + IF S3<>C0 THEN L41050 +.L41041 MESSAGE 234;NO ONE HERE WANTS + GOTO @L64650;I2 . CR +.L41050 IF I2<>124 THEN L41200 + ;CREDIT CARD + IF R2<>140 THEN L41080 + IF B3=C1 THEN L41041 + IF M3<500 THEN L41075 + GOSUB @L15900;INIT ELEVATOR + MESSAGE 393 + I2=124 + GOSUB @L57500 + B3=C1 + ADD S6,S9 + RETURN +.L41075 MESSAGE 391 + RETURN + ; +.L41080 IF R2<>150 THEN L41090 + IF M3<50 THEN L41075 + MESSAGE 678;BUSKER + X0=50 + SUB M3,X0 + B4=C1 + RETURN +.L41090 IF I2=128 THEN @L25112 + ; +.L41200 IF I2<>102 THEN L41210 + X0=LIST2(207) + IF X0=R2 THEN @L53150 +.L41210 ; + GOTO L41041;NO ONE WANTS IT + GOTO @L57500;KILL +.L42500 ; WEIGH OBJECTS AT R5 + R6=C0 + W1=C0 +.L42504 X0=81 + IF R5<>254 THEN L42510 + R6=255 +.L42510 ; +.L42520 X1=LIST2(X0) + IF X1=R6 THEN L42540 + IF X1<>R5 THEN L42610 +.L42540 W0=C1 + IF X0<>110 THEN L42553 + W0=C0 +.L42553 IF X0<>101 THEN L42555 + W0=10 ;STONE FRUIT +.L42555 ; + ADD W1,W0 +.L42610 ADD X0,C1 + IF X0<150 THEN L42520 + IF R5<>R2 THEN L42630 + X0=5 + ADD W1,X0;OWN WEIGHT + R5=254 + GOSUB L42504 +.L42630 RETURN + ;--------- +.L43000 ; EXIT MODIFIERS + IF R2<>4 THEN L43050 + IF D9>C0 THEN L43050 + IF R3=13 THEN @L43900 + ; +.L43050 IF R2<>21 THEN L43100 + IF D9>C1 THEN L43100 + IF R3=7 THEN @L43900 + ; +.L43100 IF R2<>15 THEN L43150 + IF T1<35 THEN L43150 + IF R3=14 THEN @L43900 + ; +.L43150 IF R2<>29 THEN L43200 + IF R3<>57 THEN L43200 + IF B0<4 THEN @L43900 + ; +.L43200 IF D1<>11 THEN L43250 + X0=LIST2(154);HOUSE + IF X0<>R2 THEN L43250 + R3=28 +.L43250 ; + IF R2<>26 THEN L43350 + X0=LIST2(156) + IF X0<>26 THEN L43350 + P0=C1 +.L43350 IF R2<>51 THEN L43360 + IF R3<>35 THEN L43360 + IF V0=C0 THEN @L43900 + ; +.L43360 IF R3<>171 THEN L43370 + IF R2<>151 THEN L43370 + X0=LIST2(173) + IF X0<250 THEN @L43900 + ; +.L43370 IF R2<>150 THEN L43380 + IF R3<>129 THEN L43380 + IF B4<>1 THEN @L43900 + ; +.L43380 IF R3<>125 THEN L43400 + X0=LIST2(186) + IF X0<>R2 THEN L43900 + R3=125 +.L43400 IF R2<>172 THEN L43420 + IF R3<>170 THEN L43420 + IF T8<>169 THEN L43900 + R7=T7 + RETURN +.L43420 IF R2<>171 THEN L43430 + IF R3<>151 THEN L43430 + IF R7<>C0 THEN L43900 + ; +.L43430 IF R3<>221 THEN L43440 + IF R2<>245 THEN L43440 + IF T145 THEN L43500 + IF D1<>7 THEN L43500 + IF R2<>P4 THEN L43460 + R3=101 + S5=C1 +.L43460 IF R2<>P5 THEN L43470 + R3=102 + S5=C1 +.L43470 ; +.L43500 IF R2<>101 THEN L43600 + IF D1<>C3 THEN L43900 + S5=C1 + R3=P4 +.L43600 IF R2<>102 THEN L43700 + IF D1<>C3 THEN L43900 + S5=C1 + R3=P5 +.L43700 IF R3<>28 THEN L43710 + X0=LIST2(154) + IF X0<>R2 THEN L43900 +.L43710 ; + RETURN + ;-- +.L43900 ;S4=C0;EXIT DOES NOT EXIST + S5=C0 + R3=C0 + RETURN + ;--- +.L44000 ;MOVE MODIFIERS + GOSUB @L12000;CHECK MONEY IN M4 + IF R2<>59 THEN L44050 + X0=LIST2(108) + IF X0<>254 THEN L44050 + MESSAGE 306 + GOTO @L8000 +.L44050 IF R3<70 THEN L44120 + IF R3>75 THEN L44120 + X0=LIST2(93) + IF X0=254 THEN L44080 + MESSAGE 316 + GOTO @L8000 +.L44080 X0=LIST2(94) + IF X0=254 THEN L44090 + MESSAGE 317 + GOTO @L8000 +.L44090 IF R3=70 THEN L44100 + IF R3=72 THEN L44100 + IF R3<>74 THEN L44120 +.L44100 IF L0=C1 THEN L44110 + MESSAGE 314 + GOTO @L8000 +.L44110 MESSAGE 315 +.L44120 IF R3<>66 THEN L44130 + IF R2=61 THEN L44140 +.L44130 IF R3<>41 THEN L44150 + IF R2<>59 THEN L44150 +.L44140 MESSAGE 323 + X0=LIST2(91) + IF X0<>254 THEN L44145 + MESSAGE 325 + RETURN +.L44145 MESSAGE 324 + GOTO @L49000 +.L44150 IF R3<>68 THEN L44160 + X0=LIST2(158) + IF X0>250 THEN L44160 + MESSAGE 327 + GOTO @L49000 +.L44160 IF R3<>37 THEN L44170 + IF B6=C1 THEN L44170 + MESSAGE 335 + GOTO @L49000 + ; +.L44170 IF R3=37 THEN L44172 + IF R2<>37 THEN L44180 +.L44172 R5=254 + GOSUB @L42500 + IF W139 THEN L44200 +.L44185 MESSAGE 352 +.L44186 X0=LIST1(204) + LIST2(204)=X0 + A1=C0 + RETURN +.L44200 IF R2<>99 THEN L44205 + IF R3=97 THEN L44210 +.L44205 IF R2<>100 THEN L44230 + IF R3<>98 THEN L44230 +.L44210 ; + IF F0=C1 THEN L44230 + IF A1<>C0 THEN L44220 + R3=C0 + RETURN +.L44220 MESSAGE 350 + ADD S6,S9 + F0=C1 + LIST2(170)=C8 + GOSUB L44186 + ; +.L44230 IF R3=95 THEN L44235 + IF R3<>96 THEN L44250 +.L44235 IF M0=C1 THEN L44250 + MESSAGE 353 + GOTO @L49000 +.L44250 IF R3<96 THEN L44280 + IF R3>98 THEN L44280 + X0=LIST2(82) + IF X0=254 THEN L44260 + MESSAGE 358 + GOTO @L49000 +.L44260 MESSAGE 359 + ; + ; +.L44280 X0=LIST2(200) + IF X0<>R2 THEN L44290 + IF D1<>11 THEN L44290 + A9=C1 ; on autoscythe + A8=C0 + GOTO @L8000 +.L44290 IF D1<>12 THEN L44300 + IF A8=C1 THEN L44294 + IF A9<>1 THEN L44300 +.L44294 A9=C0 + A8=C0 + GOTO @L8000 +.L44300 IF A9=C1 THEN L44305 + IF A8<>1 THEN L44310 +.L44305 IF D1>10 THEN L44310 + R3=C0 +.L44310 X0=LIST2(201) + IF X0<>R2 THEN L44320 + IF D1<>11 THEN L44320 + A9=C0 + A8=C1 + GOTO @L8000 +.L44320 IF R3<88 THEN L44330 + IF R3>93 THEN L44330 + IF D1>8 THEN L44330 + MESSAGE 386 + GOTO @L49000 +.L44330 IF R3<>76 THEN L44350 + IF R2<>89 THEN L44350 + MESSAGE 372;ENTER RIVER + R5=254 + GOSUB @L42500 + IF W1>9 THEN L44345 + MESSAGE 373 ; too light + R3=89 + GOTO L44350 +.L44345 MESSAGE 374 ; load drags you down +.L44350 IF R3<>109 THEN L44360 + IF R2<>94 THEN L44360 + MESSAGE 379 + GOTO @L8000 +.L44360 IF R3<>141 THEN L44380 + IF R2<>140 THEN L44380 + IF B3=C1 THEN L44369 + MESSAGE 390 + GOTO @L8000 + GOTO L44380 +.L44369 X0=LIST2(220) + IF X0>250 THEN L44380 + MESSAGE 392 +.L44380 X0=LIST2(124) + IF X0<>254 THEN L44390 + IF R3<>132 THEN L44390 + IF G2<9 THEN L44386 + MESSAGE 398 + RETURN +.L44386 MESSAGE 394 + MESSAGE G1 +.L44390 IF R3<137 THEN L44400 + IF R3>140 THEN L44400 + X0=LIST2(218) + IF X0>250 THEN L44400 + LIST2(218)=R3 + ; +.L44400 IF R3<>154 THEN L44410 + MESSAGE 659 + GOTO @L8000 + ; +.L44410 IF R3<>145 THEN L44430 + IF R2<>143 THEN L44420 + X0=LIST2(224) + IF X0<>R2 THEN L44420 + MESSAGE 300 + GOTO @L8000 +.L44420 IF R2<>144 THEN L44430 + X0=LIST2(232) + IF X0<>R2 THEN L44430 + MESSAGE 301 + GOTO @L8000 + ; +.L44430 ; + ; + IF R3<>108 THEN L44460 + M1=758 + GOSUB @L56000 + IF Y1>C0 THEN L44450 + MESSAGE 759 + GOTO @L8000 +.L44450 MESSAGE 760 +.L44460 ; + IF R3<>125 THEN L44500 + IF M3<1000 THEN L44495 + X0=LIST2(124) + IF X0<>254 THEN L44495 + MESSAGE 761 + IF R2=126 THEN L44480 + R3=126 + R3=126 + GOTO L44490 +.L44480 R3=124 + MESSAGE 764 +.L44490 LIST2(186)=R3 + RETURN +.L44495 MESSAGE 765 + GOTO @L8000 + ; +.L44500 + IF R3<>169 THEN L44520 + IF D1=10 THEN L44520 + IF R2<>170 THEN L44520 + IF T8<>169 THEN L44520 + IF T7<>R7 THEN L44520 + R3=172 + ; +.L44520 IF R2<>171 THEN L44540 + IF D1<>C1 THEN L44540 + IF R7<>C1 THEN L44526 + R3=176 +.L44526 IF R7<>C2 THEN L44530 + R3=201 +.L44530 IF R7<>C3 THEN L44535 + R3=215 +.L44535 IF R7<>C0 THEN L44540 + R3=121 + ; +.L44540 IF R3<>171 THEN L44580 + IF R2=170 THEN L44580 + IF R2=151 THEN L44550 + IF R2<>121 THEN L44560 +.L44550 R7=C0 +.L44560 IF R2<>176 THEN L44565 + R7=C1 +.L44565 IF R2<>201 THEN L44570 + R7=2 +.L44570 IF R2<>215 THEN L44580 + R7=C3 + ; +.L44580 IF R3<>165 THEN L44590 + ADD R7,C1 + IF R7<4 THEN L44600 + R7=C0 + GOTO L44600 +.L44590 IF R3<>168 THEN L44620 + IF R7<>C0 THEN L44596 + R7=4 +.L44596 SUB R7,C1 +.L44600 IF T8<>169 THEN L44610 + IF T9<10 THEN L44610 + MESSAGE 780 + T9=C3 + R3=169 + GOTO L44620 +.L44610 MESSAGE 776 + GOTO @L49000 + ; +.L44620 IF R2<>176 THEN L44640 + IF R3<>171 THEN L44640 + R3=B9 + ; +.L44640 IF R3<>202 THEN L44660 + IF R2<>201 THEN L44645 + IF H0=C1 THEN L44645 + MESSAGE 669 + GOTO @L8000 +.L44645 IF V1<>C0 THEN L44660 + MESSAGE 785 +.L44660 IF R3<>205 THEN L44670 + IF R2<>202 THEN L44670 + IF V1>C0 THEN L44670 + MESSAGE 786 + R3=C0 +.L44670 IF R3<>204 THEN L44690 + IF V1>C0 THEN L44690 + M1=787 + GOSUB @L56000 + IF Y1=C0 THEN L44685 + MESSAGE 788 + V1=C1 + RETURN +.L44685 MESSAGE 789 + RETURN +.L44690 IF R3<>210 THEN L44700 + IF V1=2 THEN L44700 + MESSAGE 790 + ADD S6,S9 + V1=2 + ; +.L44700 IF R3<>221 THEN L44710 + IF R2<>245 THEN L44710 + MESSAGE 791 + R3=231 + GOSUB @L45500 + RETURN +.L44710 IF R3<>245 THEN L44720 + IF R2<>220 THEN L44720 + MESSAGE 793 + U0=8 + ADD U0,T1 +.L44720 IF R3<>233 THEN L44730 + MESSAGE 794 +.L44730 IF R3<>229 THEN L44740 + IF R2<>230 THEN L44740 + IF U2<>C0 THEN L44740 + U2=C1 +.L44740 + IF R3<>226 THEN L44750 + if u2=c0 then l44750 ; >>mike 22/8/86 - crewmembers not chasing now + MESSAGE 812 ; crewmembers run past the door + U2=C0 +.L44750 IF R3<>235 THEN L44770 + X0=LIST2(133) + IF X0=254 THEN L44760 + MESSAGE 818 + GOTO @L49000 +.L44760 ; + MESSAGE 820 ;Win + ADD S6,S9 + GOTO @L49500 + ; +.L44770 IF R2<>176 THEN @L44900 + IF R3=175 THEN @L44900 + IF R3=C0 THEN @L44900 + IF R3>188 THEN L44780 + IF R3=171 THEN L44780 + IF M4>C0 THEN L44780 +.L44776 MESSAGE 844;PAUPER + GOTO @L8000 +.L44780 ; + IF R3<>177 THEN L44810 + MESSAGE 842 + GOTO @L8000 +.L44810 IF R3<>178 THEN L44820 + IF M4<30000 THEN L44776 + X0=LIST2(127) + IF X0=254 THEN L44816 + MESSAGE 813 + GOTO @L8000 +.L44816 M3=50000 + MESSAGE 846 + GOTO @L8000 +.L44820 IF R3<>179 THEN L44830 + M3=C0 + MESSAGE 847 + GOTO @L8000 +.L44830 IF R3<>180 THEN L44850 + IF M4>49000 THEN L44835 + MESSAGE 848 + GOTO @L8000 +.L44835 M3=2000 + MESSAGE 849 + ADD S6,S9 + H0=C1 + X0=190 + GOSUB @L21500 + GOTO @L8000 +.L44850 IF R3<>183 THEN L44860 + MESSAGE 845 + GOTO @L49000 +.L44860 IF R3<>186 THEN L44870 + MESSAGE 850 + M3=C0 + LIST2(137)=R2 + GOTO @L8000 +.L44870 ; +.L44900 IF R3<>170 THEN L44930 + IF R2<>171 THEN L44930 + MESSAGE 851 + X0=LIST2(136) + IF X0<>254 THEN L44915 + I2=136 + GOSUB @L57500 + GOTO L44920 +.L44915 X0=LIST2(137) + IF X0=254 THEN L44920 + MESSAGE 853 + GOTO @L8000 +.L44920 MESSAGE 852 + ; +.L44930 IF R3<>247 THEN L44950 + X0=LIST2(116) + IF X0<>255 THEN L44945 + X0=LIST2(115) + IF X0=255 THEN L44950 + ; +.L44945 MESSAGE 819 + GOTO @L49000 +.L44950 ; + IF R3<>215 THEN L44980 ;13/10/84 + IF V1=2 THEN L44980 ;13/10/84 + MESSAGE 843 ;13/10/84 + GOTO @L8000 ;13/10/84 +.L44980 RETURN + ;----- +.L45000 ; SLEEP + ;SLEEP TO ESCAPE BLAST + MESSAGE 266;FALLS ASLEEP, THEN + T1=35;BYPASS BLAST CODE + X0=LIST2(117) + IF X0<>C6 THEN L45150 + ADD S6,S9 + MESSAGE 263 ;WOKEN UP BY BLAST + GOTO @L8000 + ; +.L45150 MESSAGE 262 ;DIE OF RADIATION POSIONING IN SLEEP + GOTO @L49000 + ;----- +.L45500 ;ROBOTS GRAB MOST THINGS + I2=81 +.L45520 X1=LIST2(I2) + IF X1<>254 THEN L45600 + IF I2=134 THEN L45600 + IF I2=133 THEN L45600 + IF I2=123 THEN L45600 + GOSUB @L57500 +.L45600 ADD I2,C1 + IF I2<145 THEN L45520 + RETURN +.L46000 ; + ; ADJUST INPUT (WHEN 2-PART VERB ENTERED) AND TRY AGAIN + I2=I3 + I3=C0 + GOTO @L6070;JUST AFTER INPUT (TO ACT ON THE ALTERED VERB) +.L46500 ; + ; PLEASE CONFIRM M1 + GOSUB @L56000;YES/NO? + IF Y1>C0 THEN L46600 + MESSAGE 246;BE MORE CAREFUL IN FUTURE! + GOTO @L8000 +.L46600 RETURN +.L47000 ; + ; SAVE ENTERED COMMAND + I5=I1 + I6=I2 + I7=I3 + I8=I4 + RETURN +.L47500 ; + ; EXIT (FROM R2 DIRN D1). R3=DEST, S4=DOOR? S5=VISIBLE? + EXIT R2 D1 X1 R3 + S4=C0 + S5=C0 + IF R3=C0 THEN L47700 + IF X1C1 THEN L47700 + S5=C1 +.L47700 ;NOW DECIDE IF EXIT HAS CHANGED FROM TABLE + GOSUB @L43000;EXIT MODIFIERS + RETURN + ;------ +.L48000 ; + ; MESSAGE DETAILS OF R2 + MESSAGE 5;CR + ;; PRINT R2 + X1=R2 + MESSAGE 24;YOU ARE + GOSUB @L65000;DESC/PICTURE; + GOSUB EXITSCOMMAND ;>> + GOTO AFTEREXITS ;>> +; +;----- +; +.EXITSCOMMAND ;>> + GOSUB @L59000;COUNT EXITS + IF R2>26 THEN L48029 + IF R2>22 THEN L48910 +.L48029 X0=LIST2(123) ; has player go compass + IF X0<>254 THEN L48910 + IF E5=C0 THEN L48910;NO EXITS + IF E5=C1 THEN L48035 + MESSAGE 21;EXITS LEAD + GOTO L48050 +.L48035 MESSAGE 70;ONLY EXIT LEADS + ; +.L48050 E3=C1;NUMBER OF CURRENT EXIT + D1=C1;FIRST DIRECTION + ; +.L48060 GOSUB L47500;EXIT? + IF S5=C0 THEN L48220;NOT VISIBLE + ; + M1=7 + ADD M1,D1 + MESSAGE M1;EXIT DIRN + IF S4=C0 THEN L48200;DOOR? + M1=22 + ADD M1,D2 + MESSAGE M1;(OPEN) DOOR + ; +.L48200 IF E3=E5 THEN L48900 + ADD E3,C1 + IF E3=E5 THEN L48215 + MESSAGE 3;COMMA + GOTO L48220 +.L48215 MESSAGE 6;AND +.L48220 ADD D1,C1 + IF D1<14 THEN L48060 +.L48900 MESSAGE 7; . CR +.L48910 + RETURN ;>> +; +;----- +; +.AFTEREXITS ;>> + MESSAGE 5;CR + M1=27;YOU CAN SEE + GOSUB @L57000;LIST OBJ + RETURN +.DIE ;>> +.L49000 ; + ; DIE + MESSAGE 239;YOU'RE DEAD + SUB S6,S9 + SUB S6,S9 + IF S6<2000 THEN L49035 + S6=C0 +.L49035 A0=C0 + B0=C0 + X0=100 + ADD T1,X0 + ADD K1,C1 + IF R2<30 THEN L49510 + IF R2>68 THEN L49510 + GOSUB @L21000;WAIT + MESSAGE 244;GREEN SMOKE + R2=29 + IF K1> + GOSUB @ASKFINAL ;>> + GOTO @QUITPLAYAGAIN ;>> + +;>> M1=54;PLAY AGAIN? +;>> GOSUB @L56000;YES OR NO +;>> IF Y1>C0 THEN @L1000;COLD START +;>> DRIVER ;* + +.L50000 ; + ; NEW LOCATION + R1=R2 + D2=C0;DOOR CLOSED + T3=C0 + ; + GOTO @L3000 + +;----- + +.L51000 ; + ; GAIN OBJECT I2 (CARRIED) + R2=C5 + IF O1>mike 18/8/86 - moved up from below + MESSAGE 47;HANDS FULL + GOTO @L8000 +.L52000 ; + IF I2<>104 THEN L52010 + X0=LIST2(85) + IF X0=255 THEN L52007 + MESSAGE 326 ;Freezes hand + RETURN +.L52007 + MESSAGE 332 ;Protected by gloves +.L52010 ; GAIN OBJECT I2 (IN R2) + IF I2=97 THEN @L63600 + E2=LIST2(I2) + IF E2>C7 THEN L52100 + ; + IF O1>mike 18/8/86 - moved up to above, + MESSAGE 47;HANDS FULL;>>mike 18/8/86 - but leave it in just in case + GOTO @L8000 + ; +.L52100 + MESSAGE OK ;>>ANDY 27/7/86 WAS > 1600 ;>> I have it now + GOSUB @L57500;KILL OBJECT + LIST2(I2)=R2 + ADD O1,C1 + ; + ;SPECIAL CASES FOR TAKE +.L52250 IF I2<>109 THEN L52260 + V0=C0 +.L52260 ; + ; + RETURN + +;----- + +.L53000 ; + ; DROP OBJECT + GOSUB @L57500;KILL OBJECT + LIST2(I2)=R2 + ;SPECIAL CASES FOR DROP + IF I2<>108 THEN L53150 + MESSAGE 307 + LIST2(I2)=C8 + LIST2(205)=C8 +.L53150 IF I2<>102 THEN L53160 + X0=LIST2(207) + IF X0<>R2 THEN L53160 + ADD S6,S9 + MESSAGE 319 + L0=C1 + I2=102 + LIST2(207)=C8 + GOSUB @L57500 +.L53160 IF I2<>104 THEN L53170 + MESSAGE 329 + IF R2<>67 THEN L53170 + MESSAGE 330 + ADD S6,S9 + LIST2(158)=C8 + LIST2(104)=C8 +.L53170 IF I2<>84 THEN L53180 + GOSUB @L57500 + MESSAGE 354 + GOTO @L49000 + ; +.L53180 IF I2<>131 THEN L53190 + IF R2<>114 THEN L53190 + X0=LIST2(96) + IF X0=253 THEN L53185 + IF X0<>252 THEN L53189 +.L53185 MESSAGE 755 + I2=96 + LIST2(I2)=R2 +.L53189 RETURN +.L53190 IF R2<165 THEN L53192 + IF R2<190 THEN L53194 +.L53192 IF R2<105 THEN L53210 + IF R2>125 THEN L53210 +.L53194 MESSAGE 756 + X0=185 + LIST2(I2)=X0 + RETURN + ; +.L53210 IF R2<>233 THEN L53220 + IF I2<>132 THEN L53220 + MESSAGE 796 + U1=4 + ADD U1,T1 +.L53220 ; + RETURN +.L54000 ; + ; SET STATUS + S1=C2 + S2=C2 + S3=200;SET S3 TO THE FIRST CREATURE HERE (0 IF NONE) +.L54110 E2=LIST2(S3) + IF E2=R2 THEN L54120 + ADD S3,C1 + IF S3<234 THEN L54110 + S3=C0 +.L54120 ; + RETURN +.L55000 ; + ; SET LIGHT FLAGS + L1=C1 + L3=C1 + RETURN +;.L55500 ; MESSAGE I1,I2,I3,I4 + ;MESSAGE 5 + ;PRINT I1 + ;MESSAGE 3 + ;PRINT I2 + ;MESSAGE 3 + ;PRINT I3 + ;MESSAGE 3 + ;PRINT R2 + ;MESSAGE 7 + ;RETURN +.L56000 ; + ; YES OR NO + Y1=C1;YES +.L56040 MESSAGE 5;CR + MESSAGE M1;QUESTION + GOSUB L56500;INPUT + IF I1=C1 THEN L56200;NO + IF I1=31 THEN L56200;NEGATIVE + IF I1=30 THEN L56300;YES + MESSAGE 56;YES or NO + GOTO L56040 +.L56200 Y1=C0;NO +.L56300 RETURN +.L56500 ; + ; INPUT + MESSAGE 49; ? CR +.L56540 + GOSUB @GETI1I2I3I4 ;>> INPUT I1 I2 I3 I4 + RANDOM R0;KICK RANDOM NUMBERS + IF I4=C0 THEN L56540 + IF I1<>91 THEN L56570 + IF I2<>122 THEN L56570 + I2=84 + GOSUB @L61500 + I2=122 + GOTO @L25066 +.L56570 GOSUB @L59500;; SORT INPUT + RETURN +.L57000 ; + ; MESSAGE M1, OBJECTS IN R2 + ; O5=NUMBER + O5=C0 + E1=80 +.L57032 E2=LIST2(E1) + IF E2<>R2 THEN L57035 + ADD O5,C1 +.L57035 ADD E1,C1 + IF E1<234 THEN L57032 + ; + IF O5=C0 THEN L57490 + MESSAGE M1;E.G YOU CAN SEE + O3=C1 + E1=80 +.L57150 E2=LIST2(E1) + IF E2<>R2 THEN L57450 + ; + MESSAGE E1;OBJECT NAME + IF E1>109 THEN L57400 + X0=LIST1(E1) + IF X0<>E2 THEN L57400 + X0=790 + ADD X0,E1 + MESSAGE X0 + ; +.L57400 IF O3=O5 THEN L57460 + ADD O3,C1 + IF O3=O5 THEN L57420 + MESSAGE 3;COMMA + GOTO L57450 +.L57420 MESSAGE 6;AND +.L57450 ADD E1,C1 + IF E1<234 THEN L57150 +.L57460 MESSAGE 7;DOT CR +.L57490 RETURN +.L57500 ; + ; KILL I2 + E2=LIST2(I2) + IF E24 THEN L58560 +.L58552 ADD D4,C1 + ; +.L58560 IF X1=C3 THEN L58562 + IF X1<>5 THEN L58570 +.L58562 SUB D4,C1 + ; +.L58570 IF D4<9 THEN L58900 + X1=8 + SUB D4,X1 + ; +.L58900 RETURN +.L59000 ; + ; D5=#DOORS E5=#VISIBLE EXITS + D5=C0 + E5=C0 + D1=C1 +.L59060 GOSUB @L47500;EXIT. S4=DOOR? S5=VISIBLE? + ADD D5,S4 + ADD E5,S5 + ADD D1,C1 + IF D1<13 THEN L59060 + RETURN +.L59500 ; + ; SORT INPUT (BUT LEAVE I1 ALONE IF IT'S ALREADY A VERB) +.L59570 IF I3=C0 THEN L59580;SWAP I2 & I3? + IF I2I2 THEN L59585 + GOTO L59900 +.L59585 X1=I1 + I1=I2 + I2=X1 + GOTO L59570;I1/I2 SWAPPED, SO TRY I2/I3 AGAIN +.L59900 RETURN +.L60000 ; + ; O2=HERE/WORN/CARRIED + GOSUB L60500;O2=ON THE GROUND + IF O2=C0 THEN L61000 +.L60500 ; + ; O2=ON THE GROUND? + IF I2<>edendoor THEN L60540;DOOR? + O2=D5 + RETURN + ; +.L60540 O2=C1 + IF I2<>157 THEN L60546 + IF R2=101 THEN L60800 + IF R2=102 THEN L60800 + ; +.L60546 IF R2<>176 THEN L60550 + IF I2=164 THEN L60800 +.L60550 IF R2<>175 THEN L60600 + IF I2<240 THEN L60600 + IF I2<250 THEN L60800 +.L60600 IF R2<>211 THEN L60610 + IF I2<241 THEN L60610 + IF I2<247 THEN L60800 + ; +.L60610 ; + ; + IF I2<80 THEN L60700 + IF I2>233 THEN L60700 + E2=LIST2(I2) + IF E2=R2 THEN L60800 +.L60700 O2=C0 +.L60800 RETURN +.L61000 ; + ; O2=WORN/CARRIED? + if i1<>66 then l61000notmake ;>>mike 21/8/86 + o2=c1 ; indicate it is here + return + +.l61000notmake + O2=C1 + IF I2<80 THEN L61100 + IF I2>233 THEN L61100 + E2=LIST2(I2) + IF E2>C7 THEN L61200 +.L61100 O2=C0 +.L61200 RETURN +.L61500 ; + ; I2 HERE/CARRIED? + GOSUB L61000;O2=WORN/CARRIED? + IF O2=C0 THEN L62000;HERE? + RETURN +.L62000 ; + ; IS I2 HERE? + GOSUB @L60500;O2=ON THE GROUND? + IF O2=C0 THEN @L63800;CAN'T SEE I2 + RETURN + +.L62500 ; + ; IS I2 CARRIED? + GOSUB @L61000;O2=WORN/CARRIED? + IF O2=C0 THEN @L63700;DON'T HAVE + RETURN + +.L63000 ; ALREADY OPEN + MESSAGE 64 + RETURN +.L63100 ; ALREADY CLOSED + MESSAGE 65 + RETURN +.L63200 MESSAGE 268 + GOTO @L8000 +.L63300 ; Help + IF R1<242 THEN HELPNSTART + IF R1>244 THEN HELPNSTART + MESSAGE 1900 ; need radsuit and compass + RETURN +.HELPNSTART + IF R1>6 THEN HELPNMEADOW + random x0 + if x0>128 then helpcompass + MESSAGE 1901 ; get underground pronto! + RETURN +.helpcompass + message 328 ; need compass + return +; +.HELPNMEADOW + IF R1<>18 THEN HELPNRADSUIT + X1=LIST2(117) ; wearing radsuit ? + IF X1=255 THEN HELPNRADSUIT + MESSAGE 1903 ; wear a radsuit! + RETURN +.HELPNRADSUIT + IF R1>22 THEN HELPNCAVES + IF T1>35 THEN HELPNSAFETY + MESSAGE 1902 ; get to sleep cave + RETURN +.HELPNSAFETY + MESSAGE 1904 ; after blast .. find another way out of caves + RETURN +.HELPNCAVES + IF R1<>59 THEN HELPNBIRD + X1=LIST2(99) ; has brick appeared + IF X1<>253 THEN HELPNBRICK ; yes! + MESSAGE 1905 ; drop the pea + RETURN +.HELPNBRICK + MESSAGE 1906 ; try planting it + RETURN +.HELPNBIRD + IF R1>75 THEN HELPNFOREST +; wearing radsuit in forest ? + X1=LIST2(117) + IF X1<>255 THEN HELPNFOREST + MESSAGE 1907 ; take it off! + RETURN +.HELPNFOREST + IF R1<60 THEN HELPNBOAT + IF R1>63 THEN HELPNBOAT + MESSAGE 1908 ; istructions on boating + RETURN +.HELPNBOAT + if r1=61 then helpriver + if r1<70 then helpnriver + if r1>75 then helpnriver +.helpriver + message 1909 ; river current is strong + return + +.helpnriver +; CAN'T HELP - GET CLUESHEET + MESSAGE 248 + RETURN +;--- +.L63400 ; ALREADY HAVE I2 + MESSAGE 43;ALREADY HAVE THE + GOTO L64650;I2 . CR +.L63500 ; CAN'T DO THAT + MESSAGE 39 + GOTO @L8000 +.L63600 ; SILLY + MESSAGE 40 + GOTO @L8000 +.L63700 ; DON'T HAVE I2 + MESSAGE 42 + GOTO L64600 +.L63800 ; CAN'T SEE I2 + if i2=significant then @specialscenery + MESSAGE 41 + GOTO L64600 +;--- +.specialcantsaymore + message 59 ; can't say any more + goto @l8000 +;--- +.specialscenery ;>>mike 22/8/86 - fix "TAKE STARBIKE" bug + parsem1=2030 ; that's just scenery group + gosub @varymessage + goto @l8000 +;--- +.L63900 ; CAN'T DO THAT TO I2 . CR + M1=77 + GOSUB @L64500 + GOTO L64650 +.L64000 ; NOTHING UNDERSTOOD + M1=29 + GOTO L64500 +.L64100 ; MISSING OBJECT + if everything=true then specialall + M1=32 + GOTO L64500 +.specialall + message 2033 ; there doesn't seem to be anything around + return +;--- +.L64200 ; UNRECOGNISED OBJECT + if i2<80 then @specialscenery + M1=35 + GOTO L64500 +.L64300 ; TOO COMPLEX! + MESSAGE 38 + GOTO @L6000 +.L64400 ; NOTHING HAPPENS + M1=50 +.L64500 ; MESSAGE ERROR MSG M + 0 TO 2 + ADD M2,C1 + IF M2149 THEN L64800;THAT ;233 + MESSAGE I2 + MESSAGE 7;DOT CR + RETURN + ; MESSAGE I3 . CR + MESSAGE 1 + IF I3<80 THEN L64800;THAT + IF I3>233 THEN L64800;THAT + MESSAGE I3 + MESSAGE 7;DOT CR + RETURN +.L64800 ; THAT + MESSAGE 44 + RETURN + +.L65000 ; PICTURE; FOR ROOM X1 +; platforms +; room number 101 (north platform) shows picture for room p4 +; 102 (south platform) p5 + parsex1=x1 ; picture number to display + if x1<>101 then notnorthplatform + parsex1=p4 +.notnorthplatform + if x1<>102 then notsouthplatform + parsex1=p5 +.notsouthplatform + X0=400 + IF X1<>176 THEN L65050 + X1=B9 ; room desc for room south of elevator + MESSAGE 576 +.L65050 + ADD X0,X1 ; x1 is the room number + MESSAGE X0 + MESSAGE 4;DOT SPACE + X0=500 + ADD X0,parseX1 ; parsex1 is the picture offset + IF X0=P9 THEN L65200 + CLS G; + PICTURE X0 + P9=X0 +.L65200 + RETURN + +.L65300 ; BLINK + IF V2<>C1 THEN @L64400 ;BUG FIX 13/10/84 + MESSAGE 832 + MESSAGE V3 + RETURN +;-->> M2=C0 +;-->>.L64560 ADD M1,M2 + +;----- + +.AUTHORS ;>> + MESSAGE 2319 ;Copyright and 'passing the buck' + RETURN + +;----- + +.PRINTEXITS ;>> + x0=list2(123) ; has player got compass + if x0<>254 then penocompass + GOSUB @EXITSCOMMAND + MESSAGE 5 ;CR + RETURN +.penocompass + message 328 ; rather dis-orientated after crash, need a fix + return +;----- + +.ISOBJECTHERE +; return RESULT=TRUE if OBJECT is on floor in current room + if verb=66 then iomtrue ;>>make verb - mike 21/8/86 + if verb=isay then iomtrue ;>>mike 18/10/86 + if object<>220 then iomnbigrobot ;>>mike 6/12/86 + if r1=140 then iomtrue ;>>mike 6/12/86 + +.iomnbigrobot + IF OBJECT<>157 THEN IOMNLEVER + IF R1=40 THEN IOMTRUE + IF R1=45 THEN IOMTRUE +.IOMNLEVER + IF OBJECT>197 THEN IOMFALSE + IF OBJECT>153 THEN IOTUNTAKEABLE + if object<80 then iomsayings ;>>mike 24/8/86 + RESULT=LIST2(OBJECT) + IF RESULT=R1 THEN IOMTRUE + GOTO IOMFALSE +;--- +.iomsayings +; objects 70-79 are sayings (for Graunch) + if r1=132 then iomtrue + goto iomfalse +;--- +.IOTUNTAKEABLE + RESULT=LIST1(OBJECT) + IF RESULT=R1 THEN IOMTRUE + GOTO IOMFALSE + ;--- +.ISOBJECTCARRIED +; return RESULT=TRUE if OBJECT is carried by player + IF OBJECT>153 THEN IOMFALSE + if object<80 then iomsayings ;>>mike 24/8/86 + RESULT=LIST2(OBJECT) + IF RESULT>253 THEN IOMTRUE + IF RESULT=W7 THEN IOMTRUE + GOTO IOMFALSE +;--- +.IOMFALSE + RESULT=FALSE + RETURN +.IOMTRUE + RESULT=TRUE + RETURN +;--- +.SETUPROOM + ROOM=R1 + RETURN +;--- +;------------------------------------------------------------ +;------------------------------- diff --git a/l9dev/regress/games.l9/eden.l9/book.txt b/l9dev/regress/games.l9/eden.l9/book.txt new file mode 100644 index 0000000..57a7efe --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/book.txt @@ -0,0 +1,258 @@ + +; Code for book protection system +; +; Copyright (C) 1986 Level 9 Computing +; +; For Eden +; +; 24/10/86 +; +; table of comparison words start at 4300 (MATCHOFFSET) + +CONST + MaxChapter=49 + MaxParagraph=20 + MaxWord=8 + MaxAttemptsPerWord=3 + TotalWords=100 + +VAR + CHAPTER + PARAGRAPH +; LINE + WORD + RANDOMSEED + COUNT TESTCOUNT SAVECOUNT + ATTEMPTS + +BEGIN +;.LENSLOK +;.TRYALLWORDS +; TESTCOUNT=1 +;.TAW1 +; COUNT=TESTCOUNT +; GOSUB @GETWORDCOUNT +; IF CHAPTER=0 THEN TAW2 +; COUNT=TESTCOUNT +; GOSUB @DISPLAYWORD +; COUNT=TESTCOUNT +; GOSUB COMPAREPROTECTIONWORD +; IF VALUE=0 THEN TAW1 +;.TAW2 +; ADD TESTCOUNT,C1 +; GOTO TAW1 +;--- +.COMPAREPROTECTIONWORD +; return VALUE=word entered, or zero if failed +.CPWGETWORD + NOMOREINPUT=FALSE + WORDNOTPROCESSED=FALSE + SUPRESSCHECKING=TRUE + GOSUB @GETNEXTWORD + INDEX=0 + GOSUB @READINPUTLIST + IF VALUE=0 THEN CPWGETWORD +.CPW1 + SEARCHTYPE=MATCHTYPE + GOSUB @CHECKTYPEMORE + IF VALUE=0 THEN CPWFAIL + IF VALUE=COUNT THEN CPWOK + GOTO CPW1 +.CPWFAIL + VALUE=0 + SUPRESSCHECKING=FALSE + RETURN +.CPWOK + SUPRESSCHECKING=FALSE + RETURN +;--- +;.TEST +; C1=1 +; TESTCOUNT=1 +;.TEST1 +; COUNT=TESTCOUNT +; GOSUB GETWORDCOUNT +; IF CHAPTER=0 THEN TEST2 ; some problem, so skip over it +; GOSUB @DISPLAYWORD +;.TEST2 +; ADD TESTCOUNT,C1 +; IF TESTCOUNT0 THEN TESTUSER1 + GOSUB GETRANDOMWORD ; only pick a new word on startup, or on success + TESTCOUNT=COUNT + +.TESTUSER1 + ATTEMPTS=0 +; GOSUB GETRANDOMWORD +; TESTCOUNT=COUNT + MESSAGE 4200 ; whatsit appears +.TESTUSER2 + MESSAGE 4207 ; tell me the... + GOSUB @DISPLAYWORD + COUNT=TESTCOUNT + GOSUB @COMPAREPROTECTIONWORD + IF VALUE<>0 THEN TESTUSEROK + ADD ATTEMPTS,C1 + IF ATTEMPTS>@DIE + +.TESTUSERAGAIN + MESSAGE 4205 ; wrong. Try again + GOTO TESTUSER2 + +.TESTUSEROK + MESSAGE 4206 ; correct + GOSUB GETRANDOMWORD ; set up a new word for subsequent attempts + TESTCOUNT=COUNT + RESULT=TRUE ; tell caller all was well + RETURN +;--- +.GETRANDOMWORD + RANDOM X1 + X2=TotalWords + GOSUB @X1MODX2 + COUNT=X1 + IF COUNT<5 THEN GETRANDOMWORD ; try another - avoid first bit of sequence + SAVECOUNT=COUNT + GOSUB GETWORDCOUNT + COUNT=SAVECOUNT + IF CHAPTER=0 THEN GETRANDOMWORD + RETURN +;--- +.DISPLAYWORD + X1=4210 ; number table + ADD X1,WORD + MESSAGE X1 ; nth + MESSAGE 4201 ; word from the + X1=4210 ; number table + ADD X1,PARAGRAPH + + MESSAGE X1 ; nth + MESSAGE 4203 ; paragraph of chapter + PRINT CHAPTER + MESSAGE 4204 ; ." + RETURN +;--- +.RANDOM +; return X1=random number + X1=RANDOMSEED + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + ADD X1,X1 + +; now replace low-order byte with 10. + X2=10 + ADD X1,X2 + + SUB X1,RANDOMSEED + ADD X1,X1 + ADD X1,X1 + ADD X1,RANDOMSEED + X2=1 + ADD X1,X2 + RANDOMSEED=X1 +; and return low-order of seed as a random number + X2=31 + LIST9(X2)=X1 + X1=LIST9(X2) + RETURN +;--- +.X1MODX2 + IF X10 THEN GWC1 +; now get chapter number +.GETCHAPTERNUMBER + GOSUB @RANDOM + X2=MAXCHAPTER + GOSUB @X1MODX2 + CHAPTER=X1 + IF CHAPTER<>0 THEN GCN1 + CHAPTER=1 +.GCN1 + + GOSUB @RANDOM + X2=MAXPARAGRAPH + GOSUB @X1MODX2 + PARAGRAPH=X1 + + GOSUB @RANDOM + X2=MAXWORD + GOSUB @X1MODX2 + WORD=X1 +; ok, now check for validity - SPECIAL to different books + IF CHAPTER<>2 THEN NCHAP2 + IF PARAGRAPH>8 THEN @CHECKFAIL +.NCHAP2 + IF CHAPTER<>5 THEN NCHAP5 + IF PARAGRAPH>7 THEN @CHECKFAIL +.NCHAP5 + IF CHAPTER<>19 THEN NCHAP19 + IF PARAGRAPH>10 THEN @CHECKFAIL +.NCHAP19 + RETURN +;--- +;---------------------------------------------------------- +;----------------------------------------------------------- +;----------------------------------------------------------- \ No newline at end of file diff --git a/l9dev/regress/games.l9/eden.l9/chain.txt b/l9dev/regress/games.l9/eden.l9/chain.txt new file mode 100644 index 0000000..8b00744 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/chain.txt @@ -0,0 +1,163 @@ +; Lenslok code +; +; 27/05/86 +; + VAR + GAMEOVER ;>> + + BEGIN +;----- + +.SOLVEDPREVIOUS +;For use in SCORE message. + IF C0<>FIRSTPART THEN SOLVED1 ;No previous game ? + + IF GAMESOLVED<>SOLVING THEN SOLVED1 ;>> +;>> IF VERSION<>GAMECOMPLETE THEN SOLVED1 + MESSAGE 2315 ;You have solved the previous game(s) +.SOLVED1 + RETURN +; +;----- + +.ASKFINAL +;Called when current game is complete + +;Second and final parts are continuation of previous parts +;if 'complete' flag already set. + IF C0<>FIRSTPART THEN ASK2A +;>> IF VERSION<>GAMECOMPLETE THEN QUITPLAYAGAIN + IF GAMESOLVED<>SOLVING THEN QUITPLAYAGAIN ;>> +.ASK2 +;If the final part and solved previous parts then win entire trilogy + IF C0<>FINALPART THEN SOLVEDALL + +.ASK2A ;>> + MESSAGE 2313 ;Do you want to SAVE final position ? + GOSUB ASKINPUT + IF RESULT=FALSE THEN ASK2A ;>> + IF I1=IYES THEN SAVEFINAL + IF I1=INO THEN QUITPLAYAGAIN + IF I1=INORTH THEN QUITPLAYAGAIN + GOTO ASK2A ;>> +.SAVEFINAL + GAMESOLVED=ENDPOSITION ;>> +;(Don't return to game play after here) + SAVE + GOTO ASK2A ;>> +.SOLVEDALL + MESSAGE 2316 ;You have solved the entire trilogy + GOTO QUITPLAYAGAIN + +;----- + +.ASKINPUT + GOSUB @CLEARINPUT + GOSUB @GETI1I2I3I4 + IF I1=IRAM THEN ASKIN2 + IF I1=IOOPS THEN ASKIN3 + IF I1=IRESTORE THEN ASKIN1 + RESULT=TRUE + RETURN + +.ASKIN1 + GOSUB @LENSLOK + IF RESULT=FALSE THEN ASKIN4 + RESTORE + IF GAMEOVER=TRUE THEN @STARTGAME ;>>Trap bug on TORCH driver + GOTO @AFTERRESTORE + +.ASKIN2 + NOMOREINPUT=TRUE + GOTO @RAMLOAD + +.ASKIN3 + GOSUB @TRYOOPS + IF RESULT=TRUE THEN @AFTERRESTORE ;>> ENDCOMMAND + +.ASKIN4 + RESULT=FALSE + RETURN + +;----- + +.QUITPLAYAGAIN + GAMEOVER=TRUE ;>> + MESSAGE 2311 ;Quit or Restore ? + GOSUB ASKINPUT + IF RESULT=FALSE THEN @QUITPLAYAGAIN + IF I1=IQUIT THEN @STARTGAME + GOTO @QUITPLAYAGAIN + +;----- + +.ABORTGAME + MESSAGE 2310 ;Press space + +.WAITFORSPACE ;Variables may be corrupted + C0=0 + C1=1 + C3=3 + LINPUT(C0)=C3 + DRIVER + X1=LINPUT(C1) + IF X1<>32 THEN WAITFORSPACE + GOTO @STARTGAME + +;----- + +.WORDS + SCREEN T + GOTO @ENDCOMMAND + +;----- + +.PICTURES + if prep=7 then words ; pictures off=words + SCREEN G C0 + LASTPICTURE=0 + GOTO @DESCRIBE ;Re-describe room + +;----- + +.AFTERRESTORE +;After a RESTORE or RAMLOAD or PICTURES + + C0=0 ;>> + p9=0 + LASTPICTURE=0 ;>> + +;Solved current part of previous game? + IF GAMESOLVED<>ENDPOSITION THEN AFTER2 ;>> + + IF VERSION=GAMECODE THEN @DIE ;>>Solved current game + IF C0<>FIRSTPART THEN AFTER2 ;First part can't be a chain + IF VERSION<>PREVIOUSGAMECODE THEN AFTER2 ;>> +;Solved previous game. +;>> IF VERSION<>PREVIOUSGAMECOMPLETE THEN AFTER2 +;Mark as having solved all previous parts: + MESSAGE 2317 ;>> + CLEAR ;>>Assign zero to first 128 variables + VERSION=GAMECODE ;>> + GAMESOLVED=SOLVING ;>> +;>> VERSION=GAMECOMPLETE + nomoreinput=true ;>>mike 26/10/86 + wantwhatnow=true ;>>mike 26/10/86 + somethingprocessed=true ;>>mike 26/10/86 + GOTO @RETURNTOSTART + +.AFTER2 +;>> IF VERSION=GAMECOMPLETE THEN @DIE ;Already solved this game ? + IF VERSION<>GAMECODE THEN WRONGPOSITION ;Wong game restored + IF C1<>1 THEN WRONGPOSITION + IF C2<>2 THEN WRONGPOSITION + IF C3=3 THEN @DESCRIBE +.WRONGPOSITION + MESSAGE 2314 ;Bad restored position + GOTO @ABORTGAME + +;----- + +;----------------------------------------------- +;--------------------------- +;----------------------------------------------- diff --git a/l9dev/regress/games.l9/eden.l9/compile.bat b/l9dev/regress/games.l9/eden.l9/compile.bat new file mode 100644 index 0000000..e631783 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/compile.bat @@ -0,0 +1,9 @@ +1aconst.txt +1apconst.txt +1acore.txt +1aparse.txt +1aspecial.txt +1chain.txt +1oops.txt +1book.txt +2340 diff --git a/l9dev/regress/games.l9/eden.l9/exit.txt b/l9dev/regress/games.l9/eden.l9/exit.txt new file mode 100644 index 0000000..9d9b5d6 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/exit.txt @@ -0,0 +1,750 @@ +; "RETURN TO EDEN" - EXIT TABLE - AUG 18TH 1984 +; Copyright (C) 1984 Level 9 Computing. +; +; 9 - up +; 10 - down +; 11 - in +; 12 - out +; +; format is LDIT +; +;Room number 1 +0001 1 3 +0001 3 4 +0001 4 5 +1001 7 2 +;Room number 2 +0000 1 3 +0000 4 5 +1000 7 2 +;Room number 3 +0000 1 3 +0000 3 6 +1000 7 2 +;Room number 4 +0000 1 3 +0001 3 6 +0000 4 5 +1001 10 13 +;Room number 5 +0000 3 6 +0000 4 5 +1001 7 2 +;Room number 6 +0000 1 3 +0000 3 6 +1000 4 5 +;Room number 7 +0001 1 9 +0001 3 10 +0001 4 11 +1001 7 8 +;Room number 8 +0000 1 9 +0000 4 11 +1000 7 8 +;Room number 9 +0000 1 9 +0000 3 10 +1000 7 8 +;Room number 10 +0000 1 9 +0001 3 12 +1000 4 11 +;Room number 11 +0000 3 10 +0000 4 11 +1000 7 8 +;Room number 12 +0000 1 9 +1000 4 11 +;Room number 13 +1001 10 14 +;Room number 14 +1001 10 15 +;Room number 15 +0001 3 17 +0000 4 15 +1000 7 15 +;Room number 16 +1001 4 17 +;Room number 17 +1001 3 19 +;Room number 18 +1001 1 17 +;Room number 19 +1001 9 21 +;Room number 20 +1001 7 19 +;Room number 21 +1001 9 7 +;Room number 22 +1001 7 21 +;Room number 23 +0010 1 23 +0010 3 24 +0010 4 64 +1010 7 23 +;Room number 24 +0010 1 24 +0010 3 23 +0010 4 64 +1010 7 25 +;Room number 25 +0010 1 24 +0010 3 25 +0010 4 26 +1010 7 23 +;Room number 26 +0010 1 25 +0010 3 26 +0010 4 65 +1010 7 25 +;Room number 27 +1000 14 255 +;Room number 28 +1001 12 59 +;Room number 29 +1000 12 57 +;Room number 30 +0001 3 31 +1001 7 42 +;Room number 31 +1001 6 32 +;Room number 32 +1001 4 35 +;Room number 33 +1001 1 31 +;Room number 34 +1001 1 43 +;Room number 35 +1001 7 34 +;Room number 36 +1001 1 33 +;Room number 37 +1001 7 45 +;Room number 38 +1001 1 45 +;Room number 39 +1000 1 40 ;This is a dummy +;Room number 40 +0001 1 66 +0001 3 46 +1001 4 41 +;Room number 41 +1001 3 48 +;Room number 42 +1001 4 43 +;Room number 43 +1001 3 32 +;Room number 44 +1001 4 45 +;Room number 45 +1001 1 44 +;Room number 46 +1001 4 48 +;Room number 47 +1001 7 46 +;Room number 48 +1001 3 49 +;Room number 49 +1001 3 99 +;Room number 50 +1001 1 41 +;Room number 51 +0001 1 48 +1001 9 35 +;Room number 52 +0001 1 49 +1001 3 100 +;Room number 53 +1001 4 54 +;Room number 54 +1001 3 59 +;Room number 55 +0001 1 62 +0001 4 53 +1001 7 12 +;Room number 56 +1001 7 55 +;Room number 57 +1001 1 56 +;Room number 58 +1001 7 56 +;Room number 59 +0001 1 58 +0001 8 57 +0011 9 28 +1010 10 41 +;Room number 60 +0001 1 75 +1001 6 56 +;Room number 61 +1000 10 66 +;Room number 62 +0001 1 71 +1001 3 63 +;Room number 63 +0001 1 73 +1001 3 60 +;Room number 64 +0000 1 23 +0001 3 65 +1001 4 72 +;Room number 65 +1001 4 74 +;Room number 66 +1001 3 67 +;Room number 67 +1001 4 46 +;Room number 68 +1001 7 67 +;Room number 69 +1000 1 66 ;This is a dummy +;Room number 70 +0000 3 72 +0000 4 73 +1000 7 70 +;Room number 71 +0000 1 72 +0000 3 73 +1000 7 71 +;Room number 72 +0000 3 74 +0000 4 75 +1000 7 72 +;Room number 73 +0000 1 74 +0000 3 75 +1000 7 73 +;Room number 74 +0000 3 61 +0000 4 61 +1000 7 74 +;Room number 75 +0000 1 61 +0000 3 61 +1000 7 75 +;Room number 76 +1001 3 77 +;Room number 77 +1001 3 78 +;Room number 78 +1001 3 79 +;Room number 79 +1001 3 80 +;Room number 80 +1001 3 81 +;Room number 81 +1001 3 82 +;Room number 82 +1001 9 131 +;Room number 83 +1000 1 84 ;This is a dummy +;Room number 84 +0001 2 91 +1001 3 85 +;Room number 85 +0001 1 91 +1001 3 86 +;Room number 86 +0001 1 90 +1001 3 87 +;Room number 87 +1001 1 88 +;Room number 88 +1001 7 90 +;Room number 89 +0001 1 76 +1001 3 92 +;Room number 90 +0001 1 92 +1001 7 91 +;Room number 91 +1001 1 89 +;Room number 92 +1001 3 93 +;Room number 93 +1001 4 88 +;Room number 94 +0000 7 93 +1100 11 109 +;Room number 95 +1001 4 96 +;Room number 96 +1001 4 84 +;Room number 97 +0001 3 95 +1001 4 98 +;Room number 98 +1001 3 96 +;Room number 99 +0001 3 97 +1001 4 100 +;Room number 100 +1001 3 98 +;Room number 101 +1000 1 105 ;This is a dummy +;Room number 102 +1000 1 105 ;This is a dummy +;Room number 103 +1000 1 105 ;This is a dummy +;Room number 104 +1000 1 105 ;This is a dummy +;Room number 105 +1001 10 106 +;Room number 106 +0001 1 107 +0000 4 106 +1001 10 110 +;Room number 107 +0000 1 107 +0000 9 105 +1001 10 126 +;Room number 108 +1001 12 109 +;Room number 109 +0001 1 110 +1001 3 113 +;Room number 110 +0001 1 126 +1001 3 114 +;Room number 111 +0001 1 113 +1011 10 112 +;Room number 112 +1001 12 111 +;Room number 113 +0001 1 114 +1001 3 120 +;Room number 114 +1001 3 115 +;Room number 115 +1001 4 120 +;Room number 116 +1001 7 115 +;Room number 117 +1001 7 116 +;Room number 118 +1001 7 117 +;Room number 119 +1001 4 118 +;Room number 120 +1001 3 121 +;Room number 121 +0001 1 116 +0001 3 123 +1000 4 171 +;Room number 122 +1001 4 117 +;Room number 123 +1001 1 117 +;Room number 124 +1001 11 125 +;Room number 125 +1001 12 126 +;Room number 126 +1001 3 127 +;Room number 127 +1001 4 114 +;Room number 128 +0000 3 129 +0000 4 115 +1000 7 127 +;Room number 129 +1001 4 116 +;Room number 130 +1000 1 129 ;This is a dummy +;Room number 131 +1001 4 137 +;Room number 132 +1001 7 131 +;Room number 133 +1001 3 134 +;Room number 134 +1000 10 141 +;Room number 135 +1001 10 134 +;Room number 136 +1001 7 135 +;Room number 137 +1001 4 138 +;Room number 138 +1001 4 139 +;Room number 139 +1001 4 140 +;Room number 140 +1001 4 141 +;Room number 141 +0000 3 134 +1001 4 142 +;Room number 142 +0001 5 144 +1001 6 143 +;Room number 143 +1011 3 154 +;Room number 144 +1011 7 154 +;Room number 145 +0011 1 154 +0001 2 144 +1001 8 143 +;Room number 146 +1001 7 142 +;Room number 147 +1001 7 146 +;Room number 148 +1001 4 147 +;Room number 149 +1001 1 147 +;Room number 150 +0001 7 147 +1001 9 129 +;Room number 151 +0001 9 147 +1001 12 171 +;Room number 152 +1001 3 141 +;Room number 153 +1001 3 142 +;Room number 154 +1011 1 142 +;Room number 155 +1000 1 154 ;Dummy +;Room number 156 +1000 1 154 ;Dummy +;Room number 157 +1000 1 154 ;Dummy +;Room number 158 +1000 1 154 ;Dummy +;Room number 159 +1000 1 154 ;Dummy +;Room number 160 +1000 1 154 ;Dummy +;Room number 161 +1000 1 154 ;Dummy +;Room number 162 +1000 1 154 ;Dummy +;Room number 163 +1000 1 154 ;Dummy +;Room number 164 +1000 1 154 ;Dummy +;Room number 165 +1001 3 166 +;Room number 166 +1001 3 167 +;Room number 167 +1001 3 168 +;Room number 168 +1001 3 169 +;Room number 169 +1001 3 165 +;Room number 170 +0001 4 169 +0011 11 169 ; in to track (a kludge) +1001 10 169 +;Room number 171 +1001 4 170 +;Room number 172 +0011 12 170 ; out to platform +1001 1 170 +;Room number 173 +1000 1 171 ;Dummy +;Room number 174 +1100 1 171 ;Dummy +;Room number 175 +0111 12 176 +1101 4 176 +;Room number 176 +1001 4 171 +;Room number 177 +1001 1 176 +;Room number 178 +1001 1 176 +;Room number 179 +1001 1 176 +;Room number 180 +1001 1 176 +;Room number 181 +1001 1 176 +;Room number 182 +1000 9 141 +;Room number 183 +1001 1 176 +;Room number 184 +1001 1 176 +;Room number 185 +1001 1 176 +;Room number 186 +1001 1 176 +;Room number 187 +1001 1 176 +;Room number 188 +1001 1 176 +;Room number 189 +1001 1 176 +;Room number 190 +1001 1 176 +;Room number 191 +1001 1 187 +;Room number 192 +1001 7 188 +;Room number 193 +1000 7 192 +;Room number 194 +1001 1 189 +;Room number 195 +1001 1 190 +;Room number 196 +1001 7 189 +;Room number 197 +1001 7 190 +;Room number 198 +1001 7 196 +;Room number 199 +1001 7 197 +;Room number 200 +1001 10 135 +;Room number 201 +1001 4 171 +;Room number 202 +0001 1 205 +1001 4 201 +;Room number 203 +1001 3 202 +;Room number 204 +1001 7 202 +;Room number 205 +0010 1 205 +0010 3 205 +0011 4 202 +1011 7 206 +;Room number 206 +0010 4 206 +1010 7 206 +;Room number 207 +0010 1 207 +0010 3 208 +0011 4 206 +1010 7 207 +;Room number 208 + 1000 4 207 +;Room number 209 +1001 4 208 +;Room number 210 +1001 4 209 +;Room number 211 +1001 9 210 +;Room number 212 +1000 1 171 ;Dummy +;Room number 213 +1001 1 171 ;Dummy +;Room number 214 +1001 3 215 +;Room number 215 +1001 4 171 +;Room number 216 +1001 7 215 +;Room number 217 +1001 7 216 +;Room number 218 +1001 4 216 +;Room number 219 +1001 4 215 +;Room number 220 +0000 1 245 +1001 4 219 +;Room number 221 +1001 3 222 +;Room number 222 +1101 1 223 +;Room number 223 +1101 1 229 +;Room number 224 +1001 3 225 +;Room number 225 +1001 1 228 +;Room number 226 +1101 7 225 +;Room number 227 +1001 3 228 +;Room number 228 +0001 1 225 +1001 3 229 +;Room number 229 +1001 3 230 +;Room number 230 +0110 3 231 +1100 11 231 +;Room number 231 +1001 3 232 +;Room number 232 +1101 3 233 +;Room number 233 +1100 7 232 +;Room number 234 +0001 10 230 +1010 12 230 +;Room number 235 +1001 3 236 +;Room number 236 +0001 1 237 +1001 4 237 +;Room number 237 +1001 3 238 +;Room number 238 +1001 10 239 +;Room number 239 +1001 10 240 +;Room number 240 +1001 7 241 +;Room number 241 +0000 1 240 +0000 4 240 +0000 7 240 +1000 10 241 +;Room number 242 +1001 1 243 +;Room number 243 +0011 10 1 +1001 12 1 +;Room number 244 +0011 7 243 +1001 12 243 +;Room number 245 +1000 12 221 +;Room number 246 +1001 9 245 +;Room number 247 +1001 12 222 +;End-of-table markers: +0000 0 0 +;---------------------------------------------------- +;------------------------------- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +? diff --git a/l9dev/regress/games.l9/eden.l9/license.txt b/l9dev/regress/games.l9/eden.l9/license.txt new file mode 100644 index 0000000..9c355e1 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/license.txt @@ -0,0 +1,2 @@ +These files are covered by the license to be found in https://github.com/MikeTheTechie/Level9-Public/blob/main/License.txt +All other rights are reserved. diff --git a/l9dev/regress/games.l9/eden.l9/oops.txt b/l9dev/regress/games.l9/eden.l9/oops.txt new file mode 100644 index 0000000..16f36a0 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/oops.txt @@ -0,0 +1,209 @@ +;'RAM' and 'OOPS' for Converted Trilogies + +;Copyright (C) 1986 Level 9 Computing + +;B:OOPS.TXT + +;----- + +VAR + SAVEL90 + SAVEL91 + SAVEL92 + SAVEL93 + OOPSFL + +BEGIN + +;'RAM SAVE or 'RAM LOAD' + +.RAMCOMMAND + VALUE=I2 + IF VALUE=IRESTORE THEN RAMLOAD + +;Otherwise it's a RAM SAVE: + + PARSEX2=C0 ; first position + GOSUB @RAMWRITE +.RAMSAVEEND + IF RESULT<>C0 THEN NOTAVBLE;>>>=C0 THEN @ENDCOMMAND ;>>> ANDY 26/6/86 + MESSAGE OK ;>>> ANDY 26/6/86 + GOTO @ENDCOMMAND ;>>> ANDY 26/6/86 +.NOTAVBLE ;>>> ANDY 26/6/86 + MESSAGE 2300 ;Not available + GOTO @CANCELINPUT + +;'RAM' keyword followed by LOAD/RESTORE + +.RAMLOAD + PARSEX2=C0 ; first position + GOSUB @RAMREAD + IF RESULT<>C0 THEN NOTAVBLE1 ;>>>=C0 THEN @AFTERRESTORE;>>>ANDY 26/6/86 + MESSAGE OK ;>>> ANDY 26/6/86 + MESSAGE CR ;>>> ANDY 26/6/86 + GOTO @AFTERRESTORE ;>>> ANDY 26/6/86 +.NOTAVBLE1 ;>>> ANDY 26/6/86 + MESSAGE 2300 ;Not available + GOTO @CANCELINPUT + +;----- + +.INITOOPS +; count number of oops positions available + LASTOOPSROOM=C0 + OOPSPOSEND=C0 + OOPSPOS=C0 + NEXTOOPSPOS=C0 + NEXTOOPSEND=C0 + + PARSEX2=C1 + GOSUB @RAMWRITE + IF RESULT=C0 THEN INITOOPS1 + + PARSEX2=C0 + GOSUB @RAMWRITE + IF RESULT<>C0 THEN INITOOPSRET ;No RAM SAVE + MESSAGE 2301 ;Only RAM SAVE available + GOTO INITOOPS2 + +.INITOOPS1 + OOPSPOS=C1 + NEXTOOPSPOS=C1 + MESSAGE 2302 ; ram and oops available + +; now go through and write 'certified garbage' to all positions +.INITOOPS2 + C2=65000 ; show that positions are invalid +.INITOOPS3 + GOSUB @RAMWRITE + ADD PARSEX2,C1 + IF RESULT=C0 THEN INITOOPS3 + C2=2 ; restore C2 +.INITOOPSRET + RETURN + +;----- + +.OOPS + GOSUB TRYOOPS + IF RESULT=TRUE THEN @AFTERRESTORE + GOTO @ENDCOMMAND + +.TRYOOPS +; OOPSPOS points to next free position in ram save area +; go back some positions if they are available + IF OOPSPOS<>C0 THEN OOPS1 + MESSAGE 2300 ;Not available + RESULT=FALSE + RETURN + +.OOPS1 + IF OOPSPOS<>C1 THEN OOPS3 +; have gone to position 0, so need to wrap round to end of ram area + IF OOPSPOSEND<>C0 THEN OOPS2 + + MESSAGE 2304 ;No OOPS position found + RESULT=FALSE + RETURN + +.OOPS2 + OOPSPOS=OOPSPOSEND ; first invalid position + +.OOPS3 + OOPSFL=1 ; >> ANDY 26/6/86 + SUB OOPSPOS,C1 + PARSEX2=OOPSPOS + GOSUB RAMREAD + NOMOREINPUT=TRUE + RESULT=TRUE + RETURN + +;----- + +.SAVEOOPS +; OOPSPOS points to the next free position in ram save area +; this routine called on EVERY movement +; try writing to current position + + if i1=ioops then saveoopsret ;>>mike 8/11/86 + IF OOPSPOS=C0 THEN SAVEOOPSRET ;OOPS not available + + LASTOOPSROOM=R1 + NEXTOOPSPOS=OOPSPOS + NEXTOOPSEND=OOPSPOSEND + +.SAVEOOPS1 + PARSEX2=NEXTOOPSPOS + GOSUB RAMWRITE + IF RESULT=C0 THEN SAVEOOPSOK ; fine, inc pointer and finish +; something went wrong. +; if we are in the first position, tell the user +; that it is not available here + IF NEXTOOPSPOS<2 THEN SAVEOOPSRET ; keep quiet, ignore the error +; ok, so have some saved positions. Rotate round cyclically + NEXTOOPSEND=NEXTOOPSPOS ; save first invalid position + NEXTOOPSPOS=C1 + GOTO SAVEOOPS1 + +.SAVEOOPSOK + ADD NEXTOOPSPOS,C1 +.SAVEOOPSRET + RETURN + +;----- + +.OOPSCHECK + IF R1=LASTOOPSROOM THEN SAMEROOM + OOPSPOS=NEXTOOPSPOS + OOPSPOSEND=NEXTOOPSEND + LASTOOPSROOM=R1 +.SAMEROOM + RETURN + +;----- + +.RAMREAD + PARSEX1=23 ; code for ramload + GOSUB RAMOPERATION + IF C2<>2 THEN RAMERROR ;Do not use C2. Check for corrupted variables + RETURN + +.RAMERROR + IF OOPSFL<>1 THEN RAMERROR1 + MESSAGE 2304 ; >> Can't Oops back any further: ANDY 26/6/86 + OOPSFL=0 ; >> ANDY 26/6/86 + GOTO @ABORTGAME ; >> ANDY 26/6/86 +.RAMERROR1 ; >> ANDY 26/6/86 + MESSAGE 2303 ; Must RAM SAVE first + GOTO @ABORTGAME + +;----- + +.RAMWRITE + PARSEX1=22 ; code for ramsave +; drop through to RAMOPERATION + +.RAMOPERATION +; write to position PARSEX2, return RESULT=0 if OK + SAVEL90=LINPUT(C0) ;>> + SAVEL91=LINPUT(C1) ;>> + SAVEL92=LINPUT(C2) ;>> + SAVEL93=LINPUT(C3) ;>> + + LINPUT(C0)=PARSEX1 + LINPUT(C1)=PARSEX2 ; position number + LINPUT(C2)=C0 + DRIVER + C0=0 ;In case variables are corrupted. + RESULT=LINPUT(C0) +;Now restore LIST 9. + LINPUT(0)=SAVEL90 ;>> + LINPUT(1)=SAVEL91 ;>> (C0=1) + LINPUT(2)=SAVEL92 ;>> (C0=2) + LINPUT(3)=SAVEL93 ;>> (C0=3) + RETURN +; +.NOTAVAILABLE + MESSAGE 2300 ;Feature not implemented + RETURN +;----- diff --git a/l9dev/regress/games.l9/eden.l9/ref/table.dat b/l9dev/regress/games.l9/eden.l9/ref/table.dat new file mode 100644 index 0000000..9fc71e5 Binary files /dev/null and b/l9dev/regress/games.l9/eden.l9/ref/table.dat differ diff --git a/l9dev/regress/games.l9/eden.l9/st.l9/gamedata.dat b/l9dev/regress/games.l9/eden.l9/st.l9/gamedata.dat new file mode 100644 index 0000000..46c369c Binary files /dev/null and b/l9dev/regress/games.l9/eden.l9/st.l9/gamedata.dat differ diff --git a/l9dev/regress/games.l9/eden.l9/st.l9/ref/gamedata.dat b/l9dev/regress/games.l9/eden.l9/st.l9/ref/gamedata.dat new file mode 100644 index 0000000..46c369c Binary files /dev/null and b/l9dev/regress/games.l9/eden.l9/st.l9/ref/gamedata.dat differ diff --git a/l9dev/regress/games.l9/eden.l9/st.l9/ref/squash.dat b/l9dev/regress/games.l9/eden.l9/st.l9/ref/squash.dat new file mode 100644 index 0000000..61b2c41 Binary files /dev/null and b/l9dev/regress/games.l9/eden.l9/st.l9/ref/squash.dat differ diff --git a/l9dev/regress/games.l9/eden.l9/st.l9/squash.dat b/l9dev/regress/games.l9/eden.l9/st.l9/squash.dat new file mode 100644 index 0000000..61b2c41 Binary files /dev/null and b/l9dev/regress/games.l9/eden.l9/st.l9/squash.dat differ diff --git a/l9dev/regress/games.l9/eden.l9/table.dat b/l9dev/regress/games.l9/eden.l9/table.dat new file mode 100644 index 0000000..9fc71e5 Binary files /dev/null and b/l9dev/regress/games.l9/eden.l9/table.dat differ diff --git a/l9dev/regress/games.l9/eden.l9/table.txt b/l9dev/regress/games.l9/eden.l9/table.txt new file mode 100644 index 0000000..d8e6c81 --- /dev/null +++ b/l9dev/regress/games.l9/eden.l9/table.txt @@ -0,0 +1,219 @@ +; "RETURN TO EDEN" - LISTS +; New version 21/8/86 modified from file of AUG 18TH 84 +; Copyright (C) 1984,1986 Level 9 Computing. +; + ORG 0 +; +;NOTE WSPACE MAP: +;8000-800F ELEVATOR CODES TABLE +;8020-803F INPUT KEYWORDS TABLE (LIST 9) +;8050-80E0 CURRENT OBJECT POSITIONS. +; +start + DC.L LIST1-80-START ; Starting Positions of Objects + DC.L $8000 ;CURRENT POSITIONS. OFFSET=80.,MAX=233. + DC.L LIST3-START + DC.L LIST4-START + DC.L $8000 ;ELEVATOR CODES. OFFSET=0,LENGTH=15 + DC.L LIST6-START + DC.L $8140 ;LIST 7 + DC.L $8180 ;LIST 8 + DC.L $8100 ;LIST9 ;>>$8020 + DC.L END-START +; +LIST1 + DC.B 057 ; Strong Bean 80 + DC.B 038 ; Glue Berry 81 + DC.B 032 ; Hum Bug 82 + DC.B 068 ; Cloak 83 + DC.B 037 ; Cherry Bomb 84 + DC.B 065 ; Gloves 85 + DC.B 056 ; Manna Geranium 86 + DC.B 075 ; Water Log 87 + DC.B 252 ; ****** + DC.B 252 ; ****** + DC.B 053 ; Suck-seed 90 + DC.B 253 ; Para-shoot 91 + DC.B 037 ; Drum-stalk 92 + DC.B 058 ; Stem-ship 93 + DC.B 062 ; Tube-oars 94 + DC.B 036 ; Plane Twigs 95 + DC.B 253 ; Note 96 + DC.B 067 ; Balloons 97 + DC.B 049 ; Rubber band 98 + DC.B 253 ; Brick 99 + DC.B 061 ; Dry bulb 100 + DC.B 054 ; Stone fruit 101 + DC.B 028 ; Fish Fungus 102 + DC.B 063 ; Wishbone 103 + DC.B 036 ; Cold leaf 104 + DC.B 059 ; Sweet Pea 105 + DC.B 064 ; Pill 106 + DC.B 253 ; Roots 107 + DC.B 253 ; Telescope 108 + DC.B 047 ; Cling vine 109 + DC.B 060 ; Fig leaf 110 + DC.B 252 ; ****** 111 + DC.B 252 ; ****** 112 + DC.B 252 ; ************* 113 + DC.B 252 ; ************* 114 + DC.B 226 ; Helmet 115 + DC.B 226 ; Leotard 116 + DC.B 244 ; Radsuit 117 + DC.B 255 ; Tradclads 118 + DC.B 244 ; Watch 119 + DC.B 252 ; ******** 120 + DC.B 244 ; Calculator 121 + DC.B 253 ; Catapult 122 + DC.B 244 ; Compass 123 + DC.B 082 ; Credit card 124 + DC.B 152 ; Cutters 125 + DC.B 244 ; Geiger 126 + DC.B 188 ; Identity Doc 127 + DC.B 200 ; Jug 128 + DC.B 252 ; ****** 129 + DC.B 252 ; ****** 130 + DC.B 253 ; Pepsi Koala 131 + DC.B 253 ; Plate 132 + DC.B 246 ; Radcom/Radio 133 + DC.B 181 ; Screwfinger 134 + DC.B 022 ; Shovel 135 + DC.B 253 ; Train ticket 136 + DC.B 186 ; Travel pass 137 + DC.B 244 ; Tent 138 + DC.B 112 ; Washing powder139 + DC.B 252 ; ************* 140 + DC.B 247 ; Reekabisk box 141 + DC.B 211 ; Visor 142 + DC.B 252 ; ****** 143 + DC.B 252 ; ****** 144 + DC.B 252 ; ****** 145 + DC.B 252 ; ****** 146 + DC.B 252 ; ****** 147 + DC.B 252 ; ****** 148 + DC.B 252 ; ****** 149 +; +; * IMMOVEABLE OBJECTS - FOREST * +; + DC.B 252 ; ****** + DC.B 252 ; ****** + DC.B 252 ; ****** + DC.B 252 ; ****** + DC.B 253 ; House plant 154 + DC.B 045 ; Broken branch 155 + DC.B 253 ; Nest 156 + DC.B 101 ; Lever 157 + DC.B 067 ; Quicksand 158 + DC.B 252 ; ****** 159 +; +; * IMMOVEABLE OBJECTS +; + DC.B 252 ; ****** 160 + DC.B 171 ; Barrier 161 + DC.B 232 ; Bed 162 + DC.B 108 ; Bevomat 163 + DC.B 175 ; Buttons 164 + DC.B 153 ; Cables 165 + DC.B 252 ; ****** 166 + DC.B 210 ; City fathers 167 + DC.B 172 ; Emergency cord168 + DC.B 252 ;>>mike 24/8/86 - not used 178 ; Cupboard 169 + DC.B 099 ; Fence 170 + DC.B 154 ; Fire 171 + DC.B 123 ; Faucet 172 + DC.B 151 ; Grating 173 + DC.B 233 ; Grid - Drain 174 + DC.B 233 ; Grill - Vent 175 + DC.B 252 ; ****** 176 + DC.B 252 ; ****** 177 + DC.B 252 ; ****** 178 + DC.B 252 ; ****** 179 + DC.B 0 ; >>mike 22/8/86 - not needed 203 ; Leak 180 + DC.B 252 ; ****** 181 + DC.B 231 ; Mushmat 182 + DC.B 252 ; ****** 183 + DC.B 153 ; Pillars 184 + DC.B 133 ; Plug 185 + DC.B 126 ; Riverboat 186 + DC.B 211 ; Screen 187 + DC.B 084 ; Sea weed 188 + DC.B 252 ; ****** 189 + DC.B 252 ; ****** 190 + DC.B 115 ; Wall 191 + DC.B 111 ; Well 192 + DC.B 252 ; ****** 193 + DC.B 114 ; Statue 194 + DC.B 252 ;>>mike 21/8/86 -152 ; Robot 195 + DC.B 252 ; ****** 196 + DC.B 252 ; ****** 197 + DC.B 252 ; ****** 198 + DC.B 252 ; ****** 199 + DC.B 086 ; Autoscythe 200 + DC.B 088 ; Tractor 201 + DC.B 252 ; ****** 202 + DC.B 252 ; ****** 203 + DC.B 050 ; Army Ants 204 + DC.B 253 ; See Bee 205 + DC.B 253 ; Ouija Bird 206 + DC.B 253 ; Leviathan 207 + DC.B 252 ; ****** 208 + DC.B 252 ; ****** 209 + DC.B 252 ; ****** 210 + DC.B 182 ; Boss 211 + DC.B 252 ; ****** 212 + DC.B 183 ; ****** 213 + DC.B 252 ; ****** 214 + DC.B 252 ; ****** 215 + DC.B 252 ; ****** 216 + DC.B 252 ; ****** 217 + DC.B 252 ; ****** 218 + DC.B 150 ; Busker 219 + DC.B 140 ; Big Brother 220 + DC.B 145 ; Bodyguard 221 + DC.B 124 ; Croupier 222 + DC.B 253 ; ****** 223 + DC.B 143 ; Derelicts 224 + DC.B 253 ; ****** 225 + DC.B 145 ; Godfather 226 + DC.B 132 ; Graunch 227 + DC.B 253 ; ****** 228 + DC.B 252 ;>>mike 21/8/86 - 153 ; Junkie 229 + DC.B 128 ; Nudibots 230 + DC.B 253 ; ****** 231 + DC.B 144 ; Tramps 232 + DC.B 094 ; Cherubim 233 +; +LIST4 +; AUTOSCYTHE PATH + DC.B 84 + DC.B 85 + DC.B 86 + DC.B 87 + DC.B 87 + DC.B 87 + DC.B 86 + DC.B 85 + DC.B 84 + DC.B 0 + DC.B 0 +; +;WEEDER TRACK + DC.B 87 + DC.B 87 + DC.B 88 + DC.B 90 + DC.B 91 + DC.B 89 + DC.B 92 + DC.B 93 + DC.B 88 + DC.B 0 + DC.B 11 +;------------- +LIST3 +LIST5 +LIST6 +LIST7 +LIST8 +; +END \ No newline at end of file diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/acode.acd b/l9dev/regress/games.l9/ghost.l9/part1.l9/acode.acd new file mode 100644 index 0000000..d2d35ef Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part1.l9/acode.acd differ diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/aconst.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/aconst.txt new file mode 100644 index 0000000..f17eba9 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/aconst.txt @@ -0,0 +1,488 @@ +; Standard adventure source, copyright (C) 1988 Level 9 Computing. +; +; ACONST.TXT, general constants and variables for standard adventure. +; This should not include any game-specific data. +; +var + parttochain thispart thisgame dead ; Chain variables + lastpartscore + valuesave +; +CONST +; +;; Minus10=65526 ; >> Pete 14/9/89 + +;; itA=0 ; >> Pete 14/9/89 + itAN=1 + SingularSOME=2 +;; he=3 ; >>Mike 1/2/88 - now have "the" or "a" before them. ; >> Pete 14/9/89 + she=4 ;>>mike 1/2/88 - i.e. not proper nouns. - see below. + PluralSOME=5 +;; you=6 ; >> Pete 14/9/89 +;; ProperMale=7 ;>>mike 1/2/88 ; >> Pete 14/9/89 + ProperFemale=8 ;>>mike 1/2/88 +; +;; EAST=3 ; >> Pete 14/9/89 +;; WEST=7 ; >> Pete 14/9/89 +; +; NOW CONSTANTS FOR COMMON MESSAGES + SPACE=1 + COMMA=3 + CR=5 + AND=6 + SPACEand=14 +;; DOTnoSPACE=4 ; >> Pete 14/9/89 +;; DOTCR=7 ; >> Pete 14/9/89 + DOT=9 + THE=21 +;; COLON=18 ; >> Pete 14/9/89 +;; COLONnoSPACE=2 ; >> Pete 14/9/89 + QUOTE=19 + SOME=23 +;; DOTquote=24 ; >> Pete 14/9/89 + BlankLine=25 +;; STAR=98 ; >> Pete 14/9/89 +;; PLUS=99 ; >> Pete 14/9/89 +; + OWexits=1 + OWobjects=2 +; + NONSPECIFIC=31 ; USE IN POSITION SEARCH WHERE TYPE UNKNOWN +;; STACKspace=20 ; >> Pete 14/9/89 + MAXdirection=14 ; ACROSS + MAXdirectionPLUS1=15 +; +; Bases for text blocks + EXITdescBASE=50 + OBJECTdescBASE=300 + EXAMINEmessages=600 + EXAMINEoffset=300 ; from NOUNOFFSET + EXAMINEmaxOFFSET=500 +; +; Preposition values (all relative to prepoffset) + ipON=1 + ON=1 + UNDER=2 + BEHIND=3 + CARRIED=4 + WORN=5 +;; AT=6 ; for INPUT ; >> Pete 14/9/89 + ipIN=7 + IN=7 +;; HANGING=8 ; >> Pete 14/9/89 +;; ipFROM=17 ; >> Pete 14/9/89 +;; LIEON=12 ; >> Pete 14/9/89 +;; SITON=13 ; >> Pete 14/9/89 + WITH=16 + ipINFRONT=18 +; + ipOFF=200 ;66 + OFF=200 ;66 + UP=201 ;67 +;; DOWN=202 ;68 ; >> Pete 14/9/89 + ipTO=203 + iTO=1803 ;93 - absolute message number + ipOUT=204 ;70 +;; iFOR=206 ;73 ; relative to prepoffset ; >> Pete 14/9/89 +;; iUNTIL=207 ;73 ; relative to prepoffset ; >> Pete 14/9/89 +;; ipDEBUG=208 ; >> Pete 14/9/89 +; +;; DISABLEIT=255 ; >> Pete 14/9/89 +; +; Movement verbs.. + iNORTH=1 +;; ivDOWN=10 ; >> Pete 14/9/89 + ivUP=9 + ivIN=11 + ivOUT=12 + iCROSS=13 + iCLIMB=14 +;; iJUMP=15 ; >> Pete 14/9/89 +; +; Intransitive verbs.. + iAGAIN=21 + iLOOK=22 +;; iINVENTORY=23 ; >> Pete 14/9/89 + iQUIT=24 + iRESTORE=25 + iRAMSAVE=27 + iRAMLOAD=28 + iVERBOSE=30 + iBRIEF=31 + iNONE=32 ; description mode +;; iplay=33 ; >> Pete 14/9/89 + ivON=34 + ivOFF=35 + iHELLO=205 ; >>fixed in g338 + iOOPS=39 +;; iATTACK=40 ; >> Pete 14/9/89 +;; iSEARCH=42 ; >> Pete 14/9/89 +;; iSMELL=44 ; >> Pete 14/9/89 +;; iKNOCK=45 ; >> Pete 14/9/89 +;; iLIE=47 ; >> Pete 14/9/89 +;; iSIT=48 ; >> Pete 14/9/89 + iSTAND=46 + iSAY=50 +; + iTELEPORT=51 + iGETME=52 + iSETupRUN=54 + iSETupGO=58 + + iReportProblem=65 + + iSHOUT=73 + ivTO=75 +; +;; iHAVE=80 ; group of verbs for output.. ; >> Pete 14/9/89 +;; iHAS=81 ; >> Pete 14/9/89 + iAM=82 +;; iARE=83 ; >> Pete 14/9/89 +;; iIS=84 ; >> Pete 14/9/89 +; +;; iGOin=87 ; >> Pete 14/9/89 + iGOout=88 +; +; goal-directed verbs + iWAITforPERSON=89 + iWAITuntilTIME=90 + iWAITforPERIOD=91 + iWAIT=92 ; short wait + iPARSEwait=32 ; what the user gets when he types "wait" +;; iKILL=93 ; >> Pete 14/9/89 +; +;; iDODGE=95 ; >> Pete 14/9/89 + iGDgo=96 ; npcs use this +;; iGDrun=97 ; >> Pete 14/9/89 + icheat=98 +;; iBUY=99 ; >> Pete 14/9/89 +; +; Transitive verbs.. + iEXAMINE=100 + iGET=104 + iTAKE=105 + iWEAR=106 + iDROP=107 + iPUT=108 + iREMOVE=109 + iTHROW=110 + iGIVE=111 + iASK=112 + iFOLLOW=113 +;; iOPEN=114 ; >> Pete 14/9/89 + iEXTINGUISH=116 +;; iPRESS=117 ; >> Pete 14/9/89 + iPUSH=118 +;; iFASTEN=119 ; >> Pete 14/9/89 + iPULL=121 +;; iDRESS=129 ; >> Pete 14/9/89 +;; iCOLLECT=132 ; >> Pete 14/9/89 + iRETURNobject=136 ; for npcs only + iSETUPfind=138 + iGDfind=139 +;; iCLOSE=140 ; >> Pete 14/9/89 + iTELL=142 +;; iSTRUGGLE=144 ; >> Pete 14/9/89 +;; iSTEALallFROM=145 ; >> Pete 14/9/89 + iENTER=166 +; +; game specific.. +;; iSCRATCH=170 ; >> Pete 14/9/89 + iHIT=233 ;183 +;; iCRUSH=186 ; >> Pete 14/9/89 +;; iDEMOLISH=189 ; >> Pete 14/9/89 +; +; Echo verbs also used for Y/N questions + ivNO=200 + ivYES=201 + iWHY=213 +; +; now verbs to do with racetracks (can never be typed by player as +; their message numbers are used by the first few nouns).. + OBEYracetrack=252 + RtConditional=247 + RtActorVaryMessage=248 + RtActorSingleMessage=249 +; racetrackSAY=250 + racetrackMESSAGE=251 + racetrackVARYMESSAGE=252 + racetrackGOSUB=253 + racetrackGOTO=254 + racetrackRETURN=255 +; +; Verb groups.. + maxINTRANSITIVE=99 + maxTRANSITIVE=195 + minECHOminus1=199 + minECHOtransitive=235 ; none + maxECHO=250 +; +; Collective nouns.. + minCOLLECTIVE=234 + maxCOLLECTIVE=238 + iEVERYTHING=234 ; EVERYTHING-NOUNOFFSET + iTREASURE=235 +;; iWEAPONS=236 ; >> Pete 14/9/89 + iPEOPLE=237 + iCLOTHES=238 +; +; Now nouns +;; iBE=242 ; >> Pete 14/9/89 + iEXCEPT=247 + iIT=248 + iMINUTES=249 +;--- +; some omni-present objects + generalDOOR=239 ; omni-present nowadays +;; WATER=241 ; >> Pete 14/9/89 +;; iYOU=253 ; >> Pete 14/9/89 +; +; Misc noun values.. + minGARBAGE=3699 + maxGARBAGE=3799 +; + nullOBJECT=255 + nullVALUE=65535 + nullNUMBER=65535 +; +; WORD TYPE VALUES.. + ASCItype=0 ; non-alpha characters are returned as their ASCII values +;; ASCIItypeE=0 ; >> Pete 14/9/89 + VERBtype=2 ; 'V'erb + CONJtype=4 ; con'J'unction, e.g 'Take this AND that' + PREPtype=6 ; 'P'reposition, e.g 'Give something TO someone' + NOUNtype=8 ; 'N'oun + ADJEtype=10 ; 'A'djective + MATCHtype=12; 'C' used for matching with particular words - + ; e.g. was a reference to scenery the word 'panel' + NUMBtype=14 +;; maxTYPE=14 ; >> Pete 14/9/89 +;; maxAMBIG=10 ; MAX NUM OF AMBIG FORMS ACCEPTED FROM INPUT ; >> Pete 14/9/89 +; + ASCIoffset=0 + VERBoffset=50 + CONJoffset=0 ; ??? + PREPoffset=1600 + NOUNoffset=300 + ADJEoffset=300 ; = NOUNoffset + MATCHoffset=4300 ; used for matching with particular words +; +; ASCII VALUES + iCOMMA=44 + iDOT=46 +; +; Conjunctions (absolute message numbers).. + iTHEN=551 +;; iTHEREFORE=552 ; >> Pete 14/9/89 +; +;--- + FALSE=0 + TRUE=1 +;; ERRORcode=2 ; >> Pete 14/9/89 +; +; Constants for Objecttable assignments +; + otBASE=32 + otBASEplus1=33 + otMAX=47 ; otbase+15 + NOUNcarried=1 + NOUNonGROUND=2 +;; NOUNnotOBVIOUS=2 ; >> Pete 14/9/89 + NOUNspecified=128 + NOUNforbidden=192 +; +;; OK=2153 ; message 'OK' ; >> Pete 14/9/89 +; + NEGATIVE=50000 +;--- +;; HOSTILE=9 ; >> Pete 14/9/89 +;; FRIENDLY=0 ; >> Pete 14/9/89 +; +;--------------------------------------------------------------------------- +; +VAR + X1 X2 X3 X4 X5 X6 X7 X8 X9 ; Temporary work variables + C0 C1 C2 C3 C4 + C10 ; "Constants" with corresponding values + +; Input is converted to (e.g Put the Red Box on the Green Chair).. + VERB ; Put + PREP ; On + NOUN1 ; Red Box + NOUN2 ; Green Chair + iNUMBER ; Number, if specified ANYWHERE in input, eg "push button 1" + +; Used internally in parseinput.. + ADJECTIVE1 + ADJECTIVE2 + + VALUE ; General purpose result + INDEX ; Only used by READINPUTLIST + + HIFROM FROM ; Two byte values where (single) movement is from.. + ; "Hi" is containment type, other is room/container + HIDEST DEST ; Destination of move. See HIFROM and FROM + + STATUS ; Used by exit code. Status nibble. Last? Door? Invis? Two-way? + ROOM ; Current room of actor. Only changed by setupROOM + DIR ; Direction of move +;; NUMEXITS ; Just used by PRINTEXIT code ; >> Pete 14/9/89 + LASTROOM ; Previous room that actor was in + EXITVISIBLE ; A result of CHECKEXIT + CURRENTOBJECT ; Just used by PRESENTMULTIPLE + OBJECT ; General purpose variable, object acted upon by routines + HIPOS POS ; General purpose position of object + SEARCHPOS HISEARCHPOS ; Where parser expects object. E.g carried or on +; ground in current room. Also used in GETNEXTOBJECT, which returns the +; contents of the specified position, one at a time. + + LASTWORDPRINTED ; For printing IT in place of noun. "Last" noun printed. + OUTPUTWORD ; Internal to OUTWORDn (prints exits/object list) + WORD1 WORD2 WORD3 WORD4 ; Internal to OUTWORDn + OWTYPE ; ditto. Word type, so article can be added/pronoun substituted. + + RESULT ; General purpose result. Widely returned (as TRUE or FALSE) + + M1 M2 ; General purpose output messages. Lots of routines print M1. + SEARCHDEPTH ; Parameter to GETNEXTWORD + OBVIOUS ; Flag returned by CHECKIFOBVIOUS, if OBJECT can be seen + LASTPICTURE ; Last picture displayed (i.e the one you can probably see). +; + SEARCHTYPE ; used in CHECKTYPE. Class of word checked for (eg NOUN, VERB) + WORDTYPE ; internal variable of CHECKTYPE + EXCEPT ; Internal to parser. Did player type something like "ALL EXCEPT"? + WORDNOTPROCESSED ; Internal to parser + EOL SEPARATOR ; Internal to parser. + ; Respectively set at end of sentence/phrase + EVERYTHING ; Internal to parser. Did player use "EVERYTHING"? + NOMOREINPUT ; Do not change this unless you're using GETNEXTWORD. + ; Set at end of input line. Remains set unless made FALSE + PROCESSED ; Flag set in parsing. + SUPRESSCHECKING ; Internal to parser +; + itWORD ; value substituted for "IT" in input + itNUMBER ; ditto, for "INUMBER" +; + AGAINVERB againnoun1 againnoun2 againprep ; stored command, for AGAIN +; + VERBSTOCALL ; used by PRESENTMULTIPLE + HAVECALLEDVERB ; ditto + SOMETHINGPROCESSED ; prevents spurious "What now?" prompts + LASTVERBVALID ; Can user type 'again'? (Only to repeat a valid command) +; +;; TRAMPTR TRAMBASE ; Not used + TIMEINROOM ; Time since player last moved +;>>removed by L2 CONFIRMMESSAGE ; ?not used +; +;; TIME ; Player turns since game started ; >> Pete 14/9/89 +;; HOUR ; >> Pete 14/9/89 +;; MINUTE ; >> Pete 14/9/89 +;; DAY ; current time ; >> Pete 14/9/89 + +;; TIMEPASSED ; Time to add on during the coming move. ; >> Pete 14/9/89 + +;; SCOREINDEX ; Used within ADDSCORE ; >> Pete 14/9/89 + CURRENTMESSAGE ;? + DOOROPEN DOOR ; status/presence of door in current room +; + ACTOR ; current person who is moving/doing things +; +;; BLOWSTRENGTH ; used in combat ; >> Pete 14/9/89 + PROCESSINGSAY ; is user giving commands to someone? + SAYRESPONSE ; used by CONVERSE.TXT to specify when a response to +; the present conversational command has been printed + + OOPSPOS OOPSPOSEND ; internal to OOPS code + + ACTORATTRIBUTES ; used all over the place by NPC handlers + moreinfoexpected ; Program has typed where? and allows just a noun input +;; vandalptr ; internal to vandalism code ; >> Pete 14/9/89 + + startfloorpointers ; within list5 + startracetracks ; within list5 + numexplicitmoves ; number of moves made by N/S/E etc. rather than GO + wanttoprintand ; set to number of noun to replace with 'and' + executeprocessed ; set when gd commands have been acted on + descriptionmode ; verbose/brief/none. (None is the case for 'run') + startreversaltable ; in list5 + currentuserroom ; where player is (for benefit of npcs) + commandfinished ; set when a multiple command has finished + forceprinting ; when set, player gets messages even when not nearby + orderwaiting ; in NPC decision code. Is a queued command waiting? +;; cheatmode ; flag indicating level of cheating; >> Pete 14/9/89 + treatasfind ; internal to the parser + DestToDescribeExitsIn ; yeuch! So exits described in final room of "GO" +; + normaldescriptionmode ; the mode selected by the user + wordsoutput ; internal to PRINTEXITS etc + X Y ; Coordinates of ROOM on grid. Set by GETXY + target ; victim of combat etc +;; currentsceneryobject ; >> Pete 14/9/89 + + printingobjects ; internal to PRINTEXITS etc + severalexits ; ditto + + picturetodraw ; parameter given to SHOWPICTURE + highwater ; debugging variable, reporting max stack space used. + freespaceptr ; internal to NPCPUSH and NPCPOP + anglefromintended ; used in GO, when desired direction is blocked + intendeddirection ; ditto + synthdest ; destination on grid that actor is moving to + destnoun1 ; tells gdgoxy when it has arrived + + initfifoactor ; internal initfifo. ++++ MUST NOT BE CHANGED BY CODER. ++++ + lastunlinkedcommand ; internal to NPCPUSH + commandstolink ; ditto + + fatalerror ; serious error, set to fail current goal-directed command + lightinroom ; user's room light? + blockedbysm ; internal to goal directed movement + + OTPOS OTHIPOS ; object position, set at start of OBJECTTRIGGER +;; hitpoints ; internal to combat ; >> Pete 14/9/89 +;; activationsremaining ; used to limit NPCs active ; >> Pete 14/9/89 + xcoord ycoord ; position of picture +; + npclist9save0 npclist9save1 npclist9save2 npclist9save3 npclist9save4 + npclist9save5 npclist9save6 ; used when driver called, to protect data +; +;; m1save ; >> Pete 14/9/89 + m1printsave actorsave objectsave + roomsave ceroomsave + gdgoroomsave +;; gdroomsave ; misc vital save variables ; >> Pete 14/9/89 +; + gameover + AutoExits + twNoun + verbsave +; +; variables for new PrintObject... + + CurrentObjectsPrinted LastHicurrentpos LastCurrentPos TotalObjectsPrinted + SaveHisearchpos SaveSearchpos PluralOffset + +;--------------------------------------------------------------------------- +; +TABLE + OBJECTSTART=1 +; + CURRENTPOS=2 ; OBJECT CURRENT POSITION + HICURRENTPOS=3 +; + NPCINITIAL=5 ; NPC initial status + LIST5=5 ; Also used for floorpointers - from startfloorpointers on. +; + NPCCURRENT=6 + NPCSTACK=6 +; + OUTPUTBUFFER=7 + SCORETABLE=7 ; from entry 16 onwards + list7=7 +; + LIST8=8 +; + OBJECTTABLE=9 ; USED FOR EVERYTHING AND SIMILAR WORDS + LIST9=9 + LINPUT=9 +; \ No newline at end of file diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/acore.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/acore.txt new file mode 100644 index 0000000..0a025c6 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/acore.txt @@ -0,0 +1,1572 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; taken from Lancelot version 14/5/88 +; +; ACORE.TXT, core routines for the game, e.g standard printing code. +; Code in here is basically unchanged from game to game, but if you +; do need to make any alterations, be sure to mark them with a comment +; of the form below, so we can check them by searching for the ">>": +; ADD X1,X2 ; >> SPECIAL TO KNIGHT ORC + +; CheckIfObvious, PrintObject, DescActor routines updated for lancelot +; +BEGIN +; +;.DESCactor +;; Print any special messages for actor +;; e.g. 'You are standing on the object' +; +; X1=HICURRENTPOS(actor) +; IF X1=0 THEN DESCPLAYRET +; +; GOSUB @printTHEactor +; X1=HICURRENTPOS(actor) +; +; X2=1740 +; ADD X1,X2 +; MESSAGE X1 ; are standing on / sitting on / lying on etc. +; X1=CURRENTPOS(actor) +; GOSUB @printTHEobjectx1 +; MESSAGE DOT +;.DESCPLAYRET +; RETURN +;--- +.CHECKIFOBVIOUS +; see if 'OBJECT' is immediately obvious +;>>mike 8/2/88 if object=actor then ciofail + OBVIOUS=TRUE + IF SEARCHDEPTH=0 THEN CIORET + X1=HICURRENTPOS(OBJECT) + IF X1=0 THEN CIORET ; things on ground are always obvious + X1=CURRENTPOS(OBJECT) + if printingobjects=true then cionotactor + if x1=actor then cioret ; actor's possesions are always obvious +.cionotactor + x3=x1 ;*graham* save container + ADD X1,X1 +; look at hi initial position of container + X2=OBJECTSTART(X1) + IF X2>127 THEN CIORET ; 'obvious' bit set +; +;*graham* bug fix + x2=hicurrentpos(actor) + if x2=0 then ciofail + x2=currentpos(actor) ; actor is in same container as object, so + if x2=x3 then cioret ; make it obvious. +;*graham* +; +.CIOFAIL + OBVIOUS=FALSE +.CIORET + RETURN +;--- +; Print list of exits from current location.. +; +.exits + if nextverb=ivon then setAutoExits + if nextverb<>ivoff then printExits +.setAutoExits + AutoExits=nextverb + nextverb=0 + goto @done + +.printEXITS +;; prs " [printexits] " ; >> Debug + x8=dir ;*bug fix* 23/2/89 + severalexits=FALSE + OWTYPE=OWEXITS + if room124 then peedge ; scenery with something next to it +; +; are we at the edge of the board? + if x=0 then peedge + if y=0 then peedge + if x=xmax then peedge + if y=ymax then peedge + word1=2009 ; lead in all directions + word2=0 + word3=0 + word4=0 + dir=8 ; last compass direction + severalexits=TRUE + goto pedesc ; do rest of directions normally + +.penormal +.peedge +; yes - so print them normally + DIR=1 ; current direction +.PELOOP +; PRINT AN EXIT (IF VISIBLE) + FROM=ROOM + GOSUB @CHECKEXIT +;;* +;; if hole present, make visible exit IN +; if room<>23 then notsecretexit +; if dir<>11 then notsecretexit +; x1=currentpos(hole) +; if x1=0 then notsecretexit +; exitvisible=true +;.notsecretexit +;;* + IF EXITVISIBLE=FALSE THEN PENEXTDIR + WORD1=EXITDESCBASE + ADD WORD1,DIR + word2=0 + word3=0 + word4=0 + IF DOOR=0 THEN PENODOOR + WORD2=12 ; base for door messages + ADD WORD2,DOOROPEN +.PENODOOR + if severalexits=TRUE then pe2 ; already printed message + IF wordsoutput<>2 THEN PE2 + MESSAGE 10 ; EXITS ARE +.PE2 +.PEDESC + GOSUB @OUTWORD1234 +.PENEXTDIR + ADD DIR,C1 + IF DIR<14 THEN PELOOP +;;.PERET1 + if severalexits=TRUE then peret2 ; already printed message + IF wordsoutput>2 THEN PERET2 + MESSAGE 11 ; ONLY VISIBLE EXIT IS +.PERET2 + GOSUB @OUTWORDnone ; flush bufer + if wanttoprintand=FALSE then peret + message dot + wanttoprintand=FALSE +.PERET + dir=x8 ;*bug fix* 23/2/89 + RETURN +;--- +; Print list of objects in specified position.. +; +;--- +.GETNEXTOBJECT +; RETURN OBJECT=OBJECT FOUND +; SEARCHPOS=ROOM OR CONTAINER WHERE FOUND +; HISEARCHPOS=TYPE OF CONTAINMENT (=0 FOR ROOMS) +; +; BEFORE FIRST CALL, GOSUB INITGETOBJ AND SETUP HI,SEARCHPOS +; AT END OF SEARCH, ALL ZEROS ARE RETURNED +; + X1=MAXOBJECTVISIBLE +;; .GETNEXTOBJX1 + GETNEXT X1 HISEARCHPOS SEARCHPOS OBJECT x2 SEARCHDEPTH +;;.GNORET +.poret + RETURN +;--- +.INITGETOBJ + SEARCHDEPTH=1 + X1=0 + GETNEXT X1 X1 X1 X1 X1 X1 + RETURN +;--- +; MIKE: Where a normal object is the container, you have used: +; "In the wardrobe was some lipstick" for single contents, and +; "In the wardrobe were a jacket and a tie" for plural contents. +; +; However, when a person is a container, these rules don't apply: +; "Gnoah was wearing a jacket" looks ok, but +; "Gnoah were wearing a jacket and a tie" looks pretty stupid. +; "The trolls was wearing lipstick" looks daft, while +; "The trolls were wearing lipstick and perfume" looks ok. +; The changes I have made will only print "were" if the person is +; plural, regardless of how many contents are involved. +; +.printCONTAINMENT + if searchpos=0 then pcret ;>>fixed in gnome (latent bug?) + wanttoprintand=false + X5=1600 ; BASE FOR CONTAINMENT MESSAGES (You can see) + + IF SEARCHPOS<>ACTOR THEN PC1 + X5=1700 ; BASE for 'You are wearing' and 'You are carrying' +.PC1 + ADD X5,HISEARCHPOS ; first half of containment message + MESSAGE X5 + IF HISEARCHPOS=0 THEN PCRET ; DON'T PRINT 'THE object' FOR 'YOU CAN SEE' + X1=SEARCHPOS ; CONTAINER OBJECT NUMBER + GOSUB @printTHEobjectx1 + +;*graham* bug fix + if searchpos>maxnpc then pcnotplural ; object not owned by npc +; object is owned by npc. if npc is plural, then print "They were +; wearing " regardless of how many objects worn. otherwise, +; print "He was wearing " regardless of how many objects worn. + gosub @conjugatex1 + pluraloffset=0 + if result<>5 then pcnotplural ; " was" +; 1600 & 1640 are for single & plural contents. +; 1700 & 1740 are for single & plural containers which are also people. + x5=1700 + add x5,hisearchpos + pluraloffset=30 ; " were" +.pcnotplural +;*graham* + + X1=40 + ADD X5,X1 ; second half of containment message + add x5,pluralOffset + MESSAGE X5 +.PCRET + RETURN +;--- +;--- +; Routines to output a list of words, adding appropriate punctuation. +; Output is delayed, presumably because we don't know what punctuation +; is needed until after deciding to print an item, e.g consider the +; difficulty of printing 'and' before the last entry in a list. They +; only seem to be used when listing objects and exits (see code above). +; +.OUTWORDNONE ; flush any buffered words + WORD1=0 + WORD2=0 +; +.OUTWORD12 + WORD3=0 + WORD4=0 +; +.OUTWORD1234 +; BEFORE CALLING, SET OUTPUTWORD=0. AT THE END OF THE LIST, CALL THIS +; ROUTINE WITH X1=0 AND THE LIST WILL BE FINISHED OFF WITH A FULL STOP. + IF WORD1=0 THEN OWEND +; FIRST OR SECOND WORD - JUST ADD TO BUFFER + add wordsoutput,c1 + X4=OUTPUTWORD + VALUE=WORD1 + GOSUB WRITEOUTBUFFER + VALUE=WORD2 + GOSUB WRITEOUTBUFFER + VALUE=WORD3 + GOSUB WRITEOUTBUFFER + VALUE=WORD4 + GOSUB WRITEOUTBUFFER + OUTPUTWORD=X4 + IF OUTPUTWORD<>24 THEN OWRET +; +;;.OW1 +; THIRD TO SUBSEQUENT WORDS - print out oldest word +; in buffer, and shift the other two down + X4=0 ; index into OUTPUTBUFFER + GOSUB OWPRINT + X1=0 + X2=8 +.OW2 + X3=OUTPUTBUFFER(X2) + OUTPUTBUFFER(X1)=X3 + ADD X1,C1 + ADD X2,C1 + IF X1<16 THEN OW2 + MESSAGE COMMA + OUTPUTWORD=16 +.OWRET + RETURN + +.OWEND +; HAVE RECEIVED THE TERMINATOR + wordsoutput=1 + IF OUTPUTWORD=0 THEN OWRET ; NO WORDS OUTPUT AT ALL +; THERE MUST BE AT LEAST ONE WORD REMAINING IN BUFFER - SO OUTPUT IT + X4=0 ; index into OUTPUTBUFFER + GOSUB OWPRINT + IF OUTPUTWORD=8 THEN OWSTOP ; ONLY ONE WORD OUTPUT - SO THATS IT ! +; MUST HAVE OUTPUTWORD=2, SO 2 OR MORE WORDS OUTPUT. +; THEREFORE WANT TO FINISH OFF WITH 'AND' + MESSAGE SPACEAND + X4=8 ; index into OUTPUTBUFFER + GOSUB OWPRINT +.OWSTOP + OUTPUTWORD=0 + MESSAGE DOT + RETURN + ;--- +.OWPRINT +; Print words by message number starting at outputbuffer(X4) + X3=3 ; words to print +.OWPRINT1 + GOSUB READOUTBUFFER + X1=VALUE + IF OWTYPE=OWOBJECTS THEN @printANobjectX1 + MESSAGE VALUE + SUB X3,C1 + IF X3> Debug + gosub printACTOR +;; prs " [printACTORverb 2. Actor=" ; >> Debug +;; print actor ; >> Debug +;; prs ". Verb=" ; >> Debug +;; print verb ; >> Debug +;; prs "] " ; >> Debug + if verb<>iam then printverb + m1=132 ; was + if actor=user then @printm1 ;>>late change. + goto printverb +;--- +.printACTOR + x1=actor + goto @printTHEobjectx1 +;--- +.printOBJECTverb + gosub @printTHEobject ; character doing the action +; drop through to printverb... + +.printVERB + x1=verb +; m1printsave=m1 +; if verb=iam then pvam +; goto printverbNoEnding +; m1=verboffset +; add m1,verb +; goto printm1andRestoreM1 + +; depending on OBJECT +; x1=object + +;;.printVERBx1 ; print verb, with appropriate ending for an actor of x1 +;; verb=x1 + m1printsave=m1 + if verb=iam then pvam + goto printverbNoEnding +; m1printsave=m1 +; m1=verb +; if verb=iHAVE then pvhave +; if verb=iAM then pvam +; gosub @printverbnoending +;; now add appropriate ending, or none for USER +; if x1=user then @pvreturn +; m1=579 ; force printing of existing word, without trailing space +; gosub @printM1 +; m1=581 ; verb ending 'es' +; if verb=isearch then pves +; if verb=isetupgo then pves +; if verb=iextinguish then pves +; if verb=ipress then pves +; if verb=idress then pves +; if verb=iscratch then pves +; if verb=icrush then pves +; if verb=idemolish then pves +; if verb=icatch then pves +; m1=580 ; verb ending 's' +;.pves +; goto printM1andrestoreM1 +;--- +;.pvhave +; gosub @conjugatex1 +; if result=you then pvhave1 +; if result=pluralsome then pvhave1 +; m1=iHAS ; has +;.pvhave1 +; goto pvprintM1andrestoreM1 +;--- +.pvam + x1=object + gosub @conjugatex1 + m1=133 ; were +;; if result=you then printm1 + if result=pluralsome then @printm1 + goto PrintVerbNoEnding + +; m1=iIS ; is +;.pvare ; drop through to.. +; +;.pvprintM1andrestoreM1 +; x1=verboffset +; add m1,x1 +; goto @printM1andrestoreM1 + +.printverbnoending + m1=verboffset + add m1,verb + goto @printM1 +; +;------------------- +; +; Now funny verb-handlers +; +;--- +.search + if noun1<>nullobject then @examine +;===== +; searching bushes twice reveals time magazine + if room<>55 then notsearchbushes + if examinebushes<2 then @exambushes ; reveal contents of bushes +.notsearchbushes +;===== + m1=2405 ; find nothing special + goto @printM1dot +;--- +.smell + if noun1<>actor then smellnotactor +;;* +; m1=2553 +; if contaminated=true then @printm1dot +;;* + m1=2406 ; you smell wondeful + goto @printM1dot +.smellnotactor + m1=2404 ; smell nothing interesting + goto @printM1dot +;--- +.cheat + + cif AllowCheat + if prep=ipdebug then @debugshowstack + if noun1<>230 then resetcheat ; user then resetcheat + if noun2<>231 then resetcheat ; user then resetcheat + if prep<>with then resetcheat + + parttochain=constantpartnum + add parttochain,c1 + gosub @calcscore ;***** + valuesave=x4 ;carry score to next part (hopefully!)***** + thispart=0 ;***** + if inumber=3 then @chainparttochain + thispart=constantpartnum ;***** + cheatmode=inumber + message cr + prs "npc stack high water mark=" + print highwater + message cr + cend ; allowcheat + goto @done + +.resetcheat + cif allowcheat + cheatmode=0 + cend ; allowcheat + goto @done +; +;;.nicetry ; >> Pete 14/9/89 +;; m1=3110 ; >> Pete 14/9/89 +;; goto @varyerrorm1dot ; >> Pete 14/9/89 +;--- +;--- +.timeoutosrdch +; wait for time x2, return x1=any key entered + gosub @osrdch + if x1<>0 then tooret + sub x2,c1 + if x2<>0 then timeoutosrdch +.tooret +.pvreturn + return +;--- +.hello + if noun1>maxnpc then hello1 + actorsave=actor + actor=noun1 ; person we are speaking to + gosub @npchello + actor=actorsave + return + +.hello1 + m1=2407 + goto @printM1dot +;--- +.initracetrackx1 +; init racetrack no. x1 for ACTOR + add x1,x1 + add x1,startracetracks +; now read hi+low bytes of pointer into noun1,2 + noun1=list5(x1) + add x1,c1 + noun2=list5(x1) +; now set up npc to obey it, if non-zero + if noun1<>0 then initracetrack2 + if noun2=0 then initracetrack3 ; both zero +.initracetrack2 + gosub @setACTORATTRIBUTES + verb=obeyracetrack + prep=0 + gosub @singlepushfifo ; push onto normal command queue + +.initracetrack3 + return +;--- +.CONJUGATEX1 +; depending on the object represented by x1 +; return result=ita,itan,singularsome,he,she,pluralsome, you or the +; x1 preserved, x2 corrupted + result=0 + if x1>maxobject then conjret + result=x1 ; preserve x1 + add x1,x1 + x1=objectstart(x1) +; now extract bits 4:6 + x2=16 + gosub @x1divx2 + x2=8 + gosub @x1modx2 + x2=result ; restore object number (saved in result, above) + + gosub @SpecialConjugate + + result=x1 ; set up result for return to caller + x1=x2 ; restore x1 (i.e. object number) +; now result contains one of the following values: +; 0=ita +; 1=itan +; 2=singularsome +; 3=he +; 4=she +; 5=pluralsome +; 6=you +.conjret + RETURN +;--- +.printANobjectX1 ; for object 'X1', print a object or an object + if wanttoprintand=false then daonotand + goto @printAND ; link onto a previous message + +.daonotand +;; gosub printbody + GOSUB @CONJUGATEX1 + if result<>itan then descnan + m1=22 ; an + gosub @printM1 + goto doobj +.descnan +; if result<>ita then doobj + if result>she then doobj ;>>mike 1/2/88 + if result=singularSome then doobj ;>>mike 8/5/88 + M1=20 ; a_ + gosub @printM1 +.DOOBJ + GOTO DESCOBJX1 +;--- +; Print object; as in 'You can't see SAM' or 'You can't see HIM' +.printTHEobject2 + if wanttoprintand=false then dto2notand + goto @printAND ; link onto a previous message + +.dto2notand + if object>254 then @printthat ; fail-safe code - assumes nullobject=255 + x1=object +; PRINT OUT 'THE ' +; Also, print 'it' if possible + GOSUB @CONJUGATEX1 +; because e.g. 'some takes the object' looks silly +;===== +; special to spook. when referring to user as a secondary object, +; use "me" instead of "I". + if object=user then dontuseI +;===== + IF LASTWORDPRINTED<>X1 THEN DTOXTHE +;===== +.dontuseI +;===== + m2=570 +;***** +; bug fix by graham 16/10/88. see message group 2430 for full details + if actor<>object then pto2notitself + m2=2430 +.pto2notitself +;***** + add m2,result ; it,some etc. + goto @printM2 +;--- +.printTHEobject + x1=object +; +.printTHEobjectx1 ; PRINT OUT 'the ', using 'it' if possible +;; prs " [printTHEobjectx1] " ; >> Debug +if wanttoprintand=false then dtonotand + goto @printAND ; link onto a previous message + +.dtonotand + if x1>254 then @printthat ; fail-safe code - assumes nullobject=255 + GOSUB @CONJUGATEX1 + IF RESULT=2 THEN dtoxthe ; prevent some +; because e.g. 'some takes the object' looks silly + IF LASTWORDPRINTED<>X1 THEN DTOXTHE + +;;.dtoprintarticle ; >> Pete 14/9/89 + wanttoprintand=false + m2=560 + add m2,result ; it,some etc. + goto @printM2 + +; +.DTOXTHE + +;; "lancelot" ? +; if result<>6 then doNotUser ;>>L3 +; if TempTitle<>0 then doNotUser +; m2=CurrentRank ; sir/Squire etc. +; x6=x1 +; gosub PrintM2 +; x1=x6 +;.doNotUser + + if result=pluralsome then dtosome +; if result>2 then descobjx1 ; he,she,some,you have no the + if result>she then descobjx1 ; some,you, proper he, prop she have no "the" + +.dtosome + if x1>255 then @printthatdot ; >> Pete 18/9/89 + M2=THE ; because e.g. 'the you' looks pretty daft + gosub @printM2 + goto do2 ; prevent 'the some' +;- +.DESCOBJX1 + if result=singularsome then @dosome + if result<>pluralsome then do2 + +.dosome + gosub @printSOME + +.do2 + LASTWORDPRINTED=X1 + gosub @conjugatex1 + x1=lastwordprinted ; restore object no. from just above + + + m2=OBJECTDESCBASE + ADD m2,X1 + gosub @printM2 +; +;;* +;; add 10 points for each treasure seen +; if x1maxtreasure then notseetreasure +;; treasure has been printed, score if it's in user room +; gosub treasurebeinghandled +;.notseetreasure +;;* +; +.DESCOBJRET + RETURN +;--- +;;* +;; treasure object x1 is being handled. score if user present +;.treasurebeinghandled +; t1=x1 +; t2=x2 +; t3=object ; save parameters +; pos=currentuserroom +; hipos=0 +; object=x1 +; gosub @checkobjectpos +; if result=false then treasurenothere +; x1=t1 ; restore x1 for score offset +; x2=mintreasure +; sub x1,x2 ; start at offet zero +; gosub @addscore20 +;.treasurenothere +; x1=t1 +; x2=t2 +; object=t3 ; restore parameters +; return +;;* +;--- +.WORDS + cif Includepictures + if actor<>user then @npcnotunderstood + if prep=ipoff then @silly +.abswords + SCREEN T ; TURN OFF GRAPHICS SCREEN. THIS COMMENT IS ESSENTIAL + cend ; Includepictures + GOTO @DONE +;--- +.PICTURE + cif Includepictures + if actor<>user then @npcnotunderstood + if prep=ipoff then abswords + SCREEN G C0 ; TURN ON GRAPHICS SCREEN. THIS COMMENT IS ESSENTIAL + LASTPICTURE=0 + cend ; Includepictures + GOTO @printROOM +;--- +.MOVE +; MOVEMENT. + commandfinished=false + gosub @setuproom + DIR=VERB +;;.MOVEDIR + if actor<>user then movenotuser + againverb=dir + +.movenotuser + FROM=ROOM + gosub @getxy ; special for Knight Orc + GOSUB @CHECKEXIT + IF DEST=0 THEN @NOEXIT + +;;.MOVEOK + GOTO @NEWLOCATION +;--- +.userdeathm1 + message m1 + message dot + +;;.USERDEATH ; >> Pete 14/9/89 +; user (the player) is dead + MESSAGE 2241 + GOSUB @SCORE +; +.RESTARTORRESTORE + GOSUB @ABSCANCELINPUT +.ROR1 + MESSAGE 2209 ; type restart or restore +.ror2 + GOSUB DEADCALLVERB + if value=nullvalue then ror2 +; if get back here, option failed + GOTO ROR1 +;--- +.DEADCALLVERB + SUPRESSCHECKING=TRUE + NOMOREINPUT=FALSE + GOSUB @GETNEXTWORD + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + dead=true + cif Includeoops + if value=iramsave then @ramsave ; checks for ramload as well. + cend ; Includeoops + IF VALUE=IRESTORE THEN @DORESTORE + dead=false + valuesave=lastpartscore ;re-init lastpart score after restart ;***** + IF VALUE=IQUIT THEN @initall ;>>fixed in Gnome - was STARTGAME + cif Includeoops + IF VALUE=IOOPS THEN @OOPS + cend ; Includeoops + if eol=false then deadcallverb + RETURN +; +;--- +.QUIT + MESSAGE 2200 ; really restart ? + GOSUB @YESORNO + IF RESULT=FALSE THEN @SAVERET +.QUITPLAYAGAIN + GOSUB @ABSCANCELINPUT + MESSAGE CR + valuesave=lastpartscore ;re-init lastpart score after restart ;***** + GOTO @initall ; >>fixed in Gnome - STARTGAME +;--- +.EXAMINE + noun2=nullobject ; to avoid confusing daa. + if actor<>user then @printactoractiondot + IF NOUN1user then @npcnotunderstood + SEARCHPOS=ACTOR + HISEARCHPOS=NONSPECIFIC + GOSUB @PRINTOBJECTS +; IF TOTALOBJECTFOUND<>0 THEN INVENTRET + if TotalObjectsPrinted<>0 then InventRet +; Nothing found, so print appropriate null message + MESSAGE 2020 ; nothing carried +.INVENTRET +.examret +.doneret + RETURN +;--- +; +.printOBJECTS +;; prs " [Printobjects] " ; >> Debug +; GO THROUGH CURRENT OBJECT POSITION LIST, +; AND DISPLAY ALL THE OBJECTS AT (HISEARCHPOS,SEARCHPOS) + OWTYPE=OWOBJECTS + GOSUB @INITGETOBJ + TOTALObjectsPrinted=0 + wordsoutput=1 + printingobjects=true +; numobjectfound=0 + CurrentObjectsPrinted=0 + LastCurrentpos=0 + lastHicurrentpos=0 +.PO1 + GOSUB @GETNEXTOBJECT + IF OBJECT>MAXOBJECTVISIBLE THEN PO1 + IF OBJECT=0 THEN POEND + if searchpos=0 then poend ;>>fixed in gnome (latent bug) + GOSUB @CHECKIFOBVIOUS + IF OBVIOUS=FALSE THEN PO3 + if object=user then po3 + x1=hicurrentpos(user) + if x1=0 then po1notInContainer +; don't describe container of user... + x1=currentpos(user) + if x1=object then po3 +.po1NotInContainer + + x1=hicurrentpos(object) + x2=currentpos(object) + if x1<>LastHicurrentpos then popc + if x2=lastcurrentpos then po2 +.popc +; don't print containment until either two contents are found, +; or we know only a single container is present. + if CurrentObjectsPrinted<>1 then popc1 + gosub DelayedPrintContainment +.popc1 + LastHicurrentpos=x1 + LastCurrentpos=x2 + CurrentObjectsPrinted=0 + GOSUB @OUTWORDNONE ; output any buffered words +; GOSUB PRINTCONTAINMENT ; PRINT CONTAINER ON FIRST OBJECT FOUND ONLY + SaveHiSearchpos=hisearchpos + SaveSearchpos=searchpos +.PO2 + add TotalObjectsPrinted,c1 + add currentObjectsPrinted,c1 + if currentObjectsPrinted<>2 then po2a +; multiple objects with same containment type + pluralOffset=30 + GOSUB @PRINTCONTAINMENT ; PRINT CONTAINER ON FIRST OBJECT FOUND ONLY + pluralOffset=0 + +.po2a + WORD1=OBJECT + WORD2=0 + GOSUB @OUTWORD12 ; Output object name (delayed effect) + +.PO3 + goto po1 + +.poend + if currentObjectsPrinted<>1 then poend1 +; have got to end of list, and haven't printed last +; object because we didn't know if it would be the only +; object with its containment type + gosub DelayedPrintContainment +.poend1 + printingobjects=false + gosub @outwordnone ; output any buffered words + if wanttoprintand=false then @poret + goto @printDOT +;--- +.delayedPrintContainment +; save (hi)searchpos, restore old hi(searchpos) for object printed, +; and print it! + x1=searchpos + x2=hisearchpos + searchpos=savesearchpos + hisearchpos=savehisearchpos + savesearchpos=x1 + savehisearchpos=x2 + objectsave=object + gosub @PrintContainment ; only a single object in the last position + searchpos=savesearchpos + hisearchpos=savehisearchpos + object=objectsave + x1=hicurrentpos(object) + x2=currentpos(object) + return +;---- +.DONE + if actor<>user then @doneret ; no confirmation + M1=2153 ; done + goto @printM1dot +;--- +.WEAR + X1=HICURRENTPOS(NOUN1) + IF X1<>WORN THEN WEAR1 + X1=CURRENTPOS(NOUN1) + IF X1<>ACTOR THEN WEAR1 + goto @printthatdot +.WEAR1 + IF PREP<>0 THEN CANTSEEWHERE + POS=ACTOR + HIPOS=WORN + GOTO @MOVEOBJECT +;--- +.DROP +; DROP prep is filtered off by CONVERTVERB + verb=idrop ; needed because this called from THROW as well + pos=currentpos(actor) ; POS=ROOM + hipos=hicurrentpos(actor) ; HIPOS=0 + GOTO @MOVEOBJECT +;--- +.CANTSEEWHAT + moreinfoexpected=true + M1=2132 ; WHAT? + goto csw1 +;--- +.CANTSEEWHERE + moreinfoexpected=true + M1=2133 ; WHERE? +.csw1 + gosub @nointerestm1 + goto @cancelinput +;--- +.CHECKIFCONTAINED +; trying to put OBJECT in position HIPOS,POS +; if this is a container, remove any possible loopy +; connections between the two containers which might crash the game + IF HIPOS=0 THEN CICRET +; is POS contained by OBJECT ? + X4=POS +.CIC1 + X1=HICURRENTPOS(X4) + IF X1=0 THEN CICRET + X3=X4 ; preserve latest contents for use below if necessary + X4=CURRENTPOS(X4) + IF X4<>OBJECT THEN CIC1 +; yep, so what do we do now ? +; I think we can be a bit clever - remove the connection +; and tell the ACTOR what we're doing +; sever the link between X3 and X4 +; (where X3 is the contents) +; X3 has to go the the immediate position of X4 +; (we know by now that OBJECT is moveable) + X1=CURRENTPOS(OBJECT) + CURRENTPOS(X3)=X1 + X1=HICURRENTPOS(OBJECT) + HICURRENTPOS(X3)=X1 + return +;--- +.INITOBJECTS + GOSUB @INITOOPS + OBJECT=0 +.INITOBJ2 +;===== +; don't init positions of ghosts, vandals or dog at start. +; special for spook.1 + if object=user then okinitobject + if object32 THEN INITOBJ4 + OBJECTTABLE(X1)=C0 + LINPUT(X1)=C0 +.INITOBJ4 + ADD X1,C1 + IF X1 short wait + searchtype=preptype + gosub @checktype + if value<>nullvalue then pwprep + searchtype=numbtype + gosub @checktype + if value=0 then @dontunderstand + goto pwwaitforperiod + +.pwprep + +.pwNextWord + if eol=true then pwdefaultwait + gosub @getnextword + +; wait for period? + searchtype=numbtype + gosub @checktype +;; if value=nullvalue then pwnotperiod ;bug fix *graham* +.pwwaitforperiod + if value=nullvalue then pwnotperiod ;* + verb=iwaitforperiod + noun1=value + sub noun1,c1 + if value>245 then pwcantwait +; forget about 'minutes' if the user tagged it on the end + gosub @getnextword + searchtype=nountype + gosub @checktype + if value=iminutes then pwend + gosub @goback ; leave for later @parsing + goto pwend ;>>gnome + +.pwnotperiod +; wait for person? + searchtype=nountype + gosub @checktype + if value>mingarbage then pwNextWord ;>>gnome - added + if valuemaxobject then pwnotperson ;>>changed for gnome +;;.pwHorn ; >> Pete 14/9/89 + verb=iwaitforperson + noun1=value + goto pwend + +.pwnotperson + +.pwend +; now verb,noun1,noun2 are set up for the wait +; the routines setupwaitforperiod etc. +; will push them on. +; It is done in this slightly toruous way +; so parseinput always has the same i/o - it +; helps with giving npcs orders as well (which push things +; onto the stack in their own, individual way) +.pwdefaultwait ; >>gnome - now a single wait only + M1=2155 ; time passes + goto @nointerestm1 +;>>gnome return ; do rest of parsing +;--- +;.pwnotperiod +;.pwuntiltime +;; wait until time? +;; read 24 hour clock +; searchtype=numbtype +; gosub checktype +; if value=nullvalue then badtime +; noun1=value ; hour +; if noun1>24 then badtime +; +; gosub getnextword +; searchtype=ascitype +; gosub checktype +; if value=nullvalue then badtime +; +; gosub getnextword +; searchtype=numbtype +; gosub checktype +; if value=nullvalue then badtime +; noun2=value ; minute +; +; if noun2>59 then badtime +; verb=iwaituntiltime +; goto pwend + +.pwcantwait + m1=2215 ; you could be waiting a long time + +;;.pwerrorm1dot ; >> Pete 14/9/89 + gosub @errorm1dot + goto @cancelinput +;--- +.setupwaituntiltime +.setupwaitforperiod +.setupwaitforperson + gosub @singlepushfifo + executeprocessed=false ; nothing useful done yet + return +;--- +.gdwaitforperson +; noun1 is person to wait for +; this command is always executed off the command queue + verb=0 ; fool specialcheckifpresent + object=noun1 + gosub @checkifpresent + if result=true then gdwaitend ; it's arrived + goto gdstillwaiting +;--- +.gdwaitforperiod +; noun1 is period to wait for +; this command is always executed off the command queue + if noun1=0 then @intelligentpop ; time up +; decrement period on stack + gosub @npcgetcurrent + add x1,c3 ; find noun1 offset + x2=npcstack(x1) + sub x2,c1 + if x2>negative then gdwaitend ; time up + npcstack(x1)=x2 +.gdstillwaiting +;>>L2 x1=attentionoffset +;>>L2 add x1,actorattributes +;>>l2 x1=npccurrent(x1) +;>>l2 if x1<>0 then @handleinterruption + +;;.gdwfpret + return +;--- +;.gdwaituntiltime +;; this command is always executed from the command queue +; if noun1>hour then gdstillwaiting ; still waiting +; if noun2>minute then gdstillwaiting ; still waiting +; if actor<>user then gdwaitend +;; gosub displaytime +;; have reached target time +.gdwaitend + executeprocessed=false ; nothing useful done + goto @intelligentpop +;--- +.SHORTWAIT +; wait for a single turn + executeprocessed=true ; make it take time + return ;>>gnome +;>>gnome M1=2155 ; time passes +;>>gnome goto @nointerestm1 +;--- +.YESORNO + IF ACTOR<>USER THEN YONNO ; NPCs always decline to take risks + NOMOREINPUT=FALSE +; + SUPRESSCHECKING=TRUE + GOSUB @GETNEXTWORD +.YON1 + IF EOL=TRUE THEN @YESORNO + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE=ivYES THEN yonYES + IF VALUE=iWHY THEN yonYES + IF VALUE=ivNO THEN yonNO + IF VALUE=iNORTH THEN yonNO + + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + cif Includeoops + IF VALUE=iOOPS THEN @OOPS + IF VALUE=iRAMLOAD THEN @RAMLOAD + IF VALUE<>iRAMSAVE THEN YONNRAMSAVE + GOSUB @GETNEXTWORD + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE=iRAMLOAD THEN @RAMLOAD + GOTO YON1 + cend ; Includeoops + +.YONNRAMSAVE +; + MESSAGE 2160 ; yes or no please + GOSUB @ABSCANCELINPUT + GOTO @YESORNO +.YONYES + RESULT=TRUE + RETURN +.YONNO + RESULT=FALSE + RETURN +;--- +.INITANOBJECT +; Note these are the other way round to Worm + X4=OBJECT + ADD X4,X4 + X1=OBJECTSTART(X4) + x2=16 + GOSUB @x1modx2 ; remove top four @bits + HICURRENTPOS(OBJECT)=X1 + + ADD X4,C1 + X1=OBJECTSTART(X4) + CURRENTPOS(OBJECT)=X1 + RETURN +;--- +;;.POSSLOOP; >> Pete 14/9/89 +; move everything contained by POS in way HIPOS to DEST,HIDEST +; if HIDEST=NONSPECIFC, then leave HICURRENTPOS alone +;; OBJECT=0; >> Pete 14/9/89 +;; x3=0 ; returns x3 as the number of objects moved.; >> Pete 14/9/89 +;;.POSS1; >> Pete 14/9/89 +;; X1=CURRENTPOS(OBJECT); >> Pete 14/9/89 +;; IF X1<>POS THEN POSS2; >> Pete 14/9/89 +;; if hipos=nonspecific then poss1a; >> Pete 14/9/89 +;; X2=HICURRENTPOS(OBJECT); >> Pete 14/9/89 +;; if x2<>hipos then poss2; >> Pete 14/9/89 +;;.poss1a; >> Pete 14/9/89 +;; CURRENTPOS(OBJECT)=DEST; >> Pete 14/9/89 +;; IF HIDEST=NONSPECIFIC THEN POSS2; >> Pete 14/9/89 +;; HICURRENTPOS(OBJECT)=HIDEST; >> Pete 14/9/89 +;; add x3,c1; >> Pete 14/9/89 +;;.POSS2; >> Pete 14/9/89 +;; ADD OBJECT,C1; >> Pete 14/9/89 +;; IF OBJECT> Pete 14/9/89 +;; RETURN; >> Pete 14/9/89 +;---- +.GETME + cif allowcheat + if cheatmode=false then @nicetry + if noun1=nullobject then @getfromuser + currentpos(noun1)=room + hicurrentpos(noun1)=c0 + goto @getfromuser + cend ; allowcheat +; +.VARYERRORM1DOT + gosub @getvarym1 + goto errorm1dot +; +; Many error messages only really make sense when the user's actions +; provoke them, e.g because of their wording. Print something in this +; case, otherwise just print the npc is in difficulty.. +.ERRORM1DOT + commandfinished=true + if actor=user then @printM1dot + goto errorm1NU ; goto @npcnotunderstood +; +.ERRORM1 + commandfinished=true + if actor=user then @printM1 +.errorm1NU +;; if processingSay=true then SayDoesntUnderstand ;>>mike 29/4/88 + gosub @LinkOnFifoCommandQueue ;>>mike 29/4/88 + goto @npcnotunderstood +; +; Print something which is of no interest if an NPC does it, +; but the user wants to know.. +; +.NOINTERESTM1 + if actor=user then @printM1 + return +;--- +.actorcantverbnoun1dot + gosub actorcantverbnoun1 + goto printdot +; +.actorcantverbnoun1 + commandfinished=true ; serious error occurred - abort gd commands etc. + executeprocessed=false ; nothing happened, because error occurred + fatalerror=true ;>>mike 9/2/88 + if room<>currentuserroom then reporterror ;&& + fatalerror=2 ;&& +.reporterror + gosub printactorcantverb + if noun1>255 then @printthat + object=noun1 + goto @printTHEobject2 +; +.printACTORcantVERB + gosub printactorcant + m1=27 ; taken + if verb=itake then printm1 + m1=26 ; worn + if verb=iwear then printm1 + goto @printverbnoending +; +.printACTORcant + gosub @printACTOR + m1printsave=m1 + m1=2044 ; can't + goto printM1andrestoreM1 +; +; Print 'That', using standard routines.. +.printTHATdot + gosub printthat + goto printdot +; +.printTHAT + m1printsave=m1 + m1=2046 ; 'that' + goto printM1andrestoreM1 +; +.printSOME + m1printsave=m1 + m1=some ; 'that' + goto printM1andrestoreM1 +;--- +; Double message output routines (a pair of messages with a parameter).. +; +;;.printM1theobjectx1NEXTdot ; e.g 'Unfortunately, the X1 is too high up.' ; >> Pete 14/9/89 +;; gosub printM1 ; >> Pete 14/9/89 +;; gosub @printTHEobjectx1 ; >> Pete 14/9/89 +;; add m1,c1 ; >> Pete 14/9/89 +;; goto printM1dot ; >> Pete 14/9/89 +;--- +; Standard message output routines... +; +.ActorM1Dot + gosub @PrintActor + goto PrintM1Dot +; +.printM1inputNEXTdot ; e.g 'You don't need "WORD" in this game.' + gosub printM1 + add m1,c1 +; +;;.PRINTinputM1dot + printinput ; entered by user +; +.printM1dot + gosub printM1 +; +.printDOT + wanttoprintand=false + m1printsave=m1 + m1=dot + goto printM1andrestoreM1 +;--- +.printAND + wanttoprintand=false; don't need another 'and' + m1printsave=m1 + m1=and + goto printM1andrestoreM1 +;--- +.printM2 + m1printsave=m1 + m1=m2 + goto @printM1andrestoreM1 +; +;--- +.printM1andrestoreM1 + gosub printM1 + m1=m1printsave + return +; +.printM1 +; print message m1 to user(s) if at ROOM +; must not alter RESULT or PROCESSED! + if forceprinting=true then printM1go + if currentuserroom<>room then @printM1ret + +.printM1go + cif AllowCheat + if cheatmode=false then printm1go1 +; if m1>4999 then showm1 + if m1<2750 then printm1go1 + if m1>2800 then printm1go1 +.showm1 + prs "[" + print m1 + prs "]" +.printm1go1 + cend ; allowcheat + + message M1 + +; comments from PET? + if m1<2500 then @PmNotSpecial1 + if m1>3000 then PmNotSpecial1 +; save x1,x2,x3 + t1=x1 + t2=x2 + t3=x3 + x1=currentpos(joe) +; can't use currentuserroom, since we may be hiding in a container + x2=currentpos(user) + if x1<>x2 then pmnotspecial + x1=hicurrentpos(joe) + x2=hicurrentpos(user) + if x1<>x2 then pmnotspecial +; scan list8 for matches with the message we've just printed + x3=2500 + sub m1,x3 + x1=0 ; pointer to start of table +.PmSpecial0a +; if M1>249, find the first "extend byte(255)" + if m1<250 then PmSpecial1 ; start scan +; written for speed (and therefore not merged with PmSpecial1) + x1=0 +.PmSpecial0b + x2=list8(x1) + add x1,c2 ; step to next entry... + if x2=0 then PmNotSpecial + if x2<>255 then PmSpecial0b +; subtract about 250 from number to find + sub x1,c1 + x2=list8(x1) ; amount to subtract + add x1,c1 ; go back to align properly + sub m1,x2 + goto PmSpecial0a ; check we're within bounds now... + +.PmSpecial1 +; start scanning for which response to print. + x2=list8(x1) + if x2=0 then PmNotSpecial + if x2=m1 then PmSpecial + add x1,c2 + goto PmSpecial1 + +.PmSpecial + add x1,c1 + x1=list8(x1) ; get offset of galahad's remark + GalahadComment=2850 + add GalahadComment,x1 +; this only works for messages using printm1dot, but it saves space +; by not having to include ". PET" at the start of most messages + message dot + message cr + message 302 ; PET + message space + message galahadcomment + +.PmNotSpecial +; restore x1,x2,x3 + x1=t1 + x2=t2 + x3=t3 +.pmnotspecial1 +.printM1ret + return +;--- +; Output one of 'ALTERNATIVES' messages, starting at 'M1' +.VARYMESSAGEDOT + GOSUB VARYMESSAGE + GOTO @printDOT +; +.VARYMESSAGE + M1printSAVE=M1 + GOSUB GETVARYM1 + goto @printM1andrestoreM1 +; +; Add number between 0 and ALTERNATIVES-1 to M1 +.GETVARYM1 + ADD CURRENTMESSAGE,C1 + IF CURRENTMESSAGEnegative then x1divret + add x1,c1 + goto x1divx2a +.x1divret +.dividebyzero +.x1modx2ret +;;.x1timesx2ret ; >> Pete 14/9/89 + return +;-------------------------------------------------------- +;;.isobjectcarried ; >> Pete 14/9/89 +;; pos=actor ; >> Pete 14/9/89 +;; hipos=nonspecific ; >> Pete 14/9/89 +;; goto @checkobjectpos ; >> Pete 14/9/89 +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/aparse.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/aparse.txt new file mode 100644 index 0000000..3591c49 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/aparse.txt @@ -0,0 +1,1615 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; taken from Lancelot version. +; +; APARSE.TXT, parser for the game. (The term 'parser' is used fairly +; loosely, by the way, to include almost all input analysis.) +; +; +; >>gnome2 - consider bug fix in CHECKNOUN0 to do with ADJECTIVES +; and corresponding fix in .PIPREP +; +; >>Lancelot - small change to adjective handling, validation +; of which npc to talk to >>mike 14/2/88 +; +; Mike 5/6/88 - IF OBJECT>MAXOBJECT check added to CHECKOBJECTPOS +; and GETOBJECTPOS +; to prevent looping if funny containment loops encountered. +; +; Mike 5/6/88 - change to SETUPROOM to prevent possible loops +; +const +;; anything=254 ; >> Pete 14/9/89 +;; matchwith=253 ; >> Pete 14/9/89 + +VAR +;; CSAVEHISEARCHPOS ; >> Pete 14/9/89 + EVENTUALPREP + parseerrors skiponerror +;; tableptr ; >> Pete 14/9/89 +;; verbend ; >> Pete 14/9/89 +;; noun1lower noun1upper ; >> Pete 14/9/89 + cvsaveverb cvsavenoun1 cvsavenoun2 cvsaveprep cvsavecurrentobject + cvsavehisearchpos cvsavesearchpos + gdnoun1pos noun1isgd gdmaxobject + gperror + lastpossibleverb nextverb + gdnouncalled +; +; Main entry point of game (though control is immediately transferred +; to AVERB.TXT).. +; +BEGIN + goto @startgame +;--- +; +; something of great importance has happened - ignore/remove +; rest of input from line +.CANCELINPUT + skiponerror=TRUE + GOSUB @ABSCANCELINPUT + skiponerror=FALSE + GOTO @MAINLOOP ; in NPC.TXT +; +; Get next command from the keyboard, prompting the player if necessary, +; and parse it.. +.GETCOMMAND + SAYRESPONSE=FALSE +; before printing 'What now?', check if any more commands waiting + IF NOMOREINPUT=FALSE THEN GC3 ; still something left on line + if nextverb<>0 then gc3 ; a prep which might be a verb is pending + NOMOREINPUT=FALSE ; disable flag which is set on getting 0 from input + IF SOMETHINGPROCESSED=FALSE THEN GC3 ; prevent CR producing 'WHAT NOW' + + add totalmoves,c1 + if totalmoves<>10 then gc1 + message 15 ; we won't bother with what now again + +.gc1 + M1=17 ; WHAT NOW ?% + if totalmoves<10 then gc2 + m1=16 ; ">" +.gc2 + message m1 + RANDOM X1 ; kick random number generator + SOMETHINGPROCESSED=FALSE +; actor=USER + gosub @setuproom +.gc3 + GOSUB @PARSEINPUT + + cif allowcheat + if cheatmode<>2 then gcNotCheat + prs " from parseinput: user verb=" + print verb + prs " prep=" + print prep + prs " noun1=" + print noun1 + prs " noun2=" + print noun2 +.gcNotCheat + cend ; allowcheat + + IF VERB=0 then GETCOMMAND + RETURN +;--- +; Given a parsed command, this handles multiple nouns (e.g "EVERYTHING") +; by repeatedly calling PMCALLVERB. It is only relevant to the user, +; other actors use "GDNOUN1". Command remains within PRESENTMULTIPLE +; until all the resulting actions have been carried out (e.g a lot of +; objects have been taken, if "TAKE ALL" was the input). +.PRESENTMULTIPLE +; GIVEN VERB,PREP,NOUN2 AND OBJECTTABLE, +; CQLL VERB ONCE FOB EACH OBJECT SPUCIFIED BY OBJECDTABLE +; EVERYTXING, IT ETC. ARE HANDLED HERE +; Work down from top so static orjects, containebs come first + moreinfoexpected=FALSE + SAYRESPONSE=TRUE + MESSAGE CR + DIR=0 ; prevent some SPECIALMOVES being triggered + GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS +; +; ??? as a kludge - test here to see if NOUN2 is present + IF NOUN2=NULLOBJECT THEN PM1 + OBJECT=NOUN2 + if objectmaxomni then noun2notomni ;* + if object<>generaldoor then pm1 ;* + if door=true then pm1 ; door is pseudo-omni present * +.noun2notomni ;* + if verb=icheat then pm1 + GOSUB @CHECKIFPRESENT + IF RESULT=FALSE THEN @objectnothere + +.PM1 + IF EVERYTHING<>0 THEN PMEVERYTHING +; handle individual objects + if actor<>user then @callverb ; a queued command + if verb=iwaitforperiod then pmcallverb ; noun1,2 already set up + if verb=iwaitforperson then pmcallverb ; ditto + if verb=iwaituntiltime then pmcallverb ; ditto + if verb=isetupgo then pmcallverb + if verb=isetuprun then pmcallverb + if verb=isetupfind then pmcallverb +;; if verb=ikill then pmcallverb ;*graham* bug fix. follow non-existant obj. + if verb=ifollow then pmcallverb ;*graham* + + CURRENTOBJECT=otbaseplus1 ; pointer into OBJECTTABLE +.PMSINGLE1 + OBJECT=OBJECTTABLE(CURRENTOBJECT) + IF OBJECT=0 THEN PMSINGLEEND + + GOSUB @CHECKIFACCESSIBLE + IF RESULT=TRUE THEN PMSINGLE2 +; if verb=ikill then pmsingle2 ;*graham* +; if verb=ifollow then pmsingle2 ;*graham* + GOSUB @OBJECTNOTHERE + HAVECALLEDVERB=TRUE + GOTO PMSINGLENEXT +.PMSINGLE2 + if verbstocall<>1 then pmsingle3 + if examinemarked=true then pmsingle3 ;*****graham 12/9/88* noun was + ;marked in exam mess! +; so 'EXAMINE OBJECT' can reply 'it is' etc. +; wheras 'examine obj,obj' prints the names + lastwordprinted=object + +.pmsingle3 + NOUN1=OBJECT + HAVECALLEDVERB=TRUE + GOSUB PMCALLVERB + MESSAGE CR +.PMSINGLENEXT + ADD CURRENTOBJECT,C1 + GOTO PMSINGLE1 + +.PMSINGLEEND + IF HAVECALLEDVERB=TRUE THEN PMSINGLERET + object=nullobject + NOUN1=NULLOBJECT + GOto PMCALLVERB +;--- +.PMEVERYTHING + noun1=everything ; collective noun + havecalledverb=FALSE + goto @pmsetupgdaccess +;--- +.pmcallverb +; only used by USER + DestToDescribeExitsIn=0 + lastverbvalid=TRUE + cvsavehisearchpos=hisearchpos + cvsavesearchpos=searchpos + cvsaveverb=verb + cvsavenoun1=noun1 + cvsavenoun2=noun2 + cvsaveprep=prep + cvsavecurrentobject=currentobject +; +; act on one object, on behalf of user.. + gosub @initfifo + gosub callverb + gosub @linkonfifocommandqueue +; +; let lots of NPCs get a look in, and do all sorts of things.. + gosub @npcactions +; + gosub @setupuser + hisearchpos=cvsavehisearchpos + searchpos=cvsavesearchpos + verb=cvsaveverb + noun1=cvsavenoun1 + noun2=cvsavenoun2 + prep=cvsaveprep + currentobject=cvsavecurrentobject +.pmsingleret + return +;--- +; Carry out the action for a verb, doing something +.CALLVERB +; GIVEN VERB,PREP,NOUN1,NOUN2, +; DO THE JUMP-TABLE INDEXING ON THE VERB + cif allowcheat + if cheatmode<>2 then callverbnodebug + gosub @debugshowcommand +.callverbnodebug + cend ; allowcheat + + if actor<>user then cvnotuser + message cr + +.cvnotuser +;>>removed by L2 erroroccurred=FALSE ; not yet, anyhow! +;;.cv2; >> Pete 14/9/89 +; (OBJECT=NOUN2) + object=noun2 ;>>mike 5/4/88 + GOSUB @OBJECTTRIGGER + IF processed=TRUE THEN CVRET + + OBJECT=NOUN1 + HISEARCHPOS=NONSPECIFIC + GOSUB @FUNNIES + IF processed=TRUE THEN CVRET + GOSUB @OBJECTTRIGGER ; TRIGGERS FOR ANY VERB ON OBJECT + IF processed=TRUE THEN CVRET ; FLAG NOT RESET, SO COMMAND PROCESSED +; +; Do jump-table type indexing +; Flow will return to PRESENTMULTIPLE when the verb has finished +.abscallverb + object=noun1 + if verb>maxECHO then TRANSverb + if verb>minECHOminus1 then ECHOverb + if verb>maxintransitive then TRANSverb + jump intranstable verb +.EchoVerbRet + return ; just in case! +;--- +.ECHOverb + gosub @SpecialEchoVerb + if result<>false then EchoVerbRet + if verbNULLOBJECT THEN CVGOTNOUN +;*bug fix* + if verb<>itake then notpickup + if prep<>up then notpickup + if noun2=nullobject then notpickup +; allow PICK UP NOUN2 (i.e. phone in gnome2.3) + noun1=noun2 + object=noun1 + prep=0 ; treat as TAKE NOUN1 + goto cvgotnoun +.notpickup +;* +.TVnoOBJECTerror + M1=3130 ; must supply an object group + GOTO @PARSEvaryERROR +; +.CVGOTNOUN + if verb>maxTRANSITIVE then noverb + x1=verb + jump transtable x1 +; assumes transtable and intranstable +; are contiguous +.cvret + return +;--- +.NOverb + m1=2036 ; don't understand verb + goto @printM1dot +;--- +.intranstable +.transtable + data @move,@move,@move,@move ; 0-3 + data @move,@move,@move,@move ; 4-7 + data @move,@move,@move,@move ; 8-11 + data @move,@move,@move,@move ; 12-15 + data @noverb,@noverb,@noverb,@noverb ;16-19 + data @inventory,@noverb,@printroom,@inventory ; 20-23 + data @quit,@restore,@save,@ramsave ; 24-27 + data @ramload,@score,@verbose,@brief ; 28-31 + data @noverb,@ring ; (32=parsewait called elsewhere) + data @switchon,@switchoff ; 34-35 + data @picture,@words,@hello,@oops ; 36-39 + data @attack,@sign,@search,@dig ; 40-43 + data @smell,@knock,@stand,@lie ; 44-47 + data @sit,@hide,@say,@noverb ; 48-51 + data @getme,@fill,@setupgdrun,@Make ; 52-55 + data @noverb,@eat,@setupgdgo,@commandstop ; 56-59 + data @drink,@noverb,@exits,@noverb ; 60-63 + data @noverb,@noverb,@noverb,@noverb ; 64-67 + data @noverb,@noverb,@noverb ; 68-70 + data @noverb,@noverb,@shout,@noverb,@wave ; 71-75 + data @noverb,@noverb,@noverb,@noverb ; 76-79 + data @noverb,@noverb,@noverb,@noverb,@noverb,@noverb ; 80-85 + data @noverb,@noverb,@noverb,@setupwaitforperson ; 86-89 + data @setupwaitforperiod,@setupwaituntiltime,@shortwait ; 90-92 + data @attack,@noverb ; 93-94 ;**attack --> kill** + data @noverb,@setupgdgo,@setupgdrun,@cheat,@noverb ; 95-99 +; + data @examine,@cut,@wake,@noverb ; 100-103 + data @get,@take,@wear,@drop ; 104-107 + data @put,@remove,@throw,@give ; 108-111 + data @ask,@follow,@open,@snap ; 112-115 + data @hold,@plant,@push,@fasten ; 116-119 >>special to gnome2 (hold) + data @unfasten,@pull,@write,@erase ; 120-123 ; =write erase= + data @pat,@noverb,@insert,@pick ; 124-127 ; =pat= + data @noverb,@noverb,@noverb,@noverb ; 128-131 + data @collect,@noverb,@become,@noverb ; 132-135 + data @returnobject,@noverb ; 136,@137 + data @setupfind,@gdfind ; 138,@139 + data @close,@noverb,@tell,@noverb ; 140-143 + data @noverb,@noverb,@noverb,@noverb ; 144-147 + data @noverb,@noverb,@noverb,@noverb ; 148-151 + data @noverb,@noverb,@noverb,@noverb ; 152-155 + data @noverb,@noverb,@noverb,@noverb ; 156-159 + data @attack,@attack,@attack,@attack ; 160-163 + data @attack,@attack,@attack,@attack ; 164-167 + data @attack,@attack,@attack,@attack ; 168-171 + data @attack,@attack,@attack,@attack ; 172-175 + data @attack,@attack,@attack,@attack ; 176-179 +; +;--- +.TOOCOMPLEX + M1=2039 ; sentence is too complex + goto @printM1dot +;--- +.CHECKIFACCESSIBLE +; return RESULT=TRUE if OBJECT is accessible to VERB +; objects must be present in way HISEARCHPOS + result=179 ; dummy value + gosub @specialcheckifaccessible + if result<>179 then ciaret ; changed by routine, so accept verdict + +;; .CIANCAST + IF OBJECTMAXOMNI THEN CIANOTOMNI ; it, except etc. + GOTO @RETURNTRUE + +.CIANOTOMNI + IF OBJECT>MAXOBJECT THEN @CHECKIFSCENERYHERE + IF HISEARCHPOS<>NONSPECIFIC THEN CIANOTNS + POS=ROOM + HIPOS=0 + GOSUB @CHECKOBJECTPOS + IF RESULT=FALSE THEN CIAISITOWNED +.CIAHAVECHECKED +.ciaret + return + +.CIANOTNS + IF HISEARCHPOS<>NOUNCARRIED THEN CIANOTCARRIED +.CIAISITOWNED + POS=actor + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS + GOTO CIAHAVECHECKED + +.CIANOTCARRIED + POS=actor + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS ; looking on ground only. if carried, can't be +; X1=RESULT +; RESULT=FALSE + IF RESULT=TRUE THEN @RETURNFALSE ; CIAHAVECHECKED + POS=ROOM + HIPOS=0 + gosub @CHECKOBJECTPOS + goto ciahavechecked +;--- +.PARSENOTKNOWN +; word not recognized at all + IF ACTOR<>USER THEN @NPCNOTUNDERSTOOD + m1=2000 ; you don't need to use the word/to finish the game + gosub @printM1inputNEXTdot + GOTO @CANCELINPUT +;--- +.PARSENOVERB + IF PROCESSINGSAY=TRUE THEN @SAYNPCLOOP ; no verb, so continue scanning + if actor<>user then @npcnotunderstood + m1=2016 ; can't find a verb there! + goto parseerror + +.SECONDPREP +.CANTUSEHERE + IF ACTOR<>USER THEN @NPCNOTUNDERSTOOD + m1=2003 ; can't use/here + gosub @printM1inputNEXTdot + m1=0 ; so parseerror won't print anything + goto parseerror +;--- +.toomanynouns + if actor<>user then @npcnotunderstood + m1=2018 ; too many nouns in that sentence + goto parseerror +;--- +.PARSEvaryERROR + GOSUB @GETvaryM1 + GOTO PARSEERROR + +.DONTUNDERSTAND +; general error message when the parsing has broken +; down for some reason + M1=2010 +; drop through to PARSEERROR +;- +.PARSEERROR + IF ACTOR<>USER THEN @NPCNOTUNDERSTOOD + nextverb=0 + lastpossibleverb=0 + if skiponerror=TRUE then @cancelinput + if m1=0 then parseerror1 + gosub @printM1dot +.parseerror1 + add parseerrors,c1 + if parseerrors<>5 then parseerror2 + m1=2014 ; apologies for not understanding user's gibberish + gosub @printM1dot +.parseerror2 + GOTO @CANCELINPUT +;--- +.OBJECTNOTHERE +; THE OBJECT IS NOT AVAILBALE TO THE COMMAND +; THIS ERROR RETURNS AS IT IS USED IN PRESENTMULTIPLE + IF OBJECT=0 THEN ONTRET + IF ACTOR<>USER THEN ontCancel +;===== +; refer to light sources using one message, "there is no light here". + if object>minlightminus1 then nolighthere +; +; don't say "you can't see message saying 'time'" or "the word 'time'", +; as this would be a dead givaway. + if object=timeobject then @cantseethat ; marked as "message and "time" + if object=timenoun then @cantseethat ; marked as "time" +;===== + if outofreach=true then objectoutofreach ;*graham* + lastpossibleverb=0 + nextverb=0 + lastwordprinted=nullobject ; force printing of full object name +; now some fail-safe code. +; NOUN1 and NOUN2 are sometimes set up wrong, +; and sometimes they are used for different things (e.g. gd commands) +; so, unless the verb is one that needs an object, replace it +; with nullobject, to avoid embarassments like- +; 'you can't see the gold bar' when the user didn't mention it! + if verb>99 then ontok ; intransitive (or is it transitive?) + object=nullobject + +.ontok + IF HISEARCHPOS=NOUNONGROUND THEN ONT1 + IF HISEARCHPOS=NONSPECIFIC THEN CANTSEEIT + MESSAGE 2012 ; don't have.. +.ONTERROR + GOSUB @printTHEOBJECT2 ; print 'You can't see HIM' if appropriate + MESSAGE DOT +.OntCancel + outofreach=false ;*graham* + goto @cancelinput ; resets stack etc. +; +;===== +.nolighthere + message 2610 + goto ontcancel +;===== +; +;*graham* +.objectoutofreach + message 2022 + goto ontcancel +;*graham* +; +.ONT1 + POS=actor + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS + IF RESULT=TRUE THEN ONT2 + +.CANTSEEIT + IF OBJECT=IEVERYTHING THEN @CANTUSEHERE ; EVERYTHING as NOUN2 + POS=actor + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS + IF RESULT=TRUE THEN ONT2 +;; .GENCANTSEEIT + MESSAGE 2011 ; Can't see .. + goto OntError + +.ONT2 + IF VERB=ISTAND THEN ONTDROPFIRST + MESSAGE 2013 ; Already have .. + GOTO ONTERROR + +.ONTDROPFIRST + MESSAGE 2126 ; have to drop it first +.ONTRET + RETURN +;---- +.ITSNOTTHERE +; user asked for NOUN1 in NOUN2 or similar +; but NOUN1 is not contained by NOUN2 + MESSAGE 2017 ; it's not there + RETURN +;--- +; Read input from the keyboard, in a form suitable for PRESENTMULTIPLE, +; or for analysis by code which expects Y/N. +.PARSEINPUT +; convert input to VERB, NOUN1, NOUN2, PREP form for +; easy use by the rest of the program.. + examinemarked=false ;***** nouns not marked in exam mess (yet!) + lastpossibleverb=0 + if actor<>user then pi0notuser + HAVECALLEDVERB=FALSE +.pi0notuser + if nextverb<>0 then @verbplus + + ADJECTIVE1=NULLOBJECT ;>>mike 14/2/88 + ADJECTIVE2=NULLOBJECT ;>>mike 14/2/88 +; moved because previously, a command like "bors, examine salt" +; where salt was an adjective (only) caused following commands +; to npcs to be ignored, because the parser looked e.g. for +; "salt bors, examine salt" - i.e. the effect of the adjective persisted + +;;.pinostoredverb + GOSUB @GETNEXTWORD + VERB=0 + IF EOL=TRUE THEN @PIEND; NOTHING ENTERED ! +; +; is first word a noun? (If so, the actor is talking to someone.) + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + IF VALUE>MAXGARBAGE THEN PINOUN + IF VALUE>MINGARBAGE THEN @PARSEINPUT ; ignore noise word +.pinoun + IF VALUEMAXNPC THEN PINOTNPC +; yes, so is the target here ? + gosub @Checknoun ;>>mike 5/2/88 +;>>mike 5/2/88 + if object=nullobject then piNoNpc + GOSUB @CHECKIFPRESENT + IF RESULT=TRUE THEN PINPC +.piNoNpc + MESSAGE 2060 ; talking to yourself? + GOTO @ABSCANCELINPUT +; +.CANTTALKTOSEVERAL +; can't talk to more than one person + MESSAGE 2061 + GOTO @ABSCANCELINPUT +; +.PINPC +; set up conversation target as actor + IF ACTOR=VALUE THEN @PINEXT ; already talking to this one! + IF ACTOR<>USER THEN CANTTALKTOSEVERAL ; attempt to talk to list of NPCs + ACTOR=VALUE + gosub @setACTORATTRIBUTES + GOTO @SAYNPC + +.PINOTNPC ; command doesn't start with a noun + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE=ITELEPORT THEN @TELEPORT ; a cheat mode verb + IF VALUE<>NULLVALUE THEN PI0 ; Yippee! We have a verb + + if moreinfoexpected=FALSE then @PARSEnoVERB ; Wrong type of word found + moreinfoexpected=FALSE + gosub @goback ; allow this word to get picked up and processed + gosub @verbVARSareAGAINverbVARS + if verb=isetupgo then @parsego + if verb=isetuprun then @parserun + goto pitryagain ; misleading name. This looks for nouns, preps etc. +; +.PI0 ; Analyse verb + IF VALUE<>IAGAIN THEN PI0A + gosub @verbVARSareAGAINverbVARS + ObjectTable(otBasePlus1)=noun1 ;>>fixed by l2 - allow npc, verb noun, again to work +; + IF LASTVERBVALID=TRUE THEN @PIEND + M1=3530 ; last verb not valid + GOTO @PARSEvaryERROR +; +.PI0A ; We have a verb and it's not 'again' + VERB=VALUE +; +.VERBPLUS ; Analyse any objects etc. following verb + OBJECTTABLE(otbase)=C0 + OBJECTTABLE(otbaseplus1)=C0 + EVERYTHING=0 ; EVERYTHING NOT DETECTED YET + EXCEPT=FALSE ; EXCEPT NOT DETECTED YET + PREP=0 + EVENTUALPREP=0 + NOUN1=NULLOBJECT ; NEEDED ? + NOUN2=NULLOBJECT + INUMBER=NULLNUMBER + VERBSTOCALL=0 + LASTVERBVALID=FALSE + if nextverb=0 then pitryagain + verb=nextverb + nextverb=0 + goto @piend + +.pitryagain ; got a verb, try to supplement info previously given +; ( therefore, mustn't clear existing tables etc., but +; need to do everything else ) +;&*&*& + if verb=ivIN then @GetNextWord ; scrap noun for ENTER SHED etc. + if verb=ivOUT then @GetNextWord ; scrap noun for LEAVE SHED etc. +;&*&*& + IF VERBnullvalue THEN PIPREP + + GOSUB @CHECKNOUN + if processed=TRUE then @pinext + IF OBJECT<>0 THEN PIEXAMINENOUN + + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF VALUE=ICOMMA THEN @PINEXT + IF VALUE<>nullvalue THEN @PINEXT + + SEARCHTYPE=NUMBTYPE + GOSUB @CHECKTYPE + IF VALUE=nullvalue THEN PINOTNUMBER + INUMBER=VALUE + ADD VERBSTOCALL,C1 + GOTO @PINEXT + +.PINOTNUMBER +; ANYTHING ELSE (CONJ, VERBS ETC.) TERMINATE THIS SENTENCE + GOSUB @GOBACK ; STORE (VERB?) FOR FUTURE ANALYSIS + +.PIEND + IF EVENTUALPREP=0 THEN PIendnoprep + PREP=EVENTUALPREP +.PIendnoprep +; check for 'drop bench and on' type construct +; if no noun2 was detected after a prep, maybe the prep was +; really a direction verb. Let's see + if noun2<>nullobject then piret + if prep=0 then piret +; ok, we have a prep but no noun2 +; Let's disregard the prep and retrieve any verb +; which the prep could have been + if lastpossibleverb=0 then piret + nextverb=lastpossibleverb + prep=0 + +.piret + RETURN + +.PIPREP + IF PREP<>0 THEN @SECONDPREP ; GOT A SECOND PREP + adjective1=nullobject ;>>gnome2 + adjective2=nullobject ;>>gnome2 + PREP=VALUE + GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS +; and store any verb this could be, just in case +; it wan't meant as a preposition + searchtype=verbtype + gosub @checktype + if value=0 then @pinext + lastpossibleverb=value + GOTO @PINEXT + +.PIEXAMINENOUN + IF OBJECT<>IIT THEN PINOTIT + if prep<>0 then cantuseit ;>> + OBJECT=ITWORD + IF OBJECTUSER THEN @NPCNOTUNDERSTOOD + m1=2053 ; it's not clear what/understands + gosub @printM1inputNEXTdot + GOTO @CANCELINPUT + +.PINOTIT + IF PREP<>0 THEN @PINOUN2 + IF OBJECTmaxcollective then pinotcollective + goto pieverything + +.pinotcollective + IF OBJECT=IEXCEPT THEN @PIEXCEPT +; GOT AN ORDINARY NOUN SPECIFIED + ITWORD=OBJECT + ITNUMBER=INUMBER + +; There are certain constructs where +; the first noun can be the destination +; e.g. 'GIVE ME THE MANDRAKE' + IF VERB<>IGIVE THEN PION2 + IF ACTOR=USER THEN PION2 + IF OBJECT=USER THEN PIGIVE + +.PION2 + X1=NOUNFORBIDDEN ; mark noun as forbidden + IF EXCEPT=TRUE THEN PIMARK ; DON'T CHECK IT'S HERE (YET) +; mark ordinary noun + X1=NOUNSPECIFIED +.PIMARK + NOUN1=OBJECT + GOSUB MARKOBJECT ; MARK NOUN AS SPECIFICALLY REQUESTED + GOTO @PINEXT +; +.PIEVERYTHING + EVERYTHING=object ; everything, ipeople, itreasure etc. + GOTO @PINEXT + +.PIGIVE + IF PREP<>0 THEN @cantusehere ;; DONTUNDERSTAND + NOUN2=OBJECT + EVENTUALPREP=ITO + GOTO @PINEXT +;--- +.verbVARSareAGAINverbVARS + VERB=AGAINVERB + NOUN1=AGAINNOUN1 + NOUN2=AGAINNOUN2 + PREP=AGAINPREP + RETURN +;--- +.againVERBvarsAREverbVARS + AGAINVERB=VERB + AGAINNOUN1=NOUN1 + AGAINNOUN2=NOUN2 + AGAINPREP=PREP + RETURN +;--- +.CHECKIFSCENERYHERE +; given OBJECT as a noun requested by user (relative to NOUNOFFSET) +; see if it is part of a room description, and +; if so, return RESULT=TRUE if in current room +; drop through to return TRUE + processed=TRUE +.RETURNTRUE + RESULT=TRUE + RETURN + +.RETURNFALSE + RESULT=FALSE + RETURN +;--- +.MARKOBJECT +; mark object as X1 + X2=OBJECTTABLE(otbase) + IF X2=0 THEN MARKOBJ1 ; no 'except' yet + IF X1<>X2 THEN @DONTUNDERSTAND ; have had both mark and prevent types +.MARKOBJ1 + X2=otbaseplus1 +.MARKOBJ2 + X3=OBJECTTABLE(X2) + IF X3=OBJECT THEN MARKOBJRET ; already marked + IF X3=0 THEN MARKOBJ3 + ADD X2,C1 + GOTO MARKOBJ2 + +.MARKOBJ3 + IF X2>otmax THEN @toocomplex ; OBJECTTABLE OVERFLOW + ADD VERBSTOCALL,C1 + OBJECTTABLE(otbase)=X1 + OBJECTTABLE(X2)=OBJECT + ADD X2,C1 + OBJECTTABLE(X2)=C0 +.MARKOBJRET + RETURN +;--- +.CHECKIFFORBIDDEN + RESULT=FALSE + if actor<>user then cifret + X1=OBJECTTABLE(otbase) + IF X1<>NOUNFORBIDDEN THEN CIFRET + X2=otbaseplus1 +.CIF1 + X1=OBJECTTABLE(X2) + ADD X2,C1 ;???C9 + IF X1=0 THEN CIFRET + IF X1<>OBJECT THEN CIF1 + RESULT=TRUE +.CIFRET +.sceneryEnd + RETURN +;--- +.SCENERY +; Have got a noun which is in a room description or similar, +; so it is just scenery. Print an appropriate message. + ITWORD=NULLOBJECT + HAVECALLEDVERB=TRUE + + GOSUB @FUNNIES ; Print out any special messages + OBJECT=0 + IF processed=TRUE THEN @cancelinput + + M1=3120 ; just scenery group + GOTO @PARSEvaryERROR +;--- + +.PIEXCEPT + EXCEPT=TRUE + GOTO @PINEXT + +.PINOUN2 +; another noun in input, not part of any multiple noun + IF NOUN2=NULLOBJECT THEN PINOUN2A + IF NOUN2<>OBJECT THEN @toomanynouns +.PINOUN2A + NOUN2=OBJECT + GOTO @PINEXT +;--- + +.CHECKTYPE +; SEE IF THERE IS A WORD OF WORDTYPE 'SEARCHTYPE' IN CURRENT WORD +; IF NOT, RETURN VALUE=0 +; IF THERE IS RETURN ITS WORD NUMBER IN VALUE + INDEX=0 +.CHECKTYPEMORE + GOSUB @READINPUTLIST + IF WORDTYPE<>NUMBTYPE THEN CTNOTNUMBER + ADD INDEX,C2 ; numbers are 4 byte values + +.CTNOTNUMBER + IF VALUE=NULLVALUE THEN CHECKTYPERET + ADD INDEX,C2 + SOMETHINGPROCESSED=TRUE + IF WORDTYPE<>SEARCHTYPE THEN CHECKTYPEMORE + IF WORDTYPE<>NOUNTYPE THEN CHECKTYPERET + IF VALUEEXAMINEMAXOFFSET THEN CHECKTYPERET +; an examine message + X1=EXAMINEOFFSET + SUB VALUE,X1 + examinemarked=true ;***** prevent printing lastwordprinted +; (can't simply set lastwordprinted=0, since it is changed later!) + +.CHECKTYPERET + RETURN +;--- +.CHECKNOUN +; see if there is an object present +; finding possible alternatives. Return RESULT=TRUE if found +; and return processed=TRUE if word is to be ignored + PROCESSED=FALSE + SEARCHTYPE=ADJETYPE + GOSUB @CHECKTYPE + IF VALUE=nullvalue THEN CNNOTADJE + ADJECTIVE1=VALUE + GOSUB CHECKTYPEMORE + IF VALUE=nullvalue THEN CNADJEND + ADJECTIVE2=VALUE + +.CNADJEND + searchtype=nountype + gosub @checktype + if value<>nullvalue then checknoun1 + processed=TRUE ; this is an adjective - so ignore it + return +; +.CNNOTADJE + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + OBJECT=0 + if value=nullvalue then cnnotclear + IF PREP=0 THEN CHECKNOUN0 + HISEARCHPOS=NONSPECIFIC +.CHECKNOUN0 + if value>mingarbage THEN CNGARBAGE +; have a possible valid object. +; does it match with any adjective requested ? + IF ADJECTIVE1=NULLOBJECT THEN CHECKNOUN1 + IF VALUE=ADJECTIVE1 THEN CHECKNOUN1 + if value>adjective2 then checknoun1 ; could be + IF VALUE<>ADJECTIVE2 THEN CNMORE ; no, so try another + +.CHECKNOUN1 +; is it here ? +; + gosub HandlePairedObjects +; + OBJECT=VALUE + if verb=igetme then checknounend + if verb=0 then checknounend ; npc, - there is no verb +; + GOSUB @CHECKIFACCESSIBLE + IF RESULT=TRUE THEN CHECKNOUNEND ; if present, accept as is + +.CNMORE +; not present, so look for another match + GOSUB @CHECKTYPEMORE + IF VALUE<>nullvalue THEN CHECKNOUN0 + if verb=ifollow then checknounend +;; if verb=ikill then checknounend ; >> Pete 13/6/89 + +.CNNOTCLEAR +; no noun found which is present + IF OBJECT=0 THEN CHECKNNORMAL ; not a noun at all +; so print appropriate message + IF OBJECT>MAXOBJECT THEN CNNOTCLEAR1 + itword=object + GOSUB @OBJECTNOTHERE + if actor<>user then cngarbage +;;.cnignoreverb ; >> Pete 14/9/89 + HAVECALLEDVERB=TRUE +.CNGARBAGE + processed=TRUE ; make system skip over garbage words... + RETURN + +.CNNOTCLEAR1 +; OBJECT>MAXOBJECT, see if it is valid + +.CHECKNOUNEND + IF OBJECTMAXOMNI THEN CNNOMNI + GOTO CHECKNNORMAL + +.CNNOMNI + IF OBJECT>MAXOBJECT THEN @SCENERY +.CHECKNNORMAL + PROCESSED=FALSE + RETURN +;--- +; Handle any paired objects, e.g. white card and yellow card. +; On entry, VALUE contains the parsed default of the pair (usually 1st one) +; ADJECTIVE1 contains true object IF IT IS SUPPLIED +; VERB is also required to allow for RUN & GO object +; On exit, VALUE contains the concluding object +; If both objects are present, or no objects are present, then +; the user is informed, and the current command is ignored. +; +.HandlePairedObjects + if actor<>user then @valueisprocessed +; +;===== + if value<>defaultcard then notdefaultcard + if adjective1=whitecard then @valueisadjective + if adjective1=yellowcard then @valueisadjective +; +; card type not specified. first check for only one of them present + object=whitecard + gosub @checkifpresent + x8=result ; x8 determines if white card is present + object=yellowcard + gosub @checkifpresent + x9=result ; x9 determines if yellow card is present + add result,x8 ; result=number of cards present + if result=2 then @bothitemspresent ; both here - ask which one + if result=0 then noitemspresent ; none here +; +; just one card is present +;;.onecardpresent ; >> Pete 14/9/89 + value=whitecard + if x8=true then @valueisprocessed ; it's the white one + value=yellowcard + goto @valueisprocessed ; otherwise, it must be the yellow one +.notdefaultcard +;--- + if value<>defaultwreath then notdefaultwreath + if adjective1=newwreath then @valueisadjective + if adjective1=greenwreath then valueisadjective + if adjective1=fadedwreath then valueisadjective +; +; wreath type not specified. first check for only one of them present + object=newwreath + gosub @checkifpresent + x7=result ; x7 determines if new wreath is present + object=greenwreath + gosub @checkifpresent + x8=result ; x8 determines if green wreath is present + object=fadedwreath + gosub @checkifpresent + x9=result ; x9 determines if faded wreath is present + add result,x7 + add result,x8 ; result=number of wreaths present + if result>1 then bothitemspresent ; >1 here - ask which one + if result=0 then noitemspresent ; none here +; +; just one wreath is present +;;.onewreathpresent ; >> Pete 14/9/89 + value=fadedwreath + if x9=true then valueisprocessed ; it's the faded one + value=newwreath + if x7=true then valueisprocessed ; it's the new one + value=fadedwreath + goto valueisprocessed ; otherwise, it must be the green one +.notdefaultwreath +;--- + if value<>defaultlever then notdefaultlever + if adjective1=lever1 then valueisadjective + if adjective1=lever2 then valueisadjective + if adjective1=lever3 then valueisadjective +; +; lever type not specified. first check if buttons are here. + object=lock + gosub @checkifpresent + if result=true then bothitemspresent ; both here - ask which one +; none of them here! + goto noitemspresent +.notdefaultlever +;===== +; + return +; +; none of them here! +.noitemspresent + if verb=isetuprun then askwhichitem ; ask which one if RUN or GO to + if verb=isetupgo then askwhichitem ; object is used. + gosub @cantseethat ; otherwise, notify player that neither are present. + goto @cancelinput ; don't continue to execute the verb. +; +; both items present +.bothitemspresent + if verb=isetuprun then valueisprocessed ; if both here when RUN or GO, + if verb=isetupgo then valueisprocessed ; then we're already here! +.askwhichitem + m1=2623 ; try again, saying which one + gosub @printm1dot + goto @cancelinput ; don't continue to execute the verb. +; +; value is the adjective +.valueisadjective + value=adjective1 +.valueisprocessed + return +;--- +.ABSCANCELINPUT +; called after any errors - remove rest of input from line + processingsay=FALSE + if actor<>user then clearinpend + LINPUT(C0)=C0 ; in case NOMOREINPUT=TRUE, and LIST9<>0 + LINPUT(C1)=C0 + if nomoreinput=TRUE then clearinpend + SUPRESSCHECKING=TRUE ; don't check words for validity + GOSUB GETNEXTWORD + GOTO @ABSCANCELINPUT +.CLEARINPEND + SUPRESSCHECKING=FALSE + wordnotprocessed=FALSE + nextverb=0 ;>>fixed by gnome3 + RETURN +;--- +; The A-code instruction 'INPUT' returns a list of values in List 9: all +; the possible values for the next typed word. GETNEXTWORD does this, +; returns an error if the word is invalid, and does some analysis. It +; also copes with the effects of "GOBACK", if this has previously been +; used to 'unread' a word. +.GETNEXTWORD +; GET NEXT WORD IN LINPUT +; set EOL=TRUE if get '.', eol, etc. +; Set SEPARATOR=TRUE if get '.' ',' + IF NOMOREINPUT=TRUE THEN GNWEND + IF WORDNOTPROCESSED=TRUE THEN GNWEND ; HAVE USED GOBACK TO RETRIEVE + INPUT X1 X1 X1 X1 + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF VALUE<33 THEN GNW1 + IF VALUE<38 THEN @GETNEXTWORD +.GNW1 + GOSUB CHECKEOL ; CHECK FOR '.' 'THEN' etc. + IF PROCESSINGSAY=FALSE THEN GNWEND + GOSUB @TRIGGERWORDS ; in SAY command, so look for key words + +.GNWEND + WORDNOTPROCESSED=FALSE + RETURN +;--- +.CHECKEOL + INDEX=0 + GOSUB READINPUTLIST + SEPARATOR=FALSE + EOL=FALSE + IF VALUE=nullvalue THEN SETNOTHINGMORE + SEARCHTYPE=CONJTYPE + GOSUB @CHECKTYPE + IF VALUE=ITHEN THEN SETEOL + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF SUPRESSCHECKING=TRUE THEN CHECKEOL1 + IF VALUE=128 THEN @PARSENOTKNOWN ; WORD NOT @UNDERSTOOD +.CHECKEOL1 + IF VALUE=ICOMMA THEN SETSEPARATOR + IF VALUE=IDOT THEN SETEOL + RETURN +.SETSEPARATOR + SEPARATOR=TRUE + GOTO SETEOL + +.SETNOTHINGMORE +; There is no more input to come on this line + NOMOREINPUT=TRUE +.SETEOL + EOL=TRUE + RETURN +;--- +.GOBACK +; MARK CURRENT WORD AS UNPROCESSED, SO A SUBSEQUENT INPUT ROUTINE +; CAN GET A CHANCE AT READING IT + INDEX=0 + GOSUB READINPUTLIST + IF VALUE=nullvalue THEN GOBACKRET + WORDNOTPROCESSED=TRUE +.GOBACKRET + RETURN +;--- +.READINPUTLIST + ; VALUE:=INPUT(INDEX) 16 BIT. X1,X2 corrupted + VALUE=LINPUT(INDEX) + IF VALUE<>1 THEN RILNOTNUMBER + WORDTYPE=NUMBTYPE + X1=INDEX + ADD X1,C1 + VALUE=LINPUT(X1) ; returns low order of number + RETURN + +.RILNOTNUMBER + WORDTYPE=VALUE +; STRIP OFF TOP THREE (WORDTYPE) BITS + X1=32 +.RIL1 + IF VALUE<32 THEN RIL2 + SUB VALUE,X1 + GOTO RIL1 +.RIL2 + GOSUB VALUETIMES256 + X1=1 + ADD X1,INDEX + X2=LINPUT(X1) + ADD VALUE,X2 +; Separate out WORDDYPE = top three0bits + X2=WORDTYPE + WORDTYPE=ASCITYPE + X1=ASCIOFFSET + IF X2<32 THEN RILRET + WORDTYPE=VERBTYPE + X1=VERBOFFSET + IF X2<64 THEN RILRET + WORDTYPE=CONJTYPE + X1=CONJOFFSET + IF X2<96 THEN RILRET + WORDTYPE=PREPTYPE + X1=PREPOFFSET + IF X2<128 THEN RILRET + WORDTYPE=NOUNTYPE + X1=NOUNOFFSET + IF X2<160 THEN RILRET + WORDTYPE=ADJETYPE + X1=ADJEOFFSET + IF X2<192 THEN RILRET + WORDTYPE=MATCHTYPE + X1=MATCHOFFSET + IF X2<224 THEN RILRET + WORDTYPE=7 + X1=0 +.RILRET + SUB VALUE,X1 ; SUBTRACT OFFSET + if value=0 then rilret1 + IF VALUE>60000 THEN RILRET1 + RETURN +.RILRET1 + VALUE=nullvalue + RETURN +;--- +.VALUETIMES256 + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + RETURN +;--- +.VALUEDIV256 +; divide VALUE by 256 +; must preserve X4 + X1=0 + X2=256 +.VD256 + SUB VALUE,X2 + IF VALUE>NEGATIVE THEN VDEND + ADD X1,C1 + GOTO VD256 + +.VDEND + VALUE=X1 + RETURN +;--- +.CHECKOBJECTPOS +; return RESULT=TRUE if 'OBJECT' is +; at 'HIPOS','POS' +; if POS=0, it is treate as NONSPECIFIC +; likewise, HIPOS=NONSPECIFIC is handled +; return X4=lo position of object (or object if on ground) + if object>MaxObject then CopNotFound ; failsafeCode + X4=OBJECT +.COP1 + IF POS=0 THEN COPHI + X1=CURRENTPOS(X4) + if x1=0 then copnotfound ;*graham* + IF X1<>POS THEN COPNOTYET +.COPHI +; lo address is same, now check hi address + X1=HICURRENTPOS(X4) + IF X1=0 THEN COPHI1 + IF HIPOS=NONSPECIFIC THEN COPFOUND ; provided object is contained +.COPHI1 + IF X1<>HIPOS THEN COPNOTYET +.COPFOUND + goto @ReturnTrue +; +.COPNOTFOUND + goto @ReturnFalse +; +.COPNOTYET + X1=HICURRENTPOS(X4) + IF X1=0 THEN COPNOTFOUND + X4=CURRENTPOS(X4) + GOTO COP1 +; +;--- +.pick ; e.g. lock +.insert +;;.have ; >> Pete 14/9/89 +;;.has ; >> Pete 14/9/89 +;;.am ; >> Pete 14/9/89 +;;.are ; >> Pete 14/9/89 +;;.is ; >> Pete 14/9/89 + goto @noverb +;----------------------------------------------- +.gdnoun1 +; data structure is as follows: +; current entry is of the form: +; +; VERB PREP NOUN1 NOUN2 +; +; NOUN1 is one of itreasure, iweapons or ipeople +; +; the command immediately above this on the stack contains +; the same verb, prep and noun2, but has NOUN1=current object +; in gd scan. + +; check through what is accessible (using checkifaccessible) +; and callverb with the first accessible noun1 found +; If nothing found, do intelligentpop + gosub @npcgetcurrent + x1=npcstack(x1) +; x1 is no. of command behind the current one in the command queue + gosub @npcgetoffset ; get offset of command in stack + x2=3 + add x1,x2 ; get pos of noun1 + OBJECT=npcstack(x1) ; now x1=current noun + gdnoun1pos=x1 ; save position of current noun in stack + + gosub @selectobjectpos + searchdepth=1 ; for checkifobvious + gdmaxobject=maxtreasure + if noun1=itreasure then gdaccessall ; treasure + gdmaxobject=maxpeople + if noun1=ipeople then gdaccessall ; people +; gdmaxobject=maxweapon +; if noun1=iweapons then gdaccessall ; weapons + gdmaxobject=maxallobject + if noun1=ieverything then gdaccessall + gdmaxobject=maxclothes + if noun1=iclothes then gdaccessall ; clothes +.gdaccessend + gosub @intelligentpop ; pop off both parts of command + noun1=nullobject ; error condition + if gdnouncalled=TRUE then gdaeret + m1=2037 ; there doesn't seem to be anything suitable + goto @nointerestm1 + +.gdaccessall + if object>gdmaxobject then gdaccessend + gosub @checkifpresent ; quick check - must be here + if result=FALSE then gdaano + + GOSUB @CHECKIFACCESSIBLE + if result=FALSE then gdaano + gosub @checkifobvious + if obvious=FALSE then gdaano + gosub @checkifforbidden + if result=FALSE then gdaccessobject + +.gdaano + add object,c1 + goto gdaccessall +; +.gdaccessobject + noun1isgd=TRUE + if actor<>user then gdaonotuser + gdnouncalled=TRUE + +.gdaonotuser + x1=object + add x1,c1 + npcstack(gdnoun1pos)=x1 ; object to try when we come here next. + noun1=object +.gdaeret + return +;--- +.pmsetupgdaccess + gosub @initfifo + gosub setupgdaccess + goto @linkonfifocommandqueue +;--- +.setupgdaccess +; want to set up gd access to noun1, +; where NOUN1 is one of itreasure, iweapons or ipeople. +; what is the first object wanted? + object=mintreasure + if noun1=itreasure then suga1 +; object=minweapon +; if noun1=iweapons then suga1 + object=minpeople + if noun1=ipeople then suga1 + object=minallobject + if noun1=ieverything then suga1 + object=minclothes + if noun1=iclothes then suga1 + + + cif allowcheat + prs "[[[ system error - setupgdaccess invoked with bad noun1 ]]] " + cend + + return + +.suga1 + if actor<>user then suga2 + gdnouncalled=FALSE + +.suga2 + gosub @npcpushfifo + + noun1=object + goto @npcpushfifo ; push on current position +;------------------------------------------------- +.setupgdrun + descriptionmode=inone + goto setupgorun + +.setupgdgo + descriptionmode=ibrief + +.setupgorun + verb=igdgo + if actor<>user then setupgobug + gosub @stopfollowing + +;;.setupgr1 +; noun1 is destination + numexplicitmoves=100 ; no sarcastic comment now about +; plodding around with N/S/E etc. now, please + gosub @npcpushfifo + gosub @linkonfifocommandqueue + goto @executeanyorders + +.setupgobug + cif allowcheat + if cheatmode=false then setupgobugret + prs "[[[ parser error: attempt to use setupgo by " + print actor +.setupgobugret + cend ; allowcheat + return +;--- +.CONVERTVERB +; Given VERB,PREP, convert to standard forms of certain commands +; e.g. LOOK AT => EXAMINE ; GET ON => STAND ON ; GET OFF => LEAVE +; This is called as soon as the first noun is found - so +; if it is necessary to separate prepositions before+after nouns, +; this is a good place to do it + +;===== + if verb<>123 then cvnoterase + if prep<>ipOFF then cvnoterase + if noun1<>nullobject then cvnoterase +; +; allow WIPE OFF TIME + prep=0 + noun1=noun2 + noun2=nullobject +.cvnoterase +;===== + +; cif AllowBoat +; if verb=11 then Inout +; if verb<>12 then NotInOutBoat +;.inout +;; +;;give room entry priority over object entry +; from=room +; dir=verb +; gosub @checkexit +; if dest<>0 then notinoutboat ; room exit gets priority +;; +;.inout1 +; object=boat +; x1=currentpos(boat) +; if x1=room then inoutboat +; object=bushes +; x1=currentpos(bushes) +; if x1=room then inoutboat +; object=carriage +; x1=currentpos(carriage) +; if x1<>room then NotInOutBoat +;.InOutBoat +; prep=ipin +; noun1=object +; noun2=object +; if verb=11 then InOutBoat2 ; in boat +; prep=ipout +; +;.InOutBoat2 +; verb=istand +; +;.NotInOutBoat +; cend + + IF VERB<>ILOOK THEN CVNOTLOOK + IF PREP=0 THEN CVNOTLOOKat +.cvexamine + VERB=IEXAMINE + PREP=0 + return + +.cvnotlookat + if noun1<>nullobject then cvexamine + +.CVNOTLOOK + IF VERB<>IGET THEN CVNOTSTAND ; get on + IF PREP=IPOUT THEN CVSTAND + IF PREP=IPOFF THEN CVSTAND + IF PREP=IPIN THEN CVSTAND + IF PREP<>IPON THEN CVNOTSTAND +.CVSTAND + VERB=ISTAND + +.CVNOTSTAND + IF VERB<>IVON THEN CVNOTON + PREP=IPON + VERB=ISTAND + +.CVNOTON + IF VERB<>IVOFF THEN CVNOTOFF + PREP=IPOFF + VERB=ISTAND +.CVNOTOFF +;; .CVNOTONOFF + IF VERB<>IDROP THEN CVNDROP + IF PREP=0 THEN CVNDROP + IF NOUN2=NULLOBJECT THEN CVNDROP ; ignore PREP if no second noun +; DROP noun1 PREP noun2 +; probably equivalent to PUT noun PREP noun2 + VERB=IPUT + +.CVNDROP + IF VERB<>ITAKE THEN CVNTAKE +; take off something (REMOVE something) + IF PREP<>IPOFF THEN CVNTAKE + IF NOUN1<>NULLOBJECT THEN CVNTAKE + VERB=IREMOVE + PREP=0 + +.CVNTAKE + IF VERB<>IPUT THEN CVNPUT +; put on something (WEAR something) + if prep<>202 then cvNPutDown + verb=idrop + prep=0 + +.cvNPutDown + IF PREP<>IPON THEN CVNPUTON + IF NOUN1<>NULLOBJECT THEN CVNPUT + if everything<>false then cvnput ;>>fixed by gnome3 + VERB=IWEAR + PREP=0 + RETURN +.CVNPUTON + IF PREP<>IPOUT THEN CVNPUT +; put out => extinguish + VERB=IEXTINGUISH ; put candle out + IF NOUN1<>NULLOBJECT THEN CVNPUT + NOUN1=NOUN2 ; put out candle + +.CVNPUT + IF VERB<>IGET THEN CVNGET + VERB=ITAKE + +.CVNGET + if verb<>igive then cvngive + if prep=0 then cvngive + prep=ipto + +.cvngive + if verb<>iclimb then cvnclimb + if nextverb<1 then cvnclimb + if nextverb>14 then cvnclimb + verb=nextverb + nextverb=0 ; climb in/out/up etc. +.cvnclimb + RETURN +;--- +.SELECTOBJECTPOS +; given VERB,PREP +; set up HISEARCHPOS to show where the objects which follow on +; the input line must be - i.e. +; NOUNONGROUND, NOUNCARRIED or NONSPECIFIC + HISEARCHPOS=NOUNONGROUND + IF VERB=ITAKE THEN SOPRET + IF VERB=ISTAND THEN SOPRET + HISEARCHPOS=NOUNCARRIED + IF VERB=IDROP THEN SOPRET + IF VERB=IGIVE THEN SOPRET + + HISEARCHPOS=NONSPECIFIC +.SOPRET + RETURN +;--- +.SETUPROOM +;; prs " [Setuproom] " ; >> Debug +; Return 'ROOM'=current position of ACTOR +; If ACTOR is contained, trace back until find the +; location in which the container(s) rests. + X4=ACTOR + +.SETUPROOMX4 +; Return 'ROOM'=current pos of object X4 + ROOM=CURRENTPOS(X4) + X1=HICURRENTPOS(X4) + IF X1=0 THEN SETUPROOMEND + X4=ROOM + if room<>0 then SETUPROOMX4 +.SETUPROOMEND + if actor<>user then setuproomend2 + currentuserroom=room + +.setuproomend2 + if actor<>user then setuproomret + gosub @checkiflight + lightinroom=result +.setuproomret + RETURN +;--- +.checkifpresent +; Return result=TRUE if OBJECT is in ROOM + gosub getobjectposx2 + result=FALSE + if x2<>room then cipret + result=TRUE +.cipret + goto @specialcheckifpresent +;--- +.getobjectposx2 + x2=0 + if object>MaxObject then @ReturnFalse + x4=object +.gopx4 +; Return 'x2'=current pos of object X4 + x2=CURRENTPOS(X4) + if x2=0 then gopfound ; not found really + X1=HICURRENTPOS(X4) + IF X1=0 THEN gopfound + X4=x2 + GOTO gopx4 +.gopfound + result=FALSE + if x2<>room then gopret + result=TRUE +.gopret + RETURN +;--- +.switchon +.switchoff +;;.dodge ; >> Pete 14/9/89 + goto @nothinghappens +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/aspecial.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/aspecial.txt new file mode 100644 index 0000000..57cc5b3 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/aspecial.txt @@ -0,0 +1,1625 @@ +; GHOST 1.1 source, copyright (C) 1989 Level 9 Computing. +; +; ASPECIAL.TXT, special case handlers for the game. (In practice, +; this means most of the code to handle puzzles etc.) +; +; Known bugs: +; The compiler is happier if all DATA statements are followed by +; comments, otherwise line numbers for errors go wrong. +; +; +BEGIN +; now print any messages to be printed after certain movements +.AFTERMOVE + if actor=user then amUser +; is ACTOR carrying USER? + x1=hicurrentpos(user) + if x1=0 then amUser + x1=currentpos(user) + if x1=actor then UserCarried +; +; is USER in vehicle driven by ACTOR + cif allowboat + if x1<>cart then amUser + x1=currentpos(actor) + if x1<>cart then amUser + cend +; +; yes - so do description of the room we've arrived in. +.UserCarried + wanttoPrintAnd=0 ; bug fix + actor=user ; force printing of desc etc. + gosub @setuproom ; force first few words to be printed + message cr + gosub @PrintRoom + actor=currentpos(user) ; reset it + goto amuser +; +.amUser +; handle ECHO LOCATIONS + if roommaxecholoc then amNotEcho +; +; Force ACTOR back to previous room. +; Use this for ECHO type rooms WHENEVER IT IS POSSIBLE THAT ACTOR IS IN +; A VEHICLE. +;;.backmove ; >> Pete 14/9/89 + hidest=0 + dest=lastroom + x1=dir + add x1,startreversaltable + dir=list5(x1) + verb=dir + x8=descriptionmode + descriptionmode=ibrief + if actor<>user then describebackmove + descriptionmode=inone +.describebackmove + m1=cr + gosub @printm1 + gosub @absnewlocation + descriptionmode=x8 +; aftermoves has been executed in absnewlocation, hence the return here: + return +.amNotEcho +; +;------------------------------------------------------------------------- +; MISCELLANEOUS AFTERMOVES +;------------------------------------------------------------------------- +;===== +; gnomon or magazine is brought to edith by ACTOR + if edithfree=true then notfreeedith ; edith is already free + if actor=edith then notfreeedith ; edith doesn't carry object + object=edith + gosub @checkifpresent + if result=false then notfreeedith ; edith not here + object=gnomon + pos=actor + hipos=nonspecific + gosub @checkobjectpos ; actor carrying gnomon? +; +; (specialgive is not used, since gnomon may be brought by dog) + m1=2651 + if result=true then @edithfreem1dot ; edith receives gnomon +; +; does edith receive magazine? +.notgnomon + object=magazine + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=false then notmagazine ; actor not carrying magazine + pos=room + hipos=0 ; moveobject is used so as + room=0 ; prevent any text + GOSUB @MOVEOBJECT ; affect DOGOBJECT etc. + room=pos + m1=2654 + goto @edithfreem1dot ; ah, the end of time! +.notmagazine +; +.notfreeedith +;--- +; edna receives new wreath with her card in it. specialgive is not used, +; since wreath may be brought by dog. + if ednagotwreath=true then @notfreeedna ; already has wreath + if actor=edna then @notfreeedna ; edna doesn't carry object + object=edna + gosub @checkifpresent + if result=false then @notfreeedna ; edna not here + object=newwreath + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=false then wreathnothere ; actor not carrying new wreath +; +; edna receives the new wreath. is her card in it? + x1=hicurrentpos(yellowcard) + if x1=0 then notmywreath + x1=currentpos(yellowcard) + if x1<>newwreath then notmywreath ; no, so that's not my wreath +; +; edna receives the new wreath with her card in it +.ednagetswreath + ednagotwreath=true + pos=room + hipos=0 ; moveobject is used so as to + room=0 ; prevent any text + GOSUB @MOVEOBJECT ; affect DOGOBJECT etc. + room=pos + m1=2621 + gosub @printm1dot ; thanks! + object=bert + gosub @MakeObjectObedient + x6=42 + gosub @newracetrackforobject ; "obedient" racetrack + object=edna ; bert & edna are obedient + gosub @MakeObjectObedient + x6=43 + gosub @newracetrackforobject ; "obedient" racetrack + x1=bert + x2=50 + gosub @AddScorex2 ; score for bert & edna +; +; just in case my card is also in wreath... + x1=hicurrentpos(whitecard) + if x1=0 then wreathret + x1=currentpos(whitecard) + if x1<>newwreath then wreathret + currentpos(whitecard)=room + hicurrentpos(whitecard)=c0 + m1=2622 + goto @printm1dot ; throw my card away +; +; new wreath is not here +.wreathnothere + alreadysaidnmw=false ; allow message when new wreath +; taken to edna for next time, but her card isn't in it. +; +; is faded wreath here? + object=fadedwreath + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=true then @notmyfadedwreath ; that's not my wreath either! +; faded wreath is not here + alreadysaidnmfw=false ; allow message when faded +; wreath taken to edna for next time +.wreathret + return +; +; edna says, that's not my new wreath +.notmywreath + if alreadysaidnmw=true then @sanok ; already said it + alreadysaidnmw=true ; don't repeat message + m1=2620 + goto @printm1dot +; +; edna says, that's not my faded wreath +.notmyfadedwreath + if alreadysaidnmfw=true then @sanok ; already said it + alreadysaidnmfw=true ; don't repeat message + m1=2619 + goto @printm1dot +; +.notfreeedna +;--- +; joe comments on thermometer & wall + if actor<>joe then amnotjoe + if room<>3 then amnotjoe ; not in thermometer room + if joecommented=true then amnotjoe ; already commented on it + if room<>currentuserroom then amnotjoe ; user not here + joecommented=true ; prevent repetition + m1=2730 + goto @printm1dot +.amnotjoe +;===== +;------------------------------------------------------------------------- +; USER AFTERMOVES +;------------------------------------------------------------------------- + if actor<>user then amnotuser +;;--- +;; scoring when reach certain rooms +; gosub @scoreroom +;;--- +.amnotuser +;--- +;;.amret ; >> Pete 14/9/89 + RETURN +;--- +;;--- +.SPECIALMOVES +; +; Given ROOM, HIDEST, DEST, ACTOR is to move that way +; and exit has been validated as possible (and hence described) +; in SPECIALEXITS. The purpose of code here is when something +; happens on moving. If exit is to be blocked, code here should +; print the appropriate message and set RESULT=FALSE. +; + if hidest<>0 then @smOk +;------------------------------------------------------------------------- +; MISCELLANEOUS SPECIALMOVES +;------------------------------------------------------------------------- +;===== +; only humans can go via shed door + if sheddooropen=true then smsheddoorend ; door is open - no restrictions + if room<>42 then notoutsideshed + if dest=15 then goviasheddoor ; going in to shed +.notoutsideshed + if room<>15 then smsheddoorend ; not going out of shed (only 1 poss dest) +.goviasheddoor + m1=2580 + if actor> Pete 14/9/89 +;--- +.smok + RESULT=TRUE + RETURN +; +.smPreventActorM1Dot + gosub @ActorM1Dot + goto smPrevent + +.smpreventm1dot + gosub @printm1dot +.smprevent + FatalError=True + result=FALSE + commandfinished=TRUE + if room<>currentuserroom then garet ;&& + fatalerror=2 ;&& +.garet + return + +;;.smokm1dot ; >> Pete 14/9/89 +;; gosub @printM1dot ; >> Pete 14/9/89 +;; goto @smok ; >> Pete 14/9/89 +;--- +; +;===== +; open shed door & ring bell if necessary +; m1 contains 2678 for ". A bell rang and " +; or 2679 for "a bell rang. " +.doopensheddoor + sheddooropen=true + dooropen=true + object=bell + gosub @getobjectposx2 + if x2<>15 then osdret + if currentuserroom=15 then hearbell + if currentuserroom<>42 then osdret +.hearbell + message m1 ; ding-a-ling-a-ling +.osdret + return +;===== +; +.specialtakes +; is POS to be allowed to gain OBJECT? +; return result=FALSE to prevent action +; +;===== +; take wreath + if object<>greenwreath then nottakewreath + object=bert + gosub @checkifpresent + m1=2750 + if result=true then @stpreventm1dot ; "geroff my wreath!" + object=greenwreath +.nottakewreath +;--- +; can't remove bell from bush once violet is recruited. that would +; be a nasty thing to do, wouldn't it?! + if object<>bell then nottakebell + x1=hicurrentpos(bell) + if x1=0 then nottakebell + x1=currentpos(bell) + if x1<>bush then nottakebell ; bell not in bush + m1=2721 + goto StPreventActorM1Dot ; don't be cruel +.nottakebell +;--- +; Decide if POS is strong enough to pick up OBJECT +; JUMP HERE INSTEAD OF STOK... +.stokifstrongenough + if pos>maxnpc then stnotnpc + if pos>maxghost then strongenough ; humans can carry anything + if object>maxtreasure then tooheavy ; heavy object + if pos<>user then strongenough ; only user is weak + x1=object + x2=mintreasure + sub x1,x2 ; light objects 0-10 + if playerstrengthfailedlift then strongenough + failedlift=0 ; prevent repetition + m1=2529 ; "I was now strong enough" + gosub @printm1 + goto strongenough ; allow object to be taken +; +; POS isn't strong enought to carry that +.tooheavy + gosub @storedogcommand ; dog tries to help + x1=pos + gosub @printtheobjectx1 ; (usually the actor) + m1=2528 ; "would never be strong enough" + if object>maxtreasure then notstrongenough + m1=2525 ; "wasn't stronge enough yet" + failedlift=object ; used later for "now strong +; enough" +.notstrongenough + goto stpreventm1dot +.stnotnpc +; +; pos IS strong enough to pick up object +.strongenough +; +; can we remove fishbone if lodged in dog + if object<>fishbone then nottakefishbone + if dogfriendly=true then nottakefishbone ; not in dog + m1=2690 + add m1,dogcalmed + if dogcalmed<3 then @stpreventm1dot ; not calm enough yet + gosub @printactor + m1=2701 + gosub @printm1 ; I reached through dog's throat + wanttoprintand=actor ; (prepare for "and took the bone") +.nottakefishbone +;===== +; +;;.stok ; >> Pete 14/9/89 + result=TRUE ; allow actor to take object +;;.stret; >> Pete 14/9/89 + return + +;;.stokm1dot ; >> Pete 14/9/89 +;; result=true ; allow actor to take object ; >> Pete 14/9/89 +;; goto @printm1dot ; >> Pete 14/9/89 + +;;.stprevent ; >> Pete 14/9/89 +;; result=false ; >> Pete 14/9/89 +;; goto stret ; >> Pete 14/9/89 + +.StPreventActorM1Dot + gosub @printActor + +.stpreventm1dot + result=FALSE ; prevent taking + goto @printM1dot +;--- +.sign + goto @noverb +;--- +.specialaftermoveobj +; OBJECT has just been moved from HIFROM, FROM to POS, HIPOS +; do anything you want, then return +; no values to return +; +; SPECIAL NOTICE TO PREVENT ME FROM BUGGERING THINGS UP - +; +; IT IS VERY EASY (AND HABITUAL) TO FORGET TO TEST FOR HIPOS HERE, +; AND TO ASSUME THAT POS IS ALWAYS A CONTAINER. +; FOR HECK'S SAKE, TEST HIPOS AND HIFROM WHENEVER TESTING POS AND FROM !! +; +; - GRAHAM. +; +;===== +; User gains strength for lifting either of the three light objects +; just heavier than the heaviest carried so far. +; +; WARNING: This routine may seriously damage your sanity if +; you have not firstly consulted the peculiar part of the game design +; associated with it. For a free leaflet to help you understand +; the design, please write to your nearest loony bin. +; + if hipos=0 then usernottake + if pos<>user then usernottake + x1=object + x2=mintreasureminus2 + sub x1,x2 ; light objects ordered 2-12 +; is object one of the three light objects just heavier than the heaviest +; carried so far? + if x1user then usernotdrop + if hipos=0 then userdrop + if pos=user then usernotdrop ; in case we wear it etc +.userdrop + playerobject=c0 ; (can only carry 1 object) +.usernotdrop +;--- +; set "object carried" flag if dog takes an object +; and drop any objects already carried + if hipos=0 then dognottake + if pos<>dog then dognottake ; dog not taking object + if dogobject=0 then dontdropobject ; no object already carried + hicurrentpos(dogobject)=c0 + currentpos(dogobject)=room ; drop old object + verb=idrop + gosub @printactorVERB ; the dog dropped + x1=dogobject + gosub @printtheobjectx1 + m1=dot + gosub @printm1 +.dontdropobject + dogobject=object ; new object owned +.dognottake +;--- +; clear "object carried" flag if dog drops an object + if hifrom=0 then dognotdrop + if from<>dog then dognotdrop + if hipos=0 then dogdrop + if pos=dog then dognotdrop ; in case we wear it etc +.dogdrop + dogobject=c0 ; (can only carry 1 object) +.dognotdrop +;--- +; put watch in vase + if object<>watch then watchnotinvase + if hipos=0 then watchnotinvase + if pos<>vase then watchnotinvase + currentpos(watch)=c0 + m1=2655 + gosub @printm1dot ; watch smashes + m1=2656 + if edithfree=false then @edithfreem1dot ; solved end of time! +.watchnotinvase +;--- +; fishbone removed from dog? + if object<>fishbone then notremovefishbone + if dogfriendly=true then notremovefishbone ; not removed from dog + dogfriendly=true ; set "friendly" flag + hicurrentpos(dog)=c0 + x1=5 + currentpos(dog)=x1 ; dog runs away + object=dog + x6=50 + gosub @newracetrackforobject ; new "friendly" racetrack + gosub @stop ; bug fix 26/6/89 stop actor in case following dog! + m1=2700 + goto @printm1dot +.notremovefishbone +;--- +; fasten bell to bush to solve "violet" puzzle + if object<>bell then bellnotinbush + if hipos=0 then bellnotinbush + if pos<>bush then bellnotinbush + object=violet + x6=51 + gosub @newracetrackforobject ; violet is now obedient + gosub @makeobjectobedient + x1=violet + gosub @AddScore25 + m1=2720 + goto @printm1dot +.bellnotinbush +;--- +; special case when new wreath has already been brought to edna, but +; the yellow card is only now being put in it (usually, aftermoves is +; used when the wreath already containing the card is brought to edna). +; +; at first, it might seem easier to put one routine in specialactivate +; to check if the wreath containing the yellow card is in the same +; room as edna. but since the dog bringing the wreath is higher than +; edna in the npc list, then the code would not be activated until +; the next turn! +; + if object<>yellowcard then notmoveyellow + if ednagotwreath=true then notmoveyellow ; puzzle already solved + if hipos=0 then notmoveyellow + if pos<>newwreath then notmoveyellow ; not put in new wreath + object=edna + gosub @checkifpresent + if result=true then @ednagetswreath ; edna not here +.notmoveyellow +;===== +; + return +;--- +.specialaftergive +; NOUN1 has just been given to the npc NOUN2 +; +;;.saythankyou ; >> Pete 14/9/89 +;; object=noun2 ; >> Pete 14/9/89 +;; gosub @printTheobject ; >> Pete 14/9/89 +;; m1=2204 ; said "thankyou" ; >> Pete 14/9/89 +;; goto @printM1Dot ; >> Pete 14/9/89 +;--- +.TIMEDEPENDENTCODE +; called for every minute that goes past + actor=user ; just in case there is any doubt! +; +;===== +; has morning has arrived? + add gametimer,c1 + m1=2763 + if gametimer>timelimit then @userdeathm1 +; +; is shed door being unlocked? + gosub unlocksheddoor +; +; are humans present. if so, player is distressed + gosub @testforhuman + m1=2530 ; "I felt distressed by" + if result=true then @distressedbyobject +; +; is light present. if so, player is distressed + gosub spreadlight + m1=2590 ; "I felt distressed by" + if result=true then @distressedbyobject +;===== +; + return +; +;===== +; shall we unlock the shed door? +.unlocksheddoor + if actorturningbarrel<>0 then usd1 + return ; nobody turning barrel +.usd1 + x1=actorturningbarrel + gosub @printtheobjectx1 ; ... + m1=2670 + if pushlever1=false then @printm1dot + if pushlever2=false then @printm1dot + if pushlever2=false then @printm1dot ; won't turn + m1=2676 + if shedunlocked=true then @printm1dot ; already unlocked + shedunlocked=true ; set when shed door unlocked + m1=2671 + goto @printm1dot + return +;--- +; Distribute any light in ROOM. If light present, then... +; result=true +; object=light object number (e.g. streetlights) +; currentpos(object)=room +; +.spreadlight +; no lights to begin with... + currentpos(shedlight)=c0 + currentpos(spotlightlight)=c0 + currentpos(streetlights)=c0 + currentpos(lightair)=c0 +; + if room>7 then nospotlightlight ; spotlight light in 3-7 + object=spotlightlight + if spotlighton=true then lightpresent + goto lightnotpresent +.nospotlightlight +; + if room>10 then nostreetlights ; street lights in 8-10 + object=streetlights + if nighttime=true then lightpresent + goto lightnotpresent +.nostreetlights +; + if shedlighton=false then noshedlight + object=shedlight + if room=42 then lightpresent + if room=15 then lightpresent ; shed light in 15 and 42 +.noshedlight +; +; no light in this location +.lightnotpresent + result=false + return +; +; light in this location +.lightpresent + result=true + currentpos(object)=room + currentpos(lightair)=room ; allow examine illuminated air + return +;--- +; test for the presence of humans in room (except mourners). +; if humans present, then... +; result=true +; object=human object number +; +.testforhuman + result=true + object=supervisor ; start with supervisor +.testforhuman1 + gosub @getobjectposx2 + if x2=room then tfhret ; human found + add object,c1 + if object> Pete 14/9/89 + message cr + gosub @varymessage + lastwordprinted=0 ; prevent "he" + gosub @printtheobject ; + message dot +; +; drop any object carried... + if playerobject=0 then dboend ; no object to drop + m1=2527 + gosub @printm1 ; "I dropped" + x1=playerobject + gosub @printtheobjectx1 ; + message dot ; "." + x1=currentpos(dog) + if x1<>currentuserroom then dbodropobject ; dog not here + if dogfriendly=false then dbodropobject ; dog not friendly yet +; dog picks object up again + m1=2524 + gosub @printm1dot + x1=dog + currentpos(playerobject)=x1 + x1=carried + hicurrentpos(playerobject)=x1 + goto dboret +.dbodropobject + currentpos(playerobject)=currentuserroom + hicurrentpos(playerobject)=c0 ; drop object carried +.dboret + playerobject=0 +.dboend + return +;===== +; +.OBJECTTRIGGER +; Trigger on OBJECT +; set PROCESSED=TRUE if the command is completed +; by this routine (usually by the printing of an +; error message, or some other general response) +; + processed=FALSE + if object=nullobject then @otok + if verb=iexamine then @otExamine +; +; + gosub @checkifpresent + if result=FALSE then otret ; not here, so do nothing + OTPOS=CURRENTPOS(OBJECT) ; remain set throughout this routine + OTHIPOS=HICURRENTPOS(OBJECT) + processed=TRUE ; prevent processing unless cleared at end of routine +; special cases... +; +.otExamine +.OTOK + processed=FALSE ; PROCESSING MAY CONTINUE +.otret + RETURN +; +;;.otpreventm1dot ; >> Pete 14/9/89 +;; gosub @printM1dot ; >> Pete 14/9/89 +;;.otprevent ; >> Pete 14/9/89 +;; processed=TRUE ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +; +; +.FUNNIES +; Value of word entered is in 'OBJECT' (relative to NOUNOFFSET) +; Also have 'VERB' and may have 'PREP' if one has been entered +; before this noun on the input line. +; Return processed=TRUE if a special message is printed in this routine +; which should prevent the printing of other messages + if object=nullobject then funniesok + processed=true ; prevent action unless drop through to end +; +;;.nothingspecial ; >> Pete 14/9/89 + +; message 2112 ; it looks exactly as you would expect +; return + +;;.fnotexamine ; >> Pete 14/9/89 +;;.notvandal ; >> Pete 14/9/89 +;;.examnotscenery ; >> Pete 14/9/89 +.funniesok + processed=FALSE + RETURN +;--- +;--- +.SPECIALEXAMINE +; print any special examine messages which follow +; the basic message but are before any contents are printed +; set processed=TRUE if the contents should not be printed +; +;===== +; examine wreath + if object<>greenwreath then notexaminewreath + object=bert + gosub @checkifpresent + m1=2750 + if result=true then @printm1dot ; "geroff my wreath!" + object=greenwreath +.notexaminewreath +;--- +; examine on/off type objects... + m1=2555 ; standard on/off message +; +; message when shed light on + if object<>lightbulb then notexamshedlight + add m1,shedlighton ; on/off message + goto @printm1dot +.notexamshedlight +; +; message when spotlight on + if object<>spotlight then notexamspotlight + add m1,spotlighton ; on/off message + goto @printm1dot +.notexamspotlight +;--- +; examine open/closed objects... + m1=2581 ; standard open/closed message +; +; shed door open/closed status + if object<>sheddoor then notexamsheddoor + add m1,sheddooropen + goto @printm1dot ; open/closed message +.notexamsheddoor +;--- +; examine stonework + if object<>stonework then notexamstone + currentpos(stonework)=c0 ; destroy stonework + currentpos(carvings)=room ; replaced by carvings + currentpos(plinth)=room ; and plinth +.notexamstone +;--- +; examine bushes + if object<>bushes then notexaminebushes + if examinebushes>1 then notexaminebushes ; already examined twice +.exambushes ; also called from .search + add examinebushes,c1 + m1=2652 + if examinebushes<2 then @printm1dot ; examined first time +; examined second time + currentpos(magazine)=room + m1=2653 + goto @printm1dot ; find magazine +.notexaminebushes +;===== +; + return +;--- +.SPECIALPREEXAMINE +; before printing examine message / contents, check if +; anything should prevent this. Return TRUE if details should +; NOT be printed +; + RESULT=FALSE ; proceed normally +;;.speok ; >> Pete 14/9/89 + RETURN + +;;.returnTrueM1Dot ; >> Pete 14/9/89 +;; result=true ; >> Pete 14/9/89 +;; goto @printM1Dot ; >> Pete 14/9/89 +;--- +.CANTSEETHAT + M1=2019 ; can't see that + GOTO @errorm1dot +;--- +;;.mighthurtyourself ; >> Pete 14/9/89 +;; m1=2401 ; you might hurt yourself ; >> Pete 14/9/89 +;; goto @errorm1dot ; >> Pete 14/9/89 +;---- +;--- +;;.StopObject ; >> Pete 14/9/89 +;; actorsave=actor ; >> Pete 14/9/89 +;; actor=object ; >> Pete 14/9/89 +;; gosub @stop ; >> Pete 14/9/89 +;; actor=actorsave ; >> Pete 14/9/89 +;; goto resetactor ; >> Pete 14/9/89 +;--- +.resetactor + gosub @setACTORATTRIBUTES + goto @initfifo +;--- +;--- +;;.MAKEENEMIES ; >> Pete 14/9/89 +; make TARGET and ACTOR be enemies +;; OBJECT=TARGET ; >> Pete 14/9/89 +;; GOSUB @setX4toOBJECTATTRIBUTES ; >> Pete 14/9/89 +;;; and set up attacker and target to be enemies... +;; NPCCURRENT(X4)=ACTOR ; >> Pete 14/9/89 +;; NPCCURRENT(ACTORATTRIBUTES)=TARGET ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +; Routines to return pointer to character 'OBJECT' data. Note that they +; rely on npcentrysize=16 (8 surely), so beware if you change this. +.setACTORATTRIBUTES + ACTORATTRIBUTES=ACTOR + ADD ACTORATTRIBUTES,ACTORATTRIBUTES + ADD ACTORATTRIBUTES,ACTORATTRIBUTES + ADD ACTORATTRIBUTES,ACTORATTRIBUTES + RETURN +; +.setX4toOBJECTATTRIBUTES +; return pointer in X4. (Modify .notifynpc if you change this routine) + X4=0 + if object>maxNpc then sxtnnotalive + X4=OBJECT + ADD X4,X4 + ADD X4,X4 + ADD X4,X4 +; ADD X4,X4 +.sxtnnotalive + return +;--- +.SILLY +; prs "[actor who is being silly is: " +; x1=actor +; gosub @printTHEobjectx1 +; prs "]" +; message cr + gosub @AbsCancelInput + M1=3100 + GOTO @VARYERRORM1DOT +;--- +.SPECIALDESC +;; prs " [specialdesc] " ; >> Debug +; come here after all objects and exits printed +; no return necessary +; +;===== +; message when lights on + gosub @spreadlight + if result=false then nodesclights + m1=2554 + if object=shedlight then desclights + m1=2564 + if object=spotlightlight then desclights + m1=2574 + if object=streetlights then desclights +.nodesclights +;--- +; message when bell rings on bush + if room<>45 then notbellringing + x1=hicurrentpos(bell) + if x1=0 then notbellringing + x1=currentpos(bell) + if x1<>bush then notbellringing ; bell not in bush + m1=2722 + goto blanklinem1dot +.notbellringing +;===== +; +;;.sdret ; >> Pete 14/9/89 + RETURN +; +;===== +.blanklinem1dot +.desclights + message blankline + goto @printm1dot +;===== +; +;--- +.SPECIALEXITS +; Given 'FROM' 'DIR' 'DEST' +; Modify if an exit is blocked for some reason + HIDEST=0 ; normally can't move onto a container through an exit + X1=HICURRENTPOS(ACTOR) + IF X1=0 THEN SEORDINARY +; ACTOR is on something - so exits may be different +; Standing on something, but can take as being an +; ordinary exit from the room in which the container is ('ROOM') +.SEORDINARY +;;.senotsynth ; >> Pete 14/9/89 +;;.specialexitsok ; >> Pete 14/9/89 + RETURN + +;;.seprevent ; >> Pete 14/9/89 +;;.SEFALSE ; >> Pete 14/9/89 +; Exit is not present +;; DEST=0 ; >> Pete 14/9/89 +;; EXITVISIBLE=FALSE ; >> Pete 14/9/89 +;; RETURN ; >> Pete 14/9/89 +;--- +.SPECIALDROPS +; trying to drop 'OBJECT' to position HIPOS, POS +; Print appropriate message if desired +; and return RESULT=FALSE if ACTOR is to be prevented from dropping it +; if hipos=0 then sdnotputonobject +;.sdnotputonobject ; not going to a container + RESULT=TRUE ; allow it to be dropped + RETURN +;--- +.SPECIALACTOR +;; prs " [Specialactor] " ; >> Debug +; print ACTOR + + cif AllowBoat + x1=hicurrentpos(actor) + if x1=0 then specialActor1 + x1=currentpos(actor) + if x1<>CART then specialactor1 +;;.sa1 ; >> Pete 14/9/89 +; print "the container was..." + object=x1 + verb=iam + goto @printObjectVerb +.specialActor1 + cend + + lastwordprinted=actor ; force it to print the article - 'you' + verb=iam + goto @printACTORverb +;--- +; CHECK IF ACCESSIBLE BEFORE CHECKING OBVIOUS THINGS LIKE OBJECT IS +; OMNI PRESENT, OR OWNED BY SOMEONE ELSE. +; +.specialcheckifaccessible +; if no special code is needed, LEAVE RESULT UNCHANGED +; otherwise return RESULT=TRUE if OBJECT is accessible to VERB +; or RESULT=FALSE if not accessible. +; *graham* this is necessary when using two objects for a wardrobe etc. +; (i.e. a wardrobe which is open, and one which is closed) + if processingsay=TRUE then conditionaltrue ;*graham* bug fix. sciatrue +;;.sciaNotAutomatic ; >> Pete 14/9/89 + if verb=ifollow then conditionaltrue ;*graham* bug fix + if verb=isetupgo then conditionaltrue ; sciatrue + if verb=igdgo then conditionaltrue ; sciatrue + if verb=isetupfind then conditionaltrue ; sciatrue + if verb=igdfind then conditionaltrue ; sciatrue + if verb=igetme then sciatrue + if verb=iwaitforperson then conditionaltrue ; sciatrue ; wait for ... + if verb=iwaitforperiod then conditionaltrue ; sciatrue ; wait for ... + if verb=iwaituntiltime then conditionaltrue ; sciatrue ; wait until ... + if object<>generaldoor then scianotdoor + gosub @setupdoor + if door=TRUE then sciatrue + goto @returnfalse +; +.scianotdoor +; +; can't reach items out of container + outofreach=false +;;.notoutofreach ; >> Pete 14/9/89 +; +;===== +; special kludge when 3rd npc trying to push sundial, after it has +; just been destroyed. this allows sundial to be pushed, and the +; absence of the sundial is handled in .push + if verb<>ipush then cianotpushsundial + if object<>sundial then cianotpushsundial + if pushingsundial<2 then cianotpushsundial ; 2nd npc +; 3rd npc is pushing sundial + goto sciatrue +.cianotpushsundial +;===== +; + return +;--- +.conditionaltrue +; only true if OBJECT exists in the game + x1=currentpos(object) + if x1=0 then @returnfalse +.sciatrue + result=TRUE + return +;--- +;;.isobjectalive ; >> Pete 14/9/89 +; return result=TRUE if it is +;; if object>maxnpc then @returnfalse ; >> Pete 14/9/89 +;; gosub @SetX4ToObjectAttributes ; >> Pete 14/9/89 +;; x1=hitpointOffset ; >> Pete 14/9/89 +;; add x1,x4 ; >> Pete 14/9/89 +;; x1=npcCurrent(x1) ; >> Pete 14/9/89 +;; if x1>0 then sciatrue ; >> Pete 14/9/89 +;; result=FALSE ; >> Pete 14/9/89 +;;.ioaret ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +; +.specialdescbeforeexits +; printed immediately after short+long room descs. +; no return needed +; +;;.printdistantfeatures ; >> Pete 14/9/89 +; what is the height of the current location? +; what is the special feature at the current location? +; + return +;--- +;;.calcheight ; >> Pete 14/9/89 +; return x1 = height of ROOM with scenery object x4 +; x4=1..25 corresponding to room if special feature +;; return ; >> Pete 14/9/89 +;--- +;;.CalcTerrainAndTree ; >> Pete 14/9/89 +; return x1=tree type and x2+x3=terrain type +; for ROOM. +;; return ; >> Pete 14/9/89 +;--- +.GetXY +; return X=x co-ordinate on grid +; Y=y co-ordinate on grid + if room>minsynthroomminus1 then getxysynth +; fixed room + x=0 + y=0 + return + +.getxysynth + x1=room +;;.getxyx1 ; >> Pete 14/9/89 + x2=minsynthroomminus1 + sub x1,x2 + sub x1,c1 + x2=xmaxplus1 + gosub @x1divx2 + y=x1 ; y:=room div xmax = y co-ordinate + add x2,x3 + x=x2 ; x:=room mod xmax = x co-ordinate + return +;--- +.convertroom +; return x1 as the room number for the description +; printed by a room object being here. +; descriptions are in table with offsets 240..255 +; exits are stored in table from room 10..30 + x1=minsceneryobjt2m1 ; double to give index into initial pos +.cr1 + x2=objectstart(x1) + if x2=room then crfound + add x1,c2 + if x1> Pete 14/9/89 +;; object=user ; >> Pete 14/9/89 +;; gosub @SetX4toObjectAttributes ; >> Pete 14/9/89 +;; x1=hitpointoffset ; >> Pete 14/9/89 +;; add x1,x4 ; >> Pete 14/9/89 +;; x1=npccurrent(x1) ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.specialactivatenpc +; We are activating npc ACTOR +; Put special code handlers for them HERE. +; Set processed=TRUE if they have already done +; everything they are going to this turn. +; return verb<>0 to do that action +; +; THIS IS LIKE A KIND OF TIMEDEPENDANT FOR NPCs. +; +;===== + if actor<>2 then sanotfirstnpc +;--- +; Now do a few things after the user's command, but before ANY npc's +; are activated... +; +; count the number of NPCs that are about to follow the USER. +; this is to prevent text getting cluttered up in printarrival +; (i.e. printing a full screen of " entered from the +; north." etc. etc.) + npcsfollowing=0 ; start with zero followers + object=joe +.isnpcfollowing + gosub @getobjectposx2 + if x2=currentuserroom then nextinf ; not following if already +; in same room as user + gosub @setX4toOBJECTATTRIBUTES + x1=followoffset + add x1,x4 + x2=npccurrent(x1) + if x2<>user then nextinf + add npcsfollowing,c1 ; add to the total +.nextinf + add object,c1 + if objectmaxghost then sannotghost +;--- +; ghosts complain if light present. + npcdistressed=false ; not distressed YET + gosub @spreadlight + if result=false then ghostnotdistressed ; no light present + random x1 + if x1>128 then ghostdistressed + gosub @printactor ; + m1=2600 + gosub @varymessage ; complain about +; +; Special case for violet, since she can't see the light and must +; complain about "something in the air". Just because she is blind +; does not exempt her from the effects of light. Am I correct? + if actor<>violet then violetnotdistress + object=lightair ; +.violetnotdistress + gosub @printtheobject ; + gosub @printdot +; ghost is distressed, so ignore current command unless it is +; a movement verb. +.ghostdistressed + npcdistressed=true ; only allow movement verbs + goto sanok +.ghostnotdistressed +;--- +; ghosts help user push thermometer in +; a similar way to the dog + if dogverb<>ipush then nothelppush + if dognoun1=thermometer then copyusercommand + if dognoun1=wall then copyusercommand + if dognoun1=WallAboveVault then copyusercommand +.nothelppush +;--- +.sannotghost +;--- +; dog copies some of the player's actions (usually, those that +; fail) + if actor<>dog then sanotdog + if dogverb=0 then sanok ; no stored command for dog +.copyusercommand + if room<>currentuserroom then sanotdog ; dog/npc not here + verb=dogverb + prep=dogprep + noun1=dognoun1 + noun2=dognoun2 + goto sanok +.sanotdog +;===== +; +.sanOK + processed=false ; no special code - so allow npc to activate +;;.sanRet ; >> Pete 14/9/89 + return + +.sanOKm1dot + gosub @printm1dot + goto @sanok + +.saPreventActorM1Dot + gosub @printActor + +;;.setProcessedM1Dot ; >> Pete 14/9/89 +;;.saPreventM1Dot ; >> Pete 14/9/89 +; print m1, do nothing else this turn + gosub @printM1Dot + +.saPrevent + processed=true + return +;--- +;;.isobjectalert ; >> Pete 14/9/89 +; return result=TRUE if OBJECT is awake +;; gosub @isobjectalive ; >> Pete 14/9/89 +;; if result=FALSE then ioalertret +;;.ioalertret ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.canactormove +; return result=FALSE if ACTOR is prevented from moving + result=TRUE +;;.camret ; >> Pete 14/9/89 + return +;--- +.canactorrandommove +; return result=TRUE if actor can make random moves + x1=hicurrentpos(actor) + if x1<>0 then carmfalse + random x1 ;* + if x1>128 then carmfalse ;* + result=true + if actor=joe then carmret +.carmfalse + result=false ; no-one moves at random in this part. TRUE +.carmret + return +;--- +;;.handleinterruption ; >> Pete 14/9/89 +; ACTOR has been interrupted in the middle of something +; Do whatever you see fit, then return +; No values need be returned +;; return ; >> Pete 14/9/89 +;--- +.specialrtmessage +; actor is just about to print M1 as part of a racetrack +; instruction. Use this hook to intercept particular things +; which may happen in the message which cannot be easily +; coded elsewhere. +; +;===== +; mourners leave game + if m1<>5006 then mournersnotleft + currentpos(mourners)=c0 +.mournersnotleft +;--- +; man lights cigarette and drops matchbox in one message, rather +; than two seperate actions + if m1<>5011 then notdropmatchbox + hicurrentpos(matchbook)=c0 + currentpos(matchbook)=room +.notdropmatchbox +;--- +; man leaves game + if m1<>5016 then mannotleft + currentpos(man)=c0 +.mannotleft +;--- +; workman fills grave. destroy mound of earth + if m1<>5025 then notfillgrave + currentpos(mound)=c0 +.notfillgrave +;--- +; darkness falls when supervisor left + if m1<>5041 then notdarkness + gosub @printm1dot + message 2570 ; always show night-time message + currentpos(cart)=c0 ; cart contains superv. & workman + nighttime=true ; streetlights on etc. +; +; now set up a new group of first-time in room messages + x1=VisitTableStart + x2=60 ; room number+60 (new messages are offset by 60) +.rtInitDone1 + list7(x1)=x2 + if x1>VisitTableEnd then rtInitDone2 + add x1,c1 + add x2,c1 + goto rtInitDone1 +.rtInitDone2 +; +; set up positions for ghosts and dog etc. + hicurrentpos(user)=c0 + x1=44 + currentpos(user)=x1 ; user starts again by grave + currentpos(joe)=x1 ; joe starts next to user + currentuserroom=x1 ; make sure no mess 5041 +; x1=on +; hicurrentpos(statue)=x1 +; x1=plinth +; currentpos(statue)=x1 ; statue + object=bert ; ghosts bert...violet +.ghostappears + if object=vandals then setnightpos ; vandals + if object=dog then setnightpos ; dog + if object>maxghost then setnextnightpos ; ommit other humans +.setnightpos + gosub @initanobject +.setnextnightpos + add object,c1 + if object5063 then joenotfollow + object=joe + gosub @SetX4ToObjectAttributes + x1=followOffset + add x1,x4 + npccurrent(x1)=c1 ; make joe follow me +; + object=joe + gosub @MakeObjectObedient +.joenotfollow +;--- +; alex returns to being a statue + if m1<>5120 then notalexstatue + currentpos(alex)=c0 + x1=plinth ; change to statue + currentpos(statue)=x1 ; (hipos already set up) +.notalexstatue +;--- +; pic of joe when first met + cif Includepictures + x1=28 + if m1=5050 then @drawpicturex1 + cend ; Includepictures +;===== +; + return +;--- +.newracetrackforobject +; start racetrack x6 for actor OBJECT + actorsave=actor + actor=object ; replace its racetrack with a new one... + gosub @setACTORATTRIBUTES + gosub @stop ; kill existing racetrack + x1=x6 ; race track number to execute + gosub @initracetrackx1 + actor=actorsave + goto @resetactor ; from actorsave +;--- +.checknullaction +; ACTOR has no stack actions to do, so we may want to start up a new +; one. This is used for people such as the valkyrie in Knight Orc, +; for whom it is VITAL that they should not become 'unhooked'. Set +; ORDERWAITING to the first command to execute, if you want ACTOR +; to obey it immediately. +; if actor=* then RestartRacetrack + return + +;;.RestartRacetrack ; >> Pete 14/9/89 +; restart the original racetrack +;; x6=actor ; >> Pete 14/9/89 +;; object=actor ; >> Pete 14/9/89 +;; goto @NewRaceTrackForObject ; >> Pete 14/9/89 +;--- +.specialcheckifpresent +; have just checked if object is present +; Add special modifiers here. +; return RESULT=TRUE if object here. + return +;--- +.specialinitnpcs + return +;--- +;;.destroyobject ; >> Pete 14/9/89 +; object gets destroyed, and replaced in a location as appropriate +;; currentpos(object)=c0 ; >> Pete 14/9/89 +;; hicurrentpos(object)=c0 ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +;;.createobject ;** used now? ; >> Pete 14/9/89 +; OBJECT gets created in current room +;; currentpos(object)=room ; >> Pete 14/9/89 +;; hicurrentpos(object)=c0 ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +;;.createobjectpos ;** used now? ; >> Pete 14/9/89 +; create OBJECT at position HIPOS, POS +;; currentpos(object)=pos ; >> Pete 14/9/89 +;; hicurrentpos(object)=hipos ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.TRIGGERWORDS +; check current word to see if it is a trigger word +; ACTOR is the target of conversation + return + +.tell + goto @noverb + +;;.isactorflying ; >> Pete 14/9/89 +; return RESULT=TRUE if ACTOR is flying +;; result=FALSE ; >> Pete 14/9/89 +;;.iafret ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;---------------- +.specialconversation +; USER is saying 'verb prep noun1 noun2' to ACTOR +; make any intercepts you fancy. +; If the command is not to be stored, set PROCESSED=TRUE +; and SAYRESPONSE=TRUE +; +; see also TRIGGERWORDS +; +;===== +; spook.1 humans can't see player + if actormaxtalkingnpc then talktoghost + return +.talktoghost +;===== +; + if verb=ihello then npchello +; + m1=3620 ; seemed very offended + if verb=217 then scprint + m1=3660 ; echo verb - can't do it etc. + if verb>199 then scprint + if verb<20 then scNotSystem + if verb<32 then scPrint ; system verbs - SAVE, RESTORE etc. +.scNotSystem + return ; nothing unusual - probably an order, so pass back +; for normal handling code to cope with it. +; +.scprint + goto scpreventVaryM1Dot +; +;--- +.scPreventActorM1Dot + gosub @ActorM1Dot + goto scPrevent +; +.NPCHELLO +; ACTOR is the person the user is trying to talk to, who is here + m1=3170 ; hello +;===== + if actor<>dog then scpreventvarym1dot +; dog is calmed + gosub scPreventVaryM1Dot + goto @calmdog +;===== + +.scPreventVaryM1Dot + LASTWORDPRINTED=0 ; prevent use of IT + gosub @varysaym1dot +.scprevent + SAYRESPONSE=TRUE + processed=TRUE +;;.NPCHELLOret ; >> Pete 14/9/89 +.scNoPrint + RETURN +; +;;.scpreventm1dot ; >> Pete 14/9/89 +;; gosub @printm1dot ; >> Pete 14/9/89 +;; goto scprevent ; >> Pete 14/9/89 +;--- +;;.empty ;** remove verbs? ; >> Pete 14/9/89 +;;.pour ; >> Pete 14/9/89 +;; goto @silly ; >> Pete 14/9/89 +;--- +.knock + gosub @printactor + m1=2417 + goto @printm1dot ; rat-a-tat-tat +;--- +;;.WaterSomething ; >> Pete 14/9/89 +;;.checkForWater ; >> Pete 14/9/89 +;; goto @noverb ; >> Pete 14/9/89 +;--- +.hold +; if noun1=chandelier then @done + goto @take +;--- +.wave + goto @printactorverbdot +;--- +.win + cif Includepictures + x1=5 ; endgame picture + gosub @drawpicturex1 + cend ; Includepictures +; + x1=21 + x2=35 + gosub @addscorex2 + message blankline + gosub @score + gosub @calcscore ;***** + valuesave=x4 ;carry score to next part (hopefully!)***** + thispart=0 ;***** + parttochain=2 + goto @chainparttochain +;--- +.SpecialConjugate +; return x1 as type for noun x2 (if different to that in the table) + if x2=edna then scProperFemale + if x2=edith then scProperFemale + if x2=violet then scProperFemale +;;.scNotPF ; >> Pete 14/9/89 + return +.scProperFemale + x1=ProperFemale + return +;--- +.SpecialEchoVerb +; trap any unusual responses, then set result=true to prevent +; printing the standard reply + result=false ; do standard reply + return +;--- +.specialEssentialInit +; DEFINE disabled as npc's which are temporarily inactive - +; i.e. npc's which are in a different part to the user. +; disable/re-enable npcs as appropriate - just +; swap over bit 6 of the "enemy" flag + return +;--- +; +.SPECIALNPCGOLDSINGING +; + if descriptionmode=ibrief then nogoldatall ; no singing if brief mode + random x1 +; if x1>96 then nospecialgold +; if actor=daisy then specialdaisysinging +;===== +; no goldsinging in shed + if room=15 then nogoldatall +;===== +;;.nospecialgold ; >> Pete 14/9/89 + if x1>230 then @npcgoldsinging ; no longer called from npc.txt +.nogoldatall + return +; +;===== +; special verbs for spook.1 +.write + if noun1<>timenoun then cantwriteorerase ; marked as "time" only + if room<>11 then @cantwriteorerase ; not near gravel + if noun2=nullobject then writeok ; simply "write time" + if noun2<>gravel then @silly ; wasn't "write time in gravel" +.writeok + x1=in + hicurrentpos(timeobject)=x1 + x1=gravel + currentpos(timeobject)=x1 ; put "time" in gravel + gosub @printactoractiondot + itword=timeobject ; "exam it" reveals timeOBJECT + return ; (i.e. NOT the omni-noun) +; +.cantwriteorerase +.cantpat + goto @wasteoftime +;--- +.erase + if noun1<>timeobject then cantwriteorerase ; marked as "message" & "time" + if room<>11 then @cantwriteorerase ; not near gravel + if noun2=nullobject then eraseok ; simply "erase time" + if noun2<>gravel then @silly ; wasn't "erase time from gravel" +.eraseok + currentpos(timeobject)=c0 ; destroy time object + gosub @printactoractiondot + m1=2650 + if edithfree=false then edithfreem1dot ; free edith + return +; +; used also by 3 other means of freeing edith... +.edithfreem1dot + gosub @printm1dot ; free at last! + edithfree=true + object=edith + x6=46 + gosub @newracetrackforobject ; "obedient racetrack" + gosub @makeobjectobedient + x1=edith + goto @AddScore25 +;--- +.pat + if object<>dog then cantpat ; not patting dog + gosub @printactoractiondot +.calmdog + m1=2682 + if dogcalmed=3 then @printm1dot ; 3rd time (repeat 2nd mess) + m1=2680 + add m1,dogcalmed ; 1st & 2nd time + add dogcalmed,c1 + goto @printm1dot +;===== +; diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/averb.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/averb.txt new file mode 100644 index 0000000..defdfc7 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/averb.txt @@ -0,0 +1,2322 @@ +; Lancelot 1 source, copyright (C) 1988 Level 9 Computing. +; +; AVERB.TXT, fairly standard code to handle ordinary verbs (there +; is no point in writing code to handle movement; get/drop; examine +; etc. etc. afresh for each game.) You will need to make some changes, +; adding new verbs and those special cases which can't go elsewhere, +; and possibly removing verbs, e.g the combat routines if your game +; is non-violent. +; +BEGIN +; +; Start of game, transferred here directly from APARSE. +; +.normalSTARTGAME +; clear entire table area... + x1=0 + c1=1 +.clearall +; some of the table cleared here is also cleared by initnpc + currentpos(x1)=c0 ; must be done else OBJECTTRIGGER fails for OBJECT=0 + add x1,c1 + if x1>mike 21/9/89 + x1=1 ; >> mike 21/9/89 + gosub @drawpicturex1 ; >> mike 21/9/89 + x1=10000 ; >> mike 21/9/89 +.AmigaDelay ; >> mike 21/9/89 + sub x1,c1 ; >> mike 21/9/89 + if x1>0 then AmigaDelay ; >> mike 21/9/89 + cend ; Amiga ; >> mike 21/9/89 + + + MESSAGE 2100 ; welcome to game +; +;; cif part1 ; >> Pete 13/9/89 + cif diskversion ; >> Pete 13/9/89 +; +; choose part 1,2 or 3 +.choosepart + NOMOREINPUT=FALSE + SUPRESSCHECKING=TRUE + GOSUB @GETNEXTWORD + IF EOL=TRUE THEN choosepart + SEARCHTYPE=numbtype + GOSUB @CHECKTYPE + parttochain=value + thispart=0 + if value=1 then playpart1 + if value=2 then @chainparttochain + if value=3 then @chainparttochain + MESSAGE 2101 ; 1, 2 or 3 + GOSUB @ABSCANCELINPUT + GOTO choosepart + + cend ; >> Pete 13/9/89 + +.playpart1 + cif VersionGD ; >>mike 21/9/89 + x1=1 ; >> mike 21/9/89 + gosub @drawpicturex1 ; >> mike 21/9/89 + cend ; Amiga ; >> mike 21/9/89 + + + message cr + message 2102 ; part 1 intro message +; +;; cend ; Pete 13/9/89 +; +; initialise some variables which retain their values throughout +; the game + thisgame=Scapeghost + thispart=constantpartnum + C1=1 + C2=2 + C3=3 + C4=4 + C10=10 +; +;===== +; A few game-specific vars... + shedlighton=true + playerstrength=1 ; able to carry two lightest objects at start +;===== +; + ITWORD=NULLOBJECT ; first object seen + ITNUMBER=NULLNUMBER + NOMOREINPUT=TRUE ; have come to end of input line +; CARRYCAPACITY=NORMALCAPACITY + GOSUB @INITOBJECTS +; gosub randomizetreasure + gosub @initnpcs + SOMETHINGPROCESSED=TRUE ; force printing of WHAT NEXT ? + NORMALDESCRIPTIONMODE=IVERBOSE + AutoExits=ivoff ; default to exits off + OOPSPOS=1 +; vandalptr=vandalbase +; + gosub @initlocations +; +; now set up variables as pointers to starts +; within segmented lists + value=list5(0) + gosub @valuetimes256 + x1=list5(1) + add value,x1 + startfloorpointers=value + + value=list5(2) + gosub @valuetimes256 + x1=list5(3) + add value,x1 + startracetracks=value + + value=list5(4) + gosub @valuetimes256 + x1=list5(5) + add value,x1 + startreversaltable=value + + value=list5(6) + gosub @valuetimes256 + x1=list5(7) + add value,x1 + StartPictureTable=value + +; set up initial racetrack commands for npcs +; which have them + actor=1 +.initracetrack1 +; now find pointer to initial racetrack for actor: + add actor,c1 + x1=actor ; number of racetrack to activate + gosub @initracetrackx1 + if actorVisitTableEnd then InitDone2 + add x1,c1 + add x2,c1 + goto InitDone1 + +.InitDone2 +; object=joe +; gosub @SetX4ToObjectAttributes +; x1=followOffset +; add x1,x4 +; npccurrent(x1)=c1 ; make joe follow me +; +;===== + object=alex + gosub @MakeObjectObedient +;===== +; +;===== +;; playtest bodges. complete the intro and start game at night. +; m1=5006 +; gosub @specialrtmessage +; m1=5016 +; gosub @specialrtmessage +; m1=5041 +; gosub @specialrtmessage +; x1=on +; hicurrentpos(fadedwreath)=x1 +; x1=branches +; currentpos(fadedwreath)=x1 +; currentpos(workman)=c0 +; currentpos(supervisor)=c0 +; shedlighton=false +; spotlighton=true +;; playerstrength=10 +;===== + + actor=user + gosub @setuproom +; + cif Includepictures + x1=1 + gosub @drawpicturex1 + cend ; Includepictures +; + message BlankLine + gosub @PrintRoom + gosub @FirstVisit + GOTO @CANCELINPUT +;--- +;--- +.unfasten +;;.unfastentake ; >> Pete 14/9/89 + verb=itake +;--- +.GET +.TAKE +; Check for prepositions e.g. GET ON, GET OFF + IF PREP<>0 THEN TAKEFROM +.TAKEIT +;;* +; if noun1<>latch then notturnlatch +; if latchopen=true then @closelatch +; goto @openlatch +;.notturnlatch +;;* + POS=ACTOR + HIPOS=CARRIED + GOTO @MOVEOBJECT +; +.TAKEFROM +; got a preposition e.g. TAKE noun FROM ; or TAKE noun IN etc. + OBJECT=NOUN1 + POS=NOUN2 + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS +; OBJECT=NOUN1 here + IF RESULT=FALSE THEN @ITSNOTTHERE + GOTO TAKEIT +;--- +.hide + goto @put +;--- +.SIT +;**STAND PREP NOUN2** +.STAND + x8=currentpos(actor) ; x8 & x9 used to test if flopsy in vehicle (below) + X9=HICURRENTPOS(ACTOR) + lastpossibleverb=0 ; prevent prep being parsed as a verb + x1=nextverb ;* + nextverb=0 + IF PREP=ON THEN @STANDON + IF PREP=OFF THEN STANDOFF + IF PREP=UP THEN STANDUP + if prep=behind then @standin + if prep=under then @standin + IF PREP=IPIN THEN @STANDIN + IF PREP=IPOUT THEN STANDOUT +; now fix a bug - no prep parsed for get in/out + if prep<>0 then @DontUnderstand + prep=on ;* + IF x1=ivON THEN @STANDON ;* + prep=off ;* + IF x1=ivOFF THEN STANDOFF ;* + prep=up ;* + IF x1=ivUP THEN STANDUP ;* + prep=ipin ;* + IF x1=ivIN THEN @STANDIN ;* + prep=ipout ;* + IF x1=ivOUT THEN STANDOUT ;* +; GET is being used, but we can't determine which prep is, since +; NPCs don't use NEXTVERB. +; * treat as get in + x1=hicurrentpos(actor) + prep=ipin + if x1=0 then standOn ; try getting into a container +; * treat as get out + prep=ipout +; GOTO @DONTUNDERSTAND +;--- +.STANDOFF +.STANDOUT ; get out (e.g. of boat) +.STANDUP +; + currentpos(actor)=ROOM + hicurrentpos(actor)=c0 + hidest=0 ;>>added for L1 + +.ReportStand + noun1=nullobject + noun2=nullobject +; print "L got out" etc. +; commandfinished=true ; otherwise, npc's give up (dunno why!) + executeProcessed=true + fatalerror=false + gosub @printActorVerb ;>> goto @done + m1=PrepOffset + add m1,Prep + if hidest=0 then @PrintM1Dot + gosub @printM1 + x1=dest ;>>changed for L1 + gosub @printTheObjectX1 + goto @printDot +; +;--- +;;.BOARD ; e.g. boat ; >> Pete 14/9/89 +.STANDON +.STANDIN + +;;.standin0 ; >> Pete 14/9/89 + cif AllowBoat +; cart + if noun2=nullobject then okstandin + if noun2<>cart then standin4 +.okstandin + prep=in + object=cart + gosub @checkifpresent + if result=true then standOk +.standin4 + cend +; +;===== +; get on seat + if noun2=nullobject then okstandin4 + if noun2<>seat then standin5 +.okstandin4 + prep=on + object=seat + gosub @checkifpresent + if result=true then standOk +.standin5 +; +;; stand on mound ; * removed, because mound is soon destroyed +; if noun2=nullobject then okstandin5 +; if noun2<>mound then standin9 +;.okstandin5 +; prep=on +; object=mound +; gosub @checkifpresent +; if result=true then standOk +;===== +; +;;.standin9 ; >> Pete 14/9/89 + GOTO @wasteoftime +;--- +.LIE +;===== +; kneel to calm dog + nextverb=0 + gosub @printactorverbdot + object=dog + gosub @checkifpresent + if result=false then lieret ; dog not here + if alreadyknelt=true then lieret ; only works once + alreadyknelt=true + goto @calmdog +.lieret + return +;===== +; GOTO @SILLY ;===== +;--- +.STANDOK + x1=currentpos(actor) ;* + if x1<>object then standok1 ;* + x1=hicurrentpos(actor) ;* + if x1<>0 then @silly ;* already there! +.standok1 + PROCESSED=TRUE + HIDEST=PREP + DEST=OBJECT + gosub @ReportStand + currentpos(actor)=dest ;* + hicurrentpos(actor)=hidest ;* + return ; GOTO @NEWLOCATION ;* +;--- +.ATTACK + executeProcessed=true +; if noun1=iroom then @vandal +;;.AttackNotDoor ; >> Pete 14/9/89 + target=noun1 + if noun1>maxnpc then atnpc ; assumes nullobject=255 +;; if noun2maxweapon then @silly +;; weapon=noun2 +;; goto @generalblow +;;; +;;.attackchoose +;; GOSUB @CHOOSEBESTWEAPON +;; GOTO @GENERALBLOW +;;; +.ATNPC +; if noun1statue then nothitstatue + gosub @printactoractiondot + m1=2762 + if nighttime=false then @printm1dot + currentpos(statue)=c0 ; destroy statue + hicurrentpos(alex)=c0 ; (just in case alex had a hipos +; before turning into a statue) + currentpos(alex)=room ; alex apears + object=alex + x6=44 + gosub @newracetrackforobject ; start racetrack + gosub @makeobjectobedient + x1=alex + gosub @AddScore25 + m1=2630 + goto @printm1dot ; turn into alex +.nothitstatue +;===== +;;.atnsceneryobject ; >> Pete 14/9/89 +.collect +.become +.WAKE +.WASTEOFTIME + IF ACTOR<>USER THEN @NPCNOTUNDERSTOOD + M1=3160 ; don't bother group + GOTO @VARYMESSAGEDOT + +.attackPrintM1Dot + goto @PrintM1Dot +;--- +.PUT + IF NOUN1=NULLOBJECT THEN @CANTSEEWHAT + IF NOUN2=NULLOBJECT THEN @CANTSEEWHERE + OBJECT=NOUN1 + + IF PREP=ON THEN PUTON + IF PREP=UNDER THEN PUTUNDER + IF PREP=IN THEN PUTIN + IF PREP=THROUGH THEN PUTIN + +.CANTPUTTHERE + gosub @actorcantverbnoun1 ; can't put that + m1=2124 ; there + goto AttackPrintM1dot +;--- +.PUTON +; CHECK IF DESTINATION CAN HAVE things put on top of it +; +;===== + if noun2=branches then putok + if noun2=mound then putok + if noun2=seat then putok + if noun2=bushes then putok + if noun2=bush then putok +; + if noun2fadedwreath then notputonwreath + if noun1=whitecard then putok + if noun1=yellowcard then putok +.notputonwreath +;===== +; + GOTO CANTPUTTHERE +;--- +.PUTOK + OBJECT=NOUN1 + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=true then MOVEOBJECTPrepNoun2 + m1=2127 + goto @errorm1dot ; pick it up first + +.PUTIN + cif AllowBoat + if noun2=cart then putok + cend +; +;===== + if noun2=vase then putok + if noun2=bushes then putok + if noun2=bush then putok +; + if noun2fadedwreath then notputinwreath + if noun1=whitecard then putok + if noun1=yellowcard then putok +.notputinwreath +;===== +; +;;.objectwontfit ; >> Pete 14/9/89 + GOTO CANTPUTTHERE + +.putunder +; + goto cantputthere +;--- +.ISOBJECTMOVEABLE +; return R ESULT=TRUE if OBJECT can be moved + if object>maxmoveable then @returnfalse + if object> Pete 14/9/89 + result=TRUE +;;.IOMRET ; >> Pete 14/9/89 +;;.cptret ; >> Pete 14/9/89 +;;.standret ; >> Pete 14/9/89 + RETURN +;--- +.MoveObjectPrepNoun2 + pos=Noun2 + hipos=Prep + +; Super routine for moving objects about. E.g, putting something inside +; a bag. Or removing it. It differs from "NEWLOCATION", which is concerned +; with walking-about-type-movement, primarily in the way that the action +; is reported. MOVEOBJECT validates the movement before carrying it out. +.MOVEOBJECT +; Move 'OBJECT' to 'POS', 'HIPOS' +; Return RESULT=TRUE if move was successful +;; if object<>user then notmoveuser +;; if hipos<>carried then notcarryuser +;; if pos=rook then moveobj1 ; rook carries user +;;.notcarryuser +;; if hipos<>0 then notdropuser +;; x1=currentpos(user) +;; if x1=rook then moveobj1 ; rook drops user +;;.notdropuser +;;.notmoveuser + GOSUB ISOBJECTMOVEABLE + IF RESULT=FALSE THEN @IMMOVABLE +; is the contents already contained by the container (or V-V) ? + GOSUB @CHECKIFCONTAINED +; + IF HIPOS=0 THEN MONOTACTOR +; ACTOR to gain this object, check if is able to carry it +; actually this code is now used whenever an object +; goes to a position not on the ground. This +; is to catch people trying to avoid SPECIALTAKES + IF HIPOS<>WORN THEN MOVEOBJ1 +; is it wearable ? + IF OBJECTmaxclothes then @cantwear + +.MOVEOBJ1 +; Now check if the ACTOR is standing on it or some similar problem + OBJECTSAVE=OBJECT + DEST=POS ; save value + HIDEST=HIPOS ; save it +; + POS=OBJECT + HIPOS=NONSPECIFIC + OBJECT=ACTOR + GOSUB @CHECKOBJECTPOS +; + OBJECT=OBJECTSAVE + POS=DEST ; restore value + HIPOS=HIDEST ; restore value + IF RESULT=TRUE THEN @MOVEOBJFAIL + GOSUB @SPECIALTAKES ; game-specific take messages + IF RESULT=FALSE THEN @MOVEOBJRET +; +.MONOTACTOR + X1=CURRENTPOS(OBJECT) + IF X1<>ACTOR THEN MMNOTLOSE + X1=HICURRENTPOS(OBJECT) + IF X1=0 THEN MMNOTLOSE +; ACTOR is to lose object + IF X1<>WORN THEN MMLOSENOTWORN +; ACTOR is wearing object, if it was specified using EVERYTHING, +; then don't drop it as this could cause embarrasment + IF noun1isgd=FALSE THEN MMLOSENOTWORN + if verb=iremove then mmlosenotworn + RESULT=FALSE + if actor<>user then @npcnotunderstood + M1=2134 ; you're wearing + gosub @printM1 + gosub @printTHEobject + goto @printDOT + +.MMLOSENOTWORN + GOSUB @SPECIALDROPS + IF RESULT=FALSE THEN MOVEOBJRET + +.MMNOTLOSE + IF HIPOS=0 THEN MMNL1 + IF POS=OBJECT THEN @CANTPUTTHERE +.MMNL1 +; any other special cases ? +; +; is it going to a NPC ? + if actor=pos then montonpc ; ok for people to take things + IF HIPOS=0 THEN MONTONPC + IF POSMAXNPC THEN MONTONPC +; code here is to avoid NPCs having things put on them etc. +; or the statue / bloodworm / bat being given things +; no special cases for giving to NPC, so make it carry it + IF HIPOS=WORN THEN MONTONPC ; unless it is going to wear it + HIPOS=CARRIED + +.MONTONPC + + FROM=CURRENTPOS(OBJECT) + HIFROM=HICURRENTPOS(OBJECT) + CURRENTPOS(OBJECT)=POS + HICURRENTPOS(OBJECT)=HIPOS +; +; now decribe the move +; +; show ACTOR doing something +; verb is set up + if verb=ithrow then monodesc + objectsave=object + gosub @printACTORactiondot + object=objectsave + +.monodesc + gosub @specialaftermoveobj + goto @returnTRUE ; move went just fine! + +.MOVEOBJFAIL + M1=2131 ; you're on it + gosub @errorm1 + +.MOPREVENT + RESULT=FALSE +.moveobjret + RETURN +;--- +.POSITIONSHADOWS +; Make objects follow the ACTOR around where applicable. e.g. DOORS. +; and other objects which are in several places at once. +;===== +; 'company' represents player's friends, which start with Joe as soon +; as dusk arrives... + if nighttime=false then nocompany + currentpos(company)=room +.nocompany +; graves & headstones are present in cemetary grid locations + if currentuserroom=11 then yesgraves ; edith's grave bolted onto grid + if currentuserroommaxsynthroom then nograves +.yesgraves + currentpos(headstone)=currentuserroom + currentpos(grave)=currentuserroom +.nograves +;===== + RETURN +;--- +.FASTEN +; +;===== +; fasten bell to bush + if noun1<>bell then notfastenbell + if noun2<>bush then notfastenbell + pos=bush + hipos=on + goto @moveobject +.notfastenbell +;===== +; + goto @wasteoftime +;--- +;.untiefirst +; m1=2158 ; must untie it first +; goto @printM1dot +;--- +; Move something/someone to a new location in the game, reporting the +; movement with messages such as 'X enters from the north'. +.NEWLOCATION +; Given FROM=old location, HI,DEST=new location +; and DIR=direction, +; print any messages which appear on moving through doors etc. +; GOSUB SETUPROOM + FROM=ROOM + GOSUB @SPECIALMOVES + blockedbysm=TRUE + IF RESULT=FALSE THEN @NLRET + if actor<>user then NewMoveNotUser +; +; Don't save OOPS for echo locations... + if hidest<>0 then NewMoveSaveOops + if dest>mike 28/3/88 + if dest=0 then @nlret ;>>mike 8/1/88 + FROM=ROOM +; describe door closing (if there is one) + + cif AllowBoat + if dest=cart then anl2a + cend + + IF HIDEST<>0 THEN ANL2 ; skip checks for moving into container + GOSUB @CHECKEXIT + +.anl2a + gosub @printleaving +; +.ANL2 + LASTROOM=ROOM + CURRENTPOS(ACTOR)=DEST + HICURRENTPOS(ACTOR)=HIDEST + gosub @closedoor +;===== +; special case for shed door + if room=15 then specialsheddoor + if room<>42 then notsheddoor +.specialsheddoor + dooropen=sheddooropen ; sheddooropen overrides +.notsheddoor +;===== + roomsave=ROOM + gosub @setuproom + gosub @printarrival +; no messages printed between printarrival and printroom please +;;.NLEND ; >> Pete 14/9/89 + + cif AllowBoat + + x1=hicurrentpos(user) ;>>special to Lancelot3/boat + if x1=0 then NLEND1 + + x1=currentpos(cart) + if x1<>actor then NLNotPushingCart + x1=currentpos(user) + if x1=cart then NLPrintMoveAnyway +.NLNotPushingCart + goto NLEnd1 + +.NLPrintMoveAnyway + actorsave=actor ;>>special to Lancelot3/boat + actor=user ;>>special to Lancelot3/boat + gosub @SetUpRoom ;>>special to Lancelot3/boat + gosub @printRoom ;>>special to Lancelot3/boat + actor=actorsave ;>>special to Lancelot3/boat + goto @aftermove ;>>special to Lancelot3/boat + +.NLEND1 + + cend ; end of boat stuff + + + IF ACTOR<>user THEN @AFTERMOVE ; npc doesn't want description +;;.NLENDPrint ; >> Pete 14/9/89 + timeinroom=0 + GOSUB @printROOM + gosub firstvisit + goto @aftermove + +; for user only, print any messages due on first visit +.firstvisit +; + x1=VisitTableStart + add x1,Room + if x1>VisitTableEnd then fvret + x2=List7(x1) + list7(x1)=c0 ; prevent printing it again + x1=1350 ; base for initial visit + add x1,x2 + gosub SpecialVisitMessage + message x1 +.fvret + return +;--- +.SpecialVisitMessage +; about to print message x1 +; zero x1 if you don't want to! + if x2=0 then nosvm ; no message printed + lastwordprinted=0 ; if message printed, then clear lastwordprinted +.nosvm + return +;--- +.printLEAVING + if verb>15 then @NLRet + verbsave=verb +; + cif AllowBoat +; +; moving in the cart + x1=hicurrentpos(actor) + if x1=0 then plnotinvehicle ; actor not in vehicle + x1=currentpos(actor) + if x1<>cart then plnotincart ; actor not in cart +;===== +; only humans can drive cart. special to spook.1 + if actor + m1=2470 ; got out of cart + gosub @printm1 + wanttoprintand=actor + goto plnotinvehicle ; and went +.PLNotInCart +; +.plnotinvehicle + cend +; + if descriptionmode=inone then nlret +; + verb=2480 ; "trotted" group message + if actor>maxtalkingnpc then dl1 + verb=2490 ; "went" group message +;===== + if actor>maxghost then dl1 + verb=2500 ; "floated" group message +;===== +; +.dl1 +; new line when user moves + if actor<>user then notuserleaving + if wanttoprintand<>false then notuserleaving ; prevent splitting sentance +; for "got out of cart AND went..." + message blankline +.notuserleaving + gosub @printACTOR ; the npc + m1=verb + gosub @varymessage ; "went" +.printdirectionanddoor + m1=verboffset ; north-1 + add m1,dir + gosub @printM1 ; direction + gosub @printdoor +; + verb=verbsave ; Bug fix. Graham 17/5/88 + if actor<>user then @printDOT ; print a dot and terminate + wanttoprintand=user ; followed immediately by description +.desclret +.nlret + return +;--- +.printdoor + IF DOOR=FALSE THEN DESCLret + M1=2115 ; through the door + goto @printM1 +;--- +.printARRIVAL +; first print description of object + if descriptionmode=inone then desclret + + IF actor=user then DESCLRET ; for startup + if verb>15 then DESCLRet + +;===== +; if >4 npcs following user, then don't print a message except +; for the first follower that arrives in currentuserroom. + if npcsfollowing<4 then notnpcfollowing ; less than 4 followers + if companyfollowing=true then @nlret ; message already printed + if room<>currentuserroom then notnpcfollowing ; not reached user + gosub @setactorattributes + x1=followoffset + add x1,actorattributes + x2=npccurrent(x1) + if x2<>user then notnpcfollowing ; not following user + m1=2509 + gosub @printm1 ; the company arrived + companyfollowing=true ; don't repeat message + goto pa3 +.notnpcfollowing +;===== + + cif AllowBoat + verb=2422 ; 2472-50 - drove the cart from the + x1=hicurrentpos(actor) + if x1=0 then PANotInBoat + x1=currentpos(actor) + if x1=cart then pa2 +.PANotInBoat + cend + + VERB=IENTER + +.pa2 + object=actor + gosub @printANobjectVERB ; the npc enters... +.pa3 + m1=584 + add m1,dir + gosub @printM1 + gosub @printdoor + goto @printdot +;--- +.TICKCLOCK +; add on time a minute at a time +; +; add minute,c1 +; if minute<60 then tcaddminutes +; minute=0 +; add hour,c1 +; if hour<13 then tcaddminutes +; hour=1 +; +;;.TCADDMINUTES ; >> Pete 14/9/89 + GOSUB @TIMEDEPENDENTCODE + add timeinroom,c1 +; +;===== +; Now do a few things at the beginning of this turn... +; +; clear number of people pushing sundial at start of each turn. +; this is incremented successively by each person who pushes in +; this turn. + pushingsundial=0 +;--- +; clear number of people pushing thermometer at start of each turn. +; this is incremented successively by each person who pushes in +; this turn. + pushingthermometer=0 +;--- +; clear number of people pushing button at start of each turn. +; this is incremented successively by each person who pushes in +; this turn. + pushingbutton=0 +;--- +; clear flags for pushing levers & barrel this turn + pushlever1=false + pushlever2=false + pushlever3=false + actorturningbarrel=0 +;--- +; clear stored command for dog copying player + dogverb=0 ; command not processed if verb=0 +;===== +; +;;.TCRET ; >> Pete 14/9/89 +;;.waitret ; >> Pete 14/9/89 +;;.OPENDOORRET ; >> Pete 14/9/89 +.SAYRET +;;.OPENRET ; >> Pete 14/9/89 +.throwret +;;.abnret ; >> Pete 14/9/89 +;;.pushret ; >> Pete 14/9/89 +;;.ANLRET ; >> Pete 14/9/89 +;;.dlret ; >> Pete 14/9/89 + RETURN +;--- +.pull +; +;===== +; pull rope handle + if object<>rope then notpullrope + gosub @storedogcommand ; dog helps to pull if here + m1=2672 + if actor<>dog then @actorm1dot ; only dog can pull handle + gosub @printactoraction ; pulled handle - + m1=2673 + if sheddooropen=true then @printm1dot ; - but the door was open + m1=2674 + if shedunlocked=false then @printm1dot ; - but the door was locked + m1=2678 ; - . A bell rang - + gosub @doopensheddoor + currentpos(dog)=c0 + currentpos(bag)=c0 + m1=2675 + gosub @printm1dot ; - and the door opened. + m1=2677 + if ednagotwreath=false then @printm1dot ; can't solve wreath puzzle + return +.notpullrope +;===== +; +.PUSH +; +;===== +; Switch light on/off in shed +; +; NB: It only takes one ghost to do this, because it would be impossible +; to order another ghost to help switch the light off, since he would +; refuse and just complain about the light. +; + if object<>switch then @notpushswitch + gosub @printactoractiondot + x1=1 + if shedlighton=0 then switchlighton ; toggle light on/off + x1=0 +.switchlighton + shedlighton=x1 +; see light come on/go off if inside/outside shed + if currentuserroom=15 then seelight + if currentuserroom<>42 then nolightmess +.seelight + m1=2550 + add m1,shedlighton + gosub @printm1go ; light on/off (forced mess) +; +.nolightmess + if shedlighton=false then pushswitchret ; light went off +; light comes on. all ghosts in shed are startled and sent back to their +; graves. + object=user +.isobjectstartled + gosub @getobjectposx2 + if x2<>15 then nextios ; not in shed + gosub @startled ; in shed, so send back to grave +.nextios + add object,c1 + if objectalex then alexnotstartled + x1=53 + currentpos(alex)=x1 +.alexnotstartled + gosub @getobjectposx2 + room=x2 ; set room to new pos of ghost + if object<>user then usernotstartled +; +; user is startled by light + currentuserroom=room +; + cif Includepictures + x1=15 + gosub @drawpicturex1 ; light picture + cend ; Includepictures +; + m1=2552 + goto @printm1dot ; found myself by grave +; +; a ghost other than user is startled +.usernotstartled + m1=blankline + gosub @printm1 + gosub @printtheobject + m1=2559 + if object=violet then @printm1dot ; violet can't see light! + m1=2558 ; message if user in room + goto @printm1dot ; actor is sent to +;--- +; scare vandals when shed light/spotlight switched on +.scarevandals + x1=currentpos(vandals) + if x1=0 then scarevandalsret ; not in cemetary + currentpos(vandals)=c0 + object=colonel + gosub @makeobjectobedient + x6=48 + gosub @newracetrackforobject ; colonel recruited + x1=colonel + x2=25 + gosub @AddScorex2 ; score colonel recruited + m1=2710 + goto @printm1go +.scarevandalsret + return +;--- +.notpushswitch +;--- +; switch spotlight on/off + if object<>button then notpushbutton + if pushingbutton<2 then notswitchedyet +; ignore 3rd person pushing, so that spotlight is not switched on +; and off in same turn. + return +; +.notswitchedyet + gosub @printactoractiondot + if actor>maxghost then buttonpressed ; humans can press button easily + add pushingbutton,c1 ; number of ghosts pushing + m1=2567 + if pushingbutton=1 then @printm1dot ; not enough pressure yet +.buttonpressed + x1=1 + if spotlighton=0 then switchsplighton ; toggle spotlight on/off + x1=0 +.switchsplighton + spotlighton=x1 +; +; see spotlight come on/go off if south of cemetary + m1=2560 + if currentuserroom<11 then seespotlight +; see spotlight come on/go off if inside shed + if currentuserroom<>15 then nospotlightmess + m1=2565 +.seespotlight + message blankline + add m1,spotlighton + gosub @printm1go ; spotlight on/off (forced mess) +; +.nospotlightmess + if spotlighton=true then startledbysl ; startled by light coming on? + x1=22 + x2=25 ; score for spotlight off + gosub @addscorex2 + if vandaljoke=true then pushbuttonret ; vandals already told joke + x1=currentpos(vandals) + if x1=0 then pushbuttonret ; vandals not here + vandaljoke=true + m1=2568 + goto @printm1go ; vandals joke about dead bulb +; +; spotlight comes on. all ghosts in south locations are startled and +; sent back to their graves. +.startledbysl + object=user +.isobjectstartled1 + gosub @getobjectposx2 + if x2>10 then nextios1 ; not south of cemetary + if x2=0 then nextios1 ; not in game + gosub @startled ; startled, send back to grave +.nextios1 + add object,c1 + if objectsundial then notpushsundial + if pushingsundial<2 then notfallenyet +; sundial has already been destroyed, so ignore any further npcs +; pushing it this turn. (sundial is made accessible in this case, +; to prevent "npc couldn't see the sundial") + return +; +.notfallenyet + gosub @storedogcommand ; dog helps to push if here + gosub @printactoraction + add pushingsundial,c1 + m1=2640 + if pushingsundial=1 then @printm1dot +; number pushing sundial is greater than 1... + currentpos(sundial)=c0 ; destroy sundial + currentpos(brokensundial)=room + currentpos(gnomon)=room ; gnomon is created + m1=2641 + goto @printm1dot +.notpushsundial +;--- +; push urn to impress david + if object<>urn then notpushurn + m1=2660 + if actor<>user then @actorm1dot ; do it yourself + m1=2661 + if playerstrengthlock then notpushbarrel +.openlock + object=barrel +.turnbarrel +; a flag is set for the NPC turning the barrel, so that the +; action is not reported until the end of this turn. +; this is to allow the barrel to be turned before the levers +; are pushed, provided we are still in the same turn. +; see .timedependant for the end-of-turn conclusion to whether +; or not the door is unlocked. + actorturningbarrel=actor + return +.notpushbarrel +;--- +; now set flags for each lever being pushed... +; push lever 1 + if object<>lever1 then notpushlever1 + pushlever1=true + m1=2667 + goto @actorm1dot +.notpushlever1 +;--- +; push lever 2 + if object<>lever2 then notpushlever2 + pushlever2=true + m1=2668 + goto @actorm1dot +.notpushlever2 +;--- +; push lever 3 + if object<>lever3 then notpushlever3 + pushlever3=true + m1=2669 + goto @actorm1dot +.notpushlever3 +;--- +; push thermometer requires all 9 ghosts to knock wall over + if object=wall then okpushthermometer + if object=wallAboveVault then okpushthermometer + if object<>thermometer then notpushthermometer +.okpushthermometer + gosub @printactoractiondot + gosub @forcesdc ; also used for all ghosts +; in this case + m1=2740 ; base of increasing tempest + add m1,pushingthermometer + gosub @printm1dot + m1=cr + gosub @printm1 + add pushingthermometer,c1 ; increase the tempest + if pushingthermometer>8 then @win ; wall collapses + return +.notpushthermometer +;===== +; + goto @immovable +; +;===== +; call this routine if dog is to copy the current command +; (this will usually be a failed user action) +.storedogcommand + if dogfriendly=false then sdcret ; dog not friendly yet +.forcesdc + if actor<>user then sdcret ; only copy user commands + dogverb=verb + dogprep=prep + dognoun1=noun1 + dognoun2=noun2 +.sdcret + return +;===== +; +;--- +.OPEN + if noun1<>generalDoor then OpenNotDoor +;===== + if room=15 then opensheddoor ; open door from inside shed +;===== + IF DOOROPEN=TRUE THEN @ALREADYOPEN +;;.OpenDoor ; >> Pete 14/9/89 +;;.OpenDoorOk ; >> Pete 14/9/89 + DOOROPEN=TRUE + goto @printACTORactiondot + +.OpenNotDoor +; +;===== +; Open lock is treated as turn lock + if object<>lock then notopenlock + verb=ipush + goto @openlock +.notopenlock +;--- +; open shed door. special case for humans + if noun1<>sheddoor then notopensheddoor +.opensheddoor + if sheddooropen=true then alreadyopen +; +; Dog and Ghosts PULL ROPE to open DOOR. + if actor=dog then trypullrope + if actor>maxghost then okopendoor +.trypullrope + verb=ipull + noun1=rope + object=rope + goto @pull +; +.okopendoor + gosub @printactoractiondot + m1=2679 ; A bell rang. + goto @doopensheddoor +.notopensheddoor +;===== +; +; if noun1=oward then alreadyopen +; if noun1<>cward then notopenward +; currentpos(cward)=c0 +; currentpos(oward)=room +; itword=oward +; goto @printactoractiondot +;.notopenward +; +.DONTNEEDTODOTHAT + m1=2148 ; you don't need to do that + goto @errorM1dot +;--- +.ALREADYOPEN + M1=2117 ; already open + GOTO @errorM1dot +;--- +.GIVE + HIPOS=CARRIED + IF NOUN2=USER THEN GIVENPC + IF NOUN2NULLOBJECT THEN NOBODYWANTSIT +; GOSUB @ANYBODYHERE +; IF OBJECT=NULLOBJECT THEN NOBODYWANTSIT +; NOUN2=OBJECT +; GOTO GIVENPC +;--- +.NOBODYWANTSIT + M1=2172 ; nobody wants it + GOTO @ERRORM1dot +;--- +.GIVENPC +; giving NOUN1 to NPC NOUN2 + IF NOUN2=NULLOBJECT THEN NOBODYWANTSIT + OBJECT=NOUN1 + pos=noun2 + GOSUB @MOVEOBJECT + if result=true then @specialaftergive ;*graham* bug fix + return ;*graham* bug fix +;--- +.THROW + if noun2=nullobject then @drop + if noun2> Pete 14/9/89 + verb=ihit + gosub @printOBJECTverb ; prints 'the object hits' + object=noun2 + gosub @printTHEobject2 ; print out him etc. + goto @printdot +;--- +.CHECKIFLIGHT +; Return RESULT=TRUE if room is illuminated +; (either naturally or by objects etc.) + goto @ReturnTrue + +;--- +.BRIEF +.VERBOSE + NORMALDESCRIPTIONMODE=VERB + GOTO @DONE +;--- +.immovable + if actor<>user then @actorcantverbnoun1dot + gosub @printTheObject + m1=3150 ; won't move + goto @varyERRORM1dot +; +.cut +;;.squeeze ; >> Pete 14/9/89 +;;.badobject ; >> Pete 14/9/89 +.cantwear + goto @actorcantverbnoun1dot +;--- +.initlocations +; go through and place the special locations in +; appropriate pseudo-random locations.. +.drret + return +;----------------------------- +.shortdesc ; print the short description for ROOM +;; prs " [Shortdesc] " ; >> Debug +; if room> Pete 14/9/89 + cif Includepictures + picturetodraw=room + cend ; Includepictures +; + x1=shortroomdescs + add x1,room + message x1 + return +;--- +.printROOM + cif Includepictures + picturetodraw=0 + cend ; Includepictures +; + LASTWORDPRINTED=0 ; prevent printing of 'it' + GOSUB @POSITIONSHADOWS + if room=DestToDescribeExitsIn then dr1 + if descriptionmode=inone then drret +; +.dr1 + if actor<>user then drret ; never any description for npcs + GOSUB @CHECKIFLIGHT + IF RESULT=TRUE THEN DESCROOM1 + if wanttoprintand=FALSE then dr2 + wanttoprintand=FALSE + message dot ; not linked to previous message +; +.dr2 + MESSAGE 2021 ; It's dark +; + cif Includepictures + LASTPICTURE=0 + cend ; Includepictures +; + CLS G ; clear graphics window +;;.DescRoomRet ; >> Pete 14/9/89 + RETURN +;--- +.DESCROOM1 + GOSUB @SPECIALactor ; print 'You are..' + GOSUB @SETUPROOM +; +;;.ABSDESCROOM ; >> Pete 14/9/89 + gosub shortdesc +; + if roomIBRIEF THEN DESCROOM3A + if room=DestToDescribeExitsIn then descroom3a ; full desc of destinat + message dot + if AutoExits=ivoff then briefexits + GOSUB @PRINTEXITS +.briefexits + if normalDescriptionMode<>ibrief then descroom3e + cif Includepictures + gosub showpicture ; >> Pete. Start selected picture drawing. + cend ; Includepictures + GOTO DESCROOM3C +; +.DESCROOM3A + X1=LONGROOMDESCS + ADD X1,ROOM + MESSAGE X1 + cif Includepictures + gosub showpicture ; start selected picture drawing. + cend ; Includepictures + MESSAGE DOT ; >> Pete. Moved from after Descroom3. + +;;.DESCROOM3 ; >> Pete 14/9/89 + gosub @specialdescbeforeexits +; if OnRiver=True then descroom3c + if AutoExits=ivoff then descroom3c + GOSUB @PRINTEXITS +; +.DESCROOM3C +.descroom3e + SEARCHPOS=ROOM + HISEARCHPOS=0 + GOSUB @PRINTOBJECTS +;>>mike 8/2/88 GOSUB @DESCactor + GOTO @SPECIALDESC +;--- +.showpicture +;; prs " [showpicture] " ; >> Debug +; displaypicture for room PICTURETODRAW +; + cif Includepictures + x3=startpicturetable +.scanforpicture + x2=list5(x3) ; get room + add x3,c1 + x1=list5(x3) ; get pic + add x3,c1 + if x2=room then sdrawpicturex1 + if x2<>0 then scanforpicture + return +; +; Special exceptions for drawing picture X1 in ROOM +.sdrawpicturex1 +; +;===== +; my grave when mourners gone + if room<>44 then spnotmourners + object=mourners + gosub @checkifpresent + x1=11 + if result=true then spnotmourners ; mourners here + x1=1 ; not here (show headstone) +.spnotmourners +;--- +; joe danby at his grave + if room<>49 then spnotjoe + object=joe + gosub @checkifpresent + x1=28 + if result=true then spnotjoe ; joe here + x1=13 ; not here (show graveyard) +.spnotjoe +;--- +; willmots at their grave + if room<>59 then spnotwillmot + object=bert + gosub @checkifpresent + x1=13 ; bert not here (show graveyard) + if result=false then spnotwillmot + object=edna + gosub @checkifpresent + x1=13 ; edna not here (show graveyard) + if result=false then spnotwillmot + x1=27 ; both are here +.spnotwillmot +;===== +; + goto @DrawPictureX1 + cend ; Includepictures +; + return +;--- +.CHECKEXIT + ceroomsave=room + room=from + GOSUB ABSCHECKEXIT + room=ceroomsave + GOTO @SPECIALEXITS ; Exits conditional on game +;--- +.ABSCHECKEXIT +; EXIT ( From FROM diection DIR ) +; return DEST, DOOR, EXITVISIBLE + door=FALSE + dest=0 + exitvisible=FALSE + if room2 then checkexitstatus ; do rest of fixed exit code ;>>L1 was 1 +;>> - allow multiple size grids. +; room 1 gives modifiers for synth rooms. +;>>L2 - also room 2 +; +.acesynthesised +; ++++ please note: must have done gosub getXY BEFORE calling + if dir=8 then acenorth + if dir>2 then acenotnorth +.acenorth + if y=ymax then acenoexit +.acenotnorth + if dir=2 then aceeast + if dir=3 then aceeast + if dir<>5 then acenoteast +.aceeast + if x=xmax then acenoexit +.acenoteast + if dir=6 then acesouth + if dir=5 then acesouth + if dir<>4 then acenotsouth +.acesouth + if y=0 then acenoexit +.acenotsouth + if dir<6 then acenotwest + if dir>8 then acenotwest + if x=0 then acenoexit +.acenotwest +; look at the exit from room 1 to get the destination modifier + x1=2 ; >>special to L1 - use exits from room 2 instead of the usual 1 + exit x1 dir status dest + if dest=0 then acenoexit + add dest,from + x1=dest + x2=256 + gosub @x1modx2 + dest=x1 + exitvisible=TRUE + return +; +.acenoexit + dest=0 + return +; +.fixedexit ; See if there any fixed exits from here. + DOOR=FALSE + EXITVISIBLE=FALSE + EXIT ROOM DIR STATUS DEST + if dest=2 then ceret ; room 1 is used to give ;>>L1 - 2 instead of 1 +; move modifiers for synthesised rooms. + IF DEST=0 THEN CERET + if dest1 THEN CERET + EXITVISIBLE=TRUE +.CERET + RETURN +;--- +.close + if noun1<>generaldoor then closenotdoor +;===== + if room=15 then closesheddoor ; close door from inside shed +;===== + dooropen=FALSE + goto @printACTORactiondot +;--- +.closenotdoor +; +;===== +; close shed door. special case for humans + if noun1<>sheddoor then notclosesheddoor +.closesheddoor + if actoroward then notcloseward +; currentpos(oward)=c0 +; currentpos(cward)=room +; itword=cward +; goto @printactoractiondot +;.notcloseward +; + goto @dontneedtodothat +;--- +.closedoor +; subroutine called whenever door is to be closed +; (e.g. moving though it) + if actor<>user then closedoorret + dooropen=FALSE +; +.closedoorret + return +;--- +.parserun +; verb=isetuprun here + againverb=isetuprun + goto parsego1 +; +.parsego + againverb=isetupgo +; verb=isetupgo here +.parsego1 +; return noun1 as room number of destination + noun1=nullobject +;>>removed by L2 treetype=0 +;>>removed by L2 terraintype=0 +;;.gad1 ; >> Pete 14/9/89 + adjective1=nullobject + adjective2=nullobject + treatasfind=FALSE + gosub getpart + if gperror=TRUE then baddestination + if treatasfind=TRUE then parsefindvalue + if verb=0 then gadnotmove + if verbnullobject then gadend ; exit tidily for 'go interesting place' + goto baddestination +; +.gadend +; clean up rest of input - may be useful, intelligent stuff, +; or it may be complete garbage +; Loop until we get a verb + if nomoreinput=TRUE then gadret + gosub @getnextword + searchtype=verbtype + gosub @checktype + if value=nullvalue then gadend + gosub @goback ; retrieve verb for later parsing +.gadret + againnoun1=noun1 + noun2=nullobject + return +;--- +.parsefindvalue +; user entered 'go moveable object' +; treat as find + if verb<>isetuprun then pfv1 + descriptionmode=inone +; +.pfv1 + verb=isetupfind + noun1=value + noun2=nullobject + prep=0 + return +;--- +.baddestination ; a parser error + gosub @stop + noun1=nullobject + verb=0 + goto @cantseewhere +;--- +.getparterror + gperror=TRUE + return +;--- +.getpart +; return noun1 as destination room, +; or verb=direction to move in +; or treetype/terraintype + gperror=FALSE + gosub @getnextword + if eol=TRUE then getparterror +; just possibly, could be a direction + searchtype=verbtype + gosub @checktype + if value=nullvalue then getpart1 + if value=ivto then getpart ; go to ... + if value>maxdirection then getpart1 ; strange verb + verb=value + return +; +.getpart1 + searchtype=adjetype + gosub @checktype + if value=nullvalue then getpart2 + adjective1=value + gosub @checktypemore + if value=nullvalue then getpart2 + adjective2=value +; +.getpart2 + index=0 +.goloop + searchtype=nountype + gosub @checktypemore + + if value=nullvalue then getpart ; ignore garbage words here. + if value>mingarbage then getpart + if adjective1=nullobject then goloopnoadjective + if value=adjective1 then goloopnoadjective ; could be right dest + if adjective2=nullobject then goloopnoadjective + if value>adjective2 then goloopnoadjective + if value<>adjective2 then goloop ; can't be right destination +; +.goloopnoadjective + if value>maxsceneryobj then goloopnotlocationobject +; +.golooptreatasfind +; does object exist in game? + + gosub @HandlePairedObjects ;*graham 21.2.89* + + x1=currentpos(value) + if x1=0 then goloop + treatasfind=TRUE + return +; +.goloopnotlocationobject +; maybe 'go static location' +; if so, extract room number + if value<500 then goloop ; shortroomdescs-nounoffset + x1=500 ; shortroomdescs-nounoffset + noun1=value + if value<800 then goloopshortdescs ; longroomdescs-nounoffset + x1=800 ; longroomdescs-nounoffset +.goloopshortdescs + sub noun1,x1 + return +;--- +.gdgoxy + if ynoun2 then gdgosouth +; y=y1; so just go east or west + if x=noun1 then @followfinished ; have arrived at destination, terminate command + dir=3 ; east + if x>mike 8/2/88 gdroomsave=room + gdCurrentSave=currentpos(actor) ;>>mike 8/2/88 + gdHiSave=hicurrentpos(actor) ;>>mike 8/2/88 +.gdtrydir + from=room + dir=intendeddirection + gosub adddir +; + gosub @checkexit + if exitvisible=FALSE then tryanotherdirection + if dest>mike 8/2/88 +; >>8/2/88 followjustfinished ; something badly wrong. +;>>mike 8/2/88 if room=gdroomsave then tryanotherdirection ; something went wrong +; x1=currentpos(actor) ;>>mike 8/2/88 +; if x1<>gdCurrentSave then gdt1 +; x1=hicurrentpos(actor) ;>>mike 8/2/88 +; if x1=gdHiSave then tryanotherDirection + +;;.gdt1 ; >> Pete 14/9/89 + if room=destnoun1 then @followjustfinished + return ; all went well. +;--- +.tryanotherdirection +; have reached an obstruction in a goaldirected movement + if anglefromintended>negative then tad2 ; am wheeling to left + if anglefromintended<>0 then tad1 ; am wheeling to right + anglefromintended=1 + goto gdtrydir +;--- +.tad1 +; was not going in intended direction when the obstruction +; was reached +; try wheeling round to right (clockwise) + if anglefromintended=2 then tad2a + add anglefromintended,c1 ; try +1, +2 + goto gdtrydir +;--- +.tad2a + anglefromintended=0 +.tad2 +; try wheeling round to left + if anglefromintended=65534 then @cantgothere ; can't cope at present + sub anglefromintended,c1 ; try -1,-2 + goto gdtrydir +;--- +;>>mike 28/3/88 .cantgothere +;>>mike 28/3/88 if actor<>user then @NpcNotUnderstood +;>>mike 28/3/88 m1=3605 ; can't go there from here ;>>mike 28/3/88 +;>>mike 28/3/88 gosub @printM1dot +;>>mike 28/3/88 goto @followfinished +;--- +.adddir +; do add dir,anglefromintended +; this is complicated because south,southeast are swapped round +; Also must wrap round at north, northwest +; +; first, swap south,southeast + gosub swapdir + add dir,anglefromintended + gosub makedirwithinbounds +; fall through to swapdir ; and swap back again +; +.swapdir +; swap round south, southeast + if dir<>4 then swapdirnotsouth + dir=5 + return +;--- +.swapdirnotsouth + if dir<>5 then swapdirret + dir=4 + +.swapdirret + return +;--- +.makedirwithinbounds + if dir<9 then mdwb1 + dir=1 + return +;--- +.mdwb1 + if dir>0 then mdwb2 + dir=8 +.mdwb2 +;;.diwtret ; >> Pete 14/9/89 +;;.mmdret ; >> Pete 14/9/89 +;;.teleportret ; >> Pete 14/9/89 +;;.ringret ; >> Pete 14/9/89 + return +;--- +.teleport + cif allowCheat +; we came here straight from the parser, so set up verb... + if cheatmode=0 then @nicetry + verb=iteleport +.allowteleport + gosub @parsego + if noun1=nullobject then teleportret + if verb<>isetupfind then teleporttonoun1 + object=noun1 + gosub @getobjectposx2 + noun1=x2 +; +.teleporttonoun1 + dest=noun1 +; +.magicmove + hidest=0 +; +.magicmovedest + if dest=0 then mmnomove + if dest<2 then @cantseewhere + currentpos(actor)=dest + hicurrentpos(actor)=hidest +.mmaftermove + gosub @setuproom + gosub @getxy + if actor<>user then mmdret + currentuserroom=room + gosub @printroom + GOTO @CANCELINPUT +;--- +.mmnomove + cend ; allowcheat + + m1=2995 ; you end up where you were + gosub @printM1dot + goto @cancelinput ; goto mmaftermove +;--- +.noexit + m1=2114 ; no exit! + gosub @errorM1dot ;* + if actor=user then @printexits ;* + return ;* +;--- +.dig + goto @wasteoftime +;--- +.forcem1dot + message m1 + message dot +;;.snapret ; >> Pete 14/9/89 +;;.PlayRet ; >> Pete 14/9/89 +;;.drinkret ; >> Pete 14/9/89 + return +;--- +.ring ; ring/play +; +;===== + if object<>bell then notringbell + m1=2760 + gosub @actorm1dot ; ding-a-ling! + object=violet + gosub @checkifpresent + m1=2761 + if result=true then @printm1dot ; violet's hint + return +.notringbell +;===== +; + goto @wasteoftime +;--- +.snap +; snap fingers +.plant + goto @noverb ;** remove verb? +;- +;--- +.drink + m1=285 ; bleuch + goto @errorm1dot +;--- +.NotWaterTight + gosub @printTheObject + m1=2595 ; not watertight +; m1=2596 ; already full +;;.NWT1 ; >> Pete 14/9/89 + goto @printM1Dot +;--- +.fill +; cup/chalice + goto NotWatertight + +;.NoWater +; m1=2037 ; no water/nothing suitable +; goto @printM1 ; no dot! + +;--- +.make +; Make sign of cross +; if noun1=250 then makeSign +; if noun2<>250 then @actorcantverbnoun1 +;.makeSign +; m1=2506 ; made sign of cross +; gosub ActorM1Dot + +;; Now special cases for destroying fiends +; if room<>13 then CrossNotPriest +; m1=2507 ; "vanished in a puff of evil" +; object=Priest +;.CrossObject +; gosub @checkifpresent ; make sure the object is here +; if result=false then CrossRet +; +; if m1=0 then DestroyObject +; gosub @printTheObject +; gosub @printm1dot +; goto DestroyObject +; +;.CrossNotPriest +; if room<>5 then CrossNotPavillion +;; m1=2508 ; pavillion vanished +;.DestroyPavillion +; ;m1=2507 +; object=pavillion +; gosub CrossObject +; object=Damosel +; goto CrossObject + +;;.CrossRet ; >> Pete 14/9/89 + return +;--- +.eat +;;.yeuch ; >> Pete 14/9/89 + m1=107 ; Yeuch! + goto @errorm1dot +;---- +;.GENERALBLOW +;; given TARGET,ACTOR (WHO IS ATTACKING) +;; do an ordinary (non-magical) blow +;; +; IF ACTOR=TARGET THEN @mighthurtyourself +;; object=target +;; gosub @isobjectalive +;; if result=true then gbalive +;; if target>maxpeople then @silly +;; m1=3509 ; what harm could a dead body do you? +;; goto @errorm1dot +;; +;;.gbalive +;; first calculate blow strength +; X1=ATTACKOFFSET +; ADD X1,ACTORATTRIBUTES +; BLOWSTRENGTH=NPCINITIAL(X1) +;; IF WEAPONSTRENGTHX6 THEN GBNDODGE +;; +;;.describedodge +;;; you bet, so print "you attack the klingon" +;; verb=40 ; attack +;; gosub @describeattackverb +;; m1=3517 ; but +;; gosub @reportm1 +;; object=target +;; lastwordprinted=object ; force printing of article +;; verb=idodge +;; gosub @objectverb +;; m1=dot +;; goto @reportm1 +;; +;;.GBNDODGE +; GOSUB @DESCRIBEATTACK ; first part of report +; m1=dot +; gosub @Printm1 +; +;.gbnnodescription +;; GOSUB @CHECKARMOUR +;;; returns X1=object number of armour worn (0 if none) +;; IF X1=0 THEN GBH +;;; damage/destroy shield etc. +;; M1=3511 ; blow strikes its +;; IF TARGET<>USER THEN GBSHIELD +;;; M1=3510 ; blow strikes your +;;.GBSHIELD +;; gosub @reportm1 +;; GOSUB @DESCOBJX1 ; describe armour etc. +;;.gbnodesc +;; IF X1<>SHIELD THEN GBARMOUR +;; SUB SHIELDSTRENGTH,BLOWSTRENGTH +;; IF SHIELDSTRENGTH=0 THEN GBSHATTER +;; IF SHIELDSTRENGTH>NEGATIVE THEN GBSHATTER +;; X2=SHIELDSTRENGTH +;;.GBEND +;; MESSAGE 3525 ; (which has +;; PRINT X2 ; strength of armour remaining +;; MESSAGE 3526 ; hit points left). +;;.GBRET +;; RETURN +;; +;;.GBSHATTER +;; CURRENTPOS(X1)=C0 +;; M1=3514 ; shattering it. +;; goto @reportm1 +;; +;.GBH +;; target not wearing armour or whatever, +;.DODAMAGE +; OBJECT=TARGET +; GOSUB @SetX4ToOBJECTAttributes +; X1=HITPOINTOFFSET ; find hit points +; ADD X1,X4 +; hitpoints=NPCCURRENT(X1) +;; +; cif AllowCheat +; if target<>user then gbhnocheat +; if cheatmode<>false then ddnotdead +;.gbhnocheat +; cend ; allowcheat +;; +; SUB hitpoints,BLOWSTRENGTH +; if hitpoints0 then @makeenemies +;; drop through to death +; goto targetdeath +;;- +;.reporthealth +;; describe hit points remaining on target +; OBJECT=TARGET +;.reporthealthobject +;; x1 must be set up (see below in code) +; verb=82 ; you are/it is +; x6=x1 ; preserve position in npcxxx() +; gosub @PrintObjectverb +; if hitpoints=0 then dddead +; x1=npcinitial(x6) ; initial hit points +; x2=10 +; gosub @x1divx2 +;; x1=number of points for each health report division +; x2=x1 +; x1=hitpoints +; gosub @x1divx2 +; if x1>0 then printhealth +;.dddead +; x1=0 ; dead! +;.printhealth +; if x1<10 then PrintHealth1 +; x1=9 +;.PrintHealth1 +; m1=2560 ; health report +; add m1,x1 +;.PrintHealthPrint +; if m1<>2560 then PrintHealthPrint1 +; if hitPoints=0 then PrintHealthPrint1 +; m1=2561 ; not quite dead yet +;.PrintHealthPrint1 +; goto @Printm1dot +;- + +;--- +;.DESCRIBEATTACK +; gosub @printActor +; m1=2540 ; smote +; gosub @printm1 +; object=Target +; goto @printTheObject + + +; first part of damage report for ACTOR vs TARGET +; +; now pick out the appropriate verb - from "scratch" +; through to "pulverise" +; x1=blowstrength ; (approx 1..40) +; x2=4 ; ( want 10 divisions, 0..9) +; gosub @x1divx2 +; if x1<10 then daok +; x1=9 ; max blow +;.daok +; verb=170 ; armed blows +; if weapon<>nullobject then da1 +; verb=180 ; unarmed blows ( relative to verboffset) +;.da1 +; add verb,x1 ; appropriate attack verb +;.describeattackverb +; noun1=target +; prep=with +; noun2=weapon +; goto @printActorAction +;--- +;--- +;.CHECKARMOUR +;; return X1=object number of armour worn by TARGET or X1=0 if none +;.CAFAIL +; X1=0 ; no armour found +; +;.CARET +; RETURN +;--- +;--- + +;;.actordeath ; >> Pete 14/9/89 +;; target=actor ; >> Pete 14/9/89 + +;;.targetdeath ; >> Pete 14/9/89 +; enemies don't hate it any more... +;; x4=enemyoffset ; >> Pete 14/9/89 +;;.targetdeath1 ; >> Pete 14/9/89 +;; x1=npccurrent(x4) ; >> Pete 14/9/89 +;; if x1<>target then targetdeath2 ; >> Pete 14/9/89 +;; npccurrent(x4)=c0 ; >> Pete 14/9/89 +;;.targetdeath2 ; >> Pete 14/9/89 +;; x1=npcentrysize ; 16 ; npcentrysize ; >> Pete 14/9/89 +;; add x4,x1 ; npc entry size ; >> Pete 14/9/89 +;; if x4> Pete 14/9/89 +; set target to have 0 hit points (for benefit of NPC.TXT, if nowt else) +;; OBJECT=TARGET ; >> Pete 14/9/89 +;; GOSUB @SetX4ToOBJECTAttributes ; >> Pete 14/9/89 +;; X1=HITPOINTOFFSET ; find hit points ; >> Pete 14/9/89 +;; ADD X1,X4 ; >> Pete 14/9/89 +;; npccurrent(x1)=c0 ; >> Pete 14/9/89 +;; HIPOS=CARRIED ; only drop carried things, not worn etc. ; >> Pete 14/9/89 +;; POS=TARGET ; >> Pete 14/9/89 +;; DEST=ROOM ; >> Pete 14/9/89 +;; HIDEST=0 ; >> Pete 14/9/89 +;; GOSUB @POSSLOOP ; drop everything ; >> Pete 14/9/89 +;; actorsave=actor ; >> Pete 14/9/89 +;; actor=target ; >> Pete 14/9/89 +;; GOSUB @stop ; don't let it continue with commands !!! ; >> Pete 14/9/89 +;; actor=actorsave ; > +;; currentpos(target)=c0 ; >> Pete 14/9/89 +;; if target=user then @userDeath ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +;--- +.REMOVE +; also FREE, RELEASE +;* +; Special to Ingrid's Back p3 to force INGRID REMOVED NOUN1 only + noun2=nullobject + prep=0 +;* + POS=ACTOR + HIPOS=CARRIED + GOTO @MOVEOBJECT +;--- +.gameAfterRestore + GOSUB @PRINTROOM + +;; if we've just chained, does anyone want to join us from the other part? +; if room<>227 then GARNotChained +; object=2 +;.GARLoop +; x1=currentpos(object) +; if x1<>59 then GARNoFollow +; x1=hicurrentpos(object) +; if x1<>0 then GARNoFollow +;; there, are they following? +; gosub SetX4ToObjectAttributes +; x1=followOffset +; add x1,x4 +; x1=npccurrent(X1) +; if x1<>user then GARNoFollow +;.GARFollow +; x1=enemyOffset +; add x1,x4 +; npccurrent(x1)=c0 ; make them active! +; currentpos(object)=room +; hicurrentpos(object)=c0 +; +;.GARNoFollow +; add object,c1 +; if object<19 then GARLoop +; +;.GARNotChained + actor=user + gosub @stop + GOTO @getfromuser +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/book.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/book.txt new file mode 100644 index 0000000..0963d48 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/book.txt @@ -0,0 +1,235 @@ +; +; Code for book protection system +; +; Copyright (C) 1986 Level 9 Computing +; +; For Gnome Ranger - taken from Knight Orc version +; +; 15/9/87 +; +; table of comparison words start at 4300 (MATCHOFFSET) +; +CONST +;; MaxPage=40 ; >> Pete 14/9/89 +;; MinPage=2 ; >> Pete 14/9/89 +;; MaxLine=10 ; >> Pete 14/9/89 +;; MaxWord=8 ; >> Pete 14/9/89 +;; MaxAttemptsPerWord=3 ; >> Pete 14/9/89 +;; TotalWords=100 ; >> Pete 14/9/89 +;; totalwordsplus1=101 ; >> Pete 14/9/89 + ListBookProtect=0 ; ************* 1 to test, 0 in released game + TestBookProtect=0 ; ************* 1 to test, 0 in released game +; +VAR +;; PAGE ; >> Pete 14/9/89 +;; LINE ; >> Pete 14/9/89 +;; WORD ; >> Pete 14/9/89 +;; RANDOMSEED ; >> Pete 14/9/89 +;; count TESTcount SAVEcount ; >> Pete 14/9/89 + ATTEMPTS + +BEGIN + +.BOOKPROTECT + + cif ListBookProtect + +.TEST + C1=1 + TESTcount=1 +.TEST1 + count=TESTcount + GOSUB @getWORDcount + print testcount + message space + GOSUB @displayWORD +.TEST2 + ADD TESTcount,C1 + IF TESTcount49 then @taw1 +.taw2 + ADD TESTcount,C1 +; ******************************************************* + if testcount=11 then taw2 ; add exceptions in this form. +; ******************************************************* + GOTO @TAW1 + + cend + cif includeprotection ; see MCONST.TXT +; +;; >>> BOOKPROTECT main entry point (in normal use) <<< + + IF ALREADYDONEPROTECT=FALSE THEN DOBOOKPROTECT + RETURN ; ALREADY BEEN ASKED +.DOBOOKPROTECT +; + IF TESTcount<>0 THEN TESTUSER1 + GOSUB @getRANDOMword ; only pick a new word on startup, or on success + TESTcount=count +; +.TESTUSER1 + ATTEMPTS=0 + MESSAGE 4200 ; whatsit appears +.TESTUSER2 + MESSAGE 4207 ; tell me the... + GOSUB @DISPLAYWORD + count=TESTcount + GOSUB @COMPAREPROTECTIONWORD + IF VALUE<>NULLVALUE THEN TESTUSEROK + ADD ATTEMPTS,C1 + IF ATTEMPTS0 THEN GWC1 +; +; now get page number +.getPAGEnumber + GOSUB RANDOM + X2=maxPAGE + GOSUB @X1modX2 + PAGE=X1 + ADD PAGE,C1; So 1 <= PAGE <= maxPAGE + if PAGE> Pete 18/9/89 + C2=2 ; >> Pete 18/9/89 + C3=3 ; >> Pete 18/9/89 +; +; prs " thisgame=" +; print thisgame +; prs " thispart=" +; print thispart +; prs " PartToChain=" +; print PartToChain +; message dotcr + + if thisgame<>Scapeghost then InitAll + if thispart=0 then InitAll ; failed restore/restart +; restore from another part or chained? + thispart=ConstantPartNum ; don't chain back the part we just came from! + gosub @SpecialEssentialInit + NoMoreInput=true + goto @AfterRestore + +.INITALL +; clear and initialise + gosub essentialinit ;>>mike 20/7/87 + screen g c0 + goto @normalStartGame +;--- +.EssentialInit + cif part2 + x1=ValueSave ; lastpartscore + x2=256 + X3=FALSE + if x1> Pete 14/9/89 + cif Includepictures + if x1=lastpicture then @dpret + lastpicture=x1 + cend ; Includepictures + +.waitpic + cif IncludePictures + gosub @savelist9 + x3=0 +.waitpic1 +; make sure picture 1 has finished loading before doing any other pics + x2=34 ; is picture still being drawn? + list9(0)=x2 + list9(2)=c0 ; fix latent bug + driver + add x3,c1 + if x3=20000 then waitpic2 ; ensure infinite loop is impossible (15 sec) + x2=list9(2) + if x2=1 then waitpic1 + if x2=5 then waitpic1 ; >> Scapeghost. Also wait for pic 5 (lightning) + if x2=18 then waitpic1 ; >> and pic 18 (firemen plus dead body) to +; >> finish before chaining to next part. +.waitpic2 +; picture1displayed=true ; picture 1 is ALWAYS the first pic to be shown. +; BUT we can only be certain it is finished when we draw the next one. +; +;;.drawing1; >> Pete 14/9/89 + xcoord=0 + ycoord=0 +; + if x1=1 then dp4 ; only pic1 starts at 0,0. Others in border + xcoord=49 + ycoord=10 ;>>was 8 for T+M ; >> was 10 for knight orc + +.dp4 + x2=32 + list9(0)=x2 + list9(1)=c0 + list9(2)=x1 ; picture number to draw + +;;.picturenotcheat; >> Pete 14/9/89 + list9(3)=c0 + list9(4)=xcoord + list9(5)=c0 + list9(6)=ycoord + driver + + goto @restorelist9 + cend ; Includepictures + + +;--- +.diskinterlock + + cif IncludePictures + x1=200 ; stop all picture drawing + gosub @waitpic ; (will finish picture 1 first, if not yet displayed) + cend ; Includepictures + +; +; this message printing/osrdch should take long enough +; for there to have been a task swap since the above "kill picture" +; command. + cif NotMac + message 2301 ; please insert save disk and strike a key + x2=25000 ; good long time to wait + gosub @timeoutosrdch + message cr ; to signal to user that we have acknowledged. + cend + + cif IncludePictures + x3=0 +.restoredelay + x2=34 ; is picture still being drawn? + list9(0)=x2 + list9(2)=c0 ; fix latent bug + driver + add x3,c1 + if x3=20000 then dpret ; ensure infinite loop is impossible (15 sec) + x2=list9(2) + if x2<>0 then restoredelay ; loop if ANY picture displayed. + cend ; Includepictures + +.dpret + return +;--- +.RESTORE + Message 2202 ; really restore ? + GOSUB @YESORNO + if result=false then restoreend +; if y1=0 then restoreend ;>>Mike 15/7/87 IF RESULT=FALSE THEN RESTOREEND + +.DORESTORE + GOSUB @BOOKPROTECT + IF RESULT=FALSE THEN AFTERDORESTORE + gosub diskinterlock ; finish all picture activity first. + + thisPart=0 ; prevent failed restore/auto restart going wrong + RESTORE + + cif NotMac + message 2302 ; please reinsert game disk + cend + +.afterdorestore + if gameover=true then @restartorrestore ; restore failed. +;>>mike 19/7/87 NOMOREINPUT=FALSE +;>>mike 19/7/87 EOL=FALSE +;>>mike 19/7/87 GOSUB @GETNEXTWORD + +.AFTERRESTORE + OOPSPOS=1 ; musn't do an oops now - to prevent corruption if + OOPSPOSEND=0 ; type OOPS immediately after a restore +.OopsAfterRestore +.afteroops ;>>mike 19/7/87 +; + cif Includepictures + LASTPICTURE=0 ; allow picture to be drawn + cend ; Includepictures +; +.RESTOREEND + if thisgame=Scapeghost then restore1 +.wronggame + message 2312 ; wrong game + goto @restartorrestore + +.restore1 + if thispart=constantpartnum then restore2 + parttochain=thispart + + +;>>Mike19/10/88 - prevent restore into new part saving first. +cif DiskVersion + goto DiskChain +cend +cif NotDiskVersion + goto CassetteChain +cend + + +.chainparttochain + if c1=diskversion then diskchain + if room=0 then cassettechain + message 2311 ; you are about to chain - do you want to save first? + actor=user + gosub @yesorno + if result=false then cassettechain + ThisPart=ConstantPartNum ;>>mike 13/10/88 + save + ThisPart=0 ;>>mike 13/10/88 + goto @chainparttochain ; allow multiple copies + +.cassettechain +cif NotDiskVersion + message 2314 ; do you want to load the other part + actor=user + gosub @YesOrNo + if result=false then @RestartOrRestore +cend + + message 2313 ; put in cassette containing part number + print parttochain + message dot + message cr + +.diskchain +; chain in "PARTTOCHAIN" +; + cif Includepictures + x1=200 + gosub @waitpic ; kill any picture which is currently loading + cend ; Includepictures +; + x1=11 + list9(0)=x1 + list9(1)=parttochain + +; pass data to part 2 in first byte of currentpos/hicurrentpos lists... +; currentpos(0)=ropelength ; score +; hicurrentpos(0)=c0 ; no cloak unless changed.... + + driver + goto @restartorrestore + +.restore2 + alreadydoneprotect=true + GOTO @gameafterrestore +;--- +.osrdch + gosub @savelist9 + x1=3 ; osrdch + list9(0)=x1 + driver + x1=list9(1) + goto @restorelist9 +;--- +.SAVE + gosub @diskinterlock + thisPart=ConstantPartNum ;>>mike13/10/88 + SAVE + cif NotMac + message 2302 ; please insert game disk + cend +.SAVERET + RETURN +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/compile.bat b/l9dev/regress/games.l9/ghost.l9/part1.l9/compile.bat new file mode 100644 index 0000000..4ab9ba4 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/compile.bat @@ -0,0 +1,15 @@ +1aconst.txt +1mconst.txt +1sconst.txt +1pconst.txt +1chain.txt +1aparse.txt +1acore.txt +1converse.txt +1npc.txt +1oops.txt +1averb.txt +1aspecial.txt +1score.txt +1book.txt +2340 ;*** remember to change the EXIT table back to make it smaller! diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/converse.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/converse.txt new file mode 100644 index 0000000..1143c42 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/converse.txt @@ -0,0 +1,340 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; taken From Lancelot 14/5/88 +; +; CONVERSE.TXT, conversation, e.g giving commands to people. +; +VAR +;; lastnpcpresent ; >> Pete 14/9/89 + +BEGIN +.SHOUT + m1=123 ; AHHHGGG.... + goto printm1cancel +;--- +.ASK +.SAY + +;>>specials for L3.. +; cif l3 +; ; giving reply to Woodland knight? +; gosub GetNextWord +; searchtype=NounType +; gosub CheckType +; if value=0 then SayNotReply +; if noun1=nullobject then SayNotReply +; object=WoodlandKnight +; gosub CheckIfPresent +; if result=false then SayNotReply +; NameGiven=true ; if L gave his real name +; m1=2530 ; then you shall die +; if noun1=user then PrintM1Cancel ; prints m1, cancels rest of input +; NameGiven=2 ; a lie! +; m1=2529 ; pass friend +; goto PrintM1Cancel +; ;--- +; .SayNotReply +; cend +;;>>end of L3 Specials.. + + m1=255 ; please use correct format (echo verb HELLO) + +.PrintM1Cancel + gosub @printm1dot + goto @cancelinput +; MESSAGE 2156 ; said +; PROCESSINGSAY=TRUE +; GOSUB @TALKTOSOMEONE +; GOSUB @GETNEXTWORD +;; specifically check for 'SAY TO ... ' +; SEARCHTYPE=PREPTYPE +; GOSUB @CHECKTYPE +; IF VALUE=0 THEN @SAYNOTNPC + +;.SAYNOUN1 ; ask NPC about ... +;; just the same as 'SAY TO' NPC +; GOSUB @GETNEXTWORD +; PROCESSINGSAY=TRUE +; SEARCHTYPE=NOUNTYPE +; GOSUB @CHECKTYPE +; IF VALUEmaxnpc THEN @SAYNOTNPC +; ACTOR=VALUE ; talking to a character +; gosub @setACTORATTRIBUTES +; GOTO startorders + +.SAYNPC + GOSUB @GOBACK +;;.startorders ; >> Pete 14/9/89 +; all conversations with npc come here to start with + gosub @initfifo + twNoun=0 + +.SAYNPCLOOP +; is target obedient to user? + gosub @setACTORATTRIBUTES + cif allowcheat + if cheatmode<>FALSE then saynpcloop1 + cend ; allowcheat + x1=masteroffset + add x1,actorattributes + x1=npccurrent(x1) + if x1<>user then @saynpcnotobedient + +.saynpcloop1 +; actor is obedient to ingrid + gosub sayparser + GOSUB @NPCCALLVERB + if processed=true then sayend2 ; response printed + IF NOMOREINPUT=FALSE THEN @SAYNPCLOOP +; end of thing to say + IF SAYRESPONSE=TRUE THEN SAYEND1 +; print a random action along the lines of 'the ferryman ignores you' +;;.sayDoesntUnderstand ; >> Pete 14/9/89 + LASTWORDPRINTED=0 ; prevent use of IT + m1=3290 ; doesn't understand + gosub @varysayM1dot + goto sayend2 + +.SAYEND1 + m1=3230 ; ok boss! + gosub @varysayM1dot +; +.sayend2 + gosub @getnextword + gosub @linkonfifocommandqueue + +.realsayend + verb=isay ; to allow npcs to do something after +; player has been talking. + actor=user + gosub @setactorattributes + GOSUB @ABSCANCELINPUT ; cancel input, then return (also +; sets processingsay=false) + stack + goto @mainloopnpc +;--- +.sayparser +; call parser for saying + PROCESSINGSAY=TRUE + GOSUB @GETNEXTWORD +; now try calling verb parser +; first set up this word to be the verb if appropriate + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE=nullvalue THEN sayparser2 + GOSUB @goback + +.sayparser2 +;>>removed by L2 erroroccurred=FALSE + GOSUB @PARSEINPUT + + gosub @AgainVerbVarsAreVerbVars ; set up again >>fixed by L2 + + if noun1=nullobject then sayparserNotNoun1 ;>>fixed by gnome2 + itword=noun1 ;>>fixed by gnome2 + +.sayparserNotNoun1 + cif allowcheat + if cheatmode<>2 then sayparsenodebug + prs "[parseinput returned: " + print verb + message space + print prep + message space + print noun1 + message space + print noun2 + prs "]" + cend ; allowcheat + +;;.sayparsenodebug ; >> Pete 14/9/89 +;>>removed by L2 if erroroccurred=FALSE then sayparserend +;>>removed by L2 ; got an error - disregard verb +;>>removed by L2 verb=0 ; make everything ignore it. + +;;.sayparserend + + if nomoreinput=true then sayparserret + if verb=0 then sayparser2 +.sayparserret + return +;--- +;.TALKTOSOMEONE +;; set up ACTOR if there is anyone around to hear +; GOSUB ANYBODYHERE +; IF OBJECT=NULLOBJECT THEN TTSORET +; ACTOR=OBJECT +;.TTSORET +; RETURN +;--- +;.ANYBODYHERE +;; return OBJECT=a random NPC who is present +; OBJECT=minnpc +; lastnpcpresent=nullobject +;.ABH1 +; GOSUB @CHECKIFPRESENT +; IF RESULT=FALSE THEN ABH2 +;; npc is present. Randomly accept it. +; lastnpcpresent=object +; random x1 +; if x1>160 then abhret ; accept it +; +;.abh2 +; ADD OBJECT,C1 +; IF OBJECTmaxghost then notobedrefusal +;===== + m1=3270 ; won't give anything away + if verb=igive then sno1 +;===== +.notobedrefusal +;===== + m1=2900 ; base for refusal messages + add m1,actor + gosub @ActorM1Dot + goto sno2 + +.sno1 + gosub @varysayM1dot +.sno2 + goto @sayend2 +;--- +;.SAYNOTNPC +;; not talking to NPC, but still need to check for sayings +; PROCESSINGSAY=TRUE +; GOSUB @GOBACK +;; is there anyone around to hear ? +; GOSUB @TALKTOSOMEONE +; +;.SAYNOTNPCLOOP +; PROCESSINGSAY=TRUE +; GOSUB @GETNEXTWORD +; IF NOMOREINPUT=FALSE THEN SAYNOTNPCLOOP +; GOTO @CANCELINPUT +;--- +; +; Now miscellaneous code to do with talking to characters +; this is essentially an Eliza-type program without +; the psychoanalysis bit +; +;--- +.NPCCALLVERB + processed=FALSE + gosub @specialconversation + if processed=true then ncvret + IF VERB=0 THEN @SAYRET + +; GIVEN VERB,PREP,NOUN2 AND OBJECTTABLE, +; Push them onto command queue! +; Work down from top so static objects, containers come first + sayresponse=true + GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS + havecalledverb=FALSE ; indication of whether +; anything has been pushed for this verb yet +; +; prevent 'junk' verbs from being stored +; e.g. 'tell rainbird to tell me about me' +; used to go wrong because 'to' was pushed. +;; if verb=itell then posingleret + if verb=59 then @commandstop ;>>fixed for gnome2 - allow "STOP" + IF EVERYTHING<>0 THEN pocollective + if verb=iwaitforperson then posinglenoun1 ; noun1,2 already set up + if verb=iwaitforperiod then posinglenoun1 ; ditto + if verb=iwaituntiltime then posinglenoun1 ; ditto + if verb=isetupgo then posetupgo ; ditto + if verb=isetupfind then posetupfind +; handle individual objects + CURRENTOBJECT=otbaseplus1 ; pointer into OBJECTTABLE +.POSINGLE1 + OBJECT=OBJECTTABLE(CURRENTOBJECT) + IF OBJECT=0 THEN POSINGLEEND + noun1=object + if verb=ifollow then pofollow ; follow people is handled specially +; + gosub @npcpushfifo + havecalledverb=true + ADD CURRENTOBJECT,C1 + GOTO POSINGLE1 + +.POSINGLEEND + IF HAVECALLEDVERB=TRUE THEN POSINGLERET + NOUN1=NULLOBJECT +.posinglenoun1 + +;; rook goes to landing pad when told to go lighthouse +; if actor<>rook then notrookgolh +; if verb<>139 then notrookgolh ; (139=go object) +; if noun1<>lighthouse then notrookgolh +; verb=96 ; (96=go room) +; noun1=27 ; pad room +;.notrookgolh + + GOSUB @npcpushfifo + +.POSINGLERET +.ncvret + RETURN +;--- +.posetupfind + verb=igdfind + goto posinglenoun1 +;--- +.posetupgo + verb=igdgo + goto posinglenoun1 +;--- +.pofollow + gosub @follow + sayresponse=true ; understood ok + +;;.pofollowret +;;.gsret + return +.pocollective + noun1=everything + goto @setupgdaccess ; push multiple order onto stack +;--- +.varysayM1dot +; print one of 3 messages at m1 for people who can talk +; or m1+10 for npcs who can't talk. +; object=actor +; gosub isobjectalive +; if result=FALSE then printdead ; 'the ... is dead' + x1=actor + gosub @printTHEobjectx1 +;>>not needed in Gnome - if actor>not needed in Gnome - x1=10 +;>>not needed in Gnome - add m1,x1 +;;.gsm1d1 + goto @varymessagedot +;--- +.NPCNOTUNDERSTOOD +; ACTOR, and NPC is trying to do something which would +; produce an error message if USER tried it. +; unless actor is under user's control +;>>removed by L2 erroroccurred=true + executeprocessed=FALSE ; nothing happened + commandfinished=true + FatalError=true ;>>mike 9/2/88 + return + diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/exit.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/exit.txt new file mode 100644 index 0000000..6f3c4a1 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/exit.txt @@ -0,0 +1,564 @@ +; Standard adventure source, copyright (C) 1987 Level 9 Computing. +; +; EXIT.TXT, data for the game exits. The numeric values for the +; directions is as follows: +; +; 1 up=9 in=11 cross=13 climb=14 jump=15 +; 8 2 down=10 +; ! +; 7 --+-- 3 +; ! +; 6 5 <- note that 4&5 are reversed. You cannot change this. +; 4 +; +; Special notes for interface between static and synthesised rooms.. +; +; There must be an in/out connection between the static and the +; object number of the scenery object to which it connects. +; +; E.g If you have a location object "[480:^N castle]", then an exit +; from room 15: 1001 12 180 +; will set up an in/out connection to the room where object no. 180 +; is situated. This allows the exit table to be changed easily. +; +;Room number 1 +; +; CHANGE THESE IF YOU CHANGE THE SIZE OF THE GRID. +0000 1 5 ; North. ; = XMAX (1 to n) +0000 2 6 ; NE ; = N+1 +0000 3 1 ; E ; = always 1 +0000 4 251 ; SOUTH ; = 256-XMAX +0000 5 252 ; SE ; = SOUTH+1 +0000 6 250 ; SW ; = SOUTH-1 +0000 7 255 ; WEST ; = always 255 +1000 8 4 ; NW ; = North-1 +; +;Room number 2 +; +; CHANGE THESE IF YOU CHANGE THE SIZE OF THE GRID. +0000 1 5 ; North. ; = XMAX (1 to n) +0000 2 6 ; NE ; = N+1 +0000 3 1 ; E ; = always 1 +0000 4 251 ; SOUTH ; = 256-XMAX +0000 5 252 ; SE ; = SOUTH+1 +0000 6 250 ; SW ; = SOUTH-1 +0000 7 255 ; WEST ; = always 255 +1000 8 4 ; NW ; = North-1 +; +;Room number 3 path+thermom. +0001 1 181 ;n +0001 3 4 ;e +1001 4 6 ;s +;Room number 4 lawn+spotlight +1001 7 3 ;w +;Room number 5 path+church +0001 1 20 ;n +0011 11 20 ;(in) +0001 3 6 ;e +1001 4 8 ;s +;Room number 6 path+vault +0001 1 3 ;n +0001 3 7 ;e +0001 4 9 ;s +1001 7 5 ;w +;Room number 7 carpark gate +0001 3 30 ;e +0001 4 10 ;s +1001 7 6 ;w +;Room number 8 main gate +0001 1 5 ;e +1001 4 31 ;s +;Room number 9 yew +0001 1 6 ;n +1001 4 32 ;s +;Room number 10 lawn +0001 1 7 ;n +1001 4 33 ;s +;Room number 11 edith's grave +1001 1 182 ;n +;Room number 12 +1000 0 0 +;Room number 13 +1000 0 0 +;Room number 14 +1000 0 0 +;Room number 15 shed +0101 12 180 ;out +1111 1 180 ;n +;Room number 16 +1000 0 0 +;Room number 17 +1000 0 0 +;Room number 18 +1000 0 0 +;Room number 19 +1000 0 0 +;Room number 20 "church" +0001 4 5 ;s +1011 12 5 ;(out) +;Room number 21 +1000 0 0 +;Room number 22 +1000 0 0 +;Room number 23 +1000 0 0 +;Room number 24 +1000 0 0 +;Room number 25 +1000 0 0 +;Room number 26 +1000 0 0 +;Room number 27 +1000 0 0 +;Room number 28 +1000 0 0 +;Room number 29 +1000 0 0 +;Room number 30 "carpark path" +1001 7 7 ;w +;Room number 31 "road" +1001 1 8 ;n +;Room number 32 "road" +1001 1 9 ;n +;Room number 33 "road" +1001 1 10 ;n +;Room number 33 +1000 0 0 +;Room number 34 +1000 0 0 +;Room number 35 +1000 0 0 +;Room number 36 +1000 0 0 +;Room number 37 +1000 0 0 +;Room number 38 +1000 0 0 +;Room number 39 +1000 0 0 +;Room number 40 +1000 0 0 +;Room number 41 +1000 0 0 +;Room number 42 +1000 0 0 +;Room number 43 +1000 0 0 +;Room number 44 +1000 0 0 +;Room number 45 +1000 0 0 +;Room number 46 +1000 0 0 +;Room number 47 +1000 0 0 +;Room number 48 +1000 0 0 +;Room number 49 +1000 0 0 +;Room number 50 +1000 0 0 +;Room number 51 +1000 0 0 +;Room number 52 +1000 0 0 +;Room number 53 +1000 0 0 +;Room number 54 +1000 0 0 +;Room number 55 +1000 0 0 +;Room number 56 +1000 0 0 +;Room number 57 +1000 0 0 +;Room number 58 +1000 0 0 +;Room number 59 +1000 0 0 +;Room number 60 +1000 0 0 +;Room number 61 +1000 0 0 +;Room number 62 +1000 0 0 +;Room number 63 +1000 0 0 +;Room number 64 +1000 0 0 +;Room number 65 +1000 0 0 +;Room number 66 +1000 0 0 +;Room number 67 +1000 0 0 +;Room number 68 +1000 0 0 +;Room number 69 +1000 0 0 +;Room number 70 +1000 0 0 +;Room number 71 +1000 0 0 +;Room number 72 +1000 0 0 +;Room number 73 +1000 0 0 +;Room number 74 +1000 0 0 +;Room number 75 +1000 0 0 +;Room number 76 +1000 0 0 +;Room number 77 +1000 0 0 +;Room number 78 +1000 0 0 +;Room number 79 +1000 0 0 +;Room number 80 +1000 0 0 +;Room number 81 +1000 0 0 +;Room number 82 +1000 0 0 +;Room number 83 +1000 0 0 +;Room number 84 +1000 0 0 +;Room number 85 +1000 0 0 +;Room number 86 +1000 0 0 +;Room number 87 +1000 0 0 +;Room number 88 +1000 0 0 +;Room number 89 +1000 0 0 +;Room number 90 +1000 0 0 +;Room number 91 +1000 0 0 +;Room number 92 +1000 0 0 +;Room number 93 +1000 0 0 +;Room number 94 +1000 0 0 +;Room number 95 +1000 0 0 +;Room number 96 +1000 0 0 +;Room number 97 +1000 0 0 +;Room number 98 +1000 0 0 +;Room number 99 +1000 0 0 +;Room number 100 +1000 0 0 +;Room number 101 +1000 0 0 +;Room number 102 +1000 0 0 +;Room number 103 +1000 0 0 +;Room number 104 +1000 0 0 +;Room number 105 +1000 0 0 +;Room number 106 +1000 0 0 +;Room number 107 +1000 0 0 +;Room number 108 +1000 0 0 +;Room number 109 +1000 0 0 +;Room number 110 +1000 0 0 +;Room number 111 +1000 0 0 +;Room number 112 +1000 0 0 +;Room number 113 +1000 0 0 +;Room number 114 +1000 0 0 +;Room number 115 +1000 0 0 +;Room number 116 +1000 0 0 +;Room number 117 +1000 0 0 +;Room number 118 +1000 0 0 +;Room number 119 +1000 0 0 +;Room number 120 +1000 0 0 +;Room number 121 +1000 0 0 +;Room number 122 +1000 0 0 +;Room number 123 +1000 0 0 +;Room number 124 +1000 0 0 +;Room number 125 +1000 0 0 +;Room number 126 +1000 0 0 +;Room number 127 +1000 0 0 +;Room number 128 +1000 0 0 +;Room number 129 +1000 0 0 +;Room number 130 +1000 0 0 +;Room number 131 +1000 0 0 +;Room number 132 +1000 0 0 +;Room number 133 +1000 0 0 +;Room number 134 +1000 0 0 +;Room number 135 +1000 0 0 +;Room number 136 +1000 0 0 +;Room number 137 +1000 0 0 +;Room number 138 +1000 0 0 +;Room number 139 +1000 0 0 +;Room number 140 +1000 0 0 +;Room number 141 +1000 0 0 +;Room number 142 +1000 0 0 +;Room number 143 +1000 0 0 +;Room number 144 +1000 0 0 +;Room number 145 +1000 0 0 +;Room number 146 +1000 0 0 +;Room number 147 +1000 0 0 +;Room number 148 +1000 0 0 +;Room number 149 +1000 0 0 +;Room number 150 +1000 0 0 +;Room number 151 +1000 0 0 +;Room number 152 +1000 0 0 +;Room number 153 +1000 0 0 +;Room number 154 +1000 0 0 +;Room number 155 +1000 0 0 +;Room number 156 +1000 0 0 +;Room number 157 +1000 0 0 +;Room number 158 +1000 0 0 +;Room number 159 +1000 0 0 +;Room number 160 +1000 0 0 +;Room number 161 +1000 0 0 +;Room number 162 +1000 0 0 +;Room number 163 +1000 0 0 +;Room number 164 +1000 0 0 +;Room number 165 +1000 0 0 +;Room number 166 +1000 0 0 +;Room number 167 +1000 0 0 +;Room number 168 +1000 0 0 +;Room number 169 +1000 0 0 +;Room number 170 +1000 0 0 +;Room number 171 +1000 0 0 +;Room number 172 +1000 0 0 +;Room number 173 +1000 0 0 +;Room number 174 +1000 0 0 +;Room number 175 +1000 0 0 +;Room number 176 +1000 0 0 +;Room number 177 +1000 0 0 +;Room number 178 +1000 0 0 +;Room number 179 +1000 0 0 +;Room number 180 +1000 0 0 +;Room number 181 +1000 0 0 +;Room number 182 +1000 0 0 +;Room number 183 +1000 0 0 +;Room number 184 +1000 0 0 +;Room number 185 +1000 0 0 +;Room number 186 +1000 0 0 +;Room number 187 +1000 0 0 +;Room number 188 +1000 0 0 +;Room number 189 +1000 0 0 +;Room number 190 +1000 0 0 +;Room number 191 +1000 0 0 +;Room number 192 +1000 0 0 +;Room number 193 +1000 0 0 +;Room number 194 +1000 0 0 +;Room number 195 +1000 0 0 +;Room number 196 +1000 0 0 +;Room number 197 +1000 0 0 +;Room number 198 +1000 0 0 +;Room number 199 +1000 0 0 +;Room number 200 +1000 0 0 +;Room number 201 +1000 0 0 +;Room number 202 +1000 0 0 +;Room number 203 +1000 0 0 +;Room number 204 +1000 0 0 +;Room number 205 +1000 0 0 +;Room number 206 +1000 0 0 +;Room number 207 +1000 0 0 +;Room number 208 +1000 0 0 +;Room number 209 +1000 0 0 +;Room number 210 +1000 0 0 +;Room number 211 +1000 0 0 +;Room number 212 +1000 0 0 +;Room number 213 +1000 0 0 +;Room number 214 +1000 0 0 +;Room number 215 +1000 0 0 +;Room number 216 +1000 0 0 +;Room number 217 +1000 0 0 +;Room number 218 +1000 0 0 +;Room number 219 +1000 0 0 +;Room number 220 +1000 0 0 +;Room number 221 +1000 0 0 +;Room number 222 +1000 0 0 +;Room number 223 +1000 0 0 +;Room number 224 +1000 0 0 +;Room number 225 +1000 0 0 +;Room number 226 +1000 0 0 +;Room number 227 +1000 0 0 +;Room number 228 +1000 0 0 +;Room number 229 +1000 0 0 +;Room number 230 +1000 0 0 +;Room number 231 +1000 0 0 +;Room number 232 +1000 0 0 +;Room number 233 +1000 0 0 +;Room number 234 +1000 0 0 +;Room number 235 +1000 0 0 +;Room number 236 +1000 0 0 +;Room number 237 +1000 0 0 +;Room number 238 +1000 0 0 +;Room number 239 +1000 0 0 +;Room number 240 +1000 0 0 +;Room number 241 +1000 0 0 +;Room number 242 +1000 0 0 +;Room number 243 +1000 0 0 +;Room number 244 +1000 0 0 +;Room number 245 +1000 0 0 +;Room number 246 +1000 0 0 +;Room number 247 +1000 0 0 +;Room number 248 +1000 0 0 +;Room number 249 +1000 0 0 +;Room number 249 +;Room number 250 +;Room number 251 +;Room number 252 +;Room number 253 +0000 0 0 diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/license.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/license.txt new file mode 100644 index 0000000..9c355e1 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/license.txt @@ -0,0 +1,2 @@ +These files are covered by the license to be found in https://github.com/MikeTheTechie/Level9-Public/blob/main/License.txt +All other rights are reserved. diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/gamedata.dat b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/gamedata.dat new file mode 100644 index 0000000..40c707e Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/gamedata.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/message.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/message.txt new file mode 100644 index 0000000..dae7e0d --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/message.txt @@ -0,0 +1,2804 @@ +; Scapeghost part I text. +; Copyright (C) 1989 Level 9 Computing. +; +; ST version of MESSAGE.TXT: messages/keywords for the game. +; +; Messages are of the form: [ number : text ] ; comment +; They must be in numeric order, but gaps are allowed in the number +; sequence, of course. +; +; | (vertical bar) terminates the printable part of a message. It +; is typed by shifting backslash (to the left of the keyboard). +; / forces the following character to be printed literally. +; % is carriage return. Note that carriage return is ignored if +; the printing is already at the start of a line, to make coding +; simpler. To force a real carriage return, print space first. +; ^ (shift 6) marks a word for recognition by the parser. It is +; followed by a letter for word type: +; Adjective; Comment; conJunction; Noun; Preposition; Verb. +; +; Capitalization is done automatically on output and you are +; recommended to use lower case for the first letter of messages +; as this improves compression and will make no difference on +; output, providing all punctuation is correct. +; +; Please ensure that all long room descriptions and first-time +; messages are there. Comment blank msgs.. ;; [1375:] ; etc.. +; Please comment all long room descriptions, first-time messages, +; examine messages etc so we know what they refer to. eg: +; [1143:, in the Dunes. Etc..] ; back of Dunrollin. +; Exits must be clear from room descriptions or first-time msgs. +; +;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +;>> NB: Grouped messages which lie in unusual areas (eg. 2500-2799) >> +;>> are marked with GROUP. >> +;>> >> +;>> For future games, SEARCH for "I " (case specific) "Scapeghost" >> +;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +; +; punctuation messages.. +[1: ] +[2::] +[3:, ] +[4:.] ; dot with no space +[5:%] +[6:and ] +[7:.%] +[8:?%] +[9:. ] +; +; positions etc.. +[10:exits led ] +[11:an exit led ] +[12: through a door] +[13: through an open door] +[14: and ] +[15:%a haunting breeze carried away the "What now" prompts. ] +[16:%> ] +[17:%What now? ] +[18:: ]; +[19:"] +; +; Messages for printing objects.. +[20:a ] +[21:the ] +[22:an ] +[23:some ] +[24:." ] ; dot quote +[25:% %] ; blank line +[26:worn] ; for 'couldn't have worn' +[27:taken] ; for 'couldn't have taken' +; +; exits directions, doubling as movement verbs.. +[51:^V north|^V n ^V northwards] +[52:^V northeast|^V ne] +[53:^V east|^V e ^V eastwards] +[54:^V south|^V s ^V southwards] +[55:^V southeast|^V se] +[56:^V southwest|^V sw] +[57:^V west|^V w ^V westwards] +[58:^V northwest|^V nw] +[59:^V upwards|^V u ^V up] +[60:^V downwards|^V d ^V down] +[61:^V inside|^V in ^V inwards ^V into ^V enter] +[62:^V outside|^V out ^V leave] +[63:^V cross|^V across ^V over] +[64:with the ^V climb|^V scramble ^V ascend ^V mount] +; is in 'you struggle with the climb and are in' +; +; Intransitive verbs.. +[70:^V i] +[71:^V again|^V a] +[72:^V look|^V l ^V display ^V redisplay ^V refresh] +[73:^V inventory|^V inv ^V list] +[74:^V quit ^V restart] +[75:^V restore ^V load] +[76:^V save] +[77:^V ramsave ^V ram] ; && +[78:^V ramload] ; && +[79:^V score ^V rating ^V status] +[80:^V verbose] +[81:^V brief] +[82:^V wait|^V wa ^V pause ^V z] +[83:^V ring|^V play ^V blow ^V toot ^V sound] +[84:^V on] +[85:^V off] +[86:^V pictures ^V graphics] ; && +[87:^V words ^V text] ; && +[89:^V UNDO ^V OOPS] +[90:^V hit|^V attack ^V hit ^V break ^V kick ^V punch ^V smash +^V kill ^V wake ^V rouse] ; == wake & rouse statue (Scapeghost.1) == +[92:^V searched|^V search ^V explore] +[93:^V dug|^V dig] +[94:^V sniffed|^V sniff ^V smell] +[95:^V knocked|^V knock] +[96:got|^V stood ^V stand ^V jump] ; output eg. "L got out", "L got in" etc. +;===== +; Scapeghost.1 kneel down (to calm dog) +[97:^V knelt|^V kneel ^V bend] ; [97:^V lay|^V lie] +;===== +[98:^V got|^V sat ^V sit] +[99:^V hid|^V hide] +[100:^V said|^V say ^V whisper ^V call ^V talk] +;; [101:^V teleported|^V teleport] +;; [102:^V getme] +[103:^V filled|^V fill] +[104:^V ran|^V run ^V fly] +[105:^V made|^V make] +; +[107:hey, come on, ghosts don't ^V eat|^V bite ^V taste ^V nibble +^V lick] ;== Scapeghost == +[108:^V went|^V go ^V goto ^V find ^V walk ^V fly] +[109:stopped|^V stop ^V abort] +[110:I could have done with a ^V drink, but being a ghost didn't +have the stomach for it..] +; +[112:^V exits ^V exit] +; +; verbs for output.. +[130:^V had|^V have ] ; mainly for output +[131:^V had|^V has ] ; mainly for output +[132:^V was|^V am ] ; mainly for output +[133:^V were|^V are ] ; mainly for output 'you were' +[134:^V was|^V is ] ; mainly for output 'someone was' +[135:are] ; output only - present tense for 'tell me about' +[136:is] ; output only - present tense for 'tell me about' +;; 137 is 'GO IN' +;; 138 is 'GO OUT' +;; 139 is 'wait for person' +;; 140 is 'wait until time' +;; 141 is 'wait for (length of time)' +;; 142 is 'wait for single turn' +; +[143:^V fought|^V fight ^V kill] ; >> Pete 13/9/89 +[145:^V dodged|^V dodge] +; +; 146 and 147 have text for debugging output only - do not mark +[146:gdgo] ; 196 - gdgo +[147:gdrun] ; 197 - gdrun +;; [148:^V stuff] +; +; Transitive verbs.. +[150:^V examined|^V examine ^V read ^V x] +[151:^V cut|^V chop] +; +[154:^V got|^V get] +[155:^V took|^V take ^V carry ^V acquire ^V steal +^V pluck ^V catch ^V lift ^V hold ^V keep ^V grab] +[156:^V wore|^V wear] +[157:^V dropped|^V drop ^V discard] +[158:^V put|^V conceal] +[159:^V removed|^V remove ^V free ^V release] +[160:^V threw|^V throw ^V chuck ^V toss ^V hurl] +[161:^V gave|^V give ^V offer ^V show ^V offered ^V sell] +[162:^V asked|^V ask ^V question] +[163:^V followed|^V follow ^V chase] +[164:^V opened|^V open ^V unlock ^V pick] +; +[168:^V pushed|^V tug ^V push ^V launch ^V shove ^V rock ^V turn +^V rotate ^V paddle ^V press ^V select ^V depress ^V poke ^V prod +^V touch] +[169:^V fastened|^V fasten ^V tie ^V attach] +[170:^V unfastened|^V unfasten ^V untie] +[171:^V pulled|^V pull ^V yank] +;==== +; +; specials to Scapeghost.1 for writing "time" in gravel and erasing it +[172:^V wrote|^V write ^V etch ^V scribe ^V scribble ^V carve] +[173:^V erased|^V erase ^V rub ^V wipe ^V end] +; Scapeghost.1, pat dog etc. +[174:^V stroked|^V stroke ^V pat ^V calm] +;==== +; +[176:^V inserted|^V insert] +; +; 186, 187 and 189 have text for debugging only +[186:return object] ; 186 is 'return object to initial' (for npcs) +[189:gdfind] ; 239 is gdfind +[190:^V closed|^V close ^V shut] +; +[192:told] ; "tell" removed by Pete. 13/9/89 +[194:struggled] ; mainly for output +; 195 is 'steal all from' +[197:killed] ; output only +; +[210:reached] ; output only +[211:dragged] ; output only +[212:passed] ; output only +[213:flew] ; output only +[214:walked] ; output only +[215:caught] ; output only +[216:entered] ; output only, eg 'Fred entered from the east'. Do not mark +; +; Echo verbs (250-299) which just print the message containing them.. +[250:OK, if you say not|^V no] +[251:right, so be it|^V yes] +[252:well, that's one way to keep your spirits up!|^V leap ^V hop +^V skip ^V dance ^V celebrate] +[253:thunder rolled ominously|^V plugh ^V xyzzy ^V sesame +^V plover ^V humakaat ^V satarh ^V ollabin ^V obis] +; magic words for amusing response +; +; **** PETE - Please, please, please, please, please, please, please, +; leave this in, if only for the 16 bit versions. **** +[254:a message from ^N Graham ^N Jones: +%"Hi to Mary, Simon B. and his unfeasably large ears (sorry about +that cruel remark, Simon), Rog & the rest of Hollywood Inc., +Punky, Joanne (my hair has started to fall out since you cut +it!), Steve & Sue, Mark & Donna, "Walter" Owen, Julian the +gigalo, Chaddy and his disciples, Simon W. (by the way Simes, you +still owe me 15 quid!), Clive & Stav, Steve E., Tony & Ali and +the rest of the congregation, Chris (haven't seen you in ages, +and I don't particularly want to), Steven F. (don't want to see +you either), Carol, Lou & Tony, Kerry and friends, the Jones +tribe, all the young dudes in Great Harwood and all at L9. +% % +Also, a mixture kind regards and sarcastic remarks to all those +Guys in Burnley who I haven't seen for ages, Keith, Mick, Neil, +Mark, Pete. How's life treating you nowadays?"] +; +[255:if you want to talk to someone, follow their name with what you +want to say to them. For example JOE, HELLO|^V hello ^V welcome ^V hi +^V greetings ^V day ^V afternoon] +[256:I heard nothing that I hadn't heard before|^V listen ^V hear] +[257:send the coupon to Level 9 for a ^V hint|^V help] +; +[263:why not|^V y ^V why] +; +[267:that sort of language is not very clever|^V sod +^V motherfucker ^V crap ^V nipples ^V bloody ^V frigging +^V wanker ^V turd ^V piss ^V shit ^V twat ^V cunt ^V bollocks +^V jesus ^V christ ^V god ^V devil ^V tits ^V asshole +^V arsehole ^V cretin ^V conservatives ^V spastic ^V coon +^V wog ^V fucking ^V fucker ^V bastard ^V bugger ^V damn +^V sex ^V hell ^V bonk ^V pratt ^V rape ^V shag ^V fuck] +; lower case swear words +; +[273:what? Off already? Try CONTROL C, but don't forget to save +your position first|^V goodbye ^V bye] ; && +[274:and I should think so too|^V sorry] +; +;; [277:] +; +[279:I found that closing my eyes made no difference|^V sleep] +[280:as a ghost, I could not cross flowing water|^N swim] +; +[283:hit] ; the object 'hit' target +; +[284:I ^V concentrated hard but found that my powers were too weak +to accomplish much at this stage|^V concentrate ^V meditate +^V recreate ^V reconstruct] ; == +; +[285:I wasn't thirsty|^V drink] +; +;>> TRANSITIVE ECHO VERBS FOLLOW... +; +[286:I thought about shaking it, but that would take too much +strength|^V shake] +; +[288:there was quite enough buried here already|^V bury] +; +[290:I tried to ^V polish it, but my hand went through|^V rub +^V clean] +[291:you ^V fill a container by, eg, "PUT THING IN CONTAINER"] +[292:please ^V empty a container by removing its contents in turn] +; +;; [294:I had nothing with which to ^V light anything. I was +;; a non-smoker, you see] ; == Removed for Scapeghost only == +[297:my lips passed straight through|^V kiss] +; +; -------------------------------------------------------------- +; +; Objects (300+N).. +; +; NPCs (1 onwards) +; People +[301:^N I|^N player ^N me ^N Alan ^N Chance ^N myself] +[302:^N Joe ^N Danby] +[303:^N Bert ^N Willmot] +[304:^N Edna ^N Willmot] +[305:^N David ^N Ridge] +[306:^N Alex ^N Pym] +[307:^N Edith ^N Dean] +[308:^N Colonel ^N Rycroft] +[309:^N Violet ^N Conway] +[310:^N mourners|^N relatives ^N family] ; PL.SOME +[311:^N detective] ; HE +[312:the ^N cemetery ^N supervisor] +[313:the ^N workman] +[314:^N vandals|^N gang ^N hooligans ^N hoodlums ^N yobbos +^N yobs ^N thugs ^N programmers] +; +; Animals +[315:^N dog|^N mutt ^N hound] ; ITA +; +; ordinary objects (80 onwards) +; +; light objects in order... +[380:^N thistledown|^N thistle ^N down] +[381:^N petal] +[382:^N dry ^N leaf] +[383:^N matchbook] +[384:^N pebble|^N stone] +[385:^A white ^N card] +[386:^A yellow ^N card] +[387:^N fishbone|^N fish ^N bone] +[388:^N twig|^N stick ^N branch] +[389:^N watch|^N wristwatch] +[390:^N bell] +[391:^N gnomon] +; +; heavy objects... +[395:^N carrier ^N bag] +[396:^N newspaper|^N paper] +[397:^N copy of Time ^N magazine|^N time] ; careful about l/c. +; +[398:^N bottle] +[399:^N shovel|^N spade] +[400:^A new ^N wreath] +[401:^A green ^N wreath] +[402:^A faded ^N wreath] +; +; static objects (110 onwards) +[410:^N button] +[411:^N switch] +[412:^N lightbulb|^N light ^N bulb] +[413:^N lock|^N latch] +[414:^N barrel] +[415:^A short ^N lever] +[416:^A medium ^A sized ^N lever|^A middle] +[417:^A long ^N lever] +[418:^N rope ^N handle] +[419:^N gravel|^N pebbles ^N stones ^N chippings] +[420:^N vase|^N jug] +[421:^N dogwood ^N bush|^N bushes] +[422:^N heap of ^N branches|^N twigs ^N sticks ^N compost] +[423:^N mound of ^N earth|^N soil ^N dirt] +[424:^N vault] +[425:^N spotlight|^N light ^N bulb] +[426:^N thermometer] +[427:^N yew ^N tree] +[428:^N octagonal ^N seat] +[429:^N jumbled ^N stonework] +[430:^N carvings|^N etchings] +[431:^N plinth|^N stand] +[432:^N statue|^N Alex ^N Pym] +[433:^N sundial] +[434:^N broken ^N sundial] +[435:^N sarcophagus] +[436:^N urn|^N greek] +; "time" object which appears in gravel once written. this is used for +; erasing/examining purposes etc. since it allows "erase message". +; but since "write message" is unacceptable, the noun used for +; writing is 220 (message 520) +[437:^N message reading time|^N time] ; (doesn't work with quotes!) +[438:^N shed ^N door] ; shed door +[439:^N crumbling ^N abbey ^N wall|^N church] ; from thermometer +; +; vehicles (140 onwards) +[440:^N cart|^N electric ^N carriage ^N vehicle] +; +; invisible objects (150 onwards) +; +; headstones & graves are present in many locations... +[450:^N headstone|^N tombstone ^N gravestone] +[451:^N grave|^N mound] +; +[452:^N gate] +[453:^N main ^N entrance ^N gate] +[454:^N wooden ^N frame] +[455:^N burnt ^N church|^N abbey ^N wall] +[456:^N thermometer] ; from spotlight +[457:^N thermometer] ; from vault +; +[459:^N shed|^N cabin] +[460:^N footprints|^N footsteps] +[461:^N cenotaph|^N war ^N memorial ^N monument] +[462:^N marigolds|^N flowers ^N plants] +[463:^N copper ^N beech|^N tree] +[464:^N elder ^N bushes|^N bush] +[465:^N flowerbed|^N poppies ^N flowers ^N plants] +[466:^N crosses] +[467:^N carrier ^N bags|^N plastic] +[469:^N abbey ^N wall|^N church] ; from vault +[470:^N window] ; inside shed +[471:^N window] ; outside shed +[472:^N company|^N followers ^N friends ^N recruits ^N companions] +; +; light sources that are present in many locations... +[475:^N light coming from the shed|^N lightbulb] +[476:^N spotlight|^N light] +[477:^N street ^N lights|^N lamps ^N posts ^N light] +[478:something in the ^N air] ; Violet can't see light, so she +; complains about "something in the air" +; +; Brief location objects (479+N). +; +; These are used for seeing from a distance and for input, eg for +; 'examine tower' and 'go castle'. (Note that 'go scenery' also works). +; They also provide a link between the grid of synthesised locations +; and the real, static locations used for rooms inside buildings etc. +; +[480:^N shed|^N cabin] +[481:^N path] +[482:^N toppled ^N sepulchre] +; +; "time" noun used only for "write time". DO NOT use any synonyms +; such as "word" or "message". these are catered for in noun 137 +; (message 737) +[520:the word ^N time] ; (doesn't work with quotes!) +; +; CHEAT nouns... +; STUFF.. +;; [530:^N Ingrid ^N Bottomlow] +; ...WITH... +;; [531:^N turnips|^N semtex] +; +; Collective nouns... +[534:^N everything ^N all ^N every] +[535:^N ingredients] ; collective noun - was 'treasure' +;; [536:^N weapons] ; collective noun +[537:^N people|^N everyone ^N everybody] ; collective noun +;; [538:^N clothes|^N armour] +; +; -------------------------------------------------------------- +; +; Omni-present objects.. +[539:^N door] ; normal door, for the benefit of PRINTACTORACTION. It +; is apparently never described by PRINTOBJECT (so?). +[541:^N plants|^N weeds ^N flowers ^N daisy ^N bean ^N husk ^N grass +^N soil] +[542:^N be] +[543:^N room|^N ground ^N floor] ; used for output as well +[544:^N wall|^N walls] +[545:^N sky|^N sun ^N moon ^N air ^N stars] +; +; and finally, some miscellaneous nouns which are used miscellaneously. +[547:^N except ^N but] +[548:^N it|^N that ^N them ^N those ^N none ^N him ^N her] +[549:^N minute ^N minutes] +; +[551:^J then ^J next] +[552:^J therefore ^J so] +[553:^N I|^N you] ;you +; +; Pronouns... +[560:it] ; ita +[561:it] ; itan +[562:some] +[563:he] +[564:she] +[565:they] +[566:I] ; you ; "Scapeghost special" +[567:he] ; proper male +[568:she] ; proper female +; +[570:it] ; ita +[571:it] ; itan +[572:them] +[573:him] +[574:her] +[575:them] +[576:me] ; you ; "Scapeghost special" +[577:him] ; proper male +[578:her] ; proper female +; +; SEE ALSO 2430 - GRAHAM +; +; and some misc output messages +; plural endings, and other odd verb declension... +[579:~] ; print to avoid bug which can print a space after previous word +[580:s] +[581:es] +[582:is] ; used in examine +; +; Entry directions, in the form 'The animal enters from the +; outside'. (As opposed to 'The animal goes in' - the normal +; verb table.) Note that directions are reversed, so the offset +; into the table is the direction of the moving npc. +; +[585:from the south] ; north +[586:from the southwest] ; northeast +[587:from the west] ; east +[588:from the north] ; south +[589:from the northwest] ; southeast +[590:from the northeast] ; southwest +[591:from the east] ; west +[592:from the southeast] ; northwest +[593:from below] ; above +[594:from above] ; below +[595:from outside] ; inside +[596:from inside] ; outside +[597:from across the way] ; across +[598:by climbing] ; climb +[599:with a jump] ; jump +; +; -------------------------------------------------------------- +; +; Examine messages (600+N). NO full stops at end please. +; +; NPCs (1 onwards) +; People +[601:the same as I had always been, as far as I could tell] ; me +; +[602:the ghost of the landlord of one of the local pubs. He was +a good sort, always ready to help out|^N publican ^N landlord +^N bartender ^N ghostly ^N figure] ; Joe +; +[603:a thin, pale ghost] ; Bert +; +[604:the ghost of Bert's loving wife] ; Edna +; +[605:an impeccably dressed ghost, with an irritatingly smug +expression] ; David +; +[606:an elderly ghost who spent much of his time posing as a +statue. Some reckoned he was just bone idle|^N statue] ; Alex +; +[607:a sad, self-pitying spirit. She was of the quiet whimpering +variety, that by the end of a night's haunting is a lot more +wearing than those who shout and make a fuss] ; Edith +; +[608:the stubborn old ghost of a stubborn old soldier, who was +living in the past] ; Colonel +; +[609:the ghost of a frail old lady who had gone blind in the last +years before her death] ; Violet +; +[610:a solemn crowd, most of them fighting back tears or sobbing +openly into their handkerchiefs. But there were others in +police uniforms, whose stony expressions showed that their +attendance was just a matter of duty. +% %I looked at each, wondering who they were. My mind felt like +quicksand as I stared at all the unknown, familiar faces, trying +to get some response that would help me to remember. But if they +looked my way at all, they looked straight through me as if I +wasn't there|^N police ^N colleagues ^N policeman ^N policemen] ; mourners +; +[611:difficult to place at first, but then it clicked. He was +^N Severian, a new ^N recruit to the drugs squad. +% %The slight hint of a devious smile separated him from the rest +of the mourners. I gave him a long hard look, weighing up where +he stood, but he ignored me and smoked a ^N cigarette|^N crook +^N criminal ^N villain ^N policeman] ; crook +; +[612:a grey old man with a stern, lined face] ; supervisor +; +[613:a weather-beaten old cove, who squinted at the ground through +thick bottle-glass spectacles] ; workman +; +[614:staggering drunkenly through the cemetery, passing a bottle +of vodka between them] ; vandals +; +; Animals +[615:a flea-ridden ^N stray, with no home but the cemetery|^N throat +^N neck ^N mouth] ; dog +; +; ordinary objects (80 onwards) +; +; light objects in order... +[680:the merest wisp of ^N gossamer ^N threads, waiting to be carried +off by the next breeze] ; thistledown +; +[681:a last fragment of a dying flower, so pale and thin it was +almost translucent] ; petal +; +[682:a dry beech leaf of russet brown, the plaything of autumn +winds, now tossed aside and forgotten] ; leaf +; +[683:a cardboard flap, the inside nearly bare but for the torn +off ^N tabs. The cover advertised a car hire company in South +America|^N match ^N book ^N matchbox ^N matches] ; matchbook +; +[684:a small, well-rounded ^N flint, probably from one of the +gravel paths] ; pebble +; +[685:printed with, "For Alan Chance, a much loved man and +long-serving police officer, murdered in the line of duty. His +family and friends shall all miss him dearly"] ; white card +; +[686:imprinted in faded writing with, "In memory of Edna +Willmot. She died a widow, but now shares eternity with her +much loved husband"] ; yellow card +; +[687:a long curved bone, with jagged ends] ; fishbone +; +[688:a scrap of ^N wood and ^N bark] ; twig +; +[689:a slim model, with a flat plastic case and a thin strap] ; watch +; +[690:a small brass dome, with a ^N leather ^N thong for it to hang +in the twilight] ; bell +; +[691:the cast iron pointer which had broken off the sundial. Much +of the lacy ironwork that made up its body had rusted away, leaving +only the thin remnants of the arm] ; gnomon +; +; heavy objects... +[695:full of ^N biscuits] ; carrier bag +; +[696:the ^N Daily ^N Mail, dated the first of November 1989. +Presumably today. Something niggled at the back of my mind, and +I remembered that the gangsters had set up a meet for the second. +Tomorrow they would be collecting their hard drugs, turning them +into into hard cash and escaping. Which meant they would no longer +need a hostage. Sarah would die unless I could immobilise the +drugs hoard tonight]; newspaper +; +[697:a slug-chewed old copy, but the name was still +legible] ; time magazine +; +[698:half full of ^N vodka - a clean spirit with a heck of a kick, +just like I aimed to be|^N booze ^N alcohol] ; bottle +; +[699:a sturdy old ^N tool, the ^N blade shiny with wear and the +handle wrapped in soft string to give a better grip] ; shovel +; +[700:glistening with life and vitality] +; new wreath +; +[701:of ^N laurel and hardy evergreens, once crisp dark green and +now beginning to fade] ; Bert's wreath +; +[702:faded and tatty; its ^N flowers wilted and leaves shrivelled] +; faded wreath +; +; static objects (110 onwards) +[710:a ^A red ^A plastic ^N push-button] ; button +; +[711:an ^A old-fashioned ^N bakelite light switch] ; switch +; +[712:a 40 watt clear bulb, and far too bright for my ghostly gaze] +; lightbulb in shed +; +[713:a galvanised iron lock for the shed door|^N levers] ; lock +; +[714:a small steel ^N cylinder, which had to be turned to unlock +the door. The three levers rested against it, preventing the +barrel from turning unless they all pushed simultaneously into +place. What I needed was the key to doing this] ; barrel +; +[715:part of the lock mechanism] ; short lever +; +[716:part of the lock mechanism] ; medium lever +; +[717:part of the lock mechanism] ; long lever +; +[718:a ^A thick ^N twist of ^N plaitted rope, fastened firmly +to the door] +; rope handle +; +[719:a ^A thick ^N layer of ^A loose ^N pebbles] ; gravel +; +[720:a ^A squat ^A glass ^N vessel, its ^N base green with ^N algae] ; vase +; +[721:about waist high; its thin red ^N branches bare of leaves] +; dog bush +; +[722:an untidy ^N heap of ^N prunings and wind-broken wood, left +to rot away] ; branches +; +[723:beside my grave] ; mound +; +[724:a hefty stone job; its ^N lid much too heavy for a ghost +to move. A flash of white caught my attention, so I peered +through a ^A small ^N crack under the ^N rim. A faint streak of +moonlight filtered through the crack to reveal a pile +of white plastic bags] +; vault +; +[725:a ^A high-powered ^N light to illuminate the repair fund +thermometer|^N bulb] +; spotlight +; +[726:a ^A large, ^A wooden ^N model that showed the progress of +the church repair fund. It looked like a severe case of +hypothermia. The thermometer was bolted to the crumbling +^N abbey ^N wall] + +; thermometer +; +[727:a ^A dusty ^A old tree, its ^N branches splayed +with age] ; yew tree +; +[728:an ^A octagonal ^N rim, supported on short stone ^N pillars] ; seat +; +[729:, at first glance, a mass of ^A jumbled ^N stones. Looking closer, +I could see a ^N plinth and some carvings|^N stone] ; stonework +; +[730:^A weathered ^N engravings; a ^A fading ^N memorial to +whoever was buried here] ; carvings +; +[731:a ^A decorated ^A square ^N stone ^N base, that may once +have been topped by a cross] ; plinth +; +[732:a very lifelike figure, despite being cracked and blackened +with age. It was of a young man, possibly in a deep sleep since +his eyes were shut tightly] ; statue +; +[733:a ^A top-heavy ^A stone ^N ornament, with a ^A fluted ^N pillar +and a ^A round ^N top on which its ^N gnomon cast a ^A faint +^N shadow] ; sundial +; +[734:smashed into a ^A scatter of ^A jagged ^N pieces] ; broken sundial +; +[735:a ^A marble ^N coffin, decorated like a ^A miniature +^N Greek ^N temple] +; sarcophagus +; +[736:a wobbly ^A Greek one] ; urn +; +[737:intended for me to erase, thus ending "time"] +; seen in gravel DO NOT CHANGE +; +[738:built of ^A thick ^N planks] ; shed door +; +[739:sagging above the ^N path. The ^N thermometer was clamped +to it with ^A rusting ^N bolts] ; wall near thermometer +; +; vehicles (140 onwards) +[740:a small ^A electric ^N buggy, like a ^A road-going ^N trolly +with a ^A bench ^N seat|^N pram] +; cart +; +; invisible objects (150 onwards) +[750:of ^A inscribed ^N marble, the words hidden by ^N moss] ; headstone. omni-present on grid +; +[751:marked in the usual way] ; grave. omni-present on grid +; +[752:an ^A old ^A iron ^N gate leading east to the car park] ; gate +; +[753:the entrance to the graveyard. I was certainly not going +to use it as an exit] ; main gate +; +[754:a ^A wooden ^N construction which supported the spotlight] ; frame +; +[755:the ^A blackened ^N shell of a burnt and ruined church. I +seemed to recall that we never did establish if it was arson or +an accident] ; church +; +[756:a "church repair fund" indicator, set against the ^N wall in +front of the spotlight] +; thermometer from spotlight +; +[757:a "church repair fund" indicator, bolted to the ^N wall beside +the path] ; thermometer from vault +; +[759:where the workmen kept their tools and had their tea breaks] ; shed +; +[760:deeply trodden into the ^N gravel in front of the shed door] +; footprints +; +[761:a ^A granite ^N memorial from the first world war. Typically, +it named only those who died quickly; spurning the deeds and +sacrifices of the survivors] ; cenotaph +; +[762:a last flurry of ^A yellow ^N flowers among the ^A browning +^N heads of the dying Autumn]; marigolds +; +[763:a ^A big ^A old ^N copper ^N beech, its ^A broad ^N branches +reaching up to the heavens] ; beech tree +; +[764:a ^A coarse ^N growth of ^A thick-stemmed ^N elders] ; bushes +; +[765:still bearing their ^A cheerful ^A red ^N flowers] ; poppies +; +[766:a collection of ^A anonymous ^N markers] ; crosses +; +[767:from high street shops, apparently just another ^N pile +of ^N litter. But I could sense the ^N narcotics within, +wrapped against the damp in ^N layers of ^N plastic|^N pile +^N dope ^N hash ^N smack ^N cannabis ^N marijuana ^N speed +^N heroin ^N cocaine ^N LSD ^N acid ^N hashish ^N drugs] +; +[769:the south end of the ^A crumbling ^A abbey ^N wall. It teetered +dangerously above the vault] ; wall near vault +; +[770:thick with ^N dust and ^N cobwebs. A ^A small ^N hole had been +wiped clear, so that the workmen could keep watch for their boss +coming] ; window inside shed +; +[771:streaked with ^N grime, but solid and firmly shut] +; window outside shed +; +[772:a motley host of other ghosts] +; company +; +; light sources that are present in many locations... +[775:the light in the shed] ; light from shed +; +[776:amazingly bright] ; light from spotlight +; +[777:a horrid yellow] ; street lights +; +[778:illuminated by the light] ; illuminated air +; +; Brief location objects (479+N). +; +; These are used for seeing from a distance and for input, eg for +; 'examine tower' and 'go castle'. (Note that 'go scenery' also works). +; They also provide a link between the grid of synthesised locations +; and the real, static locations used for rooms inside buildings etc. +; +[780:the workmen's tool shed] ; shed +[781:a well-worn path] ; path +[782:a large tomb that had collapsed under its own weight] ; sepulchre +; +; -------------------------------------------------------------- +; +; Short-Form room Descriptions (800+N). No full stops at end please. +; These are the brief mode descriptions; they are prefixed by 'you +; are' and, in verbose mode, messages 1100+N are appended. +; +; room 1 is used as exit modifier for synthesised rooms. +; rooms 2..20 are those with static connections; i.e. not on the +; synthesised grid. +; +; description order is: +; 'I was' '800++' '1100++' '.' +; short long +; +;Outdoors +; +[803:on a wide ^A gravel ^N path] +[804:on a ^A muddy ^N lawn] +[805:on a ^A gravel ^N path] +[806:at a ^N junction in the ^N path] +[807:beside a ^A rusty ^N gate] +[808:by the ^A main ^N gate] +[809:by the south ^N wall] +[810:on a ^N grassy ^N lawn] +[811:by ^N Edith ^N Dean's headstone] +; +;Indoors +; +[815:inside the ^N shed] +; +; "echo locations..." +; +;Indoors +; +[820:by the tall oak door of the burnt church. Though charred +by the fire, the door was still solid and was too thick for ghosts +to pass through. As there was nothing to do there, I turned and +drifted back to the path] ; burnt church +; +;Outdoors +; +[830:on a north-south path leading towards the car park. As I +floated away from my grave, I felt the cemetery pulling at me, +sapping my strength. Before long I had faded so much that I +couldn't go on. I turned, and as I returned my strength built +up once more] +; car park gate +; +[831:beginning to fade as I neared the boundary of the cemetery. +I could see the road ahead, but was too drained to move even +another inch towards it. What strength I had seemed to come from +the cemetery, and to leave me if I strayed too far from my grave. +I had to turn back] ; south road from main gate +; +[832:weakening rapidly as I got further from my grave. It soon +became obvious that I wouldn't have the strength to reach the +road ahead, and I turned back] ; south road from yew +; +[833:fading as I drew towards the limits of the cemetery. The +road was close ahead, but I hadn't the strength to carry on. +I turned and let myself be drawn back] ; south road from lawn +; +;Grid rooms +; +[840:by a ^A toppled ^N sepulchre] +[841:west of the ^N shed] +[842:at the ^N end of the ^N path] +[843:at a ^N corner in the ^N gravel ^N path] +[844:standing beside ^N my ^N own grave] +[845:by the headstone of Violet Conway] +[846:among an untidy group of ^A old ^N tombstones] +[847:in a ^N patch of ^A swishy ^N grass] +[848:in a ^A circular ^N clearing] +[849:by Joe Danby's grave] +[850:by a grave covered in ^N marigolds] +[851:by a ^A granite ^N cenotaph] +[852:by the tomb of David Ridge] +[853:beneath a ^A copper ^N beech] +[854:among the new graves] +[855:in a ^N patch of ^A elder ^N bushes] +[856:by Colonel Rycroft's tombstone] +[857:on a ^A neatly ^A mowed ^N lawn] +[858:by some ^A new graves] +[859:by the Willmot graves] +; +; -------------------------------------------------------------- +; +; Now verbose additions to brief location descriptions (1100+n). No +; full stops at end please. These are printed immediately after each +; short description (800+N), without any intervening punctuation. +; (You may start a message with either punctuation or just text.) +; +;Outdoors +; +[1103: leading south from the graves] ; my grave +; +; NB: SPOTLIGHT MAY BE ON OR OFF, SO NO DESCRIPTIONS OF LIGHT, PLEASE! +[1104: to the southeast of the graveyard. A ^A tall ^A wooden +^N frame supported a large spotlight] ; spotlight area +; +[1105: which ran east towards the graveyard and south towards the +main entrance to the cemetery. Just to the north were the ^N ruins +of an ^A old ^N church] ; outside church +; +[1106: where a ^A large ^A stone ^N vault stood, squat and +solid] ; beside vault +; +[1107: which was jammed open, its ^N hinges caked with ^N rust. A +^N path led east towards the cemetery car park] ; by car park gate +; +[1108: which led south out of the cemetery and away towards the town] +; main gate +; +[1109: of the cemetery. The path here was covered with the ^A fallen +^N leaves of nearby ^N trees] ; by yew +; +[1110: at the southeast ^N corner of the cemetery. There was nothing +but ^A long ^N grass between here and the south ^N wall] ; lawn +; +[1111: in a remote and ^A lonely ^N corner of the cemetery] ; Edith's grave +; +;Indoors +; +[1115: where the workmen kept their ^N tools] ; shed +; +;Grid rooms +; +[1140:, overgrown with ^N weeds and ^N grass] ; sepulchre +; +[1141: where a pile of twigs and branches lay rotting] +; pruned branches +; +[1142: outside an ^A old ^A weather-beaten ^N shed] ; end of path +; +[1143: which wound west to a ^N shed and south beside the church] +; corner of path +; +;; [1144:] ; my grave +; +[1145:, beside the ^N hedge] ; Violet's grave +; +[1146:, leaning sleepily together. Others were cloaked with +^N moss and ^N lichens, and obscured behind a ^N veil of +^A uncut ^N grass] +; overgrown tombstones +; +[1147:, heavy with ^N dew] ; long grass +; +[1148: between the graves] ; sundial +; +[1149:. It was a ^A well-tended ^N spot, for this was a man who +had been loved by many in the village] ; Joe's grave +; +[1150:, their gold evoking the memory of summers past] ; marigolds +; +[1151:. A ^A small ^N flowerbed of poppies had been grown around +the ^N base of the monument as a mark of respect] ; cenotaph +; +[1152:, with its imposing headstone] ; David's grave +; +[1153:. Golden ^N leaves rustled gently in the breeze] ; beech tree +; +[1154:, a neatly aligned set of black and white headstones and +crosses] ; new graves +; +[1155: in the northwest corner of the cemetery] ; elder bushes +; +[1156:, in the ^N shadow of the ^N war ^N memorial to the +south] ; Colonel's grave +; +[1157: where a collection of ^A marble ^N crosses stood white and proud] +; lawn +; +[1158:, with ^A trim ^A low ^N walls of ^N stone enclosing +^A white ^A stone ^N chippings] ; new graves +; +[1159: where a tombstone bore a double inscription under the +word "reunited"] ; Willmot graves +; +; -------------------------------------------------------------- +; +; 1350+n are messages printed on first entering each room +; (VisitTable) +; +; Twilight (1350++) +; +[1353:] +; +[1354:it stood gaunt and tall in the gloom of the evening. ] +; spotlight area +; +[1355:the church was blackened by fire; its ancient stone +^N walls streaked with ^N soot and its ^N roof a ^N jumble of +^A cracked ^N slates. ] ; outside church +; +[1356:the abbey wall to the west bulged ominously towards +the vault, as if it might topple any minute. ] ; vault +; +[1357:the cortege that had brought me had gone now, leaving me +behind. They don't do return tickets for hearses. ] ; gate +; +[1358:the streets had been my patch, but I'd got a new beat +now. ] ; main gate +; +[1359:% %oddly enough, the leaves made no rustling sounds as I +walked over them. ] ; yew +; +[1360:"Reserved for future expansion" - wasn't that a message I +had come across on the station's computer system? And here as well.. ] +; lawn +; +[1361:this ^A tidy ^N place seemed scarcely touched by the passage +of time. ] ; Edith's grave +; +[1365:the floor was caked with ^N mud, and the ^N corners and +^N roof were draped with ^A old ^N cobwebs. ] ; inside shed +; +[1390:^A broken ^N stones glistened with the ^A evening +^N dew. ] ; sepulchre +; +[1391:a hedgehog snuffled its way over - or through - my feet. +"That makes a change", I thought, "being run over by a +hedgehog". ] ; branches +; +[1392:thick ^N clods of ^N earth clung to the ^N ledge beneath +the door, where people had scraped the worst off their boots +before entering. ] +; outside shed +; +[1393:I felt a strange pull towards the east. ] ; path +; +[1394:% %as the mourners prepared to file away, ignoring me, +I was still rooted to the spot. This was going to take a bit +of getting used to. ] ; my grave +; +[1395:the thin branches of the bush swayed slightly in the +breeze. ] ; Violet's grave +; +[1396:this ^A peaceful ^N part of the cemetery seemed so old that +even its ghosts had faded and only Nature remained. ] ; tombstones +; +[1397:the ^N webs of a thousand ^N spiders glistened like frost. ] +; long grass +; +[1398:the moon had risen, casting a ^A faint ^N shadow across the +top of the sundial. ] ; sundial area +; +[1399:the ^N inscription on the ^N stone read, "The great Landlord +has called 'Time' on our Joe". ] ; Joe's grave +; +[1400:the marigolds must have been beautiful in the Summer, +and even now there were still some in flower. ] ; marigolds +; +[1401:a broad swathe of trampled plants showed that not +everyone shared this respect. ] ; cenotaph +; +[1402:there lay someone who didn't want to be forgotten. ] +; David's grave +; +[1403:% %The tree cast a ^A long ^N shadow across the ^N leaves +that carpeted the ground. ] +; beech tree (statue) +; +[1404:they were all the same height, all the same width. Nice +and tidy, but soulless compared with the rambling variety of +the older memorials in the west part of the cemetery. ] ; new graves +; +[1405:a ^N flock of ^N starlings flew past, on their way to roost. ] +; elder bushes +; +[1406:it was a fitting resting place for an old soldier. ] +; Colonel's grave +; +[1407:a ^A low ^N mist hovered above the grass; a ^A rising +^N tide of grey threatening to drown the crosses. ] ; crosses +; +[1408:a ^A stray ^N cat fled as I approached. ] ; new graves +; +[1409:the tombstone reminded me that I intended to get "reunited" +with my killers, and it was about time that I got moving on that. ] +; Willmot graves +; +; Night Time (1410++) +; +[1413:% %in the dark of the night, the church wall seemed to +lean heavily in towards the path, its wide shadow broken only +by the dim patches of light that filtered through the ^N cracks +in the ^A stone. ] +; +[1414:the spotlight illuminated the "church repair fund" +^N thermometer to the west. ] ; spotlight area +; +[1415:the ^A shattered ^N roof ^N line stood out starkly against the +night sky. ] ; outside church +; +[1416:there was something menacing about the vault, as if it +were full of evil. I shook off the notion. What has a ghost to +be scared of? ] ; vault +; +[1417:it was still and deserted now - there was more going on +in the cemetery, for those that had eyes to see it. ] ; gate +; +[1418:^A distant ^A street ^N lamps cast a ^A pale ^A orange +^N glow on the ^A low ^N clouds overhead. ] ; main gate +; +[1419:a ^N bird rustled the branches as I passed. "Do birds +have ghostly nightmares?" I wondered idly. ] ; yew +; +[1420:the ^A heavy ^N dew dragged at my legs I floated +over the lawn. ] ; lawn +; +[1421:Edith seemed to be sniffling quietly. ] ; Edith's grave +; +[1425:a ^N mouse scurried across the floor, snatching up ^A biscuit +^N crumbs. ] ; inside shed +; +[1450:it must have been an impressive construction once, but +nothing stands forever. ] ; sepulchre +; +[1451:] ; branches +; +[1452:I knew that there must be things in that shed that +would help me, if only I could get to them. ] ; outside shed +; +;; [1453:] ; path +; +[1454:% %my eyes wandered absently and I found myself looking +to the north, where a neat row of new headstones stood. Looking +towards the west, I noticed that the gravestones there were +much older, worn and stained by time, some of them badly +broken. ] ; my grave +; +[1455:a ^A spider span a broad web between its ^N branches and the +neighbouring headstone. ] ; Violet's grave +; +;; [1456:] ; tombstones +; +[1457:the dew was painful to my feet and I thought wryly that I +should have died with my boots on - preferably wellies. ] ; long grass +; +;; [1458:] ; sundial area +; +[1459:% %on Sundays, there would always be a fresh wreath or +bunch of flowers on Joe's grave, and someone came regularly +to cut the grass around it. ] ; Joe's grave +; +[1460:] ; marigolds +; +[1461:there was a barking cough over in the distance and a +fox trotted into view, its tail startling white in the light of +the moon. It saw me and, hackles raised, loped swiftly away. ] +; cenotaph +; +[1462:there was something challenging about this grave. +Something which seemed to say, "Prove that you're worthy to be +here". ] ; David's grave +; +[1463:something moved within the stonework. ] +; beech tree (statue) +; +[1464:the neat rows stretched off into the distance. ] ; new graves +; +[1465:a ^N bat fluttered overhead, feasting off the ^N insects +drawn to the ^A overripe ^A elder ^N berries. ] ; elder bushes +; +[1466:the tall tombstone still stood stiffly to attention, +unbowed by the passing years. ] ; Colonel's grave +; +[1467:the ^A long ^N shadows of the crosses cast a ^N checkerboard +on the ^A trimmed ^N grass. ] ; crosses +; +[1468:] ; new graves +; +[1469:a ^N pair of ^N squirrels chattered and squabbled over an +^N acorn at the foot of the grave, before chasing one another west. ] +; Willmot graves +; +; -------------------------------------------------------------- +; +; Message pairs for use in describing containment positions +; also used for preposition table +; +; part printed before container +; +[1600:I could see] ; 0 - you can see +[1601:^P on |^P onto] ; 1 - on +[1602:^P underneath|^P below ^P under] ; 2 - under +[1603:^P behind] ; 3 - behind +[1604:] ; 4 - carrying +[1605:] ; 5 - wearing +;; [1606:in|^P at] ; 6 - blocking the hole +[1607:^P in |^P into ^P inside] ; 7 - in +;; [1608:hanging from] ; 8 - hanging from +;; [1609:growing from ] ; 9 - growing from +;; [1610:^P between] ;10 - tied between is tied a rope +;; [1611:] ;11 - the carter was pushing a cart +;; [1612:lying on] ;12 - lying on +;; [1613:sitting on] ;13 - sitting on +[1614:fastened to] ;14 - fastened to +[1615:lodged in the throat of] ;15 - lodged in throat (Scapeghost.1) +; +[1616:^P with|^P using] +[1617:^P from] +; +; part printed between container and contained. +; +[1640:] ; 0 - I could see +[1641:was] ; 1 - on +[1642:was] ; 2 - under +[1643:was] ; 3 - behind +[1644:was carrying] ; 4 - carrying +[1645:was wearing] ; 5 - wearing +;; [1646:was blocked by] ; 6 - is blocked by +[1647:was] ; 7 - in +;; [1648:was] ; 8 - hanging from +;; [1649:was] ; 9 - growing from +;; [1650:was tied] ;10 - tied between +;; [1651:was driving] ;11 - the carter was pushing a cart +;; [1652:] ;12 - lying on +;; [1653:] ;13 - sitting on +[1654:was] ;14 - fastened to +[1655:was] ;15 - lodged in throat (Scapeghost.1) +; +; for plural contents... +[1670:] ; 0 - I could see +[1671:were] ; 1 - on +[1672:were] ; 2 - under +[1673:were] ; 3 - behind +[1674:was carrying] ; 4 - carrying +[1675:was wearing] ; 5 - wearing +;; [1676:was blocked by] ; 6 - is blocked by +[1677:were] ; 7 - in +;; [1678:were] ; 8 - hanging from +;; [1679:were] ; 9 - growing from +;; [1680:was tied] ;10 - tied between +;; [1681:was driving] ;11 - the carter was pushing a cart +;; [1682:] ;12 - lying on +;; [1683:] ;13 - sitting on +[1684:were] ;14 - fastened to +[1685:were] ;15 - lodged in throat (Scapeghost.1) +; +; (1700+N is part printed before 'you') +; +; 1740+N is part printed between you and object(s) +[1740:] ; 0 - I could see +[1741:was on] ; 1 - on +[1742:] ; 2 - under +[1743:] ; 3 - behind +[1744:owned] ; 4 - carried +[1745:was wearing] ; 5 - worn +;; [1746:was riding] ; 6 - riding +[1747:was in] ; 7 - in +;; [1748:were] ; 8 - hanging from +;; [1749:were] ; 9 - growing from +;; [1750:was tied] ;10 - tied between +;; [1751:was driving] ;11 - pushing +;; [1752:was lying on] ;12 - lying on +;; [1753:was sitting on] ;13 - sitting on +[1754:was fastened to] ;14 - fastened to +[1755:] ;15 - lodged in throat (Scapeghost.1) +; +; for plural prepositions... +; 1770+N is part printed between you and object(s) +[1770:] ; 0 - I could see +[1771:were on] ; 1 - on +[1772:] ; 2 - under +[1773:] ; 3 - behind +[1774:owned] ; 4 - carried +[1775:were wearing] ; 5 - worn +;; [1776:were riding] ; 6 - riding +[1777:were in] ; 7 - in +;; [1778:were] ; 8 - hanging from +;; [1779:were] ; 9 - growing from +;; [1780:was tied] ;10 - tied between +;; [1781:was driving] ;11 - the carter was pushing a cart +;; [1782:were lying on] ;12 - lying on +;; [1783:were sitting on] ;13 - sitting on +[1784:were fastened to] ;14 - fastened to +; +[1800:^P off] +[1801:^P up] +[1802:^P down] +[1803:^P to] +[1804:^P out] +[1805:^P from the ] ; used for npc motion +[1806:^P for] +[1807:^P until] +[1808:^P debug] +[1809:^P through] +[1810:^P about] +; +; Parser messages.. +[2000:you don't need to use "] +[2001:" to finish the game] +; +[2003:I don't understand the word "] +[2004:" when used like that] +; +[2006:I was ] +[2007:in a ] ; as in 'You are in an alder forest +[2008:in an ] +[2009:exits led in all directions] +; +; general error message when parsing has broken down. +[2010:I don't understand what you mean] +[2011:I couldn't see] +[2012:I didn't have] +[2013:I already had] +[2014:(Perhaps I'm having an off night, but I really haven't the +ghost of a notion as to what you are on about)] +[2015:it's too far away] ; examine, take etc. scenery objects +[2016:I can't find a verb in that sentence] +[2017:it's not there] +[2018:there were too many nouns in that sentence] +[2019:I couldn't see that here] +[2020:I owned nothing at all. ] +[2021:it was dark. ] +[2022:I couldn't reach that from here] +; +[2036:sorry, I don't fully understand that verb] +; ^ verb in keyword table but not in CALLVERB routine +[2037:there didn't seem to be anything suitable. ] +[2038:said "That was a rhetorical question"] +[2039:what a mouthful! ] +; +[2044:couldn't have ] ; as in 'I couldn't have knocked that' +; +[2046:that] +[2047:here] +[2048:I couldn't find ] +; +[2053:it's not clear to what ] +[2054: is referring] +; +; error messages for NPC's +[2060:are you talking to yourself again? ] +[2061:I couldn't talk to several people at once] +; +; Standard Adventure output messages +; +[2100:Welcome to "Scapeghost", copyright (C) 1989 from Level 9 +Computing. Please enter the number of the part you want to play; +the start is part 1. +%1..November Graveyard +%2..Haunted House +%3..Poltergeist +%> ] ; && +[2101:Please enter 1 2 or 3.%] ; && +[2102:My head cleared, I looked around, and found myself +standing among a crowd of dark suits at a funeral. How had +I got there? What was going on? + +% %The last thing I remembered was driving in the motor with +Sarah, on our way to meet with the drugs gang. Our long +patient months of undercover work were about to pay off. +But what had happened then? + +% %I stared around at the others, as a +priest mouthed platitudes over a nearby grave, and wondered +who had copped it this time. Then I read the name on a nearby +wreath...% %] +; +; examining something greater than maxobject: (but not scenery) +; rare occurrence - mostly for omnipresent objects, numbers, spells +[2112:it looked exactly as I had expected. ] +; +[2114:I couldn't go that way] +; +[2115:through the door] +; +[2117:it's already open] +; +[2123:I couldn't put ] ; paired with 2124 +[2124:there] +; +[2126:I would have to drop it first] +[2127:I would have to pick it up first] +[2128:%Did you know that you can go quickly to a far off place? Eg +"RUN TO VAULT" or "GOTO VIOLET"%] +; +; 2130 is used when player refers to scenery which is not nearby +[2130:I can't find a reference to "] +[2131:I was on it! ] +[2132:what? ] +[2133:where? ] +[2134:I was wearing ] +[2135:please try again, saying what with. ] +[2136:which one? ] +[2137:at what? ] +; +[2139:was full] +[2140:" here] +; +[2142:I couldn't wear ] +; +[2147:I was already wearing that] +[2148:I found that I didn't need to do that] +; +; Confirmation messages +; +[2152:worn] +[2153:OK] +; +[2155:time passed. ] +[2156:said] +; +[2158:I found that I would have to untie it first] +; +[2160:YES or NO please.%] +; +[2172:nobody wants it] +; +; Death, scoring, game control etc. +; +[2200:really restart? ] +[2202:really restore? ] +[2203:% %did I continue? ] +;;[2204:said, "Thank you"] ; >> Pete 14/9/89 +; +[2209:% %the adventure had come to an end. +%Please type RESTART, UNDO, RESTORE or RAM RESTORE: ] ; && +[2210:the room was badly damaged] ; attack/fireball room +[2211:the place was already smashed] +[2212:really! You're so destructive! ] +[2213:it looks as though the vandals have been at work here] +; +[2215:that's too long to wait] ; won't wait +[2216:try eg Wait for Joe, or Wait 5] +; +; Score messages.. +[2240:%I had scored ] +[2241:% %the adventure had come to an end.%] +[2242: out of 300 and was ] +[2243:-] ; minus sign +; +; Ratings +[2249:a faded vision] ; -ve score +[2250:a vain spirit] +[2251:an incompetent ghost] +[2252:a harmless apparition] +[2253:an ordinary ghost] +[2254:a competent spirit] +[2255:progressing in the spirit world] +[2256:a strong presence] +[2257:a powerful phantasm] +[2258:a vivid phantom] +[2259:a dominant supernatural force] +[2260:a poltergeist] ; Used in case of score overflow +; +[2300:UNDO and RAM SAVE//RESTORE don't work in this version. ] ; && +[2301:%please insert save disk and press a key. %] ; && disc +[2302:%please insert game disk. %] ; && +[2308:I couldn't go back further than this. ] ; && +[2309:(this version allows you to use RAM SAVE and RAM RESTORE to +save a position in memory, and UNDO to take back bad moves).%] ; && +[2310:I can't find that saved position in memory. Perhaps you've +restarted the game. ] ; && +; +[2311:% %I am about to start another part of the game. Do you +want to save my position first, just in case? ] ; && tape +[2312:that data was not saved from Scapeghost. ] +[2313:play the game tape to load part ] ; && tape +[2314:% %I am about to start another part of the game. Do you +want to go ahead? ] ; && tape +; +[2319:you've started in the middle of the game. Please +restore a position saved from this part. ] ; && tape +; +; misc jokey messages (slightly more complex than echo verbs).. +;;[2401:that would be a pretty silly thing to do] ; attack me ; >> Pete 14/9/89 +[2404:I could not smell anything] +[2405:I found nothing much to write about] +[2406:I didn't smell of anything, being a ghost] ; == altered for Scapeghost == +[2407:I said hello] +[2416:to be, or not to be, that is the question] +[2417:knocked with a firm fist] +; follow target is destroyed +[2420:I couldn't find what I was looking for] +; +; Additional pronouns used when actor is referring to himself. +; This prevents: +; EXAMINE Joe +; Joe was... +; Joe, EXAMINE Joe +; Joe examined HE. +[2430:itself] ; ita +[2431:itself] ; itan +[2432:themselves] +[2433:himself] +[2434:herself] +[2435:themselves] +[2436:myself] ; ; "Scapeghost special" +[2437:himself] ; proper male +[2438:herself] ; proper female +; +; used by vehicles +[2470:got out of the cart ] +[2471:drove the cart to the ] +[2472:drove the cart ] +; +; GROUP movement of animals +[2480:trotted] +[2481:ran] +[2482:darted] +[2483:wandered] +[2484:went] +; +; GROUP movement of people +[2490:walked] +[2491:trudged] +[2492:stomped] +[2493:wandered] +[2494:went] +; +; GROUP movement of ghosts +[2500:floated] +[2501:drifted] +[2502:hovered] +[2503:glided] +[2504:went] +; +; used for a group of 4 or more followers +[2509:the company arrived ] +; +; experience when picking up light objects +[2510:I felt slightly stronger] ; Joe says 2850 +[2511:my strength seemed to be increasing] ; Joe says 2851 +[2512:I felt a little more solid] +[2513:my control over material objects was improving] +[2514:I felt much stronger and confident] +[2515:my strength was improving all the time] +[2516:I began to feel a much more experienced ghost] +[2517:I suddenly became less transparent than before] +[2518:I congratulated myself with my power over heavier objects] +[2519:I felt very confident and much stronger than before] +[2520:I prided myself on my improved strength] +[2521:my strength had reached its peak for my first night as +a ghost] ; Joe says 2852 +; +; handling of light and heavy objects +[2524:the dog, anxious to be helpful, picked it up again for me] +[2525:wasn't strong enough to carry that yet] + +[2527:my hands became weak and I dropped ] ; presence of light AND humans +[2528:would never be strong enough to carry that] ; lift heavy object +[2529:I was now strong enough, and ] ; ...I took the +; +; GROUP message for USER when humans are present +[2530:my strength seemed drained by the presence of ] +[2531:I began to fade when I saw ] +[2532:my powers seemed to drain while I was near ] +[2533:a sudden feeling of weakness was brought upon me by the +presence of ] +[2534:I sensed a feeling of distress when I was approached by ] +; +; shed light +[2550:the shed light went off. ] +[2551:the shed light came on. ] +[2552:% %the sudden shock of the light stabbed through me. I felt +myself fade and everything returned to darkness. I opened my eyes +and found myself back upon my own grave] ; also used by spotlight +[2554:the shed light was on] ; seen in lit areas +[2555:it was off] +[2556:it was on] ; added to examine message. Joe says 2858 +; +; actor is startled by light and sent back to grave. this message +; is printed if player is by their grave when they arrive +[2558:slowly materialised before me and complained about the +sudden effects of bright light] +; +; spotlight +[2560:the spotlight went off. ] +[2561:the spotlight came on. ] +[2564:the spotlight illuminated the whole of the southern part +of the cemetery] +; special cases when spotlight seen going on & off from shed. +; spotlight is NOT mentioned here, since it is only visible in the +; locations which it illuminates. +[2565:the button clicked to its "off" position. Looking through the +shed window, I noticed that the southern part of the cemetery had +become much darker. ] +[2566:the button clicked to its "on" position. I looked through the shed +window and saw that the southern part of the cemetery was now brightly +lit. Luckily,the light had little effect on me from that distance. ] +[2567:more pressure seemed to be needed to push it +properly] ; Joe says 2859 +; vandals joke about spotlight going off. +; this is printed regardless of the player being in same room +; as vandals or elsewhere. do not make any references to light +; here. +[2568:% %just then, I heard a young lout bellow, "Now even the bulb's +dead!" ] +; +; street lights +[2570:% %twilight gave way to darkness and the street lights came +on to the south of the cemetery. I felt myself begin to disperse +into the night air, and when I came to I was back beside my own grave. +% %A ghostly figure entered from the north and made its way towards +me...% %] +[2574:the street lights lit the road to the south of the cemetery] +; +; shed door +[2580:the door was too solid for any of the graveyard ghosts to +float through. I would have to work out how to open it] ; Joe says 2861 +; go in +[2581:it was closed] +[2582:it was open] ; examine door +; +; GROUP message for USER when light is present +[2590:I felt uneasy about ] +[2591:I began to feel weak because of ] +[2592:my powers seemed to be absorbed by ] +[2593:I found that I couldn't stand being close to ] +[2594:a sudden feeling of distress was brought upon me by ] +; +; GROUP message for NPC when light is present +[2600:refused to do anything until somebody turned off ] +[2601:did nothing but complain bitterly about ] +[2602:didn't seem to be able to do anything, except point +weakly at ] +[2603:floated about helplessly, refusing to do anything because of ] +[2604:hovered aimlessly around, set on doing nothing until +somebody switched off ] +; +; examine lights when not present +[2610:there were no bright lights here. ] +; +; wrong wreath taken to Edna +[2619:% %"That nasty thing's not my wreath", said Edna, as she saw +the faded wreath. "Mine was all nice and fresh"] ; Joe says 2862 +[2620:% %"That's not my wreath. It don't have my card on it", said +Edna, pointing at the new wreath] ; Joe says 2863 +; +; new wreath taken to Edna with her card in it +[2621:% %"Ah, you've found Bert's wreath, though it seems that +someone has mixed up the cards and put mine on it", said Edna +in a satisfied tone. +%"Well, thank goodness that squabble's over with", said Bert +with a sigh. "Now we might get a bit of peace and quiet around +here"] ; Joe says 2864 +[2622:% %"Oh look", said Edna as she inspected the wreath. "Someone +else's card has been put in here as well. We can't have that, can we?" +%She plucked out the white card and threw it onto the ground] +; +; not specified which wreath/card/lever +[2623:please try again, this time saying which one] +; +; statue turns into Alex +[2630:slowly, it began to take the shape of a ghostly +figure] ; Joe says 2865 +; +; push sundial +[2640:and it began to rock heavily] +[2641:and it teetered and keeled over. The heavy sundial +crashed down the steps, breaking into pieces as it fell to +the ground] ; Joe says 2866 +; +; Edith's "end of time" pun +[2650:% %"At last! The end of time!", cried Edith. "My curse has +been lifted and I am free!" +%Beaming with joy, she got up from her grave and danced around +her headstone. +%"How can I thank you?", she asked] +; Erase time from gravel. Joe says 2867 +[2651:% %Edith saw the gnomon and smiled with relief. "Oh, I'm so +happy!", she announced. "I'm free from my curse now that you've +brought about the end of time..."] ; Joe says 2868 +[2652:there seemed to be something in the bushes] ; Joe says 2869 +[2653:I found a magazine] ; Joe says 2870 +[2654:Edith snatched the magazine and said, "Of course! This will +free me from my curse!" +%She held it in the air and set fire to it. "I never thought I'd +see the end of time", she mused as the magazine burned +away] ; Joe says 2871 +[2655:it fell to the bottom and then smashed to pieces] +[2656:%Edith sighed with relief. "Wonderful!", she began, "that's the +end of time. I'm a free spirit at last!" +%She stretched her arms out and danced happily around her grave. +She smiled gratefully at me and said, "What ever can I do to +repay you?"] ; Joe says 2872 +; +; pushing urn to impress David +[2660:said, "Do it yourself if you want to show how good you are"] +[2661:I wasn't strong enough to rock the urn] ; Joe says 2873 +[2662:I pushed the urn and it rocked slightly. +% %"Hmm, not bad for a beginner", began David, who was obviously +impressed, though trying not to show it. "I might consider helping +you now", he added] ; Joe says 2874 +; +; unlock shed door +[2667:pushed the short lever briefly into place so that it wasn't +obstructing the barrel] +[2668:pushed the medium sized lever briefly into position] +[2669:pushed the long lever briefly into place] +[2670:found that the barrel wouldn't turn. Maybe it had something +to do with the levers] +[2671:turned the barrel and unlocked the door] ; Joe says 2875 +[2672:wasn't strong enough to pull the rope] +[2673: but nothing, since the door was already wide open] ; Joe says 2877 +[2674: but the shed door seemed to be locked] ; Joe says 2878 +[2675:, the shed door swung open and the dog darted inside. It +soon reappeared with the workman's lunch box, clinking with +bottles and bulging with biscuits. It struggled out of the +cemetery to eat its reward] ; Joe says 2879 +[2676:turned the barrel, but the lock was jammed open] ; Joe says 2880 +[2677:% %I suddenly felt very uneasy watching the dog leave the +cemetery. It was as if something had been left undone] +[2678:. A small bell jingled inside the shed] ; used before 2673,4,5 +[2679:a bell rang inside the shed. ] ; used on its own +; +; successively calming dog by stroking it etc. +[2680:the dog wagged its tail a little, but still seemed to be +frightened of me] +[2681:the dog lost some of its fears and sniffed me nervously] +[2682:the dog must have realised that I wasn't going to hurt it, +and it became quite friendly] ; Joe says 2881 +; +; trying to remove fishbone before dog is fully calmed +[2690:the dog snarled at me, with its fur bristling] +[2691:the dog backed away, growling. Not surprisingly, it seemed to be +afraid of ghosts] +[2692:the dog darted out of the way, as if confused] ; Joe says 2882 +; +; remove fishbone from dog +[2700:% %The dog yelped in panic and ran away from me, its tail +tucked between its legs] ; Joe says 2883 +[2701:reached through the dog's throat] +; +; vandals scared by switching shed light OR spotlight ON. +; this is printed regardless of the player being in same room +; as vandals or elsewhere. do not make any references to light +; here. +[2710:% %suddenly, I heard a young vandal shout, "Quick! Somebody's +in the shed!" +%Then another replied, "Come on, let's leg it over this wall!" +% %Soon after, I heard footsteps running alongside the burnt church +and the sound of them scrambling jumping over the wall. "Stone me!", +yelled one of them, "I nearly knocked the wall over". +%"Be quiet!", bellowed another at the top of his voice. +% %Soon, their footsteps faded into the distance as they ran from +the cemetery. ] +; +; solve "Violet puzzle" +[2720:"Oh, what a clever idea, young man", said Violet with a little +smile. "I can hear the bell nicely when the wind blows". +% %She got up from her grave and walked steadily towards me, "Now +I can get about the place without becoming lost", she said with +delight, "How ever can I thank you?"] +; can't remove bell from bush +[2721:said, "I wouldn't dream of doing a thing like that. Why, +Violet would never find her way back if I were to remove the bell"] +[2722:the bell jingled clearly as the bush quivered in the breeze] +; +; endgame thermometer puzzle +[2730:% %"it's beyond me why they bother collecting money", +commented Joe whilst pointing at the thermometer. "This place +is past repair; the first storm of winter will have the +whole wall down. Look at those cracks deep in the stone"] +; +; increasing tempest for each of the 9 ghosts +[2740:a light breeze seemed to blow against the thermometer] +[2741:the thermometer groaned quietly in the breeze] +[2742:I could feel a strong breeze blowing against the thermometer] +[2743:the breeze turned to a wind and spread itself over the wall] +[2744:dust and loose chippings blew into the air along the wall] +[2745:the thermometer leaned heavily and the wall began to crumble] +[2746:a strong gale blew the wall until it leaned heavily] +[2747:the increasing blast set the wall a-quiver, almost bringing +it to collapse] +[2748:% %finally, the wall could resist the wind's torment no longer, +and it began to topple over. Like a tidal wave crashing along a +shore, the collapse spread further and further south along the +course of the wall, until at last the southernmost section smashed +heavily onto the vault. +% %We all cheered as the vault was buried beneath an avalanche +of rubble, trapping the drugs hoard within it. Now the gangsters +would be delayed for a day or two, until enough of the debris +was cleared for them to be able to sneak back and recover their +loot. It would give me time to track down their hideout, and +perhaps tomorrow I would be be strong enough in spirit to leave +the churchyard and do it. +% %I could do nothing more today, for the night was now coming to +an end, and it was time for us ghosts to make our way back to our +graves] +; +; late additions +[2750:Bert blocked my hand] +[2760:rang the bell] +[2761:%"Oooh, that's nice!", cried Violet, "I can hear that a +treat! But I'm sure you've got better things to do than stand +by my grave, ringing the bell all night so I can find my way back"] +[2762:it rocked a little, but then settled back to its state of rest. +Maybe it wasn't ready to wake up yet] +[2763:% % +Gradually, the sun began to rise above the hills towards the +east, casting long drawn-out shadows across the cemetery. And +with the distant crow of a cockerel I realised that morning had +arrived, bringing with it an end to my existence as a ghost. +% %I knew that the crooks would collect their drugs and escape +today, so there was no chance to bring them to justice and clear +my name. I sadly faded away with a feeling of incompleteness..] +; +; "Pet" messages... (table driven) +; some remarks made by PET on various occurrences... +; +[2850:smiled and said, "Well done, mate. Keep at it and +you'll be on your way to lifting bigger things. Perhaps +even pushing up some daisies"] +; After 2510 (I took something light) +; +[2851:patted me through the back and said, "That's the spirit! +It won't be long before you can lift something +worthwhile"] ; After 2511 (I took something heavier) +; +[2852:grinned, "I guess you're one spirit that's not weak"] +; After 2521 (my strength had peaked) +; +;; [2854:urged me to drop whatever I was already carrying] +;; After 2526 (which seems to be missing) +; +[2858:added, "And I wish it was off"] ; After 2556 (light was on) +; +[2859:tried to slink out of the door] ; After 2567 (button stiff) +; +[2861:said, "Unless you've a built-in spirit duplicator, you're +going to need some help"] +; After 2580 (shed door closed) +; +[2862:muttered to me, "Fussy old crow, isn't she?!"] +; After 2619 (Edna rejected old wreath) +; +[2863:said, "I wonder where her card is?"] +; After 2620 (Edna rejected new wreath) +; +[2864:sniggered and muttered, "Hah! Some chance of that, +Bert"] ; After 2621 (Edna accepted wreath and Bert moaned) +; +[2865:grinned. "A familiar spirit, I see. Hello again, Alex"] +; After 2630 (Alex awoke) +; +[2866:tutted and sighed, "You're worse than the vandals around +here"] ; After 2641 (sundial broke) +; +[2867:clutched his stomach and groaned at the pun] +; After 2650 ('Time' has been erased from the gravel) +; +[2868:said, "Is that corny, or what?"] +; After 2651 (gnomon brought to illustrate end of time) +; +[2869:said, "Ooh, what's that in there?"] +; After 2652 (I saw something in the bushes) +; +[2870:shook his head. "Flamin' litter louts! They leave their stuff +lyin' around all over", he sighed] ; After 2653 (I found magazine) +; +[2871:laughed. "Edith will have forgotten all about breaking the +curse by tomorrow, but at least she's in high spirits tonight"] +; After 2654 (fate of magazine means 'End of Time') +; +[2872:groaned at the pun. Passing footsteps on the road outside +broke into a panic-stricken run] +; After 2656 (wrist watch smashed to mean 'End of Time') +; +[2873:said, "Try building up your strength by lifting light +objects"] ; After 2661 (I wasn't strong enough to rock the urn) +; +[2874:grinned and said in a whisper, "Well done, lad. You kicked +that Greek style bucket good and proper"] +; After 2662 (I rocked urn and recruited David) +; +[2875:rubbed his hands, saying, "Only you would have been good +enough to unlock the door and let us in"] +; After 2671 (I unlocked the door) +; +[2877:tapped his head and laughed] ; After 2673 (unlocked open door) +; +[2878:said, "A really powerful ghost could just walk through this +door, you know. But you will just have to tackle the lock"] +; After 2674 (door turned out to be locked) +; +[2879:laughed, "Sly little mutt!"] +; After 2675 (dog escaped with biscuits) +; +[2880:said, "I'd leave it unlocked to confuse the workmen next morning"] +; After 2676 (failed to lock shed door) +; +[2881:said, "Well, well. We've made a new friend"] +; After 2682 (dog become tame) +; +[2882:knelt by sinking slightly into the ground and said, "Nice +doggy. We're not going to hurt you". The dog backed away further] +; After 2690 (dog backed away) +; +[2883:said, "Don't worry, it'll come back"] +; After 2700 (I removed fishbone and dog jumped back) +; +; messages when people refuse an order. 2900+n +; Use ACTORM1Dot +; +[2902:said, "Just wait a while, I'll help you after we've finished +our ghost walk"] ; Joe +[2903:seemed too busy guarding his wreath from Edna] ; Bert +[2904:said, "You won't get any help from me unless you can get me +my wreath back"] ; Edna +[2905:sneered and said, "Why should I help a puny ghost like you?"] +; David +;; [2906:] ; Alex +[2907:wept softly and said, "I'd like to help you, but I'm cursed +to remain here until the end of time"] ; Edith +[2908:dismissed my request and said, "Sorry. Duty calls. Got to +stand guard against those young hooligans"] ; Colonel +[2909:said, "I'd love to help, but I fear that I may get lost if I +stray from my grave"] ; Violet +[2910:ignored me as if I wasn't there] ; mourners +[2911:looked straight through me] ; crook +[2912:walked straight through me] ; supervisor +[2913:stopped and listened, but had clearly not heard what I said] ; workman +[2914:paid no attention to me and carried on telling filthy jokes] +; vandals +[2915:didn't seem to hear my request] ; dog +; +; don't be silly GROUP... +[3100:don't be silly] +[3101:well, that's new] +[3102:sorry, no can do] +[3103:that's a funny thing to want to do] +[3104:that's a bit daft isn't it] +; +;;; nice try GROUP... ; >> Pete 14/9/89 +;;[3110:nice try, that's the spirit] ; >> Pete 14/9/89 +;;[3111:a good bash at the solution. Shame it doesn't work] ; >> Pete 14/9/89 +;;[3112:not a ghost of a chance, chum] ; >> Pete 14/9/89 +;;[3113:good idea, but it didn't work] ; >> Pete 14/9/89 +;;[3114:a good try, but it doesn't work] ; >> Pete 14/9/89 +; +; just scenery GROUP... +[3120:you might as well leave it alone] +[3121:I suggest that you forget about it] +[3122:that's not important to the game] +[3123:forget it. It's only scenery] +[3124:pay it no heed] +; +; missing object... +[3130:now what was the object of that? Try again] +[3131:sorry, I couldn't find an object in that] +[3132:please be more specific] +[3133:there was no object in that command] +[3134:do it to what? You didn't say] +; +; Nothing happened GROUP... +[3140:nothing happened] +[3141:that didn't seem to work] +[3142:there was no effect on anything] +[3143:that was remarkably useless] +[3144:that did nothing at all, I'm afraid] +; +; the following are printed after the object name.. +; +[3150:wouldn't move] ; try to move static object GROUP +[3151:didn't budge] +[3152:refused to be moved] +[3153:seemed fixed in place] +[3154:was unmoved] +; +[3160:don't bother, it would do nothing] ; don't bother GROUP +[3161:that would be a waste of time] +[3162:I found that I couldn't] +[3163:that will get you nowhere] +[3164:don't expect any results from that] +; +; GROUP messages for hello responses +[3170:gave a friendly nod] +[3171:grinned warmly] +[3172:returned my greeting with a smile] +[3173:greeted me with a suspicious smile] +[3174:nodded slightly] +; +; GROUP messages for npc's being unable to carry out an order +[3180:seemed puzzled] +[3181:shook a puzzled head] +[3182:looked distinctly confused] +[3183:didn't seem to understand what was wanted] +[3184:looked at me with a blank expression] +; +; GROUP messages for npc's being unable to carry out an order +[3190:had had problems with ] +[3191:looked troubled about ] +[3192:mentioned trouble with ] +[3193:obviously hadn't understood about ] +[3194:had been mystified about ] +; +; now, npc accepts an order GROUP +[3230:nodded in acknowledgement] +[3231:nodded slowly] +[3232:nodded obediently] +[3233:agreed] +[3234:nodded enthusiastically] +; +; now response to questions when not obedient GROUP... +[3250:refused to answer that] +[3251:remained silent as the grave] +[3252:pretended to ignore the question] +[3253:refused to give any help whatsoever] +[3254:looked back stubbornly] +; +; response to requests to give anything(s) to anyone GROUP +[3270:refused to part with anything] +[3271:refused to give it away] +[3272:didn't want to give anything away] +[3273:clutched it tightly] +[3274:stared back in silent refusal] +; +; npc wants to obey orders just given, but can't understand GROUP +[3290:looked puzzled] +[3291:did not understand] +[3292:shrugged in non-comprehension] +[3293:made a questioning noise] +[3294:didn't seem to understand] +; +; Goldsinging GROUPS... +; +; NB: Goldsinging is now used less frequently, since racetrack +; messages are now used more extensively. +; +; Joe, Edith, Violet +[3300:hummed quietly] +[3301:stared blankly into the night] +[3302:gazed up at the starry sky] +[3303:watched me curiously] +[3304:smiled pleasantly] +; +; Bert, Edna +[3310:muttered rebelliously] +[3311:moaned loudly and annoyingly] +[3312:stared pointedly into the distance] +[3313:gave me a grumpy look] +[3314:tried to enlist my help in their squabble] +; +; David +[3320:laughed pretentiously] +[3321:stood pompously with his hands on his hips] +[3322:sniggered at me quietly] +[3323:looked down his nose at me] +[3324:looked at me, shaking his head] +; +; Alex +[3330:yawned loudly] +[3331:shut his eyes for a moment] +[3332:stretched his arms tiredly] +[3333:gazed at me blankly] +[3334:made snoring noises] +; +; Colonel +[3340:muttered about the youth of today] +[3341:complained about the state of the cemetery] +[3342:saluted me smartly] +[3343:frowned distastefully] +[3344:nodded thoughtfully] +; +; mourners +[3350:talked quietly amongst themselves] +[3351:stood, looking at the cemetery] +[3352:murmured to each other] +[3353:shook their heads and frowned sorrowfully] +[3354:nodded to each other solemnly] +; +; crook +[3360:grinned deviously] +[3361:smiled broadly] +[3362:stroked his chin thoughtfully] +[3363:sniggered quietly to himself] +[3364:clasped his hands together and grinned] +; +; supervisor, workman +[3370:yawned tiredly] +[3371:coughed noisily] +[3372:scratched his head thoughtfully] +[3373:blew his nose into a handkerchief] +[3374:rubbed his tired eyes] +; +; vandals +[3380:joked noisily] +[3381:sang a filthy song at the tops of their voices] +[3382:staggered around drunkenly] +[3383:passed a bottle of vodka between them] +[3384:laughed loudly at some crude joke] +; +; dog +[3390:wagged its tail timidly] +[3391:sniffed the ground inquisitively] +[3392:cocked its head to one side] +[3393:yapped noisily] +[3394:sniffed me nervously] +; +; again used following a command referring to scenery +[3530:the previous command was unrepeatable] +[3531:you can't do that again] +[3532:it wouldn't help to try that again] +[3533:that was a once-only command] +[3534:oh, not again] +; +[3560:not around] ; printed by follow code +; npc stack overflow +[3600:a ghost moaned about a stack overflow. ] +[3605:sorry, I can't find the way from here] +[3614:only a whisper came out] +; +; 'npc, rude' word for talking people +[3620:laughed] +[3621:paid me no heed] +[3622:had not heard] +[3623:took no notice] +[3624:ignored me] +; +; 'npc, help' for talking people +[3640:needed specific orders] +[3641:waited for instructions] +[3642:looked me up and down] +[3643:asked, "Why?"] +[3644:did not know what to do] +; +; 'npc, echo verb' for talking people +[3660:raised an eyebrow] +[3661:gave a spirited response] +[3662:looked offended] +[3663:laughed, "Oh! You are a hoot"] +[3664:looked askance at me] +; +;========= +; +; Garbage words.. +[4000:^N the ^N this ^N these ^N that ^N some ^N and ^N also +^N before ^N wade ^N jog ^N plod ^N rush ^N dash ^N march ^N amble +^N good ^N of ^N there] +[4001:^N therefore ^N am ^N your ^N try ^N carefully ^N slowly +^N warily ^N quickly ^N rapidly ^N following ^N around] +[4002:^N please ^N road ^N Mister ^N Mr ^N Mrs ^N Miss] +; +;; Book protection code... +;; +;; [4200:%a skeletal figure stopped me by waving a copy +;; of a colourful book. ] +;; [4201:page ] +;; [4202:, line ] +;; [4203:, word ] +;; [4204:?"%] +;; [4205:the skeleton grinned nastily and I knew I was wrong. ] +;; [4206:the skeleton vanished in a cascade of bones. ] +;; [4207:it wanted to know the word at ] +;; [4208:wrong again! The skeleton beckoned me forwards and everything +;; went black... ] +;; +;; ADD PROTECTION WORDS HERE, BUT DO NOT MARK NUMBERS (digits) eg 20 +;; [4301:^C even ^C maintain] ; 18,9,8 +; +; Racetrack Messages... +; Mostly, these start with actors name. The one's starting with +; a carriage return (i.e. "%") are used for other peoples reactions +; to the actors Rt. Varied messages are marked with GROUP +; +; --- mourners leave the grave at start of game --- +; +[5000:prepared to leave the grave; the police among them talking +quietly. +%"I'm glad that's over with", muttered one of the policemen, +"I hate this part of the job. Especially going to funerals for +stupid bastards who get themselves killed and their partner captured". +%"Too right", agreed another. "And it it's only because Mr Severian +stumbled upon them dumping Alan's body that the crooks needed a +hostage. Otherwise the girl would be dead"] +; +[5002:continued walking along the path. +%"Chance has blown the whole operation", continued the first policeman. +"And now the gang's lit out with Sarah as hostage"] +; +[5003:walked alongside the crumbling wall of the burnt church, +with the police still talking about me as if I wasn't there at all] +; +[5004:walked quietly past the vault. One of them patted it +casually and cracked an old joke about vampires] +; +[5005:stood looking at the burnt church. "The wall on the east +side looks dodgy", commented one of them. "I don't know why they +bother to collect money. It's way beyond repair"] +; +[5006:made their way slowly out of the main gate. +%"Right then, tea time for me", said one policeman as he left, +shaking off the gloom of the churchyard and slapping his belly. +"Anyone else for a pie and a pint?"] +; +; --- detective wanders around cemetery before leaving --- +; +[5010:waited until the rest of the mourners had gone] +; +[5011:paused to light a cigarette, then tossed an empty matchbook aside] +; +[5014:strolled casually along the path, kicking up the gravel. +%"Well, that's one nosey snoop taken care of", he chuckled. It +wasn't a nice sound. "And none of those other dozey cops have +even looked twice in my direction. Fools! The lot of them". +% %"No wonder he's not looking sorry", I thought to myself. +"He's one of the crooks - probably set me up. And nobody +suspects because I'm dead and a convenient scapegoat"] +; +[5015:walked past the vault, running his hand along its edge. +"Who'd think of looking in here?", he laughed to himself. +% %"For what?" I murmured to myself, but even before I had +finished the words I knew. This was where the gang had stashed +their drugs. If only I had some way to foil their plans..] +; +[5016:strolled away into the twilight mists] +; +; --- workman fills in grave --- +; +[5020:stretched his back and sighed, "Ah, well. Back to work. +What a bleedin' job; diggin' holes, watchin' holes and fillin' +holes again] +; +[5021:read the headstone and laughed, "I reckon this was the +miserable bleeder that arrested me for being drunk. Well, I'm +safe now. I don't reckon I'll be seeing him again"] +; +[5022:pushed his shovel into the mound of earth and began to fill +the grave] +; +[5023:suddenly leapt back, staring at me. I had a sudden queezy +feeling and felt myself fade away under his gaze. +%A minute passed; then the workman shook his head. "No, it wasn't +him. It's just be the whisky", he muttered. Then picked up the +shovel from where he had dropped it and continued to fill my grave. +As he turned away, I began to firm up again] +; +[5024:stood up and rubbed his back. "Tirin' work, is this", he sighed +and rested on his shovel for a few minutes] +; +[5025:finished shovelling the earth into the grave and then patted +it flat with the back of the blade] +; +; --- supervisor starts racetrack at car park gate --- +; +[5030:muttered to himself, "Company vehicle, they said. There +I was expecting a Sierra, and what do I get? A bleedin' battery +operated pram"] +; +[5034:dismounted briefly to collect some litter. +%He twisted around with a start and I began to fade away in his +gaze. "Funny, I could 'ave sworn someone was watching me", he muttered. +%He looked away and I slowly began to recover my ghostly shape] +; +[5035:saw the faded wreath and said, "Phew! I could smell this thing +rotting as I came through the gates. It'll have to go on the heap"] +; +[5036:tapped his fingers on the steering wheel of the cart and +said, "Where the heck is that dozey four-eyed digger?"] +; +[5037:saw the workman and said, "You took your time! Did you see +a ghost, or fall into the grave or something?" +% %"I wish you'd fall into a grave", muttered the workman, "I'd +fill it in before you could climb back out again"] +; +[5038:rubbed his frost-bitten hands together. "Well, that's another +day over with", he said to the workman] +; +[5039:% %The workman propped his tools up in a corner. "I'll +say one thing for this lark", he joked for the hundredth time, +"the customers never complain"] +; +[5040:clasped his hands together and announced, "I could murder +a pint of best." +% %"I'm with you there", replied the workman, "Let's make it the +Pig and Whistle tonight"] +; +[5041:drove off through the car park and headed for the pub] +; +; --- Joe introduces player to the cemetery --- +; +[5050:% %The figure greeted me with a warm smile and introduced himself. +"I'm Joe Danby, that used to run the Pig and Whistle", he said. "Turned +my toes up nearly five years ago, I did, and couldn't return to haunt +my pub because they don't serve spirits. I've got to know this place +quite well in that time". +% %Joe spread his arm in a wide arc, prompting me to take a look at +the cemetery. "Come on", he added, "follow me and I'll show you around +the place and introduce you to some of my kindred spirits"] +; +[5051:gave me a broad grin and announced, "Here's my grave. Right +next to yours. I can see us being good neighbours". +% %I returned a smile and admired the well-mown grass. "It gets cut +every Sunday, through the Summer", he explained. "I had some good +friends"] +; +[5052:beckoned me to come closer. "These are the Willmot graves", +he said in a low whisper. "And if you thought the dead rest in peace, +you should listen to this couple"] +; +[5053:% %"What was that, Mr Danby?", shouted Bert. +%"Oh", replied Joe. "I was just telling the new fellow what a +lovely couple you and Edna make". He grinned to me, "I think it's +time to pass on"] +; +[5054:whispered, "Always has to prove something, does our David. +He may have gone to meet his maker, like, but still he claims to +be a self-made man"] +; +[5055:greeted David with a tight smile. "Still practising with +your psychic powers, I see", he said, as David lifted up a +moth and spun it high into the air] +; +[5056:continued with his guided tour. "And this is Colonel Rycroft's +grave", he said. "An extinct ex-soldier is the Colonel. Bit stiff. +Served his country well in the old days, but he's rather stuck in his +ways. Can't stand the young louts we sometimes get here of a night"] +; +[5057:% %"Evening, Joe", barked the Colonel. "I see you've brought +along the new chap". +% %He held out his hand, but it went straight through me when I +tried to shake it. The Colonel laughed and said, "Not too solid +yet, eh? You'll have firmed up some before the night is out"] +; +[5058:said, "Violet Conway's our oldest resident. Cracked as well +as croaked. She went blind in life and now won't leave her grave in +case she can't find her way back. It's nonsense of course; we +ghosts don't need eyes to see"] +; +[5059:% %"I'm certainly all ears", replied Violet. "And you must +be Alan, the new arrival". She gave me a warm, friendly smile] +; +[5060:%"You must forgive me if I don't follow you", she continued, +"but if I wandered too far from my grave, I might never find my way +back again"] +; +[5061:sighed and said, "And by no means least, this is the last +resting place of Edith Dean"] +; +[5062:lowered his voice. "If 'resting' is the word. Edith used to +be a real hypochondriac; scared to death of catching germs off +things; the rumour is that she OD'd on carrots. So nowadays she +reckons she's cursed or something"] +; +[5063:concluded his guided tour, saying, "Well, that's most of +your new neighbours introduced. I hope you haven't been bored +to death". +% %He laughed warmly and I had to smile. "I guess that's more +of your graveyard humour", I replied. Joe laughed again and +continued, "I can see we're going to get along all right. Do you +mind If I walk with you? We don't want you getting lost on your +first night, do we?"] +; +; --- Bert intro, then protect wreath from Edna --- +; +[5070:% %Edna tried to snatch Bert's wreath but he wouldn't let go +of it. They glared at one another in silence] +; +[5071:stood guarding his wreath, while Edna paced around him, trying to +it. "Let me have my wreath back", she insisted. +% %"It's mine!", he replied, "And you're not having it"] +; +[5072:clutched tightly at his wreath, guarding it from Edna. +Sometimes, he would stop and suck his teeth, which made Edna even +angrier. I wondered why they bothered. There must be better +things to do with your death] +; +[5073:said to Edna, "This wreath is mine! Yours was all faded. +I bet it's on the compost heap". +% %"Don't talk such drivel", snapped Edna, "Now, give me that +wreath back". +% %"Shan't!", sulked Bert] +; +[5074:% %Edna jabbed Bert with a sharp elbow, but he still managed +to keep a tight hold on his wreath] +; +[5075:% %Edna sat on the headstone and folded her arms in a huff. +"If you don't give my wreath back", she nagged at Bert, "I won't +speak to you until the end of eternity". +% %"Suits me fine", muttered Bert as he sat down on the grave, +facing away from his wife] +; +; --- Bert's racetrack after edna is given the wreath --- +; +[5078:said, "Do you want any help, Alan? It's getting boring hanging +about here all night] +; +; GROUP message for Bert taking stick from edna +; keep these fairly short, since they are often repeated +[5080:put his fingers in his ears so that he didn't have to listen +to Edna's nagging] +[5081:cringed while Edna went on about his "filthy habits"] +[5082:yelled at Edna, "Oh, shut up, woman! You nagged me into an +early grave. Now let me have some peace in it"] +[5083:put up with Edna's nagging for as long as he could, then +snapped and started mimicking and mouthing at her] +[5084:paid no attention to Edna's nagging, and just looked in +the opposite direction] +; +; --- Edna's racetrack after she is given the wreath --- +; +; GROUP message for Edna nagging Bert +; keep these fairly short, since they are often repeated +[5090:complained that Bert never listened to her and never did +a thing she said and that her mother had warned her against +marrying him in the first place] +[5091:nagged on at Bert, while he pretended +not to hear] +[5092:droned on and on about the awful lousy weather they'd been +having and how it was all Bert's fault] +[5093:wittered on about the state Bert had let their headstone +get into] +[5094:found Bert wasn't paying attention and became noisily silent] +; +; --- Alex is woken up --- +; +; GROUP for statue turning into Alex. these follow message 2630 +[5100:I watched as the figure stood up, yawned, and then brushed a few +pigeon droppings off its arms. +% %"Greetings, my friend", it announced in an elderly voice. "I am +Alex Pym. Pleased to meet you"] +[5101:the grey figure stretched its arms in the air and yawned +loudly. +% %"What's all the to-do about?", complained the figure, "and +I was having such a nice dream". He paused to brush himself +down then said, "Well, now that you've woken me, I may as well +make myself useful. Pym's the name, by the way. Alex Pym"] +[5102:I watched as the figure got up and rubbed its eyes. +% %"Oh, excuse me", he said sleepily, "I must have nodded off. +I'm Alex Pym. Is there anything I can do for you?"] +[5103:I watched attentively as the pale figure stretched and made +its way towards me, yawning. +% %"What a strange dream I was having", it said in a fragile voice, +"Something about nine overthrowing the church. Blowed if I can +make head nor tail of it". +%The figure shook the dust from its arms and said, "How do you +do. My name's Alex Pym, if you don't already know. Pleasure to +meet you"] +[5104:the figure stood up and peered around, with a puzzled frown. +"I must have fallen asleep", it concluded, scratching its head of +ruffled grey hair. +% %"Well, thank you for waking me", continued the figure. "Goodness +knows how long I would have slept if it weren't for you. By the +way, my name's Alex Pym. You look a little troubled. Can I help +at all?"] +; +[5110:yawned widely] +; +[5111:muttered something about nine overthrowing the church. +It sounded like gibberish to me at the time] +; +[5112:nodded off and then woke with a start, mumbling about men +in white coats] +; +[5113:said, "I was always statuesque. Nobody really appreciated my +handsome features while I was alive, but they all look now"] +; +[5114:posed and said, "I think I should have gone in for modelling +rather than becoming an accountant"] +; +[5115:yawned loudly and said, "I feel ever so tired. I think I'll +go and take a little nap"] +; +[5120:struck a pose and slowly changed back into a statue] +; +; --- Edith believes she is cursed to stay here until the end of time --- +; +[5130:moaned sorrowfully, "Cursed, I am. Cursed to remain beside +my grave until the end of time. What kind of an afterlife is +this, I ask you?"] ; followed by 5131 if Joe there +; +[5131:% %Joe spoke quietly into my ear, "Aye up, she's off +again! Complained all her life and now this nonsense". +%He raised his voice. "She's no more cursed than I am; just +likes silly games"] +; +[5132:wept on her grave. "Have you any idea how lonely it is, +stuck in this corner until the end of time?"] +; +[5133:complained bitterly, "I had to wait to be buried during +the strikes of the Winter of Discontent, but this is worse. +Nobody comes to visit me here"] ; followed by 5134 if Joe there +; +[5134:% %"Pull yourself together, Edith", said Joe, "I'm sure +that we can free you from your curse again". +% %Joe turned to me and winked, "There must be some way of +demonstrating the end of time. Can you think of anything?"] +; +[5135:continued her moaning. "It's no use", she wailed, +"Nobody will help me. I'll just have to stay here until the +end of time". +% %She sat down by her grave and sobbed theatrically] +; +; --- Edith's obedient racetrack --- +; +[5140:smiled delightfully and said, "I think I'll take a nice +walk around the cemetery, now that I'm free of my curse"] +; +[5141:skipped gracefully around the sepulchre. "It feels so good +to be free again", she simpered, "I feel so full of, er, life!"] +; followed by 5142 if Joe there +; +[5142:% %"Nice to see spirits go free", mused Joe as he watched +Edith dancing around, "though I didn't used to think that when I +ran the Pig and Whistle"] +; +[5143:% %Edith gossiped with Violet, and told her how good she felt now +that the curse had been lifted] +; +[5144:% %Edith was deep in conversation with Violet. "It was +young Alan who helped me", she said gratefully] +; +[5145:talked to the Colonel about the "good old days"] +; +[5146:walked among the new graves. "I don't think much of their +headstones", she commented, "They're all so much the same"] +; +[5147:continued, "they knew how to mark a grave properly in +the old days. Look at my lovely headstone", she +waved a hand towards her own grave and smiled proudly] +; +[5148:sat down on the steps and looked around the cemetery. +"My, my", she sighed, "This place has changed since the +curse fell on me"] +; +[5149:looked at new graves around close by. "If I remember +rightly", she began, "all this used to be lawn. I suppose a +lot of people have passed on since then". +%I wasn't listening, but nodded anyway] +; +[5150:wandered around the tombstones, humming softly to herself. +"It feels so good to be free", she said to me, "There must be +something I can do to help you in return." ] +; +; --- David Ridge "arrogant" racetrack --- +; +[5160:smirked arrogantly. "So you're the new one. Weedy little chap, +aren't you? I bet you don't even know how to move objects yet"] +; +[5161:showed off by levitating a mouse and letting it drop +to the ground] ; followed by 5131 if Joe there +; +[5162:% %Joe frowned at David's display and said to me, "Go on, +Alan, show him what you can do. Maybe he'll help you if you can +impress him"] +; +[5163:waved his hands about and worked up a strong breeze which +blew fallen leaves into my face. He stood back and laughed +pretentiously] +; +[5164:looked down his nose at me. "I bet you wish you had my powers", +he boasted, leaning pompously against his sarcophagus] +; +[5165:spread his hands and said, "Well, it's your turn to show me +what you can do. I might even help you if I'm impressed"] +; +; --- David Ridge "obedient" racetrack --- +; +[5168:said, "I'm busy practicing my powers, but I might help you +if you ask nicely"] +; +; GROUP message for David showing off etc. +[5170:conjuring up a breeze] +[5171:posed majestically and began flexing his physic muscles] +[5172:levitated a few feet above the ground and looked down at me] +[5173:laughed condescendingly and said, "You'll never be as good +a ghost as I am"] +[5174:folded his arms] +; +; --- additional David Ridge stuff --- +; +[5175:swirled a whirlwind of dust around me] +; +[5176:concentrated his powers on me and I helplessly floated +a few feet above the ground] +; +[5177:held his hand out and prompted me to shake it. But as soon as I +touched him, I was thrown back as if I'd had an electric shock. +"You really are pathetic, aren't you?", he sneered] +; +[5178:picked a fir cone off the ground and threw it into the air, +where it exploded into a shimmering cascade of stars. "Now that's +what I call impressive", sighed David, preening himself] +; +[5179:used his powers to plague me with moths] +; +; --- Colonel follows vandals --- +; +[5180:frowned at a distant noise. "Do you hear that?", he barked +in a stage-whisper, "Those young scoundrels are at it again. I'd +best be off to keep an eye on things"] +; +; --- Colonel "obedient" racetrack --- +; +[5185:greeted me with a salute and said, "Good show, old chap. +That light soon scared those blighters away"] +; +[5186:said, "Let me know if you need me for anything. I'll be +about the place in case any more of those young ne'er-do-wells +show their faces"] +; +[5187:peered behind a headstone. "Hmmph, no vandals hiding in here", +he concluded, "Now, where else they could be"] +; +[5188:% %David nodded towards the Colonel, then cast his eyes +upwards. "Silly old fool", he muttered] +; +[5189:rummaged through a pile of leaves to see if any vandals +were hiding there] ; followed by 5190 if Joe there +; +[5190:% %Joe watched the Colonel and smiled at me. "You don't +have to be mad to live here", he said, "but it helps pass the time] +; +[5191:poked a stick vigorously into the branches, to flush out +any hooligans that might be hiding in there] +; followed by 5192 if Joe there +; +[5192:% %Joe shook his head ruefully at the Colonel's antics. +"He was just about as bad when he was alive", he mused] +; +[5193:squinted behind a sarcophagus, looking for vandals] +; +[5194:% %Edith gave the Colonel a peculiar look. "And people +used to say that I was touched", she commented] +; +[5195:complained about the state of today's youth. "I wish that I +could have brought my shotgun to the afterlife with me", he +grumbled, "I'd pepper their backsides for them!"] +; +; --- vandals loiter around, drinking and joking etc. --- +; +[5200:sat around the cenotaph, sharing a bottle of vodka and telling +jokes. One of them climbed up the stonework and then began to act like +a monkey. +% %He grew suddenly serious and stared down to where I stood. I +found myself fading away beneath his gaze. He blinked drunkenly +and went back to his cavorting] +; +[5201:% %"Look at those young louts!", said the Colonel in disgust, +"I knew many a good man who gave his live for this country and this +is the thanks they get from today's youth"] +; +[5202:sat on the sepulchre and started smoking. One began to choke +over his fag, and his friend laughed, "Oi you! Give over coffin!"] +; +[5203:% %David was angered by the vandals, and he began to rock the +urn to scare them away] +; +[5204:stomped through the leaves, swigging their vodka. One climbed +up the tree and shouted, "Hey! The view's dead good from up here!" +%"Yeh", agreed his mate, "I always wanted a tomb with a view." +%"Aww", groaned a third, "Where do you keep digging them up." +%"Look!", cried the first one, "A ghost!". He stared hard at me and +I began to fade, until I became totally invisible. +%"'Ere, how much have you had?", sneered his friend. "I can't see no +ghosts". +%They both looked away and I slowly began to recover] +; +[5205:% %the Colonel fumed with anger and concentrated on making +himself visible to scare the vandals away. He managed a full +apparition, but could only hold it for a few seconds and the +vandals were too drunk to notice] +; +[5206:stubbed their cigarettes out on Violet's grave and relieved +themselves on the bushes] +; +[5207:% %Violet began to shiver in the presence of the vandals. +"Oh, I do wish they'd go away", she quavered. "Young tearaways +like that scare me to death"] +; +[5208:kicked the tombstones, knocking some clean over. One of +the louts brought out a spray can and signed several of the stones] +; +[5209:% %the Colonel scrubbed the tombstones furiously with his +hand, trying to remove the paint, but it was a waste of time. +"We should have a night watchman in this cemetery", he seethed] +; +; --- dog before fishbone removed --- +; +[5210:seemed to notice me and began to shiver a little. It opened its +mouth to bark, but only managed a dry choking noise] +; +[5211:ran in circles, choking harshly] ; followed by 5212 if Joe there +; +[5212:% %"Come here, doggy", said Joe in a soft voice. But the +dog just growled] +; +[5213:coughed hoarsely, trying to clear its throat] +; +[5214:chewed some grass, then pawed its mouth in frustration] +; +[5215:opened its mouth wide and made dry gagging noises] +; +[5216:wandered around with its tail between its legs, looking sorry +for itself] +; +[5217:sat down outside shed door, coughing hoarsely] +; +[5218:rubbed its neck in the gravel as if trying to dislodge +something in its throat] ; followed by 5219 if Joe there +; +[5219:% %"If I'm not mistaken", said Joe, looking thoughtfully at +the dog, "it's got something stuck in its throat"] +; +; --- dog "friendly" racetrack --- +; +; GROUP message for dog being friendly +[5220:greeted me with a wag of its tail] +[5221:panted in excitement] +[5222:sniffed my leg curiously and made a puzzled noise] +[5223:shook itself noisily and gave a happy yap] +[5224:sat down on the floor and wagged its tail happily] +; +; --- Violet Conway is afraid to leave her grave, since she is blind --- +; +[5230:leaned against her headstone, sorrowfully. "Oh, I wish I'd +been healthier before my death", she sighed, "It's terrible having +to spend my afterlife without eyes"] +; followed by 5231 if Joe there +; +[5231:% %"But Violet, you know that you can see perfectly well. And +anyway, surely you could find your way by sound", suggested Joe] ; Joe +; +[5232:said thoughtfully, "I suppose my hearing could get me about +a bit, but I'm so afraid that I might not find my way back to my +grave before dawn". +%"I could do with something noisy beside it so that I don't get +lost", she added] ; followed by 5233 if Joe there +; +[5233:% %"I wish we could help you, Violet" said Joe, "If only we had +some kind of siren or something"] +; +[5234:said, "That bush beside my grave makes some noise in the +breeze, but it's so quiet that I can't hear it from a few yards away"] +; +[5235:pleaded, "Oh, I wish you could help me. It would be so +nice to wander through the cemetery by myself rather than having +to stay here all night"] +; +; --- Violet "obedient" racetrack --- +; +[5240:listened attentively to the sound of the bell ringing. +"That's so reassuring", she said, "I feel safe enough to wander +though the cemetery by myself, at last"] +; +[5241:drifted happily through the marigolds. "What pretty +flowers", she murmured. "This is a rare treat"] +; followed by 5242 if Joe there +; +[5242:% %Joe picked one of the flowers and gave it to Violet. "How +delightful", she smiled, "I do love marigolds"] +; +[5243:talked for a while with the Colonel, telling him how nice it was +to be able to get around by herself] +; +[5244:floated through the fallen leaves, listening to them rustling in +the breeze. "Oh, how I love Autumn", she sighed] +; followed by 5245 if Joe there +; +[5245:% %"You'll not have been to my grave yet", said Joe to +Violet. "It's one of the new ones over there". He took her hand +and pointed it towards his grave. "Why not have a walk over", +he suggested to her] +; +[5246:ran her fingers slowly over Joe's headstone, reading the +inscription] +; +[5247:finished reading Joe's headstone and said, "How sweet. You +must have had many friends before your death, Joe"] +; +[5248:thanked me for my help, saying, "This bell really works. It +was no trouble finding my way back here"] +; +[5249:ran her fingers slowly over the inscription on the cenotaph, +gradually forming each word with her lips] +; followed by 5250 if Joe there +; +[5250:% %Joe helped Violet by placing her hand carefully on each word +of the inscription. +%"Everyone's being so kind to me tonight", said Violet, "It's been much +nicer than staying by my grave all the time"] +; +; ================================= END ============================== diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/ref/gamedata.dat b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/ref/gamedata.dat new file mode 100644 index 0000000..40c707e Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/ref/gamedata.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/ref/squash.dat b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/ref/squash.dat new file mode 100644 index 0000000..8af3e6f Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/ref/squash.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/squash.dat b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/squash.dat new file mode 100644 index 0000000..8af3e6f Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part1.l9/main.l9/squash.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconst.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconst.txt new file mode 100644 index 0000000..5202c3f --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconst.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for Bbc Disc. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=1 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=10 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=30 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=1 ; set to 1 if running/chaining off disk + NotDiskVersion=0 + + allowcheat=0 + + IncludeOops=1 + IncludePictures=1 + IncludeProtection=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=1 + fixst=0 + + Bits8=1 + Bits16=0 + + alternatives=3 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconsta2.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconsta2.txt new file mode 100644 index 0000000..3c7a7f1 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconsta2.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for Apple 2 disc. +; +CONST ; Specific versions.. + versionA2=1 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; +; + maxactivations=16 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=10 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=1 ; set to 1 if running/chaining off disk + NotDiskVersion=0 + + allowcheat=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + notmac=1 + fixst=0 + + IncludeProtection=0 + includepictures=0 + includeoops=0 ; include oops/ramsave? + + Bits8=1 + Bits16=0 + + alternatives=3 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstad.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstad.txt new file mode 100644 index 0000000..4285479 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstad.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for Amstrad cpc/pcw/+3 Disc. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=1 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=10 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=30 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=1 ; set to 1 if running/chaining off disk + NotDiskVersion=0 + + allowcheat=0 + + IncludeOops=1 + IncludePictures=1 + IncludeProtection=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=1 + fixst=0 + + Bits8=1 + Bits16=0 + + alternatives=3 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstat.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstat.txt new file mode 100644 index 0000000..bc461fc --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstat.txt @@ -0,0 +1,50 @@ +; Machine-specific constants for Amstrad cpc Tape. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=1 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=10 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=30 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=0 ; set to 1 if running/chaining off disk + NotDiskVersion=1 + + allowcheat=0 + + IncludeOops=1 + IncludePictures=0 + IncludeProtection=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=0 + + Bits8=1 + Bits16=0 + + alternatives=3 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstbd.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstbd.txt new file mode 100644 index 0000000..5202c3f --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstbd.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for Bbc Disc. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=1 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=10 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=30 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=1 ; set to 1 if running/chaining off disk + NotDiskVersion=0 + + allowcheat=0 + + IncludeOops=1 + IncludePictures=1 + IncludeProtection=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=1 + fixst=0 + + Bits8=1 + Bits16=0 + + alternatives=3 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstcd.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstcd.txt new file mode 100644 index 0000000..e88b4a1 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstcd.txt @@ -0,0 +1,50 @@ +; Machine-specific constants for Commodore 64 Disk. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=1 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=16 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=10 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=1 ; set to 1 if running/chaining off disk + NotDiskVersion=0 + + allowcheat=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + notmac=1 + fixst=0 + + IncludeProtection=0 + includepictures=1 + includeoops=1 ; include oops/ramsave? + + Bits8=1 + Bits16=0 + + alternatives=3 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstct.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstct.txt new file mode 100644 index 0000000..e75d6db --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstct.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for Commodore 64 Tape. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=1 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=16 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=10 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=0 ; set to 1 if running/chaining off disk + NotDiskVersion=1 + + allowcheat=0 + + IncludeProtection=0 + includepictures=0 + includeoops=1 ; include oops/ramsave? + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=0 + fixst=0 + + Bits8=0 + Bits16=1 ; i.e. 10/5 alternatives for varymessage + + alternatives=3 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstgd.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstgd.txt new file mode 100644 index 0000000..833362c --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstgd.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for amiGa Disc. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=1 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=1 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=10 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=30 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=1 ; set to 1 if running/chaining off disk + NotDiskVersion=0 + + allowcheat=0 + + IncludeOops=1 + IncludePictures=1 + IncludeProtection=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=1 + fixst=1 ;>NICK 10/3/88 Fix multi-tasking (driver call 34 after SCREEN T) + + Bits8=0 + Bits16=1 + + alternatives=5 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstmd.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstmd.txt new file mode 100644 index 0000000..427c19e --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstmd.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for Macintosh Disc. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=1 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=16 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=30 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=1 ; set to 1 if running/chaining off disk + NotDiskVersion=0 + + allowcheat=0 + + includepictures=1 + includeoops=1 ; include oops/ramsave? + IncludeProtection=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=0 + fixst=0 + + Bits8=0 + Bits16=1 + + alternatives=5 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstmt.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstmt.txt new file mode 100644 index 0000000..a4210d1 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstmt.txt @@ -0,0 +1,52 @@ +; Machine-specific constants for Msx Tape. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=1 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=10 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=30 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=0 ; set to 1 if running/chaining off disk + NotDiskVersion=1 + + + allowcheat=0 + + IncludeOops=1 + IncludePictures=0 + IncludeProtection=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=0 + fixst=0 + + Bits8=0 + Bits16=1 ; i.e. 10/5 alternatives for varyMessage + + alternatives=5 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconsts1.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconsts1.txt new file mode 100644 index 0000000..e7be896 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconsts1.txt @@ -0,0 +1,50 @@ +; Machine-specific constants for Spectrum 128 Tape. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=1 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=16 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=10 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=0 ; set to 1 if running/chaining off disk + NotDiskVersion=1 + + allowcheat=0 + + IncludeProtection=0 + includepictures=0 + includeoops=1 ;include oops/ramsave? + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + notmac=0 + fixst=0 + + Bits8=0 + Bits16=1 + + alternatives=3 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstsd.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstsd.txt new file mode 100644 index 0000000..4635a34 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstsd.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for St Disc. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=1 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=10 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=30 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=1 ; set to 1 if running/chaining off disk + NotDiskVersion=0 + + allowcheat=0 + + IncludeOops=1 + IncludePictures=1 + IncludeProtection=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=1 + fixst=1 ;>NICK 10/3/88 Fix multi-tasking (driver call 34 after SCREEN T) + + Bits8=0 + Bits16=1 + + alternatives=5 ; set to 3 for 8-bit versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstst.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstst.txt new file mode 100644 index 0000000..b70bd4a --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstst.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for Spectrum 48 Tape. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=1 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=16 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=10 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=0 ; set to 1 if running/chaining off disk + NotDiskVersion=1 + + allowcheat=0 + + IncludeProtection=0 + includepictures=0 + includeoops=0 ;(Only SPM 48/BBC do not have OOPS) include oops/ramsave? + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + notmac=0 + fixst=0 + + Bits8=1 + Bits16=0 + + alternatives=2 ; set to 2 for 8-bit Spectrum and Atari disk + diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstxd.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstxd.txt new file mode 100644 index 0000000..b52346f --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstxd.txt @@ -0,0 +1,50 @@ +; Machine-specific constants for atari X (xl/xe) Disk. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=1 ; atari X (xl/xe) Disc + versionXT=0 ; atari X (xl/xe) Tape +; + maxactivations=16 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=10 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=1 ; set to 1 if running/chaining off disk + NotDiskVersion=0 + + allowcheat=0 + + IncludeProtection=0 ; >>> Removed to make smaller. Pete 21/9/88 + includepictures=0 + includeoops=1 ; include oops/ramsave? + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disc messages) + notmac=1 + fixst=0 +; + Bits8=1 + Bits16=0 + + alternatives=2 ; set to 2 for Spectrum Tape & atari Xl/xe Disk versions diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstxt.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstxt.txt new file mode 100644 index 0000000..3590db2 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/mconstxt.txt @@ -0,0 +1,51 @@ +; Machine-specific constants for atari X (xl/xe) Tape. +; +CONST ; Specific versions.. + versionA2=0 ; Apple II Disc + versionAD=0 ; Amstrad cpc/pcw/+3 Disc + versionAT=0 ; Amstrad cpc Tape + versionBD=0 ; Bbc Disc + versionCD=0 ; Commodore 64 Disc + versionCT=0 ; Commodore 64 Tape + versionGD=0 ; amiGa Disc + versionMD=0 ; Mac Disc + versionMT=0 ; Mac Tape + versionS1=0 ; Spectrum 128k tape + versionSD=0 ; ST disc + versionST=0 ; Spectrum Tape + versionXD=0 ; atari X (xl/xe) Disc + versionXT=1 ; atari X (xl/xe) Tape +; + maxactivations=10 ; tailor to each machine. The greater the +; number, the more that can happen on each turn. Small machines +; should have this set to as small a value as possible, without +; losing realism. About 3 might be realistic. +; 16 bit machines can handle much higher values - perhaps 10-16 +; without losing too much speed. + +; kbddelay=30 for 16 bit machines +; 10 for 8 bit machines + kbddelay=30 ; time to wait when attention flag is set + +; Versioning notes..... + + diskversion=0 ; set to 1 if running/chaining off disk + NotDiskVersion=1 + + allowcheat=0 + + IncludeOops=1 + IncludePictures=0 + IncludeProtection=0 + +; set notmac=1 for 16 bit versions other than mac and 8bit disk versions +; set notmac=0 for 8 bit cassette versions and mac +; (notmac=0 disables the insert disk messages) + + notmac=0 + fixst=0 + + Bits8=1 + Bits16=0 + + alternatives=2 ; set to 2 for 8-bit Spectrum and Atari disk diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/npc.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/npc.txt new file mode 100644 index 0000000..33c7764 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/npc.txt @@ -0,0 +1,2323 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; taken from Lancelot source 14/5/88 +; +; NPC.TXT, the non-player character control logic for the game. This +; copes with NPC racetracks, queued commands and how they decide +; what to do. As the philosophy of Level 9's is to treat NPCs and +; the user as being as equal as possible, the code to cope with +; actual NPC actions should be the same as that for player actions, +; and found elsewhere. +; +; Late changes: +; +;>>mike 26/3/88 - two changes to DOIWantFollowNoun1 to +; permit NPCs to match the HICURRENTPOS of their follow target +; +;>>mike 27/3/88 +;>>mike 28/3/88 - changes to .KILL, .Follow, .GdFollow, .GdKill +; need EP=TRUE at start of .ATTACK (AVERB.TXT) +; ISOBJECTALIVE in averb.txt +; removed NOTreasureInRoom +; and change at start of .ABSNewLocation +; merged 3600-3602, removed 3603,3604 +; +CONST +; +BEGIN +; +.setupuser + actor=user + gosub @setuproom + gosub @setACTORATTRIBUTES + gosub @initfifo +;; goto @healactor ; >> Pete 14/9/89 + return ; >> Pete 14/9/89 +;--- +.MAINLOOP + STACK + forceprinting=false ; just in case! +;>>removed by L2 anythingprintedthisturn=false + gosub @tickclock +; +; now the player's turn... + gosub @setupuser +; +;>>mike 28/3/88 x4=npcptroffset +;>>mike 28/3/88 add x4,actorattributes +;>>mike 28/3/88 x1=npccurrent(x4) ; number of current command +;>>mike 28/3/88 if x1=0 then ml2 ; ACTOR has no queued commands +; +; ACTOR is in the middle of a goal-directed command, +; so obey it! + gosub @executeanyorders + if executeprocessed=true then @mainloopnpc + +;;.ml2 +; now do the more general ideas, such as +; 'follow someone unless I have something better to do' + verb=0 + commandfinished=false + gosub @doiwantfollow + if fatalerror<>false then getFromUser ;>>mike 27/3/88 +;>>mike 26/3/88 if fatalerror=false then ml3 +;>>mike 26/3/88 gosub @stopfollowing + +;;.ml3 +;>>mike 28/3/88 if executeprocessed=false then followok +;>>mike 28/3/88 gosub @savelist9 +;>>mike 28/3/88 gosub @checkforescape ;checkkbd +;>>mike 28/3/88 gosub @restorelist9 + +;;.followok + if executeprocessed=true then @mainloopnpc ; it has been done + +.getfromuser + stack + descriptionmode=normaldescriptionmode + +;>>L2 x1=attentionoffset +;>>L2 add x1,actorattributes +;>>L2 npccurrent(x1)=c0 ; reset attention flag + wanttoprintand=0 + GOSUB @GETCOMMAND ; GET ACTOR COMMAND FROM KEYBOARD + lastwordprinted=0 + cif allowcheat + if cheatmode<>2 then DontDisplayCommand + prs " user command verb=" + print verb + prs " noun1=" + print noun1 + prs " prep=" + print prep + prs " noun2=" + print noun2 +.DontDisplayCommand + cend +; +; immediately after entering first command, +; display the first picture, with border +; if picture1displayed=true then gcnotpic1 +; x1=1 +; gosub @waitpic ; display picture 1 at 0,0 +; +;.gcnotpic1 +;>>removed by L2 anythingprintedthisturn=false +;<< gosub readclock ;* +;<< timeoflastinput=value ;* + if verb=isay then mlsay + gosub @againVERBvarsAREverbVARS + + if verb>maxdirection then movenosarc + gosub @stopfollowing ; prevent player being dragged back by follow. + add numexplicitmoves,c1 + if numexplicitmoves<>30 then movenosarc + message 2128 ; would you prefer to use GO instead? + +.movenosarc + GOSUB @PRESENTMULTIPLE ; EXECUTE ACTOR COMMAND + +.mlsay + if verb<>isay then @mainloop +; say by-passes normal presentmultiple, so npcs +; will not move unless we activate them now. + goto MainLoopNpc1 ; not stored command or follow, so skip interrupt check + +.mainloopnpc + gosub @savelist9 + gosub @checkforescape ;checkkbd;>>mike 28/3/88 + gosub @restorelist9;>>mike 28/3/88 + if result=true then @getfromuser ; clears stack etc.;>>mike 28/3/88 + +.MainLoopNpc1 + GOSUB @NPCACTIONS + + GOTO @MAINLOOP +;--- +;;.checkkbd +;;; return result=true if a break key has been pressed +;;; check for escape key from user +;; if actor<>user then cfefalse +;; gosub @osrdch ; get char in x1 +;; if x1<>0 then maybeinterrupt +;; goto cfefalse +;--- +;.osrdch +; gosub savelist9 +; x1=3 ; osrdch +; list9(0)=x1 +; driver +; x1=list9(1) +; goto restorelist9 +;--- +.checkforescape + if actor<>user then cfefalse + gosub @osrdch ; get char in x1 + if x1<>0 then maybeinterrupt + +;>>l2; is attention flag set? +;>>l2 x1=attentionoffset +;>>l2 add x1,actorattributes +;>>l2 x2=npccurrent(x1) +;>>l2 npccurrent(x1)=c0 ; reset it +;>>l2 if x2<>0 then maybeinterrupt +; +.cfefalse + result=false + return + +.maybeinterrupt +; if anythingprintedthisturn=false then cfefalse + message 2203 ; do you want to carry on? + gosub @yesorno + if result=true then cfefalse + gosub @stop ; kill action + +;;.cfetrue + goto @returnTrue +;--- +.savelist9 + npclist9save0=list9(0) + npclist9save1=list9(1) + npclist9save2=list9(2) + npclist9save3=list9(3) + npclist9save4=list9(4) + npclist9save5=list9(5) + npclist9save6=list9(6) + return +;--- +.restorelist9 + list9(0)=npclist9save0 + list9(1)=npclist9save1 + list9(2)=npclist9save2 + list9(3)=npclist9save3 + list9(4)=npclist9save4 + list9(5)=npclist9save5 + list9(6)=npclist9save6 + return +;--- +.setcommandfinished +; no command waiting - so give up + commandfinished=true +; +.epfalse + executeprocessed=false + return +;--- +.eptrue + executeprocessed=true + return +;--- +.racetrackgotonoun12gc +; note: compiler crashes if 'racetrackgotonoun12getcurrent' is used! + gosub @npcgetcurrent ; get x1=current action in npcstack +; +;;.racetrackgotonoun12 +; current position of racetrack for ACTOR is (NOUN1,NOUN2) +; NPCs current stack entry is npcstack(x1) +; write value back to it + gosub @getMessageNumber; value=noun1; gosub @valuetimes256; add value,noun2 + +.racetrackgotovalue +; current position of racetrack for ACTOR is VALUE. +; NPCs current stack entry is npcstack(x1) +; write value back to it + valueSave=value + index=x1 + x2=4 ; offset of noun2 in npcstack + add x2,index + npcstack(x2)=value + x2=npcstack(x2) ; low byte + sub value,x2 + x1=value + x2=256 + gosub @x1divx2 + x2=3 ; offset of noun1 in npcstack + add x2,index + npcstack(x2)=x1 + value=ValueSave + return +;--- +.doobeyracetrack +; ACTOR is currently on a racetrack, +; execute the next instruction +; return executeprocessed if anything active done +; NOUN1 gives the high byte of the offset within list5 +; and noun2 has low byte of offset of current instruction +; within list5 + gosub @getMessageNumber ; value=noun1, gosub @valuetimes256, add value,noun2 +.DOORTNoun1 +; now value is offset of current racetrack instruction +; within list5 + + cif allowcheat + if cheatmode<>2 then doortnotdebug1 + prs "[rt at " + print value +.doortnotdebug1 + cend ; allowcheat + + verb=list5(value) + add value,c1 + prep=list5(value) + add value,c1 + noun1=list5(value) + add value,c1 + noun2=list5(value) + add value,c1 + + cif allowcheat + if cheatmode<>2 then doortnotdebug + prs " actor=" + print actor + prs " command=" + gosub @debugshowcommand +.doortnotdebug + cend ; allowcheat + + if verb=0 then @eptrue + gosub @npcgetcurrent ; set up x1=current actor command in npcstack + gosub racetrackgotovalue ; set up new current address + + executeprocessed=false + if verb=rtConditional then doRtConditional + if verb=rtActorVaryMessage then doRtActorVaryMessage + if verb=RtActorSingleMessage then DoRtActorSingleMessage +; if verb=racetracksay then racetrackobeysay + if verb=racetrackmessage then racetrackobeymessage + if verb=racetrackvarymessage then racetrackobeyvarymessage + if verb=racetrackgoto then @racetrackobeygoto + if verb=racetrackgosub then @racetrackobeygosub + if verb=racetrackreturn then @racetrackobeyreturn + if noun1maxcollective then @singlepushfifo + gosub @initfifo + gosub @setupgdaccess ; push on appropriate order (two parts to command) + goto @linkonfifocommandqueue +;--- +.racetrackobeyvarymessage + gosub GetMessageNumber + gosub @specialrtMessage + goto @VaryMessageDot +;--- +.DoRtConditional +; only execute next instruction if NOUN1 is present +; ValueSave=value + object=noun1 + gosub @CheckIfPresent +; value=ValueSave + if result=true then @doortnoun1 +;;* +; if result=false then rtconditionfailed ; replaces above line +; +; if object<>user then @doortnoun1 +;; user is treated as "not present" if hiding in curtains ins gnome2.3 +; x9=hicurrentpos(user) +; if x9=0 then @doortnoun1 ; user has no hipos, so must be present +; x9=currentpos(user) +; if x9<>curtain then @doortnoun1 ; user not hidden, so must be present +;;* +.rtconditionfailed + x1=4 + add value,x1 ; skip conditional instruction +;;.DRTC1 + gosub @npcgetcurrent ; get x1=current action in npcstack + gosub @racetrackgotovalue + goto @doortNoun1 +;--- +.DoRtActorSingleMessage + m1=blankline ;*graham* + gosub @printm1 ;*graham* can't use cr at start of message + gosub @PrintActor + gosub RacetrackObeyMessage + goto @EpTrue +;--- +.DoRtActorVaryMessage + m1=blankline ;*graham* + gosub @printm1 ;*graham* can't use cr at start of message + gosub @PrintActor + gosub GetMessageNumber + gosub @specialrtMessage + goto @VaryMessageDot +;--- +.racetrackobeymessage +;***** +; Now, RTMESSAGE is only used when ACTOR is conversing with another +; NPC. In many cases, lastwordprinted will be the target NPC, +; and not the ACTOR. It is therefore improtant to set lastword to zero. + lastwordprinted=0 +;***** + gosub GetMessageNumber + gosub @specialrtmessage + goto @printM1dot +;--- +.GetMessageNumber + value=noun1 + gosub @valuetimes256 + add value,noun2 + m1=value + return +;--- +;.racetrackobeysay +; value=noun1 +; gosub @valuetimes256 +; add value,noun2 +; m1=value +; goto @actorsays +;--- +.racetrackobeygoto + gosub @racetrackgotonoun12gc + goto @doobeyracetrack +;--- +.racetrackobeygosub + verb=obeyracetrack + goto @singlepushfifo +;---- +.racetrackobeyreturn +;>>mike 2/4/88 gosub @intelligentpop + goto @setcommandfinished ; remove 'obey command' on command queue +;--- +;.racetrackgoplace +; verb=igdgo +; goto @singlepushfifo +;- +.executeanyorders +;; prs " [ExecuteAnyOrders. Actor=" +;; print actor +;; prs "] " + commandfinished=false ; set if can't do anything more at present, + FatalError=false ;>>added for L2 - probably permament +; but want to try again with same command next turn. + gosub abseao + if FatalError=true then @ReportProblem ;>>mike 8/2/88 + if commandfinished=true then @intelligentpop + if executeprocessed=false then @executeanyorders +.eaoret + return +; +;--- +.getcurrentcommand + gosub @npcgetcurrent ; set up x1=position in npcstack +; of current command + add x1,c1 + x8=x1 ;***** + verb=npcstack(x1) + add x1,c1 + prep=npcstack(x1) + add x1,c1 + noun1=npcstack(x1) + add x1,c1 + noun2=npcstack(x1) + goto @eptrue +;--- +.abseao +; if there are any orders pending for ACTOR, +; may as well carry one of them out... + gosub @getcurrentcommand +;===== +; if npcs are distressed by light, then prevent them from doing +; anything but moving + if actor=user then npcnotdistressed ; user is more complex and is +; handled in timedependant + if npcdistressed=false then npcnotdistressed + npcdistressed=false ; clear flag now that it's being +; proessed + if verb>249 then npcnotdistressed ; allow rt messages + if verb=139 then npcnotdistressed ; allow "find" + if verb<16 then npcnotdistressed ; allow movements + verb=0 +.npcnotdistressed +;===== + ProblemObject=noun1 + + cif allowcheat + if cheatmode<>2 then abseaonotdebug ;>> + prs "eao: " ;>> + print actor ;>> + message space ;>> + gosub @debugshowcommand ;>> +.abseaonotdebug + cend ; allowcheat + +;>>mike 28/3/88 if actor<>user then usernocheck +;>>mike 28/3/88 ; verb is current command - can it be interrupted? +;>>mike 28/3/88 gosub @savelist9 +;>>mike 28/3/88 gosub @checkforescape ;checkkbd +;>>mike 28/3/88 gosub @restorelist9 +;>>mike 28/3/88 if result=true then @getfromuser ; clears stack etc. +;>>mike 28/3/88 +;>>mike 28/3/88 .usernocheck + if verb=0 then @setcommandfinished ; nothing pending +.eaoverb + if verb>15 then eaonotdir + gosub @move + CommandFinished=true ;>>mike 26/3/88 +; executeProcessed will be set here if anything happened + return ;>>mike 26/3/88 +;>>mike 26/3/88 goto @setcommandfinished + +.eaonotdir +;&*&*& +; THIS IS A BODGE TO PREVENT NPC'S FROM "RUNNING" TO PLACES (GOD KNOWS +; WHY THEY EVEN TRY TO DO THIS!)... + IF ACTOR=USER THEN EAOOKTORUN + IF VERB<>ISETUPRUN THEN EAOOKTORUN + VERB=IGDGO +.EAOOKTORUN +;&*&*& + if verb=obeyracetrack then @doobeyracetrack + if verb=IReportProblem then @GDReportProblem + noun1isgd=false +;; if verb=ikill then @eaonotgdnoun1 ; collective ; >> Pete 13/6/89 + if verb=ifollow then @gdfollow ;eaonotcollective + if verb=igdgo then @gdgo + if noun1maxcollective then eaonotcollective + noun1isgd=true + gosub @gdnoun1 + if noun1=nullobject then @epfalse ; reached end of range + +.eaonotcollective + object=noun1 + if verb=ifollow then @gdfollow + if verb=igdgo then @gdgo + if verb=igdfind then @gdfind + if verb=igoout then @gdgoout + if verb=iwaitforperson then @gdwaitforperson + if verb=iwaitforperiod then @gdwaitforperiod + if verb=ireturnobject then @returnobject + if noun1=nullobject then eaononoun1 +; check if noun1 is present + gosub @selectobjectpos + if verb=itell then eaononoun2 + + gosub @checkifaccessible + if result=true then eaononoun1 + +;*graham* see gnome2.1 + gosub @npcneedsobject + if executeprocessed=true then @eaoret + +; we've found the object noun1... +.eaononoun1 + if noun2=nullobject then eaononoun2 +; only acceptable if noun2 is carried... + if prep<>with then eaochecknotcarried + if verb=igive then eaochecknotcarried +; lots of commands - like "kill knight with axe" - must +; be carrying noun2 for the command to be obeyed. + x1=currentpos(noun2) + hisearchpos=nouncarried ; force object to be carried + if x1<>actor then needsnoun2 + x1=hicurrentpos(noun2) + if x1<>0 then eaononoun2 +.needsnoun2 + object=noun2 + gosub @npcneedsobject + if executeprocessed=true then @eaoret ; must do verb next turn + goto eaononoun2 + +.eaochecknotcarried +; commands like "put xx in cabinet" where noun2 +; cannot be carried + object=noun2 +; +;&*&*& +; THIS MAY CAUSE PROBLEMS IN SOME AREAS... +; FOR SOME REASON, I HAD CHANGED IT TO ACCESSIBLE, BUT NOW HAVE HAD TO +; CHANGE IT BACK! MAYBE IT'S GOT SOMETHING TO DO WITH THE PHONE NO.S (?) + gosub @checkifPRESENT ; gosub @checkifACCESSIBLE ; bug fix *graham* +;&*&*& + hisearchpos=nonspecific + if result=false then needsnoun2 + +.eaononoun2 +;>>mike 28/3/88 if verb=ikill then eaonotgdnoun1 + if noun1isgd=true then eaonotgdnoun1 + commandfinished=true ; once-only verb, or not understood. + +.eaonotgdnoun1 +; ok, so call the verb! + gosub @preactorcr + if verb=iwait then @shortwait +;; if verb=ikill then @gdkill ; >> Pete 13/6/89 +; +;***** +; this is where NPCs calls a verb. do a few checks beforehand: +; +; if take, make sure object is NOT already owned + if verb=iget then testnotowned + if verb<>itake then notnpctake +.testnotowned + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=true then @actorcantverbnoun1dot ; already owned +; +; if drop/throw, make sure it's owned +.notnpctake + if verb=ithrow then testowned + if verb<>idrop then notnpcdrop +.testowned + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=false then @actorcantverbnoun1dot ; not owned +.notnpcdrop +;***** + goto @callverb +;------- +.calcinitialpos +; for object x1 +; return x1=initial lo pos, x2=hi initial pos for object x1 +; where is initial position? + add x1,x1 + x2=objectstart(x1) ; hi initial pos + add x1,c1 + x3=objectstart(x1) ; lo initial pos + x1=x2 + x2=16 + goto @x1modx2 +;--- +.calcinitialroom + gosub calcinitialpos ; for object x1 +; x2=hi initial pos, x1=lo initialpos + if x1=0 then calcinitret ; object is in room x3 + x1=x3 + goto calcinitialroom + +.calcinitret +.npcneedsobjectret + return +;--- +.npcneedsobject +; ACTOR tried to reference OBJECT, but it was not +; accessible in way HISEARCHPOS +; (the command which attempted the access is still on the stack) +; + cif allowcheat + if cheatmode<>2 then nno1 + message cr + prs "[(" + x1=actor + print x1 + prs ") " + gosub @printTHEobjectx1 + prs " is trying to find " + gosub @printTHEobject + prs " (" + print object + prs ")]" + message cr +.nno1 + cend ; allowcheat + + noun1=object ; for benefit of take etc. +; commandfinished=false ; for safety only + gosub @makelocal + if executeprocessed=true then npcneedsobjectret +; if commandfinished=true then npcneedsobjectret ; can't find - abort +; didn't follow, so although we were in the same room +; the verb handler must need the object to be carried +; here, commandfinished=false + if hisearchpos<>nonspecific then nrotake + commandfinished=true ; abort + return +;--- +.returnobject +; always called with causing command on stack +; npc needs to find noun1=object + if actor=user then @objectnothere ; for security only + if noun1>maxmoveable then @epfalse + x1=object + gosub calcinitialpos +; x3=lo pos, x1=hipos where object starts + x2=currentpos(object) + if x3<>x2 then ro1a + x2=hicurrentpos(object) + if x2=x1 then @setcommandfinished ;intelligentpop ; already at original pos + +.ro1a + gosub @makelocal + if executeprocessed=true then @roret ; still searching for it +; OBJECT is in actor's current room +; ACTOR takes OBJECT + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=true then nrogotobject + +.nrotake + noun1=object + noun2=nullobject +;>>special to gnome m1=3190 ; I'll take that! + objectsave=object +;>>special to gnome gosub @varysayM1dot +;***** +; also see call to @callverb above + if verb=ithrow then donttrytake + if verb=idrop then donttrytake + if verb=iget then donttrytake + if verb<>itake then trytake +.donttrytake + return +.trytake +;***** + verb=itake + noun2=nullobject + prep=0 + object=noun1 + goto @take ; gosub, return + +.nrogotobject +; ACTOR is in the process of returning NOUN1 +; to its initial position +; where is initial position? + x1=noun1 + gosub @calcinitialroom +; OBJECT should go to pos x1, hi pos x2 + if room=x3 then returnobject3 ; we are in the right room! +; move towards room x3 + dest=x3 + goto @gdfollowdest +; +.returnobject3 + if verb<>ireturnobject then roret +; put it back! + commandfinished=true ; kill 'recover' command + x1=object + add x1,x1 + x2=objectstart(x1) + add x1,c1 + x3=objectstart(x1) +; x3=lo initial pos, x2=hi initial pos + x1=x2 + x2=16 + gosub @x1modx2 +; x1=hi initial pos, x3=lo initial pos + verb=idrop + noun2=nullobject + prep=0 + if x1=0 then @callverb + verb=iwear + if x1=worn then @callverb + verb=iput + noun2=x3 + prep=x1 + goto @callverb +;--- +.makelocal + gosub @getobjectposx2 +; now x2=room where OBJECT is + executeprocessed=false + if x2=room then makelocalhere ; take it! + dest=x2 + gosub @gdfollowdest + executeprocessed=true ; but don't want to waste time. + +.makelocalhere +.roret + return +;--- +.chooserandomdirection +; return VERB=POSSIBLE ranomd direction from ROOM +; There is no guarantee whatsoever that it will be possible +; + x2=maxdirection + gosub @randomx1modx2 + dir=x1 + if dir=0 then crdend + + if room> Pete 14/9/89 +.dontwantfollow + executeprocessed=false + return +;--- +.followdead + GOSUB @STOPFOLLOWING ; * GRAHAM 6/10/88 * + fatalerror=true + object=noun1 + if actor<>user then @ReportProblem + ROOM=CURRENTUSERROOM ; * ROOM CORRUPTED, MESSAGE WAS NOT SHOWN! * +;;.printdead ; >> Pete 14/9/89 + verb=iam + gosub @printOBJECTverb + m1=3560 ; dead + goto @printM1dot +;--- +;* GRAHAM 6/10/88 * +.gdfollowdoesntexist + GOSUB @STOPFOLLOWING + fatalerror=true + object=noun1 + if actor<>user then @ReportProblem + ROOM=CURRENTUSERROOM + M1=2420 + GOTO @PRINTM1DOT ; DOESN'T EXIST +;* +;--- +.doiwantfollow +; follow someone if appropriate +; return executeprocessed=true if we have followed +;>>mike 28/3/88 executeprocessed=true + x1=followoffset + add x1,actorattributes + noun1=npccurrent(x1) +;;.doiwantfollownoun1 ; >> Pete 14/9/89 + fatalerror=false + if noun1=0 then dontwantfollow + x1=currentpos(noun1) ; where is follow target? + if x1=0 then gdfollowdoesntexist ; object destroyed (?) +;>>mike 26/3/88 if x1=room then targetishere +; target is not here + verb=ifollow + commandfinished=false + ProblemObject=noun1 ;>>mike 4/3/88 + gosub gdfollow +; consider stopping follow.... +;>>mike 26/3/88 if fatalerror=true then @stopfollowing ; some problem +;;.diwfret +;;.sufret +.gdfindRet + return +;--- +.setupfind + gosub @stopfollowing + + verb=igdfind + itword=noun1 + goto @SinglePushFifo ;>>mike 28/3/88 (used by user only) +;>>mike 28/3/88 gosub @npcpushfifo +;>>mike 28/3/88 gosub @linkonfifocommandqueue +;>>mike 28/3/88 gosub gdfind +;>>mike 28/3/88 if commandfinished=false then sufret +;>>mike 28/3/88 goto @intelligentpop +;--- +.gdfind + x4=noun1 ; character to follow + x6=room + gosub @setuproomx4 ; return ROOM=position of x4 + if x6<>room then @gdfollowobject + + cif AllowBoat + x1=hicurrentpos(noun1) ;>>added for Lancelot boat + x2=hicurrentpos(actor) ;>>added for Lancelot boat + if x1=x2 then @FollowFinished ;>>added for Lancelot boat + gosub @MaybeBoat ;>>added for Lancelot boat + if executeProcessed=true then gdfindRet ;>>added for Lancelot boat + cend + + goto @followfinished +;--- +.gdfollow +; ACTOR is following noun1 +; +; this code is now shared with GO from gdfollowdest onwards + cif allowcheat + if cheatmode<>2 then gdfollownotdebug + prs "actor " + print actor + prs " is trying to follow " + print noun1 + message cr +.gdfollownotdebug + cend ; allowcheat + + fatalerror=false + x4=noun1 ; character to follow + x6=room + gosub @setuproomx4 ; return ROOM=position of x4 + if x6<>room then gdfollownothere + +;; cif AllowBoat ;* also used without vehicles! +.MaybeBoat +; get into boat if here + x1=hicurrentpos(noun1) + x2=hicurrentpos(actor) + if x1=x2 then BoatFalse +; get in or out! + object=currentpos(noun1) + if object=actor then boatfalse ;*graham* see gnome2.1 + gosub @CheckIfPresent + if result=false then BoatFalse + + x2=hicurrentpos(actor) + prep=ipin + if x2=0 then Boat1 ; get in! + prep=ipout +.Boat1 + verb=istand + noun2=currentpos(noun1) ;*graham* + gosub @callverb ;*graham* + +.BoatFalse +;; cend ;* + + goto @epfalse ; both here, so can't follow at present + +.gdfollownothere + if noun1>maxNpc then gdfollowobject ;>>mike 6/2/88 - was Maxpeople + object=noun1 +;; gosub @isobjectalive ; >> Pete 14/9/89 +;; if result=false then @followdead ; >> Pete 14/9/89 + +.gdfollowobject +; + dest=room ; destination room just calculated by setuproomx4 + noun1=room + room=x6 ; restore saved source room +; if actor=rook then flydest ;*graham* +; drop through to gdfollowdest +; +.gdfollowdest + if actor<>user then gdfd1 + DestToDescribeExitsIn=dest + +.gdfd1 + gosub @canactormove + if result=false then @epfalse +; if not already set up, change descriptionmode to ibrief + if descriptionmode<>iverbose then gdfdnotv + descriptionmode=ibrief + +.gdfdnotv + x1=dest + x6=room + if room=dest then @followfinished + +;;*graham* +;; PORCH 40 TO HALL 16 IF LATCH IS OPEN +; if latchopen=false then nobreak4 +; if dest<>16 then nobreak3 +; if room<>40 then nobreak3 +; dir=11 ; in +; goto crossbreak +;.nobreak3 +;; +;; HALL 16 TO PORCH 40 +; if dest<>40 then nobreak4 +; if room<>16 then nobreak4 +; dir=12 ; out +; +;.crossbreak +; verb=dir +; goto @move ;callverb +;; +;.nobreak4 +;;*graham* + +; x6 is source room - compare all rooms with source, in case both +; source and destination are in the same complex + gosub @tracex1tosynth + if dest=0 then gdgoerror ; can't find + if processed=true then @gdfollowgoin +; now x1=synth room in which the destination is based +; store it away in synthdest + synthdest=x1 + if x1=room then @gdgoin2 ; am outside the complex containing dest + +; now trace source room through to synth room + x1=room + x6=dest ; compare all rooms with destination in case both +; source and destination are in the same complex + gosub @tracex1tosynth + if dest=0 then gdgoerror + if processed=true then @gdgoout +; now x1=synth room in which the source is based +; + if synthdest=dest then followdifferentcomplex ; go just outside complex + if x1<>synthdest then followdifferentcomplex + + + cif allowcheat + if cheatmode=0 then gdgonodebug + prs "Bug!! - no match during tracex1tosynth. " ;* +.gdgonodebug + cend ; allowcheat + + goto @gdgoout ; bug!!!! - should +; have been matched on one tracex1tosynth or the other +; because they are both in the same complex. +; The only likely explanation is that there are multiple, +; non-connecting paths to the exit. +; +.followdifferentcomplex +; source and destination are NOT in the same complex. +; Therefore, go out. + if roomuser then ReportProblem ;>>gdgoerr1 +;;*BUG FIX* GMJ 5/10/88 fatalerror=true + message 3605 ; can't find my way + message dot + goto followfinished + +.followfinished +.followjustfinished ; just moved + therefore arrived at dest. +; no descriptions on, so now have to print room we have arrived at + commandfinished=true ; terminate command + if actor<>user then @ffret + if descriptionmode<>inone then @ffret + descriptionmode=normaldescriptionmode +.GdReportProblemRet + return +;--- +.ReportProblem +; tell the NPC to go back to the player and report the problem + if actor=user then @GdRPEnd +; is NPC obedient? + x1=masteroffset ;***** + add x1,actorattributes ;***** + x1=npccurrent(x1) ;***** + if x1<>user then @SetCOmmandFinished + + noun1=ProblemObject + if room=currentUserRoom then GDReportProblem0 ;*****1 +; also pops the command + +; gosub IntelligentPop ;***** + +;***** + gosub @getcurrentcommand + verb=ireportProblem + noun2=problemObject ; save problem object for report + prep=0 + npcstack(x8)=verb + add x8,c1 + npcstack(x8)=prep + add x8,c1 + npcstack(x8)=noun1 + add x8,c1 + npcstack(x8)=noun2 +;***** + + fatalerror=false + commandfinished=false + executeprocessed=true + return ; goto SinglePushFIFO ; gosub, return ;***** +;--- +.GDReportProblem + noun1=user + gosub @GDFollow + noun1=noun2 ; set up problem object for report + if executeProcessed=False then GdReportProblem1 + commandfinished=false + return ; still on the way + +.gdreportproblem0 ;***** + gosub @intelligentpop ;***** +.GdReportProblem1 + FatalError=false ; we've sorted it! + lastwordprinted=0 ;***** + if actor=user then GdReportProblem3 ;*bug fix 22/2/89* + gosub @PrintActor + m1=3180 ; sorry! I couldn't do what you asked + if noun1=0 then gdGeneralProblem + if noun1<>nullobject then GdReportProblem2 +.gdGeneralProblem + m1=3180 ; sorry! I couldn't do what you asked + gosub @VaryMessageDot + goto GdReportProblem3 + +.gdReportProblem2 + if verb=0 then gdGeneralProblem + if noun1=user then gdGeneralProblem + + m1=3190 ; I couldn't do what you asked with + gosub @PrintM1 ;&&& + object=noun1 ;&& + gosub @PrintTheObject ;&& +;; m1=quote ;&& ; >> Pete 14/9/89 +;; gosub @Printm1 ;&& ; >> Pete 14/9/89 + gosub @PrintDot ;&& + +.GdReportProblem3 +.GdRPEnd +; gosub IntelligentPop ;>>NPCPOP ;***** + goto @SetCommandFinished + +;--- +.gdfollowgoin +; am on a goal-directed go/follow +; tracing along the OUT pointers from dest has come across +; the current location. The last move was in direction DIR, +; from room FROM, +; reverse direction.... + x1=dir + add x1,startreversaltable + dir=list5(x1) + gosub @preactorcr + verb=dir + gosub @move ;callverb + if commandfinished=true then ffret ;>>>>>>>> special to gnome + if fatalerror<>false then @gdgoerror ;>>mike 14/2/88 + + if room=noun1 then @followjustfinished ; reached destination +.ffret + return +;--- +.gdgoin2 +; are being asked to go 'IN' when in a grid location + dir=ivin + gosub @preactorcr + verb=dir + gosub @move ;callverb + if executeProcessed=false then @Gdgoerror ;>>mike 9/2/88 + processed=true + if room=noun1 then @followjustfinished ; reached destination + return +;--- +.gdgoout + if room>minsynthroomminus1 then @followjustfinished ; we must have arrived +; go outwards in current complex + x1=room + gosub @getfloorpointer ; in x2 for room x1 +;;.gdgoout2 + verb=list5(x2) + gosub @preactorcr + gdgoroomsave=room + gosub @move ;callverb +; see if we have arrived + processed=true + if room=gdgoroomsave then @followfinished + if room=noun1 then @followjustfinished ; YUP! + return ;nope! +;--- +.getfloorpointer +; return (x2)=in direction, (x2+1)=out direction +; for room x1 +; where are pointers for this room? + x2=startfloorpointers + add x2,x1 +;;.gfpret + return +;--- +.gdgo + dest=noun1 + ProblemObject=NullObject ;>>Mike 4/3/88 - go to a Room num, not an object +; if actor<>rook then gdfollowdest ;*graham* + goto @gdfollowdest ;*graham* +;--- +; *graham* +; Basically, same as gdfollowdest, except that this goes from ROOM +; to DEST in one move for fast flying objects. +; +; * This avoids all the tedious messing about typing WAIT every time +; the user wishes to be flown one move towards the DEST. +; * It uses a special "no-go area" check to avoid inappropriate +; messages in SPECIALMOVES. E.g. GO PARKLAND involves crossing the +; river. hence, "the river was too deep for the rook to cross", will +; be replaced with the more appropriate message, "the rook didn't know +; its way there". +; * Some routes involve going via indoors, such as from the front garden +; to the back garden. It would look very silly if the rook flew +; through the house rather than over it. The routine avoids this by +; just displaying the outdoor destination, and not the route. +; * It avoids having to cope with object manipulation while flying. +; * Also, the rook may only go to an outside destination. +; +; This uses a simple philosophy that by tracing both ROOM and DEST +; successfully to the grid, there MUST be a valid route. Finding +; the shortest possible route is not required here. +; +;.flydest +; gosub @canactormove +; if result=false then @followfinished +; gosub @specialnogoarea +; if result=false then @followfinished ; can't go there +; if room=dest then @followfinished ; already there! +; roomsave1=room +; destsave1=dest ; these are unaffected +; x1=destsave1 +; x6=roomsave1 +; gosub @tracex1tosynth ; trace DEST to grid +; if dest=0 then gdgoerror +; x1=roomsave1 +; x6=destsave1 +; gosub @tracex1tosynth ; trace ROOM to grid +; if dest=0 then gdgoerror +; room=roomsave1 +; dest=destsave1 +;; route is ok, do the "teleport" +; m1=2507 +; gosub printm1dot ; the rook took to the air and flew quickly +; from=room +; room=dest +; currentpos(actor)=room +; hicurrentpos(actor)=c0 +; gosub @setuproom +; gosub @followfinished +;; just in case user happens to be where rook will land... +;; (this is virtually impossible, since the user is the only one +;; who can command the rook) +; m1=2508 +; gosub printm1dot ; rook landed nearby +; goto @aftermove +; *graham* +;--- +;.increaseboredom +;; increment the boredom counter for all npcs... +; x1=boredomoffset ; entry for npc #0 +; x3=npcentrysize +; +;.ana1 +; x2=npccurrent(x1) +; add x2,c1 +; npccurrent(x1)=x2 +; add x1,x3 ; skip on to next entry +; if x1>removed for L2 lastuserroom=lastroom +; activationsremaining=maxactivations +;; do npc movement for the room where the user is NOW + actor=user + gosub @setuproom + currentuserroom=room +; gosub npcactionsroom +; +; if againverb>maxdirection then npcanotmove +;; user has just moved, so give the npcs in the room he was +;; just in a crack of the whip (possibly literally!) +; room=lastuserroom +; if room=0 then npcanotmove +; gosub npcactionsroom +; if activationsremaining>negative then npcaend +; +;.npcanotmove +; now go through all npcs to see which are getting impatient. +; For each npc, we have npccurrent(boredomoffset) which +; gives the number of turns since it was last activated +; And npcinitial(patienceoffset) which gives the number of +; turns it is prepared to wait. + actor=2 +.npcaloop + if actor=user then npcanoneedtoactivate + gosub @setACTORATTRIBUTES +;>>l2; has a high-priority event happened - i.e. is attention flag set? +;>>l2 x1=attentionoffset +;>>l2 add x1,actorattributes +;>>l2 x2=npccurrent(x1) +;>>l2 if x2=0 then npcaloop1 +; have had a high-priority interruption - verb +; handlers may want to take this into account when +; deciding what to do - so pass attention flag to them, +; then clear it anyway when they've had their chance +;>>l2 loopactor=actor ; save actor * why is this necessary? +;>>l2 gosub npcaactivate +;>>l2 actor=loopactor +;>>l2 gosub @setACTORATTRIBUTES +;>>l2 x1=attentionoffset +;>>l2 add x1,actorattributes +;>>l2 npccurrent(x1)=c0 ; clear attention flag +;>>l2 return + +;;.npcaloop1 +; is npc inactive? + x1=npccurrent(actorattributes) + + cif AllowCheat + if cheatMode<2 then nalNoCheat1 + if CheatMode>32000 then nalNoCheat1 + prs " actor=";* + print actor ;* + prs ". " ;* + print x1 ;* + message space ;* +.nalNoCheat1 + cend ; allowcheat + +; if x1<128 then npcaLoopActivate + if x1<64 then npcaLoopActivate +;; if x1<128 then npcaNoNeedToActivate ; failsafe + gosub @SetupRoom +;; if Room=CurrentUserRoom then Activateit + + cif AllowCheat + if cheatMode<2 then nalNoCheat2 + if CheatMode>32000 then nalNoCheat2 + prs " room=" ;* + print room ;* + prs " cur=" ;* + print CurrentUserRoom ;* +.nalNoCheat2 + cend ; allowcheat + + x1=npccurrent(actorAttributes) + if room<>CurrentUserRoom then npcANoNeedToActivate +;;.ActivateIt + npccurrent(actorAttributes)=c0 ; make it permamently active. + goto npcaactivate ; activate it immediately for quick response + +.npcaLoopActivate +; now see if npc is bored enough to activate itself +; x1=boredomoffset +; add x1,actorattributes +; x1=npccurrent(x1) +; x2=patienceoffset +; add x2,actorattributes +; x2=npcinitial(x2) +;; now x1=number of turns actor has been waiting +;; and x2=number of turns it is prepared to wait +; if x1>mike 6/4/88 room=currentpos(actor) + gosub @SetupRoom ;>>mike 18/4/88 + if room=0 then npcanoneedtoactivate ; dead or whatever +; gosub calcnpctime ; check time +; if x1>250 then npcaend ; out of time! +.npcaactivate +; sub activationsremaining,c1 +; if activationsremaining>negative then npcaend + gosub activatenpc +.npcanoneedtoactivate + add actor,c1 + if actor> Pete 14/9/89 + + actor=user + gosub @setuproom + gosub @setACTORATTRIBUTES + goto @initfifo +;--- +;>>mike 28/3/88.npcactionsroom +;>>mike 28/3/88 NoTreasureInRoom=false ; first greedy npc will check +;>>mike 28/3/88 if room=0 then npcaret +;>>mike 28/3/88 roomtoactivate=room +;>>mike 28/3/88 ACTOR=minnpc +;>>mike 28/3/88.anothernpc1 +;>>mike 28/3/88 room=roomtoactivate +;>>mike 28/3/88 object=actor +;>>mike 28/3/88 gosub @checkifpresent +;>>mike 28/3/88 if result=false then npcar1 +;>>mike 28/3/88; any time to activate it this turn? +;>>mike 28/3/88 sub activationsremaining,c1 +;>>mike 28/3/88 if activationsremaining>negative then npcaret +;>>mike 28/3/88 gosub activatenpc +;>>mike 28/3/88.npcar1 +;>>mike 28/3/88 add ACTOR,c1 +;>>mike 28/3/88 if ACTOR>mike 28/3/88.npcaret +;>>mike 28/3/88 return +;--- +;;.healactor ; >> Pete 14/9/89 +;; x1=HitPointOffset ; >> Pete 14/9/89 +;; add x1,ActorAttributes ; >> Pete 14/9/89 +;; x2=npcinitial(x1) ; >> Pete 14/9/89 +;; x3=npccurrent(x1) ; >> Pete 14/9/89 +;; if x3> Pete 14/9/89 +;; return ; >> Pete 14/9/89 + +;;.HealActor1 ; >> Pete 14/9/89 +; actor is injured - heal him +; x4=4 ; rate of healing offset +; add x4,ActorAttributes +; x4=npcInitial(x4) ; x4 becomes amount to heal per turn +;; x4=10 ; add on some health ; >> Pete 14/9/89 +;; add x3,x4 ; >> Pete 14/9/89 +;; if x3>x2 then HealActor2 ; >> Pete 14/9/89 +;; npccurrent(x1)=x3 ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 + +;;.HealActor2 ; >> Pete 14/9/89 +;; npccurrent(x1)=x2 ; set to max hit points ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.ACTIVATENPC +; ACTOR is a living NPC +; who may or may not be within sight of the player, +; so make it do something + cif allowcheat + if cheatmode<2 then noactivateinfo + if CheatMode=NullValue then noActivateInfo + message cr + prs "activating " + print actor + prs "(" + add forceprinting,c1 + gosub @printactor + sub forceprinting,c1 + prs "). " +.noactivateinfo + cend ; allowcheat + + gosub @specialnpcgoldsinging ; graham 17/5/88 + + gosub @initfifo + gosub absactivatenpc + goto @linkonfifocommandqueue +;--- +.absactivatenpc + GOSUB @setACTORATTRIBUTES +; reset boredom counter +; x1=boredomoffset +; add x1,actorattributes +; x2=npccurrent(x1) +; if x2=0 then aanret ; already activated this turn +; npccurrent(x1)=c0 +; +;; x1=hitpointoffset ; >> Pete 14/9/89 +;; add x1,actorattributes ; >> Pete 14/9/89 +;; x1=npccurrent(x1) ; >> Pete 14/9/89 +;; if x1=0 then @aanret ; dead! ; >> Pete 14/9/89 +; + verb=0 + noun1=nullobject + noun2=nullobject + prep=0 +; ACTORATTRIBUTES REMAINS SET UP THROUGHOUT PROCESSING OF THE NPC +; +; reduce hatred of current enemy +;; x1=hatredoffset ; >> Pete 14/9/89 +;; add x1,actorattributes ; >> Pete 14/9/89 +;; x2=npccurrent(x1) ; >> Pete 14/9/89 +;; if x2=0 then annohate ; >> Pete 14/9/89 +;; sub x2,c1 ; >> Pete 14/9/89 +;; npccurrent(x1)=x2 ; >> Pete 14/9/89 +;;.annohate ; >> Pete 14/9/89 +;; gosub @healactor ; >> Pete 14/9/89 +; + processed=false + gosub @specialactivatenpc + if processed=true then aanret + if verb<>0 then @eaoverb ; do it immediately +; + gosub decisioncode + if executeprocessed=true then npcret +; don't want to do any of the useful possibilities - consider random things +; +; maybe it could move? + gosub @CanActorMove + if result=false then npcm1 + random x1 + if x1>200 then @npcmove + +; at this point, ACTOR is doing abslutely buggerall. if ACTOR should +; be doing something, then it should be hard coded here... +.npcm1 +;===== +; this code prevents NPCs hanging around doing nothing once they +; have finished a command queue or racetrack. this is useful, since +; it is important that NPCs in spook.1 return to their graves when +; left unattended. +; +; is NPC busy following somebody? + x1=followoffset + add x1,actorattributes + x1=npcCurrent(x1) + if x1<>0 then npcbusy ; yes, so don't restart racetrack +; +; has NPC been recruited? + x1=obedienceoffset + add x1,actorattributes + x1=npcCurrent(x1) + if x1<>user then npcbusy ; no, so don't restart racetrack +; +; is NPC in the game? + object=actor + gosub @getobjectposx2 + if x2=0 then npcbusy ; no, so don't restart racetrack +; + x6=42 + if object=bert then @newracetrackforobject + x6=43 + if object=edna then @newracetrackforobject + x6=45 + if object=alex then @newracetrackforobject + x6=46 + if object=edith then @newracetrackforobject + x6=47 + if object=david then @newracetrackforobject + x6=49 + if object=colonel then @newracetrackforobject + x6=50 + if object=dog then @newracetrackforobject + x6=51 + if object=violet then @newracetrackforobject +; +.npcbusy +;===== + +.npcret +.aanret +.DecisionCodeRet +.npcmoveret + RETURN +;--- +.decisioncode +;; gosub @amiincombat ; gives result=true if currently fighting someone ; >> Pete 14/9/89 +;; if result=true then @defendMyself ; >> Pete 14/9/89 +; check for other actions +; +; any orders waiting? (either from previous happenings, +; or from the npc's master) +; (taken out of loop below to avoid variable conflicts etc. +; Probably possible to re-insert with a little thought - +; but only saves one variable) +; + gosub @npcgetcurrent ; get stack pointer x1 for actor + add x1,c1 + orderwaiting=npcstack(x1) ; 0 if none +; another form of orders is following someone... + if orderwaiting<>0 then decidenotfollow + gosub @checknullaction + if orderwaiting<>0 then decidenotfollow + goto DNF1 ;>>mike 29/3/88 + +.decideNotFollow ;>>mike 29/3/88 +; try executing current orders if obedient enough + x1=obedienceOffset ;>>mike 29/3/88 + add x1,ActorAttributes ;>>mike 29/3/88 + x1=npcInitial(x1) ;>>mike 29/3/88 + if x1=255 then DNF0 ;>>mike 29/3/88 + random x2 ;>>mike 29/3/88 + if x2>x1 then DNF1 ;>>mike 29/3/88 +.DNF0 ;>>mike 29/3/88 + gosub @ExecuteAnyOrders ;>>mike 29/3/88 + if executeProcessed=true then DecisionCodeRet ;>>mike 29/3/88 + +.DNF1 + x1=followoffset + add x1,actorattributes + x1=npcCurrent(x1) + if x1<>0 then @DoIWantFollow ;>>mike 29/3/88 +; + goto @epfalse + +; if result=false then decidenotcombat +; X1=CURRENTPOS(NOUN1) ; but is the enemy here? +; IF X1=ROOM THEN @defendmyself ; yes - so have to attack or run away +; no - so only chase it if nothing better to do +; +; now some high priority events, such as on-going combat... +; +;;.decidenotcombat +; now decide on other (pseudo-random) things to do +; +;>>mike 29/3/88 x6=0 ; item with biggest margin +;>>mike 29/3/88 x5=0 ; current biggest margin +;>>mike 29/3/88;; x1=greedoffset ; first of the characteristics +;>>mike 29/3/88;; if NoTreasureInRoom=false then decideloop +;>>mike 29/3/88; no treasure in here, so no point in NPC wanting some! +;>>mike 29/3/88; x1=aggressionoffset ; greedoffset+1 +;>>mike 29/3/88 x1=obedienceoffset +;>>mike 29/3/88.decideloop +;>>mike 29/3/88 x2=actorattributes +;>>mike 29/3/88 add x2,x1 +;>>mike 29/3/88 x2=npcinitial(x2) +;>>mike 29/3/88 if x2=255 then decideloopalways ; special case - always do this actio +;>>mike 29/3/88 random x3 +;>>mike 29/3/88 sub x2,x3 +;>>mike 29/3/88 if x2>negative then decideloop2 ; doesn't want to do it at all! +;>>mike 29/3/88; x2 is margin by which npc wants to do this thing +;>>mike 29/3/88 if x2>mike 29/3/88.decideloopalways +;>>mike 29/3/88 x5=x2 ; set up new biggest margin +;>>mike 29/3/88 x6=x1 ; set up new item +;>>mike 29/3/88.decideloop2 +;>>mike 29/3/88 add x1,c1 +;>>mike 29/3/88 if x1>mike 29/3/88; only go up to obedienceoffset if there +;>>mike 29/3/88; are some orders waiting - otherwise obedient creatures +;>>mike 29/3/88; would become zombies when they had no orders to obey +;>>mike 29/3/88; +;>>mike 29/3/88 if x1<>obedienceoffset then decideloopnotobedience +;>>mike 29/3/88 if orderwaiting=0 then decideloopnotobedience ; nothing to do! +;>>mike 29/3/88 if cheatmode=false then decideloop ; see if obedient! +;>>mike 29/3/88 x2=255 ; completely obedient in cheat mode +;>>mike 29/3/88 goto decideloopalways +;>>mike 29/3/88 +;>>mike 29/3/88.decideloopnotobedience +;>>mike 29/3/88; now x6 is item with biggest margin +;>>mike 29/3/88;; if x6=greedoffset then @doiwanttreasure +;>>mike 29/3/88;; if x6=aggressionoffset then @doiwantattack +;>>mike 29/3/88; if x6=timidityoffset then @runaway +;>>mike 29/3/88 if x6=obedienceoffset then eitherordersorfollow +;>>mike 29/3/88; +;>>mike 29/3/88.lTwoNoOrders +;>>mike 29/3/88 executeprocessed=false ; allow random things to happen +;>>mike 29/3/88; +;>>mike 29/3/88 return +;>>mike 29/3/88;--- +;>>mike 29/3/88.eitherordersorfollow +;>>mike 29/3/88 if orderwaiting=ifollow then @doiwantfollow ;following, but no orders +;>>mike 29/3/88 goto @executeanyorders +;--- +;;.npcanothermove +;;; do we want another attempt at moving? Decide randomly +;;; (this cuts execution time, and breaks iloops) +;; random x1 +;; if x1<60 then npcmoveret + +.npcmove +; move npc ACTOR in a random direction +; we have already done gosub @canactormove +; if result=false then npcmoveret + gosub @canactorrandommove + if result=false then npcmoveret +; +; ok, do a random direction + gosub @chooserandomdirection + if verb=0 then npcmoveret + noun1=nullobject + noun2=nullobject + prep=0 + gosub @callverb ; move the npc, describing as appropriate + FatalError=false + goto @EpTrue +; +;--- +.NPCGOLDSINGING +; random messages said by NPC +; most characters pick a random one of three +; messages within a block, offset from start by NPC number + + WANTTOPRINTAND=0 + +;>>mike 30/3/88 if descriptionmode<>iverbose then npcret +;>>mike 30/3/88 if room<>currentuserroom then npcret +;>>mike 30/3/88 gosub @setuproom ;?? why is this necessary? + +;;>>Not Needed in Gnome. if lightinroom=true then gs1 +; m1=2177 ; you hear some noises... +; goto gs2 +; +;.gs1 +;>>mike 30/3/88 x1=actor +;>>mike 30/3/88 GOSUB @printTHEobjectx1 ; uses m2 only +;>>mike 3/4/88 gosub @PrintActor ;>>mike 30/3/88 +; find message base from npcinitial + x4=goldsingingoffset + add x4,actorattributes + value=npcinitial(x4) + gosub @valuetimes256 + add x4,c1 + x2=npcinitial(x4) + add value,x2 + if value=0 then @eptrue ;>>mike 3/4/88 + gosub @PrintActor ;>>mike 3/4/88 + m1=value +;;.gs2 + goto @varymessagedot +;--- +;;.varyactorsays +;; gosub @getvarym1 +; drop through to npcsays +; +;.actorsays +;; ACTOR M1 +; X1=ACTOR +;.npcx1says +; if lightinroom=true then ns1 +; m2=3746 ; a voice in the dark says.... +; gosub @printM2 +; goto ns2 +; +;.ns1 +; verb=isay +; m1save=m1 +; GOSUB @printACTORverb +; m1=space +; gosub @printM1 +; m1=m1save +; +;.ns2 +; gosub @printQUOTE +; gosub @printM1 +; gosub @printQUOTE +; return +; +; print 'a male (female) voice in the distance shouts "something".' +; Or print the person shouting if nearby.. +;;.varyactorshouts +;;gosub @getvarym1 +;; +;;.actorshouts +;; if descriptionmode<>iverbose then asret +;; forceprinting=true ; even distant things are printed during 'shout' +;; m1save=m1 +;; if room=currentuserroom then actorshoutshere +;; x1=actor +;; gosub @conjugatex1 +;;; now result=pronoun offset for actor +;; m1=3736 ; start of 'a male voice shouts' type thing +;; add m1,result ; (0..7) +;; gosub @printM1 +;; goto ash1 +;; +;;.actorshoutshere +;; lastwordprinted=0 ; force printing name (*why is this needed) +;; verb=ishout +;; gosub @printACTORverb +;; +;;.ash1 +;; message space +;; message quote +;; m1=m1save +;; gosub @printM1dot ; what actor shouts. +;; message quote +;; message space +;; forceprinting=false +;;.asret +;; return +;--- +; +.initnpcs +; first zero all npccurrent entries +; x1=0 +;.initnpc1 +; npccurrent(x1)=c0 +; add x1,c1 +; if x1> Pete 14/9/89 +;; gosub MakeObjectObedient ; >> Pete 14/9/89 +;; x1=followOffset ; >> Pete 14/9/89 +;; add x1,x4 ; >> Pete 14/9/89 +;; npccurrent(x1)=c1 ; user ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.makeobjectobedient +; make OBJECT obedient to USER + gosub @setX4toOBJECTATTRIBUTES + x1=masteroffset + add x1,x4 + npccurrent(x1)=c1 ; user + return +;--- +.follow +; set up npccurrent(npc attributes + 1)= person to follow +;>>mike 28/3/88 if actor<>user then follownotuser +;>>mike 6/2/88 if noun1>maxpeople then @setupfind +; +; +;>>mike 28/3/88.follownotuser +; + gosub @stop ; **graham 9/6/88 pete wanted gnoah to end his rt when + ; asked to to follow** + x1=followoffset + add x1,ACTORATTRIBUTES + npccurrent(x1)=noun1 +;>>mike 28/3/88 gosub @doiwantfollownoun1 ;<<>mike 28/3/88 if fatalerror=true then @stopfollowing +;;.followret + return +;--- + +.npcpusherror +; no free space left! +;===== +; An attempt to make things a little more friendly for spook.1 when +; all 8 NPCs are given big lists of commands... + processed=true ; prevent obedience message + gosub @printactor ; + m1=3600 + goto @printm1 ; said, I'm not your slave! +;===== +;; cif AllowCheat +;; gosub @debugshowstack +;; cend +;;; and normal stack overflow recovery code... +;; freespaceptr=x2 +;; message 3600 ; a voice in the distance shouts, "a stack error" +;; gosub @initnpcs ; clear all stack, enemies etc. (positions unchanged) +;; goto @getfromuser ; clears acode stack +;--- +.initfifo +; initialise a temporary fifo chain +; this is linked to the command queue for ACTOR when it has been +; completed +; This allows new commands to be added as the +; next thing for the NPC to do, but +; the block of commands given will be executed in the +; order given + gosub @setACTORATTRIBUTES ; this maybe prevents bugs + initfifoactor=actor + if lastunlinkedcommand=0 then initfifook + + cif allowcheat + if cheatmode=0 then lulnodebug + prs "err2: lastunlinked command=" ;* + print lastunlinkedcommand ;* + prs ".] " ;* +.lulnodebug + cend ; allowcheat + + lastunlinkedcommand=0 ; pointer to block of last command given + +.initfifook + commandstolink=freespaceptr ; pointer to first command given + return +;--- +.linkonfifocommandqueue +; link on the queue which has been built up. +; The first command to be executed is at COMMANDSTOLINK +; and the last is at lastunlinkedcommand + gosub @setACTORATTRIBUTES ;* maybe avoids bugs? + + + cif allowcheat + if actor=initfifoactor then lifcq1 + if cheatmode=0 then lifcq1 + message cr ;* + prs "[err1:" ;* + print actor ;* + prs "/" ;* + print initfifoactor ;* + prs "]" ;* + message cr ;* +.lifcq1 + cend ; allowcheat + + if lastunlinkedcommand=0 then lofcqret + x1=npcptroffset + add x1,ACTORATTRIBUTES + x4=npccurrent(x1) +; now x4=number of current stack entry + npccurrent(x1)=commandstolink + x1=lastunlinkedcommand + gosub npcgetoffset ; of number x1, returns in x1 +; now x1=offset in npcstack of last command to link + npcstack(x1)=x4 ; link to what used to be current actor command + lastunlinkedcommand=0 +.lofcqret + return +;--- +.singlepushfifo +; do a complete fifo push, without the extra facility +; of being able to give multiple commands which +; are executed in the order they were given + gosub @initfifo + gosub npcpushfifo + goto @linkonfifocommandqueue +;--- +.npcpushfifo +; for npc ACTOR, add a new action to the end of its 'pending +; action' queue, such that it will be the last to be executed. +; i.e. FIFO +; +; find some free space + if lastunlinkedcommand=0 then npffirstcommand + x1=lastunlinkedcommand + gosub npcgetoffset + npcstack(x1)=freespaceptr ; link on new command + if lastunlinkedcommandmaxcollective then npcpop + gosub npcpop +; drop through to npcpop for second part of gd command + +.npcpop +; Only use this if you are sure you know what you are doing - +; normally use intelligentpop + +; npc is to stop doing its current action, and climb to next +; on its chain. The top action (the default one) is never deleted +; +; return x3=0 if pop error occured + gosub @npcgetcurrent + x2=npcstack(x1) ; number of command to execute after this one +; and add this element as the current element in the free space chain + x4=npcptroffset + add x4,actorattributes + x3=npccurrent(x4) + if x3=0 then npcpoperror ; no current command on stack + npccurrent(x4)=x2 ; make element above it current action for npc + + npcstack(x1)=freespaceptr + freespaceptr=x3 +;;.gogetret +.npcpoperror + return +;--- +.commandstop + gosub @done + +.stop +; cancel all ACTOR's current command queue + gosub @setACTORATTRIBUTES ; just in case! +.stop1 + gosub npcpop + if x3<>0 then stop1 ; more to come + gosub stopfollowing + if actor<>user then @done ;>>mike 8/2/88 +;>>mike 8/2/88 if actor<>user then @done +; gosub checkkbd ; security only +; if result=true then getfromuser ; clears stack etc. + goto @abscancelinput ; gosub, return +;--- +.stopfollowing + gosub @setACTORATTRIBUTES + x1=followoffset + add x1,actorattributes + npccurrent(x1)=c0 ; stop following + return +;--- +;--- +.preactorcr + if actor<>user then pacret + message cr +.pacret + return +;--- +;------- +;--- +.tracex1tosynth +; trace from room x1 back to the synthesised room number +; return x1=synth room number +; if any room=x6 on the way, return with processed=true +; and dir=direction of last move +; before we encountered x6 + processed=false + if x1=x6 then txtsfound + if x1>minsynthroomminus1 then txtsret + + cif AllowCheat + if cheatMode<>2 then NotTXCheat + print x1 + message space +.NotTXCheat + cend ; allowcheat + + gosub @getfloorpointer ; in x2 for room x1 + dir=list5(x2) + from=x1 + gosub @checkexit ; exit x1 x3 x4 x5 ; room dir status dest + if dest=0 then txtsret ; in for safety only + x1=dest + goto @tracex1tosynth +;--- +.txtsfound +; have found a match with x6 +; i.e. both source and dest for the move are in +; the same complex + processed=true +.txtsret + return +;--- + cif allowcheat + +.debugshowstack ;* + message cr + prs "Command queues are: (return to stop, space to step if looping)" + actor=1 +.debugstack1 + message cr + object=actor + forceprinting=true + gosub @printTHEobject + message colon + gosub @setACTORATTRIBUTES + gosub @npcgetcurrent ; set up x1=position in npcstack +.debugstack2 +; of current command + x2=npcstack(x1) ; pointer to next + add x1,c1 + verb=npcstack(x1) + add x1,c1 + prep=npcstack(x1) + add x1,c1 + noun1=npcstack(x1) + add x1,c1 + noun2=npcstack(x1) + + if verb=0 then debugstack3 + gosub debugshowcommand + x1=x2 + gosub @npcgetoffset ; transform x1 from entry number to offset in stack. + goto debugstack2 + +.debugstack3 + add actor,c1 + if actor200 then dssnoverb ; funny verb + m1=50 ; start of verbs + add m1,verb + message m1 +.dssnoverb + prs "(" + print verb + prs ") " +; + if prep=0 then dssnoprep + if verb>200 then dssnoprep + m1=1600 + add m1,prep + message m1 +.dssnoprep + prs "(" + print prep + prs ") " + + if noun1=nullobject then dssnonoun1 + if noun1=0 then dssnonoun1 + if verb>200 then dssnonoun1 + m1=300 + add m1,NOUN1 + message m1 +.dssnonoun1 + prs "(" + print noun1 + prs ") " + + if noun2=nullobject then dssnonoun2 + if noun2=0 then dssnonoun2 + if verb>200 then dssnonoun2 + m1=300 + add m1,noun2 + message m1 +.dssnonoun2 + prs "(" + print noun2 + prs "), " + cend + return + +;--- +;>>mike 28/3/88.gdkilldead +;>>Mike 28/3/88; object=noun1 here. +;>>Mike 28/3/88 commandfinished=true +;>>Mike 28/3/88 goto @printdead ; object is dead (gosub,return) +;--- +;;.gdkill ; >> Pete 14/9/89 +; am in the middle of killing noun1 +; is target dead? +;>>mike 6/2/88 if noun1>maxpeople then @silly ;<maxNpc then @Silly ;>>mike 6/2/88 ; >> Pete 13/6/89 +;; object=noun1 ; >> Pete 13/6/89 +;; gosub @setX4toOBJECTATTRIBUTES ; >> Pete 13/6/89 +;; x1=hitpointoffset ; >> Pete 13/6/89 +;; add x1,x4 ; >> Pete 13/6/89 +;; x1=npccurrent(x1) ; >> Pete 13/6/89 +;; commandFinished=true ; >> Pete 13/6/89 +;; if x1=0 then @PrintDead ; target is dead ; >> Pete 13/6/89 +;; x1=currentpos(noun1) ; >> Pete 13/6/89 +;; if x1=0 then gdKillRet ; target is otherwise absent ; >> Pete 13/6/89 +; +;>>Mike 28/3/88 executeprocessed=true +;>>Mike 28/3/88 object=noun1 +;>>Mike 28/3/88 gosub @checkifpresent +;>>Mike 28/3/88; x1=currentpos(noun1) +;>>Mike 28/3/88 verb=iattack +;>>Mike 28/3/88 gosub @preactorcr +;>>Mike 28/3/88 if result=true then @callverb +; +; current enemy is not here. +;>>Mike 28/3/88 gosub @doiwantfollownoun1 ; chase enemy +;>>Mike 28/3/88 if executeprocessed=false then gdkillret ; couldn't follow - so abort +;>>Mike 28/3/88 if fatalerror=true then ReportProblem ;gdkillret +;>>Mike 28/3/88 commandfinished=false ; still have to kill it! +;; gosub @doiwantFollowNoun1 ; chase enemy ;>>Mike 28/3/88 ; >> Pete 13/6/89 +;; commandFinished=false ; still have to kill it. >>Mike 30/4/88 ; >> Pete 13/6/89 +;; if executeProcessed=true then gdKillRet ;>>Mike 28/3/88 ; >> Pete 13/6/89 +;; verb=iattack ; >> Pete 13/6/89 +;; goto @callverb ; >> Pete 13/6/89 +;--- +;--- +;;.kill ; >> Pete 14/9/89 +; initiate a goal-directed kill +;; if actor<>user then gdkill ; >> Pete 14/9/89 +;>>mike 28/3/88 if noun1>maxNpc then @silly ;>>mike 6/2/88 +;>>mike 28/3/88 object=noun1 +;>>mike 28/3/88 gosub @npcpushfifo +;>>mike 28/3/88 gosub @linkonfifocommandqueue +;<<< gosub done +;; gosub @IsObjectAlive ;>>mike 28/3/88 ; >> Pete 13/6/89 +;; if result=false then @PrintDead ;>>mike 28/3/88 ; >> Pete 13/6/89 +;; goto @singlePushFifo ;>>mike 28/3/88 ; >> Pete 13/6/89 +;>>mike 28/3/88 goto @executeanyorders +;--- +;--- +;;.amiincombat ; >> Pete 14/9/89 +; return result=true if actor is in combat at present +; and noun1=current enemy +;; result=false ; >> Pete 13/6/89 +;; NOUN1=NPCCURRENT(ACTORATTRIBUTES) ; >> Pete 13/6/89 +; current enemy - is it fighting anyone ? +;; IF NOUN1=0 THEN aicret ; >> Pete 13/6/89 +; is it angry enough to keep on attacking current enemy? +; x1=hatredoffset +; add x1,actorattributes +; x2=npccurrent(x1) +; if x2<5 then aicret +;; goto @returnTrue ; >> Pete 13/6/89 +;--- +;;.defendmyself ; >> Pete 14/9/89 +; come here when we know that npc is in battle +;; object=noun1 ; >> Pete 13/6/89 +;; gosub @checkifpresent ; >> Pete 13/6/89 +;; if result=true then incombat ; >> Pete 13/6/89 +; current enemy is not here. +;; x1=currentpos(object) ; >> Pete 13/6/89 +;; if x1<>0 then @doiwantfollownoun1 ; at the moment, always chases enemy ; >> Pete 13/6/89 +; lose agression +;; x1=EnemyOffset ; >> Pete 13/6/89 +;; add x1,ActorAttributes ; >> Pete 13/6/89 +;; npccurrent(x1)=c0 ; >> Pete 13/6/89 +;;.aicret ; >> Pete 14/9/89 +;;.gdkillRet ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +;;.diwattackanyonenew +; is there anyone else (i.e. orc) here to attack? +; noun1=user +; object=noun1 +; gosub @checkifpresent +; if result=false then @noattack +;; how aggressive is actor? +; random x1 +;; x1=random 0..255 +; x2=aggressionoffset +; add x2,actorattributes +; x2=npcinitial(x2) +;; x2=aggression %ge +;; x1=random 'feelings' - if between 0 and aggression, charge! +; if x1>x2 then @noattack ; not this time, thankyou +;; want attack +;; initiate an attack +; x4=actorattributes +; gosub @increasehatred ; make attacker hate (orc) a bit +; m1=3330 ; a player! lets kill it! and sim. +; gosub @varysayM1dot +; wanttoprintand=x1 ; we always attack player now, so this is safe +; goto definiteattack + +;;.incombat ; >> Pete 14/9/89 +; either run away or attack +; x1=timidityoffset +; add x1,actorattributes +; x2=npcinitial(x1) +; random x1 +; if x1user then definiteattack1 ; no shout for attacking others ; >> Pete 13/6/89 +;; random x1 ; >> Pete 13/6/89 +;; if x1>100 then definiteattack1 ; >> Pete 13/6/89 +;; if descriptionmode<>iverbose then definiteattack1 ; >> Pete 13/6/89 +;; wanttoprintand=actor ; >> Pete 13/6/89 + +;;.definiteattack1 ; >> Pete 14/9/89 +;; verb=iattack ; >> Pete 13/6/89 +; ACTOR wants to attack NOUN1 +;; goto @callverb ; >> Pete 13/6/89 +;--- +;;.runaway +;;; ACTOR is scared (Ahh..) +;; gosub @canactormove +;; if result=false then @crdret +;; gosub @canactorrandommove +;; if result=false then @crdret +;; gosub @chooserandomdirection +;; if verb=0 then @crdret +;; prep=0 +;; noun1=nullobject +;; noun2=nullobject +;; goto @callverb +;--- +;--- +;;.doiwanttreasure +;;; how greedy is npc? +;; if NoTreasureInRoom=true then @diwtret +;;; +;;; drop through to take it... +;;; +;; gosub gdfindtreasure +;; if object=0 then @diwtret +;; +;;.gdtaketreasure +;; noun1=object +;; verb=itake +;; goto @take +;--- +;;.gdfindtreasure +;;; is there any treasure lying around? +;;; first on ground, then carried by other npcs (i.e. to steal!) +;; if NoTreasureInRoom=true then gdnotreasure ; for speed +;; searchpos=room +;; hisearchpos=0 +;; +;;.gdfindtreasuresearchpos +;;; find any treasure at (hisearchpos,searchpos) +;;; and return NoTreasureinroom=true if there +;;; and OBJECT as the treasure found +;; searchdepth=250 +;; gosub @initgetobj +;; +;;.gdfindtreasure1 +;; x1=maxtreasure ; max object to find +;; gosub @getnextobjx1 +;; if object=0 then gdnotreasure ; none found +;; if object=actor then gdfindtreasure1 +;; if objectmaxtreasure then gdfindtreasure1 +;;; got some treasure! +;;; don't want it if it is carried by actor +;; pos=actor +;; hipos=nonspecific +;; gosub @checkobjectpos +;; if result=true then gdfindtreasure1 +;;; got it, so return! +;; return +;; +;;.gdnotreasure +;; NoTreasureInRoom=true +;; return +; +;--- +;---- +;;.doiwantattack +; for npcs. +; does actor want to start attacking anyone? +; if so, return verb and noun1 +; gosub @amiincombat +; if result=true then @defendmyself +; random x1 +; if x1<160 then @diwattackanyonenew ; - may attack + +;;.diwaret +;; return ; don't start new combar +;--- +;--- +;.GetTerrainType +;; get terrain type in X1 for Room X1 +; x2=minSynthRoom +; sub x1,x2 +; if x1>negative then gtt0 +; x1=terraintable(x1) +; return +; +;.gtt0 +; x1=0 +; return +;--- + +; \ No newline at end of file diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/oops.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/oops.txt new file mode 100644 index 0000000..2607914 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/oops.txt @@ -0,0 +1,168 @@ +; Oops code for Standard Adventure +; +; Taken from Lancelot code 14/5/88 +; +; which was created from Knight Orc +; +; +var ; *** PETE 25/6/87 +; save0 save1 save2 + ramsaveused ; 493=yes. Other values=no ; *** PETE 25/6/87 +begin + +.RAMSAVE + + cif IncludeOops +; single position only at present + GOSUB @GETNEXTWORD ; see if there is a second word giving load/save + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE=IRESTORE THEN RAMLOAD + + RAMSAVEUSED=493 ; Set BEFORE the data is saved *** PETE 25/6/87 + X2=0 ; first position + GOSUB @RAMWRITE +.RAMSAVEEND + IF RESULT<>0 THEN @RAMERROR + GOTO @DONE + cend ; Includeoops + +;--- +.RAMLOAD + + cif IncludeOops + +; single position only at present + X2=0 ; first position +;>>mike 6/5/88 IF RAMSAVEUSED<>493 THEN @OOPSFATALERROR ; *** PETE 25/6/87 + + IF RAMSAVEUSED<>493 THEN NoPosition ;>>mike 6/5/88 + GOSUB @RAMREAD + if c2<>2 then @HighLevelError ;>>mike 6/5/88 +;>>mike 6/5/88 IF RESULT<>0 THEN @RAMERROR + nomoreinput=true ;>>mike 30/7/87 + GOTO @oopsAFTERRESTORE + cend ; Includeoops + +;--- +.INITOOPS + + cif IncludeOops +; count number of oops positions available + X2=0 + GOSUB @RAMWRITE + IF RESULT<>0 THEN INITOOPSRET + MESSAGE 2309 ; ram and oops available +; now go through and write 'certified garbage' to all positions + C2=65000 ; show that positions are invalid +;; X2=0 +.INITOOPS1 + GOSUB @RAMWRITE + ADD X2,C1 + if x2>250 then initoopsend ; stop it wrapping around + IF RESULT=0 THEN INITOOPS1 +.initoopsend + C2=2 ; restore C2 +.INITOOPSRET + RETURN +;--- +;--- +.NOPOSITION + MESSAGE 2308 ; no oops position found + RETURN +;--- + cend ; Includeoops + +.OOPS +; OOPSPOS points to next free position in ram save area +; go back some positions if they are available + + cif IncludeOops + IF OOPSPOS<>1 THEN OOPS2 +; have gone to position 0, so need to wrap round to end of ram area + IF OOPSPOSEND=0 THEN NOPOSITION ; something wrong here + OOPSPOS=OOPSPOSEND ; first invalid position + +.OOPS2 + SUB OOPSPOS,C1 + X2=OOPSPOS + GOSUB RAMREAD + if c2<>2 then HighLevelError + nomoreinput=true + descriptionmode=iverbose ; in case killed in the middle of RUN + GOTO @oopsafterrestore + +.RAMERROR + cend ; Includeoops + + MESSAGE 2300 ; ram save/restore not available on this machine + RETURN +;--- +.SAVEOOPS +; OOPSPOS points to the next free position in ram save area +; this routine called on EVERY movement +; try writing to current position + + cif IncludeOops + X2=OOPSPOS + GOSUB RAMWRITE + IF RESULT=0 THEN SAVEOOPSOK ; fine, inc pointer and finish +; something went wrong. +; if we are in the first position, tell the user +; that it is not available here + IF OOPSPOS<2 THEN SAVEOOPSRET ; keep quiet, ignore the error +; ok, so have some saved positions. Rotate round cyclically + OOPSPOSEND=OOPSPOS ; save first invalid position + OOPSPOS=1 + GOTO SAVEOOPS + +.SAVEOOPSOK + ADD OOPSPOS,C1 +.SAVEOOPSRET + RETURN + cend ; Includeoops + +;--- +.RAMREAD + cif IncludeOops + X1=23 ; code for ramload + GOSUB RAMOPERATION + RETURN + cend ; Includeoops + +;--- +.RAMWRITE + + cif IncludeOops + X1=22 ; code for ramsave +; drop through to RAMOPERATION + +.RAMOPERATION +; write to position X2, return RESULT=0 if OK + gosub @savelist9 + LINPUT(0)=X1 + LINPUT(1)=X2 ; position number + LINPUT(2)=C0 + DRIVER + RESULT=LINPUT(C0) + goto @restorelist9 +; +.HighLevelError ;>>mike 6/5/88 +; couldn't read from the position we wanted. +; try ram save buffer and first few oops buffers for possible +; valid positions + x2=0 ; ram save buffer + gosub RamRead + if c2=2 then HLERecovered + x2=1 ; first oops buffer + gosub RamRead + if c2=2 then HLERecovered + +;>>mike 6/5/88.OOPSFATALERROR + MESSAGE 2310 ; fatal error + GOTO @QUITPLAYAGAIN ; ask player to press space, then restart + cend ; Includeoops + +.HLERecovered + return +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/pconst.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/pconst.txt new file mode 100644 index 0000000..8f9a785 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/pconst.txt @@ -0,0 +1,15 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; PCONST.TXT, Part-specific constants, to distinguish between parts of +; game. This file must be different for each part. +; +CONST + CONSTANTPARTNUM=1 + part1=1 + part2=0 + part3=0 + + NOTpart1=0 + NOTpart2=1 + NOTpart3=1 +; diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/ref/table.dat b/l9dev/regress/games.l9/ghost.l9/part1.l9/ref/table.dat new file mode 100644 index 0000000..341df6b Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part1.l9/ref/table.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/sconst.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/sconst.txt new file mode 100644 index 0000000..bd620b8 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/sconst.txt @@ -0,0 +1,327 @@ +; Standard adventure source, copyright (C) 1988 Level 9 Computing. +; +; SCONST, game-specific constants. You will probably need to change +; most of the values of these. +; +; A standard labelling convention for constants is that constants +; preceded by I (e.g ILOOK) are relative to their appropriate offset +; (e.g verboffset). +; +CONST +;; StandardAdventure=1405 ; unique game identifier value + Scapeghost=1930 +; + AllowBoat=1 ; set to 1 if you want boat/vehicle code +; +; STARTsynthSHORTdescs=1199 ; shortroomdescs+minsynthroom + SHORTroomDESCS=800 + LONGroomDESCS=1100 +; + MAXMOVEABLE=109 ; MAX OBJECT WHICH MAY BE TAKEN, THROWN ETC. +;; MAXMOVEAPLUS1=110 ; >> Pete 14/9/89 +; + xmax=4 ; co-ords go 0..xmax - remember to change room 1 exits. + xmaxplus1=5 + ymax=3 +; +;; minsynthroomminus2=38 ; >> Pete 14/9/89 + minsynthroomminus1=39 + minsynthroom=40 ; the first room on the grid (bottom left hand corner) + maxsynthroom=59 +; + minecholoc=20 + maxecholoc=35 + maxecholocplus1=36 +; + minsceneryobj=180 + minsceneryobjminus1=179 + maxsceneryobj=190 +;; maxsceneryobjplus1=191 ; >> Pete 14/9/89 + minsceneryobjt2m1=359 + maxsceneryobjtimes2plus2=382 +;; numsceneryobjplus1=11 ; >> Pete 14/9/89 +; +;; minweaponminus1=39 ; >> Pete 14/9/89 +;; minweapon=40 ; >> Pete 14/9/89 + maxweapon=43 +;; maxweaponplus1=44 ; >> Pete 14/9/89 +; + minclothes=60 + maxclothes=69 +; +;; minfood=80 ; >> Pete 14/9/89 +;; maxfood=81 ; >> Pete 14/9/89 +;; maxfoodplus1=82 ; >> Pete 14/9/89 +; + mintreasure=80 +;===== +; special constant to allow the three light objects just heavier +; than the heaviest carried so far to be lifted + mintreasureminus2=78 +;===== + maxtreasure=91 +;; maxtreasureplus1=92 ; >> Pete 14/9/89 +; + minallobject=40 + maxallobject=109 +; + MAXOBJECTVISIBLE=149 + MAXOBJECT=189 ; includes scenery objects. +; goes wrong for maxobject>190 (dunno why!) +; - inventory gets a funny value for hisearchpos (24) + MAXOBJECTPLUS1=190 +; + MINOMNI=190 ; 158 ; all real objects above this are omni-present +;; MINOMNIMINUS1=189 ; 159 ; >> Pete 14/9/89 + MAXOMNI=260 ; must include ieverything, except, it +; +; Preposition values (all relative to prepoffset) +; + FASTENEDTO=14 + through=209 +; +; VERBS... +;; iburn=115 ; >> Pete 14/9/89 +;; ikiss=129 ; >> Pete 14/9/89 +;; ipast=162 ; >> Pete 14/9/89 +;; iwalk=164 ; >> Pete 14/9/89 +;; icatch=165 ; >> Pete 14/9/89 +; +; Offsets into SCORETABLE.. ( table 7 ) (starts at 32...) +;; scBase=32 ; >> Pete 14/9/89 +;; scmax=75 ; >> Pete 14/9/89 + scmaxplus1=76 +; + VisitTableStart=76 ; 34 + VisitTableEnd=226 ; 255 ; 213 ; VisitTableStart + (150=num of "Real" rooms) +; +;; MeetingTable=226 ; 255 ; 213 ; >> Pete 14/9/89 +;; MeetingTableEnd=290 ; 319 ; 277 ; meetingTable+MaxNpc ; >> Pete 14/9/89 +; +;; startliedowntable=290 ; >> Pete 14/9/89 +;; endliedowntable=329 ; >> Pete 14/9/89 +; + minpeople=1 ; = creaturebase + maxpeople=15 +;; maxpeopleplus1=16 ; >> Pete 14/9/89 +; +;; creaturebase=1 ; including people, user etc. ; >> Pete 14/9/89 +;; creaturebaseminus1=0 ; including people, user etc. ; >> Pete 14/9/89 + MINNPC=2 ; all except user +;; MINNPCMINUS1=1 ; all except user ; >> Pete 14/9/89 + MAXNPC=15 + MAXNPCPLUS1=16 + maxtalkingnpc=14 +;===== + maxghost=9 +;===== + MAXTALKINGNPCPLUS1=15 +; +; npc status in list 6.. + NPCTABLESIZE=128 ; MAXNPCPLUS1*NpcEntrySize +;; NPCTABLESIZEPLUS8=136 ; >> Pete 14/9/89 +;; NPCCURRENTOFFSET=0 ; >> Pete 14/9/89 +; +;; NPCENTRYSIZE=8; >> Pete 14/9/89 +; npc command queues follow the above in list 6.. + npcstackbase=128 ; immediately after npc table +;; npcstackbaseplus5=133 ; >> Pete 14/9/89 + maxnpcentries=52 ; 5 bytes per queued-command entry on stack +; + npcstackentrysize=5 ; each entry is 5 bytes (hence the 5's above) +; + npctablesizetozero=1535 ; now fixed. was 785 +; +; offsets within each npc table entry in list 6.. +;; enemyoffset=0; >> Pete 14/9/89 + followoffset=1 ; person to follow normally + masteroffset=2 ; the person or creature who subdued this npc +;; hitpointoffset=3; >> Pete 14/9/89 +;; hatredoffset=4 ; the amount which this npc hates its enemy; >> Pete 14/9/89 + npcptroffset=5 +;; boredomoffset=6 ; >> Pete 14/9/89 +; attentionoffset=7 +; and offsets within each corresponding entry in npcinitial, list 5.. +;; attackoffset=2 ; >> Pete 14/9/89 +; hitpoint offset=3 + obedienceoffset=4 +;; patienceoffset=5 ; >> Pete 14/9/89 + goldsingingoffset=6 ; in static data - word (hi byte first) +; +TABLE +;; list6=6 ; >> Pete 14/9/89 +; +CONST +; +;objects +; + User=1 +; +;===== + Joe=2 + Bert=3 + Edna=4 + David=5 + Alex=6 + Edith=7 + Colonel=8 + Violet=9 + mourners=10 + man=11 + supervisor=12 +;; workman=13 ; >> Pete 14/9/89 + vandals=14 + dog=15 +; +; ordinary objects (80 onwards) +; +; light objects in order... +;; thistledown=80 ; >> Pete 14/9/89 +;; petal=81 ; >> Pete 14/9/89 +;; dry=82 ; >> Pete 14/9/89 + matchbook=83 +;; pebble=84 ; >> Pete 14/9/89 + defaultcard=85 + whitecard=85 + yellowcard=86 + fishbone=87 +;; twig=88 ; >> Pete 14/9/89 + watch=89 + bell=90 + gnomon=91 +; +; heavy objects... + bag=95 +;; Newspaper=96 ; >> Pete 14/9/89 + Magazine=97 +;; bottle=98 ; >> Pete 14/9/89 +;; shovel=99 ; >> Pete 14/9/89 + defaultwreath=100 + newwreath=100 + greenwreath=101 + fadedwreath=102 +; +; static objects (110 onwards) + button=110 + switch=111 + lightbulb=112 + lock=113 + barrel=114 + defaultlever=115 + lever1=115 + lever2=116 + lever3=117 + rope=118 + gravel=119 + vase=120 + bush=121 + branches=122 + mound=123 +;; vault=124 ; >> Pete 14/9/89 + spotlight=125 + thermometer=126 +;; yew=127 ; >> Pete 14/9/89 + seat=128 + stonework=129 + carvings=130 + plinth=131 + statue=132 + sundial=133 + brokensundial=134 +;; sarcophagus=135 ; >> Pete 14/9/89 + urn=136 + timeobject=137 ; "time" object written in gravel. marked as +; "time" and "message" for erasing purposes. + sheddoor=138 + wall=139 +; +; vehicles (140 onwards) + cart=140 +; +; invisible objects (150 onwards) + headstone=150 + grave=151 + bushes=164 + WallAboveVault=169 + company=172 +; + minlightminus1=174 ; start of light sources... +;; minlight=175 ; >> Pete 14/9/89 + shedlight=175 ; if shedlighton=true, present in 42 + spotlightlight=176 ; if spotlighton=true, present in 3-7 + streetlights=177 ; if nighttime, present in 8-10 + lightair=178 ; examine air, reveals light. this is used because +; violet is blind and complains about "something in the air" +;; maxlight=179 ; >> Pete 14/9/89 +; + timenoun=220 ; marked only as "time" for writing purposes. +;===== +; +;; ithing=246 ; >> Pete 14/9/89 +;; iroom=243 ; >> Pete 14/9/89 +; +; game-specific constants... +; +;===== + urnstrength=9 ; strength required to push urn + timelimit=300 ; day breaks +;===== +; +; game-specific variables... +; +VAR + TotalMoves + ProblemObject +;; ProblemVerb ; >> Pete 14/9/89 + gdCurrentSave gdHiSave + GalahadComment + ALREADYDONEPROTECT + startpicturetable + examinemarked +; + GeneralScoreAddition + t1 t2 t3 ; temps for preserving x1,x2,x3 in printm1 + outofreach +; +;===== + playerstrength ; progressive strenght of player + playerobject ; number of object carried + failedlift ; last light object that user failed to lift + dogfriendly ; set when dog will help player + dogobject ; number of object carried by dog + dogverb + dogprep + dognoun1 + dognoun2 ; used for dog stored command when copying player + shedlighton ; set when shed light on + spotlighton ; set when spotlighton + sheddooropen ; set when shed door open + nighttime ; set when ghosts emerge + ednagotwreath ; set when edna given wreath + alreadysaidnmw ; flag to prevent edna repeated saying "that's not +; my wreath" when it is taken to here + alreadysaidnmfw ; flag to prevent edna repeated saying "that's not +; my faded wreath" when it is taken to here + pushingsundial ; number of ghosts pushing sundial + pushingthermometer ; number of ghosts pushing thermometer + joecommented ; prevents joe repeating his thermometer comment + pushingbutton ; number of ghosts pushing button + edithfree ; set when edith free from "end of time" curse + examinebushes ; count for successively examining bushes + urnrocked ; set when urn rocked and david is recruited + pushlever1 + pushlever2 + pushlever3 ; set when pushing lever1,lever2,lever3 + actorturningbarrel ; contains person who is turning the barrel + shedunlocked ; set when shed door unlocked + dogcalmed ; incremented when successively calming dog + alreadyknelt ; prevents repetative kneeling to calm dog + npcdistressed ; set in specialactivate when npc is distressed by +; light and can only obey movement verbs + vandaljoke ; flag to prevent "dead bulb" joke being repeated + npcsfollowing ; number of followers. if >4, then print "the company +; entered from the ", instead of a full screen of NPCs. + companyfollowing ; prevents "the company arrived" being repeated + gametimer ; overall game timer for duration of night +;===== +; \ No newline at end of file diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/score.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/score.txt new file mode 100644 index 0000000..d587e69 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/score.txt @@ -0,0 +1,91 @@ +; Standard adventure sources 14/5/88 +; +; score code +; +; 14/5/88 + + begin + +.CalcScore +; return X4=current score + x1=32 ; start of score table + x4=0 + +.CalcScore1 + x2=list7(x1) + if x2<128 then calcScoreNotNegative +; convert negative 8 bit number to negative 16 bit + x3=65280 + add x2,x3 + +.calcScoreNotNegative + add x4,x2 + add x1,c1 + if x1> Pete 14/9/89 + gosub @CalcScore + x1=x4 ;* + IF X4<30000 THEN SCORE1 ; failsafe test to prevent negative score + message 2243 ; minus sign +; x1=x4 ;* + x4=0 + sub x4,x1 + +.SCORE1 + PRINT X4 ; score + + cif NotPart1 + sub x4,lastpartscore + cend + + M1=2249 ; message below lowest rating + MESSAGE 2242 ; out of 300 and are + if x1>30000 then @forceM1Dot ;* rating for -ve score is 2249 + X1=30 ; size of score categories (max score, 300, has unique rating) +.SCORE2 + SUB x4,X1 + ADD M1,C1 + IF x4> Pete 14/9/89 +;; x2=10 ; >> Pete 14/9/89 +;; goto AddScorex2 ; >> Pete 14/9/89 + +.AddScore25 + x2=25 + goto AddScoreX2 + +;;.ClearScore ; >> Pete 14/9/89 +;; x2=0 ; >> Pete 14/9/89 + +.AddScoreX2 + x3=32 + add x1,x3 ; add offset to start of score table + list7(x1)=x2 + return +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/table.dat b/l9dev/regress/games.l9/ghost.l9/part1.l9/table.dat new file mode 100644 index 0000000..341df6b Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part1.l9/table.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part1.l9/table.txt b/l9dev/regress/games.l9/ghost.l9/part1.l9/table.txt new file mode 100644 index 0000000..4771bef --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part1.l9/table.txt @@ -0,0 +1,1554 @@ +; Spook Part 1 source, copyright (C) 1987 Level 9 Computing. +; +; TABLE.TXT, assembler format data for tables, a.k.a lists/arrays. +; (Save the assembled data as TABLE.DAT). +; +; You must start all DEFWs on EVEN boundaries, else subsequent code +; seems to be padded to make it even (according to the GENST listing, +; anyway). The EVEN directive inserts a padding byte if appropriate. +; + ORG 0 +starttables + dc.l LIST1-starttables ; MOVEABLE OBJECT START + dc.l $8000 ; OBJECT CURRENT + dc.l $8000+MaxObject ; HI OBJECT CURRENT + dc.l LIST4-starttables ; scenery table + dc.l NPCINITIAL-starttables ; npc initial and 'floor pointers' + dc.l $8000+LIST23SIZE ; 6 - NPC current attributes, stack + dc.l $8000+LIST236SIZE ; 7 - output buffer,scoretable + dc.l list8-starttables ; 8 - assorted fixed system tables + dc.l $8000+LIST2367SIZE ; 9 - input table,object table + dc.l ENDTABLE-starttables +;--- +; CONTAINER POSITONS +ON EQU 1 +UNDER EQU 2 +BEHIND EQU 3 +CARRIED EQU 4 +WORN EQU 5 +PREPIN EQU 7 +HANGINGFROM EQU 8 ; E.G. TREE +pushedby equ 11 +LIEON EQU 12 +SITON EQU 13 +fastenedto equ 14 +;===== +; special to spook.1 +;; lyingon equ 15 +lodgedin equ 15 +;===== +; +; additions to high initial position +OBV EQU $80 +ita equ 0 +itan equ $10 ; starts with a vowel +singularsome equ $20 ; "some cheese is tasy" +he equ $30 +she equ $40 +pluralsome equ $50 ; "some ropes are strong" +you equ $60 +properMale equ $70 +ProperFemale equ $70 +; ProperFemale is handled by SpecialConjugate +; +MaxObject EQU 189 ; should be two bigger than it really needs to be +NUMHIOBJ EQU MaxObject ; NO. OF OBJECTS WITH A HIGH POSITION +minnpc equ 1 +maxnpc equ 64 +npctablesize EQU (MaxNpc+1)*8 +npcstacksize equ 260 ;300 +;===== + +OUTPUTBUFFER EQU 32 +SCORETABLE EQU 40 ;length of score table +OBJTABLE EQU 16 ; number of objects which can be specified on one line +; +; +LIST23SIZE EQU MaxObject+NUMHIOBJ +LIST236SIZE EQU LIST23SIZE+npctablesize+npcstacksize +LIST2367SIZE EQU LIST236SIZE+OUTPUTBUFFER+SCORETABLE+170+maxnpc +; 120 is num rooms +;;LIST23678SIZE equ LIST2367SIZE ; >>Mike 8/8/87 - reduced from ST version +;>>mike 8/8/87 LIST23678SIZE EQU LIST2367SIZE+OBJTABLE +; +;--- +LIST1 + dc.b 0,0 ; OBJECT 0 +; +; people +USER EQU 1 + dc.b you,44 ; 1 USER (ingrid) +; +; note that the positions of ghosts 2-9 are not initialised +; until night-time +joe equ 2 + dc.b propermale,49 ; 2 joe +bert equ 3 + dc.b propermale,59 ; 3 bert +edna equ 4 + dc.b properfemale,59 ; 4 edna +david equ 5 + dc.b propermale,52 ; 5 david +alex equ 6 + dc.b propermale,0 ; 6 alex +edith equ 7 + dc.b properfemale,11 ; 7 edith +colonel equ 8 + dc.b propermale,56 ; 8 colonel +violet equ 9 + dc.b properfemale,45 ; 9 violet +; +mourners equ 10 + dc.b obv+pluralsome,44 ; 10 mourners +man equ 11 + dc.b he,44 ; 11 man (criminal) +supervisor equ 12 + dc.b obv+propermale+prepin,cart ; 12 supervisor +workman equ 13 + dc.b obv+propermale,15 ; 13 workman +vandals equ 14 + dc.b pluralsome,51 ; 14 vandals +; +; animals +dog equ 15 + dc.b ita,3 ; 15 dog + dc.b 0,0 ; 16 + dc.b 0,0 ; 17 + dc.b 0,0 ; 18 + dc.b 0,0 ; 19 + dc.b 0,0 ; 20 + dc.b 0,0 ; 21 + dc.b 0,0 ; 22 + dc.b 0,0 ; 23 + dc.b 0,0 ; 24 + dc.b 0,0 ; 25 + dc.b 0,0 ; 26 + dc.b 0,0 ; 27 + dc.b 0,0 ; 28 + dc.b 0,0 ; 29 + dc.b 0,0 ; 30 + dc.b 0,0 ; 31 + dc.b 0,0 ; 32 + dc.b 0,0 ; 33 + dc.b 0,0 ; 34 + dc.b 0,0 ; 35 + dc.b 0,0 ; 36 + dc.b 0,0 ; 37 + dc.b 0,0 ; 38 + dc.b 0,0 ; 39 + dc.b 0,0 ; 40 + dc.b 0,0 ; 41 + dc.b 0,0 ; 42 + dc.b 0,0 ; 43 + dc.b 0,0 ; 44 + dc.b 0,0 ; 45 + dc.b 0,0 ; 46 + dc.b 0,0 ; 47 + dc.b 0,0 ; 48 + dc.b 0,0 ; 49 + dc.b 0,0 ; 50 + dc.b 0,0 ; 51 + dc.b 0,0 ; 52 + dc.b 0,0 ; 53 + dc.b 0,0 ; 54 + dc.b 0,0 ; 55 + dc.b 0,0 ; 56 + dc.b 0,0 ; 57 + dc.b 0,0 ; 58 + dc.b 0,0 ; 59 + dc.b 0,0 ; 60 + dc.b 0,0 ; 61 + dc.b 0,0 ; 62 + dc.b 0,0 ; 63 + dc.b 0,0 ; 64 + dc.b 0,0 ; 65 + dc.b 0,0 ; 66 + dc.b 0,0 ; 67 + dc.b 0,0 ; 68 + dc.b 0,0 ; 69 + dc.b 0,0 ; 70 + dc.b 0,0 ; 71 + dc.b 0,0 ; 72 + dc.b 0,0 ; 73 + dc.b 0,0 ; 74 + dc.b 0,0 ; 75 + dc.b 0,0 ; 76 + dc.b 0,0 ; 77 + dc.b 0,0 ; 78 + dc.b 0,0 ; 79 +; +; now some ordinary objects (80 onwards).. + dc.b singularsome,49 ; 80 thistledown + dc.b 0,50 ; 81 petal + dc.b 0,53 ; 82 dry leaf +matchbook equ 83 + dc.b carried,man ; 83 matchbook + dc.b 0,44 ; 84 pebble + dc.b on,mywreath ; 85 white card + dc.b on,fadedwreath ; 86 yellow card + dc.b lodgedin,dog ; 87 fishbone + dc.b prepin,branches ; 88 twig + dc.b 0,15 ; 89 watch +bell equ 90 + dc.b 0,15 ; 90 bell + dc.b 0,0 ; 91 gnomon + dc.b 0,0 ; 92 + dc.b 0,0 ; 93 + dc.b 0,0 ; 94 + dc.b 0,15 ; 95 carrier bag + dc.b carried,man ; 96 newspaper + dc.b 0,0 ; 97 magazine + dc.b carried,vandals ; 98 bottle +shovel equ 99 + dc.b 0,42 ; 99 shovel +mywreath equ 100 + dc.b 0,44 ;100 my wreath + dc.b 0,59 ;101 bert's wreath +fadedwreath equ 102 + dc.b 0,59 ;102 faded wreath + dc.b 0,0 ;103 + dc.b 0,0 ;104 + dc.b 0,0 ;105 + dc.b 0,0 ;106 + dc.b 0,0 ;107 + dc.b 0,0 ;108 + dc.b 0,0 ;109 +; +; static objects... (110+) +button equ 110 + dc.b 0,15 ; 110 button +switch equ 111 + dc.b 0,15 ; 111 switch + dc.b 0,15 ; 112 lightbulb +lock equ 113 + dc.b prepin,sheddoor ; 113 lock + dc.b prepin,lock ; 114 barrel + dc.b prepin,lock ; 115 lever 1 + dc.b prepin,lock ; 116 lever 2 + dc.b prepin,lock ; 117 lever 3 + dc.b on,sheddoor ; 118 rope handle + dc.b obv+singularsome,11 ; 119 gravel + dc.b 0,11 ; 120 vase +bush equ 121 + dc.b obv,45 ; 121 bush +branches equ 122 + dc.b 0,41 ; 122 heap of branches + dc.b 0,44 ; 123 mound +vault equ 124 + dc.b 0,6 ; 124 vault + dc.b 0,4 ; 125 spotlight + dc.b 0,3 ; 126 thermometer + dc.b 0,9 ; 127 lawn + dc.b 0,9 ; 128 seat +stonework equ 129 + dc.b singularsome,53 ; 129 stoneworn + dc.b pluralsome,0 ; 130 carvings +plinth equ 131 + dc.b 0,0 ; 131 plinth + dc.b on,plinth ; 132 statue + dc.b 0,48 ; 133 sundial + dc.b 0,0 ; 134 broken sundial +sarcophagus equ 135 + dc.b 0,52 ; 135 sarcophagus + dc.b itan+on,sarcophagus ; 136 urn + dc.b 0,0 ; 137 unmarked time object (pure text) +sheddoor equ 138 + dc.b obv,42 ; 138 shed door + dc.b 0,3 ; 139 wall by thermometer +cart equ 140 + dc.b obv,3 ; 140 cart + dc.b 0,0 ; 141 + dc.b 0,0 ; 142 + dc.b 0,0 ; 143 + dc.b 0,0 ; 144 + dc.b 0,0 ; 145 + dc.b 0,0 ; 146 + dc.b 0,0 ; 147 + dc.b 0,0 ; 148 + dc.b 0,0 ; 149 +; +; invisible objects + dc.b 0,44 ; 150 headstone + dc.b 0,44 ; 151 grave (150 & 151 follow player) + dc.b 0,7 ; 152 gate + dc.b 0,8 ; 153 main gate + dc.b 0,4 ; 154 spotlight frame + dc.b 0,5 ; 155 church + dc.b 0,4 ; 156 therm. from spotl. + dc.b 0,6 ; 157 therm. from vault + dc.b 0,0 ; 158 *null* + dc.b 0,42 ; 159 shed + dc.b pluralsome,42 ; 160 footprints + dc.b 0,51 ; 161 cenotaph + dc.b pluralsome,50 ; 162 marigolds + dc.b 0,53 ; 163 beech + dc.b obv+pluralsome,55 ; 164 bushes + dc.b 0,51 ; 165 flowerbed + dc.b pluralsome,57 ; 166 crosses + dc.b pluralsome+prepin,vault ; 167 carrier bags + dc.b 0,0 ; 168 + dc.b 0,6 ; 169 wall from vault + dc.b 0,15 ; 170 shed window (from inside) + dc.b 0,42 ; 171 (from outside) + dc.b pluralsome,0 ;172 company + dc.b 0,0 ;173 + dc.b 0,0 ;174 + dc.b 0,0 ;175 shed light source + dc.b 0,0 ;176 spotlight source + dc.b pluralsome,0 ;177 streetlights + dc.b 0,0 ;178 illuminated air + dc.b 0,0 ;179 +;------------------------- +; +; Brief location objects (479+N). See 779+ for examine messages and +; 1199+ for their verbose equivalents.. + dc.b 0,42 ; 180 shed + dc.b 0,43 ; 181 path + dc.b 0,40 ; 182 sepulcre +; +;--- + even +ENDOBJECTS +terraintable +LIST4 +; table giving scenery types on grassy plain grid +m equ 220 ; minsynthroom + dc.b m,m,m + dc.b m,m,m + dc.b m,m,m + even +;--------- +list8 +; table for remarks made by 'PET' - Damosel Maledisant (Galahad in L3)... + dc.b 10,0 + dc.b 11,1 + dc.b 21,2 + dc.b 26,4 + dc.b 56,8 + dc.b 67,9 + dc.b 80,11 + dc.b 119,12 + dc.b 120,13 + dc.b 121,14 + dc.b 130,15 + dc.b 141,16 + dc.b 150,17 + dc.b 151,18 + dc.b 152,19 + dc.b 153,20 + dc.b 154,21 + dc.b 156,22 + dc.b 161,23 + dc.b 162,24 + dc.b 171,25 + dc.b 173,27 + dc.b 174,28 + dc.b 175,29 + dc.b 176,30 + dc.b 182,31 + dc.b 190,32 + dc.b 200,33 +; +; dc.b 255,250 ; add on 250 to "trigger message" numbers... +; + dc.b 0,0 +; +;--------- + even +NPCINITIAL +list5 +; first we have a dummy entry for npc 0 +; this is used as some pointers to the *other* +; things which are used in this list +; (the equivalent of this area in list6 is used for temp workspace) +; + dc.w floorpointers-npcinitial + dc.w racetracks-npcinitial + dc.w reversaltable-npcinitial + dc.w roompictures-npcinitial +; +; For greed agression, timidity, obediance, there +; is a special case - if one of the values is 255, then +; the npc will always choose that one, if it is possible +; This is particularly useful for slaves etc. +; Note that npcs will still respond to attacks etc. - +; anything which sets the 'attention flag' +; +FRIENDLY EQU 0 +dodge equ 0 +damage equ 0 +; +; npc 0 has dummy entry used as pointers above +; +; dc.b enemy, dodge, attack, hit points, obedience, patience, gold-sing +; if bit 7 of the "enemy" byte is set, the npc will be inactive +; until it meets Ingrid +; + dc.b friendly,dodge,10,100,255,1 ; 1 USER + dc.w 3300 + dc.b friendly,dodge,10,100,255,1 ; 2 joe + dc.w 3300 + dc.b friendly,dodge,10,100,255,1 ; 3 bert + dc.w 3310 + dc.b friendly,dodge,10,100,255,1 ; 4 edna + dc.w 3310 + dc.b friendly,dodge,10,100,255,1 ; 5 david + dc.w 3320 + dc.b friendly,dodge,10,100,255,2 ; 6 alex (speed 2 so that he +; can be stopped when going back to his grave, and to sleep) + dc.w 3330 + dc.b friendly,dodge,10,100,255,1 ; 7 edith + dc.w 3300 + dc.b friendly,dodge,10,100,255,1 ; 8 colonel + dc.w 3340 + dc.b friendly,dodge,10,100,255,1 ; 9 violet + dc.w 3300 + dc.b friendly,dodge,10,100,255,1 ; 10 mourners + dc.w 3350 + dc.b friendly,dodge,10,100,255,1 ; 11 man + dc.w 3360 + dc.b friendly,dodge,10,100,255,1 ; 12 supervisor + dc.w 3370 + dc.b friendly,dodge,10,100,255,1 ; 13 workman + dc.w 3370 + dc.b friendly,dodge,10,100,255,1 ; 14 vandals + dc.w 3380 + dc.b friendly,dodge,10,100,255,1 ; 15 dog + dc.w 3390 +; +;--- + +floorpointers +; part of list5 +; now 'floor pointers' +; there is one bye pair for each static room - the +; first byte gives the direction to go inwards +; and the second byte gives direction for going outwards +; (i.e. towards the synthesised grid) +; +; ** BIG WARNING ** +; all shapes must be simply connected. i.e. given a pair of rooms, +; you must be able to trace a path between them using only the +; OUT paths of one OR the other. +; This is because of the way the follow and GO code works. +north equ 1 +ne equ 2 +east equ 3 +se equ 5 +south equ 4 +sw equ 6 +west equ 7 +nw equ 8 +up equ 9 +down equ 10 +verbin equ 11 +out equ 12 +cross equ 13 +climb equ 14 +jump equ 15 + + dc.b 0 ; room 0 (not used) + dc.b 0 ; room 1 (not used) + dc.b 0 ; room 2 (not used) + dc.b north ; 3 + dc.b west ; 4 + dc.b east ; 5 + dc.b north ; 6 + dc.b west ; 7 + dc.b north ; 8 + dc.b north ; 9 + dc.b north ; 10 + dc.b north ; 11 + dc.b 0 ; 12 + dc.b 0 ; 13 + dc.b 0 ; 14 + dc.b out ; 15 + dc.b 0 ; 16 + dc.b 0 ; 17 + dc.b 0 ; 18 + dc.b 0 ; 19 + dc.b 0 ; 20 + dc.b 0 ; 21 + dc.b 0 ; 22 + dc.b 0 ; 23 + dc.b 0 ; 24 + dc.b 0 ; 25 + dc.b 0 ; 26 + dc.b 0 ; 27 + dc.b 0 ; 28 + dc.b 0 ; 29 + dc.b 0 ; 30 + dc.b 0 ; 31 + dc.b 0 ; 32 + dc.b 0 ; 33 + dc.b 0 ; 34 + dc.b 0 ; 35 + dc.b 0 ; 36 + dc.b 0 ; 37 + dc.b 0 ; 38 + dc.b 0 ; 39 + dc.b 0 ; 40 + dc.b 0 ; 41 + dc.b 0 ; 42 + dc.b 0 ; 43 + dc.b 0 ; 44 + dc.b 0 ; 45 + dc.b 0 ; 46 + dc.b 0 ; 47 + dc.b 0 ; 48 + dc.b 0 ; 49 + dc.b 0 ; 50 + dc.b 0 ; 51 + dc.b 0 ; 52 + dc.b 0 ; 53 + dc.b 0 ; 54 + dc.b 0 ; 55 + dc.b 0 ; 56 + dc.b 0 ; 57 + dc.b 0 ; 58 + dc.b 0 ; 59 + dc.b 0 ; 60 + dc.b 0 ; 61 + dc.b 0 ; 62 + dc.b 0 ; 63 + dc.b 0 ; 64 + dc.b 0 ; 65 + dc.b 0 ; 66 + dc.b 0 ; 67 + dc.b 0 ; 68 + dc.b 0 ; 69 + dc.b 0 ; 70 + dc.b 0 ; 71 + dc.b 0 ; 72 + dc.b 0 ; 73 + dc.b 0 ; 74 + dc.b 0 ; 75 + dc.b 0 ; 76 + dc.b 0 ; 77 + dc.b 0 ; 78 + dc.b 0 ; 79 + dc.b 0 ; 80 + dc.b 0 ; 81 + dc.b 0 ; 82 + dc.b 0 ; 83 + dc.b 0 ; 84 + dc.b 0 ; 85 + dc.b 0 ; 86 + dc.b 0 ; 87 + dc.b 0 ; 88 + dc.b 0 ; 89 + dc.b 0 ; 90 + dc.b 0 ; 91 + dc.b 0 ; 92 + dc.b 0 ; 93 + dc.b 0 ; 94 + dc.b 0 ; 95 + dc.b 0 ; 96 + dc.b 0 ; 97 + dc.b 0 ; 98 + dc.b 0 ; 99 + dc.b 0 ; 100 + dc.b 0 ; 101 + dc.b 0 ; 102 + dc.b 0 ; 103 + dc.b 0 ; 104 + dc.b 0 ; 105 + dc.b 0 ; 106 + dc.b 0 ; 107 + dc.b 0 ; 108 + dc.b 0 ; 109 + dc.b 0 ; 110 + dc.b 0 ; 111 + dc.b 0 ; 112 + dc.b 0 ; 113 + dc.b 0 ; 114 + dc.b 0 ; 115 + dc.b 0 ; 116 + dc.b 0 ; 117 + dc.b 0 ; 118 + dc.b 0 ; 119 + dc.b 0 ; 120 + dc.b 0 ; 121 + dc.b 0 ; 122 + dc.b 0 ; 123 + dc.b 0 ; 124 + dc.b 0 ; 125 + dc.b 0 ; 126 + dc.b 0 ; 127 + dc.b 0 ; 128 + dc.b 0 ; 129 + dc.b 0 ; 130 + dc.b 0 ; 131 + dc.b 0 ; 132 + dc.b 0 ; 133 + dc.b 0 ; 134 + dc.b 0 ; 135 + dc.b 0 ; 136 + dc.b 0 ; 137 + dc.b 0 ; 138 + dc.b 0 ; 139 + dc.b 0 ; 140 +;--- + even +racetracks +; sequences of commands which actors obey +; each is referred to by a 16-bit offset from the start of list5 +; the initial sequences are contained in this table at the start.. +; +; day time... + dc.w 0 ; 0 + dc.w 0 ; 1 + dc.w 0 ; 2 joe + dc.w 0 ; 3 bert + dc.w 0 ; 4 edna + dc.w 0 ; 5 david + dc.w 0 ; 6 alex + dc.w 0 ; 7 edith + dc.w 0 ; 8 colonel + dc.w 0 ; 9 violet + dc.w mournersrt-list5 ; 10 mourners + dc.w manrt-list5 ; 11 man + dc.w supervisorrt-list5 ; 12 supervisor + dc.w workmanrt-list5 ; 13 workman + dc.w 0 ; 14 vandals (pissing on graves etc.) + dc.w 0 ; 15 dog + dc.w 0 ; 16 + dc.w 0 ; 17 + dc.w 0 ; 18 + dc.w 0 ; 19 +; +; night time... + dc.w 0 ; 20 + dc.w 0 ; 21 + dc.w joert-list5 ; 22 joe + dc.w bertrt-list5 ; 23 bert + dc.w 0 ; 24 edna + dc.w davidrt-list5 ; 25 david + dc.w 0 ; 26 alex + dc.w edithrt-list5 ; 27 edith + dc.w colonelrt-list5 ; 28 colonel + dc.w violetrt-list5 ; 29 violet + dc.w 0 ; 30 mourners + dc.w 0 ; 31 man + dc.w 0 ; 32 supervisor + dc.w 0 ; 33 workman + dc.w vandalsrt-list5 ; 34 vandals + dc.w dogrt-list5 ; 35 dog + dc.w 0 ; 36 + dc.w 0 ; 37 + dc.w 0 ; 38 + dc.w 0 ; 39 +; +; triggered racetracks + dc.w 0 ; 40 + dc.w 0 ; 41 + dc.w bertobedient-list5 ; 42 bert's obedient racetrack + dc.w ednaobedient-list5 ; 43 edna's obedient racetrack + dc.w alexrt-list5 ; 44 alex pym is woken up + dc.w restartalex-list5 ; 45 alex is left unattended + dc.w edithobedient-list5 ; 46 edith's obedient racetrack + dc.w davidobedient-list5 ; 47 david's obedient racetrack + dc.w colonelobedient-list5 ; 48 colonel's obedient racetrack + dc.w restartcolonel-list5 ; 49 colonel is left unattended + dc.w dogobedient-list5 ; 50 dog's obedient racetrack + dc.w violetobedient-list5 ; 51 violet's obedient racetrack +; +StartRt +; each of the race track entries has a 4-byte entry: +; VERB PREP NOUN1 NOUN2 +ipin equ 7 +ipwith equ 16 + +drop equ 107 +attack equ 40 +ifollow equ 113 +open equ 114 ;64 +go equ 96 ; go to room noun1 (=setupgo) +close equ 140 ; 90 +wait equ 92 +examine equ 100 +take equ 105 +give equ 111 +eat equ 123 +find equ 139 +kill equ 93 +push equ 118 +waitforperson equ 89 +waituntiltime equ 90 +waitforperiod equ 91 +put equ 108 +returnobject equ 136 +gdfind equ 139 + +Conditional equ 247 + +ActorVaryMessage equ 248 ; goes straight on in same turn to next step in rt +WRtActorVaryMessage equ ActorVaryMessage*256 + +ActorSingleMessage equ 249 ; this completes actor's turn. Like ActorM1Dot +WActorSingleMessage equ ActorSingleMessage*256 + +racetrackmessage equ 251 +WRtMessage equ racetrackMessage*256 + +racetrackvarymessage equ 252 +WRtVaryMessage equ racetrackvaryMessage*256 + +racetrackgosub equ 253 +WRtGosub equ racetrackGosub*256 + +racetrackgoto equ 254 +WRtGoto equ racetrackGoto*256 + +racetrackreturn equ 255 +light equ 165 ; 115 +ride equ 185 ; 135 + +stand equ 46 +lie equ 47 +drink equ 60 +wear equ 106 +remove equ 109 + +; nouns... +people equ 237 +everything equ 234 +nullobject equ 255 +water equ 241 + +; prepositions... +to equ 202 +; note that: +; +; NOUN1 will always be searched for if not accessible +; to the verb (using the usual accessability rules) +; +; NOUN2 will normally be searched for using the same rules. +; There are situations where this is awkward - so if the +; preposition is WITH, then NOUN2 must be carried (or it will +; be searched for by the npc). +; +rtmess equ 5000 +;--- +; mourners leave the grave at start of game +mournersrt + dc.w WActorSingleMessage,rtmess+0 ; mourners begin to leave grave. +; police walk a few feet behind rest of mourners, muttering +; + dc.b go,0,43,nullobject ; go path + dc.w WActorSingleMessage,rtmess+2 ; ...yes, now he's blown the whole +; operation, and now the drugs gang have taken off with the hostage... +; + dc.b go,0,3,nullobject ; go path+thermom + dc.b waitforperiod,0,0,nullobject ; wait for supervisor comment + dc.w WActorSingleMessage,rtmess+3 ; ...we should never have assigned +; him to the case. he was far too incompetent. and now he's probably +; cost the life of the hostage +; + dc.b go,0,6,nullobject ; go path+vault + dc.w WActorSingleMessage,rtmess+4 ; walked quietly past vault. +; one of them patted it casually and made a sick joke about vampires. +; + dc.b go,0,5,nullobject ; go path+church + dc.w WActorSingleMessage,rtmess+5 ; look at old church. east wall +; looks as though it could tumble any minute +; + dc.b go,0,8,nullobject ; go main gate + dc.w WActorSingleMessage,rtmess+6 ; ah well, it's lunch time already. +; anyone fancy a big mac. wander south out of gate + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; detective wanders around cemetary before leaving +manrt + dc.b waitforperiod,0,0,nullobject ; use opposite turn to mourners + dc.w WActorSingleMessage,rtmess+10 ; wait until mourners gone, and then +; smile slightly. +; I recognised him as the new detective currently working for the police +; on the drugs case. +; + dc.b go,0,43,nullobject ; go path + dc.w WActorSingleMessage,rtmess+11 ; pause to light cigarette + dc.w WActorSingleMessage,rtmess+14 ; strolled casually along path, +; kicking gravel. "well, that's one lousy snoop taken care of", he +; muttered. "none of those cops would think for a moment that I was +; one of the drugs gang. fools!" +; think, no wonder he's not looking sorry. he's not a detective at +; all, he helped the drugs gang bump me off. +; and now everybody blames me for blowing the whole operation. +; + dc.b go,0,6,nullobject ; go vault + dc.w WActorSingleMessage,rtmess+15 ; pat vault lid. "who'd think +; of looking in here?", he laughed rhetorically. +; think, I put two and two together and realised that the vault +; must be the hiding place for the drugs hoard. +; + dc.b go,0,7,nullobject ; go carpark gate + dc.w WActorSingleMessage,rtmess+16 ; wander off through twilight +; mists. supervisor appears in cart + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; workman starts racetrack in shed +workmanrt + dc.b waitforperiod,0,3,nullobject ; wait a short while + dc.b push,0,switch,nullobject ; turn shed light off +; + dc.b go,0,42,nullobject ; go outside shed + dc.w WActorSingleMessage,rtmess+20 ; ah, well. time to get back to work + dc.b take,0,shovel,nullobject ; take shovel +; + dc.b go,0,44,nullobject ; go to player's grave + dc.w WActorSingleMessage,rtmess+21 ; alan chance, eh? miserable old +; sod, he was. + dc.w WActorSingleMessage,rtmess+22 ; push shovel into mound of +; earth and begin throwing it into the grave + dc.w WActorSingleMessage,rtmess+23 ; throw more earth into grave + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+24 ; rub back. tiring work, this. + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+25 ; finish shovelling earth into +; grave. pat grave with shovel to flatten the earth. +waituntilshed +; following supervisor, wait until inside shed, then drop shovel +; + dc.b find,0,supervisor,nullobject ; follow supervisor + dc.b conditional,0,switch,nullobject + dc.w WRtGoto,dropshovel-list5 + dc.w WRtGoto,waituntilshed-list5 +dropshovel + dc.b drop,0,shovel,nullobject +; "find" is used, since "follow" before "racetrackreturn" seemed to +; cause an endless loop! +; +followsuper + dc.b find,0,supervisor,nullobject ; continue following supervisor + dc.w WRtGoto,followsuper-list5 +;--- +; supervisor starts racetrack at path+thermometer +supervisorrt + dc.b waitforperson,0,mourners,nullobject ; wait for mourners + dc.b waitforperiod,0,0,nullobject ; wait in case user is following + dc.w WActorSingleMessage,rtmess+30 ; complain to mourners, +; bloody electric cart. i've seen faster c5's than this +; + dc.b go,0,48,nullobject ; go sundial + dc.w WActorSingleMessage,rtmess+34 ; drive around circular steps, +; stabbing leaves with his spike +; + dc.b find,0,fadedwreath,nullobject ; go to faded wreath + dc.w WActorSingleMessage,rtmess+35 ; this wreath smells rotten + dc.b take,0,fadedwreath,nullobject ; take it +; + dc.b go,0,41,nullobject ; go to pruned branches + dc.b put,on,fadedwreath,branches ; put it on pile of brances +; + dc.b go,0,42,nullobject ; go back to shed + dc.w WActorSingleMessage,rtmess+36 ; where the heck is that +; lousy four-eyed workman? + dc.b stand,0,nullobject,nullobject ; get out of cart + dc.b waitforperson,0,workman,nullobject ; wait for workman + dc.w WActorSingleMessage,rtmess+37 ; you took your time. did you fall +; into the grave or something? +; I wish you'd fall into a grave, muttered workman, I'd fill it in +; before you could climb back out again +; + dc.b go,0,15,nullobject ; go inside shed + dc.b push,0,switch,nullobject ; turn light on + dc.w WActorSingleMessage,rtmess+38 ; well, that's another day over +; with. + dc.b push,0,button,nullobject ; turn on spotlight +; rtmessage used, because workman is speaking + dc.w WRtMessage,rtmess+39 ; workman puts tools away in cupboards. I +; wonder who's turn it is to be buried tomorrow, he joked + dc.b push,0,switch,nullobject ; turn light off +; + dc.b go,0,42,nullobject ; go outside + dc.b waitforperson,0,workman,nullobject ; wait for workman to follow + dc.b close,0,sheddoor,nullobject ; close shed door + dc.w WActorSingleMessage,rtmess+40 ; well, I could murder a pint. +; workman, so could I. let's go to the happy sialor. + dc.b stand,0,nullobject,nullobject ; get in cart +; + dc.b go,0,7,nullobject ; go carpark gate + dc.w WActorSingleMessage,rtmess+41 ; drive off to pub + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; joe introduces player to the cemetary +joert +;;;;; dc.b find,0,user,nullobject ; find player + dc.w WRtMessage,rtmess+50 ; greetings. you must be the +; new one. I see from your headstone that you're a detective. I'm +; joe danby, the late publican of the happy sailor. been here for +; five years nearly, I have. come on, I'll show you around the place. +; + dc.b go,0,49,nullobject ; go joe's grave + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+51 ; this is my own grave. see the +; lovely mowed grass. that shows how much those humans miss me. If +; only they knew I was still around. +; + dc.b go,0,59,nullobject ; go willmot graves + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+52 ; and these are the willmot +; graves. whispers into my ear, boring old bunch of fogeys if you +; ask me. + dc.b conditional,0,bert,nullobject + dc.w WRtMessage,rtmess+53 ; bert, What was that?! +; joe, Oh, I was just saying what a lovely couple you and edna were +; + dc.b go,0,52,nullobject ; go ridge grave + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+54 ; this is the grave of david +; ridge. beckons me to his ear. always has to prove something he +; does. he's a typical show-off + dc.b conditional,0,david,nullobject + dc.w WActorSingleMessage,rtmess+55 ; hi there david. still showing +; off your psychic powers - as david concentrated on dive-bombing a +; moth repeatedly against the ground +; + dc.b go,0,56,nullobject ; go colonel's graves + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+56 ; and this is colonel Rycroft's +; grave. served good for his country, he did. it's not surprising +; that he dislikes the youth of today. + dc.b conditional,0,colonel,nullobject + dc.w WRtMessage,rtmess+57 ; hi there, joe. I see you've brought along +; the new chap. holds hand out to shake. you take it but go straight +; throught it. +; ho, ho, he's not very solid yet is he, says colonel to joe +; + dc.b go,0,45,nullobject ; go violet's grave + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+58 ; this is the grave of violet +; conway, one of our oldest residents. she's as blind as +; a bat, but she's got a good pair of ears to make up for it. + dc.b conditional,0,violet,nullobject + dc.w WRtGoto,violetispresent-list5 + dc.w WRtGoto,novioletintro-list5 +violetispresent + dc.w WRtMessage,rtmess+59 ; violet, I certainly have, you must be alan. +; she smiled to greet me. + dc.b conditional,0,bell,nullobject ; violet doesn't complain if bell here + dc.w WRtGoto,novioletintro-list5 + dc.w WRtMessage,rtmess+60 ; you must forgive me if I don't follow you. +; for if I wander too far from my grave, I shall never find my way +; back again +novioletintro +; + dc.b go,0,11,nullobject ; go edith's grave + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+61 ; and lastly, but by no means +; least, this is the grave of edith dean + dc.b conditional,0,edith,nullobject + dc.w WActorSingleMessage,rtmess+62 ; say in a low voice, she's +; a typical hypocondriact. get's a bee in her bonnet and she's off. +; last week, she beleived she had turned into a toadstool. +; the week before that, she thought she was a slug. +; + dc.b go,0,40,nullobject ; go sepulcre + dc.w WActorSingleMessage,rtmess+63 ; well, that's most of the gang +; introduced. I hope I havn't bored you stiff already (stiff, geddit). +; laughs hysterically and then says, I'll let you wander around +; now as you please. I'm sure you won't mind If I walk with you. +; grudgingy, I forced a sort of squashed smile and agreed. + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; bert intro, then protect wreath from edna +bertrt + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,joe,nullobject + dc.w WRtGoto,bertjoeintro-list5 + dc.w WRtGoto,bertfullintro-list5 +bertjoeintro + dc.b waitforperiod,0,2,nullobject ; wait 0,1 for joe intro and then +; wait 0 for joe to go + dc.b waitforperson,0,user,nullobject ; wait for user to return +bertfullintro + dc.w WRtMessage,rtmess+70 ; edna tries to snatch bert's wreath and +; they squabble over it + dc.b waitforperiod,0,1,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+71 ; bert guards wreath. edna insists he +; pinched it from her and wants it back + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+72 ; bert runs around wreath, guarding +; it from edna + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+73 ; bert suggests that her wreath was +; faded, and has probably been thrown away. +; edna, I don't believe you. give me my wreath back + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WRtMessage,rtmess+74 ; edna trips bert up and jumps up and down +; on him. he still manages to guard his wreath from her + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WRtMessage,rtmess+75 ; edna sits on headstone and folds her arms +; in a huff. if you don't give it back, I won't speak to you until the +; end of eternity. +; suits me fine, says bert as he sits down on the grave, facing away +; from her. + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; bert's racetrack after edna is given the wreath +bertobedient + dc.b conditional,0,user,nullobject + dc.w WRtGoto,dontgograve-list5 + dc.b go,0,59,nullobject ; go to own grave when unattended + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+78 ; do you wan't any help? it's +; pretty boring just hanging around here +dontgograve + dc.b conditional,0,edna,nullobject + dc.b waitforperiod,0,1,nullobject ; wait for edna to nag + dc.b conditional,0,edna,nullobject + dc.w WRtActorVaryMessage,rtmess+80 ; take stick from edna. edna replies + dc.b waitforperiod,0,1,nullobject ; prevent endless loop + dc.w WRtGoto,bertobedient-list5 +;--- +; edna's racetrack after she is given the wreath +ednaobedient + dc.b conditional,0,user,nullobject + dc.w WRtGoto,dontgobert-list5 + dc.b go,0,59,nullobject ; go to own grave when unattended + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b waitforperiod,0,0,nullobject ; wait for bert's initial offer +; for help +dontgobert + dc.b conditional,0,bert,nullobject + dc.w WRtActorVaryMessage,rtmess+90 ; edna nagging bert. bert replies + dc.b conditional,0,bert,nullobject + dc.b waitforperiod,0,1,nullobject ; wait for bert to take stick + dc.b waitforperiod,0,1,nullobject ; prevent endless loop + dc.w WRtGoto,ednaobedient-list5 +;--- +; alex is woken up +alexrt + dc.w WRtVaryMessage,rtmess+100 ; stretched and yawned etc. +; what time do you call this? +; I must have nodded off. +; what a weird dream I was having. etc... +restartalex ; returns here when alex has no commands to execute + dc.b conditional,0,joe,nullobject + dc.w WActorSingleMessage,rtmess+110 ; yawned tiredly. joe shook his +; head and said. you're always flippin' fallin' asleep, you are. + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+111 ; talked gibberish about nine +; overthrowing the church + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+112 ; began to nod off and then +; woke in a frenzy. help! they're coming to take me away, he yelled. +; later, he calmed down and looked around. I could have sworn I saw a +; big white van... + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+113 ; sang a strange little song +; about pixies + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+114 ; began to argue furiously with +; the ground. he lost his temper and began to stamp madly on it. + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+115 ; I feel ever so tired. I think +; I'll go and take a nap. + dc.b go,0,52,nullobject ; go back to statue area + dc.w WActorSingleMessage,rtmess+120 ; turn back into statue + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; edith beleives she is cursed to stay here until the end of time +edithrt + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,joe,nullobject + dc.w WRtGoto,ednajoeintro-list5 + dc.w WRtGoto,ednafullintro-list5 +ednajoeintro + dc.b waitforperiod,0,2,nullobject ; wait 0,1 for joe intro and then +; wait 0 for joe to go + dc.b waitforperson,0,user,nullobject ; wait for user to return +ednafullintro + dc.w WActorSingleMessage,rtmess+130 ; edith moans. cursed, I am. +; cursed to remain beside my grave until the end of time. what +; knid of an afterlife is this, I ask you? + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+131 ; joe says, there she goes again with +; self-pity. cursed to stay here 'till the end of time, pah! +; mind you, there's no way I could talk her out of it + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+132 ; wept on her grave. have you any +; idea how boring it's going to get, staying here until the end of +; time? she asked rhetorically. + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+133 ; this is worse than waiting +; for the number 57 bus, complained edith, I wish time would hurry +; up and come to an end. I'm bored stiff. + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+134 ; joe says, pull your self together, +; edith. I'm sure time will soon come to an end and free you of +; your curse. +; joe turns to me, there must be some way of convincing her that +; it's the end of time. some kind of pun, maybe? + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+135 ; coninued her weeping. It's +; no use, she said to me, there's no way you can help me. I'll just +; have to stay here until the end of time. +; I felt helpless as she sat by her grave, sobbing. + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; edith's obedient racetrack +edithobedient + dc.w WActorSingleMessage,rtmess+140 ; I think I'll have a wander +; around the cemetary, now that I'm free of my curse +; + dc.b go,0,11,nullobject ; go sepulcre + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+141 ; skip around sepulcre. It feels +; so good to be free again. I feel so, er, alive! + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+142 ; mind you don't tread on any landmines +; or anything, sniggered joe as he watched edith prancing around +; + dc.b find,0,violet,nullobject ; find violet + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,violet,nullobject ; if violet still here... + dc.w WRtMessage,rtmess+143 ; gossip with violet. tell her +; the good news etc. + dc.b conditional,0,bush,nullobject + dc.w WRtGoto,violetbygrave-list5 + dc.w WRtGoto,violetisnthere-list5 ; violet not by her grave (bush) +violetbygrave + dc.b conditional,0,bell,nullobject + dc.w WRtGoto,violetisnthere-list5 ; violet puzzle been solved + dc.w WRtMessage,rtmess+144 ; maybe alan can help you as well, +; violet. +violetisnthere +; + dc.b find,0,colonel,nullobject ; find colonel + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,colonel,nullobject ; if colonel still here... + dc.w WActorSingleMessage,rtmess+145 ; gossip for a good while about +; the "good old days" +; + dc.w go,0,58,nullobject ; go new graves + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+146 ; walked among the new graves. +; I don't care much for these new graves, she commented, they're +; so dull and boring. + dc.w WActorSingleMessage,rtmess+147 ; edith continued, I much prefer +; the older and more interesting headstones. +; like mine, she added with a smile, while pointing in the general +; direction of her own grave. +; + dc.w go,0,48,nullobject ; go sundial area + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+148 ; sit down on steps and look +; around cemetary. my, my, this place has changed since I +; became cursed. + dc.w WActorSingleMessage,rtmess+149 +; she looked at new graves around close by. If I remember rightly, the +; area east of here used to be a big lawn. I guess a lot of people +; have copped it since then. +; I nodded in complete agreement. +; + dc.w go,0,46,nullobject ; go overgrown tombstones + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+150 ; wandered around tombstones, +; humming a jolly little tune. +; It feels so good to be free of my curse, she said to me, there +; must be something I can do to help you in return... + dc.b waitforperiod,0,0,nullobject + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; david ridge "arrogant" racetrack +davidrt + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,joe,nullobject + dc.w WRtGoto,davidjoeintro-list5 + dc.w WRtGoto,davidfullintro-list5 +davidjoeintro + dc.b waitforperiod,0,2,nullobject ; wait 0,1 for joe intro and then +; wait 0 for joe to go + dc.b waitforperson,0,user,nullobject ; wait for user to return +davidfullintro + dc.w WActorSingleMessage,rtmess+160 ; so you're the new one. weedy +; little chap, aren't you? pah, I bet you can't even move objects +; yet. + dc.b waitforperson,0,user,nullobject + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+161 ; show off by levitating a mouse +; about fifty feet in the air and then letting it drop to the ground. + dc.b waitforperson,0,user,nullobject + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+162 ; joe gives advice. go on, show him what +; you can do. maybe he'll help you if you can impress him + dc.b waitforperson,0,user,nullobject + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+163 ; wave hands about to cause +; a breeze and blow fallen leaves in my face. +; laugh pretentiously. + dc.b waitforperson,0,user,nullobject + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+175 ; david pestering me + dc.b waitforperson,0,user,nullobject + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+176 ; david pestering me + dc.b waitforperson,0,user,nullobject + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+177 ; david pestering me + dc.b waitforperson,0,user,nullobject + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+178 ; david pestering me + dc.b waitforperson,0,user,nullobject + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+179 ; david pestering me + dc.b waitforperson,0,user,nullobject + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+164 ; I bet you wish you had my +; powers, he announced quite arrogantly, while leaning against +; his sacrophagus + dc.b waitforperson,0,user,nullobject + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+165 ; well, it's you're turn to +; show me what you can do. I might even help you if I'm impressed + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; david ridge "obedient" racetrack +davidobedient + dc.b conditional,0,user,nullobject + dc.w WRtGoto,daviddontgograve-list5 + dc.b go,0,52,nullobject ; go to own grave when unattended + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+168 ; I'm busy practicing my powers, +; but I'll help you if you ask nicely +daviddontgograve + dc.w WRtActorVaryMessage,rtmess+170 ; show off etc. + dc.b waitforperiod,0,3,nullobject ; prevent endless loop + dc.w WRtGoto,davidobedient-list5 +;--- +; colonel follows vandals. most of his messages are handled by the +; vandals' racetrack +colonelrt + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,joe,nullobject + dc.w WRtGoto,coloneljoeintro-list5 + dc.w WRtGoto,colonelfullintro-list5 +coloneljoeintro + dc.b waitforperiod,0,2,nullobject ; wait 0,1 for joe intro and then +; wait 0 for joe to go + dc.b waitforperson,0,user,nullobject ; wait for user to return +colonelfullintro + dc.w WActorSingleMessage,rtmess+180 ; what's that noise? I bet it's +; those young scoundrels again. I'd better go and investigate +; +; "find" is used, since "follow" before "racetrackreturn" seemed to +; cause an endless loop! +colonelfollow + dc.b find,0,vandals,nullobject ; follow vandals + dc.w WRtGoto,colonelfollow-list5 +;--- +colonelobedient + dc.b find,0,user,nullobject ; go to player + dc.w WActorSingleMessage,rtmess+185 ; and thank him for turning shed +; light on to send vandals away + dc.b waitforperiod,0,0,nullobject + dc.b find,0,user,nullobject ; go to player (just in case he's gone) + dc.w WActorSingleMessage,rtmess+186 ; well, if you need me for anything, +; I'll be wandering around the cemetary to see if there are any +; more of those ruddy holdlums +; +; look for hooligans etc. in ridiculous places... +restartcolonel + dc.b go,0,52,nullobject ; go ridge grave + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+187 ; examine urn. no vandals here + dc.b conditional,0,david,nullobject + dc.w WRtMessage,rtmess+188 ; david mutters, stupid old bastard +; + dc.b go,0,53,nullobject ; go copper beech + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+189 ; rummidge throught leaves to +; see if vandals hiding there. + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+190 ; joe begins to snigger +; + dc.b go,0,41,nullobject ; go pruned branches + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+191 ; bend down and poke a stick +; violently into the branches, hoping to prod any hoodlums out + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+192 ; joe says, the colonel's finally cracked +; this time! +; + dc.b go,0,11,nullobject ; go edith's grave + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+193 ; look inside vase to see if +; any vandals inside + dc.b conditional,0,edith,nullobject + dc.w WRtMessage,rtmess+194 ; edith, ...and people say that I'm crazy! +; + dc.b go,0,56,nullobject ; go back to his own grave + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+195 ; complain about state of today's +; youth. I wish that I could have bought my shotgun to the afterlife +; with me. I'd blast their arses! + dc.b waitforperiod,0,0,nullobject + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; vandals loiter around, drinking and joking etc. +vandalsrt + dc.b go,0,51,nullobject ; go to cenotaph + dc.b waitforperson,0,user,nullobject ; wait for user + dc.w WActorSingleMessage,rtmess+200 ; sit around cenotaph, drinking +; vodka and joking. one of them climbs up cenotaph and acts like +; a monkey. + dc.b conditional,0,colonel,nullobject ; is colonel here? + dc.w WRtMessage,rtmess+201 ; colonel comments on their lack of respect. +; I fought hard for this country and this is the thanks I get from +; today's youth. +; + dc.b go,0,52,nullobject ; go ridge grave + dc.b waitforperson,0,user,nullobject ; wait for user + dc.w WActorSingleMessage,rtmess+202 ; sit on sepulcre and light up +; cigarettes. one of them chokes with smoke and another laughs, +; oi! give over coffin! +; he continues choking and then throws up in urn on sepuclcre. + dc.b conditional,0,david,nullobject ; is david here? + dc.w WRtMessage,rtmess+203 ; david is angered by this and scares them +; away by rocking the urn. +; + dc.b go,0,53,nullobject ; go to beech tree + dc.b waitforperson,0,user,nullobject ; wait for user + dc.w WActorSingleMessage,rtmess+204 ; climb tree and swing from branches. +; hey, this is dead good, he jokes +; huh, what a grave joke, replies another + dc.b conditional,0,colonel,nullobject ; is colonel here? + dc.w WRtMessage,rtmess+205 ; colonel is fuming and concentrates on +; making himself visible to scare them away. he manages this for a +; second, but only one of them sees him and comments on the strength +; of the vodka. Wow! I'm seeing things now. +; + dc.b go,0,45,nullobject ; go violet's grave + dc.b waitforperson,0,user,nullobject ; wait for user + dc.w WActorSingleMessage,rtmess+206 ; stub cigarettes out on violet's +; headstone and then relieve themselves on bush. + dc.b conditional,0,violet,nullobject ; is violet here? + dc.w WRtMessage,rtmess+207 ; violet is frightened by vandals, as she +; remembers being mugged by thugs a few years before her death. +; + dc.b go,0,46,nullobject ; go tombstones + dc.b waitforperson,0,user,nullobject ; wait for user + dc.w WActorSingleMessage,rtmess+208 ; kick tombstones, knocking +; a few of them over. then deface them with spraypaint. + dc.b conditional,0,colonel,nullobject ; is colonel here? + dc.w WRtMessage,rtmess+209 ; colonel shouts at the top of his voice, +; but they cannot hear him. he kneels down in disgust and tries to +; rub the paint off the tombstones, but it just won't come off. +; + dc.w WRtGoto,vandalsrt-list5 +;--- +; dog before fishbone removed +dogrt +; begins on path near thermometer + dc.b waitforperson,0,user,nullobject + dc.w WActorSingleMessage,rtmess+210 ; dog seems to notice me and +; begins to shiver a little. it tries to bark, but only manages +; a dry choking noise. +; +dogloop + dc.b go,0,43,nullobject ; go to cemetary path + dc.b waitforperson,0,user,nullobject + dc.w WActorSingleMessage,rtmess+211 ; dog has a fit of violent +; choking + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+212 ; joe tries to calm dog, but it just +; growls as if in pain + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+213 ; caugh hoarsley, as if trying +; to clear its throat + dc.b waitforperiod,0,0,nullobject +; + dc.b go,0,47,nullobject ; go to long grass + dc.b waitforperson,0,user,nullobject + dc.w WActorSingleMessage,rtmess+214 ; eat grass and start pawing +; its mouth in frustration. + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+215 ; opened its mouth wide and +; made vomiting noises + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+216 ; wander around with its +; tail between its legs, feeling sorry for itself +; + dc.b go,0,42,nullobject ; go to shed + dc.b waitforperson,0,user,nullobject + dc.w WActorSingleMessage,rtmess+217 ; sit down outside shed door, +; caughing hoarsley + dc.b waitforperiod,0,0,nullobject + dc.w WActorSingleMessage,rtmess+218 ; rub neck against gravel as if +; trying to dislodge something in its throat + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+219 ; joe suggests that something may have +; become stuck in its throat + dc.b waitforperiod,0,0,nullobject +; + dc.w WRtGoto,dogloop-list5 +;--- +; dog "friendly" racetrack +dogobedient + dc.b find,0,user,nullobject ; find player + dc.w WRtActorVaryMessage,rtmess+220 ; sniff my leg timidly etc. + dc.b waitforperiod,0,2,nullobject ; prevent endless loop + dc.w WRtGoto,dogobedient-list5 +;--- +; violet conway is afraid to leave her grave, since she is blind +violetrt + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,joe,nullobject + dc.w WRtGoto,violetjoeintro-list5 + dc.w WRtGoto,violetfullintro-list5 +violetjoeintro + dc.b waitforperiod,0,2,nullobject ; wait 0,1 for joe intro and then +; wait 0 for joe to go + dc.b waitforperson,0,user,nullobject ; wait for user to return +violetfullintro + dc.w WActorSingleMessage,rtmess+230 ; oh, I wish I hadn't aged so +; much before my death. it's terrible having to spend the rest of my +; afterlife as blind as a bat + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,joe,nullobject ; is joe here? + dc.w WRtMessage,rtmess+231 ; joe, but I'm sure you could find your +; way about by sound. + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+232 ; I suppose I could find my +; way about by sound, but I'm afraid that I might not find my way back +; to my grave before dawn +; I could do with something noisy beside my grave so that I don't +; get lost, she added + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,joe,nullobject ; is joe here? + dc.w WRtMessage,rtmess+233 ; talk to player, I wish we could help her. +; if only we had some kind of siren or something. + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+234 ; the bush beside my grave usually +; makes some noise with the breeze, but it's so quiet that I can't +; hear it from a few yards away. + dc.b waitforperiod,0,0,nullobject + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+235 ; oh, I wish you could help me. +; it would be so nice to wander through the cemetary rather than +; stay by my grave all night. + dc.b racetrackreturn,0,nullobject,nullobject +;--- +; violet "obedient" racetrack +; have a little wander, now that bell is on bush +violetobedient + dc.b go,0,45,nullobject + dc.w WActorSingleMessage,rtmess+240 ; Oh, it's so nice to hear +; that bell. I feel safe to wander around the cemetary on my own +; at last. +; + dc.b go,0,50,nullobject ; go marigolds + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+241 ; walk through marigolds. +; oh, these flowers smell so lovely. I wonder what type they are. + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+242 ; joe picks a flower for violet and she +; holds it to her nose. it's a long time since I smelled marigolds. +; + dc.b find,0,colonel,nullobject ; find colonel + dc.b waitforperson,0,user,nullobject ; wait for player + dc.b conditional,0,colonel,nullobject ; is colonel still here? + dc.w WActorSingleMessage,rtmess+243 ; hello colonel. what a nice +; night it is. tell him about me fixing bell to bushes. It's +; so nice to be able to wander around by myself. +; + dc.b go,0,53,nullobject ; go copper beech + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+244 ; walk through fallen leaves and +; listen to them rustling in the breeze. I love autumn, she sighed + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+245 ; joe says, I bet you havn't been to my +; grave yet. It's one of the new ones over there. he took her hand +; and pointed it in the general direction of his grave. why not +; have a wander over there? he suggested +; + dc.b go,0,49,nullobject ; go joe's grave + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+246 ; run fingers over joe's +; headstone, reading the inscription. + dc.b conditional,0,joe,nullobject + dc.w WActorSingleMessage,rtmess+247 ; what a nice headstone you +; have, joe. you obviously had many friends before you death. +; + dc.b find,0,bell,nullobject ; find bell + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+248 ; this bell really works, +; she enthused, it was no trouble finding my way back to it. +; + dc.b go,0,51,nullobject ; go cenotaph + dc.b waitforperson,0,user,nullobject ; wait for player + dc.w WActorSingleMessage,rtmess+249 ; feel inscription on cenotaph, +; lips moving as she runs her fingers slowly over each word. + dc.b conditional,0,joe,nullobject + dc.w WRtMessage,rtmess+250 ; joe helps her read inscription by +; placing her hand carefully on each word. +; violet says, oh, everyone's being so kind to me tonight, she says, +; it's been much nicer than staying by my grave all the time. + dc.b racetrackreturn,0,nullobject,nullobject +;--- + even +reversaltable +; part of list5 +; gives reverse directions for directions + dc.b 0,4,6,7,1,8,2,3,5 ; compass directions + dc.b 10,9,12,11,13,14,15 +;----------- + even +roompictures +; part of list 5 +; gives pictures associated with various rooms. +; the bytes are arranged in ROOM,PIC pairs rather than a table of +; pictures for each room. this is because some rooms begin from +; number 220, hence the table would be rather big. + dc.b 3,26 ; path (thermometer) + dc.b 4,26 ; lawn (thermometer) + dc.b 5,26 ; path (thermometer) + dc.b 6,26 ; vault (thermometer) + dc.b 7,26 ; east gate (thermometer) + dc.b 8,26 ; main gate (thermometer) + dc.b 9,26 ; yew (thermometer) + dc.b 10,26 ; lawn (thermometer) + dc.b 11,13 ; edith's grave (graveyard) + dc.b 15,3 ; shed (church tower) + dc.b 40,13 ; sepulcre (graveyard) + dc.b 41,13 ; branches (graveyard) + dc.b 42,3 ; outside shed (church tower) + dc.b 43,3 ; path (church tower) + dc.b 44,11 ; my grave (headstone) + dc.b 45,13 ; violet's grave (graveyard) + dc.b 46,13 ; tombstones (graveyard) + dc.b 47,13 ; long grass (graveyard) + dc.b 48,4 ; sundial (graves) + dc.b 49,28 ; joe's grave (graveyard) + dc.b 50,13 ; marigolds (graveyard) + dc.b 51,13 ; senotaph (graveyard) + dc.b 52,13 ; david's grave (graveyard) + dc.b 53,4 ; beech (graves) + dc.b 54,13 ; new graves (graveyard) + dc.b 55,13 ; elder bushes (graveyard) + dc.b 56,13 ; colonel's grave (graveyard) + dc.b 57,13 ; lawn (graveyard) + dc.b 58,13 ; new graves (graveyard) + dc.b 59,27 ; willmot graves (graveyard) + dc.b 0,0 + even + +ENDTABLE +;--------- + END + diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/acode.acd b/l9dev/regress/games.l9/ghost.l9/part2.l9/acode.acd new file mode 100644 index 0000000..4021adf Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part2.l9/acode.acd differ diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/aconst.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/aconst.txt new file mode 100644 index 0000000..7dcc841 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/aconst.txt @@ -0,0 +1,490 @@ +; Standard adventure source, copyright (C) 1988 Level 9 Computing. +; +; ACONST.TXT, general constants and variables for standard adventure. +; This should not include any game-specific data. +; +var + parttochain thispart thisgame dead ; Chain variables + lastpartscore + valuesave +; +CONST +; +;; Minus10=65526 ; >> Pete 14/9/89 + +;; itA=0 ; >> Pete 14/9/89 + itAN=1 + SingularSOME=2 +;; he=3 ; >>Mike 1/2/88 - now have "the" or "a" before them. ; >> Pete 14/9/89 + she=4 ;>>mike 1/2/88 - i.e. not proper nouns. - see below. + PluralSOME=5 +;; you=6 ; >> Pete 14/9/89 +;; ProperMale=7 ;>>mike 1/2/88 ; >> Pete 14/9/89 +;; ProperFemale=8 ;>>mike 1/2/88 ; >> Pete 14/9/89 +; +;; EAST=3 ; >> Pete 14/9/89 +;; WEST=7 ; >> Pete 14/9/89 +; +; NOW CONSTANTS FOR COMMON MESSAGES + SPACE=1 + COMMA=3 + CR=5 + AND=6 + SPACEand=14 +;; DOTnoSPACE=4 ; >> Pete 14/9/89 +;; DOTCR=7 ; >> Pete 14/9/89 + DOT=9 + THE=21 +;; COLON=18 ; >> Pete 14/9/89 +;; COLONnoSPACE=2 ; >> Pete 14/9/89 + QUOTE=19 + SOME=23 +;; DOTquote=24 ; >> Pete 14/9/89 + BlankLine=25 +;; STAR=98 ; >> Pete 14/9/89 +;; PLUS=99 ; >> Pete 14/9/89 +; + OWexits=1 + OWobjects=2 +; + NONSPECIFIC=31 ; USE IN POSITION SEARCH WHERE TYPE UNKNOWN +;; STACKspace=20 ; >> Pete 14/9/89 + MAXdirection=14 ; ACROSS + MAXdirectionPLUS1=15 +; +; Bases for text blocks + EXITdescBASE=50 + OBJECTdescBASE=300 + EXAMINEmessages=600 + EXAMINEoffset=300 ; from NOUNOFFSET + EXAMINEmaxOFFSET=500 +; +; Preposition values (all relative to prepoffset) + ipON=1 + ON=1 + UNDER=2 + BEHIND=3 + CARRIED=4 + WORN=5 +;; AT=6 ; for INPUT ; >> Pete 14/9/89 + ipIN=7 + IN=7 +;; HANGING=8 ; >> Pete 14/9/89 +;; ipFROM=17 ; >> Pete 14/9/89 +;; LIEON=12 ; >> Pete 14/9/89 +;; SITON=13 ; >> Pete 14/9/89 + WITH=16 + ipINFRONT=18 +; + ipOFF=200 ;66 + OFF=200 ;66 + UP=201 ;67 +;; DOWN=202 ;68 ; >> Pete 14/9/89 + ipTO=203 + iTO=1803 ;93 - absolute message number + ipOUT=204 ;70 +;; iFOR=206 ;73 ; relative to prepoffset ; >> Pete 14/9/89 +;; iUNTIL=207 ;73 ; relative to prepoffset ; >> Pete 14/9/89 +;; ipDEBUG=208 ; >> Pete 14/9/89 +; +;; DISABLEIT=255 ; >> Pete 14/9/89 +; +; Movement verbs.. + iNORTH=1 +;; ivDOWN=10 ; >> Pete 14/9/89 + ivUP=9 + ivIN=11 + ivOUT=12 + iCROSS=13 + iCLIMB=14 +;; iJUMP=15 ; >> Pete 14/9/89 +; +; Intransitive verbs.. + iAGAIN=21 + iLOOK=22 +;; iINVENTORY=23 ; >> Pete 14/9/89 + iQUIT=24 + iRESTORE=25 + iRAMSAVE=27 + iRAMLOAD=28 + iVERBOSE=30 + iBRIEF=31 + iNONE=32 ; description mode +;; iplay=33 ; >> Pete 14/9/89 + ivON=34 + ivOFF=35 + iHELLO=205 ; >>fixed in g338 + iOOPS=39 +;; iATTACK=40 ; >> Pete 14/9/89 +;; iSEARCH=42 ; >> Pete 14/9/89 +;; iSMELL=44 ; >> Pete 14/9/89 +;; iKNOCK=45 ; >> Pete 14/9/89 +;; iLIE=47 ; >> Pete 14/9/89 +;; iSIT=48 ; >> Pete 14/9/89 + iSTAND=46 + iSAY=50 +; + iTELEPORT=51 + iGETME=52 + iSETupRUN=54 + iSETupGO=58 + + iReportProblem=65 + + iSHOUT=73 + ivTO=75 +; +;; iHAVE=80 ; group of verbs for output.. ; >> Pete 14/9/89 +;; iHAS=81 ; >> Pete 14/9/89 + iAM=82 +;; iARE=83 ; >> Pete 14/9/89 +;; iIS=84 ; >> Pete 14/9/89 +; +;; iGOin=87 ; >> Pete 14/9/89 + iGOout=88 +; +; goal-directed verbs + iWAITforPERSON=89 + iWAITuntilTIME=90 + iWAITforPERIOD=91 + iWAIT=92 ; short wait + iPARSEwait=32 ; what the user gets when he types "wait" +;; iKILL=93 ; >> Pete 14/9/89 +; +;; iDODGE=95 ; >> Pete 14/9/89 + iGDgo=96 ; npcs use this +;; iGDrun=97 ; >> Pete 14/9/89 + icheat=98 +;; iBUY=99 ; >> Pete 14/9/89 +; +; Transitive verbs.. + iEXAMINE=100 + iGET=104 + iTAKE=105 + iWEAR=106 + iDROP=107 + iPUT=108 + iREMOVE=109 + iTHROW=110 + iGIVE=111 + iASK=112 + iFOLLOW=113 +;; iOPEN=114 ; >> Pete 14/9/89 + iEXTINGUISH=116 +;; iPRESS=117 ; >> Pete 14/9/89 + iPUSH=118 +;; iFASTEN=119 ; >> Pete 14/9/89 + ipull=121 +;; iDRESS=129 ; >> Pete 14/9/89 +;; iCOLLECT=132 ; >> Pete 14/9/89 + iRETURNobject=136 ; for npcs only + iSETUPfind=138 + iGDfind=139 +;; iCLOSE=140 ; >> Pete 14/9/89 + iTELL=142 +;; iSTRUGGLE=144 ; >> Pete 14/9/89 +;; iSTEALallFROM=145 ; >> Pete 14/9/89 + iENTER=166 +; +; game specific.. +;; iSCRATCH=170 ; >> Pete 14/9/89 + iHIT=233 ;183 +;; iCRUSH=186 ; >> Pete 14/9/89 +;; iDEMOLISH=189 ; >> Pete 14/9/89 +; +; Echo verbs also used for Y/N questions + ivNO=200 + ivYES=201 + iWHY=213 +; +; now verbs to do with racetracks (can never be typed by player as +; their message numbers are used by the first few nouns).. + OBEYracetrack=252 + RtConditional=247 + RtActorVaryMessage=248 + RtActorSingleMessage=249 +; racetrackSAY=250 + racetrackMESSAGE=251 + racetrackVARYMESSAGE=252 + racetrackGOSUB=253 + racetrackGOTO=254 + racetrackRETURN=255 +; +; Verb groups.. + maxINTRANSITIVE=99 + maxTRANSITIVE=195 + minECHOminus1=199 + minECHOtransitive=235 ; none + maxECHO=250 +; +; Collective nouns.. + minCOLLECTIVE=234 + maxCOLLECTIVE=238 + iEVERYTHING=234 ; EVERYTHING-NOUNOFFSET + iTREASURE=235 +;; iWEAPONS=236 ; >> Pete 14/9/89 + iPEOPLE=237 + iCLOTHES=238 +; +; Now nouns +;; iBE=242 ; >> Pete 14/9/89 + iEXCEPT=247 + iIT=248 + iMINUTES=249 +;--- +; some omni-present objects + generalDOOR=239 ; omni-present nowadays +;; WATER=241 ; >> Pete 14/9/89 +;; iYOU=253 ; >> Pete 14/9/89 +; +; Misc noun values.. + minGARBAGE=3699 + maxGARBAGE=3799 +; + nullOBJECT=255 + nullVALUE=65535 + nullNUMBER=65535 +; +; WORD TYPE VALUES.. + ASCItype=0 ; non-alpha characters are returned as their ASCII values +;; ASCIItypeE=0 ; >> Pete 14/9/89 + VERBtype=2 ; 'V'erb + CONJtype=4 ; con'J'unction, e.g 'Take this AND that' + PREPtype=6 ; 'P'reposition, e.g 'Give something TO someone' + NOUNtype=8 ; 'N'oun + ADJEtype=10 ; 'A'djective + MATCHtype=12; 'C' used for matching with particular words - + ; e.g. was a reference to scenery the word 'panel' + NUMBtype=14 +;; maxTYPE=14 ; >> Pete 14/9/89 +;; maxAMBIG=10 ; MAX NUM OF AMBIG FORMS ACCEPTED FROM INPUT ; >> Pete 14/9/89 +; + ASCIoffset=0 + VERBoffset=50 + CONJoffset=0 ; ??? + PREPoffset=1600 + NOUNoffset=300 + ADJEoffset=300 ; = NOUNoffset + MATCHoffset=4300 ; used for matching with particular words +; +; ASCII VALUES + iCOMMA=44 + iDOT=46 +; +; Conjunctions (absolute message numbers).. + iTHEN=551 +;; iTHEREFORE=552 ; >> Pete 14/9/89 +; +;--- + FALSE=0 + TRUE=1 +;; ERRORcode=2 ; >> Pete 14/9/89 +; +; Constants for Objecttable assignments +; + otBASE=32 + otBASEplus1=33 + otMAX=47 ; otbase+15 + NOUNcarried=1 + NOUNonGROUND=2 +;; NOUNnotOBVIOUS=2 ; ADDED TO ABOVE WHEN NOUN IS NOT OBVIOUSLY HERE ; >> Pete 14/9/89 + NOUNspecified=128 + NOUNforbidden=192 +; +;; OK=2153 ; message 'OK' ; >> Pete 14/9/89 +; + NEGATIVE=50000 +;--- +;; HOSTILE=9 ; >> Pete 14/9/89 +;; FRIENDLY=0 ; >> Pete 14/9/89 +; +;--------------------------------------------------------------------------- +; +VAR + X1 X2 X3 X4 X5 X6 +;; X7 ; >> Pete 14/9/89 + X8 X9 ; Temporary work variables + C0 C1 C2 C3 C4 + C10 ; "Constants" with corresponding values + +; Input is converted to (e.g Put the Red Box on the Green Chair).. + VERB ; Put + PREP ; On + NOUN1 ; Red Box + NOUN2 ; Green Chair + iNUMBER ; Number, if specified ANYWHERE in input, eg "push button 1" + +; Used internally in parseinput.. + ADJECTIVE1 + ADJECTIVE2 + + VALUE ; General purpose result + INDEX ; Only used by READINPUTLIST + + HIFROM FROM ; Two byte values where (single) movement is from.. + ; "Hi" is containment type, other is room/container + HIDEST DEST ; Destination of move. See HIFROM and FROM + + STATUS ; Used by exit code. Status nibble. Last? Door? Invis? Two-way? + ROOM ; Current room of actor. Only changed by setupROOM + DIR ; Direction of move +;; NUMEXITS ; Just used by PRINTEXIT code ; >> Pete 14/9/89 + LASTROOM ; Previous room that actor was in + EXITVISIBLE ; A result of CHECKEXIT + CURRENTOBJECT ; Just used by PRESENTMULTIPLE + OBJECT ; General purpose variable, object acted upon by routines + HIPOS POS ; General purpose position of object + SEARCHPOS HISEARCHPOS ; Where parser expects object. E.g carried or on +; ground in current room. Also used in GETNEXTOBJECT, which returns the +; contents of the specified position, one at a time. + + LASTWORDPRINTED ; For printing IT in place of noun. "Last" noun printed. + OUTPUTWORD ; Internal to OUTWORDn (prints exits/object list) + WORD1 WORD2 WORD3 WORD4 ; Internal to OUTWORDn + OWTYPE ; ditto. Word type, so article can be added/pronoun substituted. + + RESULT ; General purpose result. Widely returned (as TRUE or FALSE) + + M1 M2 ; General purpose output messages. Lots of routines print M1. + SEARCHDEPTH ; Parameter to GETNEXTWORD + OBVIOUS ; Flag returned by CHECKIFOBVIOUS, if OBJECT can be seen + LASTPICTURE ; Last picture displayed (i.e the one you can probably see). +; + SEARCHTYPE ; used in CHECKTYPE. Class of word checked for (eg NOUN, VERB) + WORDTYPE ; internal variable of CHECKTYPE + EXCEPT ; Internal to parser. Did player type something like "ALL EXCEPT"? + WORDNOTPROCESSED ; Internal to parser + EOL SEPARATOR ; Internal to parser. + ; Respectively set at end of sentence/phrase + EVERYTHING ; Internal to parser. Did player use "EVERYTHING"? + NOMOREINPUT ; Do not change this unless you're using GETNEXTWORD. + ; Set at end of input line. Remains set unless made FALSE + PROCESSED ; Flag set in parsing. + SUPRESSCHECKING ; Internal to parser +; + itWORD ; value substituted for "IT" in input + itNUMBER ; ditto, for "INUMBER" +; + AGAINVERB againnoun1 againnoun2 againprep ; stored command, for AGAIN +; + VERBSTOCALL ; used by PRESENTMULTIPLE + HAVECALLEDVERB ; ditto + SOMETHINGPROCESSED ; prevents spurious "What now?" prompts + LASTVERBVALID ; Can user type 'again'? (Only to repeat a valid command) +; +;; TRAMPTR TRAMBASE ; Not used + TIMEINROOM ; Time since player last moved +;>>removed by L2 CONFIRMMESSAGE ; ?not used +; +;; TIME ; Player turns since game started ; >> Pete 14/9/89 +;; HOUR ; >> Pete 14/9/89 +;; MINUTE ; >> Pete 14/9/89 +;; DAY ; current time ; >> Pete 14/9/89 + +;; TIMEPASSED ; Time to add on during the coming move. ; >> Pete 14/9/89 + +;; SCOREINDEX ; Used within ADDSCORE routine to specify what to score for. ; >> Pete 14/9/89 + CURRENTMESSAGE ;? + DOOROPEN DOOR ; status/presence of door in current room +; + ACTOR ; current person who is moving/doing things +; +;; BLOWSTRENGTH ; used in combat ; >> Pete 14/9/89 + PROCESSINGSAY ; is user giving commands to someone? + SAYRESPONSE ; used by CONVERSE.TXT to specify when a response to +; the present conversational command has been printed + + OOPSPOS OOPSPOSEND ; internal to OOPS code + + ACTORATTRIBUTES ; used all over the place by NPC handlers + moreinfoexpected ; Program has typed where? and allows just a noun input +;; vandalptr ; internal to vandalism code ; >> Pete 14/9/89 + + startfloorpointers ; within list5 + startracetracks ; within list5 + numexplicitmoves ; number of moves made by N/S/E etc. rather than GO + wanttoprintand ; set to number of noun to replace with 'and' + executeprocessed ; set when gd commands have been acted on + descriptionmode ; verbose/brief/none. (None is the case for 'run') + startreversaltable ; in list5 + currentuserroom ; where player is (for benefit of npcs) + commandfinished ; set when a multiple command has finished + forceprinting ; when set, player gets messages even when not nearby + orderwaiting ; in NPC decision code. Is a queued command waiting? +;; cheatmode ; flag indicating level of cheating ; >> Pete 14/9/89 + treatasfind ; internal to the parser + DestToDescribeExitsIn ; yeuch! So exits described in final room of "GO" +; + normaldescriptionmode ; the mode selected by the user + wordsoutput ; internal to PRINTEXITS etc + X Y ; Coordinates of ROOM on grid. Set by GETXY + target ; victim of combat etc +;; currentsceneryobject ; unused ; >> Pete 14/9/89 + + printingobjects ; internal to PRINTEXITS etc + severalexits ; ditto + + picturetodraw ; parameter given to SHOWPICTURE + highwater ; debugging variable, reporting max stack space used. + freespaceptr ; internal to NPCPUSH and NPCPOP + anglefromintended ; used in GO, when desired direction is blocked + intendeddirection ; ditto + synthdest ; destination on grid that actor is moving to + destnoun1 ; tells gdgoxy when it has arrived + + initfifoactor ; internal initfifo. ++++ MUST NOT BE CHANGED BY CODER. ++++ + lastunlinkedcommand ; internal to NPCPUSH + commandstolink ; ditto + + fatalerror ; serious error, set to fail current goal-directed command + lightinroom ; user's room light? + blockedbysm ; internal to goal directed movement + + OTPOS OTHIPOS ; object position, set at start of OBJECTTRIGGER +;; hitpoints ; internal to combat ; >> Pete 14/9/89 +;; activationsremaining ; used to limit number of NPCs active each turn ; >> Pete 14/9/89 + xcoord ycoord ; position of picture +; + npclist9save0 npclist9save1 npclist9save2 npclist9save3 npclist9save4 + npclist9save5 npclist9save6 ; used when driver called, to protect data +; + m1save + m1printsave actorsave objectsave + roomsave ceroomsave + gdgoroomsave +;; gdroomsave ; misc vital save variables ; >> Pete 14/9/89 +; + gameover + AutoExits + twNoun + verbsave +; +; variables for new PrintObject... + + CurrentObjectsPrinted LastHicurrentpos LastCurrentPos TotalObjectsPrinted + SaveHisearchpos SaveSearchpos PluralOffset + +;--------------------------------------------------------------------------- +; +TABLE + OBJECTSTART=1 +; + CURRENTPOS=2 ; OBJECT CURRENT POSITION + HICURRENTPOS=3 +; + NPCINITIAL=5 ; NPC initial status + LIST5=5 ; Also used for floorpointers - from startfloorpointers on. +; + NPCCURRENT=6 + NPCSTACK=6 +; + OUTPUTBUFFER=7 + SCORETABLE=7 ; from entry 16 onwards + list7=7 +; + LIST8=8 +; + OBJECTTABLE=9 ; USED FOR EVERYTHING AND SIMILAR WORDS + LIST9=9 + LINPUT=9 +; \ No newline at end of file diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/acore.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/acore.txt new file mode 100644 index 0000000..a86bdef --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/acore.txt @@ -0,0 +1,1562 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; taken from Lancelot version 14/5/88 +; +; ACORE.TXT, core routines for the game, e.g standard printing code. +; Code in here is basically unchanged from game to game, but if you +; do need to make any alterations, be sure to mark them with a comment +; of the form below, so we can check them by searching for the ">>": +; ADD X1,X2 ; >> SPECIAL TO KNIGHT ORC + +; CheckIfObvious, PrintObject, DescActor routines updated for lancelot +; +BEGIN +; +;.DESCactor +;; Print any special messages for actor +;; e.g. 'You are standing on the object' +; +; X1=HICURRENTPOS(actor) +; IF X1=0 THEN DESCPLAYRET +; +; GOSUB @printTHEactor +; X1=HICURRENTPOS(actor) +; +; X2=1740 +; ADD X1,X2 +; MESSAGE X1 ; are standing on / sitting on / lying on etc. +; X1=CURRENTPOS(actor) +; GOSUB @printTHEobjectx1 +; MESSAGE DOT +;.DESCPLAYRET +; RETURN +;--- +.CHECKIFOBVIOUS +; see if 'OBJECT' is immediately obvious +;>>mike 8/2/88 if object=actor then ciofail + OBVIOUS=TRUE + IF SEARCHDEPTH=0 THEN CIORET + X1=HICURRENTPOS(OBJECT) + IF X1=0 THEN CIORET ; things on ground are always obvious + X1=CURRENTPOS(OBJECT) + if printingobjects=true then cionotactor + if x1=actor then cioret ; actor's possesions are always obvious +.cionotactor + x3=x1 ;*graham* save container + ADD X1,X1 +; look at hi initial position of container + X2=OBJECTSTART(X1) + IF X2>127 THEN CIORET ; 'obvious' bit set +; +;*graham* bug fix + x2=hicurrentpos(actor) + if x2=0 then ciofail + x2=currentpos(actor) ; actor is in same container as object, so + if x2=x3 then cioret ; make it obvious. +;*graham* +; +.CIOFAIL + OBVIOUS=FALSE +.CIORET + RETURN +;--- +; Print list of exits from current location.. +; +.exits + if nextverb=ivon then setAutoExits + if nextverb<>ivoff then printExits +.setAutoExits + AutoExits=nextverb + nextverb=0 + goto @done + +.printEXITS + x8=dir ;*bug fix* 23/2/89 + severalexits=FALSE + OWTYPE=OWEXITS + if room124 then peedge ; scenery with something next to it +; +; are we at the edge of the board? + if x=0 then peedge + if y=0 then peedge + if x=xmax then peedge + if y=ymax then peedge + word1=2009 ; lead in all directions + word2=0 + word3=0 + word4=0 + dir=8 ; last compass direction + severalexits=TRUE + goto pedesc ; do rest of directions normally + +.penormal +.peedge +; yes - so print them normally + DIR=1 ; current direction +.PELOOP +; PRINT AN EXIT (IF VISIBLE) + FROM=ROOM + GOSUB @CHECKEXIT +;;* +;; if hole present, make visible exit IN +; if room<>23 then notsecretexit +; if dir<>11 then notsecretexit +; x1=currentpos(hole) +; if x1=0 then notsecretexit +; exitvisible=true +;.notsecretexit +;;* + IF EXITVISIBLE=FALSE THEN PENEXTDIR + WORD1=EXITDESCBASE + ADD WORD1,DIR + word2=0 + word3=0 + word4=0 + IF DOOR=0 THEN PENODOOR + WORD2=12 ; base for door messages + ADD WORD2,DOOROPEN +.PENODOOR + if severalexits=TRUE then pe2 ; already printed message + IF wordsoutput<>2 THEN PE2 + MESSAGE 10 ; EXITS ARE +.PE2 +.PEDESC + GOSUB @OUTWORD1234 +.PENEXTDIR + ADD DIR,C1 + IF DIR<14 THEN PELOOP +;;.PERET1 + if severalexits=TRUE then peret2 ; already printed message + IF wordsoutput>2 THEN PERET2 + MESSAGE 11 ; ONLY VISIBLE EXIT IS +.PERET2 + GOSUB @OUTWORDnone ; flush bufer + if wanttoprintand=FALSE then peret + message dot + wanttoprintand=FALSE +.PERET + dir=x8 ;*bug fix* 23/2/89 + RETURN +;--- +; Print list of objects in specified position.. +; +;--- +.GETNEXTOBJECT +; RETURN OBJECT=OBJECT FOUND +; SEARCHPOS=ROOM OR CONTAINER WHERE FOUND +; HISEARCHPOS=TYPE OF CONTAINMENT (=0 FOR ROOMS) +; +; BEFORE FIRST CALL, GOSUB INITGETOBJ AND SETUP HI,SEARCHPOS +; AT END OF SEARCH, ALL ZEROS ARE RETURNED +; + X1=MAXOBJECTVISIBLE +;; .GETNEXTOBJX1 + GETNEXT X1 HISEARCHPOS SEARCHPOS OBJECT x2 SEARCHDEPTH +;;.GNORET +.poret + RETURN +;--- +.INITGETOBJ + SEARCHDEPTH=1 + X1=0 + GETNEXT X1 X1 X1 X1 X1 X1 + RETURN +;--- +; MIKE: Where a normal object is the container, you have used: +; "In the wardrobe was some lipstick" for single contents, and +; "In the wardrobe were a jacket and a tie" for plural contents. +; +; However, when a person is a container, these rules don't apply: +; "Gnoah was wearing a jacket" looks ok, but +; "Gnoah were wearing a jacket and a tie" looks pretty stupid. +; "The trolls was wearing lipstick" looks daft, while +; "The trolls were wearing lipstick and perfume" looks ok. +; The changes I have made will only print "were" if the person is +; plural, regardless of how many contents are involved. +; +.printCONTAINMENT + if searchpos=0 then pcret ;>>fixed in gnome (latent bug?) + wanttoprintand=false + X5=1600 ; BASE FOR CONTAINMENT MESSAGES (You can see) + + IF SEARCHPOS<>ACTOR THEN PC1 + X5=1700 ; BASE for 'You are wearing' and 'You are carrying' +.PC1 + ADD X5,HISEARCHPOS ; first half of containment message + MESSAGE X5 + IF HISEARCHPOS=0 THEN PCRET ; DON'T PRINT 'THE object' FOR 'YOU CAN SEE' + X1=SEARCHPOS ; CONTAINER OBJECT NUMBER + GOSUB @printTHEobjectx1 + +;*graham* bug fix + if searchpos>maxnpc then pcnotplural ; object not owned by npc +; object is owned by npc. if npc is plural, then print "They were +; wearing " regardless of how many objects worn. otherwise, +; print "He was wearing " regardless of how many objects worn. + gosub @conjugatex1 + pluraloffset=0 + if result<>5 then pcnotplural ; " was" +; 1600 & 1640 are for single & plural contents. +; 1700 & 1740 are for single & plural containers which are also people. + x5=1700 + add x5,hisearchpos + pluraloffset=30 ; " were" +.pcnotplural +;*graham* + + X1=40 + ADD X5,X1 ; second half of containment message + add x5,pluralOffset + MESSAGE X5 +.PCRET + RETURN +;--- +;--- +; Routines to output a list of words, adding appropriate punctuation. +; Output is delayed, presumably because we don't know what punctuation +; is needed until after deciding to print an item, e.g consider the +; difficulty of printing 'and' before the last entry in a list. They +; only seem to be used when listing objects and exits (see code above). +; +.OUTWORDNONE ; flush any buffered words + WORD1=0 + WORD2=0 +; +.OUTWORD12 + WORD3=0 + WORD4=0 +; +.OUTWORD1234 +; BEFORE CALLING, SET OUTPUTWORD=0. AT THE END OF THE LIST, CALL THIS +; ROUTINE WITH X1=0 AND THE LIST WILL BE FINISHED OFF WITH A FULL STOP. + IF WORD1=0 THEN OWEND +; FIRST OR SECOND WORD - JUST ADD TO BUFFER + add wordsoutput,c1 + X4=OUTPUTWORD + VALUE=WORD1 + GOSUB WRITEOUTBUFFER + VALUE=WORD2 + GOSUB WRITEOUTBUFFER + VALUE=WORD3 + GOSUB WRITEOUTBUFFER + VALUE=WORD4 + GOSUB WRITEOUTBUFFER + OUTPUTWORD=X4 + IF OUTPUTWORD<>24 THEN OWRET +; +;;.OW1 +; THIRD TO SUBSEQUENT WORDS - print out oldest word +; in buffer, and shift the other two down + X4=0 ; index into OUTPUTBUFFER + GOSUB OWPRINT + X1=0 + X2=8 +.OW2 + X3=OUTPUTBUFFER(X2) + OUTPUTBUFFER(X1)=X3 + ADD X1,C1 + ADD X2,C1 + IF X1<16 THEN OW2 + MESSAGE COMMA + OUTPUTWORD=16 +.OWRET + RETURN + +.OWEND +; HAVE RECEIVED THE TERMINATOR + wordsoutput=1 + IF OUTPUTWORD=0 THEN OWRET ; NO WORDS OUTPUT AT ALL +; THERE MUST BE AT LEAST ONE WORD REMAINING IN BUFFER - SO OUTPUT IT + X4=0 ; index into OUTPUTBUFFER + GOSUB OWPRINT + IF OUTPUTWORD=8 THEN OWSTOP ; ONLY ONE WORD OUTPUT - SO THATS IT ! +; MUST HAVE OUTPUTWORD=2, SO 2 OR MORE WORDS OUTPUT. +; THEREFORE WANT TO FINISH OFF WITH 'AND' + MESSAGE SPACEAND + X4=8 ; index into OUTPUTBUFFER + GOSUB OWPRINT +.OWSTOP + OUTPUTWORD=0 + MESSAGE DOT + RETURN + ;--- +.OWPRINT +; Print words by message number starting at outputbuffer(X4) + X3=3 ; words to print +.OWPRINT1 + GOSUB READOUTBUFFER + X1=VALUE + IF OWTYPE=OWOBJECTS THEN @printANobjectX1 + MESSAGE VALUE + SUB X3,C1 + IF X3iam then printverb + m1=132 ; was + if actor=user then @printm1 ;>>late change. + goto printverb +;--- +.printACTOR + x1=actor + goto @printTHEobjectx1 +;--- +.printOBJECTverb + gosub @printTHEobject ; character doing the action +; drop through to printverb... + +.printVERB + x1=verb +; m1printsave=m1 +; if verb=iam then pvam +; goto printverbNoEnding +; m1=verboffset +; add m1,verb +; goto printm1andRestoreM1 + +; depending on OBJECT +; x1=object + +;;.printVERBx1 ; print verb, with appropriate ending for an actor of x1 +;; verb=x1 + m1printsave=m1 + if verb=iam then pvam + goto printverbNoEnding +; m1printsave=m1 +; m1=verb +; if verb=iHAVE then pvhave +; if verb=iAM then pvam +; gosub @printverbnoending +;; now add appropriate ending, or none for USER +; if x1=user then @pvreturn +; m1=579 ; force printing of existing word, without trailing space +; gosub @printM1 +; m1=581 ; verb ending 'es' +; if verb=isearch then pves +; if verb=isetupgo then pves +; if verb=iextinguish then pves +; if verb=ipress then pves +; if verb=idress then pves +; if verb=iscratch then pves +; if verb=icrush then pves +; if verb=idemolish then pves +; if verb=icatch then pves +; m1=580 ; verb ending 's' +;.pves +; goto printM1andrestoreM1 +;--- +;.pvhave +; gosub @conjugatex1 +; if result=you then pvhave1 +; if result=pluralsome then pvhave1 +; m1=iHAS ; has +;.pvhave1 +; goto pvprintM1andrestoreM1 +;--- +.pvam + x1=object + gosub @conjugatex1 + m1=133 ; were +;; if result=you then printm1 + if result=pluralsome then @printm1 + goto PrintVerbNoEnding + +; m1=iIS ; is +;.pvare ; drop through to.. +; +;.pvprintM1andrestoreM1 +; x1=verboffset +; add m1,x1 +; goto @printM1andrestoreM1 + +.printverbnoending + m1=verboffset + add m1,verb + goto @printM1 +; +;------------------- +; +; Now funny verb-handlers +; +;--- +.search + if noun1<>nullobject then @examine +; +;===== +; find ID card in herb garden + if room<>12 then findnothing + gosub @findcard + if result=false then findnothing ; find nothing + return +;;.notsearchherbs ; >> Pete 14/9/89 +.findnothing +;===== +; + m1=2405 ; find nothing special + goto @printM1dot +;--- +.smell + if noun1<>actor then smellnotactor +;;* +; m1=2553 +; if contaminated=true then @printm1dot +;;* + m1=2406 ; you smell wondeful + goto @printM1dot +.smellnotactor + m1=2404 ; smell nothing interesting + goto @printM1dot +;--- +.cheat + cif AllowCheat + if prep=ipdebug then @debugshowstack + if noun1<>230 then resetcheat ; user then resetcheat + if noun2<>231 then resetcheat ; user then resetcheat + if prep<>with then resetcheat + parttochain=constantpartnum + add parttochain,c1 + gosub @calcscore ;***** + valuesave=x4 ;carry score to next part (hopefully!)***** + thispart=0 ;***** + if inumber=3 then @chainparttochain + thispart=constantpartnum ;***** + cheatmode=inumber + message cr + prs "npc stack high water mark=" + print highwater + message cr + goto @done + cend ; allowcheat + +.resetcheat + cif allowcheat + cheatmode=0 + cend ; allowcheat +;;.nicetry ; >> Pete 14/9/89 +;; m1=3110 ; >> Pete 14/9/89 +;; goto @varyerrorm1dot ; >> Pete 14/9/89 +;--- +;--- +.timeoutosrdch +; wait for time x2, return x1=any key entered + gosub @osrdch + if x1<>0 then tooret + sub x2,c1 + if x2<>0 then timeoutosrdch +.tooret +.pvreturn + return +;--- +.hello + if noun1>maxnpc then hello1 + actorsave=actor + actor=noun1 ; person we are speaking to + gosub @npchello + actor=actorsave + return + +.hello1 + m1=2407 + goto @printM1dot +;--- +.initracetrackx1 +; init racetrack no. x1 for ACTOR + add x1,x1 + add x1,startracetracks +; now read hi+low bytes of pointer into noun1,2 + noun1=list5(x1) + add x1,c1 + noun2=list5(x1) +; now set up npc to obey it, if non-zero + if noun1<>0 then initracetrack2 + if noun2=0 then initracetrack3 ; both zero +.initracetrack2 + gosub @setACTORATTRIBUTES + verb=obeyracetrack + prep=0 + gosub @singlepushfifo ; push onto normal command queue + +.initracetrack3 + return +;--- +.CONJUGATEX1 +; depending on the object represented by x1 +; return result=ita,itan,singularsome,he,she,pluralsome, you or the +; x1 preserved, x2 corrupted + result=0 + if x1>maxobject then conjret + result=x1 ; preserve x1 + add x1,x1 + x1=objectstart(x1) +; now extract bits 4:6 + x2=16 + gosub @x1divx2 + x2=8 + gosub @x1modx2 + x2=result ; restore object number (saved in result, above) + + gosub @SpecialConjugate + + result=x1 ; set up result for return to caller + x1=x2 ; restore x1 (i.e. object number) +; now result contains one of the following values: +; 0=ita +; 1=itan +; 2=singularsome +; 3=he +; 4=she +; 5=pluralsome +; 6=you +.conjret + RETURN +;--- +.printANobjectX1 ; for object 'X1', print a object or an object + if wanttoprintand=false then daonotand + goto @printAND ; link onto a previous message + +.daonotand +;; gosub printbody + GOSUB @CONJUGATEX1 + if result<>itan then descnan + m1=22 ; an + gosub @printM1 + goto doobj +.descnan +; if result<>ita then doobj + if result>she then doobj ;>>mike 1/2/88 + if result=singularSome then doobj ;>>mike 8/5/88 + M1=20 ; a_ + gosub @printM1 +.DOOBJ + GOTO DESCOBJX1 +;--- +; Print object; as in 'You can't see SAM' or 'You can't see HIM' +.printTHEobject2 + if wanttoprintand=false then dto2notand + goto @printAND ; link onto a previous message + +.dto2notand + if object>254 then @printthat ; fail-safe code - assumes nullobject=255 + x1=object +; PRINT OUT 'THE ' +; Also, print 'it' if possible + GOSUB @CONJUGATEX1 +; because e.g. 'some takes the object' looks silly +;===== +; special to spook. when referring to user as a secondary object, +; use "me" instead of "I". + if object=user then dontuseI +;===== + IF LASTWORDPRINTED<>X1 THEN DTOXTHE +;===== +.dontuseI +;===== + m2=570 +;***** +; bug fix by graham 16/10/88. see message group 2430 for full details + if actor<>object then pto2notitself + m2=2430 +.pto2notitself +;***** + add m2,result ; it,some etc. + goto @printM2 +;--- +.printTHEobject + x1=object +; +.printTHEobjectx1 ; PRINT OUT 'the ', using 'it' if possible + if wanttoprintand=false then dtonotand + goto @printAND ; link onto a previous message + +.dtonotand + if x1>254 then @printthat ; fail-safe code - assumes nullobject=255 + GOSUB @CONJUGATEX1 + IF RESULT=2 THEN dtoxthe ; prevent some +; because e.g. 'some takes the object' looks silly + IF LASTWORDPRINTED<>X1 THEN DTOXTHE + +;;.dtoprintarticle ; >> Pete 14/9/89 + wanttoprintand=false + m2=560 + add m2,result ; it,some etc. + goto @printM2 + +; +.DTOXTHE + +;; "lancelot" ? +; if result<>6 then doNotUser ;>>L3 +; if TempTitle<>0 then doNotUser +; m2=CurrentRank ; sir/Squire etc. +; x6=x1 +; gosub PrintM2 +; x1=x6 +;.doNotUser + + if result=pluralsome then dtosome +; if result>2 then descobjx1 ; he,she,some,you have no the + if result>she then descobjx1 ; some,you, proper he, prop she have no "the" + +.dtosome + if x1>255 then @printthatdot ; >> Pete 18/9/89 + M2=THE ; because e.g. 'the you' looks pretty daft + gosub @printM2 + goto do2 ; prevent 'the some' +;- +.DESCOBJX1 + if result=singularsome then @dosome + if result<>pluralsome then do2 + +.dosome + gosub @printSOME + +.do2 + LASTWORDPRINTED=X1 + gosub @conjugatex1 + x1=lastwordprinted ; restore object no. from just above + + + m2=OBJECTDESCBASE + ADD m2,X1 + gosub @printM2 +; +;;* +;; add 10 points for each treasure seen +; if x1maxtreasure then notseetreasure +;; treasure has been printed, score if it's in user room +; gosub treasurebeinghandled +;.notseetreasure +;;* +; +.DESCOBJRET + RETURN +;--- +;;* +;; treasure object x1 is being handled. score if user present +;.treasurebeinghandled +; t1=x1 +; t2=x2 +; t3=object ; save parameters +; pos=currentuserroom +; hipos=0 +; object=x1 +; gosub @checkobjectpos +; if result=false then treasurenothere +; x1=t1 ; restore x1 for score offset +; x2=mintreasure +; sub x1,x2 ; start at offet zero +; gosub @addscore20 +;.treasurenothere +; x1=t1 +; x2=t2 +; object=t3 ; restore parameters +; return +;;* +;--- +.WORDS + cif Includepictures + if actor<>user then @npcnotunderstood + if prep=ipoff then @silly +.abswords + SCREEN T ; TURN OFF GRAPHICS SCREEN. THIS COMMENT IS ESSENTIAL + cend ; Includepictures + GOTO @DONE +;--- +.PICTURE + cif Includepictures + if actor<>user then @npcnotunderstood + if prep=ipoff then abswords + SCREEN G C0 ; TURN ON GRAPHICS SCREEN. THIS COMMENT IS ESSENTIAL + LASTPICTURE=0 + cend ; Includepictures + GOTO @printROOM +;--- +.MOVE +; MOVEMENT. +;===== +; Process 'MOVEMENT VERB' + 'LOCATION OBJECT' as 'MOVEMENT VERB' only... +; (E.g. LEAVE SHED simply becomes LEAVE) + if verb=ivIN then doleave + if verb<>ivOUT then notleave +.doleave + object=nullobject + noun1=nullobject +.notleave +;===== + commandfinished=false + gosub @setuproom + DIR=VERB +;;.MOVEDIR + if actor<>user then movenotuser + againverb=dir + +.movenotuser + FROM=ROOM + gosub @getxy ; special for Knight Orc + GOSUB @CHECKEXIT + IF DEST=0 THEN @NOEXIT + +;;.MOVEOK + GOTO @NEWLOCATION +;--- +.userdeathm1 + message m1 + message dot + +.USERDEATH +; user (the player) is dead + GOSUB @SCORE +; +.RESTARTORRESTORE + GOSUB @ABSCANCELINPUT +.ROR1 + MESSAGE 2209 ; type restart or restore +.ror2 + GOSUB DEADCALLVERB + if value=nullvalue then ror2 +; if get back here, option failed + GOTO ROR1 +;--- +.DEADCALLVERB + SUPRESSCHECKING=TRUE + NOMOREINPUT=FALSE + GOSUB @GETNEXTWORD + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + dead=true + cif Includeoops + if value=iramsave then @ramsave ; checks for ramload as well. + cend ; Includeoops + IF VALUE=IRESTORE THEN @DORESTORE + dead=false + valuesave=lastpartscore ;re-init lastpart score after restart ;***** + IF VALUE=IQUIT THEN @initall ;>>fixed in Gnome - was STARTGAME + cif Includeoops + IF VALUE=IOOPS THEN @OOPS + cend ; Includeoops + if eol=false then deadcallverb + RETURN +; +;--- +.QUIT + MESSAGE 2200 ; really restart ? + GOSUB @YESORNO + IF RESULT=FALSE THEN @SAVERET +.QUITPLAYAGAIN + GOSUB @ABSCANCELINPUT + MESSAGE CR + valuesave=lastpartscore ;re-init lastpart score after restart ;***** + GOTO @initall ; >>fixed in Gnome - STARTGAME +;--- +.EXAMINE + noun2=nullobject ; to avoid confusing daa. + if actor<>user then @printactoractiondot + IF NOUN1user then @npcnotunderstood + SEARCHPOS=ACTOR + HISEARCHPOS=NONSPECIFIC + GOSUB @PRINTOBJECTS +; IF TOTALOBJECTFOUND<>0 THEN INVENTRET + if TotalObjectsPrinted<>0 then InventRet +; Nothing found, so print appropriate null message + MESSAGE 2020 ; nothing carried +.INVENTRET +.examret +.doneret + RETURN +;--- +; +.printOBJECTS +; GO THROUGH CURRENT OBJECT POSITION LIST, +; AND DISPLAY ALL THE OBJECTS AT (HISEARCHPOS,SEARCHPOS) + OWTYPE=OWOBJECTS + GOSUB @INITGETOBJ + TOTALObjectsPrinted=0 + wordsoutput=1 + printingobjects=true +; numobjectfound=0 + CurrentObjectsPrinted=0 + LastCurrentpos=0 + lastHicurrentpos=0 +.PO1 + GOSUB @GETNEXTOBJECT + IF OBJECT>MAXOBJECTVISIBLE THEN PO1 + IF OBJECT=0 THEN POEND + if searchpos=0 then poend ;>>fixed in gnome (latent bug) + GOSUB @CHECKIFOBVIOUS + IF OBVIOUS=FALSE THEN PO3 + if object=user then po3 + x1=hicurrentpos(user) + if x1=0 then po1notInContainer +; don't describe container of user... + x1=currentpos(user) + if x1=object then po3 +.po1NotInContainer + + x1=hicurrentpos(object) + x2=currentpos(object) + if x1<>LastHicurrentpos then popc + if x2=lastcurrentpos then po2 +.popc +; don't print containment until either two contents are found, +; or we know only a single container is present. + if CurrentObjectsPrinted<>1 then popc1 + gosub DelayedPrintContainment +.popc1 + LastHicurrentpos=x1 + LastCurrentpos=x2 + CurrentObjectsPrinted=0 + GOSUB @OUTWORDNONE ; output any buffered words +; GOSUB PRINTCONTAINMENT ; PRINT CONTAINER ON FIRST OBJECT FOUND ONLY + SaveHiSearchpos=hisearchpos + SaveSearchpos=searchpos +.PO2 + add TotalObjectsPrinted,c1 + add currentObjectsPrinted,c1 + if currentObjectsPrinted<>2 then po2a +; multiple objects with same containment type + pluralOffset=30 + GOSUB @PRINTCONTAINMENT ; PRINT CONTAINER ON FIRST OBJECT FOUND ONLY + pluralOffset=0 + +.po2a + WORD1=OBJECT + WORD2=0 + GOSUB @OUTWORD12 ; Output object name (delayed effect) + +.PO3 + goto po1 + +.poend + if currentObjectsPrinted<>1 then poend1 +; have got to end of list, and haven't printed last +; object because we didn't know if it would be the only +; object with its containment type + gosub DelayedPrintContainment +.poend1 + printingobjects=false + gosub @outwordnone ; output any buffered words + if wanttoprintand=false then @poret + goto @printDOT +;--- +.delayedPrintContainment +; save (hi)searchpos, restore old hi(searchpos) for object printed, +; and print it! + x1=searchpos + x2=hisearchpos + searchpos=savesearchpos + hisearchpos=savehisearchpos + savesearchpos=x1 + savehisearchpos=x2 + objectsave=object + gosub @PrintContainment ; only a single object in the last position + searchpos=savesearchpos + hisearchpos=savehisearchpos + object=objectsave + x1=hicurrentpos(object) + x2=currentpos(object) + return +;---- +.DONE + if actor<>user then @doneret ; no confirmation + M1=2153 ; done + goto @printM1dot +;--- +.WEAR + X1=HICURRENTPOS(NOUN1) + IF X1<>WORN THEN WEAR1 + X1=CURRENTPOS(NOUN1) + IF X1<>ACTOR THEN WEAR1 + goto @printthatdot +.WEAR1 + IF PREP<>0 THEN CANTSEEWHERE + POS=ACTOR + HIPOS=WORN + GOTO @MOVEOBJECT +;--- +.DROP +; DROP prep is filtered off by CONVERTVERB + verb=idrop ; needed because this called from THROW as well + pos=currentpos(actor) ; POS=ROOM + hipos=hicurrentpos(actor) ; HIPOS=0 + GOTO @MOVEOBJECT +;--- +.CANTSEEWHAT + moreinfoexpected=true + M1=2132 ; WHAT? + goto csw1 +;--- +.CANTSEEWHERE + moreinfoexpected=true + M1=2133 ; WHERE? +.csw1 + gosub @nointerestm1 + goto @cancelinput +;--- +.CHECKIFCONTAINED +; trying to put OBJECT in position HIPOS,POS +; if this is a container, remove any possible loopy +; connections between the two containers which might crash the game + IF HIPOS=0 THEN CICRET +; is POS contained by OBJECT ? + X4=POS +.CIC1 + X1=HICURRENTPOS(X4) + IF X1=0 THEN CICRET + X3=X4 ; preserve latest contents for use below if necessary + X4=CURRENTPOS(X4) + IF X4<>OBJECT THEN CIC1 +; yep, so what do we do now ? +; I think we can be a bit clever - remove the connection +; and tell the ACTOR what we're doing +; sever the link between X3 and X4 +; (where X3 is the contents) +; X3 has to go the the immediate position of X4 +; (we know by now that OBJECT is moveable) + X1=CURRENTPOS(OBJECT) + CURRENTPOS(X3)=X1 + X1=HICURRENTPOS(OBJECT) + HICURRENTPOS(X3)=X1 + return +;--- +.INITOBJECTS + GOSUB @INITOOPS + OBJECT=0 +.INITOBJ2 + GOSUB @INITANOBJECT + ADD OBJECT,C1 + IF OBJECT32 THEN INITOBJ4 + OBJECTTABLE(X1)=C0 + LINPUT(X1)=C0 +.INITOBJ4 + ADD X1,C1 + IF X1 short wait + searchtype=preptype + gosub @checktype + if value<>nullvalue then pwprep + searchtype=numbtype + gosub @checktype + if value=0 then @dontunderstand + goto pwwaitforperiod + +.pwprep + +.pwNextWord + if eol=true then pwdefaultwait + gosub @getnextword + +; wait for period? + searchtype=numbtype + gosub @checktype +;; if value=nullvalue then pwnotperiod ;bug fix *graham* +.pwwaitforperiod + if value=nullvalue then pwnotperiod ;* + verb=iwaitforperiod + noun1=value + sub noun1,c1 + if value>245 then pwcantwait +; forget about 'minutes' if the user tagged it on the end + gosub @getnextword + searchtype=nountype + gosub @checktype + if value=iminutes then pwend + gosub @goback ; leave for later @parsing + goto pwend ;>>gnome + +.pwnotperiod +; wait for person? + searchtype=nountype + gosub @checktype + if value>mingarbage then pwNextWord ;>>gnome - added + if valuemaxobject then pwnotperson ;>>changed for gnome +;;.pwHorn ; >> Pete 14/9/89 + verb=iwaitforperson + noun1=value + goto pwend + +.pwnotperson + +.pwend +; now verb,noun1,noun2 are set up for the wait +; the routines setupwaitforperiod etc. +; will push them on. +; It is done in this slightly toruous way +; so parseinput always has the same i/o - it +; helps with giving npcs orders as well (which push things +; onto the stack in their own, individual way) +.pwdefaultwait ; >>gnome - now a single wait only + M1=2155 ; time passes + goto @nointerestm1 +;>>gnome return ; do rest of parsing +;--- +;.pwnotperiod +;.pwuntiltime +;; wait until time? +;; read 24 hour clock +; searchtype=numbtype +; gosub checktype +; if value=nullvalue then badtime +; noun1=value ; hour +; if noun1>24 then badtime +; +; gosub getnextword +; searchtype=ascitype +; gosub checktype +; if value=nullvalue then badtime +; +; gosub getnextword +; searchtype=numbtype +; gosub checktype +; if value=nullvalue then badtime +; noun2=value ; minute +; +; if noun2>59 then badtime +; verb=iwaituntiltime +; goto pwend + +.pwcantwait + m1=2215 ; you could be waiting a long time + +;;.pwerrorm1dot ; >> Pete 14/9/89 + gosub @errorm1dot + goto @cancelinput +;--- +.setupwaituntiltime +.setupwaitforperiod +.setupwaitforperson + gosub @singlepushfifo + executeprocessed=false ; nothing useful done yet + return +;--- +.gdwaitforperson +; noun1 is person to wait for +; this command is always executed off the command queue + verb=0 ; fool specialcheckifpresent + object=noun1 + gosub @checkifpresent + if result=true then gdwaitend ; it's arrived + goto gdstillwaiting +;--- +.gdwaitforperiod +; noun1 is period to wait for +; this command is always executed off the command queue + if noun1=0 then @intelligentpop ; time up +; decrement period on stack + gosub @npcgetcurrent + add x1,c3 ; find noun1 offset + x2=npcstack(x1) + sub x2,c1 + if x2>negative then gdwaitend ; time up + npcstack(x1)=x2 +.gdstillwaiting +;>>L2 x1=attentionoffset +;>>L2 add x1,actorattributes +;>>l2 x1=npccurrent(x1) +;>>l2 if x1<>0 then @handleinterruption + +;;.gdwfpret + return +;--- +;.gdwaituntiltime +;; this command is always executed from the command queue +; if noun1>hour then gdstillwaiting ; still waiting +; if noun2>minute then gdstillwaiting ; still waiting +; if actor<>user then gdwaitend +;; gosub displaytime +;; have reached target time +.gdwaitend + executeprocessed=false ; nothing useful done + goto @intelligentpop +;--- +.SHORTWAIT +; wait for a single turn + executeprocessed=true ; make it take time + return ;>>gnome +;>>gnome M1=2155 ; time passes +;>>gnome goto @nointerestm1 +;--- +.YESORNO + IF ACTOR<>USER THEN YONNO ; NPCs always decline to take risks + NOMOREINPUT=FALSE +; + SUPRESSCHECKING=TRUE + GOSUB @GETNEXTWORD +.YON1 + IF EOL=TRUE THEN @YESORNO + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE=ivYES THEN yonYES + IF VALUE=iWHY THEN yonYES + IF VALUE=ivNO THEN yonNO + IF VALUE=iNORTH THEN yonNO + + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + cif Includeoops + IF VALUE=iOOPS THEN @OOPS + IF VALUE=iRAMLOAD THEN @RAMLOAD + IF VALUE<>iRAMSAVE THEN YONNRAMSAVE + GOSUB @GETNEXTWORD + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE=iRAMLOAD THEN @RAMLOAD + GOTO YON1 + cend ; Includeoops + +.YONNRAMSAVE +; + MESSAGE 2160 ; yes or no please + GOSUB @ABSCANCELINPUT + GOTO @YESORNO +.YONYES + RESULT=TRUE + RETURN +.YONNO + RESULT=FALSE + RETURN +;--- +.INITANOBJECT +; Note these are the other way round to Worm + X4=OBJECT + ADD X4,X4 + X1=OBJECTSTART(X4) + x2=16 + GOSUB @x1modx2 ; remove top four @bits + HICURRENTPOS(OBJECT)=X1 + + ADD X4,C1 + X1=OBJECTSTART(X4) + CURRENTPOS(OBJECT)=X1 + RETURN +;--- +;;.POSSLOOP; >> Pete 14/9/89 +; move everything contained by POS in way HIPOS to DEST,HIDEST +; if HIDEST=NONSPECIFC, then leave HICURRENTPOS alone +;; OBJECT=0; >> Pete 14/9/89 +;; x3=0 ; returns x3 as the number of objects moved.; >> Pete 14/9/89 +;;.POSS1; >> Pete 14/9/89 +;; X1=CURRENTPOS(OBJECT); >> Pete 14/9/89 +;; IF X1<>POS THEN POSS2; >> Pete 14/9/89 +;; if hipos=nonspecific then poss1a; >> Pete 14/9/89 +;; X2=HICURRENTPOS(OBJECT); >> Pete 14/9/89 +;; if x2<>hipos then poss2; >> Pete 14/9/89 +;;.poss1a; >> Pete 14/9/89 +;; CURRENTPOS(OBJECT)=DEST; >> Pete 14/9/89 +;; IF HIDEST=NONSPECIFIC THEN POSS2; >> Pete 14/9/89 +;; HICURRENTPOS(OBJECT)=HIDEST; >> Pete 14/9/89 +;; add x3,c1; >> Pete 14/9/89 +;;.POSS2; >> Pete 14/9/89 +;; ADD OBJECT,C1; >> Pete 14/9/89 +;; IF OBJECT> Pete 14/9/89 +;; RETURN; >> Pete 14/9/89 +;---- +.GETME + cif allowcheat + if cheatmode=false then @nicetry + if noun1=nullobject then @getfromuser + currentpos(noun1)=room + hicurrentpos(noun1)=c0 + goto @getfromuser + cend ; allowcheat +; +.VARYERRORM1DOT + gosub @getvarym1 + goto errorm1dot +; +; Many error messages only really make sense when the user's actions +; provoke them, e.g because of their wording. Print something in this +; case, otherwise just print the npc is in difficulty.. +.ERRORM1DOT + commandfinished=true + if actor=user then @printM1dot + goto errorm1NU ; goto @npcnotunderstood +; +.ERRORM1 + commandfinished=true + if actor=user then @printM1 +.errorm1NU +;; if processingSay=true then SayDoesntUnderstand ;>>mike 29/4/88 + gosub @LinkOnFifoCommandQueue ;>>mike 29/4/88 + goto @npcnotunderstood +; +; Print something which is of no interest if an NPC does it, +; but the user wants to know.. +; +.NOINTERESTM1 + if actor=user then @printM1 + return +;--- +.actorcantverbnoun1dot + gosub actorcantverbnoun1 + goto printdot +; +.actorcantverbnoun1 + commandfinished=true ; serious error occurred - abort gd commands etc. + executeprocessed=false ; nothing happened, because error occurred + fatalerror=true ;>>mike 9/2/88 + if room<>currentuserroom then reporterror ;&& + fatalerror=2 ;&& +.reporterror + gosub printactorcantverb + if noun1>255 then @printthat + object=noun1 + goto @printTHEobject2 +; +.printACTORcantVERB + gosub printactorcant + m1=27 ; taken + if verb=itake then printm1 + m1=26 ; worn + if verb=iwear then printm1 + goto @printverbnoending +; +.printACTORcant + gosub @printACTOR + m1printsave=m1 + m1=2044 ; can't + goto printM1andrestoreM1 +; +; Print 'That', using standard routines.. +.printTHATdot + gosub printthat + goto printdot +; +.printTHAT + m1printsave=m1 + m1=2046 ; 'that' + goto printM1andrestoreM1 +; +.printSOME + m1printsave=m1 + m1=some ; 'that' + goto printM1andrestoreM1 +;--- +; Double message output routines (a pair of messages with a parameter).. +; +;;.printM1theobjectx1NEXTdot ; e.g 'Unfortunately, the X1 is too high up.' ; >> Pete 14/9/89 +;; gosub printM1 ; >> Pete 14/9/89 +;; gosub @printTHEobjectx1 ; >> Pete 14/9/89 +;; add m1,c1 ; >> Pete 14/9/89 +;; goto printM1dot ; >> Pete 14/9/89 +;--- +; Standard message output routines... +; +.ActorM1Dot + gosub @PrintActor + goto PrintM1Dot +; +.printM1inputNEXTdot ; e.g 'You don't need "WORD" in this game.' + gosub printM1 + add m1,c1 +; +;;.PRINTinputM1dot + printinput ; entered by user +; +.printM1dot + gosub printM1 +; +.printDOT + wanttoprintand=false + m1printsave=m1 + m1=dot + goto printM1andrestoreM1 +;--- +.printAND + wanttoprintand=false; don't need another 'and' + m1printsave=m1 + m1=and + goto printM1andrestoreM1 +;--- +.printM2 + m1printsave=m1 + m1=m2 + goto @printM1andrestoreM1 +; +;--- +.printM1andrestoreM1 + gosub printM1 + m1=m1printsave + return +; +.printM1 +; print message m1 to user(s) if at ROOM +; must not alter RESULT or PROCESSED! + if forceprinting=true then printM1go + if currentuserroom<>room then @printM1ret + +.forcem1 +.printM1go + + cif AllowCheat + if cheatmode=false then printm1go1 + if m1>4999 then showm1 + if m1<2770 then printm1go1 + if m1>2800 then printm1go1 +.showm1 + prs "[" + print m1 + prs "]" + .printm1go1 +cend ; allowcheat + + message M1 + +; comments from PET? + if m1<2500 then @PmNotSpecial1 + if m1>3000 then PmNotSpecial1 +; save x1,x2,x3 + t1=x1 + t2=x2 + t3=x3 + x1=currentpos(joe) +; can't use currentuserroom, since we may be hiding in a container + x2=currentpos(user) + if x1<>x2 then pmnotspecial + x1=hicurrentpos(joe) + x2=hicurrentpos(user) + if x1<>x2 then pmnotspecial +; scan list8 for matches with the message we've just printed + x3=2500 + sub m1,x3 + x1=0 ; pointer to start of table +.PmSpecial0a +; if M1>249, find the first "extend byte(255)" + if m1<250 then PmSpecial1 ; start scan +; written for speed (and therefore not merged with PmSpecial1) + x1=0 +.PmSpecial0b + x2=list8(x1) + add x1,c2 ; step to next entry... + if x2=0 then PmNotSpecial + if x2<>255 then PmSpecial0b +; subtract about 250 from number to find + sub x1,c1 + x2=list8(x1) ; amount to subtract + add x1,c1 ; go back to align properly + sub m1,x2 + goto PmSpecial0a ; check we're within bounds now... + +.PmSpecial1 +; start scanning for which response to print. + x2=list8(x1) + if x2=0 then PmNotSpecial +; +; *bug fix* Graham 26/12/88 +; Pet comments for trigger messages 2750-2850 were repeated for +; 2500-2749 if the table pointer had passed the "skip" byte (255), +; BUT the trigger message was still between 2500 and 2749. + if x2<>255 then PmS2 + if m1<250 then PmNotSpecial +.PmS2 +; + if x2=m1 then PmSpecial + add x1,c2 + goto PmSpecial1 + +.PmSpecial + add x1,c1 + x1=list8(x1) ; get offset of galahad's remark + GalahadComment=2850 + add GalahadComment,x1 + message galahadcomment + +.PmNotSpecial +; restore x1,x2,x3 + x1=t1 + x2=t2 + x3=t3 +.pmnotspecial1 +.printM1ret + return +;--- +; Output one of 'ALTERNATIVES' messages, starting at 'M1' +.VARYMESSAGEDOT + GOSUB VARYMESSAGE + GOTO @printDOT +; +.VARYMESSAGE + M1printSAVE=M1 + GOSUB GETVARYM1 + goto @printM1andrestoreM1 +; +; Add number between 0 and ALTERNATIVES-1 to M1 +.GETVARYM1 + ADD CURRENTMESSAGE,C1 + IF CURRENTMESSAGEnegative then x1divret + add x1,c1 + goto x1divx2a +.x1divret +.dividebyzero +.x1modx2ret +;;.x1timesx2ret ; >> Pete 14/9/89 + return +;-------------------------------------------------------- +;;.isobjectcarried ; >> Pete 14/9/89 +;; pos=actor ; >> Pete 14/9/89 +;; hipos=nonspecific ; >> Pete 14/9/89 +;; goto @checkobjectpos ; >> Pete 14/9/89 +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/aparse.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/aparse.txt new file mode 100644 index 0000000..08bd4ee --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/aparse.txt @@ -0,0 +1,1555 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; taken from Lancelot version. +; +; APARSE.TXT, parser for the game. (The term 'parser' is used fairly +; loosely, by the way, to include almost all input analysis.) +; +; +; >>gnome2 - consider bug fix in CHECKNOUN0 to do with ADJECTIVES +; and corresponding fix in .PIPREP +; +; >>Lancelot - small change to adjective handling, validation +; of which npc to talk to >>mike 14/2/88 +; +; Mike 5/6/88 - IF OBJECT>MAXOBJECT check added to CHECKOBJECTPOS +; and GETOBJECTPOS +; to prevent looping if funny containment loops encountered. +; +; Mike 5/6/88 - change to SETUPROOM to prevent possible loops +; +const +;; anything=254 ; >> Pete 14/9/89 +;; matchwith=253 ; >> Pete 14/9/89 + +VAR +;; CSAVEHISEARCHPOS ; >> Pete 14/9/89 + EVENTUALPREP + parseerrors skiponerror +;; tableptr ; >> Pete 14/9/89 +;; verbend ; >> Pete 14/9/89 +;; noun1lower noun1upper ; >> Pete 14/9/89 + cvsaveverb cvsavenoun1 cvsavenoun2 cvsaveprep cvsavecurrentobject + cvsavehisearchpos cvsavesearchpos + gdnoun1pos noun1isgd gdmaxobject + gperror + lastpossibleverb nextverb + gdnouncalled +; +; Main entry point of game (though control is immediately transferred +; to AVERB.TXT).. +; +BEGIN + goto @startgame +;--- +; +; something of great importance has happened - ignore/remove +; rest of input from line +.CANCELINPUT + skiponerror=TRUE + GOSUB @ABSCANCELINPUT + skiponerror=FALSE + GOTO @MAINLOOP ; in NPC.TXT +; +; Get next command from the keyboard, prompting the player if necessary, +; and parse it.. +.GETCOMMAND + SAYRESPONSE=FALSE +; before printing 'What now?', check if any more commands waiting + IF NOMOREINPUT=FALSE THEN GC3 ; still something left on line + if nextverb<>0 then gc3 ; a prep which might be a verb is pending + NOMOREINPUT=FALSE ; disable flag which is set on getting 0 from input + IF SOMETHINGPROCESSED=FALSE THEN GC3 ; prevent CR producing 'WHAT NOW' + + add totalmoves,c1 + if totalmoves<>10 then gc1 + message 15 ; we won't bother with what now again + +.gc1 + M1=17 ; WHAT NOW ?% + if totalmoves<10 then gc2 + m1=16 ; ">" +.gc2 + message m1 + RANDOM X1 ; kick random number generator + SOMETHINGPROCESSED=FALSE +; actor=USER + gosub @setuproom +.gc3 + GOSUB @PARSEINPUT + + cif allowcheat + if cheatmode<>2 then gcNotCheat + prs " from parseinput: user verb=" + print verb + prs " prep=" + print prep + prs " noun1=" + print noun1 + prs " noun2=" + print noun2 +.gcNotCheat + cend ; allowcheat + + IF VERB=0 then GETCOMMAND + RETURN +;--- +; Given a parsed command, this handles multiple nouns (e.g "EVERYTHING") +; by repeatedly calling PMCALLVERB. It is only relevant to the user, +; other actors use "GDNOUN1". Command remains within PRESENTMULTIPLE +; until all the resulting actions have been carried out (e.g a lot of +; objects have been taken, if "TAKE ALL" was the input). +.PRESENTMULTIPLE +; GIVEN VERB,PREP,NOUN2 AND OBJECTTABLE, +; CQLL VERB ONCE FOB EACH OBJECT SPUCIFIED BY OBJECDTABLE +; EVERYTXING, IT ETC. ARE HANDLED HERE +; Work down from top so static orjects, containebs come first + moreinfoexpected=FALSE + SAYRESPONSE=TRUE + MESSAGE CR + DIR=0 ; prevent some SPECIALMOVES being triggered + GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS +; +; ??? as a kludge - test here to see if NOUN2 is present + IF NOUN2=NULLOBJECT THEN PM1 + OBJECT=NOUN2 + if objectmaxomni then noun2notomni ;* + if object<>generaldoor then pm1 ;* + if door=true then pm1 ; door is pseudo-omni present * +.noun2notomni ;* + if verb=icheat then pm1 + GOSUB @CHECKIFPRESENT + IF RESULT=FALSE THEN @objectnothere + +.PM1 + IF EVERYTHING<>0 THEN PMEVERYTHING +; handle individual objects + if actor<>user then @callverb ; a queued command + if verb=iwaitforperiod then pmcallverb ; noun1,2 already set up + if verb=iwaitforperson then pmcallverb ; ditto + if verb=iwaituntiltime then pmcallverb ; ditto + if verb=isetupgo then pmcallverb + if verb=isetuprun then pmcallverb + if verb=isetupfind then pmcallverb +;; if verb=ikill then pmcallverb ;*graham* bug fix. follow non-existant obj. ; >> Pete 13/6/89 + if verb=ifollow then pmcallverb ;*graham* + + CURRENTOBJECT=otbaseplus1 ; pointer into OBJECTTABLE +.PMSINGLE1 + OBJECT=OBJECTTABLE(CURRENTOBJECT) + IF OBJECT=0 THEN PMSINGLEEND + + GOSUB @CHECKIFACCESSIBLE + IF RESULT=TRUE THEN PMSINGLE2 +; if verb=ikill then pmsingle2 ;*graham* +; if verb=ifollow then pmsingle2 ;*graham* + GOSUB @OBJECTNOTHERE + HAVECALLEDVERB=TRUE + GOTO PMSINGLENEXT +.PMSINGLE2 + if verbstocall<>1 then pmsingle3 + if examinemarked=true then pmsingle3 ;*****graham 12/9/88* noun was + ;marked in exam mess! +; so 'EXAMINE OBJECT' can reply 'it is' etc. +; wheras 'examine obj,obj' prints the names + lastwordprinted=object + +.pmsingle3 + NOUN1=OBJECT + HAVECALLEDVERB=TRUE + GOSUB PMCALLVERB + MESSAGE CR +.PMSINGLENEXT + ADD CURRENTOBJECT,C1 + GOTO PMSINGLE1 + +.PMSINGLEEND + IF HAVECALLEDVERB=TRUE THEN PMSINGLERET + object=nullobject + NOUN1=NULLOBJECT + GOto PMCALLVERB +;--- +.PMEVERYTHING + noun1=everything ; collective noun + havecalledverb=FALSE + goto @pmsetupgdaccess +;--- +.pmcallverb +; only used by USER + DestToDescribeExitsIn=0 + lastverbvalid=TRUE + cvsavehisearchpos=hisearchpos + cvsavesearchpos=searchpos + cvsaveverb=verb + cvsavenoun1=noun1 + cvsavenoun2=noun2 + cvsaveprep=prep + cvsavecurrentobject=currentobject +; +; act on one object, on behalf of user.. + gosub @initfifo + gosub callverb + gosub @linkonfifocommandqueue +; +; let lots of NPCs get a look in, and do all sorts of things.. + gosub @npcactions +; + gosub @setupuser + hisearchpos=cvsavehisearchpos + searchpos=cvsavesearchpos + verb=cvsaveverb + noun1=cvsavenoun1 + noun2=cvsavenoun2 + prep=cvsaveprep + currentobject=cvsavecurrentobject +.pmsingleret + return +;--- +; Carry out the action for a verb, doing something +.CALLVERB +; GIVEN VERB,PREP,NOUN1,NOUN2, +; DO THE JUMP-TABLE INDEXING ON THE VERB +; + cif allowcheat + if cheatmode<>2 then callverbnodebug + gosub @debugshowcommand +.callverbnodebug + cend ; allowcheat + + if actor<>user then cvnotuser + message cr + +.cvnotuser +;>>removed by L2 erroroccurred=FALSE ; not yet, anyhow! +.cv2 +; (OBJECT=NOUN2) + object=noun2 ;>>mike 5/4/88 + GOSUB @OBJECTTRIGGER + IF processed=TRUE THEN @CVRET + + OBJECT=NOUN1 + HISEARCHPOS=NONSPECIFIC + GOSUB @FUNNIES + IF processed=TRUE THEN CVRET + GOSUB @OBJECTTRIGGER ; TRIGGERS FOR ANY VERB ON OBJECT + IF processed=TRUE THEN CVRET ; FLAG NOT RESET, SO COMMAND PROCESSED +; +; Do jump-table type indexing +; Flow will return to PRESENTMULTIPLE when the verb has finished +.abscallverb + object=noun1 + if verb>maxECHO then TRANSverb + if verb>minECHOminus1 then ECHOverb + if verb>maxintransitive then TRANSverb + jump intranstable verb +.EchoVerbRet + return ; just in case! +;--- +.ECHOverb + gosub @SpecialEchoVerb + if result<>false then EchoVerbRet + if verbNULLOBJECT THEN CVGOTNOUN +;*bug fix* + if verb<>itake then notpickup + if prep<>up then notpickup + if noun2=nullobject then notpickup +; allow PICK UP NOUN2 (i.e. phone in gnome2.3) + noun1=noun2 + object=noun1 + prep=0 ; treat as TAKE NOUN1 + goto cvgotnoun +.notpickup +;* +;===== +; code to handle REACH THROUGH NOUN2, where NOUN1=NULLOBJECT + if verb<>ipush then TVnoOBJECTerror + noun1=noun2 + object=noun2 + noun2=nullobject + prep=0 ; convert to PUSH NOUN1 + if noun1<>nullobject then cvgotnoun +;===== +.TVnoOBJECTerror + M1=3130 ; must supply an object group + GOTO @PARSEvaryERROR +; +.CVGOTNOUN + if verb>maxTRANSITIVE then noverb + x1=verb + jump transtable x1 +; assumes transtable and intranstable +; are contiguous +.cvret + return +;--- +.NOverb + m1=2036 ; don't understand verb + goto @printM1dot +;--- +.intranstable +.transtable + data @move,@move,@move,@move ; 0-3 + data @move,@move,@move,@move ; 4-7 + data @move,@move,@move,@move ; 8-11 + data @move,@move,@move,@move ; 12-15 + data @noverb,@noverb,@noverb,@noverb ;16-19 + data @inventory,@noverb,@printroom,@inventory ; 20-23 + data @quit,@restore,@save,@ramsave ; 24-27 + data @ramload,@score,@verbose,@brief ; 28-31 + data @noverb,@ring ; (32=parsewait called elsewhere) + data @switchon,@switchoff ; 34-35 + data @picture,@words,@hello,@oops ; 36-39 + data @attack,@sign,@search,@dig ; 40-43 + data @smell,@knock,@stand,@lie ; 44-47 + data @sit,@hide,@say,@noverb ; 48-51 + data @getme,@fill,@setupgdrun,@Make ; 52-55 + data @noverb,@eat,@setupgdgo,@commandstop ; 56-59 + data @drink,@noverb,@exits,@concentrate ; 60-63 == concentrate == + data @dial,@noverb,@noverb,@noverb ; 64-67 == dial == + data @noverb,@noverb,@noverb ; 68-70 + data @noverb,@noverb,@shout,@noverb,@wave ; 71-75 + data @noverb,@noverb,@noverb,@noverb ; 76-79 + data @noverb,@noverb,@noverb,@noverb,@noverb,@noverb ; 80-85 + data @noverb,@noverb,@noverb,@setupwaitforperson ; 86-89 + data @setupwaitforperiod,@setupwaituntiltime,@shortwait ; 90-92 + data @attack,@noverb ; 93-94 ;**attack --> kill** + data @noverb,@setupgdgo,@setupgdrun,@cheat,@noverb ; 95-99 +; + data @examine,@cut,@wake,@noverb ; 100-103 + data @get,@take,@wear,@drop ; 104-107 + data @put,@remove,@throw,@give ; 108-111 + data @ask,@follow,@open,@snap ; 112-115 + data @hold,@plant,@push,@fasten ; 116-119 >>special to gnome2 (hold) + data @unfasten,@pull,@freeze,@ignite ; 120-123 == freeze ignite == + data @noverb,@noverb,@insert,@pick ; 124-127 + data @noverb,@noverb,@noverb,@noverb ; 128-131 + data @collect,@noverb,@become,@noverb ; 132-135 + data @returnobject,@noverb ; 136,@137 + data @setupfind,@gdfind ; 138,@139 + data @close,@noverb,@tell,@noverb ; 140-143 + data @noverb,@noverb,@noverb,@noverb ; 144-147 + data @noverb,@noverb,@noverb,@noverb ; 148-151 + data @noverb,@noverb,@noverb,@noverb ; 152-155 + data @noverb,@noverb,@noverb,@noverb ; 156-159 + data @attack,@attack,@attack,@attack ; 160-163 + data @attack,@attack,@attack,@attack ; 164-167 + data @attack,@attack,@attack,@attack ; 168-171 + data @attack,@attack,@attack,@attack ; 172-175 + data @attack,@attack,@attack,@attack ; 176-179 +; +;--- +.TOOCOMPLEX + M1=2039 ; sentence is too complex + goto @printM1dot +;--- +.CHECKIFACCESSIBLE +; return RESULT=TRUE if OBJECT is accessible to VERB +; objects must be present in way HISEARCHPOS + result=179 ; dummy value + gosub @specialcheckifaccessible + if result<>179 then ciaret ; changed by routine, so accept verdict + +;; .CIANCAST + IF OBJECTMAXOMNI THEN CIANOTOMNI ; it, except etc. + GOTO @RETURNTRUE + +.CIANOTOMNI + IF OBJECT>MAXOBJECT THEN @CHECKIFSCENERYHERE + IF HISEARCHPOS<>NONSPECIFIC THEN CIANOTNS + POS=ROOM + HIPOS=0 + GOSUB @CHECKOBJECTPOS + IF RESULT=FALSE THEN CIAISITOWNED +.CIAHAVECHECKED +.ciaret + return + +.CIANOTNS + IF HISEARCHPOS<>NOUNCARRIED THEN CIANOTCARRIED +.CIAISITOWNED + POS=actor + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS + GOTO CIAHAVECHECKED + +.CIANOTCARRIED + POS=actor + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS ; looking on ground only. if carried, can't be +; X1=RESULT +; RESULT=FALSE + IF RESULT=TRUE THEN @RETURNFALSE ; CIAHAVECHECKED + POS=ROOM + HIPOS=0 + gosub @CHECKOBJECTPOS + goto ciahavechecked +;--- +.PARSENOTKNOWN +; word not recognized at all + IF ACTOR<>USER THEN @NPCNOTUNDERSTOOD + m1=2000 ; you don't need to use the word/to finish the game + gosub @printM1inputNEXTdot + GOTO @CANCELINPUT +;--- +.PARSENOVERB + IF PROCESSINGSAY=TRUE THEN @SAYNPCLOOP ; no verb, so continue scanning + if actor<>user then @npcnotunderstood + m1=2016 ; can't find a verb there! + goto parseerror + +.SECONDPREP +.CANTUSEHERE + IF ACTOR<>USER THEN @NPCNOTUNDERSTOOD + m1=2003 ; can't use/here + gosub @printM1inputNEXTdot + m1=0 ; so parseerror won't print anything + goto parseerror +;--- +.toomanynouns + if actor<>user then @npcnotunderstood + m1=2018 ; too many nouns in that sentence + goto parseerror +;--- +.PARSEvaryERROR + GOSUB @GETvaryM1 + GOTO PARSEERROR + +.DONTUNDERSTAND +; general error message when the parsing has broken +; down for some reason + M1=2010 +; drop through to PARSEERROR +;- +.PARSEERROR + IF ACTOR<>USER THEN @NPCNOTUNDERSTOOD + nextverb=0 + lastpossibleverb=0 + if skiponerror=TRUE then @cancelinput + if m1=0 then parseerror1 + gosub @printM1dot +.parseerror1 + add parseerrors,c1 + if parseerrors<>5 then parseerror2 + m1=2014 ; apologies for not understanding user's gibberish + gosub @printM1dot +.parseerror2 + GOTO @CANCELINPUT +;--- +.OBJECTNOTHERE +; THE OBJECT IS NOT AVAILBALE TO THE COMMAND +; THIS ERROR RETURNS AS IT IS USED IN PRESENTMULTIPLE + IF OBJECT=0 THEN ONTRET + IF ACTOR<>USER THEN ontCancel +;===== +; Special cases where there may be two types of one object +; (e.g. yellow card & white card), and it is difficult to see +; which one we are refering to if neither are present. + if object=defaultbulb then @cantseethat +; +; refer to light sources using one message, "there is no light here". + if object>maxlight then notaccesslight + if object>minlightminus1 then nolighthere +.notaccesslight +;===== + if outofreach=true then objectoutofreach ;*graham* + lastpossibleverb=0 + nextverb=0 + lastwordprinted=nullobject ; force printing of full object name +; now some fail-safe code. +; NOUN1 and NOUN2 are sometimes set up wrong, +; and sometimes they are used for different things (e.g. gd commands) +; so, unless the verb is one that needs an object, replace it +; with nullobject, to avoid embarassments like- +; 'you can't see the gold bar' when the user didn't mention it! + if verb>99 then ontok ; intransitive (or is it transitive?) + object=nullobject + +.ontok + IF HISEARCHPOS=NOUNONGROUND THEN ONT1 + IF HISEARCHPOS=NONSPECIFIC THEN CANTSEEIT + MESSAGE 2012 ; don't have.. +.ONTERROR + GOSUB @printTHEOBJECT2 ; print 'You can't see HIM' if appropriate + MESSAGE DOT +.OntCancel + outofreach=false ;*graham* + goto @cancelinput ; resets stack etc. +; +;===== +.nolighthere + message 2610 + goto ontcancel +;===== +; +;*graham* +.objectoutofreach + message 2022 + goto ontcancel +;*graham* +; +.ONT1 + POS=actor + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS + IF RESULT=TRUE THEN ONT2 + +.CANTSEEIT + IF OBJECT=IEVERYTHING THEN @CANTUSEHERE ; EVERYTHING as NOUN2 + POS=actor + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS + IF RESULT=TRUE THEN ONT2 +;; .GENCANTSEEIT + MESSAGE 2011 ; Can't see .. + goto OntError + +.ONT2 + IF VERB=ISTAND THEN ONTDROPFIRST + MESSAGE 2013 ; Already have .. + GOTO ONTERROR + +.ONTDROPFIRST + MESSAGE 2126 ; have to drop it first +.ONTRET + RETURN +;---- +.ITSNOTTHERE +; user asked for NOUN1 in NOUN2 or similar +; but NOUN1 is not contained by NOUN2 + MESSAGE 2017 ; it's not there + RETURN +;--- +; Read input from the keyboard, in a form suitable for PRESENTMULTIPLE, +; or for analysis by code which expects Y/N. +.PARSEINPUT +; convert input to VERB, NOUN1, NOUN2, PREP form for +; easy use by the rest of the program.. + examinemarked=false ;***** nouns not marked in exam mess (yet!) + lastpossibleverb=0 + if actor<>user then pi0notuser + HAVECALLEDVERB=FALSE +.pi0notuser + if nextverb<>0 then @verbplus + + ADJECTIVE1=NULLOBJECT ;>>mike 14/2/88 + ADJECTIVE2=NULLOBJECT ;>>mike 14/2/88 +; moved because previously, a command like "bors, examine salt" +; where salt was an adjective (only) caused following commands +; to npcs to be ignored, because the parser looked e.g. for +; "salt bors, examine salt" - i.e. the effect of the adjective persisted + +;;.pinostoredverb + GOSUB @GETNEXTWORD + VERB=0 + IF EOL=TRUE THEN @PIEND; NOTHING ENTERED ! +; +; is first word a noun? (If so, the actor is talking to someone.) + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + IF VALUE>MAXGARBAGE THEN PINOUN + IF VALUE>MINGARBAGE THEN @PARSEINPUT ; ignore noise word +.pinoun + IF VALUEMAXNPC THEN PINOTNPC +; yes, so is the target here ? + gosub @Checknoun ;>>mike 5/2/88 +;>>mike 5/2/88 + if object=nullobject then piNoNpc + GOSUB @CHECKIFPRESENT + IF RESULT=TRUE THEN PINPC +.piNoNpc + MESSAGE 2060 ; talking to yourself? + GOTO @ABSCANCELINPUT +; +.CANTTALKTOSEVERAL +; can't talk to more than one person + MESSAGE 2061 + GOTO @ABSCANCELINPUT +; +.PINPC +; set up conversation target as actor + IF ACTOR=VALUE THEN @PINEXT ; already talking to this one! + IF ACTOR<>USER THEN CANTTALKTOSEVERAL ; attempt to talk to list of NPCs + ACTOR=VALUE + gosub @setACTORATTRIBUTES + GOTO @SAYNPC + +.PINOTNPC ; command doesn't start with a noun + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE=ITELEPORT THEN @TELEPORT ; a cheat mode verb + IF VALUE<>NULLVALUE THEN PI0 ; Yippee! We have a verb + + if moreinfoexpected=FALSE then @PARSEnoVERB ; Wrong type of word found + moreinfoexpected=FALSE + gosub @goback ; allow this word to get picked up and processed + gosub @verbVARSareAGAINverbVARS + if verb=isetupgo then @parsego + if verb=isetuprun then @parserun + goto pitryagain ; misleading name. This looks for nouns, preps etc. +; +.PI0 ; Analyse verb + IF VALUE<>IAGAIN THEN PI0A + gosub @verbVARSareAGAINverbVARS + ObjectTable(otBasePlus1)=noun1 ;>>fixed by l2 - allow npc, verb noun, again to work +; + IF LASTVERBVALID=TRUE THEN @PIEND + M1=3530 ; last verb not valid + GOTO @PARSEvaryERROR +; +.PI0A ; We have a verb and it's not 'again' + VERB=VALUE +; +.VERBPLUS ; Analyse any objects etc. following verb + OBJECTTABLE(otbase)=C0 + OBJECTTABLE(otbaseplus1)=C0 + EVERYTHING=0 ; EVERYTHING NOT DETECTED YET + EXCEPT=FALSE ; EXCEPT NOT DETECTED YET + PREP=0 + EVENTUALPREP=0 + NOUN1=NULLOBJECT ; NEEDED ? + NOUN2=NULLOBJECT + INUMBER=NULLNUMBER + VERBSTOCALL=0 + LASTVERBVALID=FALSE + if nextverb=0 then pitryagain + verb=nextverb + nextverb=0 + goto @piend + +.pitryagain ; got a verb, try to supplement info previously given +; ( therefore, mustn't clear existing tables etc., but +; need to do everything else ) +;&*&*& + if verb=ivIN then @GetNextWord ; scrap noun for ENTER SHED etc. + if verb=ivOUT then @GetNextWord ; scrap noun for LEAVE SHED etc. +;&*&*& + IF VERBnullvalue THEN PIPREP + + GOSUB @CHECKNOUN + if processed=TRUE then @pinext + IF OBJECT<>0 THEN PIEXAMINENOUN + + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF VALUE=ICOMMA THEN @PINEXT + IF VALUE<>nullvalue THEN @PINEXT + + SEARCHTYPE=NUMBTYPE + GOSUB @CHECKTYPE + IF VALUE=nullvalue THEN PINOTNUMBER + INUMBER=VALUE + ADD VERBSTOCALL,C1 + GOTO @PINEXT + +.PINOTNUMBER +; ANYTHING ELSE (CONJ, VERBS ETC.) TERMINATE THIS SENTENCE + GOSUB @GOBACK ; STORE (VERB?) FOR FUTURE ANALYSIS + +.PIEND + IF EVENTUALPREP=0 THEN PIendnoprep + PREP=EVENTUALPREP +.PIendnoprep +; check for 'drop bench and on' type construct +; if no noun2 was detected after a prep, maybe the prep was +; really a direction verb. Let's see + if noun2<>nullobject then piret + if prep=0 then piret +; ok, we have a prep but no noun2 +; Let's disregard the prep and retrieve any verb +; which the prep could have been + if lastpossibleverb=0 then piret + nextverb=lastpossibleverb + prep=0 + +.piret + RETURN + +.PIPREP + IF PREP<>0 THEN @SECONDPREP ; GOT A SECOND PREP + adjective1=nullobject ;>>gnome2 + adjective2=nullobject ;>>gnome2 + PREP=VALUE + GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS +; and store any verb this could be, just in case +; it wan't meant as a preposition + searchtype=verbtype + gosub @checktype + if value=0 then @pinext + lastpossibleverb=value + GOTO @PINEXT + +.PIEXAMINENOUN + IF OBJECT<>IIT THEN PINOTIT + if prep<>0 then cantuseit ;>> + OBJECT=ITWORD + IF OBJECTUSER THEN @NPCNOTUNDERSTOOD + m1=2053 ; it's not clear what/understands + gosub @printM1inputNEXTdot + GOTO @CANCELINPUT + +.PINOTIT + IF PREP<>0 THEN @PINOUN2 + IF OBJECTmaxcollective then pinotcollective + goto pieverything + +.pinotcollective + IF OBJECT=IEXCEPT THEN @PIEXCEPT +; GOT AN ORDINARY NOUN SPECIFIED + ITWORD=OBJECT + ITNUMBER=INUMBER + +; There are certain constructs where +; the first noun can be the destination +; e.g. 'GIVE ME THE MANDRAKE' + IF VERB<>IGIVE THEN PION2 + IF ACTOR=USER THEN PION2 + IF OBJECT=USER THEN PIGIVE + +.PION2 + X1=NOUNFORBIDDEN ; mark noun as forbidden + IF EXCEPT=TRUE THEN PIMARK ; DON'T CHECK IT'S HERE (YET) +; mark ordinary noun + X1=NOUNSPECIFIED +.PIMARK + NOUN1=OBJECT + GOSUB MARKOBJECT ; MARK NOUN AS SPECIFICALLY REQUESTED + GOTO @PINEXT +; +.PIEVERYTHING + EVERYTHING=object ; everything, ipeople, itreasure etc. + GOTO @PINEXT + +.PIGIVE + IF PREP<>0 THEN @cantusehere ;; DONTUNDERSTAND + NOUN2=OBJECT + EVENTUALPREP=ITO + GOTO @PINEXT +;--- +.verbVARSareAGAINverbVARS + VERB=AGAINVERB + NOUN1=AGAINNOUN1 + NOUN2=AGAINNOUN2 + PREP=AGAINPREP + RETURN +;--- +.againVERBvarsAREverbVARS + AGAINVERB=VERB + AGAINNOUN1=NOUN1 + AGAINNOUN2=NOUN2 + AGAINPREP=PREP + RETURN +;--- +.CHECKIFSCENERYHERE +; given OBJECT as a noun requested by user (relative to NOUNOFFSET) +; see if it is part of a room description, and +; if so, return RESULT=TRUE if in current room +; drop through to return TRUE + processed=TRUE +.RETURNTRUE + RESULT=TRUE + RETURN + +.RETURNFALSE + RESULT=FALSE + RETURN +;--- +.MARKOBJECT +; mark object as X1 + X2=OBJECTTABLE(otbase) + IF X2=0 THEN MARKOBJ1 ; no 'except' yet + IF X1<>X2 THEN @DONTUNDERSTAND ; have had both mark and prevent types +.MARKOBJ1 + X2=otbaseplus1 +.MARKOBJ2 + X3=OBJECTTABLE(X2) + IF X3=OBJECT THEN MARKOBJRET ; already marked + IF X3=0 THEN MARKOBJ3 + ADD X2,C1 + GOTO MARKOBJ2 + +.MARKOBJ3 + IF X2>otmax THEN @toocomplex ; OBJECTTABLE OVERFLOW + ADD VERBSTOCALL,C1 + OBJECTTABLE(otbase)=X1 + OBJECTTABLE(X2)=OBJECT + ADD X2,C1 + OBJECTTABLE(X2)=C0 +.MARKOBJRET + RETURN +;--- +.CHECKIFFORBIDDEN + RESULT=FALSE + if actor<>user then cifret + X1=OBJECTTABLE(otbase) + IF X1<>NOUNFORBIDDEN THEN CIFRET + X2=otbaseplus1 +.CIF1 + X1=OBJECTTABLE(X2) + ADD X2,C1 ;???C9 + IF X1=0 THEN CIFRET + IF X1<>OBJECT THEN CIF1 + RESULT=TRUE +.CIFRET +.sceneryEnd + RETURN +;--- +.SCENERY +; Have got a noun which is in a room description or similar, +; so it is just scenery. Print an appropriate message. + ITWORD=NULLOBJECT + HAVECALLEDVERB=TRUE + + GOSUB @FUNNIES ; Print out any special messages + OBJECT=0 + IF processed=TRUE THEN @cancelinput + + M1=3120 ; just scenery group + GOTO @PARSEvaryERROR +;--- + +.PIEXCEPT + EXCEPT=TRUE + GOTO @PINEXT + +.PINOUN2 +; another noun in input, not part of any multiple noun + IF NOUN2=NULLOBJECT THEN PINOUN2A + IF NOUN2<>OBJECT THEN @toomanynouns +.PINOUN2A + NOUN2=OBJECT + GOTO @PINEXT +;--- + +.CHECKTYPE +; SEE IF THERE IS A WORD OF WORDTYPE 'SEARCHTYPE' IN CURRENT WORD +; IF NOT, RETURN VALUE=0 +; IF THERE IS RETURN ITS WORD NUMBER IN VALUE + INDEX=0 +.CHECKTYPEMORE + GOSUB @READINPUTLIST + IF WORDTYPE<>NUMBTYPE THEN CTNOTNUMBER + ADD INDEX,C2 ; numbers are 4 byte values + +.CTNOTNUMBER + IF VALUE=NULLVALUE THEN CHECKTYPERET + ADD INDEX,C2 + SOMETHINGPROCESSED=TRUE + IF WORDTYPE<>SEARCHTYPE THEN CHECKTYPEMORE + IF WORDTYPE<>NOUNTYPE THEN CHECKTYPERET + IF VALUEEXAMINEMAXOFFSET THEN CHECKTYPERET +; an examine message + X1=EXAMINEOFFSET + SUB VALUE,X1 + examinemarked=true ;***** prevent printing lastwordprinted +; (can't simply set lastwordprinted=0, since it is changed later!) + +.CHECKTYPERET + RETURN +;--- +.CHECKNOUN +; see if there is an object present +; finding possible alternatives. Return RESULT=TRUE if found +; and return processed=TRUE if word is to be ignored + PROCESSED=FALSE + SEARCHTYPE=ADJETYPE + GOSUB @CHECKTYPE + IF VALUE=nullvalue THEN CNNOTADJE + ADJECTIVE1=VALUE + GOSUB CHECKTYPEMORE + IF VALUE=nullvalue THEN CNADJEND + ADJECTIVE2=VALUE + +.CNADJEND + searchtype=nountype + gosub @checktype + if value<>nullvalue then checknoun1 + processed=TRUE ; this is an adjective - so ignore it + return +; +.CNNOTADJE + SEARCHTYPE=NOUNTYPE + GOSUB @CHECKTYPE + OBJECT=0 + if value=nullvalue then cnnotclear + IF PREP=0 THEN CHECKNOUN0 + HISEARCHPOS=NONSPECIFIC +.CHECKNOUN0 +; +;===== +; handle objects within the vision (scapeghost.2) + if concentrating=false then cnnotvision + if valuemaxvision then cnnotvision + m1=2530 + gosub @ParseVaryError +.cnnotvision +;===== +; + if value>mingarbage THEN CNGARBAGE +; have a possible valid object. +; does it match with any adjective requested ? + IF ADJECTIVE1=NULLOBJECT THEN CHECKNOUN1 + IF VALUE=ADJECTIVE1 THEN CHECKNOUN1 + if value>adjective2 then checknoun1 ; could be + IF VALUE<>ADJECTIVE2 THEN CNMORE ; no, so try another + +.CHECKNOUN1 +; is it here ? +; + gosub HandlePairedObjects +; + OBJECT=VALUE + if verb=igetme then checknounend + if verb=0 then checknounend ; npc, - there is no verb +; + GOSUB @CHECKIFACCESSIBLE + IF RESULT=TRUE THEN CHECKNOUNEND ; if present, accept as is + +.CNMORE +; not present, so look for another match + GOSUB @CHECKTYPEMORE + IF VALUE<>nullvalue THEN CHECKNOUN0 + if verb=ifollow then checknounend +;; if verb=ikill then checknounend ; >> Pete 13/6/89 + +.CNNOTCLEAR +; no noun found which is present + IF OBJECT=0 THEN CHECKNNORMAL ; not a noun at all +; so print appropriate message + IF OBJECT>MAXOBJECT THEN CNNOTCLEAR1 + itword=object + GOSUB @OBJECTNOTHERE + if actor<>user then cngarbage +;;.cnignoreverb ; >> Pete 14/9/89 + HAVECALLEDVERB=TRUE +.CNGARBAGE + processed=TRUE ; make system skip over garbage words... + RETURN + +.CNNOTCLEAR1 +; OBJECT>MAXOBJECT, see if it is valid + +.CHECKNOUNEND + IF OBJECTMAXOMNI THEN CNNOMNI + GOTO CHECKNNORMAL + +.CNNOMNI + IF OBJECT>MAXOBJECT THEN @SCENERY +.CHECKNNORMAL + PROCESSED=FALSE + RETURN +;--- +; Handle any paired objects, e.g. white card and yellow card. +; On entry, VALUE contains the parsed default of the pair (usually 1st one) +; ADJECTIVE1 contains true object IF IT IS SUPPLIED +; VERB is also required to allow for RUN & GO object +; On exit, VALUE contains the concluding object +; If both objects are present, or no objects are present, then +; the user is informed, and the current command is ignored. +; +.HandlePairedObjects + if actor<>user then valueisprocessed +; +;===== + if value<>defaultbulb then notdefaultbulb + if adjective1=clearbulb then valueisadjective + if adjective1=pearlbulb then valueisadjective +; +; bulb type not specified. first check for only one of them present + object=clearbulb + gosub @checkifpresent + x8=result ; x8 determines if clear bulb is present + object=pearlbulb + gosub @checkifpresent + x9=result ; x9 determines if pearl bulb is present + add result,x8 ; result=number of bulbs present + if result=2 then bothitemspresent ; both here - ask which one + if result=0 then noitemspresent ; none here +; +; just one bulb is present +;;.onebulbpresent ; >> Pete 14/9/89 + value=clearbulb + if x8=true then valueisprocessed ; it's the clear one + value=pearlbulb + goto valueisprocessed ; otherwise, it must be the pearl one +.notdefaultbulb +;===== +; + return +; +; none of them here! +.noitemspresent + if verb=isetuprun then askwhichitem ; ask which one if RUN or GO to + if verb=isetupgo then askwhichitem ; object is used. + gosub @cantseethat ; otherwise, notify player that neither are present. + goto @cancelinput ; don't continue to execute the verb. +; +; both items present +.bothitemspresent + if verb=isetuprun then valueisprocessed ; if both here when RUN or GO, + if verb=isetupgo then valueisprocessed ; then we're already here! +.askwhichitem + m1=2623 ; try again, saying which one + gosub @printm1dot + goto @cancelinput ; don't continue to execute the verb. +; +; value is the adjective +.valueisadjective + value=adjective1 +.valueisprocessed + return +;--- +.ABSCANCELINPUT +; called after any errors - remove rest of input from line + processingsay=FALSE + if actor<>user then clearinpend + LINPUT(C0)=C0 ; in case NOMOREINPUT=TRUE, and LIST9<>0 + LINPUT(C1)=C0 + if nomoreinput=TRUE then clearinpend + SUPRESSCHECKING=TRUE ; don't check words for validity + GOSUB GETNEXTWORD + GOTO @ABSCANCELINPUT +.CLEARINPEND + SUPRESSCHECKING=FALSE + wordnotprocessed=FALSE + nextverb=0 ;>>fixed by gnome3 + RETURN +;--- +; The A-code instruction 'INPUT' returns a list of values in List 9: all +; the possible values for the next typed word. GETNEXTWORD does this, +; returns an error if the word is invalid, and does some analysis. It +; also copes with the effects of "GOBACK", if this has previously been +; used to 'unread' a word. +.GETNEXTWORD +; GET NEXT WORD IN LINPUT +; set EOL=TRUE if get '.', eol, etc. +; Set SEPARATOR=TRUE if get '.' ',' + IF NOMOREINPUT=TRUE THEN GNWEND + IF WORDNOTPROCESSED=TRUE THEN GNWEND ; HAVE USED GOBACK TO RETRIEVE + INPUT X1 X1 X1 X1 + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF VALUE<33 THEN GNW1 + IF VALUE<38 THEN @GETNEXTWORD +.GNW1 + GOSUB CHECKEOL ; CHECK FOR '.' 'THEN' etc. + IF PROCESSINGSAY=FALSE THEN GNWEND + GOSUB @TRIGGERWORDS ; in SAY command, so look for key words + +.GNWEND + WORDNOTPROCESSED=FALSE + RETURN +;--- +.CHECKEOL + INDEX=0 + GOSUB READINPUTLIST + SEPARATOR=FALSE + EOL=FALSE + IF VALUE=nullvalue THEN SETNOTHINGMORE + SEARCHTYPE=CONJTYPE + GOSUB @CHECKTYPE + IF VALUE=ITHEN THEN SETEOL + SEARCHTYPE=ASCITYPE + GOSUB @CHECKTYPE + IF SUPRESSCHECKING=TRUE THEN CHECKEOL1 + IF VALUE=128 THEN @PARSENOTKNOWN ; WORD NOT @UNDERSTOOD +.CHECKEOL1 + IF VALUE=ICOMMA THEN SETSEPARATOR + IF VALUE=IDOT THEN SETEOL + RETURN +.SETSEPARATOR + SEPARATOR=TRUE + GOTO SETEOL + +.SETNOTHINGMORE +; There is no more input to come on this line + NOMOREINPUT=TRUE +.SETEOL + EOL=TRUE + RETURN +;--- +.GOBACK +; MARK CURRENT WORD AS UNPROCESSED, SO A SUBSEQUENT INPUT ROUTINE +; CAN GET A CHANCE AT READING IT + INDEX=0 + GOSUB READINPUTLIST + IF VALUE=nullvalue THEN GOBACKRET + WORDNOTPROCESSED=TRUE +.GOBACKRET + RETURN +;--- +.READINPUTLIST + ; VALUE:=INPUT(INDEX) 16 BIT. X1,X2 corrupted + VALUE=LINPUT(INDEX) + IF VALUE<>1 THEN RILNOTNUMBER + WORDTYPE=NUMBTYPE + X1=INDEX + ADD X1,C1 + VALUE=LINPUT(X1) ; returns low order of number + RETURN + +.RILNOTNUMBER + WORDTYPE=VALUE +; STRIP OFF TOP THREE (WORDTYPE) BITS + X1=32 +.RIL1 + IF VALUE<32 THEN RIL2 + SUB VALUE,X1 + GOTO RIL1 +.RIL2 + GOSUB VALUETIMES256 + X1=1 + ADD X1,INDEX + X2=LINPUT(X1) + ADD VALUE,X2 +; Separate out WORDDYPE = top three0bits + X2=WORDTYPE + WORDTYPE=ASCITYPE + X1=ASCIOFFSET + IF X2<32 THEN RILRET + WORDTYPE=VERBTYPE + X1=VERBOFFSET + IF X2<64 THEN RILRET + WORDTYPE=CONJTYPE + X1=CONJOFFSET + IF X2<96 THEN RILRET + WORDTYPE=PREPTYPE + X1=PREPOFFSET + IF X2<128 THEN RILRET + WORDTYPE=NOUNTYPE + X1=NOUNOFFSET + IF X2<160 THEN RILRET + WORDTYPE=ADJETYPE + X1=ADJEOFFSET + IF X2<192 THEN RILRET + WORDTYPE=MATCHTYPE + X1=MATCHOFFSET + IF X2<224 THEN RILRET + WORDTYPE=7 + X1=0 +.RILRET + SUB VALUE,X1 ; SUBTRACT OFFSET + if value=0 then rilret1 + IF VALUE>60000 THEN RILRET1 + RETURN +.RILRET1 + VALUE=nullvalue + RETURN +;--- +.VALUETIMES256 + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + ADD VALUE,VALUE + RETURN +;--- +.VALUEDIV256 +; divide VALUE by 256 +; must preserve X4 + X1=0 + X2=256 +.VD256 + SUB VALUE,X2 + IF VALUE>NEGATIVE THEN VDEND + ADD X1,C1 + GOTO VD256 + +.VDEND + VALUE=X1 + RETURN +;--- +.CHECKOBJECTPOS +; return RESULT=TRUE if 'OBJECT' is +; at 'HIPOS','POS' +; if POS=0, it is treate as NONSPECIFIC +; likewise, HIPOS=NONSPECIFIC is handled +; return X4=lo position of object (or object if on ground) + if object>MaxObject then CopNotFound ; failsafeCode + X4=OBJECT +.COP1 + IF POS=0 THEN COPHI + X1=CURRENTPOS(X4) + if x1=0 then copnotfound ;*graham* + IF X1<>POS THEN COPNOTYET +.COPHI +; lo address is same, now check hi address + X1=HICURRENTPOS(X4) + IF X1=0 THEN COPHI1 + IF HIPOS=NONSPECIFIC THEN COPFOUND ; provided object is contained +.COPHI1 + IF X1<>HIPOS THEN COPNOTYET +.COPFOUND + goto @ReturnTrue +; +.COPNOTFOUND + goto @ReturnFalse +; +.COPNOTYET + X1=HICURRENTPOS(X4) + IF X1=0 THEN COPNOTFOUND + X4=CURRENTPOS(X4) + GOTO COP1 +; +;--- +.pick ; e.g. lock +.insert +;;.have ; >> Pete 14/9/89 +;;.has ; >> Pete 14/9/89 +;;.am ; >> Pete 14/9/89 +;;.are ; >> Pete 14/9/89 +;;.is ; >> Pete 14/9/89 + goto @noverb +;----------------------------------------------- +.gdnoun1 +; data structure is as follows: +; current entry is of the form: +; +; VERB PREP NOUN1 NOUN2 +; +; NOUN1 is one of itreasure, iweapons or ipeople +; +; the command immediately above this on the stack contains +; the same verb, prep and noun2, but has NOUN1=current object +; in gd scan. + +; check through what is accessible (using checkifaccessible) +; and callverb with the first accessible noun1 found +; If nothing found, do intelligentpop + gosub @npcgetcurrent + x1=npcstack(x1) +; x1 is no. of command behind the current one in the command queue + gosub @npcgetoffset ; get offset of command in stack + x2=3 + add x1,x2 ; get pos of noun1 + OBJECT=npcstack(x1) ; now x1=current noun + gdnoun1pos=x1 ; save position of current noun in stack + + gosub @selectobjectpos + searchdepth=1 ; for checkifobvious + gdmaxobject=maxtreasure + if noun1=itreasure then gdaccessall ; treasure + gdmaxobject=maxpeople + if noun1=ipeople then gdaccessall ; people +; gdmaxobject=maxweapon +; if noun1=iweapons then gdaccessall ; weapons + gdmaxobject=maxallobject + if noun1=ieverything then gdaccessall + gdmaxobject=maxclothes + if noun1=iclothes then gdaccessall ; clothes +.gdaccessend + gosub @intelligentpop ; pop off both parts of command + noun1=nullobject ; error condition + if gdnouncalled=TRUE then gdaeret + m1=2037 ; there doesn't seem to be anything suitable + goto @nointerestm1 + +.gdaccessall + if object>gdmaxobject then gdaccessend + gosub @checkifpresent ; quick check - must be here + if result=FALSE then gdaano + + GOSUB @CHECKIFACCESSIBLE + if result=FALSE then gdaano + gosub @checkifobvious + if obvious=FALSE then gdaano + gosub @checkifforbidden + if result=FALSE then gdaccessobject + +.gdaano + add object,c1 + goto gdaccessall +; +.gdaccessobject + noun1isgd=TRUE + if actor<>user then gdaonotuser + gdnouncalled=TRUE + +.gdaonotuser + x1=object + add x1,c1 + npcstack(gdnoun1pos)=x1 ; object to try when we come here next. + noun1=object +.gdaeret + return +;--- +.pmsetupgdaccess + gosub @initfifo + gosub setupgdaccess + goto @linkonfifocommandqueue +;--- +.setupgdaccess +; want to set up gd access to noun1, +; where NOUN1 is one of itreasure, iweapons or ipeople. +; what is the first object wanted? + object=mintreasure + if noun1=itreasure then suga1 +; object=minweapon +; if noun1=iweapons then suga1 + object=minpeople + if noun1=ipeople then suga1 + object=minallobject + if noun1=ieverything then suga1 + object=minclothes + if noun1=iclothes then suga1 + + + cif allowcheat + prs "[[[ system error - setupgdaccess invoked with bad noun1 ]]] " + cend + + return + +.suga1 + if actor<>user then suga2 + gdnouncalled=FALSE + +.suga2 + gosub @npcpushfifo + + noun1=object + goto @npcpushfifo ; push on current position +;------------------------------------------------- +.setupgdrun + descriptionmode=inone + goto setupgorun + +.setupgdgo + descriptionmode=ibrief + +.setupgorun + verb=igdgo + if actor<>user then setupgobug + gosub @stopfollowing + +;;.setupgr1 +; noun1 is destination + numexplicitmoves=100 ; no sarcastic comment now about +; plodding around with N/S/E etc. now, please + gosub @npcpushfifo + gosub @linkonfifocommandqueue + goto @executeanyorders + +.setupgobug + cif allowcheat + if cheatmode=false then setupgobugret + prs "[[[ parser error: attempt to use setupgo by " + print actor +.setupgobugret + cend ; allowcheat + + return +;--- +.CONVERTVERB +; Given VERB,PREP, convert to standard forms of certain commands +; e.g. LOOK AT => EXAMINE ; GET ON => STAND ON ; GET OFF => LEAVE +; This is called as soon as the first noun is found - so +; if it is necessary to separate prepositions before+after nouns, +; this is a good place to do it + +;===== + if verb<>itake then cvnotpickup + nextverb=0 ; allow PICK PHONE UP +.cvnotpickup +;===== + + IF VERB<>ILOOK THEN CVNOTLOOK + IF PREP=0 THEN CVNOTLOOKat +.cvexamine + VERB=IEXAMINE + PREP=0 + return + +.cvnotlookat + if noun1<>nullobject then cvexamine + +.CVNOTLOOK + IF VERB<>IGET THEN CVNOTSTAND ; get on + IF PREP=IPOUT THEN CVSTAND + IF PREP=IPOFF THEN CVSTAND + IF PREP=IPIN THEN CVSTAND + IF PREP<>IPON THEN CVNOTSTAND +.CVSTAND + VERB=ISTAND + +.CVNOTSTAND + IF VERB<>IVON THEN CVNOTON + PREP=IPON + VERB=ISTAND + +.CVNOTON + IF VERB<>IVOFF THEN CVNOTOFF + PREP=IPOFF + VERB=ISTAND +.CVNOTOFF +;; .CVNOTONOFF + IF VERB<>IDROP THEN CVNDROP + IF PREP=0 THEN CVNDROP + IF NOUN2=NULLOBJECT THEN CVNDROP ; ignore PREP if no second noun +; DROP noun1 PREP noun2 +; probably equivalent to PUT noun PREP noun2 + VERB=IPUT + +.CVNDROP + IF VERB<>ITAKE THEN CVNTAKE +; take off something (REMOVE something) + IF PREP<>IPOFF THEN CVNTAKE + IF NOUN1<>NULLOBJECT THEN CVNTAKE + VERB=IREMOVE + PREP=0 + +.CVNTAKE + IF VERB<>IPUT THEN CVNPUT +; put on something (WEAR something) + if prep<>202 then cvNPutDown + verb=idrop + prep=0 + +.cvNPutDown + IF PREP<>IPON THEN CVNPUTON + IF NOUN1<>NULLOBJECT THEN CVNPUT + if everything<>false then cvnput ;>>fixed by gnome3 + VERB=IWEAR + PREP=0 + RETURN +.CVNPUTON + IF PREP<>IPOUT THEN CVNPUT +; put out => extinguish + VERB=IEXTINGUISH ; put candle out + IF NOUN1<>NULLOBJECT THEN CVNPUT + NOUN1=NOUN2 ; put out candle + +.CVNPUT + IF VERB<>IGET THEN CVNGET + VERB=ITAKE + +.CVNGET + if verb<>igive then cvngive + if prep=0 then cvngive + prep=ipto + +.cvngive + if verb<>iclimb then cvnclimb + if nextverb<1 then cvnclimb + if nextverb>14 then cvnclimb + verb=nextverb + nextverb=0 ; climb in/out/up etc. +.cvnclimb + RETURN +;--- +.SELECTOBJECTPOS +; given VERB,PREP +; set up HISEARCHPOS to show where the objects which follow on +; the input line must be - i.e. +; NOUNONGROUND, NOUNCARRIED or NONSPECIFIC + HISEARCHPOS=NOUNONGROUND + IF VERB=ITAKE THEN SOPRET + IF VERB=ISTAND THEN SOPRET + HISEARCHPOS=NOUNCARRIED + IF VERB=IDROP THEN SOPRET + IF VERB=IGIVE THEN SOPRET + + HISEARCHPOS=NONSPECIFIC +.SOPRET + RETURN +;--- +.SETUPROOM +; Return 'ROOM'=current position of ACTOR +; If ACTOR is contained, trace back until find the +; location in which the container(s) rests. + X4=ACTOR + +.SETUPROOMX4 +; Return 'ROOM'=current pos of object X4 + ROOM=CURRENTPOS(X4) + X1=HICURRENTPOS(X4) + IF X1=0 THEN SETUPROOMEND + X4=ROOM + if room<>0 then SETUPROOMX4 +.SETUPROOMEND + if actor<>user then setuproomend2 + currentuserroom=room + +.setuproomend2 + if actor<>user then setuproomret + gosub @checkiflight + lightinroom=result +.setuproomret + RETURN +;--- +.checkifpresent +; Return result=TRUE if OBJECT is in ROOM + gosub getobjectposx2 + result=FALSE + if x2<>room then cipret + result=TRUE +.cipret + goto @specialcheckifpresent +;--- +.getobjectposx2 + x2=0 + if object>MaxObject then @ReturnFalse + x4=object +.gopx4 +; Return 'x2'=current pos of object X4 + x2=CURRENTPOS(X4) + if x2=0 then gopfound ; not found really + X1=HICURRENTPOS(X4) + IF X1=0 THEN gopfound + X4=x2 + GOTO gopx4 +.gopfound + result=FALSE + if x2<>room then gopret + result=TRUE +.gopret + RETURN +;--- +.switchon +.switchoff +;;.dodge ; >> Pete 14/9/89 + goto @nothinghappens +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/aspecial.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/aspecial.txt new file mode 100644 index 0000000..631ef71 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/aspecial.txt @@ -0,0 +1,1676 @@ +; Scapeghost.2 source, copyright (C) 1988 Level 9 Computing. +; +; ASPECIAL.TXT, special case handlers for the game. (In practice, +; this means most of the code to handle puzzles etc.) +; +; Known bugs: +; The compiler is happier if all DATA statements are followed by +; comments, otherwise line numbers for errors go wrong. +; +; +BEGIN +; now print any messages to be printed after certain movements +.AFTERMOVE + if actor=user then amUser +; is ACTOR carrying USER? + x1=hicurrentpos(user) + if x1=0 then amUser + x1=currentpos(user) + if x1=actor then UserCarried +; +; is USER in vehicle driven by ACTOR + cif allowboat + if x1<>cart then amUser + x1=currentpos(actor) + if x1=cart then UserCarried + cend +; + goto amUser +; +; yes - so do description of the room we've arrived in. +.UserCarried + wanttoPrintAnd=0 ; bug fix + actor=user ; force printing of desc etc. + gosub @setuproom ; force first few words to be printed + message cr + gosub @PrintRoom + actor=currentpos(user) ; reset it + goto amuser +; +.amUser +; handle ECHO LOCATIONS + if roommaxecholoc then amNotEcho +; +; Force ACTOR back to previous room. +; Use this for ECHO type rooms WHENEVER IT IS POSSIBLE THAT ACTOR IS IN +; A VEHICLE. +.backmove + hidest=0 + dest=lastroom + x1=dir + add x1,startreversaltable + dir=list5(x1) + verb=dir + descriptionmode=ibrief + if actor<>user then describebackmove + descriptionmode=inone +.describebackmove + m1=cr + gosub @printm1 + gosub @absnewlocation + descriptionmode=normaldescriptionmode + gosub @stop ; can't reach destination - halt current command queue +; aftermoves has been executed in absnewlocation, hence the return here: + return +.amNotEcho +; +;------------------------------------------------------------------------- +; MISCELLANEOUS AFTERMOVES +;------------------------------------------------------------------------- +; handle plug and socket stuff + object=plug + pos=actor + hipos=nonspecific + gosub @checkobjectpos + x8=plug + object=socket + if result=true then objecttrails ; plug carried - socket follows + gosub @checkobjectpos + if result=false then @notplugsocket + x8=socket + object=plug ; socket carried - plug follows +; +.objecttrails + gosub @checkifpresent ; skip if end of lead is in + if result=true then @endplugsocket ; room we've just arrived in + pos=oldplugsocketroom + hipos=0 + gosub @checkobjectpos + if result=true then @endplugsocket ; or is already in last room +; +; the end of the lead is treated as "jammed" in each of the +; following cases: +; 1. frozen to the dead body +; 2. carried by an npc +; 3. inside closed clock +; in all other cases (e.g. in fireplace, in pocket of jeans), the +; end of the lead is pulled away. + x1=hicurrentpos(object) + if x1=0 then leadmoves ; lead is on the floor + if x1=fastenedto then leadisjammed ; lead is fastened to an object +; is lead owned by an npc? + x1=currentpos(object) + if x1clock then leadmoves +; lead is in clock, but is only jammed if door is closed + x1=currentpos(openpanel) + if x1<>0 then leadmoves ; door is open, lead comes out +; +; end of lead is fastened to something, so drop end carried in +; last room instead of other end... +; this message is shown if the user is carrying the lead, or if +; the user is in the room in which it is dropped. +.leadisjammed + forceprinting=true + if currentuserroom=oldplugsocketroom then leadjammedmess + forceprinting=false +.leadjammedmess + m1=blankline + gosub @printm1 + gosub @printtheobject ; + m1=2693 ; was fastened to something + gosub @printm1 ; heavy, and + gosub @printactor ; + m1=2694 + gosub @printm1 ; left + object=x8 + gosub @printtheobject ; + m1=1603 + gosub @printm1dot ; behind. + if object<>playerobject then moveobjecttooldroom + playerobject=0 + goto moveobjecttooldroom +; +; end of lead is about to be moved +; this message is printed if the user is carrying the lead, +; the end of the lead enters the user's room, or the end of +; the lead leaves the user's room +.leadmoves +; end of lead enters user's room? + if currentuserroom=oldplugsocketroom then leadmovesmess +; end of lead leaves user's room? + gosub @getobjectposx2 + if x2=currentuserroom then leadmovesmess + if room<>currentuserroom then moveobjecttooldroom +.leadmovesmess + forceprinting=true + m1=blankline + gosub @printm1 + gosub @printtheobject ; + m1=2695 ; was dragged along the + gosub @printm1 ; floor + x9=room + room=oldplugsocketroom + gosub @shortdesc ; + room=x9 + gosub @printdot +; +.moveobjecttooldroom + forceprinting=false + hicurrentpos(object)=c0 + currentpos(object)=oldplugsocketroom +.endplugsocket + oldplugsocketroom=room ; update dest for next move +.notplugsocket +;--- +; luke's ghost attacks anyghost that confronts him + if actor>joe then notmeetluke + if room<>18 then notmeetluke + x1=currentpos(luke) + if x1=0 then notmeetluke + currentpos(luke)=room ; luke appears on first attack + if actor=user then usermeetsluke +; +; a ghost other than user confronts luke. banished for night... + forceprinting=true + gosub @printactor ; + m1=2580 + gosub @printm1dot ; screams as luke attacks + forceprinting=false + currentpos(actor)=c0 + goto @stop +; +; user confronts luke... +.usermeetsluke + cif Includepictures + x1=9 + gosub @drawpicturex1 ; pic for luke's ghost + cend ; Includepictures + x1=currentpos(joe) + if x1<>0 then joesavesuser +; +; joe has been banished, and cannot save user + m1=2581 + gosub @printm1dot + goto @userdeath ; user is banished for night +; +; joe appears and saves user... +.joesavesuser + m1=blankline + gosub @printm1 + m1=2582 + gosub @printm1dot + goto @backmove +.notmeetluke +;--- +; joe hints user to concentrate outside house. +; message is only printed once, so it improtant to only print it +; when both joe and user are outside the house for the first time + if actor<>joe then joenotconcentrate + if joeconcentrated=true then joenotconcentrate ; already done mess + if room<>11 then joenotconcentrate ; joe not in front of house + if currentuserroom<>11 then joenotconcentrate ; user isn't here + joeconcentrated=true ; prevent message repeating + m1=2770 + goto @printm1dot +.joenotconcentrate +;------------------------------------------------------------------------- +; USER AFTERMOVES +;------------------------------------------------------------------------- + if actor<>user then amnotuser +;--- +; to be fair, set the cars moving only when we reach the green + if room<>8 then notsetcars + carstriggered=true ; here we go! +.notsetcars +;--- +; scoring when reach certain rooms + gosub @scoreroom +;--- +.amnotuser +;--- +;;.amret ; >> Pete 14/9/89 + RETURN +;--- +; swap objects contained in pos to be contained in dest +; value=true if at least one item was exchanged +.swapobjectpos + value=false ; nothing exchanged yet + object=1 ; start with first object (user) +; +.seploop +; must use absolute pos (i.e. not a chain of positions) + x1=currentpos(object) + if x1<>pos then nextsep ; object not at pos + x1=hicurrentpos(object) + if x1=0 then nextsep ; pos was not a container + currentpos(object)=dest + hicurrentpos(object)=x1 ; exchange object + value=true ; set "exchanged" flag +; +.nextsep + add object,c1 + if object0 then @smOk +;------------------------------------------------------------------------- +; USER SPECIALMOVES +;------------------------------------------------------------------------- +; ghost cannot climb stairs if landing light is on + if actor>joe then notgolanding + if room<>14 then notgolanding + if dest<>18 then notgolanding + room=18 + gosub @spreadlight ; is there light at the landing + room=14 + m1=2774 + if result=true then @smpreventactorm1dot +.notgolanding +;--- +; message when first pass through the door into the hall + if actor<>user then smnotuser ; >> Pete 17/7/89 removed comment + if room<>11 then notgohall + if dest<>14 then notgohall + if gonethroughdoor=true then notgohall + gonethroughdoor=true ; prevent message being repeated + m1=2772 + gosub @printm1 +.notgohall +;--- +.smnotuser +;--- +.smok + RESULT=TRUE + RETURN +; +.smPreventActorM1Dot + gosub @ActorM1Dot + goto smPrevent + +;;.smpreventm1dot ; >> Pete 14/9/89 + gosub @printm1dot +.smprevent + FatalError=True + result=FALSE + commandfinished=TRUE + if room<>currentuserroom then garet ;&& + fatalerror=2 ;&& +.garet + return + +;;.smokm1dot ; >> Pete 14/9/89 +;; gosub @printM1dot ; >> Pete 14/9/89 +;; goto @smok ; >> Pete 14/9/89 +;--- +; +.specialtakes +; is POS to be allowed to gain OBJECT? +; return result=FALSE to prevent action +; +;===== +; treat "take bookmark" as "pull bookmark" if it's in the directory + if object<>bookmark then nottakebookmark + x1=hicurrentpos(bookmark) + if x1<>in then nottakebookmark + x1=currentpos(bookmark) + if x1=directory then @pullbookmark ; stuck directory +.nottakebookmark +;--- +; can't take things out of clock if panel is closed + x8=pos + x9=hipos ; save pos,hipos + pos=clock + hipos=in + gosub @checkobjectpos + pos=x8 + hipos=x9 ; restore pos,hipos + if result=false then nottakefromclock + x1=currentpos(openpanel) + if x1=c0 then @stpreventm1dot ; panel is closed + goto stokifstrongenough +.nottakefromclock +;--- +; Allow LIFT RECEIVER (for telephone) + m1=2682 + if object=telephone then @stpreventm1dot ; it's broken +;--- +; Can't take map or branch if it is in water + if object=branch then takemapbranch + if object<>map then nottakemapbranch +.takemapbranch + x8=pos + x9=hipos ; save pos,hipos + pos=ditchwater + hipos=nonspecific + gosub @checkobjectpos + pos=x8 + hipos=x9 ; restore pos,hipos + m1=2565 + if result=true then @stpreventm1dot ; out of reach in water + if takenmap=true then nottakemapbranch + takenmap=true + gosub @addevidencescore +.nottakemapbranch +;--- +; Decide if POS is strong enough to pick up OBJECT +; JUMP HERE INSTEAD OF STOK... +.stokifstrongenough + if pos>maxnpc then stnotnpc + if pos>maxghost then strongenough ; humans can carry anything + if object> Pete 14/9/89 + x1=pos + gosub @printtheobjectx1 ; (usually the actor) + m1=2528 ; "would never be strong enough" + goto stpreventm1dot +.stnotnpc +; +; pos IS strong enough to pick up object +.strongenough +;===== +; +;;.stok ; >> Pete 14/9/89 + result=TRUE ; allow actor to take object +;;.stret; >> Pete 14/9/89 + return + +;;.stokm1dot ; >> Pete 14/9/89 +;; result=true ; allow actor to take object ; >> Pete 14/9/89 +;; goto @printm1dot ; >> Pete 14/9/89 + +;;.stprevent ; >> Pete 14/9/89 +;; result=false ; >> Pete 14/9/89 +;; goto stret ; >> Pete 14/9/89 + +;;.StPreventActorM1Dot ; >> Pete 14/9/89 +;; gosub @printActor ; >> Pete 14/9/89 + +.stpreventm1dot + result=FALSE ; prevent taking + goto @printM1dot +;--- +.sign + goto @noverb +;--- +.specialaftermoveobj +; OBJECT has just been moved from HIFROM, FROM to POS, HIPOS +; do anything you want, then return +; no values to return +; +; SPECIAL NOTICE TO PREVENT ME FROM BUGGERING THINGS UP - +; +; IT IS VERY EASY (AND HABITUAL) TO FORGET TO TEST FOR HIPOS HERE, +; AND TO ASSUME THAT POS IS ALWAYS A CONTAINER. +; FOR HELL'S SAKE, TEST HIPOS AND HIFROM WHENEVER TESTING POS AND FROM !! +; +; - GRAHAM. +; +;===== +; User can only carry one object at a time +; + if hipos=0 then usernottake + if pos<>user then usernottake + if playerobject=0 then pdontdropobject ; no object already carried + hicurrentpos(playerobject)=c0 + currentpos(playerobject)=room ; drop old object + verb=idrop + gosub @printactorVERB ; I dropped + x1=playerobject + gosub @printtheobjectx1 + gosub @printdot + x1=playerobject + gosub @smashobjectx1 ; smash if bulb? +; +.pdontdropobject + playerobject=object ; new object owned +.usernottake +;--- +; clear "object carried" flag if user drops an object + if hifrom=0 then usernotdrop + if from<>user then usernotdrop + if hipos=0 then userdrop + if pos=user then usernotdrop ; in case we wear it etc +.userdrop + playerobject=c0 ; (can only carry 1 object) +.usernotdrop +;--- +; reset oldplugsocketroom when plug or socket is taken by actor + if hipos=0 then actornottake + if pos<>actor then actornottake + if object=plug then takeplugsocket + if object<>socket then actornottake +.takeplugsocket + oldplugsocketroom=room +.actornottake +;--- +; bulbs smash if dropped + if hipos<>0 then bulbnotdropped + x1=object + gosub smashobjectx1 +.bulbnotdropped +;--- +; handle fuse blowing if foil is inserted into live sockets +; +; NB: it is impossible to insert the foil into the hall socket while +; it is live, since the landing light would cause the user to drop +; the foil. +; +; test kitchen light + if object<>foil then notputfoil + if hipos<>in then notputfoil + if pos<>socketK then notputfoil + x1=kitchenswitchon + POS=socketK + gosub @blowfuse ; handle fuse being blown +.notputfoil +;--- +; handle light going off if bulbs are removed from live sockets +; +; test hall light + if hallswitchon=false then notremoveclear + if object<>clearbulb then notremoveclear + if hifrom=0 then notremoveclear + if from<>socketH then notremoveclear + m1=2660 + gosub @printm1dot ; hall light went off +.notremoveclear +; +; test kitchen light + if kitchenswitchon=false then notinsertpearl + if object<>pearlbulb then notinsertpearl + if hifrom=0 then notremovepearl + if from<>socketK then notremovepearl + m1=2664 + gosub @printm1dot ; kitchen light went off +.notremovepearl +;--- +; handle light coming on if bulbs are inserted into live sockets +; +; NB: it is impossible to insert the hall bulb while the socket +; is live, since the landing light would cause the user to drop +; the bulb. +; +; test kitchen light... + if hipos=0 then notinsertpearl + if pos<>socketK then notinsertpearl + if fuseblown=true then notinsertpearl ; >> Pete 17/7/89 +; kitchen light comes on unless fuse blown + m1=2665 + gosub @printm1dot ; kitchen light came on + x8=15 + gosub @startledinx8 ; all ghosts in kitchen startled +.notinsertpearl +;===== +; + return +; +;===== +; light bulbs smash if dropped +.smashobjectx1 + if x1=pearlbulb then smashbulb + if x1=clearbulb then smashbulb + return +.smashbulb + currentpos(x1)=c0 ; destroy the bulb + gosub @printtheobjectx1 + m1=2673 + goto @printm1dot +;===== +; +.specialaftergive +; NOUN1 has just been given to the npc NOUN2 +; +;;.saythankyou ; >> Pete 14/9/89 +;; object=noun2 ; >> Pete 14/9/89 +;; gosub @printTheobject ; >> Pete 14/9/89 +;; m1=2204 ; said "thankyou" ; >> Pete 14/9/89 +;; goto @printM1Dot ; >> Pete 14/9/89 +;--- +.TIMEDEPENDENTCODE +; called for every minute that goes past + actor=user ; just in case there is any doubt! +; +;===== +; handle curtains burning + if curtainsburning=0 then curtainsnotburning + sub curtainsburning,c1 ; decrement timer + m1=2740 + add m1,curtainsburning + message blankline + gosub @forcem1 +;;.nofiremenmess ; >> Pete 14/9/89 +; +; special case for firemen arriving + if curtainsburning<>1 then firemennotarrive + x1=15 + currentpos(firemen)=x1 ; put firemen in kitchen + gosub @countevidence ; x8=evidence in hall + message blankline + object=body + pos=14 + hipos=0 + gosub @checkobjectpos + if result=true then testforwin ; check evidence if body here. + if x8=0 then endfiremen ; skip if no body or evidence. + m1=2752 + gosub @forcem1 ; ignore evidence if no body + goto endfiremen ; but some evidence is here. +; +; body is in hall, so proceed with endgame depending on amount of +; evidence here +.testforwin + cif Includepictures + x1=18 + gosub @drawpicturex1 ; fireman pic. + cend ; Includepictures +; + if x8=5 then @win ; win if all evidence is here + gosub @dodestroyevidence ; evidence and body + currentpos(body)=c0 ; are carried away (except +; when we win, since this would reduce the score) + if x8=0 then noevidence + m1=2751 ; not enough evidence here + gosub @forcem1 + goto endfiremen +.noevidence + m1=2750 ; no evidence at all + gosub @forcem1 + goto endfiremen +; +.firemennotarrive + currentpos(firemen)=c0 +.endfiremen +; + if curtainsburning<>0 then endflames + currentpos(curtains)=c0 ; curtains burned +.curtainsnotburning +; +; handle vapour burning + if vapourburning=0 then vapournotburning + sub vapourburning,c1 ; decrement timer + if currentuserroom<>15 then novapourmess ; burning messages only seen + m1=2785 ; in kitchen + add m1,vapourburning + message blankline + gosub @forcem1 +.novapourmess + if vapourburning<>0 then endflames +.vapournotburning +; +; both curtains and vapour have finished burning, so destroy the flames + currentpos(flames)=c0 +; +.endflames +;--- +; handle cars passing by the village green using a timer of +; values 0..4 inclusive +; these are as follows... +; 0 - sound of car approaching +; 1 - dim headlights approaching [light present] +; 2 - full beam [light present] +; 3 - car leaving +; 4 - +; +; firstly, make sure cars don't start approaching until we reach the +; the green, since it wouldn't be fair to send the player back as soon +; as he set foot there, would it? + if carstriggered=false then nodescheadlights + add cartimer,c1 + if cartimer<5 then donecartimer + cartimer=0 +.donecartimer + if room<8 then nodescheadlights + if room>10 then nodescheadlights + m1=2510 + add m1,cartimer + gosub @printm1 +.nodescheadlights +; +; handle light in user's room + gosub spreadlight + if result=false then tdnolight +; +; headlights are treated specially + if object<>headlights then tdnotheadlights + if cartimer=2 then @startledheadlights +.tdnotheadlights +; + m1=2590 ; "I felt distressed by" + goto @distressedbyobject +.tdnolight +;===== +; + return +; +;===== +; Distribute any light in ROOM. If light present, then... +; result=true +; object=light object number (e.g. kitchen light) +; currentpos(object)=room +; +.spreadlight +; no lights to begin with... + currentpos(headlights)=c0 + currentpos(halllight)=c0 + currentpos(kitchenlight)=c0 + currentpos(landinglight)=c0 +; +; handle cars passing by the village green + if room<8 then noheadlights + if room>10 then noheadlights ; headlights in 8 to 10 + object=headlights + if cartimer<1 then lightnotpresent ; car is approaching + if cartimer>2 then lightnotpresent ; car is leaving + goto lightpresent ; car is passing +.noheadlights +; + if fuseblown=true then lightnotpresent ; no house lights +; house lights ONLY follow... +; + if room<>15 then nokitchenlight ; kitchen light in 15 + x1=currentpos(pearlbulb) ; no hipos 'cos cannot drop bulb + if x1<>socketK then lightnotpresent ; no bulb, so no light + object=kitchenlight + if kitchenswitchon=true then lightpresent + goto lightnotpresent +.nokitchenlight +; +; "hallswitchon" governs hall light AND landing light + if hallswitchon=false then nothalllight + if room<>14 then notinhall ; not in hall +; +; we are in hall, so is hall light fitted? + object=halllight + x1=currentpos(clearbulb) ; no hipos 'cos cannot drop bulb + if x1=socketh then lightpresent ; bulb is fitted and lit + goto landinglightison ; no bulb, get light from landing +; +; landing light illuminates hall AND landing +.notinhall + if room<>18 then nothalllight ; not on landing +.landinglightison + object=landinglight + goto lightpresent +.nothalllight +; +; no light in this location +.lightnotpresent + result=false + return +; +; light in this location +.lightpresent + result=true + currentpos(object)=room + return +;--- +; actor is startled by headlights, so send him back to winding track +.startledheadlights + x1=7 + currentpos(actor)=x1 + hicurrentpos(actor)=c0 + object=actor + from=room ; FROM is used for test purposes + goto @startled1 ; actor is startled by headlights +;--- +; USER is distressed by OBJECT. +; m1 contains group message for "distressed by..." +; If carrying an object, distressed message is shown and object is +; dropped. +; If no object carried, then no message is printed. +; +.distressedbyobject + if playerobject=0 then dboend ; only message if carrying object +; +; print distressed message... +;;.distressed ; >> Pete 14/9/89 + message cr + gosub @varymessage + lastwordprinted=0 ; prevent "he" + gosub @printtheobject ; + message dot +; +; drop any object carried... + if playerobject=0 then dboend ; no object to drop + object=playerobject + noun1=object + verb=idrop + pos=currentuserroom + hipos=0 + gosub @moveobject ; drop object carried + + playerobject=0 +.dboend + return +;===== +; +.OBJECTTRIGGER +; Trigger on OBJECT +; set PROCESSED=TRUE if the command is completed +; by this routine (usually by the printing of an +; error message, or some other general response) +; + processed=FALSE + if object=nullobject then @otok + if verb=iexamine then @otExamine +; + gosub @checkifpresent + if result=FALSE then otret ; not here, so do nothing + OTPOS=CURRENTPOS(OBJECT) ; remain set throughout this routine + OTHIPOS=HICURRENTPOS(OBJECT) + processed=TRUE ; prevent processing unless cleared at end of routine +; special cases... +; +.otExamine +.OTOK + processed=FALSE ; PROCESSING MAY CONTINUE +.otret + RETURN +; +;;.otpreventm1dot ; >> Pete 14/9/89 +;; gosub @printM1dot ; >> Pete 14/9/89 +.otprevent + processed=TRUE + return +; +; +.FUNNIES +; Value of word entered is in 'OBJECT' (relative to NOUNOFFSET) +; Also have 'VERB' and may have 'PREP' if one has been entered +; before this noun on the input line. +; Return processed=TRUE if a special message is printed in this routine +; which should prevent the printing of other messages + if object=nullobject then funniesok + processed=true ; prevent action unless drop through to end +;;.nothingspecial ; >> Pete 14/9/89 +;;.fnotexamine ; >> Pete 14/9/89 +;;.notvandal ; >> Pete 14/9/89 +;;.examnotscenery ; >> Pete 14/9/89 +.funniesok + processed=FALSE + RETURN +;--- +.SPECIALEXAMINE +; print any special examine messages which follow +; the basic message but are before any contents are printed +; set processed=TRUE if the contents should not be printed +; +;===== +; examine tank (if lid is on) + if object<>tank then notexamtank + x1=currentpos(lid) + if x1<>tank then notexamtank + m1=2775 + gosub @printm1dot ; first, reveal lid + goto examinelid ; now look through it +.notexamtank +;--- +; examine lid (if on tank) + if object<>lid then notexamlid + x1=currentpos(lid) + if x1<>tank then notexamlid +.examinelid + processed=true ; (don't show tank contents) + m1=2776 ; look through lid + goto @printm1dot +.notexamlid +;--- +; curtains on fire? + if object<>curtains then notexamcurtains + m1=2736 ; they were on fire + if curtainsburning>0 then @printm1dot +.notexamcurtains +;--- +; vapour on fire? + if object<>vapour then notexamvapour + m1=2735 ; it was on fire + if vapourburning>0 then @printm1dot +.notexamvapour +;--- +; find ID card by examining herbs + if object<>herbs then notexamherbs +; +; Handle card if found by EXAMINE HERBS, SEARCH, or DIG +.FindCard + if CardFound<>1 then notfindcard ; card not buried or pos unknown + result=true ; card is found + CardFound=2 ; prevent "refinding" it + gosub @printactor ; (can be dug up by joe) + m1=2560 + gosub @printm1dot + gosub @addevidencescore + object=card + goto @createobject +.notfindcard + result=false ; triggers messages for dig/search + return +; +.notexamherbs +;--- +; examine on/off type objects... + m1=2640 ; standard on/off message +; +; message when hall switch on + if object<>switchH then notexamswitchH + add m1,hallswitchon ; on/off message + goto @printm1dot +.notexamswitchH +; +; message when kitchen switch on + if object<>switchK then notexamswitchK + add m1,kitchenswitchon ; on/off message + goto @printm1dot +.notexamswitchK +;===== +; + return +; +;--- +.SPECIALPREEXAMINE +; before printing examine message / contents, check if +; anything should prevent this. Return TRUE if details should +; NOT be printed +; +;===== +; can'e examine map if can't reach it + if object<>map then notexammap + pos=ditchwater + hipos=nonspecific + gosub @checkobjectpos + m1=2565 + if result=true then @printm1dot ; out of reach in water +.notexammap +;===== +; + RESULT=FALSE ; proceed normally +;;.speok ; >> Pete 14/9/89 + RETURN + +;;.returnTrueM1Dot ; >> Pete 14/9/89 +;; result=true ; >> Pete 14/9/89 +;; goto @printM1Dot ; >> Pete 14/9/89 +;--- +.CANTSEETHAT + M1=2019 ; can't see that + GOTO @errorm1dot +;--- +.mighthurtyourself + m1=2401 ; you might hurt yourself + goto @errorm1dot +;---- +;--- +.StopObject + actorsave=actor + actor=object + gosub @stop + actor=actorsave + goto resetactor +;--- +.resetactor + gosub @setACTORATTRIBUTES + goto @initfifo +;--- +;;.MAKEENEMIES ; >> Pete 14/9/89 +; make TARGET and ACTOR be enemies +;; OBJECT=TARGET ; >> Pete 14/9/89 +;; GOSUB @setX4toOBJECTATTRIBUTES ; >> Pete 14/9/89 +; and set up attacker and target to be enemies... +;; NPCCURRENT(X4)=ACTOR ; >> Pete 14/9/89 +;; NPCCURRENT(ACTORATTRIBUTES)=TARGET ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +; Routines to return pointer to character 'OBJECT' data. Note that they +; rely on npcentrysize=16, so beware if you change this. +.setACTORATTRIBUTES + ACTORATTRIBUTES=ACTOR + ADD ACTORATTRIBUTES,ACTORATTRIBUTES + ADD ACTORATTRIBUTES,ACTORATTRIBUTES + ADD ACTORATTRIBUTES,ACTORATTRIBUTES +; ADD ACTORATTRIBUTES,ACTORATTRIBUTES + RETURN +; +.setX4toOBJECTATTRIBUTES +; return pointer in X4. (Modify .notifynpc if you change this routine) + X4=0 + if object>maxNpc then sxtnnotalive + X4=OBJECT + ADD X4,X4 + ADD X4,X4 + ADD X4,X4 +.sxtnnotalive + return +;--- +.SILLY + gosub @AbsCancelInput + M1=3100 + GOTO @VARYERRORM1DOT +;--- +.SPECIALDESC +; come here after all objects and exits printed +; no return necessary +; +;===== +; whisky vapour is invisible, but is can be smelt + if vapourburning<>false then novapour ; no message if vapour burning + if curtainsburning<>false then novapour ; no message if curtains burning + object=vapour + gosub @checkifpresent + if result=false then novapour + m1=2731 + gosub @printm1dot +.novapour +;--- +; message when lights on + gosub @spreadlight + if result=false then nodesclights + m1=2630 + if object=halllight then desclights + m1=2631 + if object=landinglight then desclights + m1=2632 + if object=kitchenlight then desclights +.nodesclights +;===== +; +;;.sdret ; >> Pete 14/9/89 + RETURN +; +;===== +;;.blanklinem1dot ; >> Pete 14/9/89 +.desclights + message blankline + goto @printm1dot +;===== +; +;--- +.SPECIALEXITS +; Given 'FROM' 'DIR' 'DEST' +; Modify if an exit is blocked for some reason + HIDEST=0 ; normally can't move onto a container through an exit + X1=HICURRENTPOS(ACTOR) + IF X1=0 THEN SEORDINARY +; ACTOR is on something - so exits may be different +; Standing on something, but can take as being an +; ordinary exit from the room in which the container is ('ROOM') +.SEORDINARY +;;.senotsynth ; >> Pete 14/9/89 +;;.specialexitsok ; >> Pete 14/9/89 + RETURN + +;;.seprevent ; >> Pete 14/9/89 +;;.SEFALSE ; >> Pete 14/9/89 +; Exit is not present + DEST=0 + EXITVISIBLE=FALSE + RETURN +;--- +.SPECIALDROPS +; trying to drop 'OBJECT' to position HIPOS, POS +; Print appropriate message if desired +; and return RESULT=FALSE if ACTOR is to be prevented from dropping it +; if hipos=0 then sdnotputonobject +;.sdnotputonobject ; not going to a container + RESULT=TRUE ; allow it to be dropped + RETURN +;--- +.SPECIALACTOR +; print ACTOR + + x1=hicurrentpos(actor) + if x1=0 then specialActor1 + x1=currentpos(actor) + if x1=tank then sa1 + if x1<>ice then specialactor1 +.sa1 +; print "the container was..." + object=x1 + verb=iam + goto @printObjectVerb +.specialActor1 + + lastwordprinted=actor ; force it to print the article - 'you' + verb=iam + goto @printACTORverb +;--- +; CHECK IF ACCESSIBLE BEFORE CHECKING OBVIOUS THINGS LIKE OBJECT IS +; OMNI PRESENT, OR OWNED BY SOMEONE ELSE. +; +.specialcheckifaccessible +; if no special code is needed, LEAVE RESULT UNCHANGED +; otherwise return RESULT=TRUE if OBJECT is accessible to VERB +; or RESULT=FALSE if not accessible. +; *graham* this is necessary when using two objects for a wardrobe etc. +; (i.e. a wardrobe which is open, and one which is closed) + if processingsay=TRUE then conditionaltrue ;*graham* bug fix. sciatrue +;;.sciaNotAutomatic ; >> Pete 14/9/89 + if verb=ifollow then conditionaltrue ;*graham* bug fix + if verb=isetupgo then conditionaltrue ; sciatrue + if verb=igdgo then conditionaltrue ; sciatrue + if verb=isetupfind then conditionaltrue ; sciatrue + if verb=igdfind then conditionaltrue ; sciatrue + if verb=igetme then sciatrue + if verb=iwaitforperson then conditionaltrue ; sciatrue ; wait for ... + if verb=iwaitforperiod then conditionaltrue ; sciatrue ; wait for ... + if verb=iwaituntiltime then conditionaltrue ; sciatrue ; wait until ... + if object<>generaldoor then scianotdoor + gosub @setupdoor + if door=TRUE then sciatrue + goto @returnfalse +; +.scianotdoor +; +; can't reach items out of container + outofreach=false + return ;; if object<>248 then objectisnotIT + +;;.setoutofreach; >> Pete 14/9/89 +;; outofreach=true ; otherwise, it is treated as out of reach; >> Pete 14/9/89 +;; goto @returnfalse; >> Pete 14/9/89 +;;.notoutofreach ; >> Pete 14/9/89 +; +;===== +; Can't access object (body, jeans etc.) while they're inside the +; tank, and the lid is on. +;; x1=currentpos(lid) ; >> Pete 14/9/89 +;; if x1<>tank then bodyaccessible ; lid not on ; >> Pete 14/9/89 +;; pos=tank ; >> Pete 14/9/89 +;; hipos=in ; >> Pete 14/9/89 +;; x8=result ; >> Pete 14/9/89 +;; gosub @checkobjectpos ; >> Pete 14/9/89 +;; if result=true then setoutofreach ; object is inside ; >> Pete 14/9/89 +;; result=x8 ; >> Pete 14/9/89 +;;.bodyaccessible; >> Pete 14/9/89 +;===== +; +;; return; >> Pete 14/9/89 +;--- +.conditionaltrue +; only true if OBJECT exists in the game + x1=currentpos(object) + if x1=0 then @returnfalse +.sciatrue + result=TRUE + return +;--- +;;.isobjectalive ; >> Pete 14/9/89 +; return result=TRUE if it is +;; if object>maxnpc then @returnfalse ; >> Pete 14/9/89 +;; gosub @SetX4ToObjectAttributes ; >> Pete 14/9/89 +;; x1=hitpointOffset ; >> Pete 14/9/89 +;; add x1,x4 ; >> Pete 14/9/89 +;; x1=npcCurrent(x1) ; >> Pete 14/9/89 +;; if x1>0 then sciatrue ; >> Pete 14/9/89 +;; result=FALSE ; >> Pete 14/9/89 +;;.ioaret ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +; +.specialdescbeforeexits +; printed immediately after short+long room descs. +; no return needed +; +;;.printdistantfeatures ; >> Pete 14/9/89 +; what is the height of the current location? +; what is the special feature at the current location? +; +;; return ; >> Pete 14/9/89 +;--- +;;.calcheight ; >> Pete 14/9/89 +; return x1 = height of ROOM with scenery object x4 +; x4=1..25 corresponding to room if special feature +;; return ; >> Pete 14/9/89 +;--- +;;.CalcTerrainAndTree ; >> Pete 14/9/89 +; return x1=tree type and x2+x3=terrain type +; for ROOM. +;; return ; >> Pete 14/9/89 +;--- +.GetXY +; return X=x co-ordinate on grid +; Y=y co-ordinate on grid + if room>minsynthroomminus1 then getxysynth +; fixed room + x=0 + y=0 + return + +.getxysynth + x1=room +;;.getxyx1 ; >> Pete 14/9/89 + x2=minsynthroomminus1 + sub x1,x2 + sub x1,c1 + x2=xmaxplus1 + gosub @x1divx2 + y=x1 ; y:=room div xmax = y co-ordinate + add x2,x3 + x=x2 ; x:=room mod xmax = x co-ordinate + return +;--- +.convertroom +; return x1 as the room number for the description +; printed by a room object being here. +; descriptions are in table with offsets 240..255 +; exits are stored in table from room 10..30 + x1=minsceneryobjt2m1 ; double to give index into initial pos +.cr1 + x2=objectstart(x1) + if x2=room then crfound + add x1,c2 + if x1> Pete 14/9/89 +;; object=user ; >> Pete 14/9/89 +;; gosub @SetX4toObjectAttributes ; >> Pete 14/9/89 +;; x1=hitpointoffset ; >> Pete 14/9/89 +;; add x1,x4 ; >> Pete 14/9/89 +;; x1=npccurrent(x1) ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.specialactivatenpc +; We are activating npc ACTOR +; Put special code handlers for them HERE. +; Set processed=TRUE if they have already done +; everything they are going to this turn. +; return verb<>0 to do that action +; +; THIS IS LIKE A KIND OF TIMEDEPENDANT FOR NPCs. +; +;===== +; ghosts complain if light present. + npcdistressed=false ; not distressed YET + gosub @spreadlight + if result=false then ghostnotdistressed ; no light present +; +; headlights are treated specially + if object<>headlights then sanotheadlights + if cartimer=2 then @startledheadlights ; user is startled by headlights +.sanotheadlights +; + random x1 + if x1>128 then ghostdistressed + gosub @printactor ; + m1=2600 + gosub @varymessage ; complain about + gosub @printtheobject ; + gosub @printdot +; ghost is distressed, so ignore current command unless it is +; a movement verb. +.ghostdistressed + npcdistressed=true ; only allow movement verbs + goto sanok +.ghostnotdistressed +;===== +; +.sanOK + processed=false ; no special code - so allow npc to activate +;;.sanRet ; >> Pete 14/9/89 + return + +;;.sanOKm1dot ; >> Pete 14/9/89 +;; gosub @printm1dot ; >> Pete 14/9/89 +;; goto sanok ; >> Pete 14/9/89 + +;;.saPreventActorM1Dot ; >> Pete 14/9/89 +;; gosub @printActor ; >> Pete 14/9/89 + +;;.setProcessedM1Dot ; >> Pete 14/9/89 +;;.saPreventM1Dot ; >> Pete 14/9/89 +; print m1, do nothing else this turn +;; gosub @printM1Dot ; >> Pete 14/9/89 + +;;.saPrevent ; >> Pete 14/9/89 +;; processed=true ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +;;.isobjectalert ; >> Pete 14/9/89 +; return result=TRUE if OBJECT is awake +;; gosub @isobjectalive ; >> Pete 14/9/89 +;; if result=FALSE then ioalertret +;;.ioalertret ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.canactormove +; return result=FALSE if ACTOR is prevented from moving + result=TRUE +;;.camret ; >> Pete 14/9/89 + return +;--- +.canactorrandommove +; return result=TRUE if actor can make random moves + x1=hicurrentpos(actor) + if x1<>0 then carmfalse + random x1 ;* + if x1>128 then carmfalse ;* + result=true + if actor<>joe then carmfalse +;===== +; make sure joe can't wander onto the road by himself. + if room=11 then carmfalse ; >> GMJ 20/9/89 +; make sure joe cant wander on his own up the stairs and get +; zapped by luke + if room<>14 then carmret +;===== +.carmfalse + result=false ; no-one moves at random in this part. TRUE +.carmret + return +;--- +;;.handleinterruption ; >> Pete 14/9/89 +; ACTOR has been interrupted in the middle of something +; Do whatever you see fit, then return +; No values need be returned +;; return ; >> Pete 14/9/89 +;--- +.specialrtmessage +; actor is just about to print M1 as part of a racetrack +; instruction. Use this hook to intercept particular things +; which may happen in the message which cannot be easily +; coded elsewhere. +; +;===== +; joe follows user after his introductory racetrack + if m1<>JoeIntroMess then NotJoeIntro + object=joe + gosub @SetX4ToObjectAttributes + x1=followOffset + add x1,x4 + npccurrent(x1)=c1 ; make joe follow me +; + cif Includepictures + x1=28 + gosub @drawpicturex1 ; pic for joe + cend ; Includepictures +.NotJoeIntro +;===== +; + return +;--- +;;.newracetrackforobject; >> Pete 14/9/89 +; start racetrack x6 for actor OBJECT +;; actorsave=actor; >> Pete 14/9/89 +;; actor=object ; replace its racetrack with a new one...; >> Pete 14/9/89 +;; gosub @setACTORATTRIBUTES; >> Pete 14/9/89 +;; gosub @stop ; kill existing racetrack; >> Pete 14/9/89 +;; x1=x6 ; race track number to execute; >> Pete 14/9/89 +;; gosub @initracetrackx1; >> Pete 14/9/89 +;; actor=actorsave; >> Pete 14/9/89 +;; goto @resetactor ; from actorsave; >> Pete 14/9/89 +;--- +.checknullaction +; ACTOR has no stack actions to do, so we may want to start up a new +; one. This is used for people such as the valkyrie in Knight Orc, +; for whom it is VITAL that they should not become 'unhooked'. Set +; ORDERWAITING to the first command to execute, if you want ACTOR +; to obey it immediately. +; if actor=* then RestartRacetrack + return + +;;.RestartRacetrack ; >> Pete 14/9/89 +; restart the original racetrack +;; x6=actor ; >> Pete 14/9/89 +;; object=actor ; >> Pete 14/9/89 +;; goto @NewRaceTrackForObject ; >> Pete 14/9/89 +;--- +.specialcheckifpresent +; have just checked if object is present +; Add special modifiers here. +; return RESULT=TRUE if object here. + return +;--- +.specialinitnpcs + return +;--- +;;.destroyobject ; >> Pete 14/9/89 +; object gets destroyed, and replaced in a location as appropriate +;; currentpos(object)=c0 ; >> Pete 14/9/89 +;; hicurrentpos(object)=c0 ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.createobject +; OBJECT gets created in current room + currentpos(object)=room + hicurrentpos(object)=c0 +;===== +; handle playerobject=0 if player loses the object + if object<>playerobject then createobjectret + playerobject=0 +.createobjectret +;===== + return +;--- +.createobjectpos +; create OBJECT at position HIPOS, POS + currentpos(object)=pos + hicurrentpos(object)=hipos + return +;--- +.TRIGGERWORDS +; check current word to see if it is a trigger word +; ACTOR is the target of conversation + return +;--- +.tell + goto @noverb +;--- +;;.isactorflying ; >> Pete 14/9/89 +; return RESULT=TRUE if ACTOR is flying +;; result=FALSE ; >> Pete 14/9/89 +;;.iafret ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;---------------- +.specialconversation +; USER is saying 'verb prep noun1 noun2' to ACTOR +; make any intercepts you fancy. +; If the command is not to be stored, set PROCESSED=TRUE +; and SAYRESPONSE=TRUE +; +; see also TRIGGERWORDS +; +;===== +; spook.1 humans can't see player + if actor199 then scprint + if verb<20 then scNotSystem + if verb<32 then scPrint ; system verbs - SAVE, RESTORE etc. +.scNotSystem + return ; nothing unusual - probably an order, so pass back +; for normal handling code to cope with it. +; +.scprint + goto scpreventVaryM1Dot +; +;--- +.scPreventActorM1Dot + gosub @ActorM1Dot + goto scPrevent +; +.NPCHELLO +; ACTOR is the person the user is trying to talk to, who is here + m1=3170 ; hello +.scPreventVaryM1Dot + LASTWORDPRINTED=0 ; prevent use of IT + gosub @varysaym1dot +.scprevent + SAYRESPONSE=TRUE + processed=TRUE +;;.NPCHELLOret ; >> Pete 14/9/89 +;;.scNoPrint ; >> Pete 14/9/89 + RETURN +; +;;.scpreventm1dot ; >> Pete 14/9/89 +;; gosub @printm1dot ; >> Pete 14/9/89 +;; goto scprevent ; >> Pete 14/9/89 +;--- +;;.empty ; >> Pete 14/9/89 +;;.pour ; >> Pete 14/9/89 +;; goto @silly ; >> Pete 14/9/89 +;--- +.knock + gosub @printactor + m1=2417 + goto @printm1dot ; rat-a-tat-tat +;--- +;;.WaterSomething ; >> Pete 14/9/89 +;;.checkForWater ; >> Pete 14/9/89 +;; goto @noverb ; >> Pete 14/9/89 +;--- +.hold +; if noun1=chandelier then @done + goto @take +;--- +.wave + goto @printactorverbdot +;--- +.win + x1=12 + gosub @addscore25 + message 2751 ; same message for all or part of evidence found, + message 2753 ; but with a bit bolted on when all evidence is found. + message blankline + gosub @score +;cif NotDiskVersion +; gosub @OfferSave ;>>mike19/10/88 +;cend + gosub @calcscore ;***** + valuesave=x4 ;carry score to next part (hopefully!)***** + thispart=0 ;***** + parttochain=3 + goto @chainparttochain +;--- +.SpecialConjugate +; return x1 as type for noun x2 (if different to that in the table) +;; if x2=edna then scProperFemale +;;.scNotPF ; >> Pete 14/9/89 + return +;;.scProperFemale +;; x1=ProperFemale +;; return +;--- +.SpecialEchoVerb +; trap any unusual responses, then set result=true to prevent +; printing the standard reply + result=false ; do standard reply + return +;--- +.specialEssentialInit +; DEFINE disabled as npc's which are temporarily inactive - +; i.e. npc's which are in a different part to the user. +; disable/re-enable npcs as appropriate - just +; swap over bit 6 of the "enemy" flag + return +;--- +; SPECIALNPCGOLDSINGING ( Graham 17/12/87 Bits of 8ish ) +; For special cases such as when ACTOR is p*ssed off or whatever. +; E.g. when waiting for something, "I'm getting p*ssed off.", +; "I'm getting bored sh*tless.", "B*llocks to this.", etc. +; +.SPECIALNPCGOLDSINGING +; + if descriptionmode=ibrief then nogoldatall ; no singing if brief mode + random x1 +; if x1>96 then nospecialgold +; if actor=daisy then specialdaisysinging +;;.nospecialgold ; >> Pete 14/9/89 + if x1>230 then @npcgoldsinging ; no longer called from npc.txt +.nogoldatall + return +;--- +; User starts concentrating +.concentrate + if actor<>user then @printactoractiondot + concentrating=true ; set flag for concentration + return +;--- +; User is still concentrating. This is called after each subsequent +; verb is parsed while concentrating=true. +; All other verbs set concentrating=false. +.doingconcentrate + if verb=iCONCENTRATE then oktoconcentrate ; "concentrate" + if verb<15 then oktoconcentrate ; movement verbs + if verb=iSETupRUN then oktoconcentrate + if verb=iSETupGO then oktoconcentrate + if verb=iSETupFIND then oktoconcentrate + m1=2522 + if verb<89 then @stopconcentratingm1 ; "wait" variants 89 to 92 + if verb>92 then @stopconcentratingm1 ; lose concentration +; +.oktoconcentrate + m1=2520 + if room<7 then @stopconcentratingm1 ; too many ghosts in cemetary + m1=2521 + if room<11 then @stopconcentratingm1 + if room>20 then @stopconcentratingm1 ; nothing happens on green etc. + x1=8 + gosub @addscore20 + x1=room + x2=11 + sub x1,x2 ; x1=0 to 9 for "astral" rooms + x2=10 + m1=5000 ; messages start at 5000 +.findastral + if x1=0 then printastral + add m1,x2 + sub x1,c1 + goto findastral +; +; print astral message with base m1 +.printastral + add m1,astralcount + add astralcount,c1 ; add to astral timer +; +; special cases for astral messages, similar to specailrtmessage + if m1<>BuryCardMess then notmakecard ; ID card seen buried + if CardFound<>0 then notmakecard ; card already been produced + CardFound=1 ; enable card to be dug up +.notmakecard +; + cif Includepictures + if room<>15 then gangnotinkitchen + x1=16 ; normal kitchen pic + if m1<5040 then gangleftkitchen + if m1>5043 then gangleftkitchen + x1=2 ; vision of gang playing cards +.gangleftkitchen + gosub @drawpicturex1 +.gangnotinkitchen + cend ; Includepictures +; + message blankline +; +; now see if this astral message is blank + x1=m1 + x2=5000 + sub x1,x2 ; subtract base to get byte offset + x2=NullVisions +.searchNullVisions + x3=list5(x2) + if x3=0 then printastralm1dot ; end of table reached + add x2,c1 + if x3<>x1 then searchNullVisions + m1=5003 ; message was null, so use standard message +; +.printastralm1dot + if astralcount<10 then @printm1dot ; print astral message + astralcount=0 ; reset & stop at last message +; +.stopconcentratingm1 + cif Includepictures + gosub @showpicture ; cancel "vision" pics + cend ; Includepictures +; + concentrating=false + goto @printm1dot +;--- +; Freeze water in ditch +.Freeze + if object<>ditchwater then notfreezeditch ; not ditch water + x1=in + hicurrentpos(ice)=x1 + x1=ditch + currentpos(ice)=x1 ; ice appears + pos=ditchwater ; exchange all objects on + dest=ice ; water to be on ice + gosub @swapobjectpos + hicurrentpos(ditchwater)=c0 + currentpos(ditchwater)=c0 ; water disappears + goto @printactoractiondot ; "freeze water" message +.NotFreezeDitch +;--- +; Freeze plug/socket to object +; Leave this as the last FREEZE routine, since it is used by both +; by FASTEN and FREEZE +.FASTEN + if noun1=plug then freezeLEADtoNOUN2 + if noun1=socket then freezeLEADtoNOUN2 + if noun2=plug then freezeNOUN1toLEAD + if noun2<>socket then cantfreeze +.freezeNOUN1toLEAD + x1=noun2 ; FREEZE PLUG/SOCKET TO NOUN2 + noun2=noun1 ; is forced, so that the plug + noun1=x1 ; or socket can only be frozen +.freezeLEADtoNOUN2 ; to one object at once + if noun2<>body then cantfreeze + verb=ifreeze + object=noun1 + gosub @moveobjectprepnoun2 ; attach to plug to body +; the preposition "fastenedto" cannot be used for text output in +; Moveobjectprepnoun2. + x1=fastenedto + hicurrentpos(object)=x1 + return +;--- +; DIAL (telephone is broken) +.dial + object=telephone + gosub @checkifpresent + m1=2682 + if result=true then @printm1dot ; phone is broken +.CantFreeze +;;.cantdial ; >> Pete 14/9/89 +.cantignite + goto @actorcantverbnoun1dot ; phone not here +;--- +; ignite whisky vapour +.ignite + m1=2778 + if object=whisky then @printm1dot + m1=2779 + if object=curtains then @printm1dot +; +; treat "ignite pool" as "ignite vapour" + if object<>pool then notignitepool + object=vapour + noun1=vapour +.notignitepool +; + if object<>vapour then cantignite + m1=2780 + if vapourburning<>0 then @printm1dot ; already burning + currentpos(flames)=room ; create flames + vapourburning=6 ; flame duration (including + goto @printactoractiondot ; this turn) +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/averb.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/averb.txt new file mode 100644 index 0000000..5cef1aa --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/averb.txt @@ -0,0 +1,2185 @@ +; Scapeghost.2 source, copyright (C) 1988 Level 9 Computing. +; +; AVERB.TXT, fairly standard code to handle ordinary verbs (there +; is no point in writing code to handle movement; get/drop; examine +; etc. etc. afresh for each game.) You will need to make some changes, +; adding new verbs and those special cases which can't go elsewhere, +; and possibly removing verbs, e.g the combat routines if your game +; is non-violent. +; +BEGIN +; +; Start of game, transferred here directly from APARSE. +; +.normalSTARTGAME +; clear entire table area... + x1=0 + c1=1 +.clearall +; some of the table cleared here is also cleared by initnpc + currentpos(x1)=c0 ; must be done else OBJECTTRIGGER fails for OBJECT=0 + add x1,c1 + if x1VisitTableEnd then InitDone2 + add x1,c1 + add x2,c1 + goto InitDone1 + +.InitDone2 +;===== + object=joe + gosub @MakeObjectObedient +;===== + + actor=user + gosub @setuproom +; + cif Includepictures + x1=1 + gosub @drawpicturex1 + cend ; Includepictures +; + message BlankLine + gosub @PrintRoom + gosub @FirstVisit + GOTO @CANCELINPUT +;--- +.unfasten +;;.unfastentake ; >> Pete 14/9/89 + verb=itake +;--- +.GET +.TAKE +; Check for prepositions e.g. GET ON, GET OFF + IF PREP<>0 THEN TAKEFROM +.TAKEIT +;;* +; if noun1<>latch then notturnlatch +; if latchopen=true then @closelatch +; goto @openlatch +;.notturnlatch +;;* + POS=ACTOR + HIPOS=CARRIED + GOTO @MOVEOBJECT +; +.TAKEFROM +; got a preposition e.g. TAKE noun FROM ; or TAKE noun IN etc. + OBJECT=NOUN1 + POS=NOUN2 + HIPOS=NONSPECIFIC + GOSUB @CHECKOBJECTPOS +; OBJECT=NOUN1 here + IF RESULT=FALSE THEN @ITSNOTTHERE + GOTO TAKEIT +;--- +.SIT +.STAND + x8=currentpos(actor) ; x8 & x9 used to test if flopsy in vehicle (below) + X9=HICURRENTPOS(ACTOR) + lastpossibleverb=0 ; prevent prep being parsed as a verb + x1=nextverb ;* + nextverb=0 + IF PREP=ON THEN @STANDON + IF PREP=OFF THEN STANDOFF + IF PREP=UP THEN STANDUP + if prep=behind then @standin + if prep=under then @standin + IF PREP=IPIN THEN @STANDIN + IF PREP=IPOUT THEN STANDOUT +; now fix a bug - no prep parsed for get in/out + if prep<>0 then @DontUnderstand + prep=on ;* + IF x1=ivON THEN @STANDON ;* + prep=off ;* + IF x1=ivOFF THEN STANDOFF ;* + prep=up ;* + IF x1=ivUP THEN STANDUP ;* + prep=ipin ;* + IF x1=ivIN THEN @STANDIN ;* + prep=ipout ;* + IF x1=ivOUT THEN STANDOUT ;* +; GET is being used, but we can't determine which prep is, since +; NPCs don't use NEXTVERB. +; * treat as get in + x1=hicurrentpos(actor) + prep=ipin + if x1=0 then standOn ; try getting into a container +; * treat as get out + prep=ipout +; GOTO @DONTUNDERSTAND +;--- +.STANDOFF +.STANDOUT ; get out (e.g. of boat) +.STANDUP +; + currentpos(actor)=ROOM + hicurrentpos(actor)=c0 + hidest=0 ;>>added for L1 + +.ReportStand + noun1=nullobject + noun2=nullobject +; print "L got out" etc. +; commandfinished=true ; otherwise, npc's give up (dunno why!) + executeProcessed=true + fatalerror=false + gosub @printActorVerb ;>> goto @done + m1=PrepOffset + add m1,Prep + if hidest=0 then @PrintM1Dot + gosub @printM1 + x1=dest ;>>changed for L1 + gosub @printTheObjectX1 + goto @printDot +; +;--- +;;.BOARD ; e.g. boat ; >> Pete 14/9/89 +.STANDON +.STANDIN + +;;.standin0 ; >> Pete 14/9/89 + cif AllowBoat +; cart + if noun2=nullobject then okstandin + if noun2<>cart then standin4 +.okstandin + prep=in + object=cart + gosub @checkifpresent + if result=true then standOk +.standin4 + cend +; +;===== +; get in tank + if noun2=nullobject then okstandin4 + if noun2<>tank then standin5 +.okstandin4 + prep=in + object=tank + gosub @checkifpresent + if result=false then standin5 +; +; if lid of tank is already off, then actor has already been in +; tank and seen body, so allow him to stay there... + x1=hicurrentpos(lid) + if x1=0 then standok +; +; otherwise, actor does not know there is a body in the tank, and +; is drifts through tank, sees body & jumps back out, pushing the +; lid over... + object=lid + gosub @createobject ; put lid in room + m1=2691 + if actor<>user then @actorm1dot ; npc tells user about body +; + cif Includepictures + x1=8 + gosub @drawpicturex1 ; pic for body + cend ; Includepictures +; + m1=2690 + goto @printm1dot ; user sees body +; +;;; get in chimney/fireplace +.standin5 +if noun2=fireplace then @reachintochimney +if noun2=chimney then @reachintochimney +; +; get on ice +;;.standin6 ; >> Pete 14/9/89 + if noun2=nullobject then okstandin6 + if noun2<>ice then standin9 +.okstandin6 + prep=on + object=ice + gosub @checkifpresent + if result=true then standOk +;===== +; +.standin9 +;--- +.LIE + GOTO @wasteoftime +;--- +.STANDOK + x1=currentpos(actor) ;* + if x1<>object then standok1 ;* + x1=hicurrentpos(actor) ;* + if x1<>0 then @silly ;* already there! +.standok1 + PROCESSED=TRUE + HIDEST=PREP + DEST=OBJECT + gosub @ReportStand + currentpos(actor)=dest ;* + hicurrentpos(actor)=hidest ;* + return ; GOTO @NEWLOCATION ;* +;--- +.ATTACK + executeProcessed=true +; if noun1=iroom then @vandal +;;.AttackNotDoor ; >> Pete 14/9/89 + target=noun1 + if noun1>maxnpc then atnpc ; assumes nullobject=255 +.ATNPC +;===== +; hit mirror (with hard object) + if noun1<>mirror then nothitmirror + pos=actor + hipos=nonspecific + object=socket + if noun2=object then smashmirror ; + gosub @checkobjectpos ; use socket? + if result=true then smashmirror + object=plug + if noun2=object then smashmirror ; + gosub @checkobjectpos ; use plug? + if result=true then smashmirror + object=clearbulb + if noun2=object then smashmirror ; + gosub @checkobjectpos ; use clear bulb? + if result=true then smashmirrorandobject + object=pearlbulb + if noun2=object then smashmirror ; + gosub @checkobjectpos ; use pearl bulb? + m1=2721 + if result=false then @actorm1dot ; not carrying hard object +.smashmirrorandobject +; bulbs also smash if they hit mirror + currentpos(object)=c0 + playerobject=0 + m1=2723 ; both objects smash + goto smash1 +.smashmirror + m1=2722 +.smash1 + currentpos(mirror)=c0 ; destroy mirror + currentpos(alcove)=room ; create alcove + gosub @printtheobject ; + gosub @printm1dot ; mirror smashes + goto @addevidencescore +.nothitmirror +;--- +; break bulb + m1=2773 ; try dropping it + if object=clearbulb then @printm1dot + if object=pearlbulb then @printm1dot +;--- +; smash bottle + if object=whisky then @breakbottle +;===== +;;.atnsceneryobject ; >> Pete 14/9/89 +.collect +.become +.WAKE +.WASTEOFTIME + IF ACTOR<>USER THEN @NPCNOTUNDERSTOOD + M1=3160 ; don't bother group + GOTO @VARYMESSAGEDOT + +.attackPrintM1Dot + goto @PrintM1Dot +;--- +.hide +;--- +.PUT + IF NOUN1=NULLOBJECT THEN @CANTSEEWHAT + IF NOUN2=NULLOBJECT THEN @CANTSEEWHERE + OBJECT=NOUN1 + + IF PREP=ON THEN PUTON + IF PREP=UNDER THEN @PUTUNDER + IF PREP=IN THEN PUTIN + IF PREP=THROUGH THEN PUTIN +;===== +; scapeghost.2 cover bulb with foil + if prep=with then putin +; scapeghost.2 put object behind panel + if prep=behind then putin +;===== + +.CANTPUTTHERE + gosub @actorcantverbnoun1 ; can't put that + m1=2124 ; there + goto AttackPrintM1dot +;--- +.PUTON +; CHECK IF DESTINATION CAN HAVE things put on top of it +; +;===== +; various surfaces + if noun2=ice then putok + if noun2=lid then putok +;===== +; + GOTO CANTPUTTHERE +;--- +.PUTOK + OBJECT=NOUN1 + if object>minsceneryobjminus1 then @MoveObjectPrepNoun2 ; e.g. PUT HAND... + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=true then @MOVEOBJECTPrepNoun2 + m1=2127 + goto @errorm1dot ; pick it up first + +.PUTIN + cif AllowBoat + if noun2=cart then putok + cend +; +;===== +; PUT HAND THROUGH NOUN2 +; Don't actually move any objects, just print a message. + if noun1<>hand then @notputhand + prep=through +;--- +; through bricked-up door? + if noun2<>brickeddoor then notbrickeddoor + gosub @printactor + m1=2540 + if currentuserroom<>13 then @printm1dot ; hand seen from lounge + chimneyposknown=true + m1=2541 ; hand seen by user from outside + goto @forcem1dot ; chimney pos is now known +;--- +.notbrickeddoor +; through ivy? + if noun2<>ivy then notivy + gosub @printactor + if chimneyposknown=false then cantdislodgepaper + if dislodgedpaper=true then cantdislodgepaper +; +; chimney pos is known, and paper is lodged in chimney, so +; dislodge it + dislodgedpaper=true ; don't repeat dislodge + x1=fireplace + currentpos(paper)=x1 + x1=in + hicurrentpos(paper)=x1 ; paper is in fireplace + gosub @addevidencescore + m1=2542 + if currentuserroom<>17 then @printm1dot ; hand seen from outside + m1=2543 + goto @forcem1dot ; paper seen in lounge +; +; either chimney pos is unknown, or paper has already been dislodged, +; so put hand through bricked up door in lounge +.cantdislodgepaper + m1=2544 + if currentuserroom<>17 then @printm1dot ; hand seen from outside + m1=2545 + goto @forcem1dot ; hand seen by user from lounge +;--- +.notivy +;--- +; through chimney? + if noun2<>chimney then notchimney +.reachintochimney + gosub @printactor + m1=2546 + if dislodgedpaper=false then @printm1dot ; can't quite reach paper + m1=2547 + goto @printm1dot ; there's nothing there! +.notchimney +;--- +; through lid? + if noun2<>lid then notlid + m1=2549 + gosub @actorm1dot + x1=currentpos(lid) ; if lid is on tank, then + if x1=tank then throughtank ; proceed to put hand in tank + return +.notlid +;--- +; through tank? + if noun2<>tank then nottank +.throughtank + m1=2550 + if actor<>user then @actorm1dot ; npc puts hand through + m1=2548 + goto @printm1dot ; player puts hand through +.nottank +;--- +; through mirror + m1=2720 + if noun2=mirror then @actorm1dot ; reach through to alcove +;--- + if noun2<>iwall then notthroughwall ; >> Pete 17/7/89 + m1=2535 ; Waggle hand. Find nothing + goto @actorm1dot ; behind THIS wall. +;--- +.notthroughwall + if noun2=iroom then @dig ; Room=ground. >> Pete 17/7/89 + if noun2=generaldoor then @findnothing +;--- +.notputhand +;--- +; various containers + if noun2=tank then @putok + if noun2=fireplace then @putok + if noun2=alcove then @putok +;--- +;;; put light objects in pocket +;; if noun2<>pocket then notputinpocket +;; if noun1=briefcase then notputinpocket +;; if noun1clock then notputinclock + x1=currentpos(openpanel) + if x1=0 then @printm1dot ; clock is closed + noun2=openpanel +.putinclock + prep=behind + goto @putok +.notputinclock +;--- +; put bulbs in foil + if noun2<>foil then notputinfoil + if noun1=pearlbulb then @putok + if noun1=clearbulb then @putok + goto @wasteoftime +.notputinfoil +;--- +; if bulb is in foil, then treat as put foil in socket + if noun1=clearbulb then testinfoil + if noun1<>pearlbulb then endfoiltest +.testinfoil + pos=foil + hipos=nonspecific + gosub @checkobjectpos + if result=false then endfoiltest ; not in foil + noun1=foil + object=foil +.endfoiltest +;--- +; put object in hall socket + if noun2<>socketh then notputinsocketh + if noun1=clearbulb then notputinsocketh + if noun1=foil then @putok + m1=2674 + if noun1=pearlbulb then @printm1dot ; pearl bulb won't fit +.notputinsocketh +;--- +; put object in kitchen socket + if noun2<>socketk then notputinsocketk + if noun1=pearlbulb then @putok + if noun1=foil then @putok + m1=2674 + if noun1=clearbulb then @printm1dot ; clear bulb won't fit +.notputinsocketk +;===== +; +;;.objectwontfit ; >> Pete 14/9/89 + GOTO @CANTPUTTHERE + +.putunder +; + goto @cantputthere +;--- +.ISOBJECTMOVEABLE +; return R ESULT=TRUE if OBJECT can be moved + if object>maxmoveable then @returnfalse + if object> Pete 14/9/89 + result=TRUE +;;.IOMRET ; >> Pete 14/9/89 +;;.cptret ; >> Pete 14/9/89 + +;.standret ; >> Pete 14/9/89 + RETURN +;--- +.MoveObjectPrepNoun2 + pos=Noun2 + hipos=Prep + +; Super routine for moving objects about. E.g, putting something inside +; a bag. Or removing it. It differs from "NEWLOCATION", which is concerned +; with walking-about-type-movement, primarily in the way that the action +; is reported. MOVEOBJECT validates the movement before carrying it out. +.MOVEOBJECT +; Move 'OBJECT' to 'POS', 'HIPOS' +; Return RESULT=TRUE if move was successful + GOSUB ISOBJECTMOVEABLE + IF RESULT=FALSE THEN @IMMOVABLE +; is the contents already contained by the container (or V-V) ? + GOSUB @CHECKIFCONTAINED +; + IF HIPOS=0 THEN MONOTACTOR +; ACTOR to gain this object, check if is able to carry it +; actually this code is now used whenever an object +; goes to a position not on the ground. This +; is to catch people trying to avoid SPECIALTAKES + IF HIPOS<>WORN THEN MOVEOBJ1 +; is it wearable ? + IF OBJECTmaxclothes then @cantwear + +.MOVEOBJ1 +; Now check if the ACTOR is standing on it or some similar problem + OBJECTSAVE=OBJECT + DEST=POS ; save value + HIDEST=HIPOS ; save it +; + POS=OBJECT + HIPOS=NONSPECIFIC + OBJECT=ACTOR + GOSUB @CHECKOBJECTPOS +; + OBJECT=OBJECTSAVE + POS=DEST ; restore value + HIPOS=HIDEST ; restore value + IF RESULT=TRUE THEN @MOVEOBJFAIL + GOSUB @SPECIALTAKES ; game-specific take messages + IF RESULT=FALSE THEN @MOVEOBJRET +; +.MONOTACTOR + X1=CURRENTPOS(OBJECT) + IF X1<>ACTOR THEN MMNOTLOSE + X1=HICURRENTPOS(OBJECT) + IF X1=0 THEN MMNOTLOSE +; ACTOR is to lose object + IF X1<>WORN THEN MMLOSENOTWORN +; ACTOR is wearing object, if it was specified using EVERYTHING, +; then don't drop it as this could cause embarrasment + IF noun1isgd=FALSE THEN MMLOSENOTWORN + if verb=iremove then mmlosenotworn + RESULT=FALSE + if actor<>user then @npcnotunderstood + M1=2134 ; you're wearing + gosub @printM1 + gosub @printTHEobject + goto @printDOT + +.MMLOSENOTWORN + GOSUB @SPECIALDROPS + IF RESULT=FALSE THEN MOVEOBJRET + +.MMNOTLOSE + IF HIPOS=0 THEN MMNL1 + IF POS=OBJECT THEN @CANTPUTTHERE +.MMNL1 +; any other special cases ? +; +; is it going to a NPC ? + if actor=pos then montonpc ; ok for people to take things + IF HIPOS=0 THEN MONTONPC + IF POSMAXNPC THEN MONTONPC +; code here is to avoid NPCs having things put on them etc. +; or the statue / bloodworm / bat being given things +; no special cases for giving to NPC, so make it carry it + IF HIPOS=WORN THEN MONTONPC ; unless it is going to wear it + HIPOS=CARRIED + +.MONTONPC + + FROM=CURRENTPOS(OBJECT) + HIFROM=HICURRENTPOS(OBJECT) + CURRENTPOS(OBJECT)=POS + HICURRENTPOS(OBJECT)=HIPOS +; +; now decribe the move +; +; show ACTOR doing something +; verb is set up + if verb=ithrow then monodesc + objectsave=object + gosub @printACTORactiondot + object=objectsave + +.monodesc + gosub @specialaftermoveobj + goto @returnTRUE ; move went just fine! + +.MOVEOBJFAIL + M1=2131 ; you're on it + gosub @errorm1 + +.MOPREVENT + RESULT=FALSE +.moveobjret + RETURN +;--- +.POSITIONSHADOWS +; Make objects follow the ACTOR around where applicable. e.g. DOORS. +; and other objects which are in several places at once. +; +;===== +; omni objects in cemetary + if room>6 then psnotcemetary + currentpos(headstones)=room + currentpos(graves)=room +.psnotcemetary +; +; omni objects in village green, gardens and inside house + if room<8 then psnothouse + currentpos(house)=room +; +; omni objects in village green + if room>10 then psnotgreen + currentpos(grass)=room + currentpos(road)=room +.psnotgreen +; +; omni object in garden + if room>13 then psnotgarden + if room<11 then psnotgarden + currentpos(garden)=room +.psnotgarden +; +.psnothouse +;===== +; + RETURN +;--- +;===== +; moved to FREEZE +;.FASTEN +;; +; goto @actorcantverbnoun1dot +;===== +;--- +;.untiefirst +; m1=2158 ; must untie it first +; goto @printM1dot +;--- +; Move something/someone to a new location in the game, reporting the +; movement with messages such as 'X enters from the north'. +.NEWLOCATION +; Given FROM=old location, HI,DEST=new location +; and DIR=direction, +; print any messages which appear on moving through doors etc. +; GOSUB SETUPROOM + FROM=ROOM + GOSUB @SPECIALMOVES + blockedbysm=TRUE + IF RESULT=FALSE THEN @NLRET + if actor<>user then NewMoveNotUser +; +; Don't save OOPS for echo locations... + if hidest<>0 then NewMoveSaveOops + if dest>mike 28/3/88 + if dest=0 then @nlret ;>>mike 8/1/88 + FROM=ROOM +; describe door closing (if there is one) + + cif AllowBoat + if dest=cart then anl2a + cend + + IF HIDEST<>0 THEN ANL2 ; skip checks for moving into container + GOSUB @CHECKEXIT + +;;.anl2a ; >> Pete 14/9/89 + gosub @printleaving +; +.ANL2 + LASTROOM=ROOM + CURRENTPOS(ACTOR)=DEST + HICURRENTPOS(ACTOR)=HIDEST + gosub @closedoor + roomsave=ROOM + gosub @setuproom + gosub @printarrival +; no messages printed between printarrival and printroom please +;;.NLEND ; >> Pete 14/9/89 + + + cif AllowBoat + + x1=hicurrentpos(user) ;>>special to Lancelot3/boat + if x1=0 then NLEND1 + + x1=currentpos(cart) + if x1<>actor then NLNotPushingCart + x1=currentpos(user) + if x1=cart then NLPrintMoveAnyway +.NLNotPushingCart + goto NLEnd1 + +.NLPrintMoveAnyway + actorsave=actor ;>>special to Lancelot3/boat + actor=user ;>>special to Lancelot3/boat + gosub SetUpRoom ;>>special to Lancelot3/boat + gosub @printRoom ;>>special to Lancelot3/boat + actor=actorsave ;>>special to Lancelot3/boat + goto @aftermove ;>>special to Lancelot3/boat + +.NLEND1 + + cend ; end of boat stuff + + + IF ACTOR<>user THEN @AFTERMOVE ; npc doesn't want description +;;.NLENDPrint ; >> Pete 14/9/89 + timeinroom=0 + GOSUB @printROOM + gosub firstvisit + goto @aftermove + +; for user only, print any messages due on first visit +.firstvisit +; +;===== +; special code to prevent first time messages from being printed +; if the player is concentrating. this would be very confusing +; otherwise + if room<11 then novisionhere + if concentrating=true then fvret +.novisionhere +;===== +; + x1=VisitTableStart + add x1,Room + if x1>VisitTableEnd then fvret + x2=List7(x1) + list7(x1)=c0 ; prevent printing it again + x1=1350 ; base for initial visit + add x1,x2 + gosub SpecialVisitMessage + message x1 +.fvret + return +;--- +.SpecialVisitMessage +; about to print message x1 +; zero x1 if you don't want to! + if x2=0 then nosvm ; no message printed + lastwordprinted=0 ; if message printed, then clear lastwordprinted +.nosvm + return +;--- +.printLEAVING + if verb>15 then NLRet + verbsave=verb +; + cif AllowBoat +; +; moving in the cart + x1=hicurrentpos(actor) + if x1=0 then plnotinvehicle ; actor not in vehicle + x1=currentpos(actor) + if x1<>cart then plnotincart ; actor not in cart +; now check for rooms in which cart is allowed + if dest=15 then leavecart + if dest=20 then leavecart +; cart does the move, and user returns in cart + currentpos(cart)=dest + hicurrentpos(cart)=hidest + dest=cart + hidest=in + verb=2421 ; 2471-50 + gosub @printACTORverb ; the npc drove the cart to the + goto printdirectionanddoor +.leavecart + gosub @printactor ; + m1=2470 ; got out of cart + gosub @printm1 + wanttoprintand=actor + goto plnotinvehicle ; and went +.PLNotInCart +; +.plnotinvehicle + cend +; + if descriptionmode=inone then nlret +; + verb=2480 ; "trotted" group message + if actor>maxtalkingnpc then dl1 + verb=2490 ; "went" group message +;===== + if actor>maxghost then dl1 + verb=2500 ; "floated" group message +;===== +; +.dl1 +; new line when user moves + if actor<>user then notuserleaving + if wanttoprintand<>false then notuserleaving ; prevent splitting sentance +; for "got out of cart AND went..." +.notuserleaving + gosub @printACTOR ; the npc + m1=verb + gosub @varymessage ; "went" +;;.printdirectionanddoor ; >> Pete 14/9/89 + m1=verboffset ; north-1 + add m1,dir + gosub @printM1 ; direction + gosub @printdoor +; + verb=verbsave ; Bug fix. Graham 17/5/88 + if actor<>user then @printDOT ; print a dot and terminate + wanttoprintand=user ; followed immediately by description +.desclret +.nlret + return +;--- +.printdoor + IF DOOR=FALSE THEN DESCLret + M1=2115 ; through the door + goto @printM1 +;--- +.printARRIVAL +; first print description of object + if descriptionmode=inone then desclret + + IF actor=user then DESCLRET ; for startup + if verb>15 then DESCLRet + + cif AllowBoat + verb=2422 ; 2472-50 - drove the cart from the + x1=hicurrentpos(actor) + if x1=0 then PANotInBoat + x1=currentpos(actor) + if x1=cart then pa2 +.PANotInBoat + cend + + VERB=IENTER + +;;.pa2 ; >> Pete 14/9/89 + object=actor + gosub @printANobjectVERB ; the npc enters... +;;.pa3 ; >> Pete 14/9/89 + m1=584 + add m1,dir + gosub @printM1 + gosub @printdoor + goto @printdot +;--- +.TICKCLOCK +;;.TCADDMINUTES ; >> Pete 14/9/89 + GOSUB @TIMEDEPENDENTCODE + add timeinroom,c1 +; +;===== +; Now do a few things at the beginning of this turn... +; + pullingbookmark=false ; number pulling bookmark +;===== +; +;;.TCRET ; >> Pete 14/9/89 +;;.waitret ; >> Pete 14/9/89 +;;.OPENDOORRET ; >> Pete 14/9/89 +.SAYRET +;;.OPENRET ; >> Pete 14/9/89 +.throwret +;;.abnret ; >> Pete 14/9/89 +;;.pushret ; >> Pete 14/9/89 +;;.ANLRET ; >> Pete 14/9/89 +;;.dlret ; >> Pete 14/9/89 + RETURN +;--- +; +.pull +; +;===== +; 2 ghosts are required to pull the bookmark from out of the directory + if object<>bookmark then notpullbookmark + pos=directory + hipos=nonspecific + gosub @checkobjectpos + if result=false then notpullbookmark ; not in directory +; +.pullbookmark + add pullingbookmark,c1 ; add number of ghosts pulling + verb=ipull + gosub @printactoractiondot + m1=2680 + if pullingbookmark<>2 then @printm1dot ; won't come free + gosub @createobject ; (can't be TAKEn if in directory) +;; actorsave=actor ; save actor +;; actor=user +;; verb=itake ; user must be involved in +;; pos=user ; pulling bookmark, so give +;; hipos=carried ; it to him +;; gosub @moveobject +;; actor=actorsave ; recover actor + goto @addevidencescore +.notpullbookmark +;===== +; +.PUSH +; +;===== +; Convert PUSH HAND THROUGH NOUN2 to PUSH NOUN2, so that a +; non-penetrative object is actually pushed if the player +; tries to push his hand through it. +; + if noun1<>hand then notpushhand + noun1=noun2 + object=noun2 + prep=0 + if noun1=nullobject then @TVnoOBJECTerror + noun2=nullobject +.notpushhand +;--- +; Handle PUSH +; The code here may seem a little contradictory to the above code +; (i.e. replacing NOUN1 with HAND just after eliminating it), but +; it is necessary so that non-penetrative objects are actually pushed +; if the player tries to put his hand through them. +; + if object=iwall then penetrable + if object=iroom then penetrable ; Pete 17/7/89 + if object=generaldoor then penetrable + if object=lid then penetrable + if object=tank then penetrable + if object=mirror then penetrable + if object=brickeddoor then penetrable + if object=ivy then penetrable + if object<>chimney then notpenetrable +.penetrable + verb=iPUT + noun2=noun1 + noun1=hand + prep=through + goto @put +.notpenetrable +;--- +; push whisky bottle over + if object<>whisky then notpushwhisky +.breakbottle + currentpos(whisky)=c0 ; bottle smashes + currentpos(vapour)=room ; vapour fills room + currentpos(pool)=room + currentpos(brokenglass)=room + m1=2730 + goto @actorm1dot +.notpushwhisky +;--- +; push clock down stairs + if object<>clock then @notpushclock + m1=2710 + if room<>18 then @printm1dot ; already been pushed over + gosub @printactoractiondot + if currentuserroom=18 then seeclockfall + if currentuserroom<>14 then cantseeclockfall +.seeclockfall + m1=2711 ; see clock fall from + gosub @forcem1dot ; hall and hall +.cantseeclockfall + x1=14 + currentpos(clock)=x1 + hicurrentpos(clock)=c0 +; +; are plug or socket in clock? + pos=openpanel + hipos=nonspecific + object=plug + x8=socket + gosub @checkobjectpos + if result=true then clockdragsx8 ; plug is in clock, socket dragged + object=socket + gosub @checkobjectpos + if result=false then pushclockret ; neither plug not socket are in + x8=plug +.clockdragsx8 + x1=hicurrentpos(x8) + if x1=0 then leadinclock + x1=currentpos(x8) + if x1=openpanel then pushclockret ; both plug and socket are in +; +; object is in clock, but is clock closed? +.leadinclock + x1=currentpos(openpanel) + if x1=0 then clockisclosed + gosub @createobject + gosub @printtheobject ; + m1=2712 + goto @printm1dot ; remained on the hall +; +; OBJECT is trapped in clock, so X8 is dragged if applicable +.clockisclosed + object=x8 + gosub @getobjectposx2 ; x2=room of other end of lead + if x2<19 then pushclockret ; other end is not beyond hall +; +; X8 is being dragged to the hall, so carry any objects attached + x1=hicurrentpos(x8) + if x1=0 then dragobject ; no objects attached + object=currentpos(x8) + if object=body then dragobject ; only body is dragged (all + object=x8 ; other objects break free) +; +; OBJECT is dragged to the hall (this may be the end of the lead +; itself, or an object attached to it) +.dragobject + gosub @getobjectposx2 ; objects dragged are seen from + if currentuserroom=x2 then seedragged ; initial object pos & hall + if currentuserroom<>18 then cantseedragged +.seedragged + gosub @printtheobject ; + m1=2713 + gosub @forcem1dot ; was dragged to the hall +.cantseedragged + pos=14 + hipos=0 + gosub @createobjectpos + x1=10 + x2=50 + if object=body then @addscorex2 +; +.pushclockret + return +.notpushclock +;--- +; Switch hall/landing light on/off +; + if object<>switchH then notpushswitchH + gosub @spreadlight + if result=false then oktopushswitchH +; light source OBJECT is preventing ACTOR from pushing switch + gosub @printactor ; + m1=2672 ; couldn't push the switch + gosub @printm1 ; because of + gosub @printtheobject ; + goto @printdot +; +.oktopushswitchH + gosub @printactoractiondot +; + x1=1 + if hallswitchon=0 then switchHlighton ; toggle light on/off + x1=0 +.switchHlighton + hallswitchon=x1 +; + POS=socketH + gosub @blowfuse + if fuseblown=true then pushswitchHret ; fuse blown +; +; see light come on in hall? + if room<>14 then noHlightmess + x1=currentpos(clearbulb) + if x1<>socketH then seelandinglight ; no bulb, landing light only + m1=2660 + add m1,hallswitchon + gosub @forcem1dot ; hall light on/off + goto seelandinglight ; see landing light also +; +; see only landing light come on from hall or landing? +.noHlightmess + if room<>18 then noLlightmess +.seelandinglight + m1=2662 + add m1,hallswitchon + gosub @forcem1dot ; landing light on/off +; +.noLlightmess + if hallswitchon=false then pushswitchHret ; light went off +; light comes on. all ghosts in hall (providing bulb is in) or landing +; are startled and sent back to their graves. +; (NB: The hall must be handled BEFORE the landing for Luke's puzzle +; to work properly) + x1=currentpos(clearbulb) + if x1<>socketH then notstartledinhall ; skip if no bulb in hall + x8=14 + gosub startledinx8 ; else startled if in hall +.notstartledinhall + x8=18 + gosub startledinx8 ; startled if on landing + x1=currentpos(luke) + if x1=0 then pushswitchHret ; luke is startled if + object=luke ; in the game. + gosub @startled +.pushswitchHret + return +.notpushswitchH +;--- +; Switch kitchen light on/off +; + if object<>switchK then notpushswitchK + gosub @printactoractiondot + x1=1 + if kitchenswitchon=0 then switchKlighton ; toggle light on/off + x1=0 +.switchKlighton + kitchenswitchon=x1 +; + POS=socketK + gosub blowfuse + if fuseblown=true then pushswitchHret ; fuse blown +; +; see light come on in kitchen? + if room<>15 then noKlightmess + x1=currentpos(pearlbulb) + if x1<>socketK then pushswitchKret ; no bulb, so no light + m1=2664 + add m1,kitchenswitchon + gosub @forcem1dot ; kitchen light on/off +; +.noKlightmess + if kitchenswitchon=false then pushswitchKret ; light went off +; light comes on. all ghosts in kitchen are startled and sent +; back to their graves. + x8=15 + gosub startledinx8 +.pushswitchKret + return +.notpushswitchK +;--- +; Treat PUSH CURTAINS as BLOW CURTAINS + if noun1=curtains then @blowcurtains +;===== +; + goto @immovable +; +;===== +; socket POS is being switched to status X1<>0 = ON +; if fuse is still intact then test for foil in socket, and if so, +; then blow the fuse +.blowfuse + if x1=0 then bfret ; socket has been switched off + if fuseblown=true then bfret ; already been blown + object=foil + hipos=nonspecific + gosub @checkobjectpos + if result=false then bfret ; foil not in socket +; +; foil is in socket, so blow the fuse... + fuseblown=true + m1=2675 + gosub @printm1dot ; bang! +.bfret + return +;--- +; All ghosts in room x8 are startled +.startledinx8 + object=user +.isobjectstartledK + gosub @getobjectposx2 + if x2<>x8 then nextiosK ; not in kitchen + gosub @startled ; startled, so send back to grave +.nextiosK + add object,c1 + if objectluke then notstartleluke +; it is safe enough to assume that the user has been startled +; if he is back at his own grave + x1=currentpos(user) + m1=2570 ; seen from grave (player startled) + if x1=3 then banishluke + m1=2571 ; seen from inside house +.banishluke + x1=9 + gosub @addscore25 + currentpos(luke)=c0 + goto @forcem1dot ; luke is startled +.notstartleluke +; + gosub @getobjectposx2 ; set up FROM for test purposes + from=x2 + gosub @initanobject ; go back to start pos +.startled1 + gosub @stopobject ; cancel current command queue + gosub @getobjectposx2 + room=x2 ; set room to new pos of ghost + if object<>user then usernotstartled +; +; user is startled by light + x1=46 ; (start of score table+14=46) + x2=10 + x3=list7(x1) + sub x3,x2 ; score -10 each time user startled + list7(x1)=x3 +; + cif Includepictures + x1=15 + gosub @drawpicturex1 ; dazzled pic + cend ; Includepictures +; + currentuserroom=room + m1=2552 + gosub @printm1 ; found myself... + gosub @shortdesc ; + goto @printdot ; +; +; a ghost other than user is startled +.usernotstartled + m1=blankline + gosub @printm1 + gosub @printtheobject + m1=2558 ; message if user in room + gosub @printm1dot ; actor is sent to grave +;; if from<>14 then joenotstartled + x1=13 + x2=65486 + if object=joe then @addscorex2 ; score -50 for startling joe +;;.joenotstartled ; >> Pete 14/9/89 + return +;===== +; +;--- +.OPEN + if noun1<>generalDoor then OpenNotDoor + IF DOOROPEN=TRUE THEN @ALREADYOPEN +;;.OpenDoor ; >> Pete 14/9/89 +;;.OpenDoorOk ; >> Pete 14/9/89 + DOOROPEN=TRUE + goto @printACTORactiondot + +.OpenNotDoor +; + if noun1=openpanel then alreadyopen + if noun1=closedpanel then doopenpanel + if noun1<>clock then notopenpanel + x1=currentpos(openpanel) + if x1<>0 then alreadyopen +.doopenpanel + currentpos(closedpanel)=c0 + x1=clock + currentpos(openpanel)=x1 + itword=openpanel + goto @printactoractiondot +.notopenpanel +; +.DONTNEEDTODOTHAT + m1=2148 ; you don't need to do that + goto @errorM1dot +;--- +.ALREADYOPEN + M1=2117 ; already open + GOTO @errorM1dot +;--- +.GIVE + HIPOS=CARRIED + IF NOUN2=USER THEN GIVENPC + IF NOUN2> Pete 14/9/89 +;===== +; throw hard object at mirror to smash it + if noun2<>mirror then notthrowatmirror + if object=clearbulb then @smashmirror + if object=pearlbulb then @smashmirror + if object=plug then @smashmirror + if object=socket then @smashmirror +.notthrowatmirror +;===== + + verb=ihit + gosub @printOBJECTverb ; prints 'the object hits' + object=noun2 + gosub @printTHEobject2 ; print out him etc. + goto @printdot +;--- +.CHECKIFLIGHT +; Return RESULT=TRUE if room is illuminated +; (either naturally or by objects etc.) + goto @ReturnTrue + +;--- +.BRIEF +.VERBOSE + NORMALDESCRIPTIONMODE=VERB + GOTO @DONE +;--- +.immovable + if actor<>user then @actorcantverbnoun1dot + gosub @printTheObject + m1=3150 ; won't move + goto @varyERRORM1dot +; +.cut +;;.squeeze ; >> Pete 14/9/89 +;;.badobject ; >> Pete 14/9/89 +.cantwear + goto @actorcantverbnoun1dot +;--- +.initlocations +; go through and place the special locations in +; appropriate pseudo-random locations.. +.drret + return +;----------------------------- +.shortdesc ; print the short description for ROOM +; if room> Pete 14/9/89 + cif Includepictures + picturetodraw=room + cend ; Includepictures +; + x1=shortroomdescs + add x1,room + message x1 + return +;--- +.printROOM + cif Includepictures + picturetodraw=0 + cend ; Includepictures +; + LASTWORDPRINTED=0 ; prevent printing of 'it' + GOSUB @POSITIONSHADOWS + if room=DestToDescribeExitsIn then dr1 + if descriptionmode=inone then drret +; +.dr1 + if actor<>user then drret ; never any description for npcs + GOSUB @CHECKIFLIGHT + IF RESULT=TRUE THEN DESCROOM1 + if wanttoprintand=FALSE then dr2 + wanttoprintand=FALSE + message dot ; not linked to previous message +; +.dr2 + MESSAGE 2021 ; It's dark + cif Includepictures + LASTPICTURE=0 + CLS G ; clear graphics window + cend ; Includepictures +; +;;.DescRoomRet ; >> Pete 14/9/89 + RETURN +;--- +.DESCROOM1 + GOSUB @SPECIALactor ; print 'You are..' + GOSUB @SETUPROOM +; +;;.ABSDESCROOM ; >> Pete 14/9/89 + gosub shortdesc +; + if roomIBRIEF THEN DESCROOM3A + if room=DestToDescribeExitsIn then descroom3a ; full desc of destinat + message dot + if AutoExits=ivoff then briefexits + GOSUB @PRINTEXITS +.briefexits + if normalDescriptionMode<>ibrief then descroom3e +; + cif Includepictures + gosub showpicture ; >> Pete. Start selected picture drawing. + cend ; Includepictures + GOTO DESCROOM3C +; +.DESCROOM3A + X1=LONGROOMDESCS + ADD X1,ROOM + MESSAGE X1 + MESSAGE DOT ; >> PETE. Moved from after DESCROOM3 +; + cif Includepictures + gosub showpicture ; start selected picture drawing. + cend ; Includepictures + +;;.DESCROOM3 ; >> Pete 14/9/89 + gosub @specialdescbeforeexits +; if OnRiver=True then descroom3c + if AutoExits=ivoff then descroom3c + GOSUB @PRINTEXITS +; +.DESCROOM3C +.descroom3e + SEARCHPOS=ROOM + HISEARCHPOS=0 + GOSUB @PRINTOBJECTS +;>>mike 8/2/88 GOSUB @DESCactor + GOTO @SPECIALDESC +;--- +.showpicture +; displaypicture for room PICTURETODRAW +; + cif Includepictures + x3=startpicturetable +.scanforpicture + x2=list5(x3) ; get room + add x3,c1 + x1=list5(x3) ; get pic + add x3,c1 + if x2=room then sdrawpicturex1 + if x2<>0 then scanforpicture + return +; +; Special exceptions for drawing picture X1 in ROOM +.sdrawpicturex1 +; +;===== +; joe danby at his grave + if room<>4 then spnotjoe + object=joe + gosub @checkifpresent + x1=28 + if result=true then spnotjoe ; joe here + x1=13 ; not here (show graveyard) +.spnotjoe +;--- +; herb garden with map + if x1<>19 then spnotmap + x2=currentpos(ice) + if x2=0 then spnotmap ; no ice - map must be here + x1=16 ; else show vicarage +.spnotmap +;--- +; body in tank + if room<>20 then spnotbody + x2=currentpos(lid) + if x2=tank then spnotbody ; tank closed + x2=currentpos(body) + if x2<>tank then spnotbody ; body not in tank + x1=8 ; body pic +.spnotbody +;--- +; house on fire? + if curtainsburning=0 then spcurtainsnotburning + if x1<>16 then spcurtainsnotburning ; vicarage garden + x1=17 ; flames leap at the window +;===== +; +.spcurtainsnotburning + goto @DrawPictureX1 + cend ; Includepictures + RETURN +;--- +.CHECKEXIT + ceroomsave=room + room=from + GOSUB ABSCHECKEXIT + room=ceroomsave + GOTO @SPECIALEXITS ; Exits conditional on game +;--- +.ABSCHECKEXIT +; EXIT ( From FROM diection DIR ) +; return DEST, DOOR, EXITVISIBLE + door=FALSE + dest=0 + exitvisible=FALSE + if room2 then checkexitstatus ; do rest of fixed exit code ;>>L1 was 1 +;>> - allow multiple size grids. +; room 1 gives modifiers for synth rooms. +;>>L2 - also room 2 +; +.acesynthesised +; ++++ please note: must have done gosub getXY BEFORE calling + if dir=8 then acenorth + if dir>2 then acenotnorth +.acenorth + if y=ymax then acenoexit +.acenotnorth + if dir=2 then aceeast + if dir=3 then aceeast + if dir<>5 then acenoteast +.aceeast + if x=xmax then acenoexit +.acenoteast + if dir=6 then acesouth + if dir=5 then acesouth + if dir<>4 then acenotsouth +.acesouth + if y=0 then acenoexit +.acenotsouth + if dir<6 then acenotwest + if dir>8 then acenotwest + if x=0 then acenoexit +.acenotwest +; look at the exit from room 1 to get the destination modifier + x1=2 ; >>special to L1 - use exits from room 2 instead of the usual 1 + exit x1 dir status dest + if dest=0 then acenoexit + add dest,from + x1=dest + x2=256 + gosub @x1modx2 + dest=x1 + exitvisible=TRUE + return +; +.acenoexit + dest=0 + return +; +.fixedexit ; See if there any fixed exits from here. + DOOR=FALSE + EXITVISIBLE=FALSE + EXIT ROOM DIR STATUS DEST + if dest=2 then ceret ; room 1 is used to give ;>>L1 - 2 instead of 1 +; move modifiers for synthesised rooms. + IF DEST=0 THEN CERET + if dest1 THEN CERET + EXITVISIBLE=TRUE +.CERET + RETURN +;--- +.close + if noun1<>generaldoor then closenotdoor + dooropen=FALSE + goto @printACTORactiondot +;--- +.closenotdoor +; + if noun1=openpanel then doclosepanel + if noun1<>clock then notclosepanel + x1=currentpos(closedpanel) + if x1<>0 then notclosepanel +.doclosepanel + currentpos(openpanel)=c0 + x1=clock + currentpos(closedpanel)=x1 + itword=closedpanel + goto @printactoractiondot +.notclosepanel +; + goto @dontneedtodothat +;--- +.closedoor +; subroutine called whenever door is to be closed +; (e.g. moving though it) + if actor<>user then closedoorret + dooropen=FALSE +; +.closedoorret + return +;--- +.parserun +; verb=isetuprun here + againverb=isetuprun + goto parsego1 +; +.parsego + againverb=isetupgo +; verb=isetupgo here +.parsego1 +; return noun1 as room number of destination + noun1=nullobject +;>>removed by L2 treetype=0 +;>>removed by L2 terraintype=0 +;;.gad1 ; >> Pete 14/9/89 + adjective1=nullobject + adjective2=nullobject + treatasfind=FALSE + gosub getpart + if gperror=TRUE then baddestination + if treatasfind=TRUE then parsefindvalue + if verb=0 then gadnotmove + if verbnullobject then gadend ; exit tidily for 'go interesting place' + goto baddestination +; +.gadend +; clean up rest of input - may be useful, intelligent stuff, +; or it may be complete garbage +; Loop until we get a verb + if nomoreinput=TRUE then gadret + gosub @getnextword + searchtype=verbtype + gosub @checktype + if value=nullvalue then gadend + gosub @goback ; retrieve verb for later parsing +.gadret + againnoun1=noun1 + noun2=nullobject + return +;--- +.parsefindvalue +; user entered 'go moveable object' +; treat as find + if verb<>isetuprun then pfv1 + descriptionmode=inone +; +.pfv1 + verb=isetupfind + noun1=value + noun2=nullobject + prep=0 + return +;--- +.baddestination ; a parser error + gosub @stop + noun1=nullobject + verb=0 + goto @cantseewhere +;--- +.getparterror + gperror=TRUE + return +;--- +.getpart +; return noun1 as destination room, +; or verb=direction to move in +; or treetype/terraintype + gperror=FALSE + gosub @getnextword + if eol=TRUE then getparterror +; just possibly, could be a direction + searchtype=verbtype + gosub @checktype + if value=nullvalue then getpart1 + if value=ivto then getpart ; go to ... + if value>maxdirection then getpart1 ; strange verb + verb=value + return +; +.getpart1 + searchtype=adjetype + gosub @checktype + if value=nullvalue then getpart2 + adjective1=value + gosub @checktypemore + if value=nullvalue then getpart2 + adjective2=value +; +.getpart2 + index=0 +.goloop + searchtype=nountype + gosub @checktypemore + + if value=nullvalue then getpart ; ignore garbage words here. + if value>mingarbage then getpart + if adjective1=nullobject then goloopnoadjective + if value=adjective1 then goloopnoadjective ; could be right dest + if adjective2=nullobject then goloopnoadjective + if value>adjective2 then goloopnoadjective + if value<>adjective2 then goloop ; can't be right destination +; +.goloopnoadjective + if value>maxsceneryobj then goloopnotlocationobject +; +;;.golooptreatasfind ; >> Pete 14/9/89 +; does object exist in game? + + gosub @HandlePairedObjects ;*graham 21.2.89* + + x1=currentpos(value) + if x1=0 then goloop + treatasfind=TRUE + return +; +.goloopnotlocationobject +; maybe 'go static location' +; if so, extract room number + if value<500 then goloop ; shortroomdescs-nounoffset + x1=500 ; shortroomdescs-nounoffset + noun1=value + if value<800 then goloopshortdescs ; longroomdescs-nounoffset + x1=800 ; longroomdescs-nounoffset +.goloopshortdescs + sub noun1,x1 + return +;--- +.gdgoxy + if ynoun2 then gdgosouth +; y=y1; so just go east or west + if x=noun1 then @followfinished ; have arrived at destination, terminate command + dir=3 ; east + if x>mike 8/2/88 + gdHiSave=hicurrentpos(actor) ;>>mike 8/2/88 +.gdtrydir + from=room + dir=intendeddirection + gosub adddir +; + gosub @checkexit + if exitvisible=FALSE then tryanotherdirection + if dest>mike 8/2/88 +; +;;.gdt1 ; >> Pete 14/9/89 + if room=destnoun1 then @followjustfinished + return ; all went well. +;--- +.tryanotherdirection +; have reached an obstruction in a goaldirected movement + if anglefromintended>negative then tad2 ; am wheeling to left + if anglefromintended<>0 then tad1 ; am wheeling to right + anglefromintended=1 + goto gdtrydir +;--- +.tad1 +; was not going in intended direction when the obstruction +; was reached +; try wheeling round to right (clockwise) + if anglefromintended=2 then tad2a + add anglefromintended,c1 ; try +1, +2 + goto gdtrydir +;--- +.tad2a + anglefromintended=0 +.tad2 +; try wheeling round to left + if anglefromintended=65534 then @cantgothere ; can't cope at present + sub anglefromintended,c1 ; try -1,-2 + goto gdtrydir +;--- +.adddir +; do add dir,anglefromintended +; this is complicated because south,southeast are swapped round +; Also must wrap round at north, northwest +; +; first, swap south,southeast + gosub swapdir + add dir,anglefromintended + gosub makedirwithinbounds +; fall through to swapdir ; and swap back again +; +.swapdir +; swap round south, southeast + if dir<>4 then swapdirnotsouth + dir=5 + return +;--- +.swapdirnotsouth + if dir<>5 then swapdirret + dir=4 + +.swapdirret + return +;--- +.makedirwithinbounds + if dir<9 then mdwb1 + dir=1 + return +;--- +.mdwb1 + if dir>0 then mdwb2 + dir=8 +.mdwb2 +.diwtret +;;.mmdret ; >> Pete 14/9/89 +;;.teleportret ; >> Pete 14/9/89 +;;.ringret ; >> Pete 14/9/89 + return +;--- +.teleport + cif allowCheat +; we came here straight from the parser, so set up verb... + if cheatmode=0 then @nicetry + verb=iteleport +.allowteleport + gosub @parsego + if noun1=nullobject then teleportret + if verb<>isetupfind then teleporttonoun1 + object=noun1 + gosub @getobjectposx2 + noun1=x2 +; +.teleporttonoun1 + dest=noun1 +; +.magicmove + hidest=0 +; +.magicmovedest + if dest=0 then mmnomove + if dest<2 then @cantseewhere + currentpos(actor)=dest + hicurrentpos(actor)=hidest +.mmaftermove + gosub @setuproom + gosub @getxy + if actor<>user then mmdret + currentuserroom=room + gosub @printroom + GOTO @CANCELINPUT +;--- +.mmnomove + cend ; allowcheat + + m1=2995 ; you end up where you were + gosub @printM1dot + goto @cancelinput ; goto mmaftermove +;--- +.noexit + m1=2114 ; no exit! + gosub @errorM1dot ;* + if actor=user then @printexits ;* + return ;* +;--- +.dig +; +;===== +; find ID card in herb garden + if room<>12 then notdigherbs + gosub @findcard + if result=false then @findnothing ; find nothing + return +.notdigherbs +;===== +; + m1=2561 ; reached into ground but found nothing. >> Pete + goto @actorM1dot ; >> Pete 17/7/89 + +;--- +.forcem1dot +; same as MESSAGE M1, except that message will be intercepted for "PET" + gosub @forcem1 + message dot +;;.snapret ; >> Pete 14/9/89 +;;.PlayRet ; >> Pete 14/9/89 +;;.drinkret ; >> Pete 14/9/89 + return +;--- +.ring ; ring/play/blow +; +;===== +; blow curtains into flames to ignite them + if object<>curtains then notblowcurtains +.blowcurtains + m1=2737 + if curtainsburning>0 then @actorm1dot ; already burning! + m1=2738 + if vapourburning=0 then @actorm1dot ; vapour not burning! + m1=2771 + if actor<>user then @actorm1dot ; joe doesn't want to start +; a fire (this also prevents endgame being executed if user is away +; from house) + curtainsburning=3 + vapourburning=0 ; only curtains burning now + x1=11 + gosub @addscore25 +; + cif Includepictures + x1=17 + gosub @drawpicturex1 ; burning pic + cend ; Includepictures +; + m1=2739 + goto @actorm1dot +.notblowcurtains +;--- +; failed attempts at blowing map/branch/water + x8=object ; save object + object=map + pos=branch + hipos=nonspecific + gosub @checkobjectpos + object=x8 ; recover object + if result=false then notblowbranch ; map not on branch + m1=2566 ; map just flutters on branch + if object=ditchwater then blowm1dot + if object=ice then blowm1dot + if object=branch then blowm1dot + if object=map then blowm1dot +.notblowbranch +; + goto @wasteoftime +.blowm1dot +;===== + goto @printm1dot +;--- +.make +;;.CrossRet ; >> Pete 14/9/89 +.fill +.snap +.plant + goto @noverb +;--- +.drink + m1=285 ; bleuch + goto @errorm1dot +;--- +.eat +;;.yeuch ; >> Pete 14/9/89 + m1=107 ; Yeuch! + goto @errorm1dot +;--- +;;.actordeath ; >> Pete 14/9/89 +;; target=actor ; >> Pete 14/9/89 +; +;;.targetdeath ; >> Pete 14/9/89 +; enemies don't hate it any more... +;; x4=enemyoffset ; >> Pete 14/9/89 +;;.targetdeath1; >> Pete 14/9/89 +;; x1=npccurrent(x4) ; >> Pete 14/9/89 +;; if x1<>target then targetdeath2 ; >> Pete 14/9/89 +;; npccurrent(x4)=c0 ; >> Pete 14/9/89 +;;.targetdeath2; >> Pete 14/9/89 +;; x1=npcentrysize ; 16 ; npcentrysize ; >> Pete 14/9/89 +;; add x4,x1 ; npc entry size ; >> Pete 14/9/89 +;; if x4> Pete 14/9/89 +; +; set target to have 0 hit points (for benefit of NPC.TXT, if nowt else) +;; OBJECT=TARGET ; >> Pete 14/9/89 +;; GOSUB @SetX4ToOBJECTAttributes ; >> Pete 14/9/89 +;; X1=HITPOINTOFFSET ; find hit points ; >> Pete 14/9/89 +;; ADD X1,X4 ; >> Pete 14/9/89 +;; npccurrent(x1)=c0 ; >> Pete 14/9/89 +;; HIPOS=CARRIED ; only drop carried things, not worn etc. ; >> Pete 14/9/89 +;; POS=TARGET ; >> Pete 14/9/89 +;; DEST=ROOM ; >> Pete 14/9/89 +;; HIDEST=0 ; >> Pete 14/9/89 +;; GOSUB @POSSLOOP ; drop everything ; >> Pete 14/9/89 +;; actorsave=actor ; >> Pete 14/9/89 +;; actor=target ; >> Pete 14/9/89 +;; GOSUB @stop ; don't let it continue with commands !!! ; >> Pete 14/9/89 +;; actor=actorsave ; >> Pete 14/9/89 +;; currentpos(target)=c0 ; >> Pete 14/9/89 +;; if target=user then @userDeath ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.REMOVE +; also FREE, RELEASE +;* +; force ACTOR REMOVED NOUN1 only + noun2=nullobject + prep=0 +;* + POS=ACTOR + HIPOS=CARRIED + GOTO @MOVEOBJECT +;--- +.gameAfterRestore + GOSUB @PRINTROOM + actor=user + gosub @stop + GOTO @getfromuser +;--- diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/compile.bat b/l9dev/regress/games.l9/ghost.l9/part2.l9/compile.bat new file mode 100644 index 0000000..69c1997 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/compile.bat @@ -0,0 +1,15 @@ +1aconst.txt +1../part1.l9/mconst.txt +1sconst.txt +1pconst.txt +1../part1.l9/chain.txt +1aparse.txt +1acore.txt +1converse.txt +1npc.txt +1../part1.l9/oops.txt +1averb.txt +1aspecial.txt +1score.txt +1../part1.l9/book.txt +2340 ;*** remember to change the EXIT table back to make it smaller! diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/converse.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/converse.txt new file mode 100644 index 0000000..bc44a53 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/converse.txt @@ -0,0 +1,341 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; taken From Lancelot 14/5/88 +; +; CONVERSE.TXT, conversation, e.g giving commands to people. +; +VAR +;; lastnpcpresent ; >> Pete 14/9/89 + +BEGIN +.SHOUT + m1=123 ; AHHHGGG.... + goto printm1cancel +;--- +.ASK +.SAY + +;>>specials for L3.. +; cif l3 +; ; giving reply to Woodland knight? +; gosub GetNextWord +; searchtype=NounType +; gosub CheckType +; if value=0 then SayNotReply +; if noun1=nullobject then SayNotReply +; object=WoodlandKnight +; gosub CheckIfPresent +; if result=false then SayNotReply +; NameGiven=true ; if L gave his real name +; m1=2530 ; then you shall die +; if noun1=user then PrintM1Cancel ; prints m1, cancels rest of input +; NameGiven=2 ; a lie! +; m1=2529 ; pass friend +; goto PrintM1Cancel +; ;--- +; .SayNotReply +; cend +;;>>end of L3 Specials.. + + m1=255 ; please use correct format (echo verb HELLO) + +.PrintM1Cancel + gosub @printm1dot + goto @cancelinput +; MESSAGE 2156 ; said +; PROCESSINGSAY=TRUE +; GOSUB @TALKTOSOMEONE +; GOSUB @GETNEXTWORD +;; specifically check for 'SAY TO ... ' +; SEARCHTYPE=PREPTYPE +; GOSUB @CHECKTYPE +; IF VALUE=0 THEN @SAYNOTNPC + +;.SAYNOUN1 ; ask NPC about ... +;; just the same as 'SAY TO' NPC +; GOSUB @GETNEXTWORD +; PROCESSINGSAY=TRUE +; SEARCHTYPE=NOUNTYPE +; GOSUB @CHECKTYPE +; IF VALUEmaxnpc THEN @SAYNOTNPC +; ACTOR=VALUE ; talking to a character +; gosub @setACTORATTRIBUTES +; GOTO startorders + +.SAYNPC + GOSUB @GOBACK +;;.startorders ; >> Pete 14/9/89 +; all conversations with npc come here to start with + gosub @initfifo + twNoun=0 + +.SAYNPCLOOP +; is target obedient to user? + gosub @setACTORATTRIBUTES + + cif allowcheat + if cheatmode<>FALSE then saynpcloop1 + cend ; allowcheat + x1=masteroffset + add x1,actorattributes + x1=npccurrent(x1) + if x1<>user then @saynpcnotobedient + +;;.saynpcloop1 ; >> Pete 14/9/89 +; actor is obedient to ingrid + gosub sayparser + GOSUB @NPCCALLVERB + if processed=true then sayend2 ; response printed + IF NOMOREINPUT=FALSE THEN @SAYNPCLOOP +; end of thing to say + IF SAYRESPONSE=TRUE THEN SAYEND1 +; print a random action along the lines of 'the ferryman ignores you' +;;.sayDoesntUnderstand ; >> Pete 14/9/89 + LASTWORDPRINTED=0 ; prevent use of IT + m1=3290 ; doesn't understand + gosub @varysayM1dot + goto sayend2 + +.SAYEND1 + m1=3230 ; ok boss! + gosub @varysayM1dot +; +.sayend2 + gosub @getnextword + gosub @linkonfifocommandqueue + +.realsayend + verb=isay ; to allow npcs to do something after +; player has been talking. + actor=user + gosub @setactorattributes + GOSUB @ABSCANCELINPUT ; cancel input, then return (also +; sets processingsay=false) + stack + goto @mainloopnpc +;--- +.sayparser +; call parser for saying + PROCESSINGSAY=TRUE + GOSUB @GETNEXTWORD +; now try calling verb parser +; first set up this word to be the verb if appropriate + SEARCHTYPE=VERBTYPE + GOSUB @CHECKTYPE + IF VALUE=nullvalue THEN sayparser2 + GOSUB @goback + +.sayparser2 +;>>removed by L2 erroroccurred=FALSE + GOSUB @PARSEINPUT + + gosub @AgainVerbVarsAreVerbVars ; set up again >>fixed by L2 + + if noun1=nullobject then sayparserNotNoun1 ;>>fixed by gnome2 + itword=noun1 ;>>fixed by gnome2 + +.sayparserNotNoun1 + cif allowcheat + if cheatmode<>2 then sayparsenodebug + prs "[parseinput returned: " + print verb + message space + print prep + message space + print noun1 + message space + print noun2 + prs "]" + cend ; allowcheat + +;;.sayparsenodebug ; >> Pete 14/9/89 +;>>removed by L2 if erroroccurred=FALSE then sayparserend +;>>removed by L2 ; got an error - disregard verb +;>>removed by L2 verb=0 ; make everything ignore it. + +;;.sayparserend + + if nomoreinput=true then sayparserret + if verb=0 then sayparser2 +.sayparserret + return +;--- +;.TALKTOSOMEONE +;; set up ACTOR if there is anyone around to hear +; GOSUB ANYBODYHERE +; IF OBJECT=NULLOBJECT THEN TTSORET +; ACTOR=OBJECT +;.TTSORET +; RETURN +;--- +;.ANYBODYHERE +;; return OBJECT=a random NPC who is present +; OBJECT=minnpc +; lastnpcpresent=nullobject +;.ABH1 +; GOSUB @CHECKIFPRESENT +; IF RESULT=FALSE THEN ABH2 +;; npc is present. Randomly accept it. +; lastnpcpresent=object +; random x1 +; if x1>160 then abhret ; accept it +; +;.abh2 +; ADD OBJECT,C1 +; IF OBJECTmaxghost then notobedrefusal +;===== + m1=3270 ; won't give anything away + if verb=igive then sno1 +;===== +.notobedrefusal +;===== + m1=2900 ; base for refusal messages + add m1,actor + gosub @ActorM1Dot + goto sno2 + +.sno1 + gosub @varysayM1dot +.sno2 + goto @sayend2 +;--- +;.SAYNOTNPC +;; not talking to NPC, but still need to check for sayings +; PROCESSINGSAY=TRUE +; GOSUB @GOBACK +;; is there anyone around to hear ? +; GOSUB @TALKTOSOMEONE +; +;.SAYNOTNPCLOOP +; PROCESSINGSAY=TRUE +; GOSUB @GETNEXTWORD +; IF NOMOREINPUT=FALSE THEN SAYNOTNPCLOOP +; GOTO @CANCELINPUT +;--- +; +; Now miscellaneous code to do with talking to characters +; this is essentially an Eliza-type program without +; the psychoanalysis bit +; +;--- +.NPCCALLVERB + processed=FALSE + gosub @specialconversation + if processed=true then ncvret + IF VERB=0 THEN @SAYRET + +; GIVEN VERB,PREP,NOUN2 AND OBJECTTABLE, +; Push them onto command queue! +; Work down from top so static objects, containers come first + sayresponse=true + GOSUB @CONVERTVERB + GOSUB @SELECTOBJECTPOS + havecalledverb=FALSE ; indication of whether +; anything has been pushed for this verb yet +; +; prevent 'junk' verbs from being stored +; e.g. 'tell rainbird to tell me about me' +; used to go wrong because 'to' was pushed. +;; if verb=itell then posingleret + if verb=59 then @commandstop ;>>fixed for gnome2 - allow "STOP" + IF EVERYTHING<>0 THEN pocollective + if verb=iwaitforperson then posinglenoun1 ; noun1,2 already set up + if verb=iwaitforperiod then posinglenoun1 ; ditto + if verb=iwaituntiltime then posinglenoun1 ; ditto + if verb=isetupgo then posetupgo ; ditto + if verb=isetupfind then posetupfind +; handle individual objects + CURRENTOBJECT=otbaseplus1 ; pointer into OBJECTTABLE +.POSINGLE1 + OBJECT=OBJECTTABLE(CURRENTOBJECT) + IF OBJECT=0 THEN POSINGLEEND + noun1=object + if verb=ifollow then pofollow ; follow people is handled specially +; + gosub @npcpushfifo + havecalledverb=true + ADD CURRENTOBJECT,C1 + GOTO POSINGLE1 + +.POSINGLEEND + IF HAVECALLEDVERB=TRUE THEN POSINGLERET + NOUN1=NULLOBJECT +.posinglenoun1 + +;; rook goes to landing pad when told to go lighthouse +; if actor<>rook then notrookgolh +; if verb<>139 then notrookgolh ; (139=go object) +; if noun1<>lighthouse then notrookgolh +; verb=96 ; (96=go room) +; noun1=27 ; pad room +;.notrookgolh + + GOSUB @npcpushfifo + +.POSINGLERET +.ncvret + RETURN +;--- +.posetupfind + verb=igdfind + goto posinglenoun1 +;--- +.posetupgo + verb=igdgo + goto posinglenoun1 +;--- +.pofollow + gosub @follow + sayresponse=true ; understood ok + +;;.pofollowret +;;.gsret + return +.pocollective + noun1=everything + goto @setupgdaccess ; push multiple order onto stack +;--- +.varysayM1dot +; print one of 3 messages at m1 for people who can talk +; or m1+10 for npcs who can't talk. +; object=actor +; gosub isobjectalive +; if result=FALSE then printdead ; 'the ... is dead' + x1=actor + gosub @printTHEobjectx1 +;>>not needed in Gnome - if actor>not needed in Gnome - x1=10 +;>>not needed in Gnome - add m1,x1 +;;.gsm1d1 + goto @varymessagedot +;--- +.NPCNOTUNDERSTOOD +; ACTOR, and NPC is trying to do something which would +; produce an error message if USER tried it. +; unless actor is under user's control +;>>removed by L2 erroroccurred=true + executeprocessed=FALSE ; nothing happened + commandfinished=true + FatalError=true ;>>mike 9/2/88 + return + diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/exit.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/exit.txt new file mode 100644 index 0000000..87f552d --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/exit.txt @@ -0,0 +1,576 @@ +; Standard adventure source, copyright (C) 1987 Level 9 Computing. +; +; EXIT.TXT, data for the game exits. The numeric values for the +; directions is as follows: +; +; 1 up=9 in=11 cross=13 climb=14 jump=15 +; 8 2 down=10 +; ! +; 7 --+-- 3 +; ! +; 6 5 <- note that 4&5 are reversed. You cannot change this. +; 4 +; +; Special notes for interface between static and synthesised rooms.. +; +; There must be an in/out connection between the static and the +; object number of the scenery object to which it connects. +; +; E.g If you have a location object "[480:^N castle]", then an exit +; from room 15: 1001 12 180 +; will set up an in/out connection to the room where object no. 180 +; is situated. This allows the exit table to be changed easily. +; +;Room number 1 +; +; CHANGE THESE IF YOU CHANGE THE SIZE OF THE GRID. +0000 1 1 ; North. ; = XMAX (1 to n) +0000 2 2 ; NE ; = N+1 +0000 3 1 ; E ; = always 1 +0000 4 255 ; SOUTH ; = 256-XMAX +0000 5 256 ; SE ; = SOUTH+1 +0000 6 254 ; SW ; = SOUTH-1 +0000 7 255 ; WEST ; = always 255 +1000 8 0 ; NW ; = North-1 +; +;Room number 2 +; +; CHANGE THESE IF YOU CHANGE THE SIZE OF THE GRID. +0000 1 1 ; North. ; = XMAX (1 to n) +0000 2 2 ; NE ; = N+1 +0000 3 1 ; E ; = always 1 +0000 4 255 ; SOUTH ; = 256-XMAX +0000 5 256 ; SE ; = SOUTH+1 +0000 6 254 ; SW ; = SOUTH-1 +0000 7 255 ; WEST ; = always 255 +1000 8 0 ; NW ; = North-1 +; +;Room number 3 ; my grave +0001 1 4 ; n +1001 7 33 ; w +;Room number 4 ; danby grave +0001 1 5 ; n +0001 4 3 ; s +1001 7 32 ; w +;Room number 5 ; new graves +0001 1 6 ; n +0001 3 180 ; e +0001 4 4 ; s +1001 7 31 ; w +;Room number 6 ; willmot graves +0001 4 5 ; s +1001 7 30 ; w +;Room number 7 ; winding track +0001 1 8 ; n +1001 4 180 ; s +;Room number 8 ; south green +0001 1 9 ; n +1001 4 7 ; s +;Room number 9 ; village green +0001 1 10 ; n +1001 4 8 ; s +;Room number 10 ; north green +0001 1 11 ; n +1001 4 9 ; s +;Room number 11 ; front garden +0101 11 14 ; in +0111 1 14 ; (n) +0001 3 13 ; e +0001 4 10 ; s +1001 7 12 ; w +;Room number 12 ; herb garden +0101 11 15 ; in +0111 1 15 ; (n) +1001 3 11 ; e +;Room number 13 ; lawn +1001 7 11 ; w +;Room number 14 ; hall +0101 12 11 ; out +0111 4 11 ; (s) +0001 9 18 ; up +0101 3 17 ; e +1101 7 15 ; w +;Room number 15 ; kitchen +0101 1 16 ; n +0101 3 14 ; e +0101 12 12 ; out +1111 4 12 ; (s) +;Room number 16 ; breakfast room +1101 4 15 ; s +;Room number 17 ; lounge +1101 7 14 ; w +;Room number 18 ; landing +0101 11 19 ; in +0111 1 19 ; (n) +0001 9 20 ; up +0001 10 14 ; down +1001 8 25 ; nw +;Room number 19 ; bathroom +0101 12 18 ; out +1111 4 18 ; (s) +;Room number 20 ; attic +1001 10 18 ; down +;Room number 21 +1000 0 0 +;Room number 22 +1000 0 0 +;Room number 23 +1000 0 0 +;Room number 24 +1000 0 0 +;Room number 25 +1000 0 0 +;Room number 26 +1000 0 0 +;Room number 27 +1000 0 0 +;Room number 28 +1000 0 0 +;Room number 29 +1000 0 0 +;Room number 30 +1000 0 0 +;Room number 31 +1000 0 0 +;Room number 32 +1000 0 0 +;Room number 33 +1000 0 0 +;Room number 34 +1000 0 0 +;Room number 35 +1000 0 0 +;Room number 36 +1000 0 0 +;Room number 37 +1000 0 0 +;Room number 38 +1000 0 0 +;Room number 39 +1000 0 0 +;Room number 40 +1000 0 0 +;Room number 41 +1000 0 0 +;Room number 42 +1000 0 0 +;Room number 43 +1000 0 0 +;Room number 44 +1000 0 0 +;Room number 45 +1000 0 0 +;Room number 46 +1000 0 0 +;Room number 47 +1000 0 0 +;Room number 48 +1000 0 0 +;Room number 49 +1000 0 0 +;Room number 50 +1000 0 0 +;Room number 51 +1000 0 0 +;Room number 52 +1000 0 0 +;Room number 53 +1000 0 0 +;Room number 54 +1000 0 0 +;Room number 55 +1000 0 0 +;Room number 56 +1000 0 0 +;Room number 57 +1000 0 0 +;Room number 58 +1000 0 0 +;Room number 59 +1000 0 0 +;Room number 60 +1000 0 0 +;Room number 61 +1000 0 0 +;Room number 62 +1000 0 0 +;Room number 63 +1000 0 0 +;Room number 64 +1000 0 0 +;Room number 65 +1000 0 0 +;Room number 66 +1000 0 0 +;Room number 67 +1000 0 0 +;Room number 68 +1000 0 0 +;Room number 69 +1000 0 0 +;Room number 70 +1000 0 0 +;Room number 71 +1000 0 0 +;Room number 72 +1000 0 0 +;Room number 73 +1000 0 0 +;Room number 74 +1000 0 0 +;Room number 75 +1000 0 0 +;Room number 76 +1000 0 0 +;Room number 77 +1000 0 0 +;Room number 78 +1000 0 0 +;Room number 79 +1000 0 0 +;Room number 80 +1000 0 0 +;Room number 81 +1000 0 0 +;Room number 82 +1000 0 0 +;Room number 83 +1000 0 0 +;Room number 84 +1000 0 0 +;Room number 85 +1000 0 0 +;Room number 86 +1000 0 0 +;Room number 87 +1000 0 0 +;Room number 88 +1000 0 0 +;Room number 89 +1000 0 0 +;Room number 90 +1000 0 0 +;Room number 91 +1000 0 0 +;Room number 92 +1000 0 0 +;Room number 93 +1000 0 0 +;Room number 94 +1000 0 0 +;Room number 95 +1000 0 0 +;Room number 96 +1000 0 0 +;Room number 97 +1000 0 0 +;Room number 98 +1000 0 0 +;Room number 99 +1000 0 0 +;Room number 100 +1000 0 0 +;Room number 101 +1000 0 0 +;Room number 102 +1000 0 0 +;Room number 103 +1000 0 0 +;Room number 104 +1000 0 0 +;Room number 105 +1000 0 0 +;Room number 106 +1000 0 0 +;Room number 107 +1000 0 0 +;Room number 108 +1000 0 0 +;Room number 109 +1000 0 0 +;Room number 110 +1000 0 0 +;Room number 111 +1000 0 0 +;Room number 112 +1000 0 0 +;Room number 113 +1000 0 0 +;Room number 114 +1000 0 0 +;Room number 115 +1000 0 0 +;Room number 116 +1000 0 0 +;Room number 117 +1000 0 0 +;Room number 118 +1000 0 0 +;Room number 119 +1000 0 0 +;Room number 120 +1000 0 0 +;Room number 121 +1000 0 0 +;Room number 122 +1000 0 0 +;Room number 123 +1000 0 0 +;Room number 124 +1000 0 0 +;Room number 125 +1000 0 0 +;Room number 126 +1000 0 0 +;Room number 127 +1000 0 0 +;Room number 128 +1000 0 0 +;Room number 129 +1000 0 0 +;Room number 130 +1000 0 0 +;Room number 131 +1000 0 0 +;Room number 132 +1000 0 0 +;Room number 133 +1000 0 0 +;Room number 134 +1000 0 0 +;Room number 135 +1000 0 0 +;Room number 136 +1000 0 0 +;Room number 137 +1000 0 0 +;Room number 138 +1000 0 0 +;Room number 139 +1000 0 0 +;Room number 140 +1000 0 0 +;Room number 141 +1000 0 0 +;Room number 142 +1000 0 0 +;Room number 143 +1000 0 0 +;Room number 144 +1000 0 0 +;Room number 145 +1000 0 0 +;Room number 146 +1000 0 0 +;Room number 147 +1000 0 0 +;Room number 148 +1000 0 0 +;Room number 149 +1000 0 0 +;Room number 150 +1000 0 0 +;Room number 151 +1000 0 0 +;Room number 152 +1000 0 0 +;Room number 153 +1000 0 0 +;Room number 154 +1000 0 0 +;Room number 155 +1000 0 0 +;Room number 156 +1000 0 0 +;Room number 157 +1000 0 0 +;Room number 158 +1000 0 0 +;Room number 159 +1000 0 0 +;Room number 160 +1000 0 0 +;Room number 161 +1000 0 0 +;Room number 162 +1000 0 0 +;Room number 163 +1000 0 0 +;Room number 164 +1000 0 0 +;Room number 165 +1000 0 0 +;Room number 166 +1000 0 0 +;Room number 167 +1000 0 0 +;Room number 168 +1000 0 0 +;Room number 169 +1000 0 0 +;Room number 170 +1000 0 0 +;Room number 171 +1000 0 0 +;Room number 172 +1000 0 0 +;Room number 173 +1000 0 0 +;Room number 174 +1000 0 0 +;Room number 175 +1000 0 0 +;Room number 176 +1000 0 0 +;Room number 177 +1000 0 0 +;Room number 178 +1000 0 0 +;Room number 179 +1000 0 0 +;Room number 180 +1000 0 0 +;Room number 181 +1000 0 0 +;Room number 182 +1000 0 0 +;Room number 183 +1000 0 0 +;Room number 184 +1000 0 0 +;Room number 185 +1000 0 0 +;Room number 186 +1000 0 0 +;Room number 187 +1000 0 0 +;Room number 188 +1000 0 0 +;Room number 189 +1000 0 0 +;Room number 190 +1000 0 0 +;Room number 191 +1000 0 0 +;Room number 192 +1000 0 0 +;Room number 193 +1000 0 0 +;Room number 194 +1000 0 0 +;Room number 195 +1000 0 0 +;Room number 196 +1000 0 0 +;Room number 197 +1000 0 0 +;Room number 198 +1000 0 0 +;Room number 199 +1000 0 0 +;Room number 200 +1000 0 0 +;Room number 201 +1000 0 0 +;Room number 202 +1000 0 0 +;Room number 203 +1000 0 0 +;Room number 204 +1000 0 0 +;Room number 205 +1000 0 0 +;Room number 206 +1000 0 0 +;Room number 207 +1000 0 0 +;Room number 208 +1000 0 0 +;Room number 209 +1000 0 0 +;Room number 210 +1000 0 0 +;Room number 211 +1000 0 0 +;Room number 212 +1000 0 0 +;Room number 213 +1000 0 0 +;Room number 214 +1000 0 0 +;Room number 215 +1000 0 0 +;Room number 216 +1000 0 0 +;Room number 217 +1000 0 0 +;Room number 218 +1000 0 0 +;Room number 219 +1000 0 0 +;Room number 220 +1000 0 0 +;Room number 221 +1000 0 0 +;Room number 222 +1000 0 0 +;Room number 223 +1000 0 0 +;Room number 224 +1000 0 0 +;Room number 225 +1000 0 0 +;Room number 226 +1000 0 0 +;Room number 227 +1000 0 0 +;Room number 228 +1000 0 0 +;Room number 229 +1000 0 0 +;Room number 230 +1000 0 0 +;Room number 231 +1000 0 0 +;Room number 232 +1000 0 0 +;Room number 233 +1000 0 0 +;Room number 234 +1000 0 0 +;Room number 235 +1000 0 0 +;Room number 236 +1000 0 0 +;Room number 237 +1000 0 0 +;Room number 238 +1000 0 0 +;Room number 239 +1000 0 0 +;Room number 240 +1000 0 0 +;Room number 241 +1000 0 0 +;Room number 242 +1000 0 0 +;Room number 243 +1000 0 0 +;Room number 244 +1000 0 0 +;Room number 245 +1000 0 0 +;Room number 246 +1000 0 0 +;Room number 247 +1000 0 0 +;Room number 248 +1000 0 0 +;Room number 249 +1000 0 0 +;Room number 249 +;Room number 250 +;Room number 251 +;Room number 252 +;Room number 253 +0000 0 0 diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/license.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/license.txt new file mode 100644 index 0000000..9c355e1 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/license.txt @@ -0,0 +1,2 @@ +These files are covered by the license to be found in https://github.com/MikeTheTechie/Level9-Public/blob/main/License.txt +All other rights are reserved. diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/gamedata.dat b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/gamedata.dat new file mode 100644 index 0000000..fe3705a Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/gamedata.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/message.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/message.txt new file mode 100644 index 0000000..6d6cd78 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/message.txt @@ -0,0 +1,2254 @@ +; Scapeghost part II text. +; Copyright (C) 1989 Level 9 Computing. +; +; ST version of MESSAGE.TXT: messages/keywords for the game. +; +; Messages are of the form: [ number : text ] ; comment +; They must be in numeric order, but gaps are allowed in the number +; sequence, of course. +; +; | (vertical bar) terminates the printable part of a message. It +; is typed by shifting backslash (to the left of the keyboard). +; / forces the following character to be printed literally. +; % is carriage return. Note that carriage return is ignored if +; the printing is already at the start of a line, to make coding +; simpler. To force a real carriage return, print space first. +; ^ (shift 6) marks a word for recognition by the parser. It is +; followed by a letter for word type: +; Adjective; Comment; conJunction; Noun; Preposition; Verb. +; +; Capitalization is done automatically on output and you are +; recommended to use lower case for the first letter of messages +; as this improves compression and will make no difference on +; output, providing all punctuation is correct. +; +; Please ensure that all long room descriptions and first-time +; messages are there. Comment blank msgs.. ;; [1375:] ; etc.. +; Please comment all long room descriptions, first-time messages, +; examine messages etc so we know what they refer to. e.g: +; [1115:, which was very greasy] ; in the kitchen. +; Exits must be clear from room descriptions or first-time msgs. + +;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +;>> NB: Grouped messages which lie in unusual areas (e.g. 2500-2799) >> +;>> are marked with GROUP. >> +;>> >> +;>> For future games, SEARCH for "I " (case specific) "Scapeghost" >> +;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +; +; punctuation messages.. +[1: ] +[2::] +[3:, ] +[4:.] ; dot with no space +[5:%] +[6:and ] +[7:.%] +[8:?%] +[9:. ] +; +; positions etc.. +[10:exits led ] +[11:an exit led ] +[12: through a door] +[13: through an open door] +[14: and ] +;; [15:] +[16:%> ] +[17:%What now? ] +[18:: ]; +[19:"] +; +; Messages for printing objects.. +[20:a ] +[21:the ] +[22:an ] +[23:some ] +[24:." ] ; dot quote +[25:% %] ; blank line +[26:worn] ; for 'couldn't have worn' +[27:taken] ; for 'couldn't have taken' +; +; exits directions, doubling as movement verbs.. +[51:^V north|^V n ^V northwards] +[52:^V northeast|^V ne] +[53:^V east|^V e ^V eastwards] +[54:^V south|^V s ^V southwards] +[55:^V southeast|^V se] +[56:^V southwest|^V sw] +[57:^V west|^V w ^V westwards] +[58:^V northwest|^V nw] +[59:^V upwards|^V u ^V up] +[60:^V downwards|^V d ^V down] +[61:^V inside|^V in ^V inwards ^V into ^V enter] +[62:^V outside|^V out ^V leave] +[63:^V cross|^V across ^V over] +[64:with the ^V climb|^V scramble ^V ascend ^V mount] +; is in 'you struggle with the climb and are in' +; +; Intransitive verbs.. +[70:^V i] +[71:^V again|^V a] +[72:^V look|^V l ^V display ^V redisplay ^V refresh] +[73:^V inventory|^V inv ^V possessions ^V possess ^V list] +[74:^V quit ^V RESTART] +[75:^V RESTORE ^V LOAD] +[76:^V save] ; +[77:^V RAMSAVE ^V RAM] ; && +[78:^V ramload] ; && +[79:^V score ^V status] +[80:^V verbose] +[81:^V brief] +[82:^V wait|^V wa ^V pause ^V z] +[83:^V ring|^V play ^V blow ^V sound] +[84:^V on] +[85:^V off] ; >> +[86:^V pictures ^V graphics] ; && +[87:^V words ^V text] ; && +; +[89:^V UNDO ^V OOPS] +[90:^V hit|^V attack ^V hit ^V break ^V kick ^V punch +^V smash ^V kill] +; +[92:^V searched|^V search ^V explore] +[93:^V dug|^V dig] +[94:^V sniffed|^V sniff ^V smell] +[95:^V knocked|^V knock] +[96:got|^V stood ^V stand ^V jump] ; output e.g. "L got out", "L got in" etc. +[97:^V lay|^V lie] +[98:^V got|^V sat ^V sit] +[99:^V hid|^V hide] +[100:^V said|^V say ^V whisper ^V call ^V talk] +;; [101:^V teleported|^V teleport] +;; [102:^V getme] +[103:^V filled|^V fill] +[104:^V ran|^V run ^V fly] +[105:^V made|^V make] +; +[107:I couldn't ^V eat anything, being a ghost|^V bite ^V taste +^V nibble ^V lick] ;== Scapeghost == +[108:^V went|^V go ^V goto ^V find ^V walk ^V fly] +[109:stopped|^V stop ^V abort] +[110:I fancied a ^V drink, but didn't really have the stomach +for it..] +; +[112:^V exits ^V exit] +;===== +; special to Scapeghost.2 +[113:^V concentrated|^V concentrate ^V meditate ^V recreate +^V reconstruct ^V summon ^V concentrating] ; latter ones used for e.g. STOP CONCENTRATING +[114:^V dialed|^V dial] ; used for broken telephone +;===== +; +; verbs for output.. +[130:^V had|^V have ] ; mainly for output +[131:^V had|^V has ] ; mainly for output +[132:^V was|^V am ] ; mainly for output +[133:^V were|^V are ] ; mainly for output 'you were' +[134:^V was|^V is ] ; mainly for output 'someone was' +[135:are] ; output only - present tense for 'tell me about' +[136:is] ; output only - present tense for 'tell me about' +;; 137 is 'GO IN' +;; 138 is 'GO OUT' +;; 139 is 'wait for person' +;; 140 is 'wait until time' +;; 141 is 'wait for (length of time)' +;; 142 is 'wait for single turn' +;; [143:^V fought|^V fight ^V kill] ; >> Pete 13/9/89 +[145:^V dodged|^V dodge] +; +; 146 and 147 have text for debugging output only - do not mark +[146:gdgo] ; 196 - gdgo +[147:gdrun] ; 197 - gdrun +;; [148:^V stuff] +; +; Transitive verbs.. +[150:^V examined|^V examine ^V read ^V x] +[151:^V cut|^V chop] +[152:^V woke|^V wake ^V rouse] +; +[154:^V got|^V get] +[155:^V took|^V take ^V carry ^V acquire ^V steal ^V picked ^V pick +^V pluck ^V catch ^V lift ^V hold ^V keep ^V grab] +[156:^V wore|^V wear] +[157:^V dropped|^V drop ^V discard] +[158:^V put|^V conceal +^V wrap ^V cover] ; ===== Scapeghost.2 cover bulb in foil ===== +[159:^V removed|^V remove ^V free ^V release] +[160:^V threw|^V throw ^V chuck ^V toss ^V hurl] +[161:^V gave|^V give ^V offer ^V show ^V offered ^V sell] +[162:^V asked|^V ask ^V question] +[163:^V followed|^V follow ^V chase] +[164:^V opened|^V open ^V unlock] +; +[168:^V pushed|^V tug ^V push ^V shove ^V rock ^V press +^V select ^V depress ^V poke ^V prod ^V pour ^V spill +^V touch ^V reach] ;===== Scapeghost.2 Reach through chimney/wall ===== +[169:^V fastened|^V fasten ^V tie ^V attach] +[170:^V unfastened|^V unfasten ^V untie] ; == Scapeghost.2 additions == +[171:^V pulled|^V pull ^V yank] +[172:^V froze|^V freeze ^V cool] ;===== Scapeghost.2 Freeze Water ===== +[173:^V ignited|^V light ^V spark ^V charge ^V heat] +; == Scapeghost.2 == +; +[176:^V inserted|^V insert] +; +; 186, 187 and 189 have text for debugging only +[186:return object] ; 186 is 'return object to initial' (for npcs) +[189:gdfind] ; 239 is gdfind +; +[190:^V closed|^V close ^V shut] +; +[192:told] ; "tell" removed by Pete. 13/9/89 +; +[194:struggled] ; mainly for output +; 195 is 'steal all from' +; +[197:killed] ; output only +; +[210:reached] ; output only +[211:dragged] ; output only +[212:passed] ; output only +[213:flew] ; output only +[214:walked] ; output only +[215:caught] ; output only +[216:entered] ; output only, e.g 'Fred entered from the east'. Do not mark +; +; Echo verbs (250-299) which just print the message containing them.. +[250:OK, if you say not|^V no] +[251:right, so be it|^V yes] +[252:well, that's one way to keep the spirits up|^V leap ^V hop +^V skip ^V dance ^V celebrate] +[253:I found myself unable to say that word|^V plugh ^V xyzzy +^V sesame ^V plover ^V humakaat ^V satarh ^V ollabin ^V obis] +; magic words for amusing response +; +[255:if you want to talk to someone, follow their name with what +you want to say to them. For example JOE, HELLO|^V hello +^V welcome ^V hi ^V greetings ^V goodnight ^V afternoon] +[256:I heard nothing that I hadn't heard before|^V +listen ^V hear] +[257:send the coupon to Level 9 for a ^V hint|^V help] +; +[263:why not|^V y ^V why] +; +[267:calm down! Cursing's not going to solve anything|^V sod +^V motherfucker ^V crap ^V nipples ^V bloody ^V frigging +^V wanker ^V turd ^V piss ^V shit ^V twat ^V cunt ^V bollocks +^V jesus ^V christ ^V god ^V devil ^V tits ^V asshole +^V arsehole ^V cretin ^V conservatives ^V spastic ^V coon +^V wog ^V fucking ^V fucker ^V bastard ^V bugger ^V damn +^V sex ^V hell ^V bonk ^V pratt ^V rape ^V shag ^V fuck] +; lower case swear words +; +[273:what? Off already? Try CONTROL C, but don't forget to save +your position first|^V goodbye ^V bye] +[274:you're forgiven|^V sorry] +; +;; [277:] +; +[279:ghosts only ^V sleep but once, and then it's permanent] +[280:being a ghost, I couldn't ^V swim any more] +; +[283:hit] ; the object 'hit' target +; +[285:ghosts don't ^V drink] +[286:that would achieve nothing|^V shake] +; +[288:do me a favour and don't mention that word|^V bury] +; +[290:I polished it until it gleamed|^V rub ^V clean ^V polish] +[291:you ^V fill a container by, e.g, "PUT THING IN CONTAINER"] +[292:please ^V empty a container by removing its contents in turn] +; +;; [294:I had nothing with which to ^V light anything. I was +;; a non-smoker, you see] ; == Removed for Scapeghost only == +; +[297:my lips would only pass straight through|^V kiss] +; +; -------------------------------------------------------------- +; +; Objects (300+N).. +; +; NPCs (1 onwards) +; People +[301:^N I|^N player ^N me ^N Alan ^N Chance] +[302:^N Joe ^N Danby|^N publican ^N landlord ^N bartender +^N ghostly ^N figure] +[303:^N Luke's ^N ghost|^N Luke ^N drug ^N dealer ^N crook +^N criminal ^N villain] +[304:^N firemen] +; +; ordinary objects (80 onwards) +; +; light objects in order... +[380:^A plastic ^N card|^N ID] +[381:^N piece of ^N paper|^N unburnt ^N charred] +[382:^N map] +[383:^N bookmark|^N envelope ^N postmark] +[384:^N briefcase|^N case ^N tag ^N label] +[385:^A clear ^N bulb|^N light ^N lightbulb] +[386:^A pearl ^N bulb|^N light ^N lightbulb] +[387:^N foil|^A aluminum ^A aluminum ^N tin ^N tinfoil] +[388:^N plug|^N extension ^N lead] +[389:^N socket|^N extension ^N lead] +; +; heavy objects... +[395:^N directory] +[396:^N dead ^N body|^N corpse ^N Luke ^N Lukes ^N Luke's] +; +[399:^N grandfather ^N clock] +[400:^N panel] +[401:^N panel] +[402:^N ice|^N ditch ^N water ^N ditchwater] +[403:^N branch|^N stick ^N twig] +[404:^N running ^N water|^N ditch ^N ditchwater] +[405:^N bottle of ^N whisky|^N booze] +[406:^N telephone|^N phone ^N receiver ^N handset] +; +; static objects (110 onwards) +[410:^N lid] +[411:^N water ^N tank] +[412:^N chimney ^N piece|^N breast] +[413:^N fireplace|^N fire] +[414:^A bricked-up ^N door|^N bricked ^N up ^N wall] +[415:^N ivy|^N wall] +[416:^N curtains] +[417:^N dispenser] +[418:^N mirror] +[419:^N alcove] +[420:^N lampholder] ; PETE: changed from SOCKET to LAMPHOLDER to +[421:^N lampholder] ; avoid confusion with extension SOCKET (this saves +; quite a chunk of code) +[422:^N large ^N switch] +[423:^N small ^N switch] +[424:^N fluorescent ^N tube|^N light] +[425:^N puddle of whisky|^N pool] +[426:^N broken ^N glass|^N bottle] +[427:^N ditch] +; +; invisible objects (150 onwards) +; +[450:^N cloud of ^N whisky ^N vapour|^N fumes] +; +; headstones & graves are present in graveyard locations... +[451:^N headstone|^N head ^N stone ^N tombstone ^N gravestone] +[452:^N grave|^N mound] +; +; present in the three village green locations +[453:^N grass|^A village ^N green] +; +; present in the three garden locations +[454:^N garden|^N grass ^N plants ^N flowers ^N soil ^N weeds] +; +[455:^N pendulum] +[456:^A winding ^N track|^N gravel] +; +; omni present from in front and inside the house +[457:^N house|^N hideout ^N haunted] +; +[458:^N cobwebs] ; attic +[459:^N herbs] +; +; present in the three village green locations +[460:^N road] +; +[461:^N fire|^N flames ^N blaze ^N smoke] +; +; light sources that are present in many locations... +[475:^N light coming from the ^N headlights|^A passing ^N cars] +[476:^N hall ^N light] +[477:^N kitchen ^N light] +[478:^N landing ^N light] +; +; Brief location objects (479+N). +; +; These are used for seeing from a distance and for input, e.g for +; 'examine tower' and 'go castle'. (Note that 'go scenery' also works). +; They also provide a link between the grid of synthesized locations +; and the real, static locations used for rooms inside buildings etc. +; +[480:^N path] +; +; Cheat mode nouns +; +;; [530:^N Ingrid ^N Bottomlow] +;; [531:^N turnips] +; +; Collective nouns... +[534:^N everything ^N all ^N every] +[535:^N ingredients] ; collective noun - was 'treasure' +;; [536:^N weapons] ; collective noun +[537:^N people|^N everyone ^N everybody] ; collective noun +;; [538:^N clothes|^N armour] +; +; -------------------------------------------------------------- +; +; Omni-present objects.. +[539:^N door] ; normal door, for the benefit of PRINTACTORACTION. It +; is apparently never described by PRINTOBJECT (so?). +; +;===== +[540:^N hand|^N arm ^N fingers ^N wrist] ; push hand through object +;===== +; +[541:^N plants|^N weeds ^N flowers ^N daisy ^N bean ^N husk ^N grass +^N soil] +[542:^N be] +[543:^N room|^N ground ^N floor] ; used for output as well +[544:^N wall|^N walls] +[545:^N sky|^N sun ^N moon ^N air ^N stars] +; +; and finally, some miscellaneous nouns which are used miscellaneously. +[547:^N except ^N but] +[548:^N it|^N that ^N them ^N those ^N none ^N him ^N her] +[549:^N minute ^N minutes] +; +[551:^J then ^J next] +[552:^J therefore ^J so] +[553:^N I|^N you] ;you +; +; Pronouns... +[560:it] ; ita +[561:it] ; itan +[562:some] +[563:he] +[564:she] +[565:they] +[566:I] ; you ; "Scapeghost special" +[567:he] ; proper male +[568:she] ; proper female +; +[570:it] ; ita +[571:it] ; itan +[572:them] +[573:him] +[574:her] +[575:them] +[576:me] ; you ; "Scapeghost special" +[577:him] ; proper male +[578:her] ; proper female +; +; SEE ALSO 2430 - GRAHAM +; +; and some misc output messages +; plural endings, and other odd verb declension... +[579:~] ; print to avoid bug which can print a space after previous word +[580:s] +[581:es] +[582:is] ; used in examine +; +; Entry directions, in the form 'The animal enters from the +; outside'. (As opposed to 'The animal goes in' - the normal +; verb table.) Note that directions are reversed, so the offset +; into the table is the direction of the moving npc. +; +[585:from the south] ; north +[586:from the southwest] ; northeast +[587:from the west] ; east +[588:from the north] ; south +[589:from the northwest] ; southeast +[590:from the northeast] ; southwest +[591:from the east] ; west +[592:from the southeast] ; northwest +[593:from below] ; above +[594:from above] ; below +[595:from outside] ; inside +[596:from inside] ; outside +[597:from across the way] ; across +[598:by climbing] ; climb +[599:with a jump] ; jump +; +; -------------------------------------------------------------- +; +; Examine messages (600+N). NO full stops at end please. +; +; NPCs (1 onwards) +; People +[601:the ghost of Alan Chance, late of the CID. Robbed of my +life and good name, I was determined to clear myself so that +my spirit could rest in peace] +; Me +; +[602:the ghost of a local publican. The Pig and Whistle had +been a cheerful place when he had owned it. Fortunately, he +had brought his good cheer with him into the afterlife] ; Joe Danby +; +[603:the ghost of a criminal that I had killed. His eyes +glowed with a maniacal desire for revenge]; Luke's ghost +; +[604:an efficient, well-drilled team, totally intent on their +work of dousing the flames] +; Firemen in kitchen +; +; ordinary objects (80 onwards) +; +; light objects in order... +[680:my ^A police ^A identity card, which I'd buried just before +my death. It would be useful evidence in linking this place with +the drugs gang, if I could get it to the police] +; My ID card +; +[681:only burnt around the edges, and I could read what was on +it without any difficulty. From the ^N names and ^N numbers it +appeared that the gang had been keeping track of their gambling +debts to each other - they'd probably been playing on credit +against their expected haul from the drugs deal. All the gang were +there, in first name at least. +% %Reading closer, I noticed that one of the two Johns on the list +was identified by the letter Q, presumably the initial of an +unusual surname. This evidence would help narrow down the police +search]; Paper +; +[682:a ^A crumpled ^N scrap which, when opened, +revealed a ^A hand-drawn ^N map. I realised that it showed +the gang's new hideout; presumably this was the isolated +farmhouse shown just outside an unnamed village] ; Map +; +[683:actually an ^A old ^N envelope. Although the address had been +obscured by a large black imprint reading, "BE PROPERLY ADDRESSED +- PLEASE USE THE POSTCODE", I could make out the postmark quite +easily. The envelope had been sent from a local village, possibly +the location of the gang's new hideout] +; Envelope +; +[684:a ^A Pierre ^A Cardigan ^N case. It was securely locked, +but felt empty so there was probably no point in opening it. +% %Attached to the handle was a label which revealed the +town where it was bought, possibly near the new hideout] +; Briefcase +; +[685:a clear 100 ^A watt ^N lightbulb with a ^A threaded +^N base]; clear bulb +; +[686:a 60 ^A watt ^A pearl ^A push-fit ^N lightbulb, of the +^N mushroom type] +; pearl bulb +; +[687:a ^A small ^N piece of ^A kitchen ^N foil that might be +used for baking a potato]; foil +; +[688:a ^A mains ^N plug on the end of a ^A long ^A extension +^N lead. There was a socket on the other end of the lead] +; plug +; +[689:a ^A mains ^N socket on the end of a ^A long ^A extension +^N lead. A plug was attached to the other end of the lead] +; socket +; +; heavy objects... +[695:just of the local area. It was the latest edition and only +three years out-of-date] +; directory +; +[696:a ^N corpse. I recognised the fatal wound caused when Luke +attacked me and his gun went off. Obviously the gang had hidden +his body to buy time]; Luke's body +; +[699:an ^A antique ^N grandfather ^N clock with a ^A solid +^A oak ^N case. It had been loving kept and highly polished at +one time, but its rich patina was now obscured by a ^N layer of +^A grimy ^N dust] +; clock +; +[700:a ^A hinged ^A wooden ^N cover over the ^A workings of the +clock. It was closed] +; closed panel +; +[701:open, revealing the ^A clock's ^A heavy ^A brass ^N pendulum] +; open panel +; +[702:cold and mud-stained. Frozen ^N strands of ^A yellowing ^N weeds +stuck out from the surface] +; ice in ditch +; +[703:a ^A large and ^A irregular ^N twig, still bearing a ^A few +^A tired ^N leaves] +; branch +; +[704:cold, dirty and wet. Even in mortal form I would have +kept clear of there. Now, I felt a strange revulsion as +I contemplated the moving liquid] +; water in ditch +; +[705:an unstoppered bottle of ^N Jack ^N Daniels. I could actually +see the ^N alcohol ^N fumes as they evaporated slowly through the +bottleneck. I was looking for proof that night, but not 70 +proof fire-water] +; whisky +; +[706:an ^A old ^A black ^N model, covered in a ^A thick ^N layer +of ^N dust and ^A torn ^N cobwebs. Looking closer, I could see +my ^A smudged ^N fingerprints on the ^N handset] +; telephone +; +; static objects (110 onwards) +[710:a ^A thick ^A asbestos ^N sheet. One of its ^N corners had +broken off, leaving a ^N gap] +; water tank lid +; +[711:the ^A old ^A lead-soldered ^N tank that had once supplied +cold water to the house. It was a big one - about six foot long +I guessed] +; water tank +; +[712:a ^A solid ^N buttress than ran upwards from the ^N fireplace +to the ^N ceiling. Presumably there was a ^N chimney ^N shaft inside] +; chimney piece +; +[713:empty, except for a few ^N ashes that lay in the +^A iron ^N grate] +; do not mark anything in here as ^N paper +; fireplace +; +[714:a ^A disused ^N entrance that had been bricked up. I could feel +a ^N draught from outside, through the ^N cracks in the ^N plaster] +; bricked-up door +; +[715:a ^A thick ^N growth of ^A dark ^A green ^N leaves that +smothered the ^N wall of the house. ^N Clusters of ^A black +^N berries mottled the surface] +; ivy +; +[716:thinned with age, and tacky with smoke from years +of cooking] ; curtains +; +[717:fastened to the kitchen wall. +Looking at the ^N serrated ^N metal ^N blade along the +front edge, I remembered that I never did quite get the +hang of using dispensers while I was alive. I always ended +up with a torn triangle of aluminum that was never big +enough to do the job] +; foil dispenser +; +[718:screwed loosely to the wall. Although it was quite +clean, there was no sign of my reflection in the glass. I +spent some time looking for it - even the hint of an outline +would have been reassuring - but to no avail. All I could see +was the reflected room and the ^A faint ^N impression of a +^A rectangular ^N shape] ; mirror +; +[719:a ^A secret ^N hiding ^N place, where ^A several ^N bricks +had been removed from the wall behind the ^N mirror] +; alcove +; +[720:a ^A screw-in ^N lampholder set into an ^A ornamental ^N plastic +^N candelabra above the ^N doorway|^N lamp ^N holder] +; socket in hall +; +[721:a ^A push-in ^N lampholder, dangling low from the ceiling. It +hung naked at the end of a ^A dusty ^A two-ply ^N wire|^N lamp ^N holder] +; socket in kitchen +; +[722:a ^A large, ^A old-fashioned ^A brown ^N lump, controlling +both the ^A hall ^N light and the ^A fluorescent ^N tube on the +landing above] +; switch in hall +; +[723:smeared with ^N something ^N brown and ^N soft; hopefully +^A aging ^N ketchup] +; switch in kitchen +; +[724:a ^A circular ^A glass ^N hoop set in the ceiling above the +landing] +; fluorescent tube on landing +; +[725:very slowly oozing towards a ^N crack in the floor nearby. I +wondered whether the spirit would reach this ^N crevice and seep +away, or would it evaporate first?] +; puddle of whisky +; +[726:a ^N scatter of ^A broken ^A shards, glistening with ^N whisky] +; broken glass +; +[727:a ^A stagnant and ^A slowly-trickling ^N stream] +; ditch +; +; invisible objects (150 onwards) +; +[750:a ^A volatile ^N cloud of ^A high-proof ^N spirits, so +thick I could almost feel it] +; whisky vapour +; +; headstones & graves are present in graveyard locations... +[751:standing proud or leaning forlornly, as time and vandals +had allowed, in the moonlit churchyard] +; headstones +; +[752:^A low ^N mounds, slowly subsiding with the passage of the years] +; graves +; +; present in the three village green locations +[753:the ^A well ^A tended ^N grass of the ^N village ^N green, +now cloaked in the mists of an Autumn night] +; grass +; +; present in the three garden locations +[754:the ^A unkempt ^A garden of the hideout. There was only one sort +of grass those boys were interested in, and it didn't grow here] +; +[755:a ^A long ^A brass ^N rod with a ^A heavy ^N cylinder at the +end. Pity there weren't any cogs numbered 1 to 9, I thought] +; pendulum in grandfather clock +; +[756:a ^A narrow ^N footpath that meandered up from the cemetery to +the old house] +; track +; +[757:a ^A grey ^N shell, rising out of a silent sea of mist that +washed slowly upwards from the sodden village green] +; house from garden AND inside it +; +[758:dustily festooning the rafters and hanging low into the room. +A ragged passageway had been ripped through them from the hatch to +the water tank] +; cobwebs in attic +; +; objects sources that are present in many locations... +[759:^N parsley, ^N sage, ^N rosemary and ^N thyme] ; herb garden +; +; present in the three village green locations... +[760:a narrow, winding road, little changed since the days +when carts clattered through on their way to market. Except that +nowadays people drove along it at Motorway speeds] +; +[761:a ^A fiery ^N cloud of ^A blazing ^A whisky ^N fumes] +; burning vapour +; +; light sources that are present in many locations... +[775:the bright light of ^A car ^N headlights] +[776:the brightness of the hall light] +[777:the light coming from the kitchen light] +[778:the clear glow from the fluorescent tube on the landing] +; +; Brief location objects (479+N). +; +; These are used for seeing from a distance and for input, e.g for +; 'examine tower' and 'go castle'. (Note that 'go scenery' also works). +; They also provide a link between the grid of synthesized locations +; and the real, static locations used for rooms inside buildings etc. +; +[780:a ^N track leading out of the ^N cemetery] +; path +; +; -------------------------------------------------------------- +; +; Short-Form room Descriptions (800+N). No full stops at end please. +; These are the brief mode descriptions; they are prefixed by 'you +; are' and, in verbose mode, messages 1100+N are appended. +; +; room 1 is used as exit modifier for synthesized rooms. +; rooms 2..20 are those with static connections; i.e. not on the +; synthesized grid. +; +; description order is: +; 'I was' '800++' '1100++' '.' +; short long +; +; Outdoors +; +[803:standing beside my own grave] +[804:by Joe Danby's ^N grave] +[805:among the ^A new ^N graves] +[806:by the ^N Willmot ^N Graves|^N Bert ^N Edna] +[807:on a ^A winding ^N track] +[808:on the south part of the ^N village ^N green] +[809:in the ^N middle of the ^N village ^N green] +[810:on the north ^N green|^N village] +[811:in the ^A front ^N garden] +[812:in the ^N herb ^N garden] +[813:on a ^A thick ^A grassy ^N lawn] +; +; Indoors +; +[814:in the ^N hall|^N hallway ^N house] +[815:in the ^N kitchen] +[816:in the ^N breakfast ^N room|^N dining] +[817:in the ^N lounge] +[818:on the ^N landing|^N stairs] +[819:in the ^N bathroom] +[820:in the ^N attic|^N loft] +; +; "echo locations..." +; +; Indoors +; +[825:in a dank corridor lined with a few wooden doors. None +of them were locked and I opened each in turn, only to find +empty bedrooms behind them all. I could see nothing here +that I could use as evidence, so I floated back to the landing] +; +; Outdoors +; +[830:in the overgrown part of the cemetery, now littered with +debris. I decided to return from whence I came] +; +[831:standing beside the remains of the copper beech, which +lay splintered on the muddy earth around me. "Another broken +copper", I thought, "I know how it feels". And I turned and +drifted back eastwards] +; +[832:standing beside the broken sundial which cast a jagged +shadow onto the debris to the north. A bright light shone from +the shed window to the south of the cemetery, forcing me to +return east into the shadows] +; +[833:on the ^A partly-cleared ^N rubble left by the collapse +of the ^N church ^N tower yesterday. A ^A mixed group of +^N sightseers and ^N workmen strolled around the ^N stones, +discussing the sudden storm that had caused the damage, and +occasionally stopping to listen in case anyone was trapped. +% %The ruins were lit from a portable generator, and the +bright light weakened me, so that I found myself drifting +back to my own grave] +; +; Grid rooms +; +[840:on a ^N path] +; +; -------------------------------------------------------------- +; +; Now verbose additions to brief location descriptions (1100+n). No +; full stops at end please. These are printed immediately after each +; short description (800+N), without any intervening punctuation. +; (You may start a message with either punctuation or just text.) +; +[1103:. Through the darkness, I could make out Joe Danby's +grave to the north, and to the west I saw the ^N ruins of +the ^N church ^N tower] +; standing beside my own grave +; +[1104:. It was strewn with ^A splintered ^N lengths of ^N wood, +^A rusting ^N bolts and ^A angle ^N irons, cast here when the +^A spotlit ^N tower collapsed] +; Joe Danby's grave +; +[1105:. A ^A small ^N path, its ^A overgrown ^N surface almost +indistinguishable from the surrounding land, lead east +through a ^N gap in the ^N wall] +; among the new graves +; +[1106: in the northeast ^N corner of the ^N cemetery] +; Willmot Graves +; +[1107: leading north from the ^A cemetery towards the old village. +% %^A Dank ^N clouds of ^N mist hovered low over the green to the +north, lit occasionally by ^A long ^A sweeping ^A beams from the +headlights of passing cars]; on a winding track +; +[1108:. The ^N grass was wet beneath my feet, sodden with +yesternight's rain] +; on the south part of the village green +; +[1109:. The area around me had been churned into a sea of +^N mud and deeply marked by ^A studded ^N footprints. Just +beyond, the ^A centre ^N line of the ^N football ^N pitch +reappeared on a ^A small ^N patch of ^A clear ^N grass|^N goalposts] +; in the middle of the village green +; +[1110:] ; on the north green +; +[1111: which must once have been well tended but was now +overrun with ^N weeds and long grass] +; in the front garden +; +[1112:, ruined by long neglect - its plants all strangled by +dead nettles] +; in the herb garden +; +[1113:. A tangled growth of ivy covered the ^A cracking ^N wall +of the ^N house before me, reaching high to tug at the ^N gutters +and pry beneath the ^A roof ^N tiles] +; on a thick grassy lawn +; +; Indoors +; +[1114: which was cold and bare and unwelcoming] +; in the hall +; +[1115:. ^A Curling ^N flakes of ^A old ^N paint and +^A dusty ^N chunks of ^A crumbling ^N plaster had collected +around the ^N skirting ^N boards, leaving the ^A yellowing +^N walls mottled and peeling like dead skin] +; in the kitchen +; +[1116: to the north of the kitchen. The ^A bare ^A wooden +floor was littered with the ^A drying ^N remains of ^A hasty +^N meals] +; in the breakfast room +; +[1117:. ^A Dark-stained ^N bookcases covered one wall, but +carried nothing but ^N dust and the ^A pale ^N stains from +careless cups. Apart from that, the place was bare of +furniture] +; in the lounge +; +[1118:, overlooking a ^A narrow ^N staircase. A door lead +into the bathroom, and a ^A small ^N hatch above led into +the attic] +; on the landing +; +[1119:] ; in the bathroom +; +[1120:. ^A Dusty ^N cobwebs dangled down and passed through me] +; in the attic +; +; Grid rooms +; +[1140: which twisted into the foggy distance to the north] +; on a path +; +; -------------------------------------------------------------- +; +; 1350+n are messages printed on first entering each room +; (VisitTable) +; +[1353:% %the earth around my grave was slushy and wet after +yesterday's storm. Fallen leaves lay soaking in the murky +puddles nearby, and uprooted plants littered the ground. ] +; standing beside my own grave +; +[1354:% %I had little doubt that Joe's old friends would be busy +this weekend, tidying up his resting place. ] +; Joe Danby's grave +; +[1355:% %the path seemed to turn beyond the wall and head north. +The village green lay there, and beyond it the chimneys of an +old house stood out against the skyline. It looked strangely +familiar. ] +; among the new graves +; +[1356:% %there were no signs of the ^N Willmots tonight. I +didn't think it likely that they had decided to have a +quiet lie-in together. More probably, they had been +quarrelling again and were now both sulking. ] ; Willmot Graves +; +[1357:%no one much lived hereabouts nowadays. Most of the old +houses had long since been abandoned, as people moved down to +the burgeoning town to the south. ] +; on a winding track +; +[1358:] ; on the south part of the village green +; +[1359:] ; in the middle of the village green +; +[1360:% %as the mist thinned out, I could clearly see an +old house at the end of a tangled garden to the north. No +lamps were lit there, no smoke drifted from its chimneys +and no sounds escaped its dark walls. Yet there was a +strong sense that it was occupied, and I felt uneasy. ] +; on the north green +; +; Note for \Pete & Mac: The first time messages for rooms which are +; associated with VISIONS are only printed if the player is NOT +; concentrating, since they become very confusing otherwise. +; This concerns message numbers 1361 to 1370 - Graham +; +[1361:I realised with shock that I had been here before. Though +this place was now deserted, it had been the gang's old hideout. +% %As I approached the house, I seemed to see the images of +many figures, spinning in a frenzy, blurring into darkening mist. ] +; in the front garden +; +[1362:I recoiled involuntarily from the sound of the ^N ripples. ] +; in the herb garden +; +[1363:%an ^N owl came upon me in a white rush, sweeping down +through me, talons outstretched, to pluck a cowering ^A field +^N mouse from the ^N lawn behind me. I heard a thin small cry +of pain before the sound was overwhelmed by the urgent beat of +powerful wings. And the silence that followed was even deeper +than it had been before. ] +; on a thick grassy lawn +; +; Indoors +; +[1364:% %a ^A distressing ^N presence hit me as I entered the +hall; a sudden sense of past violence. And there was a painful +familiarity to it, as if that violence had concerned me. ] +; in the hall +; +[1365:a ^A lone ^N cockroach scuttled off as I entered and +disappeared through a ^N hole in the ^A cracked ^N lino. ] +; in the kitchen +; +[1366:] ; in the breakfast room +; +[1367:the room's sparseness was offset by a ^A fine ^A old +^N fireplace with a ^A carved ^N mantle and ^A tiled ^N surround. +I wondered idly how long it would be before some enterprising +cowboy ripped it out to sell in London. ] +; in the lounge +; +[1368:% %^A ghostly ^N footsteps trod clumsily behind me, as if two +figures were carrying something heavy up the stairs. But this was +only another echo of the past. ] +; on the landing +; +;; [1369:] ; in the bathroom +; +[1370:% %the still air seemed to shimmer. ] +; in the attic +; +; Grid rooms +; +[1390:% %^A twin ^N beams of light briefly pierced the ^N gloom +far to the north. ] +; on a path +; +; -------------------------------------------------------------- +; +; Message pairs for use in describing containment positions +; also used for preposition table +; +; part printed before container +; +[1600:I could see] ; 0 - I could see +[1601:^P on |^P onto] ; 1 - on +[1602:^P underneath|^P below ^P under] ; 2 - under +[1603:^P behind] ; 3 - behind +[1604:] ; 4 - carrying +[1605:] ; 5 - wearing +[1606:^P at] ; 6 - (throw at mirror) ==Scapeghost== +[1607:^P in |^P into ^P inside] ; 7 - in +;; [1608:hanging from] ; 8 - hanging from +;; [1609:growing from ] ; 9 - growing from +;; [1610:^P between] ;10 - tied between is tied a rope +;; [1611:] ;11 - the carter was pushing a cart +;; [1612:lying on] ;12 - lying on +;; [1613:sitting on] ;13 - sitting on +[1614:frozen to] ;14 - (fastened to) ==Scapeghost== +[1616:^P with|^P using] +[1617:^P from] + +; part printed between container and contained. +; +[1640:] ; 0 - I could see +[1641:was] ; 1 - on +[1642:was] ; 2 - under +[1643:was] ; 3 - behind +[1644:was carrying] ; 4 - carrying +[1645:was wearing] ; 5 - wearing +;; [1646:was blocked by] ; 6 - is blocked by +[1647:was] ; 7 - in +;; [1648:was] ; 8 - hanging from +;; [1649:was] ; 9 - growing from +;; [1650:was tied] ;10 - tied between +;; [1651:was driving] ;11 - the carter was pushing a cart +;; [1652:] ;12 - lying on +;; [1653:] ;13 - sitting on +[1654:was] ;14 - (fastened to) ==Scapeghost== +; +; for plural contents... +[1670:] ; 0 - I could see +[1671:were] ; 1 - on +[1672:were] ; 2 - under +[1673:were] ; 3 - behind +[1674:was carrying] ; 4 - carrying +[1675:was wearing] ; 5 - wearing +;; [1676:was blocked by] ; 6 - is blocked by +[1677:were] ; 7 - in +;; [1678:were] ; 8 - hanging from +;; [1679:were] ; 9 - growing from +;; [1680:was tied] ;10 - tied between +;; [1681:was driving] ;11 - the carter was pushing a cart +;; [1682:] ;12 - lying on +;; [1683:] ;13 - sitting on +[1684:was] ;14 - (fastened to) ==Scapeghost== +; +; (1700+N is part printed before 'you') +; +; 1740+N is part printed between you and object(s) +[1740:] ; 0 - I could see +[1741:was on] ; 1 - on +[1742:] ; 2 - under +[1743:] ; 3 - behind +[1744:owned] ; 4 - carried +[1745:was wearing] ; 5 - worn +;; [1746:was riding] ; 6 - riding +[1747:was in] ; 7 - in +;; [1748:] ; 8 - hanging from +;; [1749:] ; 9 - growing from +;; [1750:] ;10 - tied between is tied a rope +;; [1751:] ;11 - the carter was pushing a cart +;; [1751:was driving] ;11 - pushing +;; [1752:was lying on] ;12 - lying on +;; [1753:was sitting on] ;13 - sitting on +[1754:was frozen to] ;14 - (fastened to) ==Scapeghost== +; +; for plural prepositions... +; 1770+N is part printed between you and object(s) +[1770:] ; 0 - I could see +[1771:were on] ; 1 - on +[1772:] ; 2 - under +[1773:] ; 3 - behind +[1774:owned] ; 4 - carried +[1775:were wearing] ; 5 - worn +;; [1776:were riding] ; 6 - riding +[1777:were in] ; 7 - in +;; [1778:] ; 8 - hanging from +;; [1779:] ; 9 - growing from +;; [1780:] ;10 - tied between is tied a rope +;; [1611:] ;11 - the carter was pushing a cart +;; [1782:were lying on] ;12 - lying on +;; [1783:were sitting on] ;13 - sitting on +[1784:was frozen to] ;14 - (fastened to) ==Scapeghost== +; +[1800:^P off] +[1801:^P up] +[1802:^P down] +[1803:^P to] +[1804:^P out] +[1805:^P from the ] ; used for npc motion +[1806:^P for] +[1807:^P until] +[1808:^P debug] +[1809:^P through] +[1810:^P about] +; +; Parser messages.. +[2000:you don't need to use "] +[2001:" to finish the game] +; +[2003:I don't understand the word "] +[2004:" when used like that] +; +[2006:I was ] +[2007:in a ] ; as in 'You are in an alder forest +[2008:in an ] +[2009:exits led in all directions] +; +; general error message when parsing has broken down. +[2010:I don't understand what you mean] +[2011:I couldn't see] +[2012:I didn't have] +[2013:I already had] +[2014:(Perhaps I'm having a bad night, but I really haven't +the ghost of a notion as to what you are on about)] +[2015:it's too far away] ; examine, take etc. scenery objects +[2016:I can't find a verb in that sentence] +[2017:it's not there] +[2018:there were too many nouns in that sentence] +[2019:I couldn't see that here] +[2020:I owned nothing at all. ] +[2021:it was dark. ] +[2022:I couldn't reach that from here] ; PLEASE LEAVE IN (although there +; are no "out of reach" restrictions, it is used as an error message +; when trying to access anything inside the tank when the lid is on) +; +[2036:sorry, I don't fully understand that verb] +; ^ verb in keyword table but not in CALLVERB routine +[2037:there didn't seem to be anything suitable. ] +[2038:said "That was a rhetorical question"] +[2039:what a mouthful! ] +; +[2044:couldn't have ] ; as in 'I couldn't have hit that' +; +[2046:that] +[2047:here] +[2048:I couldn't find ] +; +[2053:it's not clear to what ] +[2054: is referring] +; +; error messages for NPC's +[2060:are you talking to yourself again? ] +[2061:I couldn't talk to several people at once] +; +; Standard Adventure output messages +; +[2100:I woke once again beside my own grave. Darkness had fallen +on my second night as a ghost and my powers had grown. I smiled +as I remembered how my deeds of yesternight had delayed the +gangsters, buying time tonight to locate their new hideout. +Now, with my heightened senses, I could detect an old house +north of the cemetery...] +; +; examining something greater than maxobject: (but not scenery) +; rare occurrence - mostly for omnipresent objects, numbers, spells +[2112:it looked exactly as I had expected. ] +; +[2114:I couldn't go that way] +[2115:through the door] +; +[2117:it's already open] +; +[2123:I couldn't put ] ; paired with 2124 +[2124:there] +; +[2126:I would have to drop it first] +[2127:I would have to pick it up first] +[2128:%did you know that you can go quickly to a far off place? E.g +"RUN TO HALL" or "GOTO JOE". %] +; +; 2130 is used when player refers to scenery which is not nearby +[2130:I can't find a reference to "] +[2131:I was on it! ] +[2132:what? ] +[2133:where? ] +[2134:I was wearing ] +[2135:please try again, saying what with. ] +[2136:which one? ] +[2137:at what? ] +; +[2139:was full] +[2140:" here] +; +[2142:I couldn't wear ] +; +[2147:I was already wearing that] +[2148:I found that I didn't need to do that] +; +; Confirmation messages +; +[2152:worn] +[2153:OK] +; +[2155:time passed. ] +[2156:said] +; +[2158:I found that I would have to untie it first] +; +[2160:YES or NO please.%] +; +[2172:nobody wants it] +; +; Death, scoring, game control etc. +; +[2200:really restart? ] +[2202:really restore? ] +[2203:% %did I continue? ] +;;[2204:said, "Thank you"] ; >> Pete 14/9/89 +; +[2209:% %the adventure had come to an end. +%Please type RESTART, UNDO, RESTORE or RAM RESTORE: ] ; && +[2210:the room was badly damaged] ; attack/fireball room +[2211:the place was already smashed] +[2212:really! You're so destructive! ] +[2213:it looks as though the vandals have been at work here] +; +[2215:that's too long to wait] ; won't wait +[2216:you can wait for someone (e.g. WAIT FOR JOE), +for a certain length of time (e.g. WAIT FOR 25 MINUTES)] +; +; Score messages.. +[2240:%I had scored ] +[2241:% %the adventure had come to an end.%] +[2242: out of 600 and was ] +[2243:-] ; minus sign +; +; Ratings +[2249:a faded vision] ; -ve score +[2250:a vain spirit] +[2251:an incompetent ghost] +[2252:a harmless apparition] +[2253:an ordinary ghost] +[2254:a competent spirit] +[2255:progressing in the spirit world] +[2256:a strong presence] +[2257:a powerful phantasm] +[2258:a vivid phantom] +[2259:a dominant supernatural force] +[2260:a poltergeist] ; Used for score overflow +; +[2300:UNDO and RAM SAVE//RESTORE don't work in this version. ] ; && +[2301:%please insert save disk and press a key. %] ; && +[2302:%please insert game disk. %] ; && +; +[2308:I couldn't go back further than this. ] ; && +[2309:%(This version allows you to use RAM SAVE and RAM RESTORE to +save a position in memory, and UNDO to take back bad moves).%] ; && +[2310:I can't find that saved position in memory. Perhaps you've +restarted the game, since it was saved. ] ; && +; +[2311:% %I am about to start another part of the game. Do you +want to save my position first, just in case? ] ; && tape +[2312:that data was not saved from Scapeghost. ] +[2313:play the game tape to load part ] ; && tape +[2314:% %I am about to start another part of the game. Do you +want to go ahead? ] ; && tape +; +; +; misc jokey messages (slightly more complex than echo verbs).. +;;[2401:that would be a pretty stupid thing to do] ; attack me ; >> Pete 14/9/89 +[2404:I could smell nothing] +[2405:I found nothing much of interest] +[2406:I didn't smell of anything, being a ghost] ; == altered for ghost == +[2407:I said hello] +[2416:to be, or not to be, that is the question] +[2417:knocked with a hollow sound] +; follow target is destroyed +[2420:I couldn't seem to find what I was looking for] +; +; Additional pronouns used when actor is referring to himself. +; This prevents: +; EXAMINE JOE +; Joe was... +; JOE, EXAMINE JOE +; Joe examined HE. +[2430:itself] ; ita +[2431:itself] ; itan +[2432:themselves] +[2433:himself] +[2434:herself] +[2435:themselves] +[2436:myself] ; ; "Scapeghost special" +[2437:himself] ; proper male +[2438:herself] ; proper female +; +; used by vehicles +[2470:got out of the cart ] +[2471:drove the cart to the ] +[2472:drove the cart ] +; +; movement of animals GROUP +;; [2480:trotted] +;; [2481:ran] +;; [2482:darted] +;; [2483:wandered] +;; [2484:went] +; +; movement of people GROUP +[2490:walked] +[2491:trudged] +[2492:stomped] +[2493:wandered] +[2494:went] +; +; movement of ghosts GROUP +[2500:floated] +[2501:drifted] +[2502:hovered] +[2503:glided] +[2504:went] +; +; passing cars alongside village green (racetrack, not group). +[2510:% %the sound of an approaching car drifted across the village +green. ] ; followed by 2851 +[2511:% %I could see in the misty distance, the pale headlights of an +car, coming down the road that ran beside the village green. ] +; followed by 2852 +[2512:% %as the approaching car turned on the winding road by +the green, suddenly, its headlights swung my way and caught +me dead centre in their brightness. ] +[2513:% %the dim red tail lights of a passing car faded away +into the distance. ] ; followed by 2853 +;; [2514:] ; interval between cars +; +; player loses concentration for various reasons +[2520:% %the disturbing presence of the many other ghosts in +the cemetery made it impossible for me to concentrate properly] +; followed by 2854 +[2521:% %for all I tried, I could pick up no sensation of +anything important having happened in this place. As I was +tiring and getting nowhere, I stopped concentrating] +[2522:% %I seemed to lose my concentration] +; +; ghost tries to lift a heavy object +[2528:would never be strong enough to carry such a dead weight] +; +; GROUP message when objects in vision are examined +[2530:I couldn't see more detail in the vision] +[2531:the vision was blurry, and I couldn't make out any more] +[2532:it was difficult to make things out in the vision] +[2533:I couldn't see the vision very clearly] +[2534:the vision was too blurred for me to see any more detail] +; +; Reach through ordinary walls. >> Pete 17/7/89 +; +[2535:stuck a hand through the wall and waggled it about on the +other side, but found nothing of interest this time] +; +; Chimney puzzle (operated by the player OR Joe, hence the +; messages are in pairs depending on whether the player is in +; the lounge or outside) +; +; Put hand through bricked up door +[2540:put a hand through the bricked up door, waved it about outside, +then withdrew it again] ; followed by 2855 +[2541:a ghostly hand emerged from behind the ivy, waved briefly and +disappeared again. This gave me a fix on the room, so that I knew +the position of the chimney within the wall] +; +; Put hand through ivy when location of chimney is known +[2542:put a hand through the wall behind the chimney and dislodged +the piece of paper from its resting place inside] +[2543:I saw a piece of paper flutter down from the chimney and +out into the fireplace] +; +; Put hand through ivy when location of chimney is unknown TO PLAYER +; (even though it may be known to Joe), OR when paper has already +; been dislodged +[2544:put a hand through the wall and waved it about before +pulling it back out again. I thought that I was probably reaching +into the lounge, but could not tell exactly where] ; followed by 2856 +[2545:a ghostly hand appeared through the bricked up door, then +disappeared again] +; +; Put hand through chimney before paper is dislodged +[2546:put a hand through the chimney piece and brushed against a +piece of unburnt paper. Annoyingly, the paper was just too far +out of reach to be dislodged, for the chimney was a big old one +that protruded a long way into the room] ; followed by 2857 +; +; Put hand through chimney after paper is dislodged +[2547:put a hand through the chimney piece and felt nothing +but soot and cobwebs] +; +; user puts hand through tank +[2548:my hand went a short way into the tank, far enough to +tell that there was water in it, but not far enough to be +tell if there was anything in the water. If I wanted a proper +look around, I would have to get inside the tank] ; followed by 2858 +; +; put hand through lid (followed by 2548 if actor is user, or by 2550 +; if actor is not user) +[2549:pushed a hand against the lid and found it went straight +through it] +; +; npc puts hand through tank +[2550:reached a hand a short way into the side of the tank and +felt the water in it. "Yuk! It's nasty cold wet stuff. I +wouldn't fancy a bath in there", he said with a wry grin] +; +; User is startled by sudden shock of bright light +[2552:% %the sudden shock of the light hit me like a physical +blow. I felt myself begin to fade and everything returned to +darkness. When I next opened my eyes I found myself ] ; +room desc +; also used by spotlight +; actor is startled by light and sent back to grave. this message +; is printed if user is by their grave when they arrive +[2558:slowly materialised before me and complained groggily about +the effects of sudden bright lights] +; +; find identity card +[2560:found a small plastic card] +; dig in wrong place +[2561:reached half-heartedly into the ground, but managed to +find nothing] +; +; map puzzle +[2565:it was out of reach and the flowing water formed an +impassable barrier for a ghost] ; followed by 2860 +[2566:the map fluttered and fell back, clinging fast to the +branch] ; followed by 2860 +; +; Both user and Luke are startled +[2570:% %an echoing, ear-rending scream pierced the air] +; +; Luke is startled +[2571:% %Luke's ghost screamed painfully as the sudden shock of +the landing light cast him into limbo for the rest of the night] +; followed by 2861 +; +; Luke attacks npc and banished him from this night +[2580:screamed horribly as a murderous ghost appeared through +the wall and assailed him in a deadly fury. He barely managed +to break away from the attack and fled from the house, never +to return for the remainder of the night] +; +; Luke attacks user, but Joe has already been banished +[2581:suddenly I was attacked! + +% %the ghost of Luke, the criminal who I had slain earlier, +threw himself upon me with overwhelming violence. Without +Joe there to help me, I felt myself fade to nothingness. I had +failed in my task] +; +; Luke attacks user, but Joe comes to the rescue +[2582:without warning, a terrible ghost threw himself upon me +with a staggering violence. It was Luke, the criminal I had +accidentally killed, and he was literally tearing me apart. +I felt myself fading rapidly, and I would soon have been +banished from the house if Joe hadn't arrived in the nick of +time to drag me free. +% %He pulled me free of my terrible assailant and dragged me down +the stairs and into the hall. "That was a fight worse than death", +gasped Joe, as I slowly began to recover..] +; +; GROUP message for USER when light is present +[2590:I felt uneasy about ] +[2591:I began to feel weak because of ] +[2592:my powers seemed to be absorbed by ] +[2593:I found that I couldn't stand being close to ] +[2594:a sudden feeling of distress was brought upon me by ] +; +; GROUP message for NPC when light is present +[2600:only complained about ] +[2601:wanted me to turn off ] +[2602:cringed weakly away from ] +[2603:turned away from ] +[2604:moaned about ] +; +; examine lights when not present +[2610:there were no bright lights here. ] +; not specified which lightbulb +[2623:please try again, this time saying which one] +; +; miscellaneous messages concerning lights in the house +[2630:the hall light was on] +[2631:the landing light was on] +[2632:the kitchen light was on] ; printed after room descriptions +; +[2640:it was switched off] +[2641:it was switched on] ; on examining switches +; +[2660:the hall light went off] +[2661:the hall light came on] +[2662:the landing light went off] +[2663:the landing light came on] +[2664:the kitchen light went off] +[2665:the kitchen light came on] ; on switching lights on and off +; +[2672:couldn't find the strength to push the stiff switch because +of ] ; can't push switch in hall while landing light is on +[2673:smashed to smithereens] ; on dropping a light bulb +[2674:the bulb was the wrong type and couldn't be fitted in that +sort of lampholder] ; can't swap bulbs +[2675:there was a loud crack as the main fuse in the house was +blown] ; Main fuse is blown. Followed by 2863 +; +; removing bookmark from directory +[2680:a little more force seemed to be needed] +; Pull. Followed by 2864 +[2682:the telephone had been crudely ripped from the wall and +hurled to the ground. A frayed wire hung limply from the back, +its torn end brushing against the floor, and I knew that this +was one object that would never work again] ; dial etc. +; +; dead body in tank +[2690:I eased myself into the tank and then realised to my +horror that I was not alone there. Swaying eerily in the +discoloured water was the dead body of Luke, the crook I had +shot in the struggle before my death. +% %Startled by the gruesome sight, I scrambled to get out of +the tank, pushing aside the lid in my panic] ; followed by 2866 +[2691:went inside the tank and then suddenly scrambled back out +again, knocking the lid over in his rush to escape. He trembled +violently and his face had turned a translucent white. +%"Inside the tank", he stammered, "a dead body"..] +; +; extension lead +[2693:was fastened to something heavy, and ] +[2694:left ] +[2695:was dragged along the floor] +; +; clock is used to tow the body onto the landing +[2700:the clock was closed] +; Put object in clock when panel closed. Followed by 2867 +[2710:the clock had already been pushed over] ; clock pushed in hall +[2711:the clock toppled over and slid heavily down the stairs to the +hall] ; Push clock. Followed by 2868 +[2712:remained on the landing] +; Lead falls out of open clock. Followed by 2869 +[2713:was dragged along behind it] ; lead or body is dragged +; +; mirror puzzle +[2720:put a hand through the mirror and noticed that there was a +spacious gap behind it] ; followed by 2870 +[2721:didn't have any hard objects to hit the mirror with] +[2722:hit the mirror and smashed it to pieces, revealing a secret +alcove. Someone had stashed a briefcase in there] +[2723:hit the mirror and they both smashed to pieces. As the +shattered glass fell from its frame, it revealed a secret alcove +containing a briefcase] ; hit mirror with lightbulb +; +; starting a fire in the kitchen +[2730:pushed over the bottle, which smashed open on the floor. +The whisky spread in a widening pool and began to evaporate. +It wasn't long before the room was filled with its strong vapour] +; followed by 2872 +[2731:% %the air was thick with the sharp tang of whisky fumes] +; +[2735:it was on fire] ; examine burning vapour +[2736:they were burning fiercely] ; examine burning curtains +[2737:blew the curtains and the flames crept higher] ; already burning +[2738:blew the curtains. They flapped out into the room and fell +back again, settling back into their old creases] +; Blow curtains when no fire. Followed by 2876 +[2739:blew the curtains into the flames where the crisp fabric +instantly caught fire] ; followed by 2877 +; +; progressive burning of curtains summons the fire brigade +; (these messages are in reverse order and are seen in all house locations) +[2740:the firemen finished putting out the blaze. They made a brief +search of the house to check that nobody was there and that all +was safe, then departed. ] +[2741:the house was filled with dense acrid smoke and the roar +of flames. Then the wailing sound of an approaching siren came +through above the noise of the fire. There was a screech of +brakes and a rush of heavy footsteps as a fire engine pulled up +outside and a group of firemen ran up to the house. They smashed +their way in through the front door and dashed into the kitchen, +shouting orders to the others outside. ] +[2742:thick smoke began to fill the house. ] ; followed by 2878 +; +; firemen have arrived. proceed with endgame depending on whether +; the body or any evidence have been left in the hall +; (these messages are bolted onto message 2741, and are seen in all +; house locations) +[2750:"Hey! There's a body in here", shouted one of the firemen from +the hall as he came across Luke's corpse. A few moments later, +another fireman came in with a stretcher. They loaded the body +with swift efficiency and carried it out of the house. ] +; Body here, but no evidence. Followed by 2879 +; +[2751:"Someone radio for the police!", shouted a fireman in the hall. +"There's a dead man here and he wasn't killed by the fire. Don't +touch anything". ] ; followed by 2881 +; body and evidence here +; +[2752:"Who put all this junk in here?", shouted one of the +firemen from the hall as he kicked to one side all the evidence +I had collected so carefully. "If somebody's going to have a +fire, then you think they'd have the decency to tidy up first!". ] +; no body, but evidence is here. Followed by 2880 +; +; win message is bolted onto message 2751 when all evidence is here +[2753:I was sure that Luke's body would stir the police into +action, and that when they looked at the evidence I had collected, +they would have sufficient clues to locate the drugs gang. I had +done my job. ] +; +; Joe's messages when evidence is discovered +[2760:"Aha!", exclaimed Joe, "Some evidence! Let's see what +else there is to find, before you summon the police"] +[2761:"More evidence", said Joe, "But I reckon that we'll have +to find even more if we're to find where the drugs gang might +have gone. And then we'll have to work out how to summon the +police"] +[2762:"You're doing well", enthused Joe] +[2763:"It seems to me", began Joe, "that we've almost found enough +evidence to locate where the drugs gang are hiding. When we've +finished, I hope you can work out how to give it all to the police"] +[2764:"Well", said Joe contentedly, "I think we've collected enough +evidence for the police to locate the gang. Now we'd better try and +find some way to get it to them"] +; +; Joe gives a hint to concentrate outside the house +[2770:% %Joe looked around. "If I'm right", he said thoughtfully, +"a tragic event has left its mark on this place. Some people can +call up the past in visions; I get hints but no more. Perhaps you +could concentrate and summon the past a shade better than I can. As +like as not, it concerned you"] +; +; Joe doesn't want to start a fire (this also prevents endgame being +; executed if user is away from house) +[2771:said, "Don't do that! It'll set the whole house ablaze!"] +; +; late additions... +[2772:I found that I was now capable of passing through some solid +objects! With some difficulty, ] +[2773:try dropping it] +[2774:didn't have the strength to climb the stairs while the landing +light was on] +[2775:on it was a heavy lid with a small gap in one corner] +[2776:looking through it, I could see a vague shape in the water, but +I would have to get inside the tank if I wanted to see what it was] +[2777:couldn't reach the body from outside the tank] +[2778:the whisky wouldn't burn properly while it was in the bottle] +[2779:I would need a flame to light the curtains] +[2780:the vapour was already burning] +; +; progressive burning of vapour, in reverse order +[2785:the fire flickered and died, though the pool of whisky on +the floor continued to evaporate in the warmed air. ] +[2786:the fire began to die away as the vapour burned itself out. ] +[2787:the flames began to subside slowly. ] +[2788:the fumes burned steadily in a dancing sea of flame. ] +[2789:long tongues of flames roared up from the vapour and licked +angrily at the ceiling, leaving brown scorches on the old white +paint. ] +[2790:the whisky vapour flashed into a flickering blue-white fire. ] +; +; "Pet" messages... (table driven) +; some remarks made by the PET on various occurrences... +; +[2851:Joe urged me on, anxious to be clear of the open space. ] +; After 2510 (sound of car approaches) +; +[2852:Joe said, "Let's get walking. I don't want to get caught +by those headlights". ] +; After 2511 (car approaches in distance) +; +[2853:%Joe said, "The green looks safe enough to cross now. +I think we should pass over". ] +; +[2854:. Joe was sympathetic, "There are just too many ghosts +around here. It muddies the astral record. Now, if you were to +concentrate at the scene of a juicy murder"..] +; After 2520 (lose concentration in cemetery) +; +[2855:. %Joe laughed, "I bet that hand looks right funny, +sticking out into the garden"] +; After 2540 (I put hand through closed door) +; +[2856:. %Joe scratched his head. "I wonder if there's any way that +I could help you know exactly where to reach through this here +wall?", he wondered aloud] +; After 2544 (in garden, put hand through wall) +; +[2857:. %Joe said, "Why don't we try reaching from another side?"] +; After 2546 (touched paper within chimney) +; +[2858:. %Joe said, "I wonder if there's anything inside?"] +; After 2548 (I couldn't reach contents of tank) +; +[2860:. %Joe said, "Brrr! I'm glad that spirits don't freeze. +It's a cold night tonight"] +; After 2565/2655 (can't get map from across water) +; +[2861:. %Joe smacked his hands together. "You got that spirit's +measure", he said with grim pleasure. "That unholy ghost won't +be back in a hurry"] +; After 2571 (light banishes Luke's ghost) +; +[2863:. %Joe smiled and said, "That's better. I couldn't stand +those blasted lights"] +; After 2675 (main fuse blown) +; +[2864:. %Joe said, "It will take more than one ghost to do that"] +; After 2680 (couldn't pull bookmark hard enough) +; +[2866:. %Joe looked at me and said, "What happened? You look like +you've seen a ghost"] +; After 2690 (I climbed into tank, saw body and leapt out) +; +[2867:. %Joe grinned and said, "It might help if you opened +it first"] +; +[2868:. %"Timber!" shouted Joe, enjoying his night's work] +; After 2711 (clock pushed down stairs) +; +[2869:. %"Oh dear", said Joe, shaking his head. "Maybe +you should have closed the clock first"] +; After 2712 (lead fell from clock and remained on landing) +; +[2870:. %Joe looked closely at the mirror. "I wonder what +that shadow is", he mused] +; After 2720 (felt gap behind mirror) +; +[2872:. %"Hey!", Joe, "What a terrible waste"] +; After 2730 (whisky spilled and evaporated) +; +[2873:%Joe wiped his brow. ] +; +[2874:%Joe backed away from the flames. ] +; +[2875:%"Are you trying to set this place on fire?", asked Joe. ] +; +[2876:. %"Oh, very nice", commented Joe] +; After 2738 (I blew and the curtains flapped) +; +[2877:. %Joe gaped at me, "I see you are determined to experience +death warmed up"] +; After 2739 (I set the curtains alight) +; +[2878:%"You'll have the fire brigade around", tutted Joe. ] +; After 2742 (smoke filled the house) +; +[2879:%"It's a pity you didn't leave some evidence for them to +collect", sighed Joe. ] ; After 2750 (firemen found and took body) +; +[2880:%Joe cursed with disappointment, "They didn't take any +notice of our evidence. We should have put something there, +next to it, to catch their attention". ] +; After 2752 (firemen ignored the evidence) +; +[2881:% %"I doubt that it will be much use to the police", added +Joe. "There wasn't quite enough evidence there to convict the gang +of anything". ] ; After 2751 (firemen summoned police) +; +; messages when people refuse an order. 2900+n +; Use ACTORM1Dot +; +;; [2902:] +; Joe is obedient +[2903:was roused to sudden anger by my request] +; Luke's ghost +[2911:looked straight through me] +; firemen +; +; comments made by people when they encounter player for the first time +; 3000+ +; +; don't be silly GROUP... +[3100:don't be silly] +[3101:well, that's new] +[3102:sorry, no can do] +[3103:that's a funny thing to want to do] +[3104:daft, I call it] +; +; nice try GROUP... +;;[3110:nice try, my ghostly friend] ; >> Pete 14/9/89 +;;[3111:a good bash at the answer. Shame it doesn't work] ; >> Pete 14/9/89 +;;[3112:not a ghost of a chance, chum] ; >> Pete 14/9/89 +;;[3113:good idea, but it didn't work] ; >> Pete 14/9/89 +;;[3114:a good try, but it doesn't work] ; >> Pete 14/9/89 +; +; just scenery GROUP... +[3120:you might as well leave it alone] +[3121:I suggest that you forget about it] +[3122:that's not important to the game] +[3123:forget it. It's only scenery] +[3124:pay it no heed] +; +; missing object... +[3130:now what was the object of that? Try again] +[3131:sorry, I couldn't find an object in that] +[3132:please be more specific] +[3133:there was no object in that command] +[3134:do it to what? You didn't say] +; +; Nothing happened GROUP... +[3140:nothing happened] +[3141:that didn't seem to work] +[3142:there was no effect on anything] +[3143:that was remarkably useless] +[3144:that did nothing at all, I'm afraid] +; +; the following are printed after the object name.. +; +[3150:wouldn't move] ; try to move static object GROUP +[3151:didn't budge] +[3152:refused to be moved] +[3153:seemed fixed in place] +[3154:was unmoved] +; +[3160:don't bother, it would do nothing] ; don't bother GROUP +[3161:that would be a waste of time] +[3162:that would be pointless] +[3163:that will get you nowhere] +[3164:don't expect any results from that] +; +; GROUP messages for hello responses +[3170:said, "Hello"] +[3171:said, "Greetings"] +[3172:smiled and nodded] +[3173:smiled back] +[3174:nodded politely] +; +; GROUP messages for npc's being unable to carry out an order +[3180:seemed puzzled] +[3181:shook a puzzled head] +[3182:looked distinctly confused] +[3183:didn't seem to understand what was wanted] +[3184:looked at me with a blank expression] +; +; GROUP messages for npc's being unable to carry out an order +[3190:had had problems with ] +[3191:looked troubled about ] +[3192:mentioned trouble with ] +[3193:obviously hadn't understood about ] +[3194:had been mystified about ] +; +; now, npc accepts an order GROUP +[3230:nodded in acknowledgement] +[3231:nodded slowly] +[3232:nodded obediently] +[3233:agreed] +[3234:nodded enthusiastically] +; +; now response to questions when not obedient GROUP... +[3250:refused to answer that] +[3251:remained silent as the grave] +[3252:pretended to ignore the question] +[3253:refused to give any help whatsoever] +[3254:looked back stubbornly] +; +; response to requests to give anything(s) to anyone GROUP +[3270:refused to part with anything] +[3271:refused to give it away] +[3272:didn't want to give anything away] +[3273:clutched it tightly] +[3274:stared back in silent refusal] +; +; npc wants to obey orders just given, but can't understand GROUP +[3290:looked puzzled] +[3291:did not understand] +[3292:shrugged in non-comprehension] +[3293:made a questioning noise] +[3294:didn't seem to understand] +; +; Goldsinging... +; +; NB: Goldsinging is now used less frequently, since racetrack +; messages are now used more extensively. +; +; Joe +[3300:made a quiet murmuring sound] +[3301:stared blankly at me] +[3302:gazed around as if preoccupied] +[3303:watched me curiously] +[3304:smiled pleasantly] +; +; Luke's ghost +[3310:laughed evilly] +[3311:stood waiting with his hands on his hips, staring a silent +challenge] +[3312:sneered at me, confident in his strength and violence] +[3313:peered at me with dark hooded eyes] +[3314:looked at me, shaking his head] +; +; firemen +[3320:sprayed water over the fire] +[3321:aimed a hose at the fire] +[3322:were busy controlling the fire] +[3323:began to put out the flames] +[3324:fought the flames bravely] +; +; again used following a command referring to scenery +[3530:the previous command was unrepeatable] +[3531:you can't do that again] +[3532:it wouldn't help to try that again] +[3533:that was a once-only command] +[3534:oh, not again] +; +[3560:not around] ; printed by follow code +; npc stack overflow +[3600:the wind moaned about a stack overflow. ] +[3605:sorry, I will have to find my own way from here] +[3614:I yelled, but no sound emerged. ] +; +; 'npc, rude' word for talking people +[3620:laughed] +[3621:paid me no heed] +[3622:had not heard] +[3623:took no notice] +[3624:ignored me] +; +; 'npc, help' for talking people +[3640:needed specific orders] +[3641:waited for instructions] +[3642:looked me up and down] +[3643:asked, "Why?"] +[3644:did not know what to do] +; +; 'npc, echo verb' for talking people +[3660:raised an eyebrow] +[3661:gave a spirited response] +[3662:looked offended] +[3663:laughed, "Oh! You are a hoot"] +[3664:looked askance at me] +; +;========= +; +; Garbage words.. +[4000:^N the ^N this ^N these ^N that ^N some ^N and ^N also +^N before ^N wade ^N jog ^N plod ^N rush ^N dash ^N march ^N amble +^N good ^N of ^N there] +[4001:^N therefore ^N am ^N my ^N your ^N try ^N carefully ^N slowly +^N warily ^N quickly ^N rapidly ^N following ^N around] +[4002:^N please] +[4003:^N road ^N Mister ^N Mr ^N Mrs ^N Miss ^N past] +; +;; Book protection code... +;; +;; [4200:%a pale apparition appeared and waved a copy of a greying +;; book. ] +;; [4201:page ] +;; [4202:, line ] +;; [4203:, word ] +;; [4204:?"%] +;; [4205:the apparition hissed nastily and I knew that I was wrong. ] +;; [4206:the apparition vanished in a cloud of black smoke. ] +;; [4207:He wanted to know the word at ] +;; [4208:Wrong again! The apparition grinned horribly and everything +;; went black... ] +;; +;; ADD PROTECTION WORDS HERE, BUT DO NOT MARK NUMBERS (digits) e.g. 20 +;; [4301:^C even ^C maintain] ; 18,9,8 +;; [4400:^C the] ; 13,2,7 +; +; Astral images... +; A list of ten messages for each of the ten rooms inside and outside +; the house. Each room tells a story from its own point of view, such +; that the story is continued if the player moves to a different room. +; The timing of these messages is VERY critical. +; +; Front garden +; +[5000:concentrating hard, I managed to summon up a vision of past +events. The door before me creaked open and I watched myself +leaving the house as I had done a few hours before my death. I +seemed to be carrying something small in my hand as I headed +west towards the herb garden|^N vision ^N image ^N visions ^N images] +; +[5001:I watched the vision of myself kneeling down in the herb +garden to the west, as if I were planting a seed - though I hardly +think that I'd suddenly taken up gardening for a hobby! Whatever +it was, I pushed the earth back over it. Then my shimmering figure +turned and went back into the house] +; +[5002:I concentrated on summoning back the vision, but it now seemed +to be stronger inside the house] +; +[5003:time passed in the vision] ; general null vision message +; +[5004:as I concentrated, a shiver ran down my spine; a whispering +echo of some past violence] +; +[5007:a ^N wisp of shimmering ^N smoke drifted from the ^N chimney +and tumbled lazily down onto the roof of the house] +; +[5009:my vision returned, showing the ^N drugs ^N gang leaving +the house, carrying my unconscious body. +% %The vision finally came to an end and the images faded into +the night] +; +; Herb garden +; +[5010:I began meditating, and saw a vision of myself approaching from +the garden to the east] +; +[5011:I watched the vision and saw myself burying my ^N identity +^N card in the garden amongst the herbs. Then, the vision cleared +as my figure returned inside the house again|^N ID] +; +[5014:although there was nothing to see in my vision, I felt a +strong sense of fear and pain, as if some violence was about to +overwhelm me] +; +[5017:^N smoke whisped shimmeringly out of the ^N chimney at the +top of the house] +; +[5019:my vision returned with the drugs gang leaving the house, +carrying my unconscious body through the front garden. +% %The vision finally came to an end and the images faded into +the night] +; +; Lawn +; +[5020:I concentrated, and in a vision saw myself leaving the +house and walking through the front garden towards the straggly +growth of herbs] +; +[5021:at first, the vision showed me busy doing something over +at the herb garden - though it was too far away for me to see +what had gone on. As I watched, my figure crossed back again, +through the front garden and into the house] +; +[5024:I began to feel distressed, as if something violent had happened +here in the past, though nothing showed in my vision] +; +[5027:a thin trail of ^N smoke snaked shimmeringly up from the +^N chimney at the apex of the roof] +; +[5029:my vision returned and I saw the drugs gang slipping +from the house, carrying an unconscious figure - me - through +the front garden. +% %The vision faded away into the mists of time and the night] +; +; Hall +; +[5030:I summoned up a vision of myself pressed close to the +kitchen door, listening to the crooks beyond it. I had stood +there a short while, then slipped silently from the house +through the front door. As my figure left from my vision, +ghostly laughter echoed from the kitchen] +; +[5031:in the vision, I heard soft patter of cards and coarse +voices raised in a mixture of glee and anger as the crooks +gambled in the kitchen, then I watched myself enter the house +from outside, heading again to the kitchen door] +; +[5032:watching the vision, I saw myself at first listening at +the kitchen door, then walking over to the telephone. I focussed +my mind on the phone and realised that I had phoned the police] +; +[5033:my vision reached a new intensity and showed me talking +over the telephone to my colleagues on the force. But before I +could give my location, the kitchen door blasted open and a +villain entered the hall, pointing a gun at me. He snatched +the handset from me, listened long enough to confirm who I +had been talking to and slammed the phone down. +% %"What have you told them, spy?", he yelled, waving the gun] +; +[5034:I watched the vision of myself struggling with the armed +crook, a fight that ended with the sharp crack of a gunshot and +my assailant falling to the floor and twitching into stillness. +%I felt a sudden sharp pang of distress, as if something evil +had entered the spirit world] +; +[5035:I visualised the other ^N crooks running into the hall +and surrounding me. I saw that ^N Sarah, my ^N partner, was +among them, pointing a revolver at me. If she had been feeling +any concern for me, she was hiding it well, but there would +have been little she could have done against those odds. They +stood for a moment weighing up the situation, then two +criminals picked up the one I had just killed, and dragged +him up the stairs towards the landing] +; +[5036:I was reluctant to continue and the vision faded, until +I snapped myself back to attention and concentrated once more. +The picture firmed to show one of the crooks hitting me over +the head with a gun butt and me slumping to the floor. Then +he stood guard while the rest of the them spread out in +all directions through the house, destroying evidence before +they left. Soon after, one of them returned from the kitchen +with his pockets stuffed with paper] +; +[5037:in my vision a crook stood guard over me, in case I came +back to my senses. Another, his pockets stuffed with paper, +walked through the hall and into the lounge] +; +[5038:I visualised the rest of the crooks returning to the hall, +their ^N pockets filled with their ^N belongings and anything +that might be used as ^N evidence against them] +; +[5039:my vision began to fade as the crooks picked my body up and +carried it outside through the front door. +% %There was then only the empty hall and the lingering sense of +malice, and the vision faded to an end] +; +; Kitchen +; +[5040:I summoned up an image of the crooks sat around a ^N table, +deep into an ill-tempered game of ^N poker|^N cards] +; +[5041:I watched as the vision showed my ^N partner, ^N Sarah, +sitting at the end of the table keeping the gambling scores on +a piece of ^N paper. The crooks were slapping ^N ten ^N pound +^N notes and ^N IOU's onto a pile in the middle of the +table. One of them - John? - whispered to his neighbour. I +caught the last few words "..if he's a spy like Severian +says"|^N cash ^N money ^N tenners] +; +[5042:I visualised Sarah talking to the crooks. "The sucker's +had time to take the bait", she sniggered. I shivered as one of +the crooks headed towards the hall with a gun, primed and +ready for me. I realised what was really going on, but couldn't +take it all in. Had Sarah become one of them? Or was this part of +some deeper game she was playing, knowing my cover was blown but +determined to see the job through to the end?] +; +[5043:in the vision, I saw the crooks go on with their game of +poker, confident that their mate could take care of the trouble. +"Don't waste him yet, Luke", shouted one of them towards the +hall door. "I've got a nice surprise in store for him later", +he sniggered|^N Luke] +; +[5044:suddenly, the vision became strong and clear as a gunshot +blasted from out of the hallway. The crooks leapt up with a +start, knocking the table over and scattering money across the +^N floor. They rushed into the hall, some of them snatching guns +from their belts as they ran] +; +[5046:the images of two crooks dashed into the kitchen. One of them +went north into the breakfast room and the other one began to clear +the kitchen. He collected all the money from the floor and stuffed +the remaining scraps of paper into his pockets before returning to +the hall] +; +[5047:the vision showed one of the crooks return from the breakfast +room and start to check over the kitchen] +; +[5048:in the vision, a crook finished his inspection of the kitchen and +made his exit to the hall] +; +[5049:the images faded as the vision came to an end] +; +; +; Breakfast room +; +[5050:the vision here was empty, except for the sound of the crooks +gambling in the kitchen to the south] +; +[5054:I reeled as if under the sudden impact of a sharp blow, an +echo of past violence somewhere close at hand] +; +[5056:a crook entered my vision from the kitchen and began to pick +up a few belongings from around the ^N breakfast ^N table] +; +[5057:the image showed the crook finish collecting his belongings +before returning to the kitchen] +; +[5059:the vision slowly faded away and came to an end] +; +; +; Lounge +; +[5064:a blinding flash from the hallway left me shaken for a few seconds] +; +[5067:the image of one of the crooks entered the room. He knelt +down in front of the fire and began to empty some scraps of paper +from his pockets] +; +[5068:I watched the vision as it showed a crook piling up scraps +of paper and setting fire to them with a match, before going back +into the hall. +%I watched the scraps of paper burning and saw that one of them, +only slightly charred, was slowly carried up into the chimney with +the smoke] +; +[5069:the images faded as the flames died away in the fireplace] +; +; +; Landing +; +[5074:I imagined a deafening crack from the hallway, followed +by gun smoke that clouded my vision] +; +[5075:the vision ran on, showing two ^N burly ^N villains hauling +a ^N dead body up the ^N staircase towards me] +; +[5076:I watched the vision as it showed the two hefty crooks lifting +a bloody corpse up into the attic] +; +[5077:the vision continued. In it I saw the two villains clamber +down from the attic and brush their hands on their trousers. +"I won't be drinking any more water in this house", laughed one +of them coarsely] +; +[5078:the vision showed the two crooks walking back down the +landing and into the hall to rejoin the rest of the gang] +; +[5079:looking down into the hallway, I watched the vision as it +showed the crooks carrying my body outside into the night. +% %Then, after the front door was closed, the images faded] +; +; +; Bathroom +; +[5084:I suddenly felt uneasy, as if something violent had just +happened] +; +[5085:the vision indicated that there was a strong presence +on the landing to the south] +; +[5089:the images faded into the air and my concentration was lost] +; +; +; Attic +; +[5094:I felt a sudden shock, but it came from the past and from +a distant place and I couldn't make out the cause] +; +[5096:at last the vision began to reveal some life. Light +came into the attic, closely followed by two hefty crooks +struggling to haul a dead weight up with them. They let it +fall on the rafters as they took a breather, and I saw that +they had brought the dead body of another member of the gang. +It was the one they had called Luke] +; +[5097:the vision showed the two crooks slide the lid off the +water tank and dump the dead body unceremoniously inside it. +They pushed the lid back over the tank and climbed back down +to the landing] +; +[5099:the images cleared and I realised that the vision had come to +an end] +; +; --- Joe greets player before following --- +; +[5100:greeted me with a warm smile. "Good evening", he began, "I +trust you slept well. You're looking fit, all things considered. +It seems that you temporary ghosts soon get stronger than us +residents, so I expect you'll find you've got new powers this +night. Could be that you're now able to heat and cool things. +You might even be able to reach through solid objects - I've seen +that done in the past. How about a wander outside the cemetery. +Perhaps we'll find those crooks you were telling me about last +night? You lead the way and I'll just follow on"] +; +; ============================== END ============================ diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/ref/gamedata.dat b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/ref/gamedata.dat new file mode 100644 index 0000000..fe3705a Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/ref/gamedata.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/ref/squash.dat b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/ref/squash.dat new file mode 100644 index 0000000..62789c7 Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/ref/squash.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/squash.dat b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/squash.dat new file mode 100644 index 0000000..62789c7 Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part2.l9/main.l9/squash.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/npc.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/npc.txt new file mode 100644 index 0000000..7c73e19 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/npc.txt @@ -0,0 +1,2283 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; taken from Lancelot source 14/5/88 +; +; NPC.TXT, the non-player character control logic for the game. This +; copes with NPC racetracks, queued commands and how they decide +; what to do. As the philosophy of Level 9's is to treat NPCs and +; the user as being as equal as possible, the code to cope with +; actual NPC actions should be the same as that for player actions, +; and found elsewhere. +; +; Late changes: +; +;>>mike 26/3/88 - two changes to DOIWantFollowNoun1 to +; permit NPCs to match the HICURRENTPOS of their follow target +; +;>>mike 27/3/88 +;>>mike 28/3/88 - changes to .KILL, .Follow, .GdFollow, .GdKill +; need EP=TRUE at start of .ATTACK (AVERB.TXT) +; ISOBJECTALIVE in averb.txt +; removed NOTreasureInRoom +; and change at start of .ABSNewLocation +; merged 3600-3602, removed 3603,3604 +; +CONST +; +BEGIN +; +.setupuser + actor=user + gosub @setuproom + gosub @setACTORATTRIBUTES + gosub @initfifo +;; goto @healactor; >> Pete 14/9/89 + return ; >> Pete 14/9/89 +;--- +.MAINLOOP + STACK + forceprinting=false ; just in case! +;>>removed by L2 anythingprintedthisturn=false + gosub @tickclock +; +; now the player's turn... + gosub @setupuser +; +;>>mike 28/3/88 x4=npcptroffset +;>>mike 28/3/88 add x4,actorattributes +;>>mike 28/3/88 x1=npccurrent(x4) ; number of current command +;>>mike 28/3/88 if x1=0 then ml2 ; ACTOR has no queued commands +; +; ACTOR is in the middle of a goal-directed command, +; so obey it! + gosub @executeanyorders + if executeprocessed=true then @mainloopnpc + +;;.ml2 +; now do the more general ideas, such as +; 'follow someone unless I have something better to do' + verb=0 + commandfinished=false + gosub @doiwantfollow + if fatalerror<>false then getFromUser ;>>mike 27/3/88 +;>>mike 26/3/88 if fatalerror=false then ml3 +;>>mike 26/3/88 gosub @stopfollowing + +;;.ml3 +;>>mike 28/3/88 if executeprocessed=false then followok +;>>mike 28/3/88 gosub @savelist9 +;>>mike 28/3/88 gosub @checkforescape ;checkkbd +;>>mike 28/3/88 gosub @restorelist9 + +;;.followok + if executeprocessed=true then @mainloopnpc ; it has been done + +.getfromuser + stack + descriptionmode=normaldescriptionmode + +;>>L2 x1=attentionoffset +;>>L2 add x1,actorattributes +;>>L2 npccurrent(x1)=c0 ; reset attention flag + wanttoprintand=0 + GOSUB @GETCOMMAND ; GET ACTOR COMMAND FROM KEYBOARD + lastwordprinted=0 + cif allowcheat + if cheatmode<>2 then DontDisplayCommand + prs " user command verb=" + print verb + prs " noun1=" + print noun1 + prs " prep=" + print prep + prs " noun2=" + print noun2 +.DontDisplayCommand + cend ; allowcheat + +; +; immediately after entering first command, +; display the first picture, with border +; if picture1displayed=true then gcnotpic1 +; x1=1 +; gosub @waitpic ; display picture 1 at 0,0 +; +;.gcnotpic1 +;>>removed by L2 anythingprintedthisturn=false +;<< gosub readclock ;* +;<< timeoflastinput=value ;* + if verb=isay then mlsay + gosub @againVERBvarsAREverbVARS + + if verb>maxdirection then movenosarc + gosub @stopfollowing ; prevent player being dragged back by follow. + add numexplicitmoves,c1 + if numexplicitmoves<>30 then movenosarc + message 2128 ; would you prefer to use GO instead? + +.movenosarc + GOSUB @PRESENTMULTIPLE ; EXECUTE ACTOR COMMAND +;===== + if concentrating=false then notconcentrating + gosub @doingconcentrate +.notconcentrating +;===== + +.mlsay + if verb<>isay then @mainloop +; say by-passes normal presentmultiple, so npcs +; will not move unless we activate them now. + goto MainLoopNpc1 ; not stored command or follow, so skip interrupt check + +.mainloopnpc + gosub @savelist9 + gosub @checkforescape ;checkkbd;>>mike 28/3/88 + gosub @restorelist9;>>mike 28/3/88 + if result=true then @getfromuser ; clears stack etc.;>>mike 28/3/88 + +.MainLoopNpc1 + GOSUB @NPCACTIONS + + GOTO @MAINLOOP +;--- +;;.checkkbd +;;; return result=true if a break key has been pressed +;;; check for escape key from user +;; if actor<>user then cfefalse +;; gosub @osrdch ; get char in x1 +;; if x1<>0 then maybeinterrupt +;; goto cfefalse +;--- +;.osrdch +; gosub savelist9 +; x1=3 ; osrdch +; list9(0)=x1 +; driver +; x1=list9(1) +; goto restorelist9 +;--- +.checkforescape + if actor<>user then cfefalse + gosub @osrdch ; get char in x1 + if x1<>0 then maybeinterrupt + +;>>l2; is attention flag set? +;>>l2 x1=attentionoffset +;>>l2 add x1,actorattributes +;>>l2 x2=npccurrent(x1) +;>>l2 npccurrent(x1)=c0 ; reset it +;>>l2 if x2<>0 then maybeinterrupt +; +.cfefalse + result=false + return + +.maybeinterrupt +; if anythingprintedthisturn=false then cfefalse + message 2203 ; do you want to carry on? + gosub @yesorno + if result=true then cfefalse + gosub @stop ; kill action + +;;.cfetrue + goto @returnTrue +;--- +.savelist9 + npclist9save0=list9(0) + npclist9save1=list9(1) + npclist9save2=list9(2) + npclist9save3=list9(3) + npclist9save4=list9(4) + npclist9save5=list9(5) + npclist9save6=list9(6) + return +;--- +.restorelist9 + list9(0)=npclist9save0 + list9(1)=npclist9save1 + list9(2)=npclist9save2 + list9(3)=npclist9save3 + list9(4)=npclist9save4 + list9(5)=npclist9save5 + list9(6)=npclist9save6 + return +;--- +.setcommandfinished +; no command waiting - so give up + commandfinished=true +; +.epfalse + executeprocessed=false + return +;--- +.eptrue + executeprocessed=true + return +;--- +.racetrackgotonoun12gc +; note: compiler crashes if 'racetrackgotonoun12getcurrent' is used! + gosub @npcgetcurrent ; get x1=current action in npcstack +; +;;.racetrackgotonoun12 +; current position of racetrack for ACTOR is (NOUN1,NOUN2) +; NPCs current stack entry is npcstack(x1) +; write value back to it + gosub @getMessageNumber; value=noun1; gosub @valuetimes256; add value,noun2 + +.racetrackgotovalue +; current position of racetrack for ACTOR is VALUE. +; NPCs current stack entry is npcstack(x1) +; write value back to it + valueSave=value + index=x1 + x2=4 ; offset of noun2 in npcstack + add x2,index + npcstack(x2)=value + x2=npcstack(x2) ; low byte + sub value,x2 + x1=value + x2=256 + gosub @x1divx2 + x2=3 ; offset of noun1 in npcstack + add x2,index + npcstack(x2)=x1 + value=ValueSave + return +;--- +.doobeyracetrack +; ACTOR is currently on a racetrack, +; execute the next instruction +; return executeprocessed if anything active done +; NOUN1 gives the high byte of the offset within list5 +; and noun2 has low byte of offset of current instruction +; within list5 + gosub @getMessageNumber ; value=noun1, gosub @valuetimes256, add value,noun2 +.DOORTNoun1 +; now value is offset of current racetrack instruction +; within list5 + + cif allowcheat + if cheatmode<>2 then doortnotdebug1 + prs "[rt at " + print value +.doortnotdebug1 + cend ; allowcheat + + verb=list5(value) + add value,c1 + prep=list5(value) + add value,c1 + noun1=list5(value) + add value,c1 + noun2=list5(value) + add value,c1 + + cif allowcheat + if cheatmode<>2 then doortnotdebug + prs " actor=" + print actor + prs " command=" + gosub @debugshowcommand +.doortnotdebug + cend ; allowcheat + + if verb=0 then @eptrue + gosub @npcgetcurrent ; set up x1=current actor command in npcstack + gosub racetrackgotovalue ; set up new current address + + executeprocessed=false + if verb=rtConditional then doRtConditional + if verb=rtActorVaryMessage then doRtActorVaryMessage + if verb=RtActorSingleMessage then DoRtActorSingleMessage +; if verb=racetracksay then racetrackobeysay + if verb=racetrackmessage then racetrackobeymessage + if verb=racetrackvarymessage then racetrackobeyvarymessage + if verb=racetrackgoto then @racetrackobeygoto + if verb=racetrackgosub then @racetrackobeygosub + if verb=racetrackreturn then @racetrackobeyreturn + if noun1maxcollective then @singlepushfifo + gosub @initfifo + gosub @setupgdaccess ; push on appropriate order (two parts to command) + goto @linkonfifocommandqueue +;--- +.racetrackobeyvarymessage + gosub GetMessageNumber + gosub @specialrtMessage + goto @VaryMessageDot +;--- +.DoRtConditional +; only execute next instruction if NOUN1 is present +; ValueSave=value + object=noun1 + gosub @CheckIfPresent +; value=ValueSave + if result=true then @doortnoun1 +;;* +; if result=false then rtconditionfailed ; replaces above line +; +; if object<>user then @doortnoun1 +;; user is treated as "not present" if hiding in curtains ins gnome2.3 +; x9=hicurrentpos(user) +; if x9=0 then @doortnoun1 ; user has no hipos, so must be present +; x9=currentpos(user) +; if x9<>curtain then @doortnoun1 ; user not hidden, so must be present +;;* +;;.rtconditionfailed ; >> Pete 14/9/89 + x1=4 + add value,x1 ; skip conditional instruction +;;.DRTC1 + gosub @npcgetcurrent ; get x1=current action in npcstack + gosub @racetrackgotovalue + goto @doortNoun1 +;--- +.DoRtActorSingleMessage + m1=blankline ;*graham* + gosub @printm1 ;*graham* can't use cr at start of message + gosub @PrintActor + gosub RacetrackObeyMessage + goto @EpTrue +;--- +.DoRtActorVaryMessage + m1=blankline ;*graham* + gosub @printm1 ;*graham* can't use cr at start of message + gosub @PrintActor + gosub GetMessageNumber + gosub @specialrtMessage + goto @VaryMessageDot +;--- +.racetrackobeymessage +;***** +; Now, RTMESSAGE is only used when ACTOR is conversing with another +; NPC. In many cases, lastwordprinted will be the target NPC, +; and not the ACTOR. It is therefore improtant to set lastword to zero. + lastwordprinted=0 +;***** + gosub GetMessageNumber + gosub @specialrtmessage + goto @printM1dot +;--- +.GetMessageNumber + value=noun1 + gosub @valuetimes256 + add value,noun2 + m1=value + return +;--- +;.racetrackobeysay +; value=noun1 +; gosub @valuetimes256 +; add value,noun2 +; m1=value +; goto @actorsays +;--- +.racetrackobeygoto + gosub @racetrackgotonoun12gc + goto @doobeyracetrack +;--- +.racetrackobeygosub + verb=obeyracetrack + goto @singlepushfifo +;---- +.racetrackobeyreturn +;>>mike 2/4/88 gosub @intelligentpop + goto @setcommandfinished ; remove 'obey command' on command queue +;--- +;.racetrackgoplace +; verb=igdgo +; goto @singlepushfifo +;- +.executeanyorders + commandfinished=false ; set if can't do anything more at present, + FatalError=false ;>>added for L2 - probably permament +; but want to try again with same command next turn. + gosub abseao + if FatalError=true then @ReportProblem ;>>mike 8/2/88 + if commandfinished=true then @intelligentpop + if executeprocessed=false then @executeanyorders +.eaoret + return +; +;--- +.getcurrentcommand + gosub @npcgetcurrent ; set up x1=position in npcstack +; of current command + add x1,c1 + x8=x1 ;***** + verb=npcstack(x1) + add x1,c1 + prep=npcstack(x1) + add x1,c1 + noun1=npcstack(x1) + add x1,c1 + noun2=npcstack(x1) + goto @eptrue +;--- +.abseao +; if there are any orders pending for ACTOR, +; may as well carry one of them out... + gosub @getcurrentcommand +;===== +; if npcs are distressed by light, then prevent them from doing +; anything but moving + if actor=user then npcnotdistressed ; user is more complex and is +; handled in timedependant + if npcdistressed=false then npcnotdistressed + npcdistressed=false ; clear flag now that it's being +; proessed + if verb>249 then npcnotdistressed ; allow rt messages + if verb=139 then npcnotdistressed ; allow "find" + if verb<16 then npcnotdistressed ; allow movements + verb=0 +.npcnotdistressed +;===== + ProblemObject=noun1 + + cif allowcheat + if cheatmode<>2 then abseaonotdebug ;>> + prs "eao: " ;>> + print actor ;>> + message space ;>> + gosub @debugshowcommand ;>> +.abseaonotdebug + cend ; allowcheat + +;>>mike 28/3/88 if actor<>user then usernocheck +;>>mike 28/3/88 ; verb is current command - can it be interrupted? +;>>mike 28/3/88 gosub @savelist9 +;>>mike 28/3/88 gosub @checkforescape ;checkkbd +;>>mike 28/3/88 gosub @restorelist9 +;>>mike 28/3/88 if result=true then @getfromuser ; clears stack etc. +;>>mike 28/3/88 +;>>mike 28/3/88 .usernocheck + if verb=0 then @setcommandfinished ; nothing pending +.eaoverb + if verb>15 then eaonotdir + gosub @move + CommandFinished=true ;>>mike 26/3/88 +; executeProcessed will be set here if anything happened + return ;>>mike 26/3/88 +;>>mike 26/3/88 goto @setcommandfinished + +.eaonotdir +;&*&*& +; THIS IS A BODGE TO PREVENT NPC'S FROM "RUNNING" TO PLACES (GOD KNOWS +; WHY THEY EVEN TRY TO DO THIS!)... + IF ACTOR=USER THEN EAOOKTORUN + IF VERB<>ISETUPRUN THEN EAOOKTORUN + VERB=IGDGO +.EAOOKTORUN +;&*&*& + if verb=obeyracetrack then @doobeyracetrack + if verb=IReportProblem then @GDReportProblem + noun1isgd=false +;; if verb=ikill then @eaonotgdnoun1 ; collective ; >> Pete 13/6/89 + if verb=ifollow then @gdfollow ;eaonotcollective + if verb=igdgo then @gdgo + if noun1maxcollective then eaonotcollective + noun1isgd=true + gosub @gdnoun1 + if noun1=nullobject then @epfalse ; reached end of range + +.eaonotcollective + object=noun1 + if verb=ifollow then @gdfollow + if verb=igdgo then @gdgo + if verb=igdfind then @gdfind + if verb=igoout then @gdgoout + if verb=iwaitforperson then @gdwaitforperson + if verb=iwaitforperiod then @gdwaitforperiod + if verb=ireturnobject then @returnobject + if noun1=nullobject then eaononoun1 +; check if noun1 is present + gosub @selectobjectpos + if verb=itell then eaononoun2 + + gosub @checkifaccessible + if result=true then eaononoun1 + +;*graham* see gnome2.1 + gosub @npcneedsobject + if executeprocessed=true then @eaoret + +; we've found the object noun1... +.eaononoun1 + if noun2=nullobject then eaononoun2 +; only acceptable if noun2 is carried... + if prep<>with then eaochecknotcarried + if verb=igive then eaochecknotcarried +; lots of commands - like "kill knight with axe" - must +; be carrying noun2 for the command to be obeyed. + x1=currentpos(noun2) + hisearchpos=nouncarried ; force object to be carried + if x1<>actor then needsnoun2 + x1=hicurrentpos(noun2) + if x1<>0 then eaononoun2 +.needsnoun2 + object=noun2 + gosub @npcneedsobject + if executeprocessed=true then @eaoret ; must do verb next turn + goto eaononoun2 + +.eaochecknotcarried +; commands like "put xx in cabinet" where noun2 +; cannot be carried + object=noun2 +; +;&*&*& +; THIS MAY CAUSE PROBLEMS IN SOME AREAS... +; FOR SOME REASON, I HAD CHANGED IT TO ACCESSIBLE, BUT NOW HAVE HAD TO +; CHANGE IT BACK! MAYBE IT'S GOT SOMETHING TO DO WITH THE PHONE NO.S (?) + gosub @checkifPRESENT ; gosub @checkifACCESSIBLE ; bug fix *graham* +;&*&*& + hisearchpos=nonspecific + if result=false then needsnoun2 + +.eaononoun2 +;>>mike 28/3/88 if verb=ikill then eaonotgdnoun1 + if noun1isgd=true then eaonotgdnoun1 + commandfinished=true ; once-only verb, or not understood. + +.eaonotgdnoun1 +; ok, so call the verb! + gosub @preactorcr + if verb=iwait then @shortwait +;; if verb=ikill then @gdkill ; >> Pete 13/6/89 +; +;***** +; this is where NPCs calls a verb. do a few checks beforehand: +; +; if take, make sure object is NOT already owned + if verb=iget then testnotowned + if verb<>itake then notnpctake +.testnotowned + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=true then @actorcantverbnoun1dot ; already owned +; +; if drop/throw, make sure it's owned +.notnpctake + if verb=ithrow then testowned + if verb<>idrop then notnpcdrop +.testowned + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=false then @actorcantverbnoun1dot ; not owned +.notnpcdrop +;***** + goto @callverb +;------- +.calcinitialpos +; for object x1 +; return x1=initial lo pos, x2=hi initial pos for object x1 +; where is initial position? + add x1,x1 + x2=objectstart(x1) ; hi initial pos + add x1,c1 + x3=objectstart(x1) ; lo initial pos + x1=x2 + x2=16 + goto @x1modx2 +;--- +.calcinitialroom + gosub calcinitialpos ; for object x1 +; x2=hi initial pos, x1=lo initialpos + if x1=0 then calcinitret ; object is in room x3 + x1=x3 + goto calcinitialroom + +.calcinitret +.npcneedsobjectret + return +;--- +.npcneedsobject +; ACTOR tried to reference OBJECT, but it was not +; accessible in way HISEARCHPOS +; (the command which attempted the access is still on the stack) + cif allowcheat + if cheatmode<>2 then nno1 + message cr + prs "[(" + x1=actor + print x1 + prs ") " + gosub @printTHEobjectx1 + prs " is trying to find " + gosub @printTHEobject + prs " (" + print object + prs ")]" + message cr +.nno1 + cend ; allowcheat + + + noun1=object ; for benefit of take etc. +; commandfinished=false ; for safety only + gosub @makelocal + if executeprocessed=true then npcneedsobjectret +; if commandfinished=true then npcneedsobjectret ; can't find - abort +; didn't follow, so although we were in the same room +; the verb handler must need the object to be carried +; here, commandfinished=false + if hisearchpos<>nonspecific then nrotake + commandfinished=true ; abort + return +;--- +.returnobject +; always called with causing command on stack +; npc needs to find noun1=object + if actor=user then @objectnothere ; for security only + if noun1>maxmoveable then @epfalse + x1=object + gosub calcinitialpos +; x3=lo pos, x1=hipos where object starts + x2=currentpos(object) + if x3<>x2 then ro1a + x2=hicurrentpos(object) + if x2=x1 then @setcommandfinished ;intelligentpop ; already at original pos + +.ro1a + gosub @makelocal + if executeprocessed=true then @roret ; still searching for it +; OBJECT is in actor's current room +; ACTOR takes OBJECT + pos=actor + hipos=nonspecific + gosub @checkobjectpos + if result=true then nrogotobject + +.nrotake + noun1=object + noun2=nullobject +;>>special to gnome m1=3190 ; I'll take that! + objectsave=object +;>>special to gnome gosub @varysayM1dot +;***** +; also see call to @callverb above + if verb=ithrow then donttrytake + if verb=idrop then donttrytake + if verb=iget then donttrytake + if verb<>itake then trytake +.donttrytake + return +.trytake +;***** + verb=itake + noun2=nullobject + prep=0 + object=noun1 + goto @take ; gosub, return + +.nrogotobject +; ACTOR is in the process of returning NOUN1 +; to its initial position +; where is initial position? + x1=noun1 + gosub @calcinitialroom +; OBJECT should go to pos x1, hi pos x2 + if room=x3 then returnobject3 ; we are in the right room! +; move towards room x3 + dest=x3 + goto @gdfollowdest +; +.returnobject3 + if verb<>ireturnobject then roret +; put it back! + commandfinished=true ; kill 'recover' command + x1=object + add x1,x1 + x2=objectstart(x1) + add x1,c1 + x3=objectstart(x1) +; x3=lo initial pos, x2=hi initial pos + x1=x2 + x2=16 + gosub @x1modx2 +; x1=hi initial pos, x3=lo initial pos + verb=idrop + noun2=nullobject + prep=0 + if x1=0 then @callverb + verb=iwear + if x1=worn then @callverb + verb=iput + noun2=x3 + prep=x1 + goto @callverb +;--- +.makelocal + gosub @getobjectposx2 +; now x2=room where OBJECT is + executeprocessed=false + if x2=room then makelocalhere ; take it! + dest=x2 + gosub @gdfollowdest + executeprocessed=true ; but don't want to waste time. + +.makelocalhere +.roret + return +;--- +.chooserandomdirection +; return VERB=POSSIBLE ranomd direction from ROOM +; There is no guarantee whatsoever that it will be possible +; + x2=maxdirection + gosub @randomx1modx2 + dir=x1 + if dir=0 then crdend + + if room> Pete 14/9/89 +.dontwantfollow + executeprocessed=false + return +;--- +.followdead + GOSUB @STOPFOLLOWING ; * GRAHAM 6/10/88 * + fatalerror=true + object=noun1 + if actor<>user then @ReportProblem + ROOM=CURRENTUSERROOM ; * ROOM CORRUPTED, MESSAGE WAS NOT SHOWN! * +;;.printdead ; >> Pete 14/9/89 + verb=iam + gosub @printOBJECTverb + m1=3560 ; dead + goto @printM1dot +;--- +;* GRAHAM 6/10/88 * +.gdfollowdoesntexist + GOSUB @STOPFOLLOWING + fatalerror=true + object=noun1 + if actor<>user then @ReportProblem + ROOM=CURRENTUSERROOM + M1=2420 + GOTO @PRINTM1DOT ; DOESN'T EXIST +;* +;--- +.doiwantfollow ; >> Pete 14/9/89 +; follow someone if appropriate +; return executeprocessed=true if we have followed +;>>mike 28/3/88 executeprocessed=true + x1=followoffset + add x1,actorattributes + noun1=npccurrent(x1) +;;.doiwantfollownoun1 ; >> Pete 14/9/89 + fatalerror=false + if noun1=0 then dontwantfollow + x1=currentpos(noun1) ; where is follow target? + if x1=0 then gdfollowdoesntexist ; object destroyed (?) +;>>mike 26/3/88 if x1=room then targetishere +; target is not here + verb=ifollow + commandfinished=false + ProblemObject=noun1 ;>>mike 4/3/88 + gosub gdfollow +; consider stopping follow.... +;>>mike 26/3/88 if fatalerror=true then @stopfollowing ; some problem +;;.diwfret +;;.sufret +.gdfindRet + return +;--- +.setupfind + gosub @stopfollowing + + verb=igdfind + itword=noun1 + goto @SinglePushFifo ;>>mike 28/3/88 (used by user only) +;>>mike 28/3/88 gosub @npcpushfifo +;>>mike 28/3/88 gosub @linkonfifocommandqueue +;>>mike 28/3/88 gosub gdfind +;>>mike 28/3/88 if commandfinished=false then sufret +;>>mike 28/3/88 goto @intelligentpop +;--- +.gdfind + x4=noun1 ; character to follow + x6=room + gosub @setuproomx4 ; return ROOM=position of x4 + if x6<>room then @gdfollowobject + + x1=hicurrentpos(noun1) ;>>added for Lancelot boat + x2=hicurrentpos(actor) ;>>added for Lancelot boat + if x1=x2 then @FollowFinished ;>>added for Lancelot boat + gosub @MaybeBoat ;>>added for Lancelot boat + if executeProcessed=true then gdfindRet ;>>added for Lancelot boat + + goto @followfinished +;--- +.gdfollow +; ACTOR is following noun1 +; +; this code is now shared with GO from gdfollowdest onwards + cif allowcheat + if cheatmode<>2 then gdfollownotdebug + prs "actor " + print actor + prs " is trying to follow " + print noun1 + message cr +.gdfollownotdebug + cend ; allowcheat + + fatalerror=false + x4=noun1 ; character to follow + x6=room + gosub @setuproomx4 ; return ROOM=position of x4 + if x6<>room then gdfollownothere + +.MaybeBoat +; get into boat if here + x1=hicurrentpos(noun1) + x2=hicurrentpos(actor) + if x1=x2 then BoatFalse +; get in or out! + object=currentpos(noun1) + if object=actor then boatfalse ;*graham* see gnome2.1 + gosub @CheckIfPresent + if result=false then BoatFalse + + x2=hicurrentpos(actor) + prep=ipin + if x2=0 then Boat1 ; get in! + prep=ipout +.Boat1 + verb=istand + noun2=currentpos(noun1) ;*graham* + gosub @callverb ;*graham* + +.BoatFalse + + goto @epfalse ; both here, so can't follow at present + +.gdfollownothere + if noun1>maxNpc then gdfollowobject ;>>mike 6/2/88 - was Maxpeople + object=noun1 +;; gosub @isobjectalive ; >> Pete 14/9/89 +;; if result=false then @followdead ; >> Pete 14/9/89 + +.gdfollowobject +; + dest=room ; destination room just calculated by setuproomx4 + noun1=room + room=x6 ; restore saved source room +; if actor=rook then flydest ;*graham* +; drop through to gdfollowdest +; +.gdfollowdest + if actor<>user then gdfd1 + DestToDescribeExitsIn=dest + +.gdfd1 + gosub @canactormove + if result=false then @epfalse +; if not already set up, change descriptionmode to ibrief + if descriptionmode<>iverbose then gdfdnotv + descriptionmode=ibrief + +.gdfdnotv + x1=dest + x6=room + if room=dest then @followfinished + +;;*graham* +;; PORCH 40 TO HALL 16 IF LATCH IS OPEN +; if latchopen=false then nobreak4 +; if dest<>16 then nobreak3 +; if room<>40 then nobreak3 +; dir=11 ; in +; goto crossbreak +;.nobreak3 +;; +;; HALL 16 TO PORCH 40 +; if dest<>40 then nobreak4 +; if room<>16 then nobreak4 +; dir=12 ; out +; +;.crossbreak +; verb=dir +; goto @move ;callverb +;; +;.nobreak4 +;;*graham* + +; x6 is source room - compare all rooms with source, in case both +; source and destination are in the same complex + gosub @tracex1tosynth + if dest=0 then gdgoerror ; can't find + if processed=true then @gdfollowgoin +; now x1=synth room in which the destination is based +; store it away in synthdest + synthdest=x1 + if x1=room then @gdgoin2 ; am outside the complex containing dest + +; now trace source room through to synth room + x1=room + x6=dest ; compare all rooms with destination in case both +; source and destination are in the same complex + gosub @tracex1tosynth + if dest=0 then gdgoerror + if processed=true then @gdgoout +; now x1=synth room in which the source is based +; + if synthdest=dest then followdifferentcomplex ; go just outside complex + if x1<>synthdest then followdifferentcomplex + + + cif allowcheat + if cheatmode=0 then gdgonodebug + prs "Bug!! - no match during tracex1tosynth. " ;* +.gdgonodebug + cend ; allowcheat + + goto @gdgoout ; bug!!!! - should +; have been matched on one tracex1tosynth or the other +; because they are both in the same complex. +; The only likely explanation is that there are multiple, +; non-connecting paths to the exit. +; +.followdifferentcomplex +; source and destination are NOT in the same complex. +; Therefore, go out. + if roomuser then ReportProblem ;>>gdgoerr1 +;;*BUG FIX* GMJ 5/10/88 fatalerror=true + message 3605 ; can't find my way + message dot + goto followfinished + +.followfinished +.followjustfinished ; just moved + therefore arrived at dest. +; no descriptions on, so now have to print room we have arrived at + commandfinished=true ; terminate command + if actor<>user then @ffret + if descriptionmode<>inone then @ffret + descriptionmode=normaldescriptionmode +.GdReportProblemRet + return +;--- +.ReportProblem +; tell the NPC to go back to the player and report the problem + if actor=user then @GdRPEnd +; is NPC obedient? + x1=masteroffset ;***** + add x1,actorattributes ;***** + x1=npccurrent(x1) ;***** + if x1<>user then @SetCOmmandFinished + + noun1=ProblemObject + if room=currentUserRoom then GDReportProblem0 ;*****1 +; also pops the command + +; gosub IntelligentPop ;***** + +;***** + gosub @getcurrentcommand + verb=ireportProblem + noun2=problemObject ; save problem object for report + prep=0 + npcstack(x8)=verb + add x8,c1 + npcstack(x8)=prep + add x8,c1 + npcstack(x8)=noun1 + add x8,c1 + npcstack(x8)=noun2 +;***** + + fatalerror=false + commandfinished=false + executeprocessed=true + return ; goto SinglePushFIFO ; gosub, return ;***** +;--- +.GDReportProblem + noun1=user + gosub @GDFollow + noun1=noun2 ; set up problem object for report + if executeProcessed=False then GdReportProblem1 + commandfinished=false + return ; still on the way + +.gdreportproblem0 ;***** + gosub @intelligentpop ;***** +.GdReportProblem1 + FatalError=false ; we've sorted it! + lastwordprinted=0 ;***** + if actor=user then GdReportProblem3 ;*bug fix 22/2/89* + gosub @PrintActor + m1=3180 ; sorry! I couldn't do what you asked + if noun1=0 then gdGeneralProblem + if noun1<>nullobject then GdReportProblem2 +.gdGeneralProblem + m1=3180 ; sorry! I couldn't do what you asked + gosub @VaryMessageDot + goto GdReportProblem3 + +.gdReportProblem2 + if verb=0 then gdGeneralProblem + if noun1=user then gdGeneralProblem + + m1=3190 ; I couldn't do what you asked with + gosub @PrintM1 ;&&& + object=noun1 ;&& + gosub @PrintTheObject ;&& +;; m1=quote ;&& ; >> Pete 14/9/89 +;; gosub @Printm1 ;&& ; >> Pete 14/9/89 + gosub @PrintDot ;&& + +.GdReportProblem3 +.GdRPEnd +; gosub IntelligentPop ;>>NPCPOP ;***** + goto @SetCommandFinished + +;--- +.gdfollowgoin +; am on a goal-directed go/follow +; tracing along the OUT pointers from dest has come across +; the current location. The last move was in direction DIR, +; from room FROM, +; reverse direction.... + x1=dir + add x1,startreversaltable + dir=list5(x1) + gosub @preactorcr + verb=dir + gosub @move ;callverb + if commandfinished=true then ffret ;>>>>>>>> special to gnome + if fatalerror<>false then @gdgoerror ;>>mike 14/2/88 + + if room=noun1 then @followjustfinished ; reached destination +.ffret + return +;--- +.gdgoin2 +; are being asked to go 'IN' when in a grid location + dir=ivin + gosub @preactorcr + verb=dir + gosub @move ;callverb + if executeProcessed=false then @Gdgoerror ;>>mike 9/2/88 + processed=true + if room=noun1 then @followjustfinished ; reached destination + return +;--- +.gdgoout + if room>minsynthroomminus1 then @followjustfinished ; we must have arrived +; go outwards in current complex + x1=room + gosub @getfloorpointer ; in x2 for room x1 +;;.gdgoout2 + verb=list5(x2) + gosub @preactorcr + gdgoroomsave=room + gosub @move ;callverb +; see if we have arrived + processed=true + if room=gdgoroomsave then @followfinished + if room=noun1 then @followjustfinished ; YUP! + return ;nope! +;--- +.getfloorpointer +; return (x2)=in direction, (x2+1)=out direction +; for room x1 +; where are pointers for this room? + x2=startfloorpointers + add x2,x1 +;;.gfpret + return +;--- +.gdgo + dest=noun1 + ProblemObject=NullObject ;>>Mike 4/3/88 - go to a Room num, not an object +; if actor<>rook then gdfollowdest ;*graham* + goto @gdfollowdest ;*graham* +;--- +; *graham* +; Basically, same as gdfollowdest, except that this goes from ROOM +; to DEST in one move for fast flying objects. +; +; * This avoids all the tedious messing about typing WAIT every time +; the user wishes to be flown one move towards the DEST. +; * It uses a special "no-go area" check to avoid inappropriate +; messages in SPECIALMOVES. E.g. GO PARKLAND involves crossing the +; river. hence, "the river was too deep for the rook to cross", will +; be replaced with the more appropriate message, "the rook didn't know +; its way there". +; * Some routes involve going via indoors, such as from the front garden +; to the back garden. It would look very silly if the rook flew +; through the house rather than over it. The routine avoids this by +; just displaying the outdoor destination, and not the route. +; * It avoids having to cope with object manipulation while flying. +; * Also, the rook may only go to an outside destination. +; +; This uses a simple philosophy that by tracing both ROOM and DEST +; successfully to the grid, there MUST be a valid route. Finding +; the shortest possible route is not required here. +; +;.flydest +; gosub @canactormove +; if result=false then @followfinished +; gosub @specialnogoarea +; if result=false then @followfinished ; can't go there +; if room=dest then @followfinished ; already there! +; roomsave1=room +; destsave1=dest ; these are unaffected +; x1=destsave1 +; x6=roomsave1 +; gosub @tracex1tosynth ; trace DEST to grid +; if dest=0 then gdgoerror +; x1=roomsave1 +; x6=destsave1 +; gosub @tracex1tosynth ; trace ROOM to grid +; if dest=0 then gdgoerror +; room=roomsave1 +; dest=destsave1 +;; route is ok, do the "teleport" +; m1=2507 +; gosub printm1dot ; the rook took to the air and flew quickly +; from=room +; room=dest +; currentpos(actor)=room +; hicurrentpos(actor)=c0 +; gosub @setuproom +; gosub @followfinished +;; just in case user happens to be where rook will land... +;; (this is virtually impossible, since the user is the only one +;; who can command the rook) +; m1=2508 +; gosub printm1dot ; rook landed nearby +; goto @aftermove +; *graham* +;--- +;.increaseboredom +;; increment the boredom counter for all npcs... +; x1=boredomoffset ; entry for npc #0 +; x3=npcentrysize +; +;.ana1 +; x2=npccurrent(x1) +; add x2,c1 +; npccurrent(x1)=x2 +; add x1,x3 ; skip on to next entry +; if x1>removed for L2 lastuserroom=lastroom +; activationsremaining=maxactivations +;; do npc movement for the room where the user is NOW + actor=user + gosub @setuproom + currentuserroom=room +; gosub npcactionsroom +; +; if againverb>maxdirection then npcanotmove +;; user has just moved, so give the npcs in the room he was +;; just in a crack of the whip (possibly literally!) +; room=lastuserroom +; if room=0 then npcanotmove +; gosub npcactionsroom +; if activationsremaining>negative then npcaend +; +;.npcanotmove +; now go through all npcs to see which are getting impatient. +; For each npc, we have npccurrent(boredomoffset) which +; gives the number of turns since it was last activated +; And npcinitial(patienceoffset) which gives the number of +; turns it is prepared to wait. + actor=2 +.npcaloop + if actor=user then npcanoneedtoactivate + gosub @setACTORATTRIBUTES +;>>l2; has a high-priority event happened - i.e. is attention flag set? +;>>l2 x1=attentionoffset +;>>l2 add x1,actorattributes +;>>l2 x2=npccurrent(x1) +;>>l2 if x2=0 then npcaloop1 +; have had a high-priority interruption - verb +; handlers may want to take this into account when +; deciding what to do - so pass attention flag to them, +; then clear it anyway when they've had their chance +;>>l2 loopactor=actor ; save actor * why is this necessary? +;>>l2 gosub npcaactivate +;>>l2 actor=loopactor +;>>l2 gosub @setACTORATTRIBUTES +;>>l2 x1=attentionoffset +;>>l2 add x1,actorattributes +;>>l2 npccurrent(x1)=c0 ; clear attention flag +;>>l2 return + +;;.npcaloop1 +; is npc inactive? + x1=npccurrent(actorattributes) + + cif AllowCheat + if cheatMode<2 then nalNoCheat1 + if CheatMode>32000 then nalNoCheat1 + prs " actor=";* + print actor ;* + prs ". " ;* + print x1 ;* + message space ;* +.nalNoCheat1 + cend ; allowcheat + +; if x1<128 then npcaLoopActivate + if x1<64 then npcaLoopActivate +;; if x1<128 then npcaNoNeedToActivate ; failsafe + gosub @SetupRoom +;; if Room=CurrentUserRoom then Activateit + + cif AllowCheat + if cheatMode<2 then nalNoCheat2 + if CheatMode>32000 then nalNoCheat2 + prs " room=" ;* + print room ;* + prs " cur=" ;* + print CurrentUserRoom ;* +.nalNoCheat2 + cend ; allowcheat + + x1=npccurrent(actorAttributes) + if room<>CurrentUserRoom then npcANoNeedToActivate +;;.ActivateIt + npccurrent(actorAttributes)=c0 ; make it permamently active. + goto npcaactivate ; activate it immediately for quick response + +.npcaLoopActivate +; now see if npc is bored enough to activate itself +; x1=boredomoffset +; add x1,actorattributes +; x1=npccurrent(x1) +; x2=patienceoffset +; add x2,actorattributes +; x2=npcinitial(x2) +;; now x1=number of turns actor has been waiting +;; and x2=number of turns it is prepared to wait +; if x1>mike 6/4/88 room=currentpos(actor) + gosub @SetupRoom ;>>mike 18/4/88 + if room=0 then npcanoneedtoactivate ; dead or whatever +; gosub calcnpctime ; check time +; if x1>250 then npcaend ; out of time! +.npcaactivate +; sub activationsremaining,c1 +; if activationsremaining>negative then npcaend + gosub activatenpc +.npcanoneedtoactivate + add actor,c1 + if actor> Pete 14/9/89 + + actor=user + gosub @setuproom + gosub @setACTORATTRIBUTES + goto @initfifo +;--- +;>>mike 28/3/88.npcactionsroom +;>>mike 28/3/88 NoTreasureInRoom=false ; first greedy npc will check +;>>mike 28/3/88 if room=0 then npcaret +;>>mike 28/3/88 roomtoactivate=room +;>>mike 28/3/88 ACTOR=minnpc +;>>mike 28/3/88.anothernpc1 +;>>mike 28/3/88 room=roomtoactivate +;>>mike 28/3/88 object=actor +;>>mike 28/3/88 gosub @checkifpresent +;>>mike 28/3/88 if result=false then npcar1 +;>>mike 28/3/88; any time to activate it this turn? +;>>mike 28/3/88 sub activationsremaining,c1 +;>>mike 28/3/88 if activationsremaining>negative then npcaret +;>>mike 28/3/88 gosub activatenpc +;>>mike 28/3/88.npcar1 +;>>mike 28/3/88 add ACTOR,c1 +;>>mike 28/3/88 if ACTOR>mike 28/3/88.npcaret +;>>mike 28/3/88 return +;--- +;;.healactor; >> Pete 14/9/89 +;; x1=HitPointOffset; >> Pete 14/9/89 +;; add x1,ActorAttributes; >> Pete 14/9/89 +;; x2=npcinitial(x1); >> Pete 14/9/89 +;; x3=npccurrent(x1); >> Pete 14/9/89 +;; if x3> Pete 14/9/89 +;; return; >> Pete 14/9/89 + +;;.HealActor1; >> Pete 14/9/89 +; actor is injured - heal him +; x4=4 ; rate of healing offset +; add x4,ActorAttributes +; x4=npcInitial(x4) ; x4 becomes amount to heal per turn +;; x4=10 ; add on some health; >> Pete 14/9/89 +;; add x3,x4; >> Pete 14/9/89 +;; if x3>x2 then HealActor2; >> Pete 14/9/89 +;; npccurrent(x1)=x3; >> Pete 14/9/89 +;; return; >> Pete 14/9/89 + +;;.HealActor2; >> Pete 14/9/89 +;; npccurrent(x1)=x2 ; set to max hit points; >> Pete 14/9/89 +;; return; >> Pete 14/9/89 +;--- +.ACTIVATENPC +; ACTOR is a living NPC +; who may or may not be within sight of the player, +; so make it do something + cif allowcheat + if cheatmode<2 then noactivateinfo + if CheatMode=NullValue then noActivateInfo + message cr + prs "activating " + print actor + prs "(" + add forceprinting,c1 + gosub @printactor + sub forceprinting,c1 + prs "). " +.noactivateinfo + cend ; allowcheat + + gosub @specialnpcgoldsinging ; graham 17/5/88 + + gosub @initfifo + gosub absactivatenpc + goto @linkonfifocommandqueue +;--- +.absactivatenpc + GOSUB @setACTORATTRIBUTES +; reset boredom counter +; x1=boredomoffset +; add x1,actorattributes +; x2=npccurrent(x1) +; if x2=0 then aanret ; already activated this turn +; npccurrent(x1)=c0 +; +;; x1=hitpointoffset ; >> Pete 14/9/89 +;; add x1,actorattributes ; >> Pete 14/9/89 +;; x1=npccurrent(x1) ; >> Pete 14/9/89 +;; if x1=0 then aanret ; dead! ; >> Pete 14/9/89 +; + verb=0 + noun1=nullobject + noun2=nullobject + prep=0 +; ACTORATTRIBUTES REMAINS SET UP THROUGHOUT PROCESSING OF THE NPC +; +; reduce hatred of current enemy +;; x1=hatredoffset ; >> Pete 14/9/89 +;; add x1,actorattributes ; >> Pete 14/9/89 +;; x2=npccurrent(x1) ; >> Pete 14/9/89 +;; if x2=0 then annohate ; >> Pete 14/9/89 +;; sub x2,c1 ; >> Pete 14/9/89 +;; npccurrent(x1)=x2 ; >> Pete 14/9/89 +;;.annohate ; >> Pete 14/9/89 ; >> Pete 14/9/89 +;; gosub @healactor ; >> Pete 14/9/89 +; + processed=false + gosub @specialactivatenpc + if processed=true then aanret + if verb<>0 then @eaoverb ; do it immediately +; + gosub decisioncode + if executeprocessed=true then npcret +; don't want to do any of the useful possibilities - consider random things +; +; maybe it could move? + gosub @CanActorMove + if result=false then npcm1 + random x1 + if x1>200 then @npcmove + +; at this point, ACTOR is doing abslutely buggerall. if ACTOR should +; be doing something, then it should be hard coded here... +.npcm1 +.npcret +.aanret +.DecisionCodeRet +.npcmoveret + RETURN +;--- +.decisioncode +;; gosub @amiincombat ; gives result=true if currently fighting someone ; >> Pete 14/9/89 +;; if result=true then @defendMyself ; >> Pete 14/9/89 +; check for other actions +; +; any orders waiting? (either from previous happenings, +; or from the npc's master) +; (taken out of loop below to avoid variable conflicts etc. +; Probably possible to re-insert with a little thought - +; but only saves one variable) +; + gosub @npcgetcurrent ; get stack pointer x1 for actor + add x1,c1 + orderwaiting=npcstack(x1) ; 0 if none +; another form of orders is following someone... + if orderwaiting<>0 then decidenotfollow + gosub @checknullaction + if orderwaiting<>0 then decidenotfollow + goto DNF1 ;>>mike 29/3/88 + +.decideNotFollow ;>>mike 29/3/88 +; try executing current orders if obedient enough + x1=obedienceOffset ;>>mike 29/3/88 + add x1,ActorAttributes ;>>mike 29/3/88 + x1=npcInitial(x1) ;>>mike 29/3/88 + if x1=255 then DNF0 ;>>mike 29/3/88 + random x2 ;>>mike 29/3/88 + if x2>x1 then DNF1 ;>>mike 29/3/88 +.DNF0 ;>>mike 29/3/88 + gosub @ExecuteAnyOrders ;>>mike 29/3/88 + if executeProcessed=true then DecisionCodeRet ;>>mike 29/3/88 + +.DNF1 + x1=followoffset + add x1,actorattributes + x1=npcCurrent(x1) + if x1<>0 then @DoIWantFollow ;>>mike 29/3/88 +; + goto @epfalse + +; if result=false then decidenotcombat +; X1=CURRENTPOS(NOUN1) ; but is the enemy here? +; IF X1=ROOM THEN @defendmyself ; yes - so have to attack or run away +; no - so only chase it if nothing better to do +; +; now some high priority events, such as on-going combat... +; +;;.decidenotcombat +; now decide on other (pseudo-random) things to do +; +;>>mike 29/3/88 x6=0 ; item with biggest margin +;>>mike 29/3/88 x5=0 ; current biggest margin +;>>mike 29/3/88;; x1=greedoffset ; first of the characteristics +;>>mike 29/3/88;; if NoTreasureInRoom=false then decideloop +;>>mike 29/3/88; no treasure in here, so no point in NPC wanting some! +;>>mike 29/3/88; x1=aggressionoffset ; greedoffset+1 +;>>mike 29/3/88 x1=obedienceoffset +;>>mike 29/3/88.decideloop +;>>mike 29/3/88 x2=actorattributes +;>>mike 29/3/88 add x2,x1 +;>>mike 29/3/88 x2=npcinitial(x2) +;>>mike 29/3/88 if x2=255 then decideloopalways ; special case - always do this actio +;>>mike 29/3/88 random x3 +;>>mike 29/3/88 sub x2,x3 +;>>mike 29/3/88 if x2>negative then decideloop2 ; doesn't want to do it at all! +;>>mike 29/3/88; x2 is margin by which npc wants to do this thing +;>>mike 29/3/88 if x2>mike 29/3/88.decideloopalways +;>>mike 29/3/88 x5=x2 ; set up new biggest margin +;>>mike 29/3/88 x6=x1 ; set up new item +;>>mike 29/3/88.decideloop2 +;>>mike 29/3/88 add x1,c1 +;>>mike 29/3/88 if x1>mike 29/3/88; only go up to obedienceoffset if there +;>>mike 29/3/88; are some orders waiting - otherwise obedient creatures +;>>mike 29/3/88; would become zombies when they had no orders to obey +;>>mike 29/3/88; +;>>mike 29/3/88 if x1<>obedienceoffset then decideloopnotobedience +;>>mike 29/3/88 if orderwaiting=0 then decideloopnotobedience ; nothing to do! +;>>mike 29/3/88 if cheatmode=false then decideloop ; see if obedient! +;>>mike 29/3/88 x2=255 ; completely obedient in cheat mode +;>>mike 29/3/88 goto decideloopalways +;>>mike 29/3/88 +;>>mike 29/3/88.decideloopnotobedience +;>>mike 29/3/88; now x6 is item with biggest margin +;>>mike 29/3/88;; if x6=greedoffset then @doiwanttreasure +;>>mike 29/3/88;; if x6=aggressionoffset then @doiwantattack +;>>mike 29/3/88; if x6=timidityoffset then @runaway +;>>mike 29/3/88 if x6=obedienceoffset then eitherordersorfollow +;>>mike 29/3/88; +;>>mike 29/3/88.lTwoNoOrders +;>>mike 29/3/88 executeprocessed=false ; allow random things to happen +;>>mike 29/3/88; +;>>mike 29/3/88 return +;>>mike 29/3/88;--- +;>>mike 29/3/88.eitherordersorfollow +;>>mike 29/3/88 if orderwaiting=ifollow then @doiwantfollow ;following, but no orders +;>>mike 29/3/88 goto @executeanyorders +;--- +;;.npcanothermove +;;; do we want another attempt at moving? Decide randomly +;;; (this cuts execution time, and breaks iloops) +;; random x1 +;; if x1<60 then npcmoveret + +.npcmove +; move npc ACTOR in a random direction +; we have already done gosub @canactormove +; if result=false then npcmoveret + gosub @canactorrandommove + if result=false then npcmoveret +; +; ok, do a random direction + gosub @chooserandomdirection + if verb=0 then npcmoveret + noun1=nullobject + noun2=nullobject + prep=0 + gosub @callverb ; move the npc, describing as appropriate + FatalError=false + goto @EpTrue +; +;--- +.NPCGOLDSINGING +; random messages said by NPC +; most characters pick a random one of three +; messages within a block, offset from start by NPC number + + WANTTOPRINTAND=0 + +;>>mike 30/3/88 if descriptionmode<>iverbose then npcret +;>>mike 30/3/88 if room<>currentuserroom then npcret +;>>mike 30/3/88 gosub @setuproom ;?? why is this necessary? + +;;>>Not Needed in Gnome. if lightinroom=true then gs1 +; m1=2177 ; you hear some noises... +; goto gs2 +; +;.gs1 +;>>mike 30/3/88 x1=actor +;>>mike 30/3/88 GOSUB @printTHEobjectx1 ; uses m2 only +;>>mike 3/4/88 gosub @PrintActor ;>>mike 30/3/88 +; find message base from npcinitial + x4=goldsingingoffset + add x4,actorattributes + value=npcinitial(x4) + gosub @valuetimes256 + add x4,c1 + x2=npcinitial(x4) + add value,x2 + if value=0 then @eptrue ;>>mike 3/4/88 + gosub @PrintActor ;>>mike 3/4/88 + m1=value +;;.gs2 + goto @varymessagedot +;--- +;;.varyactorsays +;; gosub @getvarym1 +; drop through to npcsays +; +;.actorsays +;; ACTOR M1 +; X1=ACTOR +;.npcx1says +; if lightinroom=true then ns1 +; m2=3746 ; a voice in the dark says.... +; gosub @printM2 +; goto ns2 +; +;.ns1 +; verb=isay +; m1save=m1 +; GOSUB @printACTORverb +; m1=space +; gosub @printM1 +; m1=m1save +; +;.ns2 +; gosub @printQUOTE +; gosub @printM1 +; gosub @printQUOTE +; return +; +; print 'a male (female) voice in the distance shouts "something".' +; Or print the person shouting if nearby.. +;;.varyactorshouts +;;gosub @getvarym1 +;; +;;.actorshouts +;; if descriptionmode<>iverbose then asret +;; forceprinting=true ; even distant things are printed during 'shout' +;; m1save=m1 +;; if room=currentuserroom then actorshoutshere +;; x1=actor +;; gosub @conjugatex1 +;;; now result=pronoun offset for actor +;; m1=3736 ; start of 'a male voice shouts' type thing +;; add m1,result ; (0..7) +;; gosub @printM1 +;; goto ash1 +;; +;;.actorshoutshere +;; lastwordprinted=0 ; force printing name (*why is this needed) +;; verb=ishout +;; gosub @printACTORverb +;; +;;.ash1 +;; message space +;; message quote +;; m1=m1save +;; gosub @printM1dot ; what actor shouts. +;; message quote +;; message space +;; forceprinting=false +;;.asret +;; return +;--- +; +.initnpcs +; first zero all npccurrent entries +; x1=0 +;.initnpc1 +; npccurrent(x1)=c0 +; add x1,c1 +; if x1> Pete 14/9/89 +;; gosub MakeObjectObedient ; >> Pete 14/9/89 +;; x1=followOffset ; >> Pete 14/9/89 +;; add x1,x4 ; >> Pete 14/9/89 +;; npccurrent(x1)=c1 ; user ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +.makeobjectobedient ; >> Pete 14/9/89 +; make OBJECT obedient to USER + gosub @setX4toOBJECTATTRIBUTES ; >> Pete 14/9/89 + x1=masteroffset ; >> Pete 14/9/89 + add x1,x4 ; >> Pete 14/9/89 + npccurrent(x1)=c1 ; user ; >> Pete 14/9/89 + return ; >> Pete 14/9/89 +;--- +.follow +; set up npccurrent(npc attributes + 1)= person to follow +;>>mike 28/3/88 if actor<>user then follownotuser +;>>mike 6/2/88 if noun1>maxpeople then @setupfind +; +; +;>>mike 28/3/88.follownotuser +; + gosub @stop ; **graham 9/6/88 pete wanted gnoah to end his rt when + ; asked to to follow** + x1=followoffset + add x1,ACTORATTRIBUTES + npccurrent(x1)=noun1 +;>>mike 28/3/88 gosub @doiwantfollownoun1 ;<<>mike 28/3/88 if fatalerror=true then @stopfollowing +;;.followret + return +;--- + +.npcpusherror +; no free space left! +; An attempt to make things a little more friendly when +; NPCs are given big lists of commands... + processed=true ; prevent obedience message + gosub @printactor ; + m1=3600 + goto @printm1 ; said, I'm not your slave! +;; cif AllowCheat +;; gosub @debugshowstack +;; cend +;;; and normal stack overflow recovery code... +;; freespaceptr=x2 +;; message 3600 ; a voice in the distance shouts, "a stack error" +;; gosub @initnpcs ; clear all stack, enemies etc. (positions unchanged) +;; goto @getfromuser ; clears acode stack +;--- +.initfifo +; initialise a temporary fifo chain +; this is linked to the command queue for ACTOR when it has been +; completed +; This allows new commands to be added as the +; next thing for the NPC to do, but +; the block of commands given will be executed in the +; order given + gosub @setACTORATTRIBUTES ; this maybe prevents bugs + initfifoactor=actor + if lastunlinkedcommand=0 then initfifook + + cif allowcheat + if cheatmode=0 then lulnodebug + prs "err2: lastunlinked command=" ;* + print lastunlinkedcommand ;* + prs ".] " ;* +.lulnodebug + cend ; allowcheat + + lastunlinkedcommand=0 ; pointer to block of last command given + +.initfifook + commandstolink=freespaceptr ; pointer to first command given + return +;--- +.linkonfifocommandqueue +; link on the queue which has been built up. +; The first command to be executed is at COMMANDSTOLINK +; and the last is at lastunlinkedcommand + gosub @setACTORATTRIBUTES ;* maybe avoids bugs? + + + cif allowcheat + if actor=initfifoactor then lifcq1 + if cheatmode=0 then lifcq1 + message cr ;* + prs "[err1:" ;* + print actor ;* + prs "/" ;* + print initfifoactor ;* + prs "]" ;* + message cr ;* +.lifcq1 + cend ; allowcheat + + if lastunlinkedcommand=0 then lofcqret + x1=npcptroffset + add x1,ACTORATTRIBUTES + x4=npccurrent(x1) +; now x4=number of current stack entry + npccurrent(x1)=commandstolink + x1=lastunlinkedcommand + gosub npcgetoffset ; of number x1, returns in x1 +; now x1=offset in npcstack of last command to link + npcstack(x1)=x4 ; link to what used to be current actor command + lastunlinkedcommand=0 +.lofcqret + return +;--- +.singlepushfifo +; do a complete fifo push, without the extra facility +; of being able to give multiple commands which +; are executed in the order they were given + gosub @initfifo + gosub npcpushfifo + goto @linkonfifocommandqueue +;--- +.npcpushfifo +; for npc ACTOR, add a new action to the end of its 'pending +; action' queue, such that it will be the last to be executed. +; i.e. FIFO +; +; find some free space + if lastunlinkedcommand=0 then npffirstcommand + x1=lastunlinkedcommand + gosub npcgetoffset + npcstack(x1)=freespaceptr ; link on new command + if lastunlinkedcommandmaxcollective then npcpop + gosub npcpop +; drop through to npcpop for second part of gd command + +.npcpop +; Only use this if you are sure you know what you are doing - +; normally use intelligentpop + +; npc is to stop doing its current action, and climb to next +; on its chain. The top action (the default one) is never deleted +; +; return x3=0 if pop error occured + gosub @npcgetcurrent + x2=npcstack(x1) ; number of command to execute after this one +; and add this element as the current element in the free space chain + x4=npcptroffset + add x4,actorattributes + x3=npccurrent(x4) + if x3=0 then npcpoperror ; no current command on stack + npccurrent(x4)=x2 ; make element above it current action for npc + + npcstack(x1)=freespaceptr + freespaceptr=x3 +;;.gogetret +.npcpoperror + return +;--- +.commandstop + gosub @done +;===== + cif Includepictures + gosub @showpicture ; cancel "vision" pics + cend ; Includepictures + concentrating=false ; stop concentrating +;===== + +.stop +; cancel all ACTOR's current command queue + gosub @setACTORATTRIBUTES ; just in case! +.stop1 + gosub npcpop + if x3<>0 then stop1 ; more to come + gosub stopfollowing + if actor<>user then @done ;>>mike 8/2/88 +;>>mike 8/2/88 if actor<>user then @done +; gosub checkkbd ; security only +; if result=true then getfromuser ; clears stack etc. + goto @abscancelinput ; gosub, return +;--- +.stopfollowing + gosub @setACTORATTRIBUTES + x1=followoffset + add x1,actorattributes + npccurrent(x1)=c0 ; stop following + return +;--- +;--- +.preactorcr + if actor<>user then pacret + message cr +.pacret + return +;--- +;------- +;--- +.tracex1tosynth +; trace from room x1 back to the synthesised room number +; return x1=synth room number +; if any room=x6 on the way, return with processed=true +; and dir=direction of last move +; before we encountered x6 + processed=false + if x1=x6 then txtsfound + if x1>minsynthroomminus1 then txtsret + + cif AllowCheat + if cheatMode<>2 then NotTXCheat + print x1 + message space +.NotTXCheat + cend ; allowcheat + + gosub @getfloorpointer ; in x2 for room x1 + dir=list5(x2) + from=x1 + gosub @checkexit ; exit x1 x3 x4 x5 ; room dir status dest + if dest=0 then txtsret ; in for safety only + x1=dest + goto @tracex1tosynth +;--- +.txtsfound +; have found a match with x6 +; i.e. both source and dest for the move are in +; the same complex + processed=true +.txtsret + return +;--- + cif allowcheat + +.debugshowstack ;* + message cr + prs "Command queues are: (return to stop, space to step if looping)" + actor=1 +.debugstack1 + message cr + object=actor + forceprinting=true + gosub @printTHEobject + message colon + gosub @setACTORATTRIBUTES + gosub @npcgetcurrent ; set up x1=position in npcstack +.debugstack2 +; of current command + x2=npcstack(x1) ; pointer to next + add x1,c1 + verb=npcstack(x1) + add x1,c1 + prep=npcstack(x1) + add x1,c1 + noun1=npcstack(x1) + add x1,c1 + noun2=npcstack(x1) + + if verb=0 then debugstack3 + gosub debugshowcommand + x1=x2 + gosub @npcgetoffset ; transform x1 from entry number to offset in stack. + goto debugstack2 + +.debugstack3 + add actor,c1 + if actor200 then dssnoverb ; funny verb + m1=50 ; start of verbs + add m1,verb + message m1 +.dssnoverb + prs "(" + print verb + prs ") " +; + if prep=0 then dssnoprep + if verb>200 then dssnoprep + m1=1600 + add m1,prep + message m1 +.dssnoprep + prs "(" + print prep + prs ") " + + if noun1=nullobject then dssnonoun1 + if noun1=0 then dssnonoun1 + if verb>200 then dssnonoun1 + m1=300 + add m1,NOUN1 + message m1 +.dssnonoun1 + prs "(" + print noun1 + prs ") " + + if noun2=nullobject then dssnonoun2 + if noun2=0 then dssnonoun2 + if verb>200 then dssnonoun2 + m1=300 + add m1,noun2 + message m1 +.dssnonoun2 + prs "(" + print noun2 + prs "), " + return + cend + +;--- +;>>mike 28/3/88.gdkilldead +;>>Mike 28/3/88; object=noun1 here. +;>>Mike 28/3/88 commandfinished=true +;>>Mike 28/3/88 goto @printdead ; object is dead (gosub,return) +;--- +;;.gdkill ; >> Pete 14/9/89 +; am in the middle of killing noun1 +; is target dead? +;>>mike 6/2/88 if noun1>maxpeople then @silly ;<maxNpc then @Silly ;>>mike 6/2/88 ; >> Pete 13/6/89 +;; object=noun1 ; >> Pete 13/6/89 +;; gosub @setX4toOBJECTATTRIBUTES ; >> Pete 13/6/89 +;; x1=hitpointoffset ; >> Pete 13/6/89 +;; add x1,x4 ; >> Pete 13/6/89 +;; x1=npccurrent(x1) ; >> Pete 13/6/89 +;; commandFinished=true ; >> Pete 13/6/89 +;; if x1=0 then @PrintDead ; target is dead ; >> Pete 13/6/89 +;; x1=currentpos(noun1) ; >> Pete 13/6/89 +;; if x1=0 then gdKillRet ; target is otherwise absent ; >> Pete 13/6/89 +; +;>>Mike 28/3/88 executeprocessed=true +;>>Mike 28/3/88 object=noun1 +;>>Mike 28/3/88 gosub @checkifpresent +;>>Mike 28/3/88; x1=currentpos(noun1) +;>>Mike 28/3/88 verb=iattack +;>>Mike 28/3/88 gosub @preactorcr +;>>Mike 28/3/88 if result=true then @callverb +; +; current enemy is not here. +;>>Mike 28/3/88 gosub @doiwantfollownoun1 ; chase enemy +;>>Mike 28/3/88 if executeprocessed=false then gdkillret ; couldn't follow - so abort +;>>Mike 28/3/88 if fatalerror=true then ReportProblem ;gdkillret +;>>Mike 28/3/88 commandfinished=false ; still have to kill it! +;; gosub @doiwantFollowNoun1 ; chase enemy ;>>Mike 28/3/88 ; >> Pete 13/6/89 +;; commandFinished=false ; still have to kill it. >>Mike 30/4/88 ; >> Pete 13/6/89 +;; if executeProcessed=true then gdKillRet ;>>Mike 28/3/88 ; >> Pete 13/6/89 +;; verb=iattack ; >> Pete 13/6/89 +;; goto @callverb ; >> Pete 13/6/89 +;--- +;--- +;;.kill ; >> Pete 14/9/89 +; initiate a goal-directed kill +;; if actor<>user then gdkill ; >> Pete 13/6/89 +;>>mike 28/3/88 if noun1>maxNpc then @silly ;>>mike 6/2/88 +;>>mike 28/3/88 object=noun1 +;>>mike 28/3/88 gosub @npcpushfifo +;>>mike 28/3/88 gosub @linkonfifocommandqueue +;<<< gosub done +;; gosub @IsObjectAlive ;>>mike 28/3/88 ; >> Pete 13/6/89 +;; if result=false then @PrintDead ;>>mike 28/3/88 ; >> Pete 13/6/89 +;; goto @singlePushFifo ;>>mike 28/3/88 ; >> Pete 13/6/89 +;>>mike 28/3/88 goto @executeanyorders +;--- +;--- +;;.amiincombat ; >> Pete 14/9/89 +; return result=true if actor is in combat at present +; and noun1=current enemy +;; result=false ; >> Pete 13/6/89 +;; NOUN1=NPCCURRENT(ACTORATTRIBUTES) ; >> Pete 13/6/89 +; current enemy - is it fighting anyone ? +;; IF NOUN1=0 THEN aicret ; >> Pete 13/6/89 +; is it angry enough to keep on attacking current enemy? +; x1=hatredoffset +; add x1,actorattributes +; x2=npccurrent(x1) +; if x2<5 then aicret +;; goto @returnTrue ; >> Pete 13/6/89 +;--- +;;.defendmyself ; >> Pete 14/9/89 +; come here when we know that npc is in battle +;; object=noun1 ; >> Pete 13/6/89 +;; gosub @checkifpresent ; >> Pete 13/6/89 +;; if result=true then incombat ; >> Pete 13/6/89 +; current enemy is not here. +;; x1=currentpos(object) ; >> Pete 13/6/89 +;; if x1<>0 then @doiwantfollownoun1 ; at the moment, always chases enemy ; >> Pete 13/6/89 +; lose agression +;; x1=EnemyOffset ; >> Pete 13/6/89 +;; add x1,ActorAttributes ; >> Pete 13/6/89 +;; npccurrent(x1)=c0 ; >> Pete 13/6/89 +;;.aicret ; >> Pete 14/9/89 +;;.gdkillRet ; >> Pete 14/9/89 +;; return ; >> Pete 14/9/89 +;--- +;;.diwattackanyonenew +; is there anyone else (i.e. orc) here to attack? +; noun1=user +; object=noun1 +; gosub @checkifpresent +; if result=false then @noattack +;; how aggressive is actor? +; random x1 +;; x1=random 0..255 +; x2=aggressionoffset +; add x2,actorattributes +; x2=npcinitial(x2) +;; x2=aggression %ge +;; x1=random 'feelings' - if between 0 and aggression, charge! +; if x1>x2 then @noattack ; not this time, thankyou +;; want attack +;; initiate an attack +; x4=actorattributes +; gosub @increasehatred ; make attacker hate (orc) a bit +; m1=3330 ; a player! lets kill it! and sim. +; gosub @varysayM1dot +; wanttoprintand=x1 ; we always attack player now, so this is safe +; goto definiteattack + +;;.incombat ; >> Pete 14/9/89 +; either run away or attack +; x1=timidityoffset +; add x1,actorattributes +; x2=npcinitial(x1) +; random x1 +; if x1user then definiteattack1 ; no shout for attacking others ; >> Pete 13/6/89 +;; random x1 ; >> Pete 13/6/89 +;; if x1>100 then definiteattack1 ; >> Pete 13/6/89 +;; if descriptionmode<>iverbose then definiteattack1 ; >> Pete 13/6/89 +;; wanttoprintand=actor ; >> Pete 13/6/89 + +;;.definiteattack1 ; >> Pete 14/9/89 +;; verb=iattack ; >> Pete 13/6/89 +; ACTOR wants to attack NOUN1 +;; goto @callverb ; >> Pete 13/6/89 +;--- +;;.runaway +;;; ACTOR is scared (Ahh..) +;; gosub @canactormove +;; if result=false then @crdret +;; gosub @canactorrandommove +;; if result=false then @crdret +;; gosub @chooserandomdirection +;; if verb=0 then @crdret +;; prep=0 +;; noun1=nullobject +;; noun2=nullobject +;; goto @callverb +;--- +;--- +;;.doiwanttreasure +;;; how greedy is npc? +;; if NoTreasureInRoom=true then @diwtret +;;; +;;; drop through to take it... +;;; +;; gosub gdfindtreasure +;; if object=0 then @diwtret +;; +;;.gdtaketreasure +;; noun1=object +;; verb=itake +;; goto @take +;--- +;;.gdfindtreasure +;;; is there any treasure lying around? +;;; first on ground, then carried by other npcs (i.e. to steal!) +;; if NoTreasureInRoom=true then gdnotreasure ; for speed +;; searchpos=room +;; hisearchpos=0 +;; +;;.gdfindtreasuresearchpos +;;; find any treasure at (hisearchpos,searchpos) +;;; and return NoTreasureinroom=true if there +;;; and OBJECT as the treasure found +;; searchdepth=250 +;; gosub @initgetobj +;; +;;.gdfindtreasure1 +;; x1=maxtreasure ; max object to find +;; gosub @getnextobjx1 +;; if object=0 then gdnotreasure ; none found +;; if object=actor then gdfindtreasure1 +;; if objectmaxtreasure then gdfindtreasure1 +;;; got some treasure! +;;; don't want it if it is carried by actor +;; pos=actor +;; hipos=nonspecific +;; gosub @checkobjectpos +;; if result=true then gdfindtreasure1 +;;; got it, so return! +;; return +;; +;;.gdnotreasure +;; NoTreasureInRoom=true +;; return +; +;--- +;---- +;;.doiwantattack +; for npcs. +; does actor want to start attacking anyone? +; if so, return verb and noun1 +; gosub @amiincombat +; if result=true then @defendmyself +; random x1 +; if x1<160 then @diwattackanyonenew ; - may attack + +;;.diwaret +;; return ; don't start new combar +;--- +;--- +;.GetTerrainType +;; get terrain type in X1 for Room X1 +; x2=minSynthRoom +; sub x1,x2 +; if x1>negative then gtt0 +; x1=terraintable(x1) +; return +; +;.gtt0 +; x1=0 +; return +;--- + +; \ No newline at end of file diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/pconst.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/pconst.txt new file mode 100644 index 0000000..2b044c9 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/pconst.txt @@ -0,0 +1,15 @@ +; Standard Adventure source, copyright (C) 1988 Level 9 Computing. +; +; PCONST.TXT, Part-specific constants, to distinguish between parts of +; game. This file must be different for each part. +; +CONST + CONSTANTPARTNUM=2 + part1=0 + part2=1 + part3=0 + + NOTpart1=1 + NOTpart2=0 + NOTpart3=1 +; diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/ref/table.dat b/l9dev/regress/games.l9/ghost.l9/part2.l9/ref/table.dat new file mode 100644 index 0000000..4f8cf49 Binary files /dev/null and b/l9dev/regress/games.l9/ghost.l9/part2.l9/ref/table.dat differ diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/sconst.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/sconst.txt new file mode 100644 index 0000000..0cc8258 --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/sconst.txt @@ -0,0 +1,293 @@ +; Standard adventure source, copyright (C) 1988 Level 9 Computing. +; +; SCONST, game-specific constants. You will probably need to change +; most of the values of these. +; +; A standard labelling convention for constants is that constants +; preceded by I (e.g ILOOK) are relative to their appropriate offset +; (e.g verboffset). +; +CONST +;; StandardAdventure=1405 ; unique game identifier value + Scapeghost=1930 +; + AllowBoat=0 ; set to 1 if you want boat/vehicle code +; +; STARTsynthSHORTdescs=1199 ; shortroomdescs+minsynthroom + SHORTroomDESCS=800 + LONGroomDESCS=1100 +; + MAXMOVEABLE=109 ; MAX OBJECT WHICH MAY BE TAKEN, THROWN ETC. +;; MAXMOVEAPLUS1=110; >> Pete 14/9/89 +; + xmax=0 ; co-ords go 0..xmax - remember to change room 1 exits. + xmaxplus1=1 + ymax=0 +; +;; minsynthroomminus2=38 ; >> Pete 14/9/89 + minsynthroomminus1=39 +;; minsynthroom=40 ; the first room on the grid (bottom left hand corner) ; >> Pete 14/9/89 +;; maxsynthroom=40 ; >> Pete 14/9/89 +; + minecholoc=25 + maxecholoc=33 + maxecholocplus1=34 +; + minsceneryobj=180 + minsceneryobjminus1=179 + maxsceneryobj=190 +;; maxsceneryobjplus1=191 ; >> Pete 14/9/89 + minsceneryobjt2m1=359 + maxsceneryobjtimes2plus2=382 +;; numsceneryobjplus1=11 ; >> Pete 14/9/89 +; +;; minweaponminus1=39 ; >> Pete 14/9/89 +;; minweapon=40 ; >> Pete 14/9/89 + maxweapon=40 +;; maxweaponplus1=41 ; >> Pete 14/9/89 +; + minclothes=255 + maxclothes=255 +; +;; minfood=255 ; >> Pete 14/9/89 +;; maxfood=255 ; >> Pete 14/9/89 +;; maxfoodplus1=256 ; >> Pete 14/9/89 +; + mintreasure=80 + maxtreasure=84 + maxtreasureplus1=85 ; used for evidence in scapeghost.2 +;; maxlightobject=89; >> Pete 14/9/89 + maxlightobjectplus1=90 +; + minallobject=40 + maxallobject=109 +; + MAXOBJECTVISIBLE=149 + MAXOBJECT=189 ; includes scenery objects. +; goes wrong for maxobject>190 (dunno why!) +; - inventory gets a funny value for hisearchpos (24) + MAXOBJECTPLUS1=190 +; + MINOMNI=190 ; 158 ; all real objects above this are omni-present +;; MINOMNIMINUS1=189 ; 159; >> Pete 14/9/89 + MAXOMNI=260 ; must include ieverything, except, it +; +; Preposition values (all relative to prepoffset) +; + FASTENEDTO=14 + through=209 +; +; VERBS... +;; iburn=115 ; >> Pete 14/9/89 +;; ikiss=129 ; >> Pete 14/9/89 +;; ipast=162 ; >> Pete 14/9/89 +;; iwalk=164 ; >> Pete 14/9/89 +;; icatch=165 ; >> Pete 14/9/89 +;===== + iCONCENTRATE=63 +;===== +; +; Offsets into SCORETABLE.. ( table 7 ) (starts at 32...) +;; scBase=32 ; >> Pete 14/9/89 +;; scmax=75 ; >> Pete 14/9/89 + scmaxplus1=76 +; + VisitTableStart=76 ; 34 + VisitTableEnd=226 ; 255 ; 213 ; VisitTableStart + (150=num of "Real" rooms) +; +;; MeetingTable=226 ; 255 ; 213 ; >> Pete 14/9/89 +;; MeetingTableEnd=290 ; 319 ; 277 ; meetingTable+MaxNpc ; >> Pete 14/9/89 +; + minpeople=1 ; = creaturebase + maxpeople=4 +;; maxpeopleplus1=5 ; >> Pete 14/9/89 +; +;; creaturebase=1 ; including people, user etc. ; >> Pete 14/9/89 +;; creaturebaseminus1=0 ; including people, user etc. ; >> Pete 14/9/89 + MINNPC=2 ; all except user +;; MINNPCMINUS1=1 ; all except user ; >> Pete 14/9/89 + MAXNPC=4 + MAXNPCPLUS1=5 + maxtalkingnpc=5 +;===== + maxghost=3 +;===== +;; MAXTALKINGNPCPLUS1=6; >> Pete 14/9/89 +; +; npc status in list 6.. + NPCTABLESIZE=40 ; MAXNPCPLUS1*NpcEntrySize +;; NPCTABLESIZEPLUS8=48 ; >> Pete 14/9/89 +;; NPCCURRENTOFFSET=0 ; >> Pete 14/9/89 +; +;; NPCENTRYSIZE=8; >> Pete 14/9/89 +; npc command queues follow the above in list 6.. + npcstackbase=40 ; immediately after npc table +;; npcstackbaseplus5=45 ; >> Pete 14/9/89 + maxnpcentries=52 ; 5 bytes per queued-command entry on stack +; + npcstackentrysize=5 ; each entry is 5 bytes (hence the 5's above) +; + npctablesizetozero=1535 ; now fixed. was 785 +; +; offsets within each npc table entry in list 6.. +;; enemyoffset=0; >> Pete 14/9/89 + followoffset=1 ; person to follow normally + masteroffset=2 ; the person or creature who subdued this npc +;; hitpointoffset=3; >> Pete 14/9/89 +;; hatredoffset=4 ; the amount which this npc hates its enemy; >> Pete 14/9/89 + npcptroffset=5 +;; boredomoffset=6 ; >> Pete 14/9/89 +; attentionoffset=7 +; and offsets within each corresponding entry in npcinitial, list 5.. +;; attackoffset=2 ; >> Pete 14/9/89 +; hitpoint offset=3 + obedienceoffset=4 +;; patienceoffset=5 ; >> Pete 14/9/89 + goldsingingoffset=6 ; in static data - word (hi byte first) +; +TABLE +;; list6=6; >> Pete 14/9/89 +; +CONST +; +;objects +; + User=1 +; +;===== + Joe=2 + Luke=3 + Firemen=4 +; +; ordinary objects (80 onwards) +; +; light objects in order... + card=80 + paper=81 + map=82 + bookmark=83 +;; briefcase=84; >> Pete 14/9/89 + defaultbulb=85 + clearbulb=85 + pearlbulb=86 + foil=87 + plug=88 + socket=89 +; +; heavy objects... + directory=95 + body=96 +;; jeans=97 +;; pocket=98 + clock=99 + closedpanel=100 + openpanel=101 + ice=102 + branch=103 + ditchwater=104 + whisky=105 + telephone=106 +; +; static objects (110 onwards) + lid=110 + tank=111 + chimney=112 + fireplace=113 + brickeddoor=114 + ivy=115 + curtains=116 +;; dispenser=117 ; >> Pete 14/9/89 + mirror=118 + alcove=119 + socketh=120 + socketk=121 + switchh=122 + switchk=123 +;; tube=124 ; >> Pete 14/9/89 + pool=125 + brokenglass=126 + ditch=127 +; +; invisible objects (150 onwards) + vapour=150 + herbs=159 + flames=161 +; +; used as position shadows (omni present in certain groups of rooms) + headstones=151 + graves=152 + grass=153 + garden=154 + house=157 + road=160 +; + minlightminus1=174 ; start of light sources... +;; minlight=175 ; >> Pete 14/9/89 + headlights=175 + halllight=176 + kitchenlight=177 + landinglight=178 + maxlight=178 ; ...end of light sources +; + hand=240 ; for Push Hand Through Chimney etc. +;===== +; +;; ithing=246 ; >> Pete 14/9/89 + iroom=243 + iwall=244 +; +; game-specific constants... +; +;===== + ifreeze=122 ; "freeze" verb + minVISION=4700 ; start of VISION nouns + maxVISION=4799 ; end of VISION nouns + BuryCardMess=5011 ; message for burying card + JoeIntroMess=5100 ; triggers joe to follow user +;===== +; +; game-specific variables... +; +VAR + TotalMoves + ProblemObject +;; ProblemVerb ; >> Pete 14/9/89 + gdCurrentSave gdHiSave + GalahadComment + ALREADYDONEPROTECT + startpicturetable + examinemarked +; + GeneralScoreAddition + t1 t2 t3 ; temps for preserving x1,x2,x3 in printm1 + outofreach +; +;===== + playerobject ; number of object carried + hallswitchon ; set when hall/landing switch is on + kitchenswitchon ; set when kitchen switch is on + cartimer ; timer for cars passing by village green + vapourburning ; countdown while vapour burns + curtainsburning ; countdown while curtains burn + npcdistressed ; set in specialactivate when npc is distressed by +; light and can only obey movement verbs + concentrating ; set when user is concentrating + astralcount ; incremented while concentrating + chimneyposknown ; set when pos of chimney is known on outside wall + dislodgedpaper ; set when paper has been dislodged + pullingbookmark ; number of ghosts pulling bookmark + cardfound ; set to 1 when card is known to be buried, and then +; set to 2 when card is found, to prevent it being re-found + fuseblown ; set when main house fuse is blown + oldplugsocketroom ; contains old room of plug or socket + evidencefound ; total of evidence items discovered + joeconcentrated ; prevents joe's concentrating hint being repeated + carstriggered ; prevents cars from passing until user is near green. +; this prevents him being startled as soon as he sets foot there! + takenmap ; prevents joe re-congratulating user on taking map + destroyevidence ; when true, .countevidence will also remove evidence +; in hall from the game + gonethroughdoor ; prevents "I passed through the door" being repeated + NullVisions ; table pointer for "nothing happened" type visions +;===== +; \ No newline at end of file diff --git a/l9dev/regress/games.l9/ghost.l9/part2.l9/score.txt b/l9dev/regress/games.l9/ghost.l9/part2.l9/score.txt new file mode 100644 index 0000000..4d76fde --- /dev/null +++ b/l9dev/regress/games.l9/ghost.l9/part2.l9/score.txt @@ -0,0 +1,145 @@ +; Standard adventure sources 14/5/88 +; +; score code +; +; 14/5/88 + + begin + +.CalcScore +; return X4=current score + x1=32 ; start of score table + x4=0 + +.CalcScore1 + x2=list7(x1) + if x2<128 then calcScoreNotNegative +; convert negative 8 bit number to negative 16 bit + x3=65280 + add x2,x3 + +.calcScoreNotNegative + add x4,x2 + add x1,c1 + if x1