Amulets & Armor  v1.02
Open Source Game
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Macros | Functions
VIEW

View Drawing. More...

Macros

#define DISTANCE_TO_PICKUP   24
 
#define SECTOR_ANIMATE_FLOOR_FLAG   32
 
#define SECTOR_DIP_FLAG   16
 
#define SECTOR_SHIFT_X_FLAG   4
 
#define SECTOR_SHIFT_Y_FLAG   8
 
#define TIME_BETWEEN_SECTOR_DAMAGE   35
 

Functions

T_void ViewDraw (T_void)
 
T_void ViewEarthquakeOff (T_void)
 
T_void ViewEarthquakeOn (T_word32 duration)
 
T_void ViewFinish (T_void)
 
T_sbyte8 ViewGetDarkSight (T_void)
 
T_3dObjectViewGetMiddleTarget (T_void)
 
T_3dObjectViewGetXYTarget (T_word16 x, T_word16 y)
 
T_void ViewInitialize (T_void)
 
E_Boolean ViewIsAt (T_word16 x, T_word16 y)
 
E_Boolean ViewIsEarthquakeOn (T_void)
 
E_Boolean ViewIsUnderwater (T_void)
 
T_void ViewOffsetView (T_word16 angle)
 
T_void ViewSetDarkSight (T_sbyte8 darkSightValue)
 
T_void ViewSetOverlayHandler (T_viewOverlayHandler handler)
 
T_void ViewSetPalette (T_viewPalette viewPalette)
 
T_void ViewUnderwaterOff (T_void)
 
T_void ViewUnderwaterOn (T_void)
 
T_void ViewUpdateFormsOverViewDisable (void)
 
T_void ViewUpdateFormsOverViewEnable (void)
 
T_void ViewUpdatePlayer (T_void)
 

Detailed Description

View Drawing.

Top level control for drawing the current 3D view.

See Also
http://www.amuletsandarmor.com/AALicense.txt

Macro Definition Documentation

#define DISTANCE_TO_PICKUP   24
#define SECTOR_ANIMATE_FLOOR_FLAG   32
#define SECTOR_DIP_FLAG   16
#define SECTOR_SHIFT_X_FLAG   4
#define SECTOR_SHIFT_Y_FLAG   8
#define TIME_BETWEEN_SECTOR_DAMAGE   35

Function Documentation

T_void ViewDraw ( T_void  )

ViewDraw builds and draws the current view on the screen.

T_void ViewEarthquakeOff ( T_void  )

ViewEarthquakeOff stops the view shake randomly.

T_void ViewEarthquakeOn ( T_word32  duration)

ViewEarthquakeOn makes the view shake randomly.

Parameters
duration– How long the earthquake should occur
T_void ViewFinish ( T_void  )

ViewFinish is called to remove all items used by View that was not used by the map.

T_sbyte8 ViewGetDarkSight ( T_void  )

ViewSetDarkSight returns how well the player sees in the dark.

Returns
0 = Normal, 127=perfect night vision, -127=Blind.
T_3dObject* ViewGetMiddleTarget ( T_void  )

ViewGetMiddleTarget finds the first non-passable target in front of the player.

Returns
Middle target object pointer or NULL if none.
T_3dObject* ViewGetXYTarget ( T_word16  x,
T_word16  y 
)

ViewGetXYTarget finds the first passable or non-passable object under the given x & y pixel location on the screen (relative to the upper left hand corner of the screen)..

Parameters
x– x location from the view 's upperleft
y– y location from the view 's upperleft
Returns
XY target object pointer or NULL if none.
T_void ViewInitialize ( T_void  )

ViewInitialize sets up all the variables necessary for the current 3D view. Calls are made appropriately to the 3D engine.

E_Boolean ViewIsAt ( T_word16  x,
T_word16  y 
)

ViewIsAt checks to see if mouse based XY is over the 3d view.

Parameters
x– x location of mouse X
y– y location of mouse Y
Returns
TRUE = over, FALSE = else
E_Boolean ViewIsEarthquakeOn ( T_void  )

ViewIsEarthquakeOn tells if the earthquake is happening.

E_Boolean ViewIsUnderwater ( T_void  )

ViewIsUnderwater tells if the view is under the water.

T_void ViewOffsetView ( T_word16  angle)
T_void ViewSetDarkSight ( T_sbyte8  darkSightValue)

ViewSetDarkSight sets how well the player sees in the dark.

Parameters
darkSightValue– 0 = Normal, 127=perfect night vision, -127=Blind.
T_void ViewSetOverlayHandler ( T_viewOverlayHandler  handler)

ViewSetOverlayHandler declares a pointer to a function that is to be called each time the view is drawn but not shown. This allows the system to draw objects and images on top of the view as the view is moving.

Parameters
handler– Function to draw overlay
T_void ViewSetPalette ( T_viewPalette  viewPalette)

ViewSetPalette changes the palette used in the view.

Parameters
viewPalette– Palette to use in view
T_void ViewUnderwaterOff ( T_void  )

ViewUnderwaterOff changes the view back into the regular palette.

T_void ViewUnderwaterOn ( T_void  )

ViewUnderwaterOn changes the view to look like it is underwater.

T_void ViewUpdateFormsOverViewDisable ( void  )
T_void ViewUpdateFormsOverViewEnable ( void  )
T_void ViewUpdatePlayer ( T_void  )

ViewUpdatePlayer is the routine called to update all the exterior events that happen, even when a player is standing still.