1
Fork 0
mirror of https://github.com/Steffo99/stack.git synced 2024-11-29 03:04:19 +00:00

Modalità totem. Aggiunta.

This commit is contained in:
Steffo 2013-07-04 20:09:02 +03:00
parent 891990058e
commit 19cabe5d1b
5 changed files with 511 additions and 0 deletions

View file

@ -67,6 +67,7 @@
<script>scripts\loadX.gml</script> <script>scripts\loadX.gml</script>
<script>scripts\togglefullscreen.gml</script> <script>scripts\togglefullscreen.gml</script>
<script>scripts\m_stack_init.gml</script> <script>scripts\m_stack_init.gml</script>
<script>scripts\m_totem_init.gml</script>
<script>scripts\scrcursor.gml</script> <script>scripts\scrcursor.gml</script>
<script>scripts\rollL.gml</script> <script>scripts\rollL.gml</script>
<script>scripts\rollR.gml</script> <script>scripts\rollR.gml</script>
@ -154,6 +155,7 @@
<object>objects\text</object> <object>objects\text</object>
<object>objects\btotal</object> <object>objects\btotal</object>
<object>objects\stack</object> <object>objects\stack</object>
<object>objects\m_totem</object>
<object>objects\debugobj</object> <object>objects\debugobj</object>
<object>objects\strategy</object> <object>objects\strategy</object>
<object>objects\boom</object> <object>objects\boom</object>
@ -163,6 +165,7 @@
<rooms name="rooms"> <rooms name="rooms">
<room>rooms\menu</room> <room>rooms\menu</room>
<room>rooms\stackselect</room> <room>rooms\stackselect</room>
<room>rooms\t_classic</room>
<room>rooms\boomer</room> <room>rooms\boomer</room>
<rooms name="Stack"> <rooms name="Stack">
<room>rooms\s_twotris</room> <room>rooms\s_twotris</room>

355
objects/m_totem.object.gmx Normal file
View file

@ -0,0 +1,355 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>&lt;undefined&gt;</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
<persistent>0</persistent>
<parentName>&lt;undefined&gt;</parentName>
<maskName>&lt;undefined&gt;</maskName>
<events>
<event eventtype="0" enumb="0">
<action>
<libid>1</libid>
<id>601</id>
<kind>0</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>1</exetype>
<functionname>action_execute_script</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>9</kind>
<script>m_totem_init</script>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="6" enumb="53">
<action>
<libid>1</libid>
<id>612</id>
<kind>0</kind>
<userelative>0</userelative>
<isquestion>-1</isquestion>
<useapplyto>-1</useapplyto>
<exetype>1</exetype>
<functionname>action_if_variable</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>0</kind>
<string>collision_point(mouse_x, mouse_y, o_wall_inv, false, true)</string>
</argument>
<argument>
<kind>0</kind>
<string>-4</string>
</argument>
<argument>
<kind>4</kind>
<string>0</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>422</id>
<kind>1</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>0</useapplyto>
<exetype>0</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
</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>//Fai spawnare l'oggetto selezionato in base all'array stack_names.
instance_create(mouse_x,mouse_y,totem_list[selected]);
//Aggiungi 1 al totale dei totem nel livello.
pile = pile + 1;
//Seleziona un altro totem casuale.
selected = irandom(totalitems);
</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>611</id>
<kind>6</kind>
<userelative>-1</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>-1</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>pile</string>
</argument>
<argument>
<kind>0</kind>
<string>+1</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>424</id>
<kind>2</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>0</useapplyto>
<exetype>0</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
</action>
</event>
<event eventtype="8" enumb="64">
<action>
<libid>1</libid>
<id>526</id>
<kind>0</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>0</useapplyto>
<exetype>1</exetype>
<functionname>action_font</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>12</kind>
<font>points</font>
</argument>
<argument>
<kind>4</kind>
<string>0</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>524</id>
<kind>0</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>0</useapplyto>
<exetype>1</exetype>
<functionname>action_color</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>13</kind>
<string>33023</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>draw_sprite_ext(object_get_sprite(totem_list[selected]), -1, 8, 8, 0.5, 0.5, 0, c_white, 1);
</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>613</id>
<kind>0</kind>
<userelative>-1</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>1</exetype>
<functionname>action_draw_variable</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>0</kind>
<string>pile</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="9" enumb="122">
<action>
<libid>1</libid>
<id>601</id>
<kind>0</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>1</exetype>
<functionname>action_execute_script</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>9</kind>
<script>togglefullscreen</script>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
<argument>
<kind>0</kind>
<string>0</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="9" enumb="77">
<action>
<libid>1</libid>
<id>224</id>
<kind>0</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>0</useapplyto>
<exetype>1</exetype>
<functionname>action_another_room</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>11</kind>
<room>menu</room>
</argument>
</arguments>
</action>
</event>
<event eventtype="9" enumb="18">
<action>
<libid>1</libid>
<id>802</id>
<kind>0</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>0</useapplyto>
<exetype>1</exetype>
<functionname>action_snapshot</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>2</kind>
<string>totem.bmp</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>

65
rooms/t_classic.room.gmx Normal file
View file

@ -0,0 +1,65 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<room>
<caption></caption>
<width>640</width>
<height>480</height>
<vsnap>32</vsnap>
<hsnap>32</hsnap>
<isometric>0</isometric>
<speed>60</speed>
<persistent>0</persistent>
<colour>64</colour>
<showcolour>-1</showcolour>
<code></code>
<enableViews>0</enableViews>
<clearViewBackground>-1</clearViewBackground>
<makerSettings>
<isSet>-1</isSet>
<w>822</w>
<h>454</h>
<showGrid>-1</showGrid>
<showObjects>-1</showObjects>
<showTiles>-1</showTiles>
<showBackgrounds>-1</showBackgrounds>
<showForegrounds>-1</showForegrounds>
<showViews>0</showViews>
<deleteUnderlyingObj>0</deleteUnderlyingObj>
<deleteUnderlyingTiles>-1</deleteUnderlyingTiles>
<page>1</page>
<xoffset>45</xoffset>
<yoffset>136</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="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
</views>
<instances>
<instance objName="o_wall_inv_classic" x="320" y="448" name="inst_F8162FC6" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
<instance objName="m_totem" x="0" y="0" name="inst_9BBB578C" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
</instances>
<tiles/>
<PhysicsWorld>-1</PhysicsWorld>
<PhysicsWorldTop>0</PhysicsWorldTop>
<PhysicsWorldLeft>0</PhysicsWorldLeft>
<PhysicsWorldRight>640</PhysicsWorldRight>
<PhysicsWorldBottom>480</PhysicsWorldBottom>
<PhysicsWorldGravityX>0</PhysicsWorldGravityX>
<PhysicsWorldGravityY>60</PhysicsWorldGravityY>
<PhysicsWorldPixToMeters>0.100000001490116</PhysicsWorldPixToMeters>
</room>

65
rooms/totem.room.gmx Normal file
View file

@ -0,0 +1,65 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<room>
<caption></caption>
<width>640</width>
<height>480</height>
<vsnap>32</vsnap>
<hsnap>32</hsnap>
<isometric>0</isometric>
<speed>60</speed>
<persistent>0</persistent>
<colour>64</colour>
<showcolour>-1</showcolour>
<code></code>
<enableViews>0</enableViews>
<clearViewBackground>-1</clearViewBackground>
<makerSettings>
<isSet>-1</isSet>
<w>830</w>
<h>454</h>
<showGrid>-1</showGrid>
<showObjects>-1</showObjects>
<showTiles>-1</showTiles>
<showBackgrounds>-1</showBackgrounds>
<showForegrounds>-1</showForegrounds>
<showViews>0</showViews>
<deleteUnderlyingObj>0</deleteUnderlyingObj>
<deleteUnderlyingTiles>-1</deleteUnderlyingTiles>
<page>0</page>
<xoffset>45</xoffset>
<yoffset>136</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="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="&lt;undefined&gt;" xview="0" yview="0" wview="640" hview="480" xport="0" yport="0" wport="640" hport="480" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
</views>
<instances>
<instance objName="o_wall_inv_classic" x="320" y="448" name="inst_F8162FC6" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
<instance objName="m_totem" x="0" y="0" name="inst_9BBB578C" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
</instances>
<tiles/>
<PhysicsWorld>-1</PhysicsWorld>
<PhysicsWorldTop>0</PhysicsWorldTop>
<PhysicsWorldLeft>0</PhysicsWorldLeft>
<PhysicsWorldRight>640</PhysicsWorldRight>
<PhysicsWorldBottom>480</PhysicsWorldBottom>
<PhysicsWorldGravityX>0</PhysicsWorldGravityX>
<PhysicsWorldGravityY>60</PhysicsWorldGravityY>
<PhysicsWorldPixToMeters>0.100000001490116</PhysicsWorldPixToMeters>
</room>

23
scripts/m_totem_init.gml Normal file
View file

@ -0,0 +1,23 @@
//Imposta il numero di totem impilati a 0.
pile = 0;
//Seleziona il primo oggetto.
selected = 0;
//Definisci qual è il numero massimo, ad esempio se arriva a stack_names[9] scrivi 9.
totalitems = 9;
//Definisci l'array con tutti i nomi degli oggetti da fare spawnare.
totem_list[0] = o_totem_A;
totem_list[1] = o_totem_B;
totem_list[2] = o_totem_C;
totem_list[3] = o_totem_D;
totem_list[4] = o_totem_E;
totem_list[5] = o_totem_F;
totem_list[6] = o_totem_G;
totem_list[7] = o_totem_H;
totem_list[8] = o_totem_I;
totem_list[9] = o_totem_J;
//Disattiva il mouse normale visto che viene generato automaticamente.
window_set_cursor(cr_none);
//Apri il file di salvataggio, carica il record e chiudi il file.
ini_open("savefile.ini");
m_totem.blocksr = ini_read_real("Totem",room_get_name(room),"0");
ini_close();