Difference between revisions of "Camera"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
= {19} {{IE_19}} =
 
= {19} {{IE_19}} =
The camera can move around as you wish, as if it were a small copter.
+
{{IE_19_ex}}
  
It's not as complicated as it seems. with some experience, you should be able to get exactly what you want without testing in game.
+
{{IE_19_desc}}
 
 
All the camera values are absolute; not relative. It will only take into acound current values to determine the shortest way to reach destination.
 
 
 
Absolute: Based on point zero (0,0,0)
 
 
 
Relative: Based on last coordinates
 
 
 
 
 
All numbers are suggestions and by no means must you only use those. Anything can range from -32768 to +32767.
 
  
  
Line 18: Line 9:
  
 
== <div id="X_Axis">X axis : Half-Word (signed)</div> ==
 
== <div id="X_Axis">X axis : Half-Word (signed)</div> ==
A tile is 28x28 pixels.
 
 
The camera can move 4x more precisely than the tiles' dimension, so moving a tile away would require 28*4=112.
 
 
If you simply add tiles, it will already be centered, 112 will have 1st tile centered. 168 whoever will be the border between 1st and 2nd tiles.
 
 
*+00112 = 28 pixels = 1 tile (center)
 
*+00112 = 28 pixels = 1 tile (center)
 
*+00392 = 98 pixels = 3,5 tiles (border between tile 3 and 4)
 
*+00392 = 98 pixels = 3,5 tiles (border between tile 3 and 4)
Line 29: Line 15:
  
 
== Z axis : Half-Word (signed) ==
 
== Z axis : Half-Word (signed) ==
Similarly to the X & Y, 1h is 12 pixels high, or 48 units high when using the camera.
 
 
Centering is the determined by given height +2h (48*2=96), which is technically not correct as most units are 3h high (48*3=144) so if you want "perfect" centering, you have to subtract 1/2h (40/2=24).
 
 
*+00048 = 1h (centers 3h)
 
*+00048 = 1h (centers 3h)
 
*+00192 = 4h (centers 6h)
 
*+00192 = 4h (centers 6h)
Line 38: Line 21:
  
 
== Y axis : Half-Word (signed) ==
 
== Y axis : Half-Word (signed) ==
See [[#X Axis]].
+
*+00112 = 28 pixels = 1 tile (center)
 +
*+00392 = 98 pixels = 3,5 tiles (border between tile 3 and 4)
 +
*+00896 = 224 pixels = 8 tiles (center)
  
  

Revision as of 00:19, 3 January 2014

{19} Camera

Camera(+XXXXX,+ZZZZZ,+YYYYY,+ANGLE,+MAPRT,+CAMRT,+ZOOM%,+TIMER)

Moves camera around the map, like a small helicopter.

The coordinates used are the map's absolute coordinates, not relative ones to where the camera currently is.

All entry fields can range from -32768 to 32767. Tiles are 28x28, and Camera motion is 4x more precise, so 112 = 1 Tile. 1h is 12 pixels high, so 48 = 1h, and regular units are 3h tall.


See Also: {1F} Focus{E5} WaitForInstruction(x04,x00)


X axis : Half-Word (signed)

  • +00112 = 28 pixels = 1 tile (center)
  • +00392 = 98 pixels = 3,5 tiles (border between tile 3 and 4)
  • +00896 = 224 pixels = 8 tiles (center)


Z axis : Half-Word (signed)

  • +00048 = 1h (centers 3h)
  • +00192 = 4h (centers 6h)
  • +00384 = 8h (centers 10h)


Y axis : Half-Word (signed)

  • +00112 = 28 pixels = 1 tile (center)
  • +00392 = 98 pixels = 3,5 tiles (border between tile 3 and 4)
  • +00896 = 224 pixels = 8 tiles (center)


Angle : Half-Word (signed)

Note: the base of the map is 0º.

  • +00000 = +00,00º
  • +00302 = +26,54º (often used in regular game)
  • +00341 = +30,00º
  • +01024 = +90,00º (bird view)


Map Rotation : Half-Word (signed)

Positive result = Clockwise Rotation The camera will take the shortest way to the new coordinates based on the previous ones. You should always stay in a range on -180º to 180º to avoid unecessary rotations. I marked -135º, -45º, 0º, 45º and 135º with an asterix (*) to help.

  • -03584 = -315,00º [Map_1]
  • -02560 = -225,00º [Map_2]
  • -01536 = -135,00º [Map_3]*
  • -00512 = -045,00º [Map_4]*
  • +00000 = +000,00º [Map_0]* ((0,0) at bottom left corner)
  • +00512 = +045,00º [Map_1]*
  • +01536 = +135,00º [Map_2]*
  • +02560 = +225,00º [Map_3]
  • +03584 = +315,00º [Map_4]


Camera Rotation : Half-Word (signed)

Positive result = Clockwise Rotation And no, at 180º your characters won't fall from the map like ants. That's why it's the camera that is rotating, and not the map.

  • -02048 = -180,00º
  • -01024 = -090,00º
  • -00512 = -045,00º
  • +00000 = +000,00º
  • +00512 = +045,00º
  • +01024 = +090,00º
  • +02048 = +180,00º


Zoom : Half-Word (signed)

Distance between the camera and target.

This one is rarely ever used since resizing makes the maps, and mostly units, ugly.

  • +02048 = 050%
  • +04096 = 100%
  • +08192 = 200%


Time : Half-Word (signed)

Time required in frames to perform the whole instruction.

  • +00060 = 1,00 seconds
  • +00120 = 2,00 second
  • +00300 = 5,00 seconds