Frame 1
function makepercent(n, min, max) {
return(Math.floor(((n - min) / (max - min)) * 100));
}
contextmenu = new ContextMenu();
contextmenu.hideBuiltInItems();
_root.menu = contextmenu;
var loadin = 1;
this.onEnterFrame = function () {
if (loadin) {
var _local2 = makepercent(_root.getBytesLoaded(), 0, _root.getBytesTotal());
_root.percent.text = _local2 + "%";
if (_local2 == 100) {
loadin = 0;
_root.gotoAndStop("load");
}
}
};
this.stop();
Frame 2
this.prevFrame();
Frame 10
function gstate_transition(gstate, gaction) {
switch (gstate) {
case "enterpool" :
return("swim");
case "exitpool" :
return("swimsuit");
case "enterexitbed" :
if (gaction == "walkE") {
return("bed");
}
return("");
}
return(gstate);
}
function nomovement_transition(gstate) {
switch (gstate) {
case "enterpool" :
return(1);
case "exitpool" :
return(1);
case "enterexitbed" :
return(1);
}
return(0);
}
function lock_bedroom(v) {
var _local2 = world_interactA[50][9];
var _local1 = world_interactA[50][10];
_local2.sprite = 0;
_local1.sprite = 0;
if (v == "goingswimming") {
_local2.locktxt = "(I should change into my swimsuit first.)";
_local1.locktxt = "(I should change into my swimsuit first.)";
_local2.propval = "";
_local1.propval = "";
} else if (v == "goingout") {
_local2.locktxt = "(I'm not going swimming.)";
_local1.locktxt = "(I'm not going swimming.)";
_local2.propval = "swimsuit";
_local1.propval = "swimsuit";
} else if (v == "goingoutsp") {
_local2.locktxt = "I'm not going swimming.";
_local1.locktxt = "I'm not going swimming.";
_local2.propval = "swimsuit";
_local1.propval = "swimsuit";
_local2 = world_interactA[72][9];
_local1 = world_interactA[72][10];
_local2.sprite = -1;
_local1.sprite = -1;
} else {
_local2.sprite = -1;
_local1.sprite = -1;
}
}
function lock_herhouse(v) {
world_interactA[46][34].lock = v;
}
function lock_herroom(v) {
if (v == "clothes") {
world_interactA[71][21].locktxt = "Sure you don't want to put on your clothes first?";
world_interactA[71][22].locktxt = "Sure you don't want to put on your clothes first?";
return(undefined);
}
world_interactA[71][21].lock = v;
world_interactA[71][22].lock = v;
}
function change_clocks(t) {
t = t.split(",");
world_sprites[0][0].hour = Number(t[0]);
world_sprites[0][0].minute = Number(t[1]);
}
function pool_wait(v) {
if (v) {
world_interactA[34][33] = {lock:1, locktxt:"(I think I'll wait a bit longer.)"};
} else {
world_interactA[34][33] = undefined;
createarea();
}
}
function too_complex() {
world_sprites[1][0].state = 30;
world_sprites[0][0].gaction = "standE";
createarea();
world_sprites[0][0].live = 0;
}
function too_complex2() {
world_sprites[0][0].gaction = "standE";
createarea();
world_sprites[0][0].live = 0;
}
function too_complex3() {
change_clocks("8,6");
lock_herroom(1);
world_sprites[0][0].gstate = "nude";
world_sprites[1][0].gstate = "nude";
createarea();
}
function lights_off() {
_root.overlay.mc.play();
world_sprites[0][0].gaction = "standW";
world_sprites[3][0].state = 9;
createarea();
world_sprites[0][0].live = 0;
}
function lights_on() {
_root.overlay.mc.gotoAndStop(1);
}
function gameinit(lvl) {
if (design) {
backup_tilesA = copyarr(world_tilesA);
backup_tilesB = copyarr(world_tilesB);
} else {
backup_interactA = copyarr(world_interactA);
backup_interactB = copyarr(world_interactB);
}
bgaud.setVolume(100);
timer = 0;
backup_sprites = copyarr(world_sprites);
gamep = {state:"playing", fcount:0, tcount:0, fpt:6, fps:60, snd:""};
gamep.tps = Math.round(gamep.fps / gamep.fpt);
frameon("game");
_root.fg._xscale = tilep.zoom;
_root.fg._yscale = tilep.zoom;
_root.overlay.gotoAndStop("game");
_root.overlay.spc.gotoAndStop(3);
if (!design) {
cam(2, 0);
}
createarea();
playerzone_check();
}
function gameexit() {
gamep.state = "exiting";
if (design) {
world_tilesA = copyarr(backup_tilesA);
world_tilesB = copyarr(backup_tilesB);
} else {
world_interactA = copyarr(backup_interactA);
world_interactB = copyarr(backup_interactB);
}
world_sprites = copyarr(backup_sprites);
}
function superexit() {
frameon("menu");
}
function simulation() {
snd_fade();
if (gamep.state == "text") {
textcontrol();
} else if (gamep.state == "cutscene") {
if (_root.overlay.mc._currentframe == _root.overlay.mc._totalframes) {
finishcutscene();
snd_initfade("bgaud", 0, 1, 100);
}
}
if (gamep.state != "playing") {
return(undefined);
}
pdelay();
gamep.fcount = (((gamep.fcount + 1) == gamep.fpt) ? 0 : (gamep.fcount + 1));
if (gamep.fcount != 0) {
return(undefined);
}
gamep.tcount++;
var _local3 = 0;
while (_local3 < ref_sprites.length) {
var _local2 = ref_sprites[_local3];
var _local4 = world_sprites[_local2][0];
if (!_local4.live) {
} else {
_local4.ganim = _root.fg.sorted["s" + _local2].mc.mc._currentframe;
if (_local2 == 0) {
player();
} else {
npc(_local2);
}
if (gamep.state != "playing") {
return(undefined);
}
}
_local3++;
}
}
function npc(id) {
var _local3 = world_sprites[id][0];
var _local1 = world_sprites[id][_local3.state];
if (_local1.statejump) {
update_mainstate(_local3, _local1);
movesprite(id);
} else if (_local1.dir != undefined) {
update_gstate(id, _local1);
var _local6 = world_sprites[id][_local3.state + 1];
var _local4 = _local1.dir;
var _local5 = 0;
if ((_local4 == "u") || (_local4 == "d")) {
if (_local3.ty == _local6.ty) {
_local5 = 1;
}
} else if (_local3.tx == _local6.tx) {
_local5 = 1;
}
if (_local5) {
_local3.state++;
update_gstate(id, _local6);
movesprite(id);
playerzone_check();
return(undefined);
}
if ((_local4 == "u") || (_local4 == "d")) {
var _local8 = ((_local4 == "u") ? "d" : "u");
} else {
var _local8 = ((_local4 == "l") ? "r" : "l");
}
var _local7 = checktileto(_local4, _local8, id);
if (_local7 != 0) {
preparespritemove(id, _local1.spd, _local7);
if (_local1.spd != undefined) {
_local3.spd = _local1.spd;
}
}
} else {
update_gstate(id, _local1);
movesprite(id);
}
}
function player_statejump() {
var _local2 = 0;
var _local1 = world_sprites[_local2][0];
var _local3 = world_sprites[_local2][_local1.state];
if (_local3.statejump) {
update_mainstate(_local1, _local3);
if ((((_local1.tx < tilearea.xMin) || (_local1.tx >= tilearea.xMax)) || (_local1.ty < tilearea.yMin)) || (_local1.ty >= tilearea.yMax)) {
cam(Math.floor((_local1.tx * tilep.w) / Stage.width), Math.floor((_local1.ty * tilep.h) / Stage.height));
} else {
movesprite(_local2);
}
}
}
function player() {
var _local6 = 0;
var _local2 = world_sprites[_local6][0];
if ((((_local2.tx < tilearea.xMin) || (_local2.tx >= tilearea.xMax)) || (_local2.ty < tilearea.yMin)) || (_local2.ty >= tilearea.yMax)) {
cam(Math.floor((_local2.tx * tilep.w) / Stage.width), Math.floor((_local2.ty * tilep.h) / Stage.height));
}
var _local3 = interact_check();
if (_local3 != -1) {
_root.overlay.spc.gotoAndStop(1);
if (clicks.space == 1) {
clicks.space = 2;
if (_local3.id != undefined) {
var _local4 = world_sprites[_local3.id][0];
var _local5 = world_sprites[_local3.id][_local4.state];
}
if (_local5.taction || (_local5.tstate)) {
if (_local5.taction == "face") {
switch (_local2.gaction) {
case "standN" :
_local4.gaction = "standS";
break;
case "standS" :
_local4.gaction = "standN";
break;
case "standE" :
_local4.gaction = "standW";
break;
case "standW" :
_local4.gaction = "standE";
}
} else if (_local5.taction) {
_local4.gaction = _local5.taction;
}
movesprite(_local3.id);
}
var _local11 = performaction(world_text[_local3.txt]);
if (_local5.touchskip) {
_local4.state++;
}
if (_local11) {
return(undefined);
}
if (_local3.tx != undefined) {
var _local9 = (_local2.l ? ((("bx" + _local3.tx) + "y") + _local3.ty) : ((("ax" + _local3.tx) + "y") + _local3.ty));
_root.fg.sorted[_local9].mc.play();
}
return(undefined);
}
} else {
_root.overlay.spc.gotoAndStop(3);
if (clicks.space == 1) {
clicks.space = 2;
}
}
if (clicks.up) {
clicks.up = 2;
var _local8 = "u";
var _local10 = "d";
_local2.gaction = "walkN";
} else if (clicks.down) {
clicks.down = 2;
var _local8 = "d";
var _local10 = "u";
_local2.gaction = "walkS";
} else if (clicks.left) {
clicks.left = 2;
var _local8 = "l";
var _local10 = "r";
_local2.gaction = "walkW";
} else if (clicks.right) {
clicks.right = 2;
var _local8 = "r";
var _local10 = "l";
_local2.gaction = "walkE";
} else {
changestand(_local6);
}
if (_local8) {
var _local7 = checktileto(_local8, _local10, _local6);
if (_local7 != 0) {
_root.overlay.spc.gotoAndStop(3);
preparespritemove(_local6, undefined, _local7);
} else {
changestand(_local6);
}
}
}
function changestand(id) {
var _local1 = world_sprites[id][0];
switch (_local1.gaction) {
case "walkN" :
_local1.gaction = "standN";
break;
case "walkS" :
_local1.gaction = "standS";
break;
case "walkE" :
_local1.gaction = "standE";
break;
case "walkW" :
_local1.gaction = "standW";
break;
}
movesprite(id);
}
function finishcutscene() {
_root.overlay.gotoAndStop("game");
_root.overlay.spc.gotoAndStop(3);
gamep.state = "playing";
clicks.up = 0;
clicks.down = 0;
clicks.left = 0;
clicks.right = 0;
clicks.space = 2;
}
function interact_check() {
var _local9 = 0;
var _local5 = world_sprites[_local9][0];
if ((_local5.gaction == "standN") || (_local5.gaction == "standS")) {
var _local6 = {tx:_local5.tx};
_local6.ty = ((_local5.gaction == "standN") ? (_local5.ty - 1) : (_local5.ty + 1));
var _local10 = ((_local5.gaction == "standN") ? "u" : "d");
var _local8 = ((_local10 == "d") ? "u" : "d");
var _local13 = ((_local10 == "d") ? "standN" : "standS");
} else {
var _local6 = {ty:_local5.ty};
_local6.tx = ((_local5.gaction == "standW") ? (_local5.tx - 1) : (_local5.tx + 1));
var _local10 = ((_local5.gaction == "standW") ? "l" : "r");
var _local8 = ((_local10 == "r") ? "l" : "r");
var _local13 = ((_local10 == "r") ? "standW" : "standE");
}
var _local4 = 0;
while (_local4 < ref_sprites.length) {
var _local1 = ref_sprites[_local4];
if (_local1 == _local9) {
} else {
var _local2 = world_sprites[_local1][0];
if (((!_local2.live) || (_local2.tx != _local6.tx)) || (_local2.ty != _local6.ty)) {
} else {
var _local3 = world_sprites[_local1][_local2.state];
if (_local3.touchx != undefined) {
return({txt:_local3.touchx, id:_local1});
}
if (_local3["touch" + _local8] != undefined) {
var _local7 = _local3["touch" + _local8];
return({txt:_local7, id:_local1});
}
}
}
_local4++;
}
tlon = (_local5.l ? (world_interactB[_local6.tx][_local6.ty]) : (world_interactA[_local6.tx][_local6.ty]));
if (tlon.touch != undefined) {
return({txt:tlon.touch, tx:_local6.tx, ty:_local6.ty});
}
var tlon = (_local5.l ? (world_interactB[_local5.tx][_local5.ty]) : (world_interactA[_local5.tx][_local5.ty]));
if (tlon.touch != undefined) {
return({txt:tlon.touch, tx:_local5.tx, ty:_local5.ty});
}
return(-1);
}
function playerzone_check() {
var _local2 = world_sprites[0][0];
if (_local2.turnarrive != 0) {
return(undefined);
}
var _local4 = 0;
for ( ; _local4 < ref_sprites.length ; _local4++) {
var _local3 = ref_sprites[_local4];
var _local5 = world_sprites[_local3][0];
var _local1 = world_sprites[_local3][_local5.state];
if (_local1.pa == undefined) {
} else if ((_local1.pdelay != undefined) && (_local2.pdelay > -1)) {
} else if ((_local1.pxmin == undefined) || ((((_local1.pxmin <= _local2.tx) && (_local1.pxmax >= _local2.tx)) && (_local1.pymin <= _local2.ty)) && (_local1.pymax >= _local2.ty))) {
if (_local1.pdelay != undefined) {
if (_local2.pdelay == -1) {
_local2.pdelay = timer + (_local1.pdelay * gamep.fps);
_local2.psprite = _local3;
continue;
}
if (_local2.pdelay == -2) {
_local2.pdelay = -1;
}
}
var _local6 = world_text[_local1.pa];
changestand(0);
_local5.state++;
performaction(_local6);
}
}
}
function pdelay() {
var _local1 = world_sprites[0][0];
if (_local1.pdelay < 0) {
return(undefined);
}
if (timer >= _local1.pdelay) {
var _local3 = world_sprites[_local1.psprite][0];
var _local2 = world_sprites[_local1.psprite][_local3.state];
if ((_local2.pxmin == undefined) || ((((_local2.pxmin <= _local1.tx) && (_local2.pxmax >= _local1.tx)) && (_local2.pymin <= _local1.ty)) && (_local2.pymax >= _local1.ty))) {
var _local4 = world_text[_local2.pa];
changestand(0);
_local3.state++;
performaction(_local4);
_local1.pdelay = -1;
playerzone_check();
return(undefined);
}
_local1.pdelay = -2;
}
}
function performaction(sub) {
var _local3 = typeof(sub);
if (sub instanceof Array) {
gamep.state = "text";
_root.overlay.gotoAndStop("text");
var _local4 = copyarr(sub);
text_end = _local4.shift();
text_text = copyarr(_local4);
text_on = 0;
updatetext();
clicks.left = 2;
clicks.right = 2;
clicks.space = 2;
return(1);
}
if (_local3 == "object") {
if (sub.sprite != undefined) {
var _local5 = world_sprites[sub.sprite][0];
var _local6 = sub["propval" + _local5[sub.propname]];
var _local7 = ((_local6 == undefined) ? (sub.propval) : (_local6));
_local5[sub.propname] = _local7;
}
if (sub.func) {
_root[sub.func](sub.funcpass);
}
if (sub.cut) {
gamep.state = "cutscene";
snd_initfade("bgaud", 0, 1, 0);
_root.overlay.gotoAndStop(sub.cut);
return(1);
}
if (sub.propname == "state") {
playerzone_check();
}
finishcutscene();
} else if (_local3 == "string") {
} else if (_local3 == "number") {
finishcutscene();
}
}
function textcontrol() {
var _local1 = text_on;
if (clicks.space == 1) {
clicks.space = 2;
if (text_on == (text_text.length - 1)) {
performaction(text_end);
clicks.up = 0;
clicks.down = 0;
clicks.left = 0;
clicks.right = 0;
clicks.space = 2;
return(undefined);
}
}
if (clicks.right == 1) {
_local1++;
clicks.right = 2;
}
if (clicks.left == 1) {
_local1--;
clicks.left = 2;
}
if (((_local1 != text_on) && (_local1 > -1)) && (_local1 < text_text.length)) {
text_on = _local1;
updatetext();
}
}
function updatetext() {
var _local5 = ((text_on == 0) ? 2 : 1);
var _local2 = text_on == (text_text.length - 1);
var _local4 = (_local2 ? 2 : 1);
var _local3 = (_local2 ? 1 : 2);
_root.overlay.lft.gotoAndStop(_local5);
_root.overlay.rght.gotoAndStop(_local4);
_root.overlay.spc.gotoAndStop(_local3);
_root.overlay.txt.text = text_text[text_on];
}
function update_gstate(id, dub) {
var _local2 = world_sprites[id][0];
if (dub.gchar) {
_local2.gchar = dub.gchar;
}
if (dub.gstate) {
_local2.gstate = dub.gstate;
}
if (dub.gaction) {
_local2.gaction = dub.gaction;
}
}
function exportworld() {
var _local1 = "";
var _local2 = new Date();
_local1 = _local1 + ((((((((("//" + _local2.getFullYear()) + "/") + (_local2.getMonth() + 1)) + "/") + _local2.getDate()) + " ") + _local2.getHours()) + ":") + _local2.getMinutes());
_local1 = _local1 + newline;
_local1 = _local1 + (("world_txtA = \"" + exporttiles(world_tilesA)) + "\";");
_local1 = _local1 + newline;
_local1 = _local1 + (("world_txtB = \"" + exporttiles(world_tilesB)) + "\";");
_local1 = _local1 + newline;
_local1 = _local1 + "world_tilesA = importtiles(world_txtA);";
_local1 = _local1 + newline;
_local1 = _local1 + "world_tilesB = importtiles(world_txtB);";
trace(_local1);
}
function exportvar(nam, val, multi) {
var _local3 = nam + " = ";
if (multi) {
_local3 = _local3 + "new Array();\r";
var _local1 = 0;
while (_local1 < val.length) {
_local3 = _local3 + (((((((nam + "[") + _local1) + "]") + " = ") + exportarray(val[_local1])) + ";") + newline);
_local1++;
}
return(_local3);
}
var _local5 = typeof(val);
if (val instanceof Array) {
_local3 = _local3 + exportarray(val);
} else if (_local5 == "object") {
_local3 = _local3 + exportobject(val);
} else if (_local5 == "string") {
_local3 = _local3 + (("\"" + val) + "\"");
} else if (_local5 == "number") {
_local3 = _local3 + val;
}
_local3 = _local3 + ";";
return(_local3);
}
function exportarray(arr, kill) {
var _local3 = "[";
var _local1 = 0;
while (_local1 < arr.length) {
var _local4 = typeof(arr[_local1]);
if (arr[_local1] == undefined) {
_local3 = _local3 + (kill ? "" : ",0");
} else {
if (_local1) {
_local3 = _local3 + ", ";
}
if (arr[_local1] instanceof Array) {
_local3 = _local3 + exportarray(arr[_local1]);
} else if (_local4 == "object") {
_local3 = _local3 + exportobject(arr[_local1]);
} else if (_local4 == "string") {
_local3 = _local3 + (("\"" + arr[_local1]) + "\"");
} else if (_local4 == "number") {
_local3 = _local3 + arr[_local1];
}
}
_local1++;
}
_local3 = _local3 + "]";
if (_local3 == "[]") {
_local3 = "0";
}
return(_local3);
}
function exportobject(obj) {
var _local2 = "{";
var _local4 = 0;
for (var _local5 in obj) {
if (_local4) {
_local2 = _local2 + ", ";
}
var _local3 = typeof(obj[_local5]);
if (obj[_local5] == undefined) {
_local2 = _local2 + ((_local5 + ":") + 0);
} else if (_local3 == "string") {
_local2 = _local2 + (((_local5 + ":\"") + obj[_local5]) + "\"");
} else if (_local3 == "number") {
_local2 = _local2 + ((_local5 + ":") + obj[_local5]);
}
_local4++;
}
_local2 = _local2 + "}";
return(_local2);
}
function importarray(txt) {
var _local4 = new Array();
txt = txt.slice(1, -1);
while (true) {
var _local6 = txt.charAt(0);
if (_local6 == "[") {
var _local2 = 1;
var _local7 = 1;
while (true) {
_local7 = txt.indexOf("]", _local7);
_local2 = txt.indexOf("[", _local2);
if ((_local2 == -1) || (_local2 > _local7)) {
break;
}
_local2++;
_local7++;
}
_local7++;
var _local8 = txt.slice(0, _local7);
_local4.push(importarray(_local8));
txt = txt.slice(_local7);
} else if (_local6 == "{") {
var _local7 = txt.indexOf("}") + 1;
_local4.push(importobject(txt.slice(0, _local7)));
txt = txt.slice(_local7);
} else {
_local4 = txt.split(", ");
var _local3 = 0;
while (_local3 < _local4.length) {
var _local5 = Number(_local4[_local3]);
if (!isNaN(_local5)) {
_local4[_local3] = _local5;
}
_local3++;
}
}
if (txt.charAt(0) == ",") {
txt = txt.slice(2);
continue;
}
return(_local4);
}
}
function importobject(txt) {
var _local5 = new Object();
txt = txt.slice(1, -1);
var _local4 = txt.split(", ");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local1 = _local4.split(":");
var _local3 = ((_local1[1].charAt(0) == "\"") ? (_local1[1].slice(1, -1)) : (Number(_local1[_local2])));
_local5[_local1[0]] = _local3;
_local2++;
}
return(_local5);
}
function copyarr(arr) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < arr.length) {
var _local2 = arr[_local1];
if (_local2 instanceof Array) {
var _local5 = copyarr(arr[_local1]);
_local4.push(_local5);
} else if (typeof(_local2) == "object") {
var _local5 = copyob(arr[_local1]);
_local4.push(_local5);
} else {
_local4.push(_local2);
}
_local1++;
}
return(_local4);
}
function copyob(ob) {
var _local2 = new Object();
for (var _local3 in ob) {
_local2[_local3] = ob[_local3];
}
return(_local2);
}
function importtiles(txt) {
txt = txt.split(",");
var _local6 = new Array();
var _local5 = 0;
var _local2 = 0;
_local6[_local5] = new Array();
var _local4 = 0;
while (_local4 < txt.length) {
if (txt[_local4] == "br") {
_local5++;
_local6[_local5] = new Array();
_local2 = 0;
} else {
var _local1 = txt[_local4].split("x");
if (_local1.length == 0) {
} else if (_local1.length == 1) {
_local6[_local5][_local2] = Number(_local1[0]);
_local2++;
} else {
_local1[0] = Number(_local1[0]);
_local1[1] = Number(_local1[1]);
if (_local1[0] == 0) {
_local2 = _local2 + _local1[1];
} else {
var _local3 = 0;
while (_local3 < _local1[1]) {
_local6[_local5][_local2] = _local1[0];
_local2++;
_local3++;
}
}
}
}
_local4++;
}
return(_local6);
}
function exporttiles(arr) {
var _local2 = "";
var _local3 = 0;
var _local4 = 0;
var _local6 = 0;
while (_local6 < arr.length) {
if (_local6 != 0) {
if (_local3 != 0) {
_local2 = _local2 + ((_local2.length == 0) ? "" : ",");
_local2 = _local2 + ((_local4 > 1) ? ((_local3 + "x") + _local4) : (_local3));
}
_local2 = _local2 + ((_local2.length == 0) ? "" : ",");
_local2 = _local2 + "br";
_local3 = 0;
_local4 = 0;
}
var _local1 = 0;
while (_local1 < arr[_local6].length) {
if (arr[_local6][_local1] == undefined) {
arr[_local6][_local1] = 0;
}
if (arr[_local6][_local1] == _local3) {
_local4++;
} else {
_local2 = _local2 + ((_local2.length == 0) ? "" : ",");
_local2 = _local2 + ((_local4 > 1) ? ((_local3 + "x") + _local4) : (_local3));
_local3 = arr[_local6][_local1];
_local4 = 1;
}
_local1++;
}
_local6++;
}
var _local7 = _local2.split(",");
_local6 = _local7.length - 1;
while (_local6 > 0) {
if (_local7[_local6] != "br") {
_local7.splice(_local6 + 1);
_local2 = _local7.join(",");
break;
}
_local6--;
}
return(_local2);
}
function cam(xto, yto) {
if (!design) {
snd_ambience(xto, yto);
}
if (xto != -999) {
_root.fg._x = -(xto * Stage.width);
}
if (yto != -999) {
_root.fg._y = -(yto * Stage.height);
}
campointa = {x:0, y:0};
_root.fg.globalToLocal(campointa);
campointb = {x:Stage.width, y:Stage.height};
_root.fg.globalToLocal(campointb);
createarea();
}
function createarea() {
var _local8 = {xMin:campointa.x - tlradius.l, xMax:campointb.x + tlradius.r, yMin:campointa.y - tlradius.u, yMax:campointb.y + tlradius.d};
tilearea = {xMin:gettilex(_local8.xMin), xMax:gettilex(_local8.xMax), yMin:gettiley(_local8.yMin), yMax:gettiley(_local8.yMax)};
tilearea.line = (tilearea.xMax - tilearea.xMin) + 2;
tilearea.layer = (tilearea.line * ((tilearea.yMax - tilearea.yMin) + 2)) * 2;
_root.fg.gotoAndStop(3);
_root.fg.gotoAndStop(1);
var _local3 = tilearea.xMin;
while (_local3 <= tilearea.xMax) {
if (world_tilesA[_local3] == undefined) {
world_tilesA[_local3] = new Array();
}
if (world_tilesB[_local3] == undefined) {
world_tilesB[_local3] = new Array();
}
var _local2 = tilearea.yMin;
while (_local2 <= tilearea.yMax) {
if (world_tilesA[_local3][_local2] == undefined) {
world_tilesA[_local3][_local2] = 0;
}
if (world_tilesB[_local3][_local2] == undefined) {
world_tilesB[_local3][_local2] = 0;
}
var _local6 = world_tilesA[_local3][_local2];
if (_local6 != 0) {
attachtile(_local3, _local2, _local6, 0);
}
_local6 = world_tilesB[_local3][_local2];
if (_local6 != 0) {
attachtile(_local3, _local2, _local6, 1);
}
_local2++;
}
_local3++;
}
if (design == 1) {
return(undefined);
}
ref_sprites = new Array();
var _local5 = 0;
while (_local5 < world_sprites.length) {
var _local4 = world_sprites[_local5][0];
if (_local4.killed) {
} else {
update_mainstate(_local4, world_sprites[_local5][_local4.state]);
if ((((_local4.tx < (tilearea.xMin - 1)) || (_local4.tx > (tileare.xMax + 1))) || (_local4.ty < (tilearea.yMin - 1))) || (_local4.ty > (tilearea.yMax + 1))) {
} else {
ref_sprites.push(_local5);
var _local7 = ((_local4.ganim == undefined) ? 1 : (_local4.ganim));
attachsprite(_local5, _local7);
}
}
_local5++;
}
}
function update_mainstate(sub, dub) {
if (dub.statejump) {
sub.tx = dub.tx;
sub.ty = dub.ty;
sub.l = dub.l;
sub.state++;
}
if (dub.gchar != undefined) {
sub.gchar = dub.gchar;
}
if (dub.gstate != undefined) {
sub.gstate = dub.gstate;
}
if (dub.gaction != undefined) {
sub.gaction = dub.gaction;
}
sub.turnarrive = 0;
sub.live = 1;
}
function attachtile(tx, ty, tl, l) {
var _local2 = (l ? ((("bx" + tx) + "y") + ty) : ((("ax" + tx) + "y") + ty));
var _local7 = (tiledata[tl].over ? 1 : 0);
var _local6 = get_depth(tx, ty, l, _local7, 0);
_root.fg.sorted.attachMovie("tiles", _local2, _local6);
_root.fg.sorted[_local2]._x = tx * tilep.w;
_root.fg.sorted[_local2]._y = ty * tilep.h;
tl = ((tl == 0) ? (tiledata.length) : (tl));
_root.fg.sorted[_local2].gotoAndStop(tl);
}
function gettilex(cord) {
return(Math.floor(cord / tilep.w));
}
function gettiley(cord) {
return(Math.floor(cord / tilep.h));
}
function hastile(tx, ty, l) {
var _local1 = (l ? (world_tilesB[tx][ty]) : (world_tilesA[tx][ty]));
if (_local1 > 0) {
return(_local1);
}
return(0);
}
function settile(tx, ty, l, tl) {
if (l) {
var _local6 = world_tilesB[tx][ty];
var _local5 = (("bx" + tx) + "y") + ty;
world_tilesB[tx][ty] = tl;
} else {
var _local6 = world_tilesA[tx][ty];
var _local5 = (("ax" + tx) + "y") + ty;
world_tilesA[tx][ty] = tl;
}
if ((_local6 == 0) && (_root.fg.sorted[_local5] == undefined)) {
attachtile(tx, ty, tl, l);
} else {
tl = ((tl == 0) ? (tiledata.length) : (tl));
_root.fg.sorted[_local5].gotoAndStop(tl);
}
}
function attachsprite(id, ganim) {
var _local2 = "s" + id;
_root.fg.sorted.attachMovie("sprites", _local2, _root.fg.sorted.getNextHighestDepth());
movesprite(id);
_root.fg.sorted[_local2].mc.mc.gotoAndStop(ganim);
}
function movesprite(id) {
sprite_depth(id);
sprite_position(id);
}
function sprite_depth(id) {
var _local2 = world_sprites[id][0];
if ((((_local2.tx < (tilearea.xMin - 1)) || (_local2.tx > (tilearea.xMax + 1))) || (_local2.ty < (tilearea.yMin - 1))) || (_local2.ty > (tilearea.yMax + 1))) {
return(undefined);
}
var _local4 = "s" + id;
var _local3 = get_depth(_local2.tx, _local2.ty, _local2.l, 1, 1);
_root.fg.sorted[_local4].swapDepths(_local3);
}
function sprite_position(id) {
var _local2 = world_sprites[id][0];
var _local4 = "s" + id;
var _local7 = (_local2.l ? (world_tilesB[_local2.tx][_local2.ty]) : (world_tilesA[_local2.tx][_local2.ty]));
var _local3 = tiledata[_local7];
var _local6 = _local2.tx * tilep.w;
_local6 = _local6 + (_local3.sitx ? (_local3.sitx) : 0);
var _local5 = _local2.ty * tilep.h;
_local5 = _local5 + (_local3.sity ? (_local3.sity) : 0);
_root.fg.sorted[_local4]._x = _local6;
_root.fg.sorted[_local4]._y = _local5;
_root.fg.sorted[_local4].gotoAndStop(_local2.gchar + _local2.gstate);
_root.fg.sorted[_local4].mc.gotoAndStop(_local2.gaction);
}
function get_depth(tx, ty, l, o, s) {
var _local1 = 0;
if (l) {
_local1 = _local1 + (tilearea.layer * 2);
}
if (o) {
_local1 = _local1 + tilearea.layer;
}
if (o) {
_local1 = _local1 + ((ty - tilearea.yMin) * (tilearea.line * 2));
} else {
_local1 = _local1 + ((ty - tilearea.yMin) * tilearea.line);
}
if (s) {
_local1 = _local1 + ((tx - tilearea.xMin) + tilearea.line);
} else {
_local1 = _local1 + (tx - tilearea.xMin);
}
return(_local1);
}
function render() {
if (gamep.state != "playing") {
return(undefined);
}
var _local1 = 0;
while (_local1 < ref_sprites.length) {
var _local2 = ref_sprites[_local1];
animatesprite(_local2);
_local1++;
}
}
function animatesprite(id) {
var _local2 = world_sprites[id][0];
if (!_local2.turnarrive) {
return(undefined);
}
var _local3 = "s" + id;
_root.fg.sorted[_local3]._x = _root.fg.sorted[_local3]._x + _local2.moveratex;
_root.fg.sorted[_local3]._y = _root.fg.sorted[_local3]._y + _local2.moveratey;
if (_local2.turnarrive == -25) {
if (_root.fg.sorted[_local3].mc.mc._currentframe == _root.fg.sorted[_local3].mc.mc._totalframes) {
_local2.turnarrive = 0;
_local2.live = 1;
}
} else if (_local2.turnarrive <= gamep.tcount) {
_local2.turnarrive = 0;
_local2.live = 1;
}
if (_local2.live && (id == 0)) {
clicks.up = 0;
clicks.down = 0;
clicks.left = 0;
clicks.right = 0;
clicks.space = 0;
playerzone_check();
}
}
function checktileto(dir, opdir, id) {
var _local2 = world_sprites[id][0];
var _local22 = (_local2.l ? (world_tilesB[_local2.tx][_local2.ty]) : (world_tilesA[_local2.tx][_local2.ty]));
var _local9 = tiledata[_local22];
var _local8 = _local2.l;
var _local13 = 0;
if ((!_local2.l) && (_local9["layer" + dir])) {
_local8 = 1;
_local13 = 1;
}
var _local12 = (_local9["exit" + dir] ? (_local9["exit" + dir]) : 0);
switch (dir) {
case "u" :
var _local20 = _local2.tx + _local12;
var _local19 = _local2.ty - 1;
break;
case "d" :
_local20 = _local2.tx + _local12;
_local19 = _local2.ty + 1;
break;
case "l" :
_local20 = _local2.tx - 1;
_local19 = _local2.ty + _local12;
break;
case "r" :
_local20 = _local2.tx + 1;
_local19 = _local2.ty + _local12;
}
var _local21 = world_tilesA[_local20][_local19];
var _local6 = tiledata[_local21];
if (_local8) {
if (_local6["layer" + opdir]) {
_local8 = 0;
_local13 = 1;
} else {
_local21 = world_tilesB[_local20][_local19];
_local6 = tiledata[_local21];
}
}
if (!_local13) {
var _local15 = ((_local6.blockstate == _local2.gstate) ? 1 : 0);
var _local16 = (((_local6.dontblockstate != undefined) && (_local6.dontblockstate != _local2.gstate)) ? 1 : 0);
if ((((_local6.blockx || (_local15)) || (_local16)) || (_local21 == undefined)) || (_local21 == 0)) {
if ((_local15 || (_local16)) && (_local6.blocktxt != undefined)) {
changestand(id);
movesprite(id);
performaction([0, _local6.blocktxt]);
}
return(0);
}
switch (dir) {
case "u" :
if ((_local9.blocku || (_local6.blockd)) || (_local6.trapd)) {
return(0);
}
break;
case "d" :
if ((_local9.blockd || (_local6.blocku)) || (_local6.trapu)) {
return(0);
}
break;
case "l" :
if ((_local9.blockl || (_local6.blockr)) || (_local6.trapr)) {
return(0);
}
break;
case "r" :
if (!((_local9.blockr || (_local6.blockl)) || (_local6.trapl))) {
break;
}
return(0);
}
}
var _local4 = 0;
while (_local4 < ref_sprites.length) {
var _local5 = ref_sprites[_local4];
if (_local5 == id) {
} else {
var _local3 = world_sprites[_local5][0];
if (((_local8 == _local3.l) && (_local3.tx == _local20)) && (_local3.ty == _local19)) {
return(0);
}
}
_local4++;
}
var _local10 = (_local8 ? (world_interactB[_local20][_local19]) : (world_interactA[_local20][_local19]));
if ((id == 0) && (_local10.lock || ((_local10.sprite > -1) && (world_sprites[_local10.sprite][0][_local10.propname] == _local10.propval)))) {
if (_local10.locktxt != undefined) {
changestand(id);
movesprite(id);
performaction([0, _local10.locktxt]);
}
return(0);
}
if (_local9["anim" + dir]) {
var _local17 = (_local2.l ? ((("bx" + _local2.tx) + "y") + _local2.ty) : ((("ax" + _local2.tx) + "y") + _local2.ty));
_root.fg.sorted[_local17].mc.gotoAndPlay(2);
}
if (_local6["anim" + opdir]) {
var _local17 = (_local8 ? ((("bx" + _local20) + "y") + _local19) : ((("ax" + _local20) + "y") + _local19));
_root.fg.sorted[_local17].mc.gotoAndPlay(2);
}
if (_local9["gstate" + dir]) {
_local2.gstate = _local9["gstate" + dir];
} else if (_local6["gstate" + opdir]) {
_local2.gstate = _local6["gstate" + opdir];
}
if (_local2.l != _local8) {
if (_local8) {
sprite_position(id);
_local2.l = 1;
sprite_depth(id);
} else {
movesprite(id);
_local2.l = 0;
}
} else if (_local19 > _local2.ty) {
sprite_position(id);
var _local18 = _local2.ty;
_local2.ty = _local19;
sprite_depth(id);
_local2.ty = _local18;
} else {
movesprite(id);
}
return({tx:_local20, ty:_local19, tlon:_local22, tlto:_local21});
}
function preparespritemove(id, spd, obj) {
var _local1 = world_sprites[id][0];
var _local3 = tiledata[obj.tlon];
var _local5 = tiledata[obj.tlto];
if (nomovement_transition(_local1.gstate)) {
_local1.moveratey = 0;
_local1.moveratex = 0;
_local1.turnarrive = -25;
_local1.live = 0;
} else {
var _local11 = _local1.tx * tilep.w;
_local11 = _local11 + (_local3.sitx ? (_local3.sitx) : 0);
var _local9 = obj.tx * tilep.w;
_local9 = _local9 + (_local5.sitx ? (_local5.sitx) : 0);
var _local13 = _local9 - _local11;
var _local10 = _local1.ty * tilep.h;
_local10 = _local10 + (_local3.sity ? (_local3.sity) : 0);
var _local8 = obj.ty * tilep.h;
_local8 = _local8 + (_local5.sity ? (_local5.sity) : 0);
var _local12 = _local8 - _local10;
if (spd == undefined) {
if (_local3.spd != undefined) {
spd = _local3.spd;
} else {
spd = _local1.spd;
}
}
var _local7 = (gamep_spd[spd] * gamep.fpt) + 2;
_local1.moveratey = _local12 / _local7;
_local1.moveratex = _local13 / _local7;
_local1.turnarrive = gamep.tcount + gamep_spd[spd];
_local1.live = 0;
}
_local1.gstate = gstate_transition(_local1.gstate, _local1.gaction);
var _local4 = (_local1.l ? (world_interactB[obj.tx][obj.ty]) : (world_interactA[obj.tx][obj.ty]));
if (_local4.l != undefined) {
_local1.l = _local4.l;
_local1.tx = _local4.tx;
_local1.ty = _local4.ty;
return(undefined);
}
_local1.tx = obj.tx;
_local1.ty = obj.ty;
}
function boxintersection(box1, box2) {
if ((((box1.xMin < box2.xMax) && (box1.xMax > box2.xMin)) && (box1.yMin < box2.yMax)) && (box1.yMax > box2.yMin)) {
return(1);
}
return(0);
}
function testgraphichit(box, id) {
_root.fg.localToGlobal(box);
if (_root.fg.sorted["obj" + id].hitTest(box.x, box.y, 1)) {
return(1);
}
return(0);
}
function testtile(tx, ty, obox, dir, id) {
var _local2 = world_tiles[tx][ty];
_local2 = ((_local2 == undefined) ? 0 : (_local2));
if (_local2 == 0) {
return(-1);
}
var _local5 = world_objects[id];
var _local7 = tiledata[_local2][0];
if (_local7.checkpoint) {
if (_local5.none == "player") {
touchcheckpoint(tx, ty);
}
return(-1);
}
if ((!_local7.cloud) && (!_local7.block)) {
return(-1);
}
if (_local7.cloud) {
if ((_local5.none == "bread") || (_local5.none == "gas")) {
return(-1);
}
if ((dir != "d") && (_local5.none != "duck")) {
return(-1);
}
}
var _local6 = _root.fg.tl_below[(("x" + tx) + "y") + ty].mc._currentframe;
_local6 = ((_local6 == undefined) ? 1 : (_local6));
var _local4 = tiledata[_local2][_local6];
var _local11 = tx * tilep.w;
var _local10 = ty * tilep.h;
var _local15 = _local4.xs + _local11;
var _local12 = _local4.xe + _local11;
var _local14 = _local4.ys + _local10;
var _local13 = _local4.ye + _local10;
var _local3 = {xMin:_local15, xMax:_local12, yMin:_local14, yMax:_local13};
if (boxintersection(_local3, obox)) {
switch (dir) {
case "u" :
return(_local3.yMax);
case "d" :
return(_local3.yMin);
case "l" :
return(_local3.xMax);
case "r" :
return(_local3.xMin);
}
return(1);
}
return(-1);
}
function physics(id) {
var _local2 = world_objects[id];
if (!_local2.inair) {
_local2.ymove = ((_local2.ymove == 0) ? 1 : (_local2.ymove));
_local2.inair = 1;
}
var _local8 = _root.fg.sorted["obj" + id].mc._currentframe;
_local8 = ((_local8 == undefined) ? 1 : (_local8));
var _local5 = objectdata[_local2.obj][_local8];
var _local13 = _local2.x;
var _local12 = _local2.y;
if ((_local2.pickup && (_local2.ontop == playerid)) || (_local2.flyaway)) {
var _local3 = world_objects[_local2.ontop];
var _local6 = _root.fg.sorted["obj" + _local2.ontop].mc._currentframe;
_local6 = ((_local6 == undefined) ? 1 : (_local6));
var _local14 = objectdata[_local3.obj][_local6];
var _local9 = _local3.x - _local2.x;
var _local10 = (_local3.y + _local14.ys) - _local2.y;
collisions(id, _local5, _local9, _local10, 1);
if ((((_local2.x + _local5.xe) < (_local3.x + _local14.xs)) || ((_local2.x + _local5.xs) > (_local3.x + _local14.xe))) || (_local2.y < (_local3.y + _local14.ys))) {
_local2.ontop = -1;
if (_local2.pickup) {
_local2.lastonly = _local2.only;
_local2.only = "x";
}
}
return(undefined);
}
_local2.lastontop = -1;
if (_local2.ontop > -1) {
var _local3 = world_objects[_local2.ontop];
var _local6 = _root.fg.sorted["obj" + _local2.ontop].mc._currentframe;
_local6 = ((_local6 == undefined) ? 1 : (_local6));
var _local14 = objectdata[_local3.obj][_local6];
var _local9 = _local3.x - _local2.ontopx;
var _local10 = _local3.y - _local2.ontopy;
collisions(id, _local5, _local9, _local10, 1);
_local2.lastontop = _local2.ontop;
_local2.ontop = -1;
}
var _local9 = (_local2.hanging ? 0 : (_local2.xmove));
var _local10 = (_local2.hanging ? 0 : (_local2.ymove));
var _local11 = (_local2.hanging ? 1 : 0);
var _local7 = collisions(id, _local5, _local9, _local10, _local11);
if (_local7.yobj != -1) {
var _local3 = world_objects[_local7.yobj];
if (_local2.y < _local3.y) {
_local2.ontop = _local7.yobj;
_local2.ontopx = _local3.x;
_local2.ontopy = _local3.y;
} else {
_local3.ontop = id;
_local3.ontopx = _local2.x;
_local3.ontopy = _local2.y;
}
}
actualphysics(id);
return(_local7);
}
function collisions(id, obdata, xdist, ydist, skipobs) {
var _local17 = world_objects[id];
var _local35 = ((_local17.graphic == 1) ? (obdata.xs) : (-obdata.xe));
var _local34 = ((_local17.graphic == 1) ? (obdata.xe) : (-obdata.xs));
var _local6 = {xMin:_local17.x + _local35, xMax:_local17.x + _local34, yMin:_local17.y + obdata.ys, yMax:_local17.y + obdata.ye};
var _local3 = {xobj:-1, yobj:-1, xdir:0, ydir:0, stopx:0, stopy:0};
_local3.xdir = ((xdist < 0) ? -1 : 1);
_local3.ydir = ((ydist < 0) ? -1 : 1);
_local3.x = ((_local3.xdir == -1) ? (_local6.xMin + xdist) : (_local6.xMax + xdist));
_local3.y = ((_local3.ydir == -1) ? (_local6.yMin + ydist) : (_local6.yMax + ydist));
if (!_local17.skiptiles) {
var _local2 = [{txt:"u", axis:"y", bin:-1}, {txt:"d", axis:"y", bin:1}, {txt:"l", axis:"x", bin:-1}, {txt:"r", axis:"x", bin:1}];
var _local24 = 0;
while (_local24 < 4) {
if (_local2[_local24].bin != _local3[_local2[_local24].axis + "dir"]) {
} else if (((_local2[_local24].axis == "y") && (ydist == 0)) || ((_local2[_local24].axis == "x") && (xdist == 0))) {
} else {
if (_local2[_local24].axis == "y") {
var _local22 = Math.floor((_local6.xMin - 1) / tilep.w);
var _local25 = Math.ceil(_local6.xMax / tilep.w);
} else {
var _local22 = Math.floor((_local6.yMin - 1) / tilep.h);
var _local25 = Math.ceil(_local6.yMax / tilep.h);
}
var _local4 = copyob(_local6);
if (_local2[_local24].txt == "u") {
_local4.yMax = _local4.yMin;
_local4.yMin = _local4.yMin + ydist;
var _local23 = Math.floor((_local4.yMin - 1) / tilep.h);
var _local26 = Math.ceil(_local6.yMin / tilep.h);
} else if (_local2[_local24].txt == "d") {
_local4.yMin = _local4.yMax;
_local4.yMax = _local4.yMax + ydist;
var _local23 = Math.ceil(_local4.yMax / tilep.h);
var _local26 = Math.floor(_local6.yMax / tilep.h);
} else if (_local2[_local24].txt == "l") {
_local4.xMax = _local4.xMin;
_local4.xMin = _local4.xMin + xdist;
var _local23 = Math.floor((_local4.xMin - 1) / tilep.w);
var _local26 = Math.ceil(_local6.xMin / tilep.w);
} else if (_local2[_local24].txt == "r") {
_local4.xMin = _local4.xMax;
_local4.xMax = _local4.xMax + xdist;
var _local23 = Math.ceil(_local4.xMax / tilep.w);
var _local26 = Math.floor(_local6.xMax / tilep.w);
}
var _local23 = _local23 + _local2[_local24].bin;
var _local11 = _local26;
while (_local11 != _local23) {
var _local5 = -1;
var _local7 = _local22;
while (_local7 <= _local25) {
if (_local2[_local24].axis == "y") {
var _local8 = testtile(_local7, _local11, _local4, _local2[_local24].txt, id);
} else {
var _local8 = testtile(_local11, _local7, _local4, _local2[_local24].txt, id);
}
if ((_local8 != -1) && (((_local5 == -1) || ((_local2[_local24].bin == -1) && (_local8 > _local5))) || ((_local2[_local24].bin == 1) && (_local8 < _local5)))) {
_local5 = _local8;
}
_local7++;
}
if ((_local5 != -1) && (((_local2[_local24].bin == -1) && (_local5 > _local3[_local2[_local24].axis])) || ((_local2[_local24].bin == 1) && (_local5 < _local3[_local2[_local24].axis])))) {
_local3[_local2[_local24].axis] = _local5;
_local3["stop" + _local2[_local24].axis] = 1;
break;
}
_local11 = _local11 + _local2[_local24].bin;
}
}
_local24++;
}
}
if (!skipobs) {
var _local24 = 0;
while (_local24 < ref_objects.length) {
var _local16 = ref_objects[_local24];
if (_local16 == id) {
} else {
var _local9 = world_objects[_local16];
if (_local9.ontop == id) {
} else if (_local9.hanging) {
} else if ((_local17.only != undefined) && (_local9.none != _local17.only)) {
} else if ((_local17.anythingbut != undefined) && (_local9.none == _local17.anythingbut)) {
} else {
var _local18 = _root.fg.sorted["obj" + _local16].mc._currentframe;
_local18 = ((_local18 == undefined) ? 1 : (_local18));
var _local15 = objectdata[_local9.obj][_local18];
var _local28 = ((_local9.graphic == 1) ? (_local15.xs) : (-_local15.xe));
var _local27 = ((_local9.graphic == 1) ? (_local15.xe) : (-_local15.xs));
var _local10 = {xMin:_local9.x + _local28, xMax:_local9.x + _local27, yMin:_local9.y + _local15.ys, yMax:_local9.y + _local15.ye};
if ((((Math.floor(_local10.xMin) > Math.floor(_local6.xMax + xdist)) || (Math.floor(_local10.xMax) < Math.floor(_local6.xMin + xdist))) || (Math.floor(_local10.yMin) > Math.floor(_local6.yMax + ydist))) || (Math.floor(_local10.yMax) < Math.floor(_local6.yMin + ydist))) {
} else {
var _local14 = -999;
var _local13 = -999;
var _local19 = 0;
if ((_local9.solid != 1) || (_local10.yMin >= _local6.yMax)) {
_local19++;
} else if ((_local3.xdir == 1) && (Math.floor(_local10.xMin) >= Math.floor(_local6.xMax))) {
_local14 = Math.floor(_local10.xMin);
} else if ((_local3.xdir == -1) && (Math.floor(_local10.xMax) <= Math.floor(_local6.xMin))) {
_local14 = Math.floor(_local10.xMax);
} else {
_local19++;
}
if (!_local9.solid) {
_local19++;
} else if ((_local3.ydir == 1) && (Math.floor(_local10.yMin) >= Math.floor(_local6.yMax))) {
_local13 = Math.floor(_local10.yMin);
} else if (((_local9.solid != 2) && (_local3.ydir == -1)) && (Math.floor(_local10.yMax) <= Math.floor(_local6.yMin))) {
_local13 = Math.floor(_local10.yMax);
} else {
_local19++;
}
if ((_local14 != -999) && (((_local3.xdir == 1) && (_local14 <= _local3.x)) || ((_local3.xdir == -1) && (_local14 >= _local3.x)))) {
_local3.x = _local14;
_local3.xobj = _local16;
_local3.stopx = 1;
}
if ((_local13 != -999) && (((_local3.ydir == 1) && (_local13 <= _local3.y)) || ((_local3.ydir == -1) && (_local13 >= _local3.y)))) {
_local3.y = _local13;
_local3.yobj = _local16;
_local3.stopy = 1;
}
}
}
}
_local24++;
}
}
if ((_local3.xdir == -1) && (_local3.x < campointa.x)) {
_local3.x = campointa.x;
_local3.stopx = 1;
} else if ((_local3.xdir == 1) && (_local3.x > campointb.x)) {
_local3.x = campointb.x;
_local3.stopx = 1;
}
var _local36 = ((_local3.x == _local17.x) ? -1 : (_local3.x));
var _local38 = ((_local3.y == _local17.y) ? -1 : (_local3.y));
var _local37 = ((_local3.xdir == 1) ? "max" : "min");
var _local39 = ((_local3.ydir == 1) ? "max" : "min");
if (_local3.stopx) {
_local17.xmove = 0;
}
if (_local3.stopy) {
if (_local3.ydir == 1) {
_local17.inair = 0;
_local17.laston = 1;
}
_local17.ymove = 0;
_local17.jreserve = 0;
}
moveobj(id, _local36, _local37, _local38, _local39);
return(_local3);
}
function actualphysics(id) {
var _local1 = world_objects[id];
if (_local1.inair) {
var _local5 = (tl.waterfall ? (physicsp.waterfall) : (physicsp.gravity));
var _local6 = ((_local1.topy != undefined) ? (_local1.topy) : 3);
if (_local1.jreserve > 0) {
_local1.jreserve = _local1.jreserve - _local5;
} else {
_local1.ymove = (((_local1.ymove + _local5) > _local6) ? (_local6) : (_local1.ymove + _local5));
}
if (_local1.jreserve < 0) {
_local1.ymove = _local1.ymove - _local1.jreserve;
_local1.jreserve = 0;
}
}
var _local7 = gettiley(_local1.y - 1);
var _local8 = gettilex(_local1.x);
var _local4 = world_tiles[_local8][_local7];
_local4 = ((_local4 == undefined) ? 0 : (_local4));
var tl = tiledata[_local4][0];
var _local2 = (tl.slime ? (physicsp.slime) : (physicsp.block));
var _local3 = ((_local1.topx != undefined) ? (_local1.topx) : 0.5);
if (_local1.dir == 1) {
_local1.xmove = (((_local1.xmove + _local2) < _local3) ? (_local1.xmove + _local2) : (_local3));
} else if (_local1.dir == -1) {
_local1.xmove = (((_local1.xmove - _local2) > (-_local3)) ? (_local1.xmove - _local2) : (-_local3));
} else if (_local1.xmove != 0) {
if (_local1.xmove > 0) {
_local1.xmove = (((_local1.xmove - _local2) > 0) ? (_local1.xmove - _local2) : 0);
} else {
_local1.xmove = (((_local1.xmove + _local2) < 0) ? (_local1.xmove + _local2) : 0);
}
}
}
function controls() {
var _local4 = (design ? 10 : 6);
var _local2 = 0;
while (_local2 < _local4) {
var _local1 = inputs[_local2];
var _local3 = Key.isDown(_local1.kcode) || (Key.isDown(_local1.kcode2));
if (_local3 && (!clicks[_local1.tag])) {
clicks[_local1.tag] = 1;
} else if ((!_local3) && (clicks[_local1.tag] == 2)) {
clicks[_local1.tag] = 0;
}
_local2++;
}
}
function switch_keyboard(a) {
switch (a) {
case "qwerty" :
inputs[0].kcode = 74;
inputs[0].kcode2 = 65;
inputs[1].kcode = 76;
inputs[1].kcode2 = 68;
inputs[2].kcode = 73;
inputs[2].kcode2 = 87;
inputs[3].kcode = 75;
inputs[3].kcode2 = 83;
keyboard_type = 1;
return(undefined);
case "azerty" :
inputs[0].kcode = 74;
inputs[0].kcode2 = 81;
inputs[1].kcode = 76;
inputs[1].kcode2 = 68;
inputs[2].kcode = 73;
inputs[2].kcode2 = 90;
inputs[3].kcode = 75;
inputs[3].kcode2 = 83;
keyboard_type = 2;
return(undefined);
case "dvorak" :
inputs[0].kcode = 84;
inputs[0].kcode2 = 65;
inputs[1].kcode = 69;
inputs[1].kcode2 = 83;
inputs[2].kcode = 82;
inputs[2].kcode2 = 188;
inputs[3].kcode = 78;
inputs[3].kcode2 = 79;
keyboard_type = 3;
return(undefined);
case "fallback" :
inputs[0].kcode = 100;
inputs[0].kcode2 = 37;
inputs[1].kcode = 102;
inputs[1].kcode2 = 39;
inputs[2].kcode = 104;
inputs[2].kcode2 = 38;
inputs[3].kcode = 101;
inputs[3].kcode2 = 40;
keyboard_type = 4;
return(undefined);
}
}
function snd_play(snd) {
var _local2 = "aud_" + snd;
if (_root[_local2] == undefined) {
_root.attachMovie("empty", "mc" + _local2, _root.getNextHighestDepth());
_root[_local2] = new Sound(_root["mc" + _local2]);
}
_root[_local2].attachSound(snd + ".wav");
_root[_local2].start();
}
function snd_stop(snd) {
var _local2 = "aud_" + snd;
_root[_local2].stop();
}
function snd_ambience(xto, yto) {
var _local1 = world_map[yto][xto];
if (_local1.snd == gamep.snd) {
return(undefined);
}
gamep.snd = _local1.snd;
bgaud.stop();
bgaud.attachSound(_local1.snd + ".wav");
bgaud.start(0, 9999);
}
function snd_initfade(sndname, ease, len, vol) {
fadep.snd = sndname;
fadep.ease = ease / 100;
fadep.timers = timer;
fadep.timere = timer + (len * gamep.fps);
fadep.vols = _root[sndname].getVolume();
fadep.vole = vol;
}
function snd_fade() {
if (fadep.snd == "") {
return(undefined);
}
var _local3 = makepercent(timer, fadep.timers, fadep.timere);
var _local2 = demakepercent(_local3, fadep.vols, fadep.vole);
_root[fadep.snd].setVolume(_local2);
if (_local2 == fadep.vole) {
fadep.snd = "";
}
}
function makepercent(n, min, max) {
return(Math.floor(((n - min) / (max - min)) * 100));
}
function demakepercent(p, min, max) {
var _local1 = (p / 100) * Math.abs(max - min);
_local1 = ((min < max) ? (_local1 + min) : (min - _local1));
return(_local1);
}
function designinit() {
clicks.spinner = 0;
clicks.leftclick = 2;
frameon("game");
_root.fg._xscale = tilep.zoom;
_root.fg._yscale = tilep.zoom;
_root.overlay.gotoAndStop("designer");
_root.overlay.l.text = designp.l;
cam(designp.camx, designp.camy);
}
function designloop() {
var _local4 = gettilex(_root.fg._xmouse);
var _local3 = gettiley(_root.fg._ymouse);
var _local2 = hastile(_local4, _local3, designp.l);
_root.overlay.t.text = (((("x" + _local4) + "_y") + _local3) + "_tl") + _local2;
if ((((clicks.left == 1) || (clicks.right == 1)) || (clicks.up == 1)) || (clicks.down == 1)) {
var _local6 = designp.camx;
_local6 = _local6 - (clicks.left ? 1 : 0);
_local6 = _local6 + (clicks.right ? 1 : 0);
var _local5 = designp.camy;
_local5 = _local5 - (clicks.up ? 1 : 0);
_local5 = _local5 + (clicks.down ? 1 : 0);
cam(_local6, _local5);
designp.camx = _local6;
designp.camy = _local5;
clicks.left = 2;
clicks.right = 2;
clicks.up = 2;
clicks.down = 2;
}
if (clicks.space == 1) {
designp.l = (designp.l ? 0 : 1);
_root.overlay.l.text = designp.l;
clicks.space = 2;
}
if (clicks.spinner != 0) {
_local2 = _local2 + clicks.spinner;
_local2 = ((_local2 == tiledata.length) ? 0 : (_local2));
_local2 = ((_local2 == -1) ? (tiledata.length - 1) : (_local2));
settile(_local4, _local3, designp.l, _local2);
clicks.spinner = 0;
}
if (clicks.middleclick) {
if (clicks.middleclick == 1) {
designp.copypasta = hastile(_local4, _local3, designp.l);
clicks.middleclick = 2;
} else {
settile(_local4, _local3, designp.l, designp.copypasta);
}
}
if (clicks.playtest == 1) {
clicks.playtest = 2;
design = 2;
gameinit(0);
}
}
function testloop() {
if (clicks.playtest == 1) {
clicks.playtest = 2;
design = 1;
gameexit();
designinit();
return(undefined);
}
if (clicks.leftclick == 1) {
var _local6 = gettilex(_root.fg._xmouse);
var _local5 = gettiley(_root.fg._ymouse);
clicks.leftclick = 2;
var _local4 = world_sprites[0][0];
_local4.tx = _local6;
_local4.ty = _local5;
createarea();
}
if (clicks.test == 1) {
clicks.test = 2;
var _local2 = 0;
while (_local2 < ref_sprites.length) {
var _local3 = ref_sprites[_local2];
var _local4 = world_sprites[_local3][0];
trace((_local3 + "_") + _local4.state);
_local2++;
}
}
}
function onEnterFrame() {
if (gamep.state != "paused") {
timer++;
}
controls();
if (framein == "game") {
if (design == 1) {
designloop();
} else if (design == 2) {
testloop();
render();
simulation();
} else {
render();
simulation();
}
}
}
function frameon(goto) {
framein = goto;
_root.gotoAndStop(goto);
}
function designing(b) {
if (b == 0) {
design = 0;
frameon("menu");
} else {
design = 1;
frameon("designer");
}
}
function finishgame() {
finished = 3;
gameexit();
frameon("menu");
}
world_txtA = "br,br,br,0,86x2,87,50,63,50x2,86x2,85,78,0x2,48,41x3,48,41x2,5,1x3,br,0,86x2,87,73,74,69,50,86x2,83,78,0x2,48,41x3,48,46,41,5,1x3,br,0,86,94,87,72x2,71,50,86x2,84,78,0x2,48,41x3,48,46,41,5,1x3,br,0,86x2,87,64x2,50x2,86x2,79,78,0x2,48,41x3,48,41x2,5,1x3,br,0,86x2,87,50x4,86x2,81,78,0x2,48,41,49,41,48,41x2,5,1x3,br,0,86x2,87,65,50x3,86x2,82,78,0x2,48,41x3,48,41x2,5,1x3,br,0,86x2,87,50x4,86x2,80,78,0x2,48,41x3,48,41x2,100,1x3,br,0,86x2,87,50x6,52x2,0x2,48,41x3,48,41x2,102,1x3,br,0,86x2,87,50,59,50x6,53,95,48,41x3,48,41x2,8,1x3,br,0,86x2,87,50,60,50,62,50x4,53,95,48,41x3,48,41x2,8,1x3,br,0,86x2,87,50,61,50x6,0x2,48,46,41x2,48,41x2,8,1x3,br,0,86x2,87,50x8,0x2,48,46,41x2,48,41,49,8,3x2,1,br,0,86x2,87,50x8,0x2,48,41x3,48,41x2,8,1x3,br,0,86x2,87,50,58,50x6,0x2,48,41x3,48,41x2,8,1x3,br,0,86x2,87,50x8,0x2,48,41x3,48,41x2,6,1x3,br,0x6,86x2,87,51x2,0x3,48,41,44,41,48,41,44,2,1x3,br,0x9,95x2,0x3,48,42,43,41,48,42,43,2,1x3,br,0x14,48,41,45,41,48,41,45,2,1x3,br,0x14,48,41x3,48,41x2,7,1x3,br,0x14,41x4,48,41x2,5,1x3,48x3,41x4,48,41x2,5,2,1x2,41x3,br,0x14,43,41x2,1x15,8x3,5,2,1x5,br,0x14,43,41x2,5,1x14,8x3,5,2,1x5,br,0x14,48,41x2,5,1x2,2,1x6,2x2,8,5,1x5,2,1x5,br,0x14,48,41,117,5,1,41x3,48,41,44,41,48x2,41x2,5,1,28,27x8,32,br,0x9,95x2,0x3,48,41x2,5,1,41x3,48,44,43,41,48x2,41x2,5,1,21,17,15x2,16x3,15,19,30,br,0x6,86x2,87,52x2,0x3,48,41x2,6,1,41x3,48,47,43,41,48x2,41x2,5,1,23,10,33,39,37x3,38,12,31,br,0x6,86x2,87,65,50,0x3,48,41,44,2,1,41x3,48,47,43,41,48x2,41x2,5,1,21,10,33x6,12,30,br,0x6,86x2,87,50x2,0x3,48,44,43,4,1,41x3,48,45,43,41,48x2,41x2,5,1,21,10,33x6,12,30,br,0x6,86,91,92,50x2,0x3,48,47,43,2,1,41x3,48,41,45,41,48x2,41x2,6,1,21,10,33x6,12,30,br,0x6,86x2,87,50x2,0x3,48,47,43,2,1,41x3,48,41,44,41,48x2,41,44,2,1,22,10,33x6,12,30,br,0x6,86x2,87,50x2,0x3,48,45,43,2,1,41x3,48,42,43,41,48x2,42,43,2,1,21,10,33x6,12,30,br,0x6,86,93,87,50x2,0x3,48,46,45,2,1,41x3,48,41,45,41,48x2,41,45,2,1,21,11,40,33x5,12,30,br,0x6,86x2,87,50x2,0x3,48,46,41,7,1,41x3,48,41x3,48x2,41x2,7,1,21,10,33,36,34x3,35,12,30,br,0x6,86,91,92,50x2,0x3,48,41x2,5,1,41x3,48,41,49,41,48x2,41x2,5,1,23,18,13x2,14x3,13,20,31,br,0x6,86x2,87,51x2,0x3,48,41x2,5,1,41x3,48,41x3,48x2,41x2,5,1,22,9x8,30,br,0x9,95x2,0x3,48,41x2,5,1,41x3,48,41x3,48x2,41x2,5,1,24,9x8,30,br,0x14,48,41,49,5,1,41x3,48,41x3,48x2,41x2,5,1,25,26x8,29,br,0x14,48,41x2,5,1x2,2,1x6,2,1,8,5,1x5,2,1x5,br,0x14,43,41x2,1x12,8x6,5,2,1x5,br,0x14,43,41x2,1x15,8x3,5,2,1x5,br,0x14,41x4,48,41x2,5,1x3,41x7,48,41x2,5,2,1x2,41x3,br,0x28,48,41x3,48,41x2,5,1x3,br,0x28,48,41,44,41,48,41x2,5,1x3,br,0x28,48,42,43,41,48,41,117,5,1x3,br,0x15,86x2,87,50x4,86x2,79,78,0x2,48,41,45,41,48,41x2,5,1x3,br,0x15,86x2,87,58,63,50x2,86x2,80,78,0x2,48,41x3,48,41x2,5,1x3,br,0x15,86x2,87,72x2,69,50,86x2,81,78,0x2,48,41x3,48,41x2,8,1x3,br,0x9,95x2,0x4,86,94,87,72x2,70,50,86x2,82,78,0x2,48,41x3,48,41x2,8,1x3,br,0x6,86x2,87,52x2,0x4,86x2,87,72x2,71,50,86x2,83,78,0x2,48,46,41x2,48,41x2,8,3x3,br,0x6,86x2,87,50x2,0x4,86,88,87,50,64,50x4,52x2,0x2,48,46,41x2,48,41x2,8,1x3,br,0,86x2,87,50x7,0x4,86,89,87,50x8,0x2,48,41x3,48,41x2,8,1x3,br,0,86x2,87,50x7,0x4,86,89,87,50,59,50x6,53,95,48,41x3,48,41x2,8,1x3,br,0,86x2,87,50,54,50x5,0x4,86,90,87,50,60,50,62,50x4,53,95,48,41x3,48,41x2,98,1x3,br,0,86x2,87,66,50x6,0x4,86x2,87,50,61,50x6,0x2,48,41x3,48,41x2,96,1x3,br,0,86x2,87,50x4,62,50x2,0x4,86x2,87,58,50x7,0x2,48,41x3,48,41x2,6,1x3,br,0,86x2,87x2,68,50x5,0x4,86x2,87,50x8,0x2,48,41,49,41,48,41,44,1x4,br,0x17,86x2,87,50x2,0x6,48,41x3,48,44,43,1x4,br,0x17,86,91,92,50x2,0x6,48,41x3,48,47,43,1x4,br,0x17,86x2,87,51x2,0x6,48,41x3,48,47,43,1x4,br,0x20,95x2,0x6,48,41x3,48,45,43,1x4,br,br,br,br,br,br,br,br,br,0x21,95x2,br,0x9,95x2,0x7,86x2,87,52x2,br,0x6,86x2,87,52x2,0x7,86x2,87,50x3,br,0x6,86x2,87,50x2,0x7,86x2,87,50x3,br,0,86x2,87,50x7,0x7,86,94,87,50x3,br,0,86x2,87,50x7,0x6,86x2,87,50x4,br,0,86x2,87,50,54,50x5,0x6,86x2,87,55,50x3,br,0,86x2,87,66,50x6,0x6,86,93,87,56,50x3,br,0,86x2,87,50x4,62,50x2,0x6,86x2,87,57,50x3,br,0,86x2,87x2,68,50x5,0x6,86x2,87,67,50,51x2,br,0x19,86x2,87,1x2";
world_txtB = "br,br,br,0x7,86,0x9,106,115,0x5,119x3,120,br,0x3,75,0x3,86,0x9,106,115,0x5,119x2,120,118,br,0x3,77,0x3,86,0x9,106,115,0x5,121x2,118x2,br,0x7,86,0x9,106,115,0x5,121x2,118x2,br,0x7,86,0x9,106,115,0x5,121x2,118x2,br,0x7,86,0x9,106,115,0x5,121x2,118x2,br,0x7,86,0x9,106,115,0x5,121x2,118x2,br,0x17,106,115,0x5,121x2,118x2,br,0x17,106,115,0,101,0x3,121x2,118x2,br,0x17,106,115,0,103,0x3,121x2,118x2,br,0x17,106,115,101,0x4,121x2,118x2,br,0x17,106,115,103,0x4,121x2,118x2,br,0x17,106,104,115,0x4,121x2,118x2,br,0x17,106,111,115,0x4,121x2,118x2,br,0x17,106,114,0x5,121x2,118x2,br,0x17,106,115,0x5,121x2,118x2,br,0x17,106,115,0x5,121x2,118x2,br,0x17,106,115,0x5,121x2,118x2,br,0x17,106,115,0x5,122x2,123,118,br,0x17,106,116,0x5,122x3,123,0x3,106,115,0x5,122x3,123,br,0x15,106x3,110x6,106x8,115,br,0x15,111x9,113,106x2,111x4,113,115,br,0x25,108,106,114,br,0x18,119x3,120,0x3,106x2,115,br,0x18,119x2,120,118,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,121x2,118x2,0x3,106x2,115,br,0x18,122x2,123,118,0x3,106x2,115,br,0x18,122x3,123,0x3,106x2,115,br,0x25,108,106,116,br,0x15,110x10,106x2,110x4,112,115,br,0x15,106x3,111x6,106x8,115,br,0x17,106,114,0x5,119x3,120,0x3,106,115,0x5,119x3,120,br,0x31,106,115,0x5,119x2,120,118,br,0x31,106,115,0x5,121x2,118x2,br,0x31,106,115,0x5,121x2,118x2,br,0x21,86,0x9,106,115,0x5,121x2,118x2,br,0x21,86,0x9,106,116,0x5,121x2,118x2,br,0x21,86,0x9,106,112,115,0x4,121x2,118x2,br,0x21,86,0x9,106,105,115,0x4,121x2,118x2,br,0x21,86,0x9,106,115,99,0x4,121x2,118x2,br,0x31,106,115,97,0x4,121x2,118x2,br,0x31,106,115,0,99,0x3,121x2,118x2,br,0x31,106,115,0,97,0x3,121x2,118x2,br,0x31,106,115,0x5,121x2,118x2,br,0x31,106,115,0x5,121x2,118x2,br,0x31,106,115,0x5,121x2,118x2,br,0x31,106,115,0x5,121x2,118x2,br,0x31,106,115,0x5,121x2,118x2,br,0x31,106,115,0x5,121x2,118x2,br,0x31,106,115,0x5,122x2,123,118,br,0x31,106,115,0x5,122x3,123,br,br,br,br,br,br,br,br,br,br,0x11,95,br,0x11,5,br,0x11,6,br,0x9,41,44,1,br,0x9,44,43,4,br,0x9,47,43,1,br,0x9,47,43,1,br,0x9,47,43,1,br,0x9,45,43,1,br,0x9,41,45,1,br,0x11,7";
world_tilesA = importtiles(world_txtA);
world_tilesB = importtiles(world_txtB);
tiledata = new Array();
tiledata[10] = {trapd:1, gstated:"enterpool"};
tiledata[11] = {blockl:1, blockr:1, gstated:"enterpool"};
tiledata[12] = {blockx:1};
tiledata[13] = {trapl:1, gstatel:"enterpool"};
tiledata[14] = {trapl:1, gstatel:"enterpool"};
tiledata[15] = {trapr:1, gstater:"enterpool"};
tiledata[16] = {trapr:1, gstater:"enterpool"};
tiledata[21] = {blocku:1, over:1};
tiledata[22] = {blocku:1, over:1};
tiledata[23] = {blocku:1, over:1};
tiledata[24] = {animu:1, dontblockstate:"swimsuit", over:1};
tiledata[25] = {blocku:1, blockr:1, over:1};
tiledata[26] = {blockr:1};
tiledata[27] = {blockl:1};
tiledata[28] = {blocku:1, blockl:1, over:1};
tiledata[29] = {blocku:1, over:1};
tiledata[30] = {blocku:1, over:1};
tiledata[31] = {blocku:1, over:1};
tiledata[32] = {blocku:1, over:1};
tiledata[33] = {spd:1};
tiledata[34] = {spd:1};
tiledata[35] = {spd:1};
tiledata[36] = {spd:1};
tiledata[37] = {spd:1};
tiledata[38] = {spd:1};
tiledata[39] = {spd:1};
tiledata[40] = {spd:1, gstateu:"exitpool", over:1};
tiledata[41] = {blockx:1};
tiledata[42] = {blockx:1};
tiledata[43] = {blockx:1};
tiledata[44] = {blockx:1};
tiledata[45] = {blockx:1};
tiledata[46] = {blockx:1};
tiledata[47] = {blockx:1};
tiledata[48] = {blockx:1};
tiledata[49] = {blockx:1, over:1};
tiledata[54] = {animt:1};
tiledata[55] = {blockx:1, over:1};
tiledata[56] = {blockx:1, over:1};
tiledata[57] = {blockx:1, over:1};
tiledata[58] = {over:1};
tiledata[59] = {blocku:1, over:1};
tiledata[60] = {blocku:1, over:1};
tiledata[61] = {blocku:1, over:1};
tiledata[62] = {blocku:1, sity:12, over:1};
tiledata[63] = {blockx:1, over:1};
tiledata[64] = {blockx:1, over:1};
tiledata[65] = {blocku:1, over:1};
tiledata[66] = {blocku:1, over:1};
tiledata[67] = {blocku:1, over:1};
tiledata[68] = {blocku:1, blockd:1, blocktxt:"(It's really not civilized to go to sleep in a bathing suit.)", dontblockstate:"", gstatel:"enterexitbed", gstater:"enterexitbed", over:1};
tiledata[69] = {blocku:1, sity:16, over:1};
tiledata[70] = {blocku:1, sity:16};
tiledata[71] = {blocku:1, sity:16, over:1};
tiledata[72] = {blockx:1};
tiledata[73] = {blockx:1};
tiledata[74] = {blockx:1};
tiledata[75] = {blockx:1};
tiledata[76] = {blockx:1};
tiledata[77] = {blockx:1};
tiledata[79] = {sity:12, over:1};
tiledata[80] = {sity:12, over:1};
tiledata[81] = {sity:12, over:1};
tiledata[82] = {sity:12, over:1};
tiledata[83] = {sity:12, over:1};
tiledata[84] = {sity:12, over:1};
tiledata[85] = {sity:12, over:1};
tiledata[86] = {blockx:1};
tiledata[87] = {blockx:1};
tiledata[88] = {blockx:1};
tiledata[89] = {blockx:1};
tiledata[90] = {blockx:1};
tiledata[91] = {blockx:1};
tiledata[92] = {blockx:1};
tiledata[93] = {blockx:1};
tiledata[94] = {blockx:1};
tiledata[96] = {blocku:1, blockd:1, sity:-16, over:1};
tiledata[97] = {blocku:1, blockd:1, sity:-16, exitr:1, over:1};
tiledata[98] = {blocku:1, blockd:1, sity:-32, exitl:-1, trapl:1, layerl:1, over:1};
tiledata[99] = {blocku:1, blockd:1, sity:-32, exitl:-1, over:1};
tiledata[100] = {blocku:1, blockd:1, sity:-16, over:1};
tiledata[101] = {blocku:1, blockd:1, sity:-16, exitl:1, over:1};
tiledata[102] = {blocku:1, blockd:1, sity:-32, exitr:-1, trapr:1, layerr:1, over:1};
tiledata[103] = {blocku:1, blockd:1, sity:-32, exitr:-1, over:1};
tiledata[104] = {exitl:1};
tiledata[105] = {exitr:1};
tiledata[107] = {blockl:1, blocku:1, over:1};
tiledata[108] = {blocku:1, over:1};
tiledata[109] = {blockr:1, blocku:1, over:1};
tiledata[110] = {blockl:1};
tiledata[111] = {blockr:1};
tiledata[112] = {blockl:1};
tiledata[113] = {blockr:1};
tiledata[114] = {blocku:1, over:1};
tiledata[115] = {blocku:1, over:1};
tiledata[116] = {blocku:1, over:1};
tiledata[117] = {animd:1, over:1, sity:16};
tiledata[118] = {blockx:1};
tiledata[119] = {blockx:1};
tiledata[120] = {blockx:1};
tiledata[121] = {blockx:1};
tiledata[122] = {blockx:1};
tiledata[123] = {blockx:1};
world_map = new Array();
world_map[0] = [{desc:"hislivingroom", snd:"inside"}, {desc:"hallway", snd:"inside"}, {desc:"hisbedroom", snd:"inside"}, {desc:"hisbedroom2", snd:"inside"}];
world_map[1] = [{desc:"stairway", snd:"outside"}, {desc:"hisentrance", snd:"outside"}, {desc:"herlivingroom", snd:"inside"}, {desc:"herbedroom", snd:"inside"}];
world_map[2] = [{desc:"nothing"}, {desc:"pool", snd:"pool"}, {desc:"herentrance", snd:"outside"}];
world_text = new Array();
world_interactA = new Array();
world_interactB = new Array();
var i = 0;
while (i < 73) {
world_interactA[i] = new Array();
i++;
}
world_interactA[26][16] = {tx:12, ty:12, l:0};
world_interactA[11][13] = {tx:26, ty:17, l:0};
world_interactA[12][13] = {tx:26, ty:17, l:0};
world_interactA[19][9] = {tx:28, ty:9, l:0};
world_interactA[19][10] = {tx:28, ty:10, l:0};
world_interactA[27][9] = {tx:18, ty:9, l:0};
world_interactA[27][10] = {tx:18, ty:10, l:0};
world_interactA[38][9] = {tx:51, ty:9, l:0};
world_interactA[38][10] = {tx:51, ty:10, l:0};
world_interactA[50][9] = {tx:37, ty:9, l:0, propname:"gstate", sprite:0, propval:"", locktxt:"(I should change into my swimsuit first.)"};
world_interactA[50][10] = {tx:37, ty:10, l:0, propname:"gstate", sprite:0, propval:"", locktxt:"(I should change into my swimsuit first.)"};
world_interactA[72][9] = {tx:37, ty:9, l:0, sprite:0};
world_interactA[72][10] = {tx:37, ty:10, l:0, sprite:0};
world_interactB[72] = new Array();
world_interactB[72][11] = {tx:12, ty:21, l:0};
world_interactA[46][34] = {lock:1, tx:55, ty:26, l:0};
world_interactA[54][27] = {tx:46, ty:35, l:0};
world_interactA[55][27] = {tx:46, ty:35, l:0};
world_interactA[62][20] = {tx:72, ty:21, l:0};
world_interactA[62][21] = {tx:72, ty:22, l:0};
world_interactA[71][21] = {lock:0, locktxt:"No dummy, go hide in the closet!", tx:61, ty:20, l:0};
world_interactA[71][22] = {lock:0, locktxt:"No dummy, go hide in the closet!", tx:61, ty:21, l:0};
world_interactA[55][5] = {touch:0};
world_text[0] = {sprite:0, propname:"gstate", propval:"swimsuit", propvalswimsuit:""};
world_sprites = new Array();
world_sprites[0] = new Array();
world_sprites[0][0] = {tx:58, ty:5, state:1, l:0, gchar:"male", gstate:"bed", gaction:"standS", spd:2, hour:11, minute:2, pdelay:-1};
world_sprites[0][1] = {pa:1};
world_text[1] = [0, "(I'm never going to fall asleep no matter how long I lay here.)", "(It's hot, way too hot. I'll go for a swim even though it's this late...)"];
world_sprites[0][3] = {pxmin:58, pxmax:58, pymin:5, pymax:5, pa:9};
world_text[9] = {cut:"nextnight", func:"change_clocks", funcpass:"9,6"};
world_sprites[0][4] = {pa:11};
world_text[11] = [{sprite:2, propname:"state", propval:3, func:"lock_bedroom", funcpass:"goingswimming"}, "(I wonder if she'll go swimming again, tonight.)"];
world_sprites[0][5] = {pxmin:28, pxmax:35, pymin:34, pymax:39, pa:13};
world_text[13] = {func:"pool_wait", funcpass:1};
world_sprites[0][6] = {pdelay:20, pa:14};
world_text[14] = {sprite:2, propname:"state", propval:4, func:"pool_wait", funcpass:0};
world_sprites[0][8] = {statejump:1, gstate:"bed", tx:58, ty:5, l:0, gaction:"standS"};
world_sprites[0][9] = {pa:21};
world_text[21] = {sprite:1, propname:"state", propval:26};
world_sprites[0][10] = {pxmin:32, pxmax:32, pymin:34, pymax:39, pa:20};
world_text[20] = {func:"too_complex"};
world_sprites[0][11] = {pymin:29, pymax:29, pxmin:22, pxmax:43, pa:22};
world_text[22] = [{func:"change_clocks", funcpass:"9,10"}, "(She must have told her father what happened to scare me off.)", "(She hates me that much.)"];
world_sprites[0][12] = {pxmin:11, pxmax:12, pymin:11, pymax:11, pa:27};
world_text[27] = [{func:"lock_bedroom", funcpass:"unlock"}, "(Or maybe he... saw what happened.)", "(No, he probably would have kicked my ass already had he seen.)"];
world_sprites[0][13] = {pxmin:58, pxmax:58, pymin:5, pymax:5, pa:28};
world_text[28] = [{sprite:2, propname:"state", propval:11, cut:"flashback", func:"change_clocks", funcpass:"10,12"}, "(I guess that concludes my Summer romance...)", "(Molesting a girl in a pool. Can not even brag about that.)", "(Still...)"];
world_sprites[0][14] = {statejump:1, tx:80, ty:5, l:0, gaction:"standS"};
world_sprites[0][16] = {statejump:1, gstate:"bed", tx:58, ty:5, l:0, gaction:"standS"};
world_sprites[0][17] = {pxmin:53, pxmax:54, pymin:9, pymax:10, pa:35};
world_text[35] = [{sprite:2, propname:"state", propval:19, func:"change_clocks", funcpass:"7,6"}, "(Melissa...)"];
world_sprites[0][18] = {pxmin:36, pxmax:36, pymin:9, pymax:10, pa:36};
world_text[36] = {sprite:2, propname:"state", propval:21, func:"createarea"};
world_sprites[0][19] = {pxmin:35, pxmax:35, pymin:9, pymax:10, pa:37};
world_text[37] = [{sprite:2, propname:"state", propval:22}, "I'm going out with friends, tonight.", "Remember, school is tomorrow.", "(How could I possibly forget with how she harps on?)", "The bus arrives at 6:30. Do not oversleep.", "I'll be going now, be good."];
world_sprites[0][20] = {pxmin:11, pxmax:12, pymin:11, pymax:11, pa:38};
world_text[38] = {sprite:2, propname:"state", propval:25};
world_sprites[0][21] = {pxmin:11, pxmax:12, pymin:12, pymax:12, pa:39};
world_text[39] = {sprite:1, propname:"state", propval:47};
world_sprites[0][22] = {pxmin:27, pxmax:40, pymin:17, pymax:18, pa:40};
world_text[40] = [{sprite:1, propname:"state", propval:49}, "Hey, up here.", "Follow me... David."];
world_sprites[0][23] = {pxmin:23, pxmax:42, pymin:28, pymax:28, pa:41};
world_text[41] = {sprite:1, propname:"state", propval:51, func:"change_clocks", funcpass:"7,8"};
world_sprites[0][25] = {pxmin:81, pxmax:81, pymin:22, pymax:23, pa:45};
world_text[45] = {sprite:1, propname:"state", propval:70, func:"lights_off"};
world_sprites[0][27] = {pa:50};
world_text[50] = {sprite:0, propname:"gstate", propval:""};
world_sprites[0][28] = {pxmin:61, pxmax:61, pymin:20, pymax:21, pa:51};
world_text[51] = {sprite:1, propname:"state", propval:78, func:"lock_herhouse", funcpass:1};
world_sprites[0][29] = {pxmin:58, pxmax:58, pymin:20, pymax:21, pa:52};
world_text[52] = [0, "AH! Careful with your teeth... sheesh.", "(Heh, a pain worse than childbirth is what he promised me.)"];
world_sprites[0][30] = {pxmin:46, pxmax:46, pymin:35, pymax:35, pa:53};
world_text[53] = [{func:"lights_on"}, "(What a night.)"];
world_sprites[0][31] = {pxmin:23, pxmax:42, pymin:29, pymax:34, pa:54};
world_text[54] = [{func:"change_clocks", funcpass:"8,9"}, "(A pool at night in the Summer...)", "(A beautiful, vibrant, blue igniting the night scenery...)", "(The lapping water in the breeze kisses my ears...)", "(I'm feeling kinda poetic after my first time, heh.)"];
world_sprites[0][32] = {pxmin:23, pxmax:42, pymin:19, pymax:19, pa:55};
world_text[55] = [0, "(I wonder... are we boyfriend-girlfriend now?)", "(School's tomorrow... she might ignore me completely.)"];
world_sprites[0][33] = {pxmin:11, pxmax:12, pymin:11, pymax:11, pa:56};
world_text[56] = [0, "(Mom is still not home.)"];
world_sprites[0][34] = {pxmin:58, pxmax:58, pymin:5, pymax:5, pa:57};
world_text[57] = [{cut:"bus"}, "(It's not even 9 o'clock but I'm so sleepy.)", "(Go figure.)"];
world_sprites[1] = new Array();
world_sprites[1][0] = {tx:40, ty:34, state:1, l:0, gchar:"female", gstate:"swimsuit", spd:2};
world_sprites[1][1] = {tx:40, ty:34, gaction:"walkN", dir:"u"};
world_sprites[1][2] = {tx:40, ty:31, gaction:"walkW", dir:"l"};
world_sprites[1][3] = {tx:38, ty:31, gaction:"walkS", dir:"d"};
world_sprites[1][4] = {tx:38, ty:36, gaction:"walkW", dir:"l"};
world_sprites[1][5] = {tx:31, ty:36, gaction:"walkN", touchu:3, touchskip:1};
world_text[3] = [0, "Hi."];
world_sprites[1][6] = {tx:31, ty:36, gaction:"walkN", dir:"d", spd:0};
world_sprites[1][7] = {tx:31, ty:39, gaction:"walkN", touchu:4, touchskip:1};
world_text[4] = [0, "Bet you can't catch me."];
world_sprites[1][8] = {tx:31, ty:39, gaction:"walkE", dir:"r", spd:2};
world_sprites[1][9] = {tx:33, ty:39, gaction:"walkN", dir:"u", spd:2};
world_sprites[1][10] = {tx:33, ty:34, gaction:"walkW", dir:"l", spd:2};
world_sprites[1][11] = {tx:29, ty:34, gaction:"walkW", touchr:5, touchskip:1};
world_text[5] = [0, "Ha Ha, where do you think you're touching?"];
world_sprites[1][12] = {tx:28, ty:34, gaction:"walkS", dir:"d"};
world_sprites[1][13] = {tx:28, ty:37, gaction:"walkE", dir:"r"};
world_sprites[1][14] = {tx:31, ty:37, gaction:"walkE", touchl:6, touchskip:1};
world_text[6] = {cut:"fingering"};
world_sprites[1][15] = {tx:31, ty:37, gaction:"walkE", dir:"r", spd:2};
world_sprites[1][16] = {tx:34, ty:37, gaction:"walkN", dir:"u", spd:2};
world_sprites[1][17] = {tx:34, ty:32, gaction:"walkE", dir:"r", spd:3};
world_sprites[1][18] = {tx:38, ty:32, gaction:"walkN", dir:"u"};
world_sprites[1][19] = {tx:38, ty:31, gaction:"walkE", dir:"r"};
world_sprites[1][20] = {tx:40, ty:31, gaction:"walkS", dir:"d"};
world_sprites[1][21] = {tx:40, ty:35, gaction:"standE", pa:7};
world_sprites[1][22] = {tx:40, ty:35, gaction:"walkE", dir:"r"};
world_sprites[1][23] = {tx:46, ty:35, gaction:"standN", pa:8};
world_sprites[1][24] = {statejump:1, tx:44, ty:20, l:0, gaction:"standN"};
world_text[7] = {sprite:2, propname:"state", propval:2, func:"change_clocks", funcpass:"12,1"};
world_text[8] = [{sprite:0, propname:"state", propval:3, func:"lock_bedroom", funcpass:"unlock"}, "(Maybe I went too far...)"];
world_sprites[1][26] = {statejump:1, tx:32, ty:36, l:0, gaction:"standS", gstate:"swim"};
world_sprites[1][27] = {tx:32, ty:34, gaction:"walkS", dir:"d"};
world_sprites[1][28] = {tx:32, ty:39, gaction:"walkN", dir:"u"};
world_sprites[1][29] = {tx:32, ty:34, gaction:"walkS", pa:19};
world_text[19] = {sprite:1, propname:"state", propval:27};
world_sprites[1][30] = {tx:32, gaction:"walkE", dir:"r", spd:2};
world_sprites[1][31] = {tx:34, gaction:"walkN", dir:"u", spd:2};
world_sprites[1][32] = {tx:34, ty:32, gaction:"walkE", dir:"r", spd:3};
world_sprites[1][33] = {tx:38, ty:32, gaction:"walkN", dir:"u"};
world_sprites[1][34] = {tx:38, ty:31, gaction:"walkE", dir:"r"};
world_sprites[1][35] = {tx:40, ty:31, gaction:"walkS", dir:"d"};
world_sprites[1][36] = {tx:40, ty:35, gaction:"walkE", dir:"r"};
world_sprites[1][37] = {tx:46, ty:35, gaction:"standN", pa:23};
world_text[23] = [{sprite:3, propname:"state", propval:2, func:"createarea"}, "(She would not even look at me.)"];
world_sprites[1][38] = {statejump:1, tx:78, ty:11, l:1, gaction:"standN", gstate:""};
world_sprites[1][39] = {tx:78, ty:11, l:1, gaction:"standN", touchx:29, touchskip:1};
world_text[29] = [{func:"lock_bedroom", funcpass:"goingoutsp"}, "Meet me under the stairs."];
world_sprites[1][40] = {tx:72, ty:11, gaction:"walkW", dir:"l", spd:2};
world_sprites[1][41] = {tx:12, ty:21, gaction:"standE", touchr:30, touchskip:1};
world_text[30] = [{sprite:2, propname:"state", propval:13, func:"too_complex2", cut:"kiss"}, "(Hey, umm... I'm sorry about what happened in the pool.)", "(I just thought... Well we were both flirting and...)", "(Well I guess I went too far, so- )"];
world_sprites[1][43] = {tx:12, ty:21, gaction:"walkS", dir:"d", spd:0};
world_sprites[1][44] = {tx:12, ty:22, gaction:"walkE", dir:"r"};
world_sprites[1][45] = {tx:13, ty:22, gaction:"standE", pa:34};
world_text[34] = [{sprite:0, propname:"state", propval:16, cut:"nextnight"}, "Hi... I'm Melissa."];
world_sprites[1][47] = {statejump:1, tx:41, ty:17, l:1, gaction:"standW", gstate:""};
world_sprites[1][48] = {tx:41, ty:17, l:1, gaction:"standW", touchx:58, touchskip:1, taction:"face"};
world_text[58] = [{sprite:0, propname:"state", propval:23}, "Oh, hey.", "Follow me."];
world_sprites[1][49] = {tx:41, ty:17, gaction:"walkS", dir:"d", spd:2};
world_sprites[1][50] = {tx:41, ty:30, gaction:"walkS"};
world_sprites[1][51] = {tx:41, ty:28, gaction:"walkS", dir:"d"};
world_sprites[1][52] = {tx:41, ty:31, gaction:"walkE", dir:"r"};
world_sprites[1][53] = {tx:45, ty:31, gaction:"walkE", dir:"r"};
world_sprites[1][54] = {tx:49, ty:31, gaction:"walkS", dir:"d"};
world_sprites[1][55] = {tx:49, ty:32, gaction:"walkE", dir:"r"};
world_sprites[1][56] = {tx:57, ty:35, gaction:"walkS", dir:"d"};
world_sprites[1][57] = {tx:57, ty:36, gaction:"walkW", dir:"l"};
world_sprites[1][58] = {tx:46, ty:36, gaction:"walkN", dir:"u"};
world_sprites[1][59] = {tx:46, ty:35, l:0, gaction:"standS", touchd:42, touchskip:1};
world_text[42] = [{func:"lock_herhouse", funcpass:0}, "I have something I want to show you.", "In my room.", "Don't look so nervous, my Dad is out on a date."];
world_sprites[1][60] = {tx:46, ty:35, gaction:"walkN", dir:"u"};
world_sprites[1][61] = {tx:55, ty:23, gaction:"walkE", dir:"r"};
world_sprites[1][62] = {tx:57, ty:23, gaction:"walkN", dir:"u"};
world_sprites[1][63] = {tx:57, ty:21, gaction:"walkE", dir:"r"};
world_sprites[1][64] = {tx:78, ty:22, gaction:"walkN", dir:"u"};
world_sprites[1][65] = {tx:78, ty:21, gaction:"standS", touchd:43, touchskip:1};
world_text[43] = [{cut:"sex", func:"too_complex3", sprite:0, propname:"state", propval:25}, "So, umm... This is my room.", "Uh...", "My Dad saw us that time, y'know.", "I would have...", "I would have stuck around longer.", "(What did you want to show me?)", "Stuff..."];
world_sprites[1][66] = {tx:78, ty:21, gaction:"walkE", dir:"r", spd:3};
world_sprites[1][67] = {tx:80, ty:21, gaction:"walkN", dir:"u"};
world_sprites[1][68] = {tx:80, ty:20, gaction:"standS", pa:44};
world_text[44] = [0, "Quick! Get in the closet!"];
world_sprites[1][70] = {statejump:1, tx:78, ty:20, l:0, gstate:"bed"};
world_sprites[1][72] = {statejump:1, tx:78, ty:21, l:0, gstate:"nude", gaction:"standS"};
world_sprites[1][73] = {tx:78, ty:21, gaction:"walkS", dir:"d", spd:0};
world_sprites[1][74] = {tx:78, ty:22, gaction:"walkE", dir:"r"};
world_sprites[1][75] = {tx:79, ty:22, gaction:"standE", pa:48};
world_text[48] = [{func:"lock_herroom", funcpass:"clothes"}, "You should get out of here while you can."];
world_sprites[1][76] = {tx:79, ty:22, gaction:"standW", touchl:49, touchskip:1};
world_text[49] = [{sprite:0, propname:"state", propval:27, func:"lock_herroom", funcpass:0}, "Here's your clothes.", "It was fun. <3"];
world_sprites[1][78] = {statejump:1, tx:78, ty:20, l:0, gstate:"bed"};
world_sprites[2] = new Array();
world_sprites[2][0] = {tx:3, ty:5, state:1, l:0, gchar:"mother", gstate:"chair", gaction:"standS", spd:1};
world_sprites[2][1] = {touchx:2};
world_text[2] = [0, "(Mom is pretty busy.)"];
world_sprites[2][2] = {touchx:10};
world_text[10] = [0, "Go to sleep already."];
world_sprites[2][3] = {touchx:12};
world_text[12] = [0, "Don't stay out too long."];
world_sprites[2][4] = {statejump:1, gstate:"", tx:25, ty:27, l:0, gaction:"standS"};
world_sprites[2][5] = {tx:25, ty:27, gaction:"walkS", dir:"d"};
world_sprites[2][6] = {tx:25, ty:30, gaction:"standS", pa:16};
world_text[16] = [{func:"change_clocks", funcpass:"8,10"}, "What do you think you're doing in there?", "You need to start going to bed on time... There's only 3 days of summer break left."];
world_sprites[2][7] = {tx:25, ty:30, gaction:"walkN", dir:"u"};
world_sprites[2][8] = {tx:25, ty:27, gaction:"standN", pa:17};
world_text[17] = [{sprite:0, propname:"state", propval:8, cut:"nextnight"}, "(She isn't coming.)", "(I'll try again tomorrow.)"];
world_sprites[2][9] = {statejump:1, gstate:"chair", tx:3, ty:5, l:0, gaction:"standN"};
world_sprites[2][10] = {touchx:18};
world_text[18] = [0, "Remember, you need to start sleeping on time."];
world_sprites[2][11] = {statejump:1, gstate:"", tx:5, ty:10, l:0, gaction:"standN"};
world_sprites[2][13] = {statejump:1, gstate:"", tx:22, ty:21, l:0, gaction:"standW"};
world_sprites[2][14] = {tx:22, ty:21, gaction:"walkW", dir:"l", spd:2};
world_sprites[2][15] = {tx:19, ty:21, gaction:"standW", spd:1, pa:32};
world_text[32] = [0, "Where do you think you're going at this time of night?", "You have school the day after tomorrow."];
world_sprites[2][16] = {tx:19, ty:21, gaction:"walkW", dir:"l"};
world_sprites[2][17] = {tx:14, ty:21, gaction:"standW", pa:33};
world_text[33] = [{sprite:1, propname:"state", propval:43}, "Come on, we're going ho-", "Who's this?", "Hello, I'm David's Mother, Leann."];
world_sprites[2][19] = {statejump:1, tx:31, ty:9, l:0, gaction:"standS", gstate:""};
world_sprites[2][21] = {tx:31, ty:9, gaction:"standE"};
world_sprites[2][22] = {tx:31, ty:9, gaction:"walkW", dir:"l", spd:2};
world_sprites[2][23] = {tx:12, ty:9, gaction:"walkS", dir:"d"};
world_sprites[2][24] = {tx:26, ty:17, gaction:"standS"};
world_sprites[2][25] = {statejump:1, tx:76, ty:7, l:0, gaction:"standS"};
world_sprites[3] = new Array();
world_sprites[3][0] = {tx:74, ty:34, state:1, l:0, gchar:"father", gstate:"", gaction:"standW", spd:1};
world_sprites[3][2] = {statejump:1, tx:44, ty:36, l:0};
world_sprites[3][3] = {tx:44, ty:36, gaction:"walkW", dir:"l"};
world_sprites[3][4] = {tx:40, ty:36, gaction:"standW", pa:24};
world_text[24] = [{sprite:0, propname:"live", propval:1}, "You'll feel pain worse than childbirth if I ever see you near my Daughter again.", "Understand, shithead?"];
world_sprites[3][5] = {tx:40, ty:36, gaction:"walkE", dir:"r"};
world_sprites[3][6] = {tx:44, ty:36, gaction:"standE", pa:25};
world_text[25] = [0, "(Crap.)"];
world_sprites[3][7] = {statejump:1, tx:74, ty:34, l:0, gaction:"standW"};
world_sprites[3][9] = {statejump:1, tx:71, ty:22, l:0, gaction:"walkE"};
world_sprites[3][10] = {tx:71, ty:22, gaction:"walkE", dir:"r", spd:0};
world_text[46] = [0, "..."];
world_sprites[3][11] = {tx:72, ty:22, gaction:"standE", pa:46, pdelay:2};
world_sprites[3][12] = {tx:72, ty:22, gaction:"standN", pa:46, pdelay:2};
world_sprites[3][13] = {tx:72, ty:22, gaction:"standE", pa:46, pdelay:2};
world_sprites[3][14] = {tx:72, ty:22, gaction:"walkE", dir:"l"};
world_sprites[3][15] = {tx:59, ty:21, gaction:"standE", pa:47};
world_text[47] = [{sprite:1, propname:"state", propval:72, func:"createarea"}, "She's *hic* asleep. Excuse me.", "Come bring your fine self to my boudoir, darling."];
world_sprites[3][16] = {statejump:1, tx:74, ty:34, l:0, gaction:"standW"};
tlradius = {r:0, l:0, u:0, d:0};
tilep = {w:32, hw:16, h:32, hh:16, zoom:100};
tilearea = {xMin:0, xMax:0, yMin:0, yMax:0};
gamep_spd = [8, 6, 3, 2, 0];
inputs = new Array();
inputs.push({tag:"left", desc:"Move", kcode:74, kcode2:65});
inputs.push({tag:"right", desc:"Move", kcode:76, kcode2:68});
inputs.push({tag:"up", desc:"Move", kcode:73, kcode2:87});
inputs.push({tag:"down", desc:"Move", kcode:75, kcode2:83});
inputs.push({tag:"space", desc:"Action", kcode:32});
inputs.push({tag:"f", desc:"Fullscreen", kcode:70});
inputs.push({tag:"leftclick", desc:"Leftclick", kcode:1});
inputs.push({tag:"middleclick", desc:"Middleclick", kcode:4});
inputs.push({tag:"playtest", desc:"Shift", kcode:16});
inputs.push({tag:"test", desc:"T", kcode:84});
clicker = new Object();
clicker.onMouseWheel = function (delta) {
clicks.spinner = ((delta > 0) ? 1 : -1);
};
Mouse.addListener(clicker);
clicks = new Object();
var i = 0;
while (i < 9) {
var sub = inputs[i];
clicks[sub.tag] = 0;
i++;
}
keyboard_type = 1;
_root.attachMovie("empty", "bgaudio", _root.getNextHighestDepth());
bgaud = new Sound(_root.bgaudio);
fadep = {snd:"", ease:0, timers:-1, timere:-1, vols:-1, vole:-1};
designp = {camx:0, camy:0, l:0};
timer = 0;
designing(0);
finished = 1;
Instance of Symbol 585 MovieClip in Frame 17
on (press) {
_root.designinit();
}
Instance of Symbol 585 MovieClip in Frame 17
on (press) {
_root.exportworld();
}
Frame 25
_root._quality = "HIGH";
this.nextFrame();
Instance of Symbol 608 MovieClip in Frame 25
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
getURL ("http://twitter.com/onehandgames/", "_blank");
}
Instance of Symbol 611 MovieClip in Frame 25
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
getURL ("http://onehandgames.tumblr.com", "_blank");
}
Frame 26
this.stop();
_root.mc.gotoAndStop(finished);
Frame 27
this.prevFrame();
Frame 31
this.nextFrame();
Frame 32
this.stop();
Frame 33
this.prevFrame();
Frame 40
this.nextFrame();
Frame 41
this.stop();
Frame 42
this.prevFrame();
Symbol 66 MovieClip Frame 45
_root.snd_play("splash_him");
Symbol 66 MovieClip Frame 92
stop();
Symbol 80 MovieClip Frame 36
_root.snd_play("splash_him");
Symbol 80 MovieClip Frame 90
stop();
Symbol 98 MovieClip Frame 140
stop();
Symbol 113 MovieClip Frame 43
stop();
Symbol 120 MovieClip Frame 61
stop();
Symbol 231 MovieClip Frame 12
_root.snd_play("splash_her");
Symbol 231 MovieClip Frame 61
stop();
Symbol 241 MovieClip Frame 14
_root.snd_play("splash_her");
Symbol 241 MovieClip Frame 59
stop();
Symbol 259 MovieClip Frame 124
stop();
Symbol 433 MovieClip [loadaudio] Frame 1
stop();
Symbol 463 MovieClip Frame 1
stop();
Symbol 463 MovieClip Frame 2
_root.snd_play("gate_open");
Symbol 494 MovieClip Frame 1
stop();
Symbol 494 MovieClip Frame 2
stop();
Symbol 572 MovieClip Frame 1
stop();
Symbol 579 MovieClip [tiles] Frame 1
stop();
Symbol 579 MovieClip [tiles] Frame 54
if (_root.world_sprites[0][0].gstate == "swimsuit") {
this.mc.gotoAndStop(2);
}
Symbol 579 MovieClip [tiles] Frame 94
this.hour.gotoAndStop(_root.world_sprites[0][0].hour);
this.minute.gotoAndStop(_root.world_sprites[0][0].minute);
Symbol 585 MovieClip Frame 1
this.stop();
Instance of Symbol 600 MovieClip in Symbol 605 MovieClip Frame 1
on (rollOver) {
if (_parent._currentframe == 1) {
_parent.gotoAndStop(2);
} else {
_parent.gotoAndStop(4);
}
}
on (rollOut) {
if (_parent._currentframe == 2) {
_parent.gotoAndStop(1);
} else if (_parent._currentframe == 4) {
_parent.gotoAndStop(3);
}
}
on (press) {
_root.gameinit(1);
}
Symbol 605 MovieClip Frame 2
this.mc.gotoAndStop(1);
Instance of Symbol 600 MovieClip in Symbol 605 MovieClip Frame 3
on (rollOver) {
_parent.gotoAndStop(5);
}
on (rollOut) {
if (_parent._currentframe == 5) {
_parent.gotoAndStop(3);
}
}
on (press) {
_root.frameon("cutscenes");
}
Symbol 605 MovieClip Frame 4
this.mc.gotoAndStop(1);
Symbol 605 MovieClip Frame 5
this.mc.gotoAndStop(1);
Symbol 608 MovieClip Frame 1
stop();
Symbol 611 MovieClip Frame 1
stop();
Symbol 613 MovieClip Frame 1
this.gotoAndStop(_root.keyboard_type);
Instance of Symbol 600 MovieClip in Symbol 613 MovieClip Frame 1
on (press) {
_root.switch_keyboard("qwerty");
_parent.gotoAndStop(1);
_root.anim.mc.gotoAndStop(1);
}
Instance of Symbol 600 MovieClip in Symbol 613 MovieClip Frame 1
on (press) {
_root.switch_keyboard("azerty");
_parent.gotoAndStop(2);
_root.anim.mc.gotoAndStop(2);
}
Instance of Symbol 600 MovieClip in Symbol 613 MovieClip Frame 1
on (press) {
_root.switch_keyboard("dvorak");
_parent.gotoAndStop(3);
_root.anim.mc.gotoAndStop(3);
}
Instance of Symbol 600 MovieClip in Symbol 613 MovieClip Frame 1
on (press) {
_root.switch_keyboard("fallback");
_parent.gotoAndStop(4);
_root.anim.mc.gotoAndStop(4);
}
Symbol 649 MovieClip Frame 1
this.gotoAndStop(_root.keyboard_type);
Symbol 669 MovieClip Frame 1
stop();
Symbol 809 MovieClip Frame 1
_root.snd_play("finger1");
Symbol 809 MovieClip Frame 814
stop();
Symbol 820 MovieClip Frame 1
_root.snd_play("kiss");
Symbol 820 MovieClip Frame 353
stop();
Symbol 963 MovieClip Frame 1
_root.snd_play("sex");
Symbol 963 MovieClip Frame 4485
stop();
Symbol 980 MovieClip Frame 1
_root.snd_play("bus");
Symbol 980 MovieClip Frame 759
stop();
Symbol 981 MovieClip Frame 1
stop();
Instance of Symbol 669 MovieClip in Symbol 981 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_parent.gotoAndStop("bus");
}
Instance of Symbol 669 MovieClip in Symbol 981 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_parent.gotoAndStop("sex");
}
Instance of Symbol 669 MovieClip in Symbol 981 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_parent.gotoAndStop("kiss");
}
Instance of Symbol 669 MovieClip "mc1" in Symbol 981 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (press) {
_parent.gotoAndStop("fingering");
}
Instance of Symbol 585 MovieClip in Symbol 981 MovieClip Frame 1
on (press) {
_root.frameon("menu");
}
Instance of Symbol 585 MovieClip in Symbol 981 MovieClip Frame 14
on (press) {
_root.snd_stop("bus");
_root.snd_stop("finger1");
_root.snd_stop("finger2");
_root.snd_stop("kiss");
_root.snd_stop("sex");
_parent.gotoAndStop(1);
}
Symbol 982 MovieClip Frame 1
stop();
Symbol 983 MovieClip Frame 1
stop();
Symbol 983 MovieClip Frame 61
stop();
Symbol 999 MovieClip Frame 134
_root.snd_play("bus");
Symbol 999 MovieClip Frame 916
stop();
_root.finishgame();
Symbol 1004 MovieClip Frame 95
_root.player_statejump();
Symbol 1004 MovieClip Frame 230
stop();
Symbol 1031 MovieClip Frame 1
_root.snd_play("finger2");
_root.player_statejump();
Symbol 1031 MovieClip Frame 558
stop();
Instance of Symbol 585 MovieClip in Symbol 1032 MovieClip Frame 13
on (press) {
_root.frameon("designer");
}