Space Fighter
A "shmup" game for Computer Programming C++
Loading...
Searching...
No Matches
KatanaEngine Namespace Reference

Katana Engine is a library of classes, interfaces, and value types that provides a foundation for developing two-dimensional games in C++. More...

Classes

class  Animation
 Represents timing and framing values for texture animations. More...
 
class  AudioSample
 Represents a 2D grid of texels. More...
 
class  Color
 Represents a four-component color using red, green, blue, and alpha data. More...
 
class  Font
 Represents a font or true-type font. More...
 
class  Game
 Base class for all games. Provides graphics initialization, game loop, and rendering code. Inherit from this class when creating your own game. More...
 
struct  GamePadButtons
 Identifies whether buttons on an Xbox Controller are pressed or released. More...
 
struct  GamePadDPad
 Identifies which directions on the directional pad of an Xbox Controller are being pressed. More...
 
struct  GamePadState
 Represents specific information about the state of an Xbox Controller, including the current state of buttons and sticks. More...
 
struct  GamePadThumbSticks
 Structure that represents the position of left and right sticks (thumbsticks) on an Xbox Controller. More...
 
struct  GamePadTriggers
 Structure that defines the position of the left and right triggers on an Xbox Controller. More...
 
class  GameTime
 Contains timing values for game updates and rendering. More...
 
class  IAttachable
 Interface for an object that can have items attached to it. More...
 
class  IAttachment
 Interface for a particle emitter. More...
 
class  InputState
 Handles the state of multiple player input devices. More...
 
class  IParticle
 Interface for a particle. More...
 
class  IParticleInitializer
 Interface for a particle initializer. More...
 
class  IParticleRenderer
 Interface for a particle renderer. More...
 
class  IParticleUpdater
 Interface for a particle updater. More...
 
class  Math
 Provides commonly used floating point functions and constants. More...
 
class  MenuItem
 Class for menu items contained in a MenuScreen. More...
 
class  MenuScreen
 Base class for all game menu screens. More...
 
class  Particle
 Instantiate a basic particle. More...
 
class  ParticleEmitter
 Class for emitting particles. More...
 
class  ParticleInitializer
 Basic particle initializer. More...
 
class  ParticlePool
 Class that manages a pool of particles. More...
 
class  ParticleRenderer
 Basic particle updater. More...
 
class  ParticleUpdater
 Basic particle updater. More...
 
class  Point
 Defines a point in 2D space. More...
 
class  Region
 Defines a rectangular region defined by a point, height, width. More...
 
class  RenderTarget
 Contains a 2D texture that can be used as a render target. More...
 
class  Resource
 Base class for all resource types to be managed by the ResourceManager class. More...
 
class  ResourceManager
 Loads and manages the lifespan of objects from external files. More...
 
class  Screen
 Base class for all game screens and menus. More...
 
class  ScreenManager
 Updates, renders, and manages transitions between instances of the Screen class. More...
 
class  SpriteBatch
 Enables a group of sprites to be drawn using the same settings. More...
 
class  Texture
 Represents a 2D grid of texels. More...
 
class  Vector2
 Defines a vector with 2 components (x and y). More...
 

Typedefs

typedef void(* OnSelect) (MenuScreen *pMenuScreen)
 Callback function for when a menu item is selected.
 
typedef void(* OnExit) (Screen *pScreen)
 Callback function for when Exit() is called on a screen and it begins to transition out.
 
typedef void(* OnRemove) (Screen *pScreen)
 Callback function for when a screen has completely exited and is about to be removed by the screen manager.
 

Enumerations

enum class  ButtonState { PRESSED , RELEASED }
 Defines the possible states of a Button. More...
 
enum class  Button {
  A , B , X , Y ,
  START , BACK , LEFT_STICK , LEFT_SHOULDER ,
  RIGHT_STICK , RIGHT_SHOULDER , DPAD_UP , DPAD_DOWN ,
  DPAD_LEFT , DPAD_RIGHT
}
 Defines the buttons for an Xbox Controller. More...
 
enum class  Key {
  A = 1 , B , C , D ,
  E , F , G , H ,
  I , J , K , L ,
  M , N , O , P ,
  Q , R , S , T ,
  U , V , W , X ,
  Y , Z , NUM_0 , NUM_1 ,
  NUM_2 , NUM_3 , NUM_4 , NUM_5 ,
  NUM_6 , NUM_7 , NUM_8 , NUM_9 ,
  PAD_0 , PAD_1 , PAD_2 , PAD_3 ,
  PAD_4 , PAD_5 , PAD_6 , PAD_7 ,
  PAD_8 , PAD_9 , F1 = 47 , F2 ,
  F3 , F4 , F5 , F6 ,
  F7 , F8 , F9 , F10 ,
  F11 , F12 , ESCAPE = 59 , TILDE ,
  MINUS , EQUALS , BACKSPACE , TAB ,
  OPENBRACE , CLOSEBRACE , ENTER , SEMICOLON ,
  QUOTE , BACKSLASH , BACKSLASH2 , COMMA ,
  FULLSTOP , SLASH , SPACE , INSERT = 76 ,
  DELETE , HOME , END , PGUP ,
  PGDN , Left , Right , UP ,
  DOWN , PAD_SLASH = 86 , PAD_ASTERISK , PAD_MINUS ,
  PAD_PLUS , PAD_DELETE , PAD_ENTER , PRINTSCREEN = 92 ,
  PAUSE , LSHIFT = 215 , RSHIFT , LCTRL ,
  RCTRL , ALT , ALTGR , LWIN ,
  RWIN , MENU , SCROLLLOCK , NUMLOCK ,
  CAPSLOCK , MAX
}
 Defines the keys on a keyboard. More...
 
enum class  MouseButton {
  Left = 1 , Right , Center , BACK ,
  FORWARD
}
 Defines the buttons for a mouse. More...
 
enum class  TextAlign { Left , Center , Right }
 Defines the states for text alignment. More...
 
enum class  SpriteSortMode {
  BackToFront , Deferred , FrontToBack , Immediate ,
  Texture
}
 Defines the methods for sorting sprites before rendering. More...
 
enum class  BlendState { Alpha , Additive }
 Defines the way in which textures blending will be calculated. More...
 

Detailed Description

Katana Engine is a library of classes, interfaces, and value types that provides a foundation for developing two-dimensional games in C++.

Author
Ryan Appel (ryan@.nosp@m.ryan.nosp@m.-appe.nosp@m.l.co.nosp@m.m)

Typedef Documentation

◆ OnExit

typedef void(* KatanaEngine::OnExit) (Screen *pScreen)

Callback function for when Exit() is called on a screen and it begins to transition out.

Remarks
This callback is run automatically when Exit() is called.
See also
Screen::Exit()
OnRemove

Definition at line 27 of file Screen.h.

◆ OnRemove

typedef void(* KatanaEngine::OnRemove) (Screen *pScreen)

Callback function for when a screen has completely exited and is about to be removed by the screen manager.

Remarks
This callback will be run before UnloadContent(). Therefore resourses can be passed before the screen is removed.
See also
ScreenManager
Screen::UnloadContent()
OnExit

Definition at line 36 of file Screen.h.

◆ OnSelect

typedef void(* KatanaEngine::OnSelect) (MenuScreen *pMenuScreen)

Callback function for when a menu item is selected.

See also
MenuItem

Definition at line 24 of file MenuItem.h.

Enumeration Type Documentation

◆ BlendState

enum class KatanaEngine::BlendState
strong

Defines the way in which textures blending will be calculated.

Enumerator
Alpha 

Textures will be blended using premultiplied alpha blending.

Additive 

Textures will be blended using additive blending.

Definition at line 40 of file SpriteBatch.h.

◆ Button

enum class KatanaEngine::Button
strong

Defines the buttons for an Xbox Controller.

See also
ButtonState
GamePadDPad
GamePadTriggers
GamePadThumbSticks
GamePadButtons
GamePadState
Enumerator

Represents the A Button on an Xbox Controller.

Represents the B Button on an Xbox Controller.

Represents the X Button on an Xbox Controller.

Represents the Y Button on an Xbox Controller.

START 

Represents the start Button on an Xbox Controller.

BACK 

Represents the back Button on an Xbox Controller.

LEFT_STICK 

Represents the left GamePadThumbstick on an Xbox Controller.

LEFT_SHOULDER 

Represents the left shoulder Button on an Xbox Controller.

RIGHT_STICK 

Represents the right GamePadThumbstick on an Xbox Controller.

RIGHT_SHOULDER 

Represents the right shoulder Button on an Xbox Controller.

DPAD_UP 

Represents the up section of the GamePadDPad on an Xbox Controller.

DPAD_DOWN 

Represents the down section of the GamePadDPad on an Xbox Controller.

DPAD_LEFT 

Represents the left section of the GamePadDPad on an Xbox Controller.

DPAD_RIGHT 

Represents the right section of the GamePadDPad on an Xbox Controller.

Definition at line 39 of file GamePadState.h.

◆ ButtonState

enum class KatanaEngine::ButtonState
strong

Defines the possible states of a Button.

See also
Button
GamePadDPad
GamePadTriggers
GamePadThumbSticks
GamePadButtons
GamePadState
Enumerator
PRESSED 

Represents the pressed state of a Button.

RELEASED 

Represents the released state of a Button.

Definition at line 26 of file GamePadState.h.

◆ Key

enum class KatanaEngine::Key
strong

Defines the keys on a keyboard.

Enumerator

Represents the A Key on the keyboard.

Represents the B Key on the keyboard.

Represents the C Key on the keyboard.

Represents the D Key on the keyboard.

Represents the E Key on the keyboard.

Represents the F Key on the keyboard.

Represents the G Key on the keyboard.

Represents the H Key on the keyboard.

Represents the I Key on the keyboard.

Represents the J Key on the keyboard.

Represents the K Key on the keyboard.

Represents the L Key on the keyboard.

Represents the M Key on the keyboard.

Represents the N Key on the keyboard.

Represents the O Key on the keyboard.

Represents the P Key on the keyboard.

Represents the Q Key on the keyboard.

Represents the R Key on the keyboard.

Represents the S Key on the keyboard.

Represents the T Key on the keyboard.

Represents the U Key on the keyboard.

Represents the V Key on the keyboard.

Represents the W Key on the keyboard.

Represents the X Key on the keyboard.

Represents the Y Key on the keyboard.

Represents the Z Key on the keyboard.

NUM_0 

Represents the 0 Key on the keyboard.

NUM_1 

Represents the 1 Key on the keyboard.

NUM_2 

Represents the 2 Key on the keyboard.

NUM_3 

Represents the 3 Key on the keyboard.

NUM_4 

Represents the 4 Key on the keyboard.

NUM_5 

Represents the 5 Key on the keyboard.

NUM_6 

Represents the 6 Key on the keyboard.

NUM_7 

Represents the 7 Key on the keyboard.

NUM_8 

Represents the 8 Key on the keyboard.

NUM_9 

Represents the 9 Key on the keyboard.

PAD_0 

Represents the 0 Key on the keyboard number pad.

PAD_1 

Represents the 1 Key on the keyboard number pad.

PAD_2 

Represents the 2 Key on the keyboard number pad.

PAD_3 

Represents the 3 Key on the keyboard number pad.

PAD_4 

Represents the 4 Key on the keyboard number pad.

PAD_5 

Represents the 5 Key on the keyboard number pad.

PAD_6 

Represents the 6 Key on the keyboard number pad.

PAD_7 

Represents the 7 Key on the keyboard number pad.

PAD_8 

Represents the 8 Key on the keyboard number pad.

PAD_9 

Represents the 9 Key on the keyboard number pad.

F1 

Represents the F1 Key on the keyboard.

F2 

Represents the F2 Key on the keyboard.

F3 

Represents the F3 Key on the keyboard.

F4 

Represents the F4 Key on the keyboard.

F5 

Represents the F5 Key on the keyboard.

F6 

Represents the F6 Key on the keyboard.

F7 

Represents the F7 Key on the keyboard.

F8 

Represents the F8 Key on the keyboard.

F9 

Represents the F9 Key on the keyboard.

F10 

Represents the F10 Key on the keyboard.

F11 

Represents the F11 Key on the keyboard.

F12 

Represents the F12 Key on the keyboard.

ESCAPE 

Represents the Escape Key on the keyboard.

TILDE 

Represents the Tilde Key on the keyboard.

MINUS 

Represents the Minus Key on the keyboard.

EQUALS 

Represents the Equals Key on the keyboard.

BACKSPACE 

Represents the Backspace Key on the keyboard.

TAB 

Represents the Tab Key on the keyboard.

OPENBRACE 

Represents the Open Brace Key on the keyboard.

CLOSEBRACE 

Represents the Close Brace Key on the keyboard.

ENTER 

Represents the Enter Key on the keyboard.

SEMICOLON 

Represents the Semicolon Key on the keyboard.

QUOTE 

Represents the Quote Key on the keyboard.

BACKSLASH 

Represents the Backslash Key on the keyboard.

BACKSLASH2 

Represents the Backslash2 Key on the keyboard.

COMMA 

Represents the Comma Key on the keyboard.

FULLSTOP 

Represents the Full Stop Key on the keyboard.

SLASH 

Represents the Slash Key on the keyboard.

SPACE 

Represents the Space Key on the keyboard.

INSERT 

Represents the Space Key on the keyboard.

DELETE 

Represents the Delete Key on the keyboard.

HOME 

Represents the Home Key on the keyboard.

END 

Represents the End Key on the keyboard.

PGUP 

Represents the Page Up Key on the keyboard.

PGDN 

Represents the Page Down Key on the keyboard.

Left 

Represents the Left Key on the keyboard.

Right 

Represents the Right Key on the keyboard.

UP 

Represents the Up Key on the keyboard.

DOWN 

Represents the Down Key on the keyboard.

PAD_SLASH 

Represents the Slash Key on the keyboard number pad.

PAD_ASTERISK 

Represents the Asterisk Key on the keyboard number pad.

PAD_MINUS 

Represents the Minus Key on the keyboard number pad.

PAD_PLUS 

Represents the Plus Key on the keyboard number pad.

PAD_DELETE 

Represents the Delete Key on the keyboard number pad.

PAD_ENTER 

Represents the Enter Key on the keyboard number pad.

PRINTSCREEN 

Represents the Print Screen Key on the keyboard.

PAUSE 

Represents the Pause Key on the keyboard.

LSHIFT 

Represents the Left Shift Key on the keyboard.

RSHIFT 

Represents the Right Shift Key on the keyboard.

LCTRL 

Represents the Left Control Key on the keyboard.

RCTRL 

Represents the Right Control Key on the keyboard.

ALT 

Represents the Alt Key on the keyboard.

ALTGR 

Represents the Alt Graph Key on the keyboard.

LWIN 

Represents the Left Windows Key on the keyboard.

RWIN 

Represents the Right Windows Key on the keyboard.

MENU 

Represents the Menu Key on the keyboard.

SCROLLLOCK 

Represents the Scroll Lock Key on the keyboard.

NUMLOCK 

Represents the Num Lock Key on the keyboard.

CAPSLOCK 

Represents the Caps Lock Key on the keyboard.

MAX 

Represents the Max value for all keys.

Definition at line 21 of file KeyState.h.

◆ MouseButton

enum class KatanaEngine::MouseButton
strong

Defines the buttons for a mouse.

Enumerator
Left 

Represents the Left mouse button.

Right 

Represents the Right mouse button.

Center 

Represents the Center mouse button.

BACK 

Represents the Back mouse button.

FORWARD 

Represents the Foreward mouse button.

Definition at line 21 of file MouseState.h.

◆ SpriteSortMode

enum class KatanaEngine::SpriteSortMode
strong

Defines the methods for sorting sprites before rendering.

See also
SpriteBatch::Begin()
SpriteBatch::Draw()
Enumerator
BackToFront 

Sprites rendered with a lower draw order will render behind those with a higher draw order.

Deferred 

Sprites rendered first will appear behind those rendered later.

FrontToBack 

Sprites rendered with a higher draw order will render behind those with a lower draw order.

Immediate 

Sprites will not be batched, and will draw immediately.

Texture 

Sprites that share a texture will all be rendered together.

Definition at line 30 of file SpriteBatch.h.

◆ TextAlign

enum class KatanaEngine::TextAlign
strong

Defines the states for text alignment.

Enumerator
Left 

Align the text to the left.

Center 

Align the text to the center.

Right 

Align the text to the right.

Definition at line 20 of file SpriteBatch.h.