Something went wrong. Try again.
Bring back the colours and save the world!
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--><object> <spriteName>sPlayer</spriteName> <solid>0</solid> <visible>-1</visible> <depth>0</depth> <persistent>-1</persistent> <parentName><undefined></parentName> <maskName><undefined></maskName> <events> <event eventtype="0" enumb="0"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Initializeimage_index = 2;image_speed = 0;fireTimer = 0;
//Precalculate possible blend values for the HTML5 versionif(os_browser != browser_not_a_browser) { for(var i = 0; i <= ceil(sqrt(sqr(10) + sqr(4))); i++) { blends[i] = make_color_rgb(255 - i * 10, 255 - i * 10, 255 - i * 10) }}</string> </argument> </arguments> </action> </event> <event eventtype="3" enumb="0"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Land movementvar inst = noone;if(!place_meeting(x, y, Water)) { if(place_meeting(x, y + sign(vspeed) + vspeed, Wall)) { //Vertical movement if(vspeed > 0) { //Land on the floor var snd = audio_play_sound(aLand, 0, false); audio_sound_gain(snd, vspeed / 10, 0); vspeed = 0; y = floor(y); while(!place_meeting(x, y + 1, Wall)) { y++; } instance_create(x - 8 - 8, y, Puff); instance_create(x + 8, y, Puff); } else if(vspeed < 0) { //Hit the ceiling vspeed = 0; y = ceil(y + 1); while(!place_meeting(x, y - 1, Wall)) { y--; } } } if(place_meeting(x, y + 1, Wall)) { //Jump if allowed if(!place_meeting(x, y - 8, Wall)) { if(input_check_pressed(I_JUMP)) { vspeed = -8; audio_sound_gain(audio_play_sound(aJump, 0, false), 0.5, 0); } } } else { vspeed += 0.5; } vspeed = clamp(vspeed, -10, 10); //Speed limits if(input_check(I_HAXIS) != 0) { inst = instance_place(x + input_check(I_HAXIS), y, Crate); if(inst != noone) { //Pre-check for crate movement if(Controller.colours[BROWN]) { crate_precheck(inst); } } } if(!place_meeting(x + input_check(I_HAXIS), y, Wall)) { //Move if no walls hspeed += (input_check(I_HAXIS) * 0.5); if(place_meeting(x, y + 1, Wall)) { if(input_check_pressed(I_HAXIS) > 0) { instance_create(x - 8 - 8, y, Puff); } else if(input_check_pressed(I_HAXIS) < 0) { instance_create(x + 8, y, Puff); } } } if(input_check(I_HAXIS) != sign(hspeed)) { //Slow down hspeed -= sign(hspeed) * min(abs(hspeed), 1); } if(hspeed != 0) { if(inst != noone) { //Move crate if(inst.vspeed == 0) { if(Controller.colours[BROWN]) { hspeed = sign(hspeed) * 2; if(hspeed > 0) { x = floor(x); } else { x = ceil(x); } crate_move(inst); } } } } if(place_meeting(x + hspeed, y, Wall)) { //Stop at walls if(hspeed > 0) { x = floor(x); } else if(hspeed < 0) { x = ceil(x); } while(!place_meeting(x + sign(hspeed), y, Wall)) { x += sign(hspeed); } hspeed = 0; } hspeed = clamp(hspeed, -4, 4); //Speed limits if(place_meeting(x + hspeed, y + vspeed, Wall)) { //Final checks to prevent getting stuck in walls if(!place_meeting(x + hspeed, y, Wall)) { vspeed = 0; } else if(!place_meeting(x, y + vspeed, Wall)) { hspeed = 0; } else if(!place_meeting(x, y, Wall)) { hspeed = 0; vspeed = 0; } else { var m = 1, n = 1; while(place_meeting(x + m, y, Wall)) { m = -sign(m) * ((m < 0) * 1 + (abs(m))); } while(place_meeting(x, y + n, Wall)) { n = -sign(n) * ((n < 0) * 1 + (abs(n))); } if(abs(m) < abs(n)) { x += m; } else { y += n; } } } if(place_meeting(x + hspeed, y + vspeed, Water)) { //Splash if landing in the water if(!place_meeting(x + hspeed, y, Water)) { instance_create(x + hspeed, floor((y + vspeed) / 16) * 16, Splash); var sound = audio_play_sound(aSplash, 0, false); audio_sound_gain(sound, vspeed / 5, 0); audio_sound_gain(sound, 0, (vspeed / 5) * 1000); } }}
</string> </argument> </arguments> </action> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Water movementvar inst = noone;if(place_meeting(x, y, Water)) { fireTimer = 0; //Put out fires if(!irandom(60)) { //Make bubbles sometimes if(place_meeting(x, y - 32, Water)) { instance_create(x + 16 * sign(hspeed), y - 32, Bubble); } } if(!place_meeting(x, y - abs(vspeed - 3), Wall)) { //Jump if(input_check_pressed(I_JUMP)) { vspeed -= 3 audio_sound_gain(audio_play_sound(aSwim, 0, false), 0.15, 0); } } vspeed += 0.2; //Gravity if(place_meeting(x, y + sign(vspeed) + vspeed, Wall)) { //Stop at walls if(vspeed > 0) { //Land on the floor y = floor(y); while(!place_meeting(x, y + 1, Wall)) { y++; } if(vspeed != 0.2) { //Create puffs on the ground ignoring gravity instance_create(x - 8 - 8, y, Puff); instance_create(x + 8, y, Puff); audio_sound_gain(audio_play_sound(aLand, 0, false), 0.2, 0); } vspeed = 0; } else if(vspeed < 0) { //Hit the ceiling vspeed = 0; y = ceil(y + 1); while(!place_meeting(x, y - 1, Wall)) { y--; } } } vspeed = clamp(vspeed, -3, 5); //Speed limits if(input_check(I_HAXIS) != 0) { inst = instance_place(x + input_check(I_HAXIS), y, Crate); //Pre-check for crate movement if(inst != noone) { if(Controller.colours[BROWN]) { crate_precheck(inst); //Move away all crates in the way if possible } } } if(!place_meeting(x + input_check(I_HAXIS), y, Wall)) { //Horizontal movement, if no walls hspeed += (input_check(I_HAXIS) * 0.5); if(place_meeting(x, y + 1, Wall)) { if(input_check_pressed(I_HAXIS) > 0) { instance_create(x - 8 - 8, y, Puff); } else if(input_check_pressed(I_HAXIS) < 0) { instance_create(x + 8, y, Puff); } } } if(input_check(I_HAXIS) != sign(hspeed)) { //Slow down hspeed -= sign(hspeed) * min(abs(hspeed), 1); } if(hspeed != 0) { if(inst != noone) { //Move crate if(inst.vspeed == 0) { if(Controller.colours[BROWN]) { hspeed = sign(hspeed) * 2; if(hspeed > 0) { x = floor(x); } else { x = ceil(x); } crate_move(inst); } } } } if(place_meeting(x + hspeed, y, Wall)) { //Stop at walls if(hspeed > 0) { x = floor(x); } else if(hspeed < 0) { x = ceil(x); } while(!place_meeting(x + sign(hspeed), y, Wall)) { //Perfect collision x += sign(hspeed); } hspeed = 0; } hspeed = clamp(hspeed, -3, 3); //Speed limits if(place_meeting(x + hspeed, y + vspeed, Wall)) { //Final checks to prevent getting stuck in walls if(!place_meeting(x + hspeed, y, Wall)) { vspeed = 0; } else if(!place_meeting(x, y + vspeed, Wall)) { hspeed = 0; } else if(!place_meeting(x, y, Wall)) { hspeed = 0; vspeed = 0; } else { var m = 1, n = 1; while(place_meeting(x + m, y, Wall)) { m = -sign(m) * ((m < 0) * 1 + (abs(m))); } while(place_meeting(x, y + n, Wall)) { n = -sign(n) * ((n < 0) * 1 + (abs(n))); } if(abs(m) < abs(n)) { x += m; } else { y += n; } } }}
</string> </argument> </arguments> </action> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Final 'cutscene'if(room == rLongFall && Controller.state[0] >= S_HAPPYOLDGUY) { var inst = instance_place(x, y, Door); hspeed = -2; vspeed = 0; if(inst != noone) { if(inst.thisID == 0) { if(inst.x >= x) { instance_destroy(); room_goto(rWhite); } } }}</string> </argument> </arguments> </action> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Grid snap and animationimage_index = 2 + floor(abs(hspeed) / 2) * sign(hspeed);var col;if(os_browser == browser_not_a_browser) { col = make_color_rgb(255 - abs(speed) * 10, 255 - abs(speed) * 10, 255 - abs(speed) * 10);} else { col = blends[ceil(abs(speed))];}image_blend = col;</string> </argument> </arguments> </action> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Do fire stuffif(fireTimer) { var inst = instance_place(x, y, Torch); if(inst != noone) { //Light other torches if(!inst.lit) { inst.lit = true; inst.beenlit = true; fireTimer = 0; var snd = audio_play_sound(aFire, 0, false); } } if(fireTimer) { //Go out gradually fireTimer--; }}</string> </argument> </arguments> </action> </event> <event eventtype="7" enumb="4"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Drop the fire in new roomsfireTimer = 0;</string> </argument> </arguments> </action> </event> <event eventtype="8" enumb="0"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///Draw self and fire if there is onedraw_self();if(fireTimer != 0) { draw_sprite_ext(sFire, (fireTimer div 3) % 3, x + (sign(hspeed) * 2 * abs(image_index - 2)), y - 32, 1, 1, 0, c_white, fireTimer / (8 * room_speed));}</string> </argument> </arguments> </action> </event> </events> <PhysicsObject>0</PhysicsObject> <PhysicsObjectSensor>0</PhysicsObjectSensor> <PhysicsObjectShape>0</PhysicsObjectShape> <PhysicsObjectDensity>0.5</PhysicsObjectDensity> <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution> <PhysicsObjectGroup>0</PhysicsObjectGroup> <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping> <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping> <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction> <PhysicsObjectAwake>-1</PhysicsObjectAwake> <PhysicsObjectKinematic>0</PhysicsObjectKinematic> <PhysicsShapePoints> <point>12,32</point> <point>16,16</point> </PhysicsShapePoints></object>