| @@ -0,0 +1,88 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <object> | ||
| <spriteName>sprPlayer</spriteName> | ||
| <solid>0</solid> | ||
| <visible>-1</visible> | ||
| <depth>0</depth> | ||
| <persistent>0</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>// CONSTANTS // | ||
|
|
||
| WAIT_TIME = 60; | ||
|
|
||
|
|
||
| // VARIABLES // | ||
|
|
||
| waitTime = WAIT_TIME; | ||
| </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>if (waitTime > 0) | ||
| { | ||
| waitTime--; | ||
| } | ||
| else | ||
| { | ||
| if (!instance_exists(objScreenTransition)) | ||
| { | ||
| var st = instance_create(x, y, objScreenTransition); | ||
| st.rm = global.SAVED_ROOM; | ||
| } | ||
| } | ||
| </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/> | ||
| </object> |
| @@ -0,0 +1,95 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <object> | ||
| <spriteName>sprSaveBlock</spriteName> | ||
| <solid>0</solid> | ||
| <visible>-1</visible> | ||
| <depth>0</depth> | ||
| <persistent>0</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>wait = 1; | ||
|
|
||
| </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>if (wait > 0) | ||
| { | ||
| wait--; | ||
| } | ||
| else | ||
| { | ||
| if (wait == 0 && place_meeting(x, y, objPlayer)) | ||
| { | ||
| instance_destroy(); | ||
| } | ||
|
|
||
| wait--; | ||
|
|
||
| if (place_meeting(x, y, objPlayer)) | ||
| { | ||
| global.SAVED_X = objPlayer.x; | ||
| global.SAVED_Y = objPlayer.y; | ||
| global.SAVED_ROOM = room; | ||
|
|
||
| global.SAVED_TO++; | ||
| saveGame(0); | ||
|
|
||
| instance_destroy(); | ||
| } | ||
| } | ||
| </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/> | ||
| </object> |
| @@ -0,0 +1,88 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <object> | ||
| <spriteName>sprSaveBlocker</spriteName> | ||
| <solid>0</solid> | ||
| <visible>-1</visible> | ||
| <depth>0</depth> | ||
| <persistent>0</persistent> | ||
| <parentName>objBlock</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>wait = 1; | ||
|
|
||
| xscale = image_xscale; | ||
| yscale = image_yscale; | ||
|
|
||
|
|
||
| image_xscale = 0; | ||
| image_yscale = 0; | ||
| </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>if (wait > 0) | ||
| { | ||
| wait--; | ||
| } | ||
| else | ||
| { | ||
| if (global.SAVED_TO >= saveNum) | ||
| { | ||
| image_xscale = xscale; | ||
| image_yscale = yscale; | ||
| } | ||
| } | ||
| </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/> | ||
| </object> |
| @@ -0,0 +1,158 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <object> | ||
| <spriteName><undefined></spriteName> | ||
| <solid>0</solid> | ||
| <visible>-1</visible> | ||
| <depth>-9999</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>// CONSTANTS // | ||
|
|
||
| FADE_RATE = 8; | ||
| WAIT_TIME = 5; | ||
|
|
||
|
|
||
| // VARIABLES // | ||
|
|
||
| rm = -1; | ||
| waitTime = WAIT_TIME; | ||
| state = 0; | ||
|
|
||
| alpha = 0; | ||
|
|
||
| if (instance_exists(objPlayer)) | ||
| { | ||
| objPlayer.frozen = true; | ||
| } | ||
| </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>if (state == 0) | ||
| { | ||
| // FADE OUT | ||
| if (alpha < 0.99) | ||
| { | ||
| alpha += smoothMove(alpha, 1, FADE_RATE); | ||
| } | ||
| else | ||
| { | ||
| room_goto(rm); | ||
| state++; | ||
| } | ||
| } | ||
| else if (state == 1) | ||
| { | ||
| // WAIT | ||
| if (waitTime > 0) | ||
| { | ||
| waitTime--; | ||
| } | ||
| else | ||
| { | ||
| state++; | ||
| } | ||
| } | ||
| else | ||
| { | ||
| // FADE IN | ||
| if (alpha > 0.01) | ||
| { | ||
| alpha += smoothMove(alpha, 0, FADE_RATE); | ||
| } | ||
| else | ||
| { | ||
| if (instance_exists(objPlayer)) | ||
| { | ||
| objPlayer.frozen = false; | ||
| } | ||
|
|
||
| instance_destroy(); | ||
| } | ||
| } | ||
| </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_set_color(c_black); | ||
| draw_set_alpha(alpha); | ||
|
|
||
| draw_rectangle(view_xview[0], view_yview[0], view_xview[0] + view_wview[0], view_yview[0] + view_hview[0], false); | ||
|
|
||
| draw_set_color(c_white); | ||
| draw_set_alpha(1); | ||
|
|
||
| </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/> | ||
| </object> |
| @@ -0,0 +1,67 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <room> | ||
| <caption></caption> | ||
| <width>1366</width> | ||
| <height>768</height> | ||
| <vsnap>32</vsnap> | ||
| <hsnap>32</hsnap> | ||
| <isometric>0</isometric> | ||
| <speed>30</speed> | ||
| <persistent>0</persistent> | ||
| <colour>12632256</colour> | ||
| <showcolour>-1</showcolour> | ||
| <code></code> | ||
| <enableViews>-1</enableViews> | ||
| <clearViewBackground>-1</clearViewBackground> | ||
| <clearDisplayBuffer>-1</clearDisplayBuffer> | ||
| <makerSettings> | ||
| <isSet>0</isSet> | ||
| <w>0</w> | ||
| <h>0</h> | ||
| <showGrid>0</showGrid> | ||
| <showObjects>0</showObjects> | ||
| <showTiles>0</showTiles> | ||
| <showBackgrounds>0</showBackgrounds> | ||
| <showForegrounds>0</showForegrounds> | ||
| <showViews>0</showViews> | ||
| <deleteUnderlyingObj>0</deleteUnderlyingObj> | ||
| <deleteUnderlyingTiles>0</deleteUnderlyingTiles> | ||
| <page>0</page> | ||
| <xoffset>0</xoffset> | ||
| <yoffset>0</yoffset> | ||
| </makerSettings> | ||
| <backgrounds> | ||
| <background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/> | ||
| <background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/> | ||
| <background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/> | ||
| <background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/> | ||
| <background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/> | ||
| <background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/> | ||
| <background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/> | ||
| <background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/> | ||
| </backgrounds> | ||
| <views> | ||
| <view visible="-1" objName="" xview="0" yview="0" wview="1366" hview="768" xport="0" yport="0" wport="1366" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/> | ||
| <view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/> | ||
| <view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/> | ||
| <view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/> | ||
| <view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/> | ||
| <view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/> | ||
| <view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/> | ||
| <view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/> | ||
| </views> | ||
| <instances> | ||
| <instance objName="objGameSettings" x="0" y="0" name="inst_71FB02FB" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/> | ||
| <instance objName="objController" x="32" y="0" name="inst_21E2D5FB" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/> | ||
| <instance objName="objMenuController" x="64" y="0" name="inst_B133660D" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/> | ||
| </instances> | ||
| <tiles/> | ||
| <PhysicsWorld>0</PhysicsWorld> | ||
| <PhysicsWorldTop>0</PhysicsWorldTop> | ||
| <PhysicsWorldLeft>0</PhysicsWorldLeft> | ||
| <PhysicsWorldRight>1024</PhysicsWorldRight> | ||
| <PhysicsWorldBottom>768</PhysicsWorldBottom> | ||
| <PhysicsWorldGravityX>0</PhysicsWorldGravityX> | ||
| <PhysicsWorldGravityY>10</PhysicsWorldGravityY> | ||
| <PhysicsWorldPixToMeters>0.100000001490116</PhysicsWorldPixToMeters> | ||
| </room> |
| @@ -0,0 +1,23 @@ | ||
| /* | ||
| SCRIPT: createSaveFile(saveNum); | ||
| PARAMETERS: | ||
| saveNum - the save file to create | ||
| RETURNS: | ||
| nothing | ||
| AUTHOR: Chris Klassen | ||
| DATE: June 24, 2015 | ||
| NOTES: | ||
| This script creates a save file. | ||
| */ | ||
|
|
||
| var saveNum, fileName, file; | ||
| saveNum = argument[0]; | ||
| saveName = "ld33_save_" + string(saveNum) + ".sav"; | ||
|
|
||
| // Create the file | ||
| file = file_text_open_write(saveName); |
| @@ -0,0 +1,23 @@ | ||
| /* | ||
| SCRIPT: deleteSaveFile(saveNum); | ||
| PARAMETERS: | ||
| saveNum - the save file to delete | ||
| RETURNS: | ||
| nothing | ||
| AUTHOR: Chris Klassen | ||
| DATE: June 24, 2015 | ||
| NOTES: | ||
| This script deletes a save file. | ||
| */ | ||
|
|
||
| var saveNum, fileName, file; | ||
| saveNum = argument[0]; | ||
| saveName = "ld33_save_" + string(saveNum) + ".sav"; | ||
|
|
||
| // Create the file | ||
| file_delete(saveName); |
| @@ -0,0 +1,69 @@ | ||
| /* | ||
| SCRIPT: loadGame(saveNum); | ||
| PARAMETERS: | ||
| saveNum - the save file to load from. | ||
| RETURNS: | ||
| boolean - whether or not the file could be loaded | ||
| AUTHOR: Chris Klassen | ||
| DATE: June 24, 2015 | ||
| NOTES: | ||
| This script loads from a specific file. | ||
| */ | ||
|
|
||
| var saveNum, fileName, file; | ||
| saveNum = argument[0]; | ||
| saveName = "ld33_save_" + string(saveNum) + ".sav"; | ||
|
|
||
| // Open the file | ||
| file = file_text_open_read(saveName); | ||
|
|
||
| if (file == -1) | ||
| { | ||
| // File does not exist | ||
| return false; | ||
| } | ||
|
|
||
| // LOADING FROM THE FILE // | ||
| var version, rm; | ||
| rm = -1; | ||
| version = file_text_read_real(file); | ||
| file_text_readln(file); | ||
|
|
||
| // Compare the version number | ||
| if (version != global.SAVEFILE_VERSION) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| // Read the player's room | ||
| global.SAVED_TO = file_text_read_real(file); | ||
| file_text_readln(file); | ||
|
|
||
| // Check if this is a full save | ||
| if (file_text_read_real(file) == 1) | ||
| { | ||
| file_text_readln(file); | ||
|
|
||
| // Read the player's room | ||
| global.SAVED_ROOM = file_text_read_real(file); | ||
| file_text_readln(file); | ||
|
|
||
| // Read the player's x | ||
| global.SAVED_X = file_text_read_real(file); | ||
| file_text_readln(file); | ||
|
|
||
| // Read the player's y | ||
| global.SAVED_Y = file_text_read_real(file); | ||
| file_text_readln(file); | ||
| } | ||
|
|
||
| // Close the file | ||
| file_text_close(file); | ||
|
|
||
|
|
||
| return true; |
| @@ -0,0 +1,22 @@ | ||
| /* | ||
| SCRIPT: saveFileExists(saveNum); | ||
| PARAMETERS: | ||
| saveNum - the save file to check | ||
| RETURNS: | ||
| boolean - whether or not the specified save file exists | ||
| AUTHOR: Chris Klassen | ||
| DATE: June 24, 2015 | ||
| NOTES: | ||
| This script checks to see if a save file exists. | ||
| */ | ||
|
|
||
| var saveNum, saveName, file; | ||
| saveNum = argument[0]; | ||
| saveName = "ld33_save_" + string(saveNum) + ".sav"; | ||
|
|
||
| return (file_exists(saveName)); |
| @@ -0,0 +1,84 @@ | ||
| /* | ||
| SCRIPT: saveGame(saveNum); | ||
| PARAMETERS: | ||
| saveNum - the save file to save to. | ||
| RETURNS: | ||
| boolean - whether or not the file could be saved | ||
| AUTHOR: Chris Klassen | ||
| DATE: June 24, 2015 | ||
| NOTES: | ||
| This script saves the game to a specific file. | ||
| */ | ||
|
|
||
| var saveNum, fileName, file; | ||
| saveNum = argument[0]; | ||
| saveName = "ld33_save_" + string(saveNum) + ".sav"; | ||
|
|
||
| // Delete the previous file | ||
| file_delete(saveName); | ||
|
|
||
| // Open the file | ||
| file = file_text_open_write(saveName); | ||
|
|
||
| if (file == -1) | ||
| { | ||
| // File does not exist | ||
| return false; | ||
| } | ||
|
|
||
| // SAVING TO THE FILE // | ||
|
|
||
| // Write the save file version | ||
| file_text_write_real(file, global.SAVEFILE_VERSION); | ||
| file_text_writeln(file); | ||
|
|
||
| // Write the saved to value | ||
| file_text_write_real(file, global.SAVED_TO); | ||
| file_text_writeln(file); | ||
|
|
||
| if (instance_exists(objPlayer)) | ||
| { | ||
| // Write whether or not this is a full save | ||
| file_text_write_real(file, 1); | ||
| file_text_writeln(file); | ||
|
|
||
| // Write the player's room | ||
| file_text_write_real(file, room); | ||
| file_text_writeln(file); | ||
|
|
||
| // Write the player's x | ||
| file_text_write_real(file, objPlayer.x); | ||
| file_text_writeln(file); | ||
|
|
||
| // Write the player's y | ||
| file_text_write_real(file, objPlayer.y); | ||
| file_text_writeln(file); | ||
| } | ||
| else | ||
| { | ||
| // Write whether or not this is a full save | ||
| file_text_write_real(file, 0); | ||
| file_text_writeln(file); | ||
|
|
||
| // Write the player's room | ||
| file_text_write_real(file, room); | ||
| file_text_writeln(file); | ||
|
|
||
| // Write the player's x | ||
| file_text_write_real(file, 0); | ||
| file_text_writeln(file); | ||
|
|
||
| // Write the player's y | ||
| file_text_write_real(file, 0); | ||
| file_text_writeln(file); | ||
| } | ||
|
|
||
| // Close the file | ||
| file_text_close(file); | ||
|
|
||
| return true; |
| @@ -0,0 +1,25 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <sprite> | ||
| <type>0</type> | ||
| <xorig>32</xorig> | ||
| <yorigin>32</yorigin> | ||
| <colkind>1</colkind> | ||
| <coltolerance>0</coltolerance> | ||
| <sepmasks>0</sepmasks> | ||
| <bboxmode>0</bboxmode> | ||
| <bbox_left>16</bbox_left> | ||
| <bbox_right>47</bbox_right> | ||
| <bbox_top>16</bbox_top> | ||
| <bbox_bottom>47</bbox_bottom> | ||
| <HTile>0</HTile> | ||
| <VTile>0</VTile> | ||
| <TextureGroups> | ||
| <TextureGroup0>0</TextureGroup0> | ||
| </TextureGroups> | ||
| <For3D>0</For3D> | ||
| <width>64</width> | ||
| <height>64</height> | ||
| <frames> | ||
| <frame index="0">images\sprHitbox_0.png</frame> | ||
| </frames> | ||
| </sprite> |
| @@ -0,0 +1,25 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <sprite> | ||
| <type>0</type> | ||
| <xorig>32</xorig> | ||
| <yorigin>32</yorigin> | ||
| <colkind>1</colkind> | ||
| <coltolerance>0</coltolerance> | ||
| <sepmasks>0</sepmasks> | ||
| <bboxmode>0</bboxmode> | ||
| <bbox_left>0</bbox_left> | ||
| <bbox_right>15</bbox_right> | ||
| <bbox_top>16</bbox_top> | ||
| <bbox_bottom>47</bbox_bottom> | ||
| <HTile>0</HTile> | ||
| <VTile>0</VTile> | ||
| <TextureGroups> | ||
| <TextureGroup0>0</TextureGroup0> | ||
| </TextureGroups> | ||
| <For3D>0</For3D> | ||
| <width>64</width> | ||
| <height>64</height> | ||
| <frames> | ||
| <frame index="0">images\sprHitboxShadow_0.png</frame> | ||
| </frames> | ||
| </sprite> |
| @@ -0,0 +1,25 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <sprite> | ||
| <type>0</type> | ||
| <xorig>32</xorig> | ||
| <yorigin>32</yorigin> | ||
| <colkind>1</colkind> | ||
| <coltolerance>0</coltolerance> | ||
| <sepmasks>0</sepmasks> | ||
| <bboxmode>0</bboxmode> | ||
| <bbox_left>16</bbox_left> | ||
| <bbox_right>47</bbox_right> | ||
| <bbox_top>16</bbox_top> | ||
| <bbox_bottom>47</bbox_bottom> | ||
| <HTile>0</HTile> | ||
| <VTile>0</VTile> | ||
| <TextureGroups> | ||
| <TextureGroup0>0</TextureGroup0> | ||
| </TextureGroups> | ||
| <For3D>0</For3D> | ||
| <width>64</width> | ||
| <height>64</height> | ||
| <frames> | ||
| <frame index="0">images\sprHitboxShadowDashing_0.png</frame> | ||
| </frames> | ||
| </sprite> |
| @@ -0,0 +1,25 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <sprite> | ||
| <type>0</type> | ||
| <xorig>0</xorig> | ||
| <yorigin>0</yorigin> | ||
| <colkind>1</colkind> | ||
| <coltolerance>0</coltolerance> | ||
| <sepmasks>0</sepmasks> | ||
| <bboxmode>0</bboxmode> | ||
| <bbox_left>0</bbox_left> | ||
| <bbox_right>31</bbox_right> | ||
| <bbox_top>0</bbox_top> | ||
| <bbox_bottom>31</bbox_bottom> | ||
| <HTile>0</HTile> | ||
| <VTile>0</VTile> | ||
| <TextureGroups> | ||
| <TextureGroup0>0</TextureGroup0> | ||
| </TextureGroups> | ||
| <For3D>0</For3D> | ||
| <width>32</width> | ||
| <height>32</height> | ||
| <frames> | ||
| <frame index="0">images\sprLightFull_0.png</frame> | ||
| </frames> | ||
| </sprite> |
| @@ -0,0 +1,25 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <sprite> | ||
| <type>0</type> | ||
| <xorig>0</xorig> | ||
| <yorigin>0</yorigin> | ||
| <colkind>1</colkind> | ||
| <coltolerance>0</coltolerance> | ||
| <sepmasks>0</sepmasks> | ||
| <bboxmode>0</bboxmode> | ||
| <bbox_left>0</bbox_left> | ||
| <bbox_right>31</bbox_right> | ||
| <bbox_top>0</bbox_top> | ||
| <bbox_bottom>31</bbox_bottom> | ||
| <HTile>0</HTile> | ||
| <VTile>0</VTile> | ||
| <TextureGroups> | ||
| <TextureGroup0>0</TextureGroup0> | ||
| </TextureGroups> | ||
| <For3D>0</For3D> | ||
| <width>32</width> | ||
| <height>32</height> | ||
| <frames> | ||
| <frame index="0">images\sprSaveBlock_0.png</frame> | ||
| </frames> | ||
| </sprite> |
| @@ -0,0 +1,25 @@ | ||
| <!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> | ||
| <sprite> | ||
| <type>0</type> | ||
| <xorig>0</xorig> | ||
| <yorigin>0</yorigin> | ||
| <colkind>1</colkind> | ||
| <coltolerance>0</coltolerance> | ||
| <sepmasks>0</sepmasks> | ||
| <bboxmode>0</bboxmode> | ||
| <bbox_left>0</bbox_left> | ||
| <bbox_right>31</bbox_right> | ||
| <bbox_top>0</bbox_top> | ||
| <bbox_bottom>31</bbox_bottom> | ||
| <HTile>0</HTile> | ||
| <VTile>0</VTile> | ||
| <TextureGroups> | ||
| <TextureGroup0>0</TextureGroup0> | ||
| </TextureGroups> | ||
| <For3D>0</For3D> | ||
| <width>32</width> | ||
| <height>32</height> | ||
| <frames> | ||
| <frame index="0">images\sprSaveBlocker_0.png</frame> | ||
| </frames> | ||
| </sprite> |