initial 1.3.0

This commit is contained in:
2019-05-01 17:46:38 -04:00
commit ad86bc2a30
418 changed files with 34837 additions and 0 deletions

BIN
template/logdir Normal file

Binary file not shown.

BIN
template/object Normal file

Binary file not shown.

BIN
template/picdir Normal file

Binary file not shown.

0
template/snddir Normal file
View File

162
template/src/defines.txt Normal file
View File

@@ -0,0 +1,162 @@
// **********************************
// Interpreter variables, flags, etc.
// **********************************
// vars
#define room_no v0
#define prev_room_no v1
#define ego_edge_code v2
#define score v3
#define object_touching_edge v4
#define object_edge_code v5
#define ego_dir v6
#define max_score v7
#define free_memory v8
#define unknown_word_no v9
#define cycle_delay v10
#define clock_seconds v11
#define clock_minutes v12
#define clock_hours v13
#define clock_days v14
#define joystick_sensitivity v15
#define ego_view_no v16
#define error_code v17
#define error_information v18
#define key_pressed v19
#define computer_type v20
#define window_close_time v21
#define sound_type v22
#define sound_volume v23
// not sure what v24 is
#define selected_inventory_item v25
#define video_mode v26
// Not standard, but define a few temp variables
#define va v27
#define vb v28
#define vc v29
// flags
#define ego_on_water f0
#define ego_hidden f1
#define input_recieved f2
#define ego_touching_signal_line f3
#define input_parsed f4
#define new_room f5
#define game_restarted f6
#define script_buffer_blocked f7
#define joystick_sensitivity_set f8
#define sound_on f9
#define trace_enabled f10
#define first_logic0_cycle f11
#define game_restored f12
#define inventory_select_enabled f13
#define menu_enabled f14
#define windows_remain f15
// strings
#define prompt_char s0
// edge codes
#define no_edge 0
#define horizon_edge 1
#define right_edge 2
#define bottom_edge 3
#define left_edge 4
// directions
#define stopped 0
#define up 1
#define upright 2
#define right 3
#define downright 4
#define down 5
#define downleft 6
#define left 7
#define upleft 8
// video modes
#define CGA 0
#define RGB 1
#define Hercules 2
#define EGA 3
#define VGA 4
// ***********
// Controllers
// ***********
// AGI menu
#define menu_about c21
#define menu_help c2
// File menu
#define menu_save c3
#define menu_restore c5
#define menu_fileseparator c20
#define menu_restart c7
#define menu_quit c1
// Action menu
#define menu_seeobject c22
#define menu_inventory c10
// Special menu
#define menu_soundonoff c16
#define menu_clock c12
#define menu_joystick c15
#define menu_pause c18
// Speed menu
#define menu_normalspeed c24
#define menu_slowspeed c25
#define menu_fastspeed c23
#define menu_fastestspeed c28
// Keys
#define key_activiate_menu c19
#define key_decreasevolume c26
#define key_increasevolume c27
#define key_clearinputline c17
#define key_echoline c9
#define key_seeobject c4
#define key_debug c14
// *************************
// Other variables/flags/etc
// *************************
#define debug_active f32
#define clock_active f34
#define old_clock_seconds v37
#define ego o0
#define new_ego_x v30
#define new_ego_y v31
#define old_ego_x v32
#define old_ego_y v33
#define old_ego_dir v34
#define never_animate_ego f30
#define always_animate_ego f31
#define death_type v35
#define thankyou_timer v36
#define coords_shown f35
#define num_invobjects 1
// This is the number of inventory objects in game. It is used by the debug
// mode when the player types "gimme gimme". Remember to change this when you
// add more objects.
#define disable_game_functions f33
// Set the flag disable_game_functions to stop the player from using things
// like the menu, inventory and saving/restoring games. This is useful in
// places like the introduction when you don't want these things done. Scenes
// like this could test for have.key (i.e. when the user has pressed a key) to
// be bypassed.
// NOTE: disable_game_functions is currently set before the intro is run.
// Remember to make sure it is reset after the intro (this should be done before
// entering the first room).
#define game_version_message "(game version)"
#define game_about_message "(about message)"

334
template/src/logic0.txt Normal file
View File

@@ -0,0 +1,334 @@
// ****************************************************************************
//
// Logic 0: Main logic
//
// ****************************************************************************
#include "defines.txt"
if (error_code > 0) {
call(98); // error handler - IMPORTANT
}
if (room_no == 0) {
call(91); // initialization
// Put test object to room2:
va=2;
put("test object", va);
if (game_restarted) {
disable.item(menu_fileseparator);
set(menu_enabled);
reset(disable_game_functions);
assignn(score,0);
new.room(2); // go to first room here
}
else {
set.menu("AGI");
set.menu.item("About ", menu_about);
set.menu.item("Help <F1>", menu_help);
set.menu("File");
set.menu.item("Save <F5>", menu_save);
set.menu.item("Restore <F7>", menu_restore);
set.menu.item("-------------", menu_fileseparator);
set.menu.item("Restart <F9>", menu_restart);
set.menu.item("Quit <Alt-Z>", menu_quit);
set.menu("Action");
set.menu.item("See Object <F4>", menu_seeobject);
set.menu.item("Inventory <Tab>", menu_inventory);
set.menu("Special");
set.menu.item("Sound On/Off <F2>", menu_soundonoff);
set.menu.item("Clock On/Off <F6>", menu_clock);
set.menu.item("Joystick <Ctrl J>", menu_joystick);
set.menu.item("Pause <Esc>", menu_pause);
set.menu("Speed");
set.menu.item("Normal ", menu_normalspeed);
set.menu.item("Slow ", menu_slowspeed);
set.menu.item("Fast ", menu_fastspeed);
set.menu.item("Fastest", menu_fastestspeed);
submit.menu();
disable.item(menu_fileseparator);
//set(disable_game_functions);
new.room(1); // intro/opening screen
}
}
if (new_room) { // First interpreter cycle in a new room
// Note: Everything other than logic 0 is discarded
// from memory when new.room is executed
load.logics(90); // Load game specific functions logic into memory // Load game specific functions logic into memory
// Use debug mode?
if (v1!=v1) {
reset(debug_active);
} else {
set(debug_active);
load.logics(99); // debug code
}
clear.lines(24,24,0); // clear bottom line of screen (remove ego's coords if shown)
animate.obj(ego);
load.view.v(ego_view_no);
set.view.v(ego, ego_view_no);
observe.objs(ego);
old_clock_seconds = 255; // make sure clock gets updated this cycle
// on this cycle (if turned on)
}
if (death_type > 0) { // player is dead
if (death_type != 255) { // first cycle since player died. disable
// some menu items and load logic 94 into
// memory as it will be called from now on.
disable.item(menu_about);
disable.item(menu_help);
disable.item(menu_save);
disable.item(menu_pause);
disable.item(menu_soundonoff);
disable.item(menu_seeobject);
disable.item(menu_joystick);
disable.item(menu_normalspeed);
disable.item(menu_fastestspeed);
disable.item(menu_fastspeed);
disable.item(menu_slowspeed);
load.logics(94);
}
call(94); // death handler
goto(End);
}
if (!disable_game_functions) {
if (controller(key_activiate_menu)) {
menu.input();
}
}
if (controller(menu_about)) {
print(game_about_message);
}
if ((controller(menu_fastestspeed) ||
said("fastest") ||
said("fastest", "speed"))) {
cycle_delay = 0; // no delay between interpreter cycles
}
if ((controller(menu_fastspeed) ||
said("fast") ||
said("fast", "speed"))) {
cycle_delay = 1; // 1/20th of a second delay between interpreter cycles
}
if ((controller(menu_normalspeed) ||
said("normal") ||
said("normal", "speed"))) {
cycle_delay = 2; // 2/20ths of a second delay between interpreter cycles
}
if ((controller(menu_slowspeed) ||
said("slow") ||
said("slow", "speed"))) {
cycle_delay = 4; // 4/20ths of a second delay between interpreter cycles
}
if (controller(key_decreasevolume)) {
sound_volume--; // decrease volume
}
if (controller(key_increasevolume) && sound_volume < 15) {
sound_volume++; // increase volume
}
if (controller(menu_soundonoff)) {
toggle(sound_on);
}
if (!disable_game_functions) {
if (!debug_active) {
if (controller(key_debug)) {
set(debug_active);
print(game_version_message);
version();
load.logics(99); // load debug logic into memory
}
}
if ((controller(menu_save) ||
said("save", "game") ||
said("save"))) {
stop.sound();
save.game();
}
if ((controller(menu_restore) ||
said("restore", "game") ||
said("restore"))) {
stop.sound();
restore.game();
}
if ((controller(menu_restart) ||
said("restart", "game") ||
said("restart"))) {
restart.game();
}
if ((controller(menu_help) ||
said("help"))) {
call(92);
}
if (controller(key_echoline)) {
echo.line();
}
if (controller(key_clearinputline)) {
cancel.line();
}
if (controller(menu_joystick)) {
init.joy();
}
if ((controller(menu_pause) ||
said("pause", "game") ||
said("pause"))) {
pause();
}
if ((controller(menu_inventory) ||
said("inventory"))) {
status();
}
if ((controller(menu_seeobject) ||
controller(key_seeobject))) {
set(inventory_select_enabled); // enable choice of inventory item in inventory screen
status(); // show inventory screen - player selects an inventory item
if (selected_inventory_item > 0 &&
selected_inventory_item != 255) { // note: selected_inventory_item is set to 255
// if ESC is pressed in the inventory screen.
// player has chosen an object (value of selected_inventory_item). We now display this object.
if (selected_inventory_item == 1) { // test object
show.obj(220);
}
// NOTE: If you have several objects, it is easier to give them
// consecutive view numbers. Then you can do the following (view
// numbers start at 220 for this example):
// v255 = selected_inventory_item; v255 += 219;
// show.obj.v(v255);
// If you this, you don't have to have separate statements for each
// object.
reset(inventory_select_enabled); // disable choice of inventory item in inventory screen
}
}
if ((controller(menu_quit) ||
said("quit", "game") ||
said("quit"))) {
stop.sound();
quit(0);
}
}
get.posn(ego, new_ego_x, new_ego_y); // get ego's current position
if (ego_dir == old_ego_dir &&
new_ego_x == old_ego_x &&
new_ego_y == old_ego_y) {
// ego hasn't moved or changed direction since last cycle
stop.cycling(ego);
}
else {
if (!never_animate_ego) {
start.cycling(ego);
}
}
old_ego_x = new_ego_x;
old_ego_y = new_ego_y;
old_ego_dir = ego_dir;
if (always_animate_ego) {
start.cycling(ego);
}
else {
if ((ego_dir == stopped || never_animate_ego)) {
stop.cycling(ego);
}
}
if ((said("clock") || controller(menu_clock))) {
toggle(clock_active);
if (!clock_active) {
status.line.on(); // remove clock text from status line
}
else {
old_clock_seconds = 255; // make sure clock gets updated this cycle
}
}
if (clock_active && !disable_game_functions) {
if (old_clock_seconds != clock_seconds) {
set.text.attribute(0,15);
display(0, 18, " %v13:%v12|2:%v11|2 "); // update clock
set.text.attribute(15,0);
old_clock_seconds = clock_seconds;
}
}
if (isset(game_restored)) { // first cycle since restore game executed
clear.lines(23, 24, 0);
reset(debug_active);
disable.item(menu_fileseparator);
}
call.v(room_no); // IMPORTANT: This calls the logic for the current room - this
// is not done automatically by the interpreter so it has to be
// called manually by logic 0. Logic 0 cycles round and on each
// cycle the current room's logic is called, so it is also
// executed with each cycle.
if (debug_active) {
call(99); // debug logic
}
call(90); // game specific functions
if (input_recieved &&
unknown_word_no > 0) {
reset(input_recieved);
if (unknown_word_no == 1) {
print("I don't understand \"%w1\"");
}
if (unknown_word_no == 2) {
print("I don't understand \"%w2\"");
}
if (unknown_word_no == 3) {
print("I don't understand \"%w3\"");
}
}
if (input_recieved &&
!input_parsed) { // no command has been recognised
print("I don't understand your request.");
reset(input_recieved);
}
reset(input_parsed);
End:
return();

30
template/src/logic1.txt Normal file
View File

@@ -0,0 +1,30 @@
// ****************************************************************************
//
// Logic 1: Opening/intro
//
// ****************************************************************************
#include "defines.txt"
if (new_room) {
load.pic(room_no);
draw.pic(room_no);
discard.pic(room_no);
set.horizon(50);
status.line.off();
prevent.input();
program.control();
show.pic();
display(23,1," Intro/Opening screen");
}
if (have.key()) {
set(menu_enabled);
clear.lines(22, 24, 0);
stop.motion(ego);
reset(disable_game_functions);
new.room(2);
}
return();

92
template/src/logic2.txt Normal file
View File

@@ -0,0 +1,92 @@
// ****************************************************************************
//
// Logic 2: First room
//
// ****************************************************************************
#include "defines.txt"
if (new_room) {
load.pic(room_no);
draw.pic(room_no);
discard.pic(room_no);
set.horizon(60);
// The next 6 lines need only be in the first room of the game
if ((prev_room_no == 1 || // just come from intro screen
prev_room_no == 0)) { // or just started game
position(ego,76,90);
status.line.on();
accept.input();
}
load.view(2); // ego in water -view
ignore.objs(ego); // allow ego to walk over objects
// Show test object on the floor if the player hasn't piced it up
if (!has("test object")) {
animate.obj(o2);
load.view(221);
set.view(o2,221);
position(o2,70,130);
set.priority(o2,4); // = floor
draw(o2);
}
// Check what room the player came from and position them on the
// screen accordingly here, e.g:
// if (prev_room_no == 5) {
// position(ego,12,140);
// }
draw(ego);
show.pic();
}
// Change ego's view when on water
if (ego_on_water) {
set.view(ego,2);
}
else {
set.view(ego,0);
}
if (said("look")) {
if (!has("test object")) {
print("This is a test room. There is a test object on the ground.");
} else {
print("This is an empty test room.");
}
}
if (said("get","test object")) {
if (!has("test object")) {
if (center.posn(ego, 64,125, 80,135)) {
get("test object");
erase(o2);
score += 1;
print("Ok. It looks like some kind of text plate.");
} else {
print("It's too far away. Move closer.");
}
} else {
print("You already got it.");
}
}
//if (ego_edge_code == horizon_edge) { // ego touching horizon
// new.room(2);
//}
if (ego_edge_code == right_edge) { // ego touching right edge of screen
new.room(2);
}
if (ego_edge_code == bottom_edge) { // ego touching bottom edge of screen
new.room(2);
}
if (ego_edge_code == left_edge) { // ego touching left edge of screen
new.room(2);
}
return();

74
template/src/logic90.txt Normal file
View File

@@ -0,0 +1,74 @@
// ****************************************************************************
//
// Logic 90: Game-specific functions
//
// You should use this logic to perform any game specific functions, such as
// counting down timers, etc and processing player input related to the game
// (such as examining/using inventory items) and any other things that are
// required in several rooms that you don't want to duplicate in each room.
//
// This logic is called from logic 0, on every cycle.
// If you like, you could only make it called only when disable_game_functions
// is not set.
//
// Sierra did not use a separate logic for all this - they just did it all
// from logic 0. I find it is neater this way, as you can keep your game
// specific processing separate from other system-related things (although
// these may require some modification for your game). Also, this makes logic 0
// easier to manage.
//
// ****************************************************************************
#include "defines.txt"
// put all non-input-reponse game functions here
if (input_recieved &&
unknown_word_no == 0 &&
!input_parsed) {
// put various input responses here
if (said("die")) { // this one should not be in your game - it is
score += 1;
if ( ego_on_water ) {
print("Blub! You drowned.");
erase(ego);
} else {
load.view(1); // only to demostrate the death handler (logic 94)
set.view(ego,1);
}
program.control();
stop.motion(ego);
death_type = 1;
}
if (said("look", "test object")) {
if (has("test object")) {
show.obj(220);
}
else {
print("You don't have it.");
}
}
if ((said("look", "anyword") ||
said("look", "anyword", "anyword"))) {
print("What? Where?");
}
if ((said("get", "anyword") ||
said("get", "anyword", "anyword"))) {
print("You can't get that here!");
}
if ((said("use", "anyword") ||
said("use", "anyword", "anyword"))) {
print("What do you want me to do with it?");
}
}
return();

65
template/src/logic91.txt Normal file
View File

@@ -0,0 +1,65 @@
// ****************************************************************************
//
// Logic 91: Initialization
//
// ****************************************************************************
#include "defines.txt"
// Key settings with set.key are as follows:
// First number:
// 1-26 CTRL-A - CTRL-Z
// 8 - Backspace
// 9 - Tab
// 59-68 F1-F10
//
// There are other keys in the 1-26 range that can be assigned
// Both the CTRL-Letter and that key will be assigned if you do this
// eg. most AGI games use both TAB and CTRL-I for inventory.
//
// Second number:
// 16-25 ALT: Q W E R T Y U I O P
// 30-38 ALT: A S D F G H J K L
// 44-50 ALT: Z X C V B N M
if (new_room) {
trace.info(95, 3, 10);
set.key(0, 59, menu_help); // F1 - Help
set.key(0, 60, menu_soundonoff); // F2 - Sound on/off
set.key(19, 0, menu_soundonoff); // CTRL-S - Sound on/off
set.key(0, 61, key_echoline); // F3 - Echo line
set.key(5, 0, key_echoline); // CTRL-E - Echo line
set.key(0, 62, key_seeobject); // F4 - See object
set.key(0, 63, menu_save); // F5 - Save game
set.key(0, 64, menu_clock); // F6 - Clock on/off
set.key(0, 65, menu_restore); // F7 - Restore game
set.key(0, 67, menu_restart); // F9 - Restart game
set.key(9, 0, menu_inventory); // CTRL-I/TAB - inventory
set.key(0, 32, key_debug); // ALT-D - Enter debug mode
set.key(10, 0, menu_joystick); // CTRL-J - Configure joystick
set.key(3, 0, key_clearinputline); // CTRL-C - Clear input line
set.key(0, 44, menu_quit); // ALT-Z - quit game
set.key(45, 0, key_decreasevolume); // - - decrease volume
set.key(43, 0, key_increasevolume); // + - increase volume
set.key(27, 0, key_activiate_menu); // ESC - activate menu
set(joystick_sensitivity_set);
joystick_sensitivity = 3;
sound_volume = 15; // full volume
//set.game.id("AGI"); // We don't actually need to set the game ID. It's
// best not to, then the game can run on any
// interpreter (provided it's the right version).
configure.screen(1, 22, 0);
set.string(prompt_char, ">");
set.cursor.char("_");
max_score = 2;
cycle_delay = 1; // set speed to fast (delay=1/20ths of a second)
}
return();

38
template/src/logic92.txt Normal file
View File

@@ -0,0 +1,38 @@
// ****************************************************************************
//
// Logic 92: Help screen
//
// ****************************************************************************
#include "defines.txt"
prevent.input();
status.line.off();
text.screen();
key_pressed = 0;
reset(input_parsed);
display(3, 0, " AGI Help");
display(6, 0," F1 displays this message.");
display(7, 0," F2 turns the sound off and on.");
display(8, 0," F3 retypes the last line typed.");
display(9, 0," F5 saves your current game.");
display(10,0," F7 restores a saved game.");
display(11,0," F9 restarts the game.");
display(12,0," ALT-Z quits the game.");
display(13,0," TAB shows the inventory screen.");
display(14,0," ESC pops up menus.");
display(15,0," Ctrl-J sets up your joystick.");
display(16,0," + Increases volume.");
display(17,0," - Decreases volume.");
WaitForKey:
if (!have.key()) {
goto(WaitForKey);
}
accept.input();
status.line.on();
graphics();
set(input_parsed);
return();

47
template/src/logic93.txt Normal file
View File

@@ -0,0 +1,47 @@
// ****************************************************************************
//
// Logic 93: Debug mode help screen
//
// ****************************************************************************
#include "defines.txt"
prevent.input();
status.line.off();
text.screen();
key_pressed = 0;
reset(input_parsed);
display(1, 1, " DEBUG MODE HELP ");
display( 3,0,"trace on - enables tracing ");
display( 4,0," (SCROLL LOCK to activate)");
display( 5,0,"show mem - display memory stats ");
display( 6,0,"tp - teleport ");
display( 7,0,"pos - change ego's position ");
display( 8,0,"show var - display value of a var ");
display( 9,0,"set var - change value of a var ");
display(10,0,"show flag - display status of a flag ");
display(11,0,"set flag - set a flag ");
display(12,0,"reset flag - reset (clear) a flag ");
display(13,0,"object - display information about");
display(14,0," a screen object ");
display(15,0,"show pri - display priority screen ");
display(16,0,"get object - get any inventory object ");
display(17,0,"gimme gimme - get all inventory objects");
display(18,0,"object room - display room number of ");
display(19,0," an inventory object ");
display(20,0,"set pri - set ego's priority ");
display(21,0,"release pri - release ego's priority ");
display(22,0,"coords - ego's coordinates on/off ");
WaitForKey:
if (!have.key()) {
goto(WaitForKey);
}
accept.input();
status.line.on();
graphics();
set(input_parsed);
return();

73
template/src/logic94.txt Normal file
View File

@@ -0,0 +1,73 @@
// ****************************************************************************
//
// Logic 94: Death handler
// This logic is run when the player dies.
// The death message displayed depends on the value of death_type.
//
// ****************************************************************************
#include "defines.txt"
if (death_type != 255) { // if death_type = 255, the death message has
// already been displayed
accept.input();
cancel.line();
program.control();
clear.lines(23, 24, 0);
thankyou_timer = 12;
if (death_type == 1) {
print("You are now dead.");
}
// add messages for other death types here
death_type = 255; // set death_type to 255 so this logic does not display
// the death message again
}
thankyou_timer--;
if (thankyou_timer == 1) {
print("Thank you for playing this game. Better luck next time!");
}
if (controller(key_activiate_menu)) {
menu.input();
}
if ((controller(menu_help) ||
said("help"))) {
call(92);
}
if ((controller(menu_restore) ||
said("restore", "game") ||
said("restore"))) {
restore.game();
}
if ((controller(menu_restart) ||
said("restart", "game") ||
said("restart"))) {
restart.game();
}
if ((controller(menu_inventory) ||
said("inventory"))) {
status();
}
if ((controller(menu_quit) ||
said("quit"))) {
stop.sound();
quit(0);
}
if (input_recieved &&
!input_parsed) {
print("You are dead! You can only restore, restart, quit the game"
" or view your inventory.");
}
return();

190
template/src/logic95.txt Normal file
View File

@@ -0,0 +1,190 @@
return();
// Messages (all messages are here)
#message 1 "increment"
#message 2 "decrement"
#message 3 "assignn"
#message 4 "assignv"
#message 5 "addn"
#message 6 "addv"
#message 7 "subn"
#message 8 "subv"
#message 9 "lindirectv"
#message 10 "rindirect"
#message 11 "lindirectn"
#message 12 "set"
#message 13 "reset"
#message 14 "toggle"
#message 15 "set.v"
#message 16 "reset.v"
#message 17 "toggle.v"
#message 18 "new.room"
#message 19 "new.room.v"
#message 20 "load.logics"
#message 21 "load.logics.v"
#message 22 "call"
#message 23 "call.v"
#message 24 "load.pic"
#message 25 "draw.pic"
#message 26 "show.pic"
#message 27 "discard.pic"
#message 28 "overlay.pic"
#message 29 "show.pri.screen"
#message 30 "load.view"
#message 31 "load.view.v"
#message 32 "discard.view"
#message 33 "animate.obj"
#message 34 "unanimate.all"
#message 35 "draw"
#message 36 "erase"
#message 37 "position"
#message 38 "position.v"
#message 39 "get.posn"
#message 40 "reposition"
#message 41 "set.view"
#message 42 "set.view.v"
#message 43 "set.loop"
#message 44 "set.loop.v"
#message 45 "fix.loop"
#message 46 "release.loop"
#message 47 "set.cel"
#message 48 "set.cel.v"
#message 49 "last.cel"
#message 50 "current.cel"
#message 51 "current.loop"
#message 52 "current.view"
#message 53 "number.of.loops"
#message 54 "set.priority"
#message 55 "set.priority.v"
#message 56 "release.priority"
#message 57 "get.priority"
#message 58 "stop.update"
#message 59 "start.update"
#message 60 "force.update"
#message 61 "ignore.horizon"
#message 62 "observe.horizon"
#message 63 "set.horizon"
#message 64 "object.on.water"
#message 65 "object.on.land"
#message 66 "object.on.anything"
#message 67 "ignore.objs"
#message 68 "observe.objs"
#message 69 "distance"
#message 70 "stop.cycling"
#message 71 "start.cycling"
#message 72 "normal.cycle"
#message 73 "end.of.loop"
#message 74 "reverse.cycle"
#message 75 "reverse.loop"
#message 76 "cycle.time"
#message 77 "stop.motion"
#message 78 "start.motion"
#message 79 "step.size"
#message 80 "step.time"
#message 81 "move.obj"
#message 82 "move.obj.v"
#message 83 "follow.ego"
#message 84 "wander"
#message 85 "normal.motion"
#message 86 "set.dir"
#message 87 "get.dir"
#message 88 "ignore.blocks"
#message 89 "observe.blocks"
#message 90 "block"
#message 91 "unblock"
#message 92 "get"
#message 93 "get.v"
#message 94 "drop"
#message 95 "put"
#message 96 "put.v"
#message 97 "get.room.v"
#message 98 "load.sound"
#message 99 "sound"
#message 100 "stop.sound"
#message 101 "print"
#message 102 "print.v"
#message 103 "display"
#message 104 "display.v"
#message 105 "clear.lines"
#message 106 "text.screen"
#message 107 "graphics"
#message 108 "set.cursor.char"
#message 109 "set.text.attribute"
#message 110 "shake.screen"
#message 111 "configure.screen"
#message 112 "status.line.on"
#message 113 "status.line.off"
#message 114 "set.string"
#message 115 "get.string"
#message 116 "word.to.string"
#message 117 "parse"
#message 118 "get.num"
#message 119 "prevent.input"
#message 120 "accept.input"
#message 121 "set.key"
#message 122 "add.to.pic"
#message 123 "add.to.pic.v"
#message 124 "status"
#message 125 "save.game"
#message 126 "restore.game"
#message 127 "init.disk"
#message 128 "restart.game"
#message 129 "show.obj"
#message 130 "random"
#message 131 "program.control"
#message 132 "player.control"
#message 133 "obj.status.v"
#message 134 "quit"
#message 135 "show.mem"
#message 136 "pause"
#message 137 "echo.line"
#message 138 "cancel.line"
#message 139 "init.joy"
#message 140 "toggle.monitor"
#message 141 "version"
#message 142 "script.size"
#message 143 "set.game.id"
#message 144 "log"
#message 145 "set.scan.start"
#message 146 "reset.scan.start"
#message 147 "reposition.to"
#message 148 "reposition.to.v"
#message 149 "trace.on"
#message 150 "trace.info"
#message 151 "print.at"
#message 152 "print.at.v"
#message 153 "discard.view.v"
#message 154 "clear.text.rect"
#message 155 "set.upper.left"
#message 156 "set.menu"
#message 157 "set.menu.item"
#message 158 "submit.menu"
#message 159 "enable.item"
#message 160 "disable.item"
#message 161 "menu.input"
#message 162 "show.obj.v"
#message 163 "open.dialogue"
#message 164 "close.dialogue"
#message 165 "mul.n"
#message 166 "mul.v"
#message 167 "div.n"
#message 168 "div.v"
#message 169 "close.window"
#message 221 "equaln"
#message 222 "equalv"
#message 223 "lessn"
#message 224 "lessv"
#message 225 "greatern"
#message 226 "greaterv"
#message 227 "isset"
#message 228 "isset.v"
#message 229 "has"
#message 230 "obj.in.room"
#message 231 "posn"
#message 232 "controller"
#message 233 "have.key"
#message 234 "said"
#message 235 "compare.strings"
#message 236 "obj.in.box"
#message 237 "center.posn"
#message 238 "right.posn"

36
template/src/logic98.txt Normal file
View File

@@ -0,0 +1,36 @@
print.v(v17);
quit(1);
return();
// Messages (all messages are here)
#message 1 "discard.view(%v18):%m30"
#message 2 "set.view(%v18,_):%m26"
#message 3 "set.view(_,%v18):%m30"
#message 4 "set.loop(%v18,_):%m26"
#message 5 "set.loop(%v18,_):\nBad loop #.%m25"
#message 6 "set.loop(%v18,_):%m31"
#message 7 "set.cel(%v18,_):%m26"
#message 8 "set.cel(%v18,_):\nBad cel #.%m25"
#message 9 "sound(%v18):\nSound not loaded.%m25"
#message 10 "set.cel(%v18,_):%m31"
#message 11 "Script buffer overflow.\nMaximum size = %v18%m25"
#message 12 "erase(%v18):%m26"
#message 13 "animate.obj(%v18):%m26"
#message 14 "stop.update(%v18):%m28"
#message 15 "Bad test: %v18%m25"
#message 16 "Bad action: %v18%m25"
#message 17 "start.update(%v18):%m28"
#message 18 "draw.pic(%v18):%m32"
#message 19 "draw(%v18):%m26"
#message 20 "draw(%v18):%m31"
#message 21 "discard.pic(%v18):%m32"
#message 22 ""
#message 23 "get(%v18) or put(%v18):%m26"
#message 25 "\nPress ESC to quit."
#message 26 "%m27.%m25"
#message 27 "\nBad object number"
#message 28 "%m27 or object not drawn.%m25"
#message 29 "\nView not "
#message 30 "%m29loaded.%m25"
#message 31 "%m29set.%m25"
#message 32 "Picture not loaded.%m25"

135
template/src/logic99.txt Normal file
View File

@@ -0,0 +1,135 @@
// ****************************************************************************
//
// Logic 99: Debug mode
//
// ****************************************************************************
#include "defines.txt"
if (said("debug", "help")) {
call(93);
}
if (said("trace", "on")) {
set(trace_enabled);
}
if (said("show", "mem")) {
show.mem();
}
if (said("tp")) {
get.num("new room: ", v255);
new.room.v(v255);
}
if (said("pos")) {
get.num("x: ", v254);
get.num("y: ", v255);
erase(ego);
reposition.to.v(ego, v254, v255);
draw(ego);
}
if (said("show", "var")) {
get.num("var number: ", v255);
v254 = *v255;
print("var %v255: %v254");
}
if (said("set", "var")) {
get.num("var number: ", v254);
get.num("var value: ", v255);
*v254 = v255;
}
if (said("show", "flag")) {
get.num("flag number: ", v255);
if (issetv(v255)) {
print("flag %v255 is set");
}
else {
print("flag %v255 is not set");
}
}
if (said("set", "flag")) {
get.num("flag number: ", v255);
set.v(v255);
}
if (said("reset", "flag")) {
get.num("flag number: ", v255);
reset.v(v255);
}
if (said("object")) {
get.num("object #: ", v255);
obj.status.v(v255);
}
if (said("show", "pri")) {
show.pri.screen();
}
if (said("get", "object")) {
get.num("object number: ", v255);
if (v255 > num_invobjects) {
print("Invalid object number!");
}
else {
get.v(v255);
}
}
if (said("gimme", "gimme")) {
print("You gottum!");
v255 = 0;
GetNextObject:
get.v(v255);
if (v255 < num_invobjects) {
v255++;
goto(GetNextObject);
}
}
if (said("object", "room")) {
get.num("Object number: ", v255);
if (v255 > num_invobjects) {
print("Invalid object number!");
}
else {
get.room.v(v255,v254);
if (v254 == 255) {
print("Object %v255 is in your inventory.");
}
else {
print("Object %v255 is in room %v254.");
}
}
}
if (said("set", "pri")) {
get.num("New priority: ",v255);
set.priority.v(ego,v255);
}
if (said("release", "pri")) {
release.priority(ego);
}
if (said("coords")) {
toggle(coords_shown);
if (!coords_shown) {
clear.lines(24,24,0);
}
}
if (coords_shown) {
get.posn(ego, v253, v254);
get.priority(ego,v255);
display(23,15,"Rm %v0|3 Pri %v255|2 x:%v253|3 y:%v254|3");
}
return();

35
template/src/newroom.txt Normal file
View File

@@ -0,0 +1,35 @@
// ****************************************************************************
//
// Logic *: new room
//
// ****************************************************************************
#include "defines.txt"
if (new_room) {
load.pic(room_no);
draw.pic(room_no);
discard.pic(room_no);
set.horizon(50);
// Check what room the player came from and position them on the
// screen accordingly here, e.g:
// if (prev_room_no == 5) {
// position(ego,12,140);
// }
draw(ego);
show.pic();
}
if (said("look")) {
print("This is an empty room.");
}
if (ego_edge_code == horizon_edge) { // ego touching horizon
new.room(2);
}
if (ego_edge_code == right_edge) { // ego touching right edge of screen
new.room(2);
}
if (ego_edge_code == bottom_edge) { // ego touching bottom edge of screen
new.room(2);
}
if (ego_edge_code == left_edge) { // ego touching left edge of screen
new.room(2);
}
return();

BIN
template/viewdir Normal file

Binary file not shown.

BIN
template/vol.0 Normal file

Binary file not shown.

BIN
template/words.tok Normal file

Binary file not shown.