User Tools

Site Tools


en:tutorials:objects:frame

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tutorials:frame [2018/06/21 07:14 (6 years ago)] sausageen:tutorials:objects:frame [2022/12/06 13:38 (16 months ago)] (current) iarwain
Line 3: Line 3:
 ===== Summary ===== ===== Summary =====
  
-See previous basic tutorials for more info about [[object|basic object creation]] and [[clock|clock handling]].+See previous basic tutorials for more info about [[object|basic object creation]] and [[..:clocks:clock|clock handling]].
  
 All objects' positions, scales and rotations are stored in ''orxFRAME'' structures.\\ All objects' positions, scales and rotations are stored in ''orxFRAME'' structures.\\
Line 48: Line 48:
 We then look for the main clock and register our ''Update'' function to it. This function is where we'll manage the inputs to scale/rotate the ''ParentObject'' and make sure it'll follow our mouse cursor. ((Remember to always use the main clock for callbacks that will handle inputs!)) We then look for the main clock and register our ''Update'' function to it. This function is where we'll manage the inputs to scale/rotate the ''ParentObject'' and make sure it'll follow our mouse cursor. ((Remember to always use the main clock for callbacks that will handle inputs!))
  
-<code c>pstClock = orxClock_FindFirst(orx2F(-1.0f), orxCLOCK_TYPE_CORE);+<code c>pstClock = orxClock_Get(orxCLOCK_KZ_CORE);
  
 orxClock_Register(pstClock, Update, orxNULL, orxMODULE_ID_MAIN, orxCLOCK_PRIORITY_NORMAL);</code> orxClock_Register(pstClock, Update, orxNULL, orxMODULE_ID_MAIN, orxCLOCK_PRIORITY_NORMAL);</code>
Line 65: Line 65:
  
 The only thing left to do is to apply scale and rotation according to our inputs.\\ The only thing left to do is to apply scale and rotation according to our inputs.\\
-In our case, we defined the following inputs in [[https://bitbucket.org/orx/orx/src/default/tutorial/bin/03_Frame.ini|03_Frame.ini]]: ''RotateLeft'', ''RotateRight'', ''ScaleUp'' and ''ScaleDown''.\\+In our case, we defined the following inputs in [[https://github.com/orx/orx/blob/master/tutorial/bin/03_Frame.ini|03_Frame.ini]]: ''RotateLeft'', ''RotateRight'', ''ScaleUp'' and ''ScaleDown''.\\
  
 Let's see how we handle them. First, the rotations. Let's see how we handle them. First, the rotations.
Line 98: Line 98:
 ===== Resources ===== ===== Resources =====
  
-Source code: [[https://bitbucket.org/orx/orx/src/default/tutorial/src/03_Frame.c|03_Frame.c]]+Source code: [[https://github.com/orx/orx/blob/master/tutorial/src/03_Frame.c|03_Frame.c]]
  
-Config file: [[https://bitbucket.org/orx/orx/src/default/tutorial/bin/03_Frame.ini|03_Frame.ini]]+Config file: [[https://github.com/orx/orx/blob/master/tutorial/bin/03_Frame.ini|03_Frame.ini]]
en/tutorials/objects/frame.1529590475.txt.gz · Last modified: 2018/06/21 10:14 (6 years ago) (external edit)