The Game Kit: Global Functions, Constants, and Defined Types
| The Game Kit Table of Contents | The Game Kit Index |
Global Functions, Constants, and Defined Types
Library: libgame.so
The Game Kit has just one global function, set_mouse_position(). It should be called only by an application that has control of the screen through a BWindowScreen object. Otherwise, the kit borrows constants and types defined for graphics card drivers and by other parts of the BeOS. Those that are not documented for the Interface and Support Kits are listed here.
Global Functions
set_mouse_position()
Declared in: <game/WindowScreen.h>
|
Moves the cursor hot spot to (x, y) in the screen coordinate system, where x is a left-to-right index to a pixel column and y is a top-to-bottom index to a pixel row. The origin of the coordinate system is the left top pixel of the display area of the main screen.
This function should be called only while the application has a direct connection to the frame buffer through a BWindowScreen object.
Constants
Control Flags
Declared in: <add-ons/graphics/GraphicsCard.h>
| B_CRT_CONTROL |
| B_GAMMA_CONTROL |
| B_FRAME_BUFFER_CONTROL |
These flags report the driver's ability to control the CRT display, make gamma corrections, and permit nonstandard configurations of the frame buffer. Only the last has any meaning for the Game Kit.
See also: CardInfo()
gs_attributes
Declared in: <game/GameSoundDefs.h>
| Constant | Meaning |
| B_GS_MAIN_GAIN | Main gain control, in decibels. The main gain doesn't support ramping. |
| B_GS_CD_THROUGH_GAIN | Gain on the CD through, in decibels. |
| B_GS_GAIN | Gain on the sound, in decibels. |
| B_GS_PAN | Pan position of the sound. -1.0 for far left, 0 for middle, 1.0 for far right. |
| B_GS_SAMPLING_RATE | Sampling rate in hertz. |
| B_GS_LOOPING | If the attribute's value is nonzero, the sound automatically loops. If it's 0, the sound plays through just once. |
| B_GS_FIRST_PRIVATE_ATTRIBUTE | Beginning of private attribute range |
| B_GS_FIRST_USER_ATTRIBUTE | Beginning of user attribute range. |
These are the various possible game sound attributes. The range between B_GS_FIRST_PRIVATE_ATTRIBUTE and B_GS_FIRST_USER_ATTRIBUTE are reserved; if you need custom attributes, use values B_GS_FIRST_USER_ATTRIBUTE and higher.
Defined Types
frame_buffer_info
Declared in: <add-ons/graphics/GraphicsCard.h>
|
This structure is used to report the current configuration of the frame buffer.
See also: FrameBufferInfo()
graphics_card_hook
Declared in: <add-ons/graphics/GraphicsCard.h>
|
This is the general type declaration for a graphics card hook function. Specific hook functions will in fact declare various sets of arguments and all return a status_t error code rather than void.
See also: CardHookAt(), 37369: head1: Graphics Card Hook Functions
graphics_card_info
Declared in: <add-ons/graphics/GraphicsCard.h>
|
Drivers use this structure to supply information about themselves and the current configuration of the frame buffer to the Application Server and the BWindowScreen class.
See also: CardInfo()
gs_attribute
Declared in: <game/GameSoundDefs.h>
|
Defines an attribute. An attribute consists of an attribute number from gs_attributes, a duration indicating the period of time, in microseconds, over which the attribute's change takes effect, and a target value. Additional flags can be specified for the attribute as well; these vary depending on the attribute.
Currently, there are no flags defined for any of the predefined attributes.
gs_attribute_info
Declared in: <game/GameSoundDefs.h>
|
Describes the possible values the attribute can take. The granularity field indicates how finely the value of the attribute can be controlled, and minimum and maximum specify the minimum and maximum values the attribute can take on.
gs_audio_format
Declared in: <game/GameSoundDefs.h>
|
This structure describes the format of a game sound. format should be one of B_GS_U8, B_GS_S16, B_GS_F, and B_GS_S32.
gs_id
Declared in: <game/GameSoundDefs.h>
|
This type is used for game sound ID numbers.
| The Game Kit Table of Contents | The Game Kit Index |
...in lovely HTML...
for BeOS Release 4.5.
Copyright © 1999 Be, Inc. All rights reserved.
Text last modified