#include <video.h>
Inheritance diagram for hoa_video::GameVideo:


Public Member Functions | |||||||||||||||||||||||||
| ParticleEffectID | AddParticleEffect (const std::string &particle_effect_filename, float x, float y, bool reload=false) | ||||||||||||||||||||||||
| add a particle effect at the given point x and y | |||||||||||||||||||||||||
| bool | ApplyLightingOverlay () | ||||||||||||||||||||||||
| call after rendering all real lights. This function renders all lights to the lighting overlay texture, Moved into ApplyLightingOverlay call after all map images are drawn to apply lighting. All menu and text rendering should occur AFTER this call, so that they are not affected by lighting. | |||||||||||||||||||||||||
| bool | ApplySettings () | ||||||||||||||||||||||||
| applies any changes to video settings like resolution and fullscreen. If the changes fail, then this function returns false, and the video settings are reset to whatever the last working setting was. | |||||||||||||||||||||||||
| ScreenRect | CalculateScreenRect (float left, float right, float bottom, float top) | ||||||||||||||||||||||||
| converts coordinates given relative to the current coord sys into "screen coordinates", which are in pixel units with (0,0) as the top left and (w-1, h-1) as the lower-right, where w and h are the dimensions of the screen | |||||||||||||||||||||||||
| int32 | CalculateTextWidth (const std::string &font_name, const std::string &text) | ||||||||||||||||||||||||
| calculates the width of the given text if it were rendered with the given font If an invalid font name is passed, returns -1 | |||||||||||||||||||||||||
| int32 | CalculateTextWidth (const std::string &font_name, const hoa_utils::ustring &text) | ||||||||||||||||||||||||
| calculates the width of the given text if it were rendered with the given font If an invalid font name is passed, returns -1 | |||||||||||||||||||||||||
| bool | CaptureScreen (StillImage &id) | ||||||||||||||||||||||||
| captures the contents of the screen and saves it to an image descriptor | |||||||||||||||||||||||||
| bool | Clear (const Color &c) | ||||||||||||||||||||||||
| Clears the screen to a specific color. | |||||||||||||||||||||||||
| bool | Clear () | ||||||||||||||||||||||||
| Clears the contents of the current screen. | |||||||||||||||||||||||||
| void | DEBUG_NextTexSheet () | ||||||||||||||||||||||||
| These cycle through the currently loaded texture sheets so they can be viewed on screen. | |||||||||||||||||||||||||
| void | DEBUG_PrevTexSheet () | ||||||||||||||||||||||||
| bool | DeleteImage (ImageDescriptor &id) | ||||||||||||||||||||||||
| decreases ref count of an image (static or animated) | |||||||||||||||||||||||||
| void | DeleteMenuSkin (std::string &skin_name) | ||||||||||||||||||||||||
| Deletes a menu skin that has been loaded. | |||||||||||||||||||||||||
| void | DisableFog () | ||||||||||||||||||||||||
| disables fog | |||||||||||||||||||||||||
| void | DisablePointLights () | ||||||||||||||||||||||||
| disables point lights | |||||||||||||||||||||||||
| void | DisableSceneLighting () | ||||||||||||||||||||||||
| disables scene lighting | |||||||||||||||||||||||||
| bool | Display (int32 frame_time) | ||||||||||||||||||||||||
| call at end of every frame | |||||||||||||||||||||||||
| bool | Draw (const RenderedLine &line, int32 tex_index) | ||||||||||||||||||||||||
| Draws a rendered line object. | |||||||||||||||||||||||||
| bool | Draw (const RenderedString &string) | ||||||||||||||||||||||||
| Draws a rendered string object. | |||||||||||||||||||||||||
| void | DrawFPS (uint32 frame_time) | ||||||||||||||||||||||||
| Updates the FPS counter and draws the current average FPS to the screen The number of milliseconds that have expired since the last frame was drawn. | |||||||||||||||||||||||||
| bool | DrawFullscreenOverlay (const Color &color) | ||||||||||||||||||||||||
| draws a full screen overlay of the given color | |||||||||||||||||||||||||
| void | DrawGrid (float x, float y, float x_step, float y_step, const Color &c) | ||||||||||||||||||||||||
| draws a line grid. Used by map editor to draw a grid over all the tiles. This function will start at (x,y), and go to (xMax, yMax), with horizontal cell spacing of xstep and vertical cell spacing of ystep. The final parameter is just the color the lines should be drawn | |||||||||||||||||||||||||
| bool | DrawHalo (const StillImage &id, float x, float y, const Color &color=Color(1.0f, 1.0f, 1.0f, 1.0f)) | ||||||||||||||||||||||||
| draws a halo at the given spot | |||||||||||||||||||||||||
| bool | DrawImage (const ImageDescriptor &id, const Color &color) | ||||||||||||||||||||||||
| draws an image which is modulated by a custom color | |||||||||||||||||||||||||
| bool | DrawImage (const ImageDescriptor &id) | ||||||||||||||||||||||||
| draws an image which is modulated by the scene's light color | |||||||||||||||||||||||||
| bool | DrawLight (const StillImage &id, float x, float y, const Color &color=Color(1.0f, 1.0f, 1.0f, 1.0f)) | ||||||||||||||||||||||||
| draws a real light at the given spot | |||||||||||||||||||||||||
| bool | DrawLightning () | ||||||||||||||||||||||||
| call this every frame to draw any lightning effects. You should make sure to place this call in an appropriate spot. In particular, you should draw the lightning before drawing the GUI. | |||||||||||||||||||||||||
| bool | DrawParticleEffects () | ||||||||||||||||||||||||
| draws all active particle effects | |||||||||||||||||||||||||
| void | DrawRectangle (const float width, const float height, const Color &color) | ||||||||||||||||||||||||
| Draws a solid rectangle of a given color. Draws a solid rectangle of a given color. For that, the lower-left corner of the rectangle has to be specified, and also its size. The parameters depends on the current Coordinate System. | |||||||||||||||||||||||||
| bool | DrawText (const hoa_utils::ustring &uText) | ||||||||||||||||||||||||
| unicode version of DrawText(). This should be used for anything in the game which might need to be localized (game dialogue, interface text, etc.) | |||||||||||||||||||||||||
| bool | DrawText (const std::string &text) | ||||||||||||||||||||||||
| non-unicode version of DrawText(). Only use this for debug output or other things which don't have to be localized | |||||||||||||||||||||||||
| bool | EnableFog (const Color &color, float intensity) | ||||||||||||||||||||||||
| sets fog parameters | |||||||||||||||||||||||||
| bool | EnablePointLights () | ||||||||||||||||||||||||
| call if this map uses real lights | |||||||||||||||||||||||||
| bool | EnableSceneLighting (const Color &color) | ||||||||||||||||||||||||
| turn on the ligt color for the scene | |||||||||||||||||||||||||
| void | EnableScissoring (bool enable) | ||||||||||||||||||||||||
| enables scissoring, where you can specify a rectangle of the screen which is affected by rendering operations. MAKE SURE to disable scissoring as soon as you're done using the effect, or all subsequent draw calls will get messed up | |||||||||||||||||||||||||
| void | EnableTextShadow (bool enable) | ||||||||||||||||||||||||
| enables/disables text shadowing | |||||||||||||||||||||||||
| void | FadeScreen (const Color &color, float fade_time) | ||||||||||||||||||||||||
| Begins a screen fade. | |||||||||||||||||||||||||
| const CoordSys & | GetCoordSys () const | ||||||||||||||||||||||||
| return a reference to the coordinates system | |||||||||||||||||||||||||
| StillImage * | GetDefaultCursor () | ||||||||||||||||||||||||
| returns the cursor image | |||||||||||||||||||||||||
| void | GetDrawPosition (float &x, float &y) | ||||||||||||||||||||||||
| Gets the location of the draw cursor. | |||||||||||||||||||||||||
| std::string | GetFont () const | ||||||||||||||||||||||||
| get name of current font | |||||||||||||||||||||||||
| FontProperties * | GetFontProperties (const std::string &font_name) | ||||||||||||||||||||||||
| Get the font properties for a previously loaded font. | |||||||||||||||||||||||||
| int32 | GetFrameChange () | ||||||||||||||||||||||||
| returns the amount of animation frames that have passed since the last call to GameVideo::Display(). This number is based on VIDEO_ANIMATION_FRAME_PERIOD, and is used so that AnimatedImages know how many frames to increment themselves by. | |||||||||||||||||||||||||
| float | GetGamma () | ||||||||||||||||||||||||
| Returns the gamma value. | |||||||||||||||||||||||||
| int32 | GetHeight () const | ||||||||||||||||||||||||
| returns height, (whatever was set with SetResolution) | |||||||||||||||||||||||||
| bool | GetImageInfo (const std::string &file_name, uint32 &rows, uint32 &cols, uint32 &bpp) | ||||||||||||||||||||||||
| Get information of an image file. | |||||||||||||||||||||||||
| int32 | GetNumParticles () | ||||||||||||||||||||||||
| get number of live particles | |||||||||||||||||||||||||
| ParticleEffect * | GetParticleEffect (ParticleEffectID id) | ||||||||||||||||||||||||
| get pointer to an effect given its ID | |||||||||||||||||||||||||
| void | GetPixelSize (double &x, double &y) | ||||||||||||||||||||||||
| Return the pixel size expressed coordinate system units. | |||||||||||||||||||||||||
| Color & | GetSceneLightingColor () | ||||||||||||||||||||||||
| returns the scene lighting color | |||||||||||||||||||||||||
| ScreenRect | GetScissorRect () | ||||||||||||||||||||||||
| returns scissor rect | |||||||||||||||||||||||||
| Color | GetTextColor () const | ||||||||||||||||||||||||
| get current text color | |||||||||||||||||||||||||
| int32 | GetWidth () const | ||||||||||||||||||||||||
| returns width, (whatever was set with SetResolution) | |||||||||||||||||||||||||
| bool | IsFading () | ||||||||||||||||||||||||
| Determines if a fade is currently occurring. | |||||||||||||||||||||||||
| bool | IsFullscreen () | ||||||||||||||||||||||||
| returns true if game is in fullscreen mode | |||||||||||||||||||||||||
| bool | IsMenuSkinAvailable (std::string &skin_name) const | ||||||||||||||||||||||||
| Returns true if there is a menu skin avialable corresponding to the argument name. | |||||||||||||||||||||||||
| bool | IsScissoringEnabled () | ||||||||||||||||||||||||
| returns true if scissoring's enabled | |||||||||||||||||||||||||
| bool | IsShaking () | ||||||||||||||||||||||||
| returns true if screen is shaking | |||||||||||||||||||||||||
| bool | IsValidFont (const std::string &name) | ||||||||||||||||||||||||
| Returns true if a font has already been successfully loaded. | |||||||||||||||||||||||||
| bool | LoadAnimatedImageFromElementsSize (AnimatedImage &image, const std::string &file_name, const uint32 rows, const uint32 cols) | ||||||||||||||||||||||||
| Loads a MultiImage in an AnimatedImage as frames. This function loads an image and cut it in pieces, loading each of that on frames of an AnimatedImage. | |||||||||||||||||||||||||
| bool | LoadAnimatedImageFromNumberElements (AnimatedImage &image, const std::string &file_name, const uint32 rows, const uint32 cols) | ||||||||||||||||||||||||
| Loads a MultiImage in an AnimatedImage as frames. This function loads an image and cut it in pieces, loading each of that on frames of an AnimatedImage. | |||||||||||||||||||||||||
| bool | LoadFont (const std::string &TTF_filename, const std::string &name, uint32 size) | ||||||||||||||||||||||||
| Loads a font from a .ttf file with a specific size. | |||||||||||||||||||||||||
| bool | LoadImage (ImageDescriptor &id) | ||||||||||||||||||||||||
| loads an image (static or animated image). Assumes that you have already called all the appropriate functions to initialize the image. In the case of a static image, this means setting its filename, and possibly other properties like width, height, and color. In the case of an animated image, it means calling AddFrame(). | |||||||||||||||||||||||||
| bool | LoadImageGrayScale (ImageDescriptor &id) | ||||||||||||||||||||||||
| loads an image (static or animated image). Assumes that you have already called all the appropriate functions to initialize the image. In the case of a static image, this means setting its filename, and possibly other properties like width, height, and color. In the case of an animated image, it means calling AddFrame(). The image is loaded in grayscale. | |||||||||||||||||||||||||
| bool | LoadMultiImageFromElementsSize (std::vector< StillImage > &images, const std::string &filename, const uint32 width, const uint32 height) | ||||||||||||||||||||||||
| Loads a MultiImage in a vector of StillImages. This function loads an image and cut it in pieces, loading each of that on separate StillImage objects. It uses the size of the stored elements as input parameters. | |||||||||||||||||||||||||
| bool | LoadMultiImageFromNumberElements (std::vector< StillImage > &images, const std::string &filename, const uint32 rows, const uint32 cols) | ||||||||||||||||||||||||
| Loads a MultiImage in a vector of StillImages. This function loads an image and cut it in pieces, loading each of that on separate StillImage objects. It uses the number of stored elements as input parameters. | |||||||||||||||||||||||||
| bool | MakeLightning (const std::string &lit_file) | ||||||||||||||||||||||||
| call to create lightning effect | |||||||||||||||||||||||||
| bool | MakeScreenshot () | ||||||||||||||||||||||||
| makes a screenshot, saves it as screenshot.jpg in the directory of the game | |||||||||||||||||||||||||
| void | Move (float x, float y) | ||||||||||||||||||||||||
| sets draw position to (x,y) | |||||||||||||||||||||||||
| void | MoveRelative (float dx, float dy) | ||||||||||||||||||||||||
| moves draw position (dx, dy) units | |||||||||||||||||||||||||
| void | PopMatrix () | ||||||||||||||||||||||||
| pops the modelview transformation from the stack. | |||||||||||||||||||||||||
| void | PopState () | ||||||||||||||||||||||||
| pops the most recently pushed video engine state from the stack and restores all of the old settings. | |||||||||||||||||||||||||
| void | PushMatrix () | ||||||||||||||||||||||||
| saves current modelview transformation on to the stack. In English, that means the combined result of calls to Move/MoveRelative/Scale/Rotate | |||||||||||||||||||||||||
| void | PushState () | ||||||||||||||||||||||||
| saves entire state of the video engine on to the stack (all draw flags, coordinate system, scissor rect, viewport, etc.) This is useful for safety purposes between two major parts of code to ensure that one part doesn't inadvertently affect the other. However, it's a very expensive function call. If you only need to push the current transformation, you should use PushMatrix() and PopMatrix() | |||||||||||||||||||||||||
| bool | ReloadTextures () | ||||||||||||||||||||||||
| reloads textures that have been unloaded after a video settings change | |||||||||||||||||||||||||
| RenderedString * | RenderText (const hoa_utils::ustring &txt) | ||||||||||||||||||||||||
| Renders the given string to a drawable object. | |||||||||||||||||||||||||
| void | Rotate (float angle) | ||||||||||||||||||||||||
| rotates images counterclockwise by 'angle' radians | |||||||||||||||||||||||||
| bool | SaveImage (const std::string &file_name, const AnimatedImage &image) const | ||||||||||||||||||||||||
| Saves an AnimatedImage into a file. | |||||||||||||||||||||||||
| bool | SaveImage (const std::string &file_name, const StillImage &image) const | ||||||||||||||||||||||||
| Saves a StillImage into a file. | |||||||||||||||||||||||||
| bool | SaveImage (const std::string &file_name, const std::vector< StillImage * > &image, const uint32 rows, const uint32 columns) const | ||||||||||||||||||||||||
| Saves a vector of images in a single file. | |||||||||||||||||||||||||
| void | Scale (float x, float y) | ||||||||||||||||||||||||
| after you call this, subsequent calls to DrawImage() result in a scaled image | |||||||||||||||||||||||||
| void | SetCoordSys (const CoordSys &coordinate_system) | ||||||||||||||||||||||||
| sets the coordinate system. Default is (0,1024,0,768) | |||||||||||||||||||||||||
| void | SetCoordSys (float left, float right, float bottom, float top) | ||||||||||||||||||||||||
| sets the coordinate system. Default is (0,1024,0,768) | |||||||||||||||||||||||||
| bool | SetDefaultCursor (const std::string &cursor_image_filename) | ||||||||||||||||||||||||
| sets the default cursor to the image in the given filename | |||||||||||||||||||||||||
| void | SetDefaultMenuSkin (std::string &skin_name) | ||||||||||||||||||||||||
| Sets the default menu skin to use. | |||||||||||||||||||||||||
| void | SetDrawFlags (int32 first_flag,...) | ||||||||||||||||||||||||
| sets draw flags (flip, align, blending, etc). Simply pass in as many parameters as you want, as long as the last parameter is a zero. e.g. SetDrawFlags(VIDEO_X_LEFT, VIDEO_Y_CENTER, 0); | |||||||||||||||||||||||||
| bool | SetFont (const std::string &name) | ||||||||||||||||||||||||
| sets current font | |||||||||||||||||||||||||
| bool | SetFontShadowStyle (const std::string &font_name, TEXT_SHADOW_STYLE style) | ||||||||||||||||||||||||
| sets the shadow style to use for the given font | |||||||||||||||||||||||||
| bool | SetFontShadowXOffset (const std::string &font_name, int32 x) | ||||||||||||||||||||||||
| sets the shadow offset to use for a given font. By default, all font shadows are slightly to the right and to the bottom of the text, by an offset of fontHeight / 8. That doesn't always look good though, so use this function to adjust it if you want. | |||||||||||||||||||||||||
| bool | SetFontShadowYOffset (const std::string &font_name, int32 y) | ||||||||||||||||||||||||
| sets the shadow offset to use for a given font. By default, all font shadows are slightly to the right and to the bottom of the text, by an offset of fontHeight / 8. That doesn't always look good though, so use this function to adjust it if you want. | |||||||||||||||||||||||||
| bool | SetFullscreen (bool fullscreen) | ||||||||||||||||||||||||
| sets the game to fullscreen or windowed depending on whether true or false is passed | |||||||||||||||||||||||||
| void | SetGamma (float value) | ||||||||||||||||||||||||
| Sets a new gamma value using SDL_SetGamma(). | |||||||||||||||||||||||||
| bool | SetResolution (int32 width, int32 height) | ||||||||||||||||||||||||
| sets the current resolution to the given width and height | |||||||||||||||||||||||||
| void | SetScissorRect (const ScreenRect &rect) | ||||||||||||||||||||||||
| sets the rectangle to use for scissorring. This version of the function expects a ScreenRect, in other words the coordinates have already been transformed to integer values (pixel unit) with (0,0) as the upper left and (w-1, h-1) as the lower right, where w and h are the current screen dimensions | |||||||||||||||||||||||||
| void | SetScissorRect (float left, float right, float bottom, float top) | ||||||||||||||||||||||||
| sets the rectangle to use for scissorring, where you can specify an area of the screen for draw operations to affect. Note, the coordinates you pass in are based on the current coordinate system, not screen coords | |||||||||||||||||||||||||
| bool | SetTarget (VIDEO_TARGET target) | ||||||||||||||||||||||||
| set the target, i.e. whether the video engine is being used to draw to an SDL window, or a QT widget. (There are some important differences, so the video engine needs to know). | |||||||||||||||||||||||||
| void | SetTextColor (const Color &color) | ||||||||||||||||||||||||
| sets current text color | |||||||||||||||||||||||||
| void | SetTransform (float m[16]) | ||||||||||||||||||||||||
| sets OpenGL transform to contents of 4x4 matrix (16 values) | |||||||||||||||||||||||||
| void | SetViewport (float left, float right, float bottom, float top) | ||||||||||||||||||||||||
| sets the viewport, i.e. the area of the screen that gets drawn to. The default is (0, 100, 0, 100). | |||||||||||||||||||||||||
| bool | ShakeScreen (float force, float falloff_time, ShakeFalloff falloff=VIDEO_FALLOFF_NONE) | ||||||||||||||||||||||||
| shakes the screen | |||||||||||||||||||||||||
| bool | SingletonInitialize () | ||||||||||||||||||||||||
| A method for the inheriting class to implement, which initializes the class. | |||||||||||||||||||||||||
| void | StopAllParticleEffects (bool kill_immediate=false) | ||||||||||||||||||||||||
| stops all active particle effects | |||||||||||||||||||||||||
| bool | StopShaking () | ||||||||||||||||||||||||
| stops all shake effects | |||||||||||||||||||||||||
| StillImage | TilesToObject (std::vector< StillImage > &tiles, std::vector< std::vector< uint32 > > indices) | ||||||||||||||||||||||||
| converts a 2D array of tiles into one big image | |||||||||||||||||||||||||
| bool | ToggleAdvancedDisplay () | ||||||||||||||||||||||||
| toggles advanced information display for video engine, shows things like number of texture switches per frame, etc. | |||||||||||||||||||||||||
| void | ToggleFPS () | ||||||||||||||||||||||||
| toggles the FPS display (on by default) | |||||||||||||||||||||||||
| bool | ToggleFullscreen () | ||||||||||||||||||||||||
| toggles fullscreen on and off | |||||||||||||||||||||||||
| bool | UnloadTextures () | ||||||||||||||||||||||||
| unloads all texture sheets from memory when we lose the GL context, so textures can be properly reloaded | |||||||||||||||||||||||||
| ~GameVideo () | |||||||||||||||||||||||||
Methods for loading of menu skins | |||||||||||||||||||||||||
These methods all attempt to load a menu skin. The differences between these implementations are whether the skin includes a background image, single background color, multiple background colors, or some combination thereof.
| |||||||||||||||||||||||||
| bool | LoadMenuSkin (std::string skin_name, std::string border_image, std::string background_image, Color top_left, Color top_right, Color bottom_left, Color bottom_right, bool make_default=false) | ||||||||||||||||||||||||
| A background image with multiple background colors. | |||||||||||||||||||||||||
| bool | LoadMenuSkin (std::string skin_name, std::string border_image, std::string background_image, Color background_color, bool make_default=false) | ||||||||||||||||||||||||
| A background image with a single background color. | |||||||||||||||||||||||||
| bool | LoadMenuSkin (std::string skin_name, std::string border_image, Color top_left, Color top_right, Color bottom_left, Color bottom_right, bool make_default=false) | ||||||||||||||||||||||||
| No background image with multiple background colors. | |||||||||||||||||||||||||
| bool | LoadMenuSkin (std::string skin_name, std::string border_image, Color background_color, bool make_default=false) | ||||||||||||||||||||||||
| No background image with a single background color. | |||||||||||||||||||||||||
| bool | LoadMenuSkin (std::string skin_name, std::string border_image, std::string background_image, bool make_default=false) | ||||||||||||||||||||||||
| A background image with no background colors. | |||||||||||||||||||||||||
Private Member Functions | |||||||||||||||||||||||||
| bool | _BindTexture (GLuint tex_ID) | ||||||||||||||||||||||||
| wraps a call to glBindTexture(), except it adds checking to eliminate redundant texture binding. Redundancy checks are already implemented by most drivers, but this is a double check "just in case" | |||||||||||||||||||||||||
| bool | _CacheGlyphs (const uint16 *uText, FontProperties *fp) | ||||||||||||||||||||||||
| caches glyph info and textures for rendering | |||||||||||||||||||||||||
| void | _ConvertImageToGrayscale (const private_video::ImageLoadInfo &src, private_video::ImageLoadInfo &dst) const | ||||||||||||||||||||||||
| Converts a color image to a grayscale one; Converts a colored image in a grayscale one. Actually, it converts not an image, but an ImageLoadInfo structure. This is used internally when creating grayscale images. | |||||||||||||||||||||||||
| int32 | _ConvertXAlign (int32 xalign) | ||||||||||||||||||||||||
| converts VIDEO_DRAW_LEFT or VIDEO_DRAW_RIGHT flags to a numerical offset | |||||||||||||||||||||||||
| int32 | _ConvertYAlign (int32 yalign) | ||||||||||||||||||||||||
| converts VIDEO_DRAW_TOP or VIDEO_DRAW_BOTTOM flags to a numerical offset | |||||||||||||||||||||||||
| GLuint | _CreateBlankGLTexture (int32 width, int32 height) | ||||||||||||||||||||||||
| creates a blank texture of the given width and height and returns integer used by OpenGL to refer to this texture. Returns 0xffffffff on failure. | |||||||||||||||||||||||||
| std::string | _CreateTempFilename (const std::string &extension) | ||||||||||||||||||||||||
| returns a filename like TEMP_abcd1234.ext, and each time you call it, it increments the alphanumeric part of the filename. This way, during any particular run of the game, each temp filename is guaranteed to be unique. Assuming you create a new temp file every second, it would take 100,000 years to get from TEMP_00000000 to TEMP_zzzzzzzz | |||||||||||||||||||||||||
| private_video::TexSheet * | _CreateTexSheet (int32 width, int32 height, private_video::TexSheetType type, bool is_static) | ||||||||||||||||||||||||
| creates a texture sheet | |||||||||||||||||||||||||
| bool | _DEBUG_ShowAdvancedStats () | ||||||||||||||||||||||||
| function solely for debugging, which shows number of texture switches made during a frame, and other statistics useful for performance tweaking, etc. | |||||||||||||||||||||||||
| bool | _DEBUG_ShowTexSheet () | ||||||||||||||||||||||||
| function solely for debugging, which displays the currently selected texture sheet. By using DEBUG_NextTexSheet() and DEBUG_PrevTexSheet(), you can change the current texture sheet so the sheet shown by this function cycles through all currently loaded sheets. | |||||||||||||||||||||||||
| bool | _DeleteImage (AnimatedImage &id) | ||||||||||||||||||||||||
| decreases ref count of an animated image | |||||||||||||||||||||||||
| bool | _DeleteImage (StillImage &id) | ||||||||||||||||||||||||
| decreases ref count of an image | |||||||||||||||||||||||||
| bool | _DeleteImage (private_video::Image *const image) | ||||||||||||||||||||||||
| decreases the reference count of an image | |||||||||||||||||||||||||
| bool | _DeleteTempTextures () | ||||||||||||||||||||||||
| deletes the temporary textures from the "temp" folder that were saved by _SaveTempTextures() | |||||||||||||||||||||||||
| bool | _DeleteTexture (GLuint tex_ID) | ||||||||||||||||||||||||
| wraps a call to glDeleteTextures(), except it adds some checking related to eliminating redundant texture binding. | |||||||||||||||||||||||||
| bool | _DrawElement (const private_video::ImageElement &element, const Color *color_array) | ||||||||||||||||||||||||
| draws an image element, i.e. one image within an image descriptor which may contain multiple images | |||||||||||||||||||||||||
| bool | _DrawStillImage (const StillImage &img, const Color &color) | ||||||||||||||||||||||||
| helper function to DrawImage() to do the actual work of drawing an image | |||||||||||||||||||||||||
| bool | _DrawStillImage (const StillImage &img) | ||||||||||||||||||||||||
| helper function to DrawImage() to do the actual work of doing an image | |||||||||||||||||||||||||
| bool | _DrawTextHelper (const uint16 *const uText) | ||||||||||||||||||||||||
| does the actual work of drawing text | |||||||||||||||||||||||||
| RenderedLine * | _GenTexLine (uint16 *line, FontProperties *fp) | ||||||||||||||||||||||||
| generates a texture for a given line | |||||||||||||||||||||||||
| void | _GetBufferFromImage (hoa_video::private_video::ImageLoadInfo &buffer, hoa_video::private_video::Image *img) const | ||||||||||||||||||||||||
| Pass an image (video memory) to a system memory buffer. | |||||||||||||||||||||||||
| void | _GetBufferFromTexture (hoa_video::private_video::ImageLoadInfo &buffer, hoa_video::private_video::TexSheet *texture) const | ||||||||||||||||||||||||
| Pass a texture (video memory) to a system memory buffer. | |||||||||||||||||||||||||
| bool | _GetImageInfoJpeg (const std::string &file_name, uint32 &rows, uint32 &cols, uint32 &bpp) | ||||||||||||||||||||||||
| Get information of a Jpeg file. | |||||||||||||||||||||||||
| bool | _GetImageInfoPng (const std::string &file_name, uint32 &rows, uint32 &cols, uint32 &bpp) | ||||||||||||||||||||||||
| Get information of a Png file. | |||||||||||||||||||||||||
| Color | _GetTextShadowColor (FontProperties *fp) | ||||||||||||||||||||||||
| retrieves the shadow color based on the current color and shadow style | |||||||||||||||||||||||||
| private_video::TexSheet * | _InsertImageInTexSheet (private_video::Image *image, private_video::ImageLoadInfo &load_info, bool is_static) | ||||||||||||||||||||||||
| inserts an image into a texture sheet | |||||||||||||||||||||||||
| bool | _LoadImage (AnimatedImage &id) | ||||||||||||||||||||||||
| loads an animated image. Assumes that you have called AddFrame for all the frames. | |||||||||||||||||||||||||
| bool | _LoadImage (StillImage &id) | ||||||||||||||||||||||||
| loads an image | |||||||||||||||||||||||||
| bool | _LoadImageHelper (StillImage &id) | ||||||||||||||||||||||||
| does the actual work of loading an image | |||||||||||||||||||||||||
| bool | _LoadMultiImage (std::vector< StillImage > &images, const std::string &file_name, const uint32 &rows, const uint32 &cols) | ||||||||||||||||||||||||
| Loads an image file in several StillImages. | |||||||||||||||||||||||||
| bool | _LoadRawImage (const std::string &file_name, private_video::ImageLoadInfo &load_info) | ||||||||||||||||||||||||
| Load raw image data from a file. | |||||||||||||||||||||||||
| bool | _LoadRawImageJpeg (const std::string &file_name, private_video::ImageLoadInfo &load_info) | ||||||||||||||||||||||||
| Load raw image data from a JPG file. | |||||||||||||||||||||||||
| bool | _LoadRawImagePng (const std::string &file_name, private_video::ImageLoadInfo &load_info) | ||||||||||||||||||||||||
| Load raw image data from a PNG file. | |||||||||||||||||||||||||
| void | _PopContext () | ||||||||||||||||||||||||
| restores coord system, draw flags, and transformations | |||||||||||||||||||||||||
| void | _PushContext () | ||||||||||||||||||||||||
| saves coord system, draw flags, and transformations | |||||||||||||||||||||||||
| bool | _ReloadImagesToSheet (private_video::TexSheet *tex_sheet) | ||||||||||||||||||||||||
| loop through all currently loaded images and if they belong to the given tex sheet, reload them into it | |||||||||||||||||||||||||
| bool | _RemoveImage (private_video::Image *image_to_remove) | ||||||||||||||||||||||||
| removes the image from the STL map with the same pointer as the one passed in. Returns false on failure | |||||||||||||||||||||||||
| bool | _RemoveSheet (private_video::TexSheet *sheet_to_remove) | ||||||||||||||||||||||||
| removes a texture sheet from our vector of sheets and deletes it | |||||||||||||||||||||||||
| void | _RGBAToRGB (const private_video::ImageLoadInfo &src, private_video::ImageLoadInfo &dst) const | ||||||||||||||||||||||||
| Converts a RGBA buffer to a RGB one. | |||||||||||||||||||||||||
| float | _RoundForce (float force) | ||||||||||||||||||||||||
| rounds a force value to the nearest integer. Rounding is based on probability. For example the number 2.85 has an 85% chance of rounding to 3 and a 15% chance of rounding to 2 | |||||||||||||||||||||||||
| bool | _SaveJpeg (const std::string &file_name, hoa_video::private_video::ImageLoadInfo &info) const | ||||||||||||||||||||||||
| Saves Raw data in a Jpeg file. | |||||||||||||||||||||||||
| bool | _SavePng (const std::string &file_name, hoa_video::private_video::ImageLoadInfo &info) const | ||||||||||||||||||||||||
| Saves Raw data in a Png file. | |||||||||||||||||||||||||
| bool | _SaveTempTextures () | ||||||||||||||||||||||||
| saves temporary textures to disk, in other words, textures which were not loaded to a file. This is used when the GL context is being destroyed, perhaps because we are switching from windowed to fullscreen. So, we need to save all textures to disk so we can reload them later. | |||||||||||||||||||||||||
| int32 | _ScreenCoordX (float x) | ||||||||||||||||||||||||
| takes an x value and converts it into screen coordinates | |||||||||||||||||||||||||
| int32 | _ScreenCoordY (float y) | ||||||||||||||||||||||||
| takes an x value and converts it into screen coordinates | |||||||||||||||||||||||||
| bool | _ShouldSmooth () | ||||||||||||||||||||||||
| Whether textures should be smoothed for non natural resolution. | |||||||||||||||||||||||||
| void | _UpdateShake (int32 frame_time) | ||||||||||||||||||||||||
| updates the shaking effect | |||||||||||||||||||||||||
| GameVideo () | |||||||||||||||||||||||||
Private Attributes | |||||||||||||||||||||||||
| bool | _advanced_display | ||||||||||||||||||||||||
| advanced display flag. If true, info about the video engine is shown on screen | |||||||||||||||||||||||||
| int32 | _animation_counter | ||||||||||||||||||||||||
| counter to keep track of milliseconds since game started for animations | |||||||||||||||||||||||||
| int8 | _blend | ||||||||||||||||||||||||
| blend flag which specifies normal alpha blending | |||||||||||||||||||||||||
| std::stack< private_video::Context > | _context_stack | ||||||||||||||||||||||||
| stack containing context, i.e. draw flags plus coord sys. Context is pushed and popped by any GameVideo functions that clobber these settings | |||||||||||||||||||||||||
| CoordSys | _coord_sys | ||||||||||||||||||||||||
| current coordinate system | |||||||||||||||||||||||||
| int32 | _current_debug_TexSheet | ||||||||||||||||||||||||
| current debug texture sheet | |||||||||||||||||||||||||
| std::string | _current_font | ||||||||||||||||||||||||
| current font name | |||||||||||||||||||||||||
| int32 | _current_frame_diff | ||||||||||||||||||||||||
| keeps track of the number of frames animations should increment by for the current frame | |||||||||||||||||||||||||
| Color | _current_text_color | ||||||||||||||||||||||||
| current text color | |||||||||||||||||||||||||
| StillImage | _default_menu_cursor | ||||||||||||||||||||||||
| image which is to be used as the cursor | |||||||||||||||||||||||||
| private_video::ScreenFader | _fader | ||||||||||||||||||||||||
| fader class which implements screen fading | |||||||||||||||||||||||||
| Color | _fog_color | ||||||||||||||||||||||||
| current fog color (set by SetFog()) | |||||||||||||||||||||||||
| float | _fog_intensity | ||||||||||||||||||||||||
| current fog intensity (set by SetFog()) | |||||||||||||||||||||||||
| std::map< std::string, FontProperties * > | _font_map | ||||||||||||||||||||||||
| STL map containing properties for each font (includeing TTF_Font *). | |||||||||||||||||||||||||
| bool | _fps_display | ||||||||||||||||||||||||
| fps display flag. If true, FPS is displayed | |||||||||||||||||||||||||
| bool | _fullscreen | ||||||||||||||||||||||||
| true if game is currently running fullscreen | |||||||||||||||||||||||||
| float | _gamma_value | ||||||||||||||||||||||||
| Current gamma value. | |||||||||||||||||||||||||
| int32 | _height | ||||||||||||||||||||||||
| current screen height | |||||||||||||||||||||||||
| std::map< std::string, private_video::Image * > | _images | ||||||||||||||||||||||||
| STL map containing all the images currently being managed by the video engine. | |||||||||||||||||||||||||
| GLuint | _last_tex_ID | ||||||||||||||||||||||||
| ID of the last texture that was bound. Used to eliminate redundant binding of textures. | |||||||||||||||||||||||||
| Color | _light_color | ||||||||||||||||||||||||
| current scene lighting color (essentially just modulates vertex colors of all the images) | |||||||||||||||||||||||||
| GLuint | _light_overlay | ||||||||||||||||||||||||
| lighting overlay texture | |||||||||||||||||||||||||
| bool | _lightning_active | ||||||||||||||||||||||||
| true if a lightning effect is active | |||||||||||||||||||||||||
| int32 | _lightning_current_time | ||||||||||||||||||||||||
| current time of lightning effect (time since it started) | |||||||||||||||||||||||||
| std::vector< float > | _lightning_data | ||||||||||||||||||||||||
| intensity data for lightning effect | |||||||||||||||||||||||||
| int32 | _lightning_end_time | ||||||||||||||||||||||||
| how many milliseconds to do the lightning effect for | |||||||||||||||||||||||||
| char | _next_temp_file [9] | ||||||||||||||||||||||||
| eight character name for temp files that increments every time you create a new one so they are always unique | |||||||||||||||||||||||||
| int32 | _num_draw_calls | ||||||||||||||||||||||||
| keep track of number of draw calls per frame | |||||||||||||||||||||||||
| int32 | _num_tex_switches | ||||||||||||||||||||||||
| keep track of number of texture switches per frame | |||||||||||||||||||||||||
| std::map< std::string, ParticleEffectDef * > | _particle_effect_defs | ||||||||||||||||||||||||
| STL map containing all loaded particle effect definitions. | |||||||||||||||||||||||||
| private_video::ParticleManager | _particle_manager | ||||||||||||||||||||||||
| particle manager, does dirty work of managing particle effects | |||||||||||||||||||||||||
| StillImage | _rectangle_image | ||||||||||||||||||||||||
| Image used for rendering rectangles. | |||||||||||||||||||||||||
| bool | _scissor_enabled | ||||||||||||||||||||||||
| is scissoring enabled or not | |||||||||||||||||||||||||
| ScreenRect | _scissor_rect | ||||||||||||||||||||||||
| current scissor rectangle | |||||||||||||||||||||||||
| std::list< private_video::ShakeForce > | _shake_forces | ||||||||||||||||||||||||
| current shake forces affecting screen | |||||||||||||||||||||||||
| VIDEO_TARGET | _target | ||||||||||||||||||||||||
| target (QT widget or SDL window) | |||||||||||||||||||||||||
| bool | _temp_fullscreen | ||||||||||||||||||||||||
| holds the desired fullscreen status (true=fullscreen, false=windowed). Not actually applied until ApplySettings() is called | |||||||||||||||||||||||||
| int32 | _temp_height | ||||||||||||||||||||||||
| holds the desired screen height. Not actually applied until ApplySettings() is called | |||||||||||||||||||||||||
| int32 | _temp_width | ||||||||||||||||||||||||
| holds the desired screen width. Not actually applied until ApplySettings() is called | |||||||||||||||||||||||||
| std::vector< private_video::TexSheet * > | _tex_sheets | ||||||||||||||||||||||||
| vector containing all texture sheets currently being managed by the video engine | |||||||||||||||||||||||||
| bool | _text_shadow | ||||||||||||||||||||||||
| if true, text shadow effect is enabled | |||||||||||||||||||||||||
| bool | _uses_lights | ||||||||||||||||||||||||
| true if real lights are enabled | |||||||||||||||||||||||||
| ScreenRect | _viewport | ||||||||||||||||||||||||
| current viewport | |||||||||||||||||||||||||
| int32 | _width | ||||||||||||||||||||||||
| current screen width | |||||||||||||||||||||||||
| float | _x | ||||||||||||||||||||||||
| the current draw cursor position | |||||||||||||||||||||||||
| int8 | _x_align | ||||||||||||||||||||||||
| x align flag which tells if images should be left, center, or right aligned | |||||||||||||||||||||||||
| int8 | _x_flip | ||||||||||||||||||||||||
| x flip flag. true if images should be flipped horizontally | |||||||||||||||||||||||||
| float | _x_shake | ||||||||||||||||||||||||
| X offset to shake the screen by (if any). | |||||||||||||||||||||||||
| float | _y | ||||||||||||||||||||||||
| int8 | _y_align | ||||||||||||||||||||||||
| y align flag which tells if images should be top, center, or bottom aligned | |||||||||||||||||||||||||
| int8 | _y_flip | ||||||||||||||||||||||||
| y flip flag. true if images should be flipped vertically | |||||||||||||||||||||||||
| float | _y_shake | ||||||||||||||||||||||||
| Y offset to shake the screen by (if any). | |||||||||||||||||||||||||
Friends | |||||||||||||||||||||||||
| class | hoa_utils::Singleton< GameVideo > | ||||||||||||||||||||||||
| class | MenuWindow | ||||||||||||||||||||||||
| class | OptionBox | ||||||||||||||||||||||||
| class | private_video::FixedTexMemMgr | ||||||||||||||||||||||||
| class | private_video::GUIElement | ||||||||||||||||||||||||
| class | private_video::GUISupervisor | ||||||||||||||||||||||||
| class | private_video::ParticleSystem | ||||||||||||||||||||||||
| class | private_video::TexSheet | ||||||||||||||||||||||||
| class | private_video::VariableTexMemMgr | ||||||||||||||||||||||||
| class | RenderedString | ||||||||||||||||||||||||
| class | StillImage | ||||||||||||||||||||||||
| class | TextBox | ||||||||||||||||||||||||
****************************************************************************
This is one of the largest classes in the Allacrost engine. Because it is so large, the implementation of many of the methods for this class are split up into multiple .cpp source files in the video code directory.
Definition at line 197 of file video.h.
| hoa_video::GameVideo::~GameVideo | ( | ) |
Definition at line 410 of file video.cpp.
References _font_map, _images, _particle_manager, _tex_sheets, hoa_video::private_video::ParticleManager::Destroy(), hoa_video::private_video::GUIManager, hoa_utils::Singleton< T >::SingletonDestroy(), and hoa_video::VIDEO_DEBUG.
Here is the call graph for this function:

| hoa_video::GameVideo::GameVideo | ( | ) | [private] |
Definition at line 112 of file video.cpp.
References _advanced_display, _animation_counter, _blend, _coord_sys, _current_debug_TexSheet, _current_frame_diff, _current_text_color, _fog_color, _fog_intensity, _fps_display, _fullscreen, _gamma_value, _height, _last_tex_ID, _light_color, _light_overlay, _lightning_active, _lightning_current_time, _lightning_end_time, _next_temp_file, _num_tex_switches, _scissor_enabled, _scissor_rect, _target, _temp_fullscreen, _temp_height, _temp_width, _text_shadow, _uses_lights, _viewport, _width, _x, _x_align, _x_flip, _x_shake, _y, _y_align, _y_flip, _y_shake, hoa_video::VIDEO_DEBUG, and hoa_video::VIDEO_TARGET_SDL_WINDOW.
| bool hoa_video::GameVideo::_BindTexture | ( | GLuint | tex_ID | ) | [private] |
wraps a call to glBindTexture(), except it adds checking to eliminate redundant texture binding. Redundancy checks are already implemented by most drivers, but this is a double check "just in case"
| tex_ID | integer handle to the OpenGL texture |
Definition at line 1027 of file video.cpp.
References _last_tex_ID, and _num_tex_switches.
Referenced by _CreateBlankGLTexture(), _DrawElement(), _GenTexLine(), _GetBufferFromTexture(), ApplyLightingOverlay(), Draw(), hoa_video::private_video::ParticleSystem::Draw(), and SaveImage().
| bool hoa_video::GameVideo::_CacheGlyphs | ( | const uint16 * | uText, | |
| FontProperties * | fp | |||
| ) | [private] |
caches glyph info and textures for rendering
| uText | Pointer to a unicode string holding the glyphs to cache | |
| fp | Pointer to the internal FontProperties class representing the font |
Definition at line 301 of file text.cpp.
References hoa_video::FontGlyph::advance, hoa_video::FontProperties::ascent, hoa_video::FontProperties::glyph_cache, hoa_video::FontGlyph::height, hoa_video::FontGlyph::max_x, hoa_video::FontGlyph::max_y, hoa_video::FontGlyph::min_x, hoa_video::FontGlyph::min_y, hoa_utils::RoundUpPow2(), hoa_video::FontGlyph::texture, hoa_video::FontGlyph::top_y, hoa_video::FontProperties::ttf_font, hoa_video::VIDEO_DEBUG, and hoa_video::FontGlyph::width.
Referenced by RenderText().
Here is the call graph for this function:

| void hoa_video::GameVideo::_ConvertImageToGrayscale | ( | const private_video::ImageLoadInfo & | src, | |
| private_video::ImageLoadInfo & | dst | |||
| ) | const [private] |
Converts a color image to a grayscale one; Converts a colored image in a grayscale one. Actually, it converts not an image, but an ImageLoadInfo structure. This is used internally when creating grayscale images.
| src | Information of a color image | |
| dst | ImageLoadInfo struct where the grayscale image will be stored |
Definition at line 37 of file tex_mgmt.cpp.
References hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by _ReloadImagesToSheet(), and hoa_video::StillImage::EnableGrayScale().
converts VIDEO_DRAW_LEFT or VIDEO_DRAW_RIGHT flags to a numerical offset
| xalign | the draw flag |
Definition at line 1510 of file video.cpp.
References hoa_video::VIDEO_X_CENTER, and hoa_video::VIDEO_X_LEFT.
Referenced by hoa_video::TextBox::_DrawTextLines().
converts VIDEO_DRAW_TOP or VIDEO_DRAW_BOTTOM flags to a numerical offset
| yalign | the draw flag |
Definition at line 1492 of file video.cpp.
References hoa_video::VIDEO_Y_BOTTOM, and hoa_video::VIDEO_Y_CENTER.
creates a blank texture of the given width and height and returns integer used by OpenGL to refer to this texture. Returns 0xffffffff on failure.
| width | desired width of the texture | |
| height | desired height of the texture |
Definition at line 2884 of file tex_mgmt.cpp.
References _BindTexture(), _DeleteTexture(), _ShouldSmooth(), hoa_video::VIDEO_DEBUG, and hoa_video::VideoManager.
Referenced by EnablePointLights(), and ReloadTextures().
Here is the call graph for this function:

| std::string hoa_video::GameVideo::_CreateTempFilename | ( | const std::string & | extension | ) | [private] |
returns a filename like TEMP_abcd1234.ext, and each time you call it, it increments the alphanumeric part of the filename. This way, during any particular run of the game, each temp filename is guaranteed to be unique. Assuming you create a new temp file every second, it would take 100,000 years to get from TEMP_00000000 to TEMP_zzzzzzzz
| extension | The extension for the temp file. Although we could just save temp files without an extension, that might cause stupid bugs like DevIL refusing to load an image because it doesn't end with .png. |
Definition at line 1374 of file video.cpp.
References _next_temp_file, and hoa_video::VIDEO_DEBUG.
| TexSheet * hoa_video::GameVideo::_CreateTexSheet | ( | int32 | width, | |
| int32 | height, | |||
| private_video::TexSheetType | type, | |||
| bool | is_static | |||
| ) | [private] |
creates a texture sheet
| width | width of the sheet | |
| height | height of the sheet | |
| type | specifies what type of images this texture sheet manages (e.g. 32x32 images, 64x64 images, any type, etc) | |
| is_static | if true, this texture sheet is meant to manage images which are not expected to be loaded and unloaded very often |
Definition at line 1552 of file tex_mgmt.cpp.
References hoa_utils::IsPowerOfTwo(), hoa_video::VIDEO_DEBUG, and hoa_video::private_video::VIDEO_TEXSHEET_TOTAL.
Referenced by _InsertImageInTexSheet(), CaptureScreen(), and SingletonInitialize().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_DEBUG_ShowAdvancedStats | ( | ) | [private] |
function solely for debugging, which shows number of texture switches made during a frame, and other statistics useful for performance tweaking, etc.
Definition at line 864 of file video.cpp.
References _num_tex_switches, _particle_manager, DrawText(), hoa_video::private_video::ParticleManager::GetNumParticles(), Move(), and SetFont().
Referenced by Display().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_DEBUG_ShowTexSheet | ( | ) | [private] |
function solely for debugging, which displays the currently selected texture sheet. By using DEBUG_NextTexSheet() and DEBUG_PrevTexSheet(), you can change the current texture sheet so the sheet shown by this function cycles through all currently loaded sheets.
Definition at line 1667 of file tex_mgmt.cpp.
References _coord_sys, _current_debug_TexSheet, _PopContext(), _PushContext(), _tex_sheets, DrawImage(), DrawText(), hoa_video::CoordSys::GetTop(), hoa_video::private_video::TexSheet::height, hoa_video::private_video::TexSheet::is_static, Move(), MoveRelative(), SetCoordSys(), SetDrawFlags(), SetFont(), hoa_video::private_video::TexSheet::tex_ID, hoa_video::private_video::TexSheet::type, hoa_video::VIDEO_DEBUG, hoa_video::VIDEO_NO_BLEND, hoa_video::private_video::VIDEO_TEXSHEET_32x32, hoa_video::private_video::VIDEO_TEXSHEET_32x64, hoa_video::private_video::VIDEO_TEXSHEET_64x64, hoa_video::private_video::VIDEO_TEXSHEET_ANY, hoa_video::VIDEO_X_LEFT, hoa_video::VIDEO_Y_BOTTOM, and hoa_video::private_video::TexSheet::width.
Referenced by Display().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_DeleteImage | ( | AnimatedImage & | id | ) | [private] |
decreases ref count of an animated image
| id | image descriptor to decrease the reference count of |
Definition at line 2067 of file tex_mgmt.cpp.
References _DeleteImage().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_DeleteImage | ( | StillImage & | id | ) | [private] |
decreases ref count of an image
| id | image descriptor to decrease the reference count of |
Definition at line 2092 of file tex_mgmt.cpp.
References _DeleteImage(), hoa_video::private_video::TexSheet::FreeImage(), hoa_video::private_video::Image::height, hoa_video::private_video::Image::ref_count, hoa_video::private_video::Image::texture_sheet, hoa_video::VIDEO_DEBUG, and hoa_video::private_video::Image::width.
Here is the call graph for this function:

| bool hoa_video::GameVideo::_DeleteImage | ( | private_video::Image *const | image | ) | [private] |
decreases the reference count of an image
| image | pointer to image |
Definition at line 1805 of file tex_mgmt.cpp.
References _images, _RemoveImage(), _RemoveSheet(), hoa_video::private_video::Image::filename, hoa_video::private_video::TexSheet::FreeImage(), hoa_video::private_video::Image::grayscale, hoa_video::private_video::Image::height, hoa_video::private_video::Image::ref_count, hoa_video::private_video::Image::texture_sheet, hoa_video::VIDEO_DEBUG, and hoa_video::private_video::Image::width.
Referenced by _DeleteImage(), and DeleteImage().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_DeleteTempTextures | ( | ) | [private] |
deletes the temporary textures from the "temp" folder that were saved by _SaveTempTextures()
Definition at line 3152 of file tex_mgmt.cpp.
References hoa_utils::CleanDirectory().
Referenced by ReloadTextures().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_DeleteTexture | ( | GLuint | tex_ID | ) | [private] |
wraps a call to glDeleteTextures(), except it adds some checking related to eliminating redundant texture binding.
| tex_ID | integer handle to the OpenGL texture |
Definition at line 2831 of file tex_mgmt.cpp.
References _last_tex_ID.
Referenced by _CreateBlankGLTexture(), DisablePointLights(), UnloadTextures(), and hoa_video::RenderedString::~RenderedString().
| bool hoa_video::GameVideo::_DrawElement | ( | const private_video::ImageElement & | element, | |
| const Color * | color_array | |||
| ) | [private] |
draws an image element, i.e. one image within an image descriptor which may contain multiple images
| element | pointer to the image element to draw | |
| color_array | pointer to an 4 element array of vertex colors, modulated if necessary |
Definition at line 145 of file draw.cpp.
References _BindTexture(), _blend, _x_flip, _y_flip, hoa_video::private_video::ImageElement::blend, hoa_video::private_video::ImageElement::image, hoa_video::private_video::ImageElement::one_color, hoa_video::private_video::TexSheet::tex_ID, hoa_video::private_video::Image::texture_sheet, hoa_video::private_video::ImageElement::u1, hoa_video::private_video::Image::u1, hoa_video::private_video::ImageElement::u2, hoa_video::private_video::Image::u2, hoa_video::private_video::ImageElement::v1, hoa_video::private_video::Image::v1, hoa_video::private_video::ImageElement::v2, hoa_video::private_video::Image::v2, and hoa_video::VIDEO_DEBUG.
Referenced by _DrawStillImage().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_DrawStillImage | ( | const StillImage & | img, | |
| const Color & | color | |||
| ) | [private] |
helper function to DrawImage() to do the actual work of drawing an image
| img | static image to draw | |
| color | color to modulate image by |
Definition at line 46 of file draw.cpp.
References _coord_sys, _DrawElement(), _fader, _height, _width, _x_align, _x_flip, _x_shake, _y_align, _y_flip, _y_shake, hoa_video::CoordSys::GetBottom(), hoa_video::private_video::ScreenFader::GetFadeModulation(), hoa_video::CoordSys::GetHorizontalDirection(), hoa_video::CoordSys::GetLeft(), hoa_video::CoordSys::GetRight(), hoa_video::CoordSys::GetTop(), hoa_video::CoordSys::GetVerticalDirection(), MoveRelative(), hoa_video::VIDEO_DEBUG, and hoa_video::Color::white.
Here is the call graph for this function:

| bool hoa_video::GameVideo::_DrawStillImage | ( | const StillImage & | img | ) | [private] |
helper function to DrawImage() to do the actual work of doing an image
| img | static image to draw |
Definition at line 28 of file draw.cpp.
References _light_color, _uses_lights, and hoa_video::Color::white.
Referenced by DrawImage().
| bool hoa_video::GameVideo::_DrawTextHelper | ( | const uint16 *const | uText | ) | [private] |
does the actual work of drawing text
| uText | Pointer to a unicode string holding the text to draw |
Definition at line 474 of file text.cpp.
References hoa_video::CoordSys::GetHorizontalDirection(), hoa_video::CoordSys::GetVerticalDirection(), hoa_video::FontProperties::glyph_cache, hoa_video::FontProperties::ttf_font, and hoa_video::VIDEO_DEBUG.
Referenced by DrawText().
Here is the call graph for this function:

| RenderedLine * hoa_video::GameVideo::_GenTexLine | ( | uint16 * | line, | |
| FontProperties * | fp | |||
| ) | [private] |
generates a texture for a given line
| line | Pointer to a unicode string holding the text to render | |
| fp | Pointer to the internal FontProperties class representing the font |
Definition at line 115 of file text.cpp.
References _BindTexture(), _current_text_color, _GetTextShadowColor(), _text_shadow, hoa_video::FontProperties::glyph_cache, hoa_utils::RoundUpPow2(), hoa_video::FontProperties::ttf_font, and hoa_video::VIDEO_DEBUG.
Referenced by RenderText().
Here is the call graph for this function:

| void hoa_video::GameVideo::_GetBufferFromImage | ( | hoa_video::private_video::ImageLoadInfo & | buffer, | |
| hoa_video::private_video::Image * | img | |||
| ) | const [private] |
Pass an image (video memory) to a system memory buffer.
| buffer | Buffer where the pixels of the image will be stored | |
| img | Image to be copied |
Definition at line 1348 of file tex_mgmt.cpp.
References _GetBufferFromTexture(), hoa_video::private_video::Image::height, hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::private_video::Image::texture_sheet, hoa_video::private_video::Image::width, hoa_video::private_video::ImageLoadInfo::width, hoa_video::private_video::Image::x, and hoa_video::private_video::Image::y.
Referenced by _SaveTempTextures(), hoa_video::StillImage::EnableGrayScale(), and SaveImage().
Here is the call graph for this function:

| void hoa_video::GameVideo::_GetBufferFromTexture | ( | hoa_video::private_video::ImageLoadInfo & | buffer, | |
| hoa_video::private_video::TexSheet * | texture | |||
| ) | const [private] |
Pass a texture (video memory) to a system memory buffer.
| buffer | Buffer where the pixels of the texture will be stored | |
| texture | TexSheet to be copied |
Definition at line 1326 of file tex_mgmt.cpp.
References _BindTexture(), hoa_video::private_video::TexSheet::height, hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::private_video::TexSheet::tex_ID, hoa_video::VideoManager, hoa_video::private_video::TexSheet::width, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by _GetBufferFromImage().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_GetImageInfoJpeg | ( | const std::string & | file_name, | |
| uint32 & | rows, | |||
| uint32 & | cols, | |||
| uint32 & | bpp | |||
| ) | [private] |
Get information of a Jpeg file.
| file_name | Name of the file, without the extension | |
| rows | Rows of the image | |
| cols | Columns of the image | |
| bpp | Bits per pixel of the image |
Definition at line 175 of file tex_mgmt.cpp.
Referenced by GetImageInfo().
| bool hoa_video::GameVideo::_GetImageInfoPng | ( | const std::string & | file_name, | |
| uint32 & | rows, | |||
| uint32 & | cols, | |||
| uint32 & | bpp | |||
| ) | [private] |
Get information of a Png file.
| file_name | Name of the file, without the extension | |
| rows | Rows of the image | |
| cols | Columns of the image | |
| bpp | Bits per pixel of the image |
Definition at line 116 of file tex_mgmt.cpp.
Referenced by GetImageInfo().
| Color hoa_video::GameVideo::_GetTextShadowColor | ( | FontProperties * | fp | ) | [private] |
retrieves the shadow color based on the current color and shadow style
| fp | Pointer to the internal FontProperties class representing the font |
Definition at line 976 of file text.cpp.
References _current_text_color, _text_shadow, hoa_video::Color::black, hoa_video::FontProperties::shadow_style, hoa_video::VIDEO_DEBUG, hoa_video::VIDEO_TEXT_SHADOW_BLACK, hoa_video::VIDEO_TEXT_SHADOW_COLOR, hoa_video::VIDEO_TEXT_SHADOW_DARK, hoa_video::VIDEO_TEXT_SHADOW_INVCOLOR, hoa_video::VIDEO_TEXT_SHADOW_LIGHT, hoa_video::VIDEO_TEXT_SHADOW_NONE, and hoa_video::Color::white.
Referenced by _GenTexLine().
| TexSheet * hoa_video::GameVideo::_InsertImageInTexSheet | ( | private_video::Image * | image, | |
| private_video::ImageLoadInfo & | load_info, | |||
| bool | is_static | |||
| ) | [private] |
inserts an image into a texture sheet
| image | pointer to the image to insert | |
| load_info | attributes of the image to be inserted | |
| is_static | Wether an image is static or not |
Definition at line 1447 of file tex_mgmt.cpp.
References _CreateTexSheet(), _tex_sheets, hoa_video::private_video::TexSheet::AddImage(), hoa_video::private_video::ImageLoadInfo::height, hoa_utils::RoundUpPow2(), hoa_video::VIDEO_DEBUG, hoa_video::private_video::VIDEO_TEXSHEET_32x32, hoa_video::private_video::VIDEO_TEXSHEET_32x64, hoa_video::private_video::VIDEO_TEXSHEET_64x64, hoa_video::private_video::VIDEO_TEXSHEET_ANY, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by _LoadImageHelper(), _LoadMultiImage(), and hoa_video::StillImage::EnableGrayScale().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_LoadImage | ( | AnimatedImage & | id | ) | [private] |
loads an animated image. Assumes that you have called AddFrame for all the frames.
| id | image descriptor to load |
Definition at line 249 of file tex_mgmt.cpp.
References _LoadImage().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_LoadImage | ( | StillImage & | id | ) | [private] |
loads an image
| id | image descriptor to load. Can specify filename, color, width, height, and static as its parameters |
Definition at line 285 of file tex_mgmt.cpp.
References _height, _images, _LoadImageHelper(), _width, and hoa_video::VIDEO_DEBUG.
Referenced by _LoadImage(), and LoadImage().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_LoadImageHelper | ( | StillImage & | id | ) | [private] |
does the actual work of loading an image
| id | StillImage of the image to load. May specify a filename, color, width, height, and static |
Definition at line 639 of file tex_mgmt.cpp.
References _height, _images, _InsertImageInTexSheet(), _LoadRawImage(), _width, hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::private_video::Image::ref_count, hoa_video::VIDEO_DEBUG, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by _LoadImage().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_LoadMultiImage | ( | std::vector< StillImage > & | images, | |
| const std::string & | file_name, | |||
| const uint32 & | rows, | |||
| const uint32 & | cols | |||
| ) | [private] |
Loads an image file in several StillImages.
| images | Vector of StillImages to be loaded | |
| file_name | Name of the image file to read | |
| rows | Number of rows of StillImages | |
| cols | Number of columns of StillImages |
Definition at line 433 of file tex_mgmt.cpp.
References _images, _InsertImageInTexSheet(), _LoadRawImage(), hoa_utils::DataToString(), hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::MultiImageInfo::image, hoa_video::private_video::MultiImageInfo::multi_image, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::private_video::Image::ref_count, hoa_video::private_video::TexSheet::RestoreImage(), hoa_video::private_video::Image::texture_sheet, hoa_video::VIDEO_DEBUG, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by LoadMultiImageFromElementsSize(), and LoadMultiImageFromNumberElements().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_LoadRawImage | ( | const std::string & | file_name, | |
| private_video::ImageLoadInfo & | load_info | |||
| ) | [private] |
Load raw image data from a file.
| file_name | Filename of image to load | |
| load_info | Returns with the image file attributes and pixels |
Definition at line 702 of file tex_mgmt.cpp.
References _LoadRawImageJpeg(), and _LoadRawImagePng().
Referenced by _LoadImageHelper(), _LoadMultiImage(), and _ReloadImagesToSheet().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_LoadRawImageJpeg | ( | const std::string & | file_name, | |
| private_video::ImageLoadInfo & | load_info | |||
| ) | [private] |
Load raw image data from a JPG file.
| file_name | Filename of image to load | |
| load_info | Returns with the image file attributes and pixels |
Definition at line 868 of file tex_mgmt.cpp.
References hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::VIDEO_DEBUG, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by _LoadRawImage().
| bool hoa_video::GameVideo::_LoadRawImagePng | ( | const std::string & | file_name, | |
| private_video::ImageLoadInfo & | load_info | |||
| ) | [private] |
Load raw image data from a PNG file.
| file_name | Filename of image to load | |
| load_info | Returns with the image file attributes and pixels |
Definition at line 727 of file tex_mgmt.cpp.
References hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::VIDEO_DEBUG, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by _LoadRawImage().
| void hoa_video::GameVideo::_PopContext | ( | ) | [private] |
restores coord system, draw flags, and transformations
Definition at line 1451 of file video.cpp.
References _blend, _context_stack, _current_font, _current_text_color, _scissor_enabled, _scissor_rect, _viewport, _x_align, _x_flip, _y_align, _y_flip, hoa_video::private_video::Context::blend, hoa_video::private_video::Context::coordinate_system, hoa_video::private_video::Context::font, hoa_video::ScreenRect::height, hoa_video::ScreenRect::left, hoa_video::private_video::Context::scissor_rectangle, hoa_video::private_video::Context::scissoring_enabled, SetCoordSys(), hoa_video::private_video::Context::text_color, hoa_video::ScreenRect::top, hoa_video::private_video::Context::viewport, hoa_video::ScreenRect::width, hoa_video::private_video::Context::x_align, hoa_video::private_video::Context::x_flip, hoa_video::private_video::Context::y_align, and hoa_video::private_video::Context::y_flip.
Referenced by _DEBUG_ShowTexSheet(), Display(), hoa_video::TextBox::Draw(), hoa_video::OptionBox::Draw(), hoa_video::MenuWindow::Draw(), DrawFPS(), DrawText(), and PopState().
Here is the call graph for this function:

| void hoa_video::GameVideo::_PushContext | ( | ) | [private] |
saves coord system, draw flags, and transformations
Definition at line 1420 of file video.cpp.
References _blend, _context_stack, _coord_sys, _current_font, _current_text_color, _scissor_enabled, _scissor_rect, _viewport, _x_align, _x_flip, _y_align, _y_flip, hoa_video::private_video::Context::blend, hoa_video::private_video::Context::coordinate_system, hoa_video::private_video::Context::font, hoa_video::private_video::Context::scissor_rectangle, hoa_video::private_video::Context::scissoring_enabled, hoa_video::private_video::Context::text_color, hoa_video::private_video::Context::viewport, hoa_video::private_video::Context::x_align, hoa_video::private_video::Context::x_flip, hoa_video::private_video::Context::y_align, and hoa_video::private_video::Context::y_flip.
Referenced by _DEBUG_ShowTexSheet(), Display(), hoa_video::TextBox::Draw(), hoa_video::OptionBox::Draw(), hoa_video::MenuWindow::Draw(), DrawFPS(), DrawText(), and PushState().
| bool hoa_video::GameVideo::_ReloadImagesToSheet | ( | private_video::TexSheet * | tex_sheet | ) | [private] |
loop through all currently loaded images and if they belong to the given tex sheet, reload them into it
| tex_sheet | pointer to the tex sheet whose images we want to load |
Definition at line 2988 of file tex_mgmt.cpp.
References _ConvertImageToGrayscale(), _images, _LoadRawImage(), hoa_video::private_video::TexSheet::CopyRect(), hoa_video::private_video::Image::filename, hoa_video::private_video::Image::height, hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::MultiImageInfo::image, hoa_video::private_video::MultiImageInfo::multi_image, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::private_video::Image::tags, hoa_video::private_video::Image::texture_sheet, hoa_video::VIDEO_DEBUG, hoa_video::private_video::Image::width, hoa_video::private_video::ImageLoadInfo::width, hoa_video::private_video::Image::x, and hoa_video::private_video::Image::y.
Here is the call graph for this function:

| bool hoa_video::GameVideo::_RemoveImage | ( | private_video::Image * | image_to_remove | ) | [private] |
removes the image from the STL map with the same pointer as the one passed in. Returns false on failure
| image_to_remove | pointer to the image we want to remove |
Definition at line 2157 of file tex_mgmt.cpp.
References _images.
Referenced by _DeleteImage().
| bool hoa_video::GameVideo::_RemoveSheet | ( | private_video::TexSheet * | sheet_to_remove | ) | [private] |
removes a texture sheet from our vector of sheets and deletes it
| sheet_to_remove | pointer to the sheet we want to remove |
Definition at line 1850 of file tex_mgmt.cpp.
References _tex_sheets.
Referenced by _DeleteImage(), and CaptureScreen().
| void hoa_video::GameVideo::_RGBAToRGB | ( | const private_video::ImageLoadInfo & | src, | |
| private_video::ImageLoadInfo & | dst | |||
| ) | const [private] |
Converts a RGBA buffer to a RGB one.
| src | Information of a RGBA buffer | |
| dst | ImageLoadInfo struct where the RGB buffer will be stored |
Definition at line 63 of file tex_mgmt.cpp.
References hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by SaveImage().
| float hoa_video::GameVideo::_RoundForce | ( | float | force | ) | [private] |
rounds a force value to the nearest integer. Rounding is based on probability. For example the number 2.85 has an 85% chance of rounding to 3 and a 15% chance of rounding to 2
| force | The force to round |
Definition at line 146 of file shake.cpp.
Referenced by _UpdateShake().
| bool hoa_video::GameVideo::_SaveJpeg | ( | const std::string & | file_name, | |
| hoa_video::private_video::ImageLoadInfo & | info | |||
| ) | const [private] |
Saves Raw data in a Jpeg file.
| file_name | Name of the file, without the extension | |
| info | Structure of the information to store |
Definition at line 1028 of file tex_mgmt.cpp.
References hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::VIDEO_DEBUG, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by MakeScreenshot(), and SaveImage().
| bool hoa_video::GameVideo::_SavePng | ( | const std::string & | file_name, | |
| hoa_video::private_video::ImageLoadInfo & | info | |||
| ) | const [private] |
Saves Raw data in a Png file.
| file_name | Name of the file, without the extension | |
| info | Structure of the information to store |
Definition at line 963 of file tex_mgmt.cpp.
References hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by _SaveTempTextures(), and SaveImage().
| bool hoa_video::GameVideo::_SaveTempTextures | ( | ) | [private] |
saves temporary textures to disk, in other words, textures which were not loaded to a file. This is used when the GL context is being destroyed, perhaps because we are switching from windowed to fullscreen. So, we need to save all textures to disk so we can reload them later.
Definition at line 3122 of file tex_mgmt.cpp.
References _GetBufferFromImage(), _images, _SavePng(), hoa_video::private_video::Image::filename, and hoa_video::private_video::Image::tags.
Referenced by UnloadTextures().
Here is the call graph for this function:

| int32 hoa_video::GameVideo::_ScreenCoordX | ( | float | x | ) | [private] |
takes an x value and converts it into screen coordinates
Definition at line 1640 of file video.cpp.
References _coord_sys, _width, hoa_video::CoordSys::GetLeft(), and hoa_video::CoordSys::GetRight().
Referenced by CalculateScreenRect().
Here is the call graph for this function:

| int32 hoa_video::GameVideo::_ScreenCoordY | ( | float | y | ) | [private] |
takes an x value and converts it into screen coordinates
Definition at line 1656 of file video.cpp.
References _coord_sys, _height, hoa_video::CoordSys::GetBottom(), and hoa_video::CoordSys::GetTop().
Referenced by CalculateScreenRect().
Here is the call graph for this function:

| bool hoa_video::GameVideo::_ShouldSmooth | ( | ) | [private] |
Whether textures should be smoothed for non natural resolution.
Definition at line 1672 of file video.cpp.
References _height, _width, hoa_video::VIDEO_STANDARD_RES_HEIGHT, and hoa_video::VIDEO_STANDARD_RES_WIDTH.
Referenced by _CreateBlankGLTexture().
| void hoa_video::GameVideo::_UpdateShake | ( | int32 | frame_time | ) | [private] |
updates the shaking effect
| frame_time | elapsed time for the current rendering frame |
Definition at line 165 of file shake.cpp.
References _RoundForce(), _shake_forces, _x_shake, _y_shake, hoa_video::private_video::ShakeForce::current_time, hoa_video::private_video::ShakeForce::end_time, hoa_video::Interpolator::GetValue(), hoa_video::private_video::ShakeForce::interpolator, hoa_video::RandomFloat(), hoa_video::Interpolator::Update(), and hoa_video::VIDEO_TIME_BETWEEN_SHAKE_UPDATES.
Referenced by Display().
Here is the call graph for this function:

| ParticleEffectID hoa_video::GameVideo::AddParticleEffect | ( | const std::string & | particle_effect_filename, | |
| float | x, | |||
| float | y, | |||
| bool | reload = false | |||
| ) |
add a particle effect at the given point x and y
| particle_effect_filename | - file containing the particle effect definition | |
| x | - X coordinate of the effect | |
| y | - Y coordinate of the effect | |
| reload | - reload the effect from file if it already exists |
| bool hoa_video::GameVideo::ApplyLightingOverlay | ( | ) |
call after rendering all real lights. This function renders all lights to the lighting overlay texture, Moved into ApplyLightingOverlay call after all map images are drawn to apply lighting. All menu and text rendering should occur AFTER this call, so that they are not affected by lighting.
Definition at line 1194 of file video.cpp.
References _BindTexture(), _coord_sys, _height, _light_overlay, _width, hoa_video::CoordSys::GetBottom(), hoa_video::CoordSys::GetLeft(), hoa_video::CoordSys::GetRight(), hoa_video::CoordSys::GetTop(), and SetCoordSys().
Here is the call graph for this function:

| bool hoa_video::GameVideo::ApplySettings | ( | ) |
applies any changes to video settings like resolution and fullscreen. If the changes fail, then this function returns false, and the video settings are reset to whatever the last working setting was.
Definition at line 555 of file video.cpp.
References _fog_color, _fog_intensity, _fullscreen, _height, _target, _temp_fullscreen, _temp_height, _temp_width, _width, EnableFog(), ReloadTextures(), UnloadTextures(), hoa_video::VIDEO_DEBUG, hoa_video::VIDEO_TARGET_QT_WIDGET, and hoa_video::VIDEO_TARGET_SDL_WINDOW.
Referenced by hoa_input::GameInput::_KeyEventHandler(), hoa_boot::BootMode::_OnVideoMode(), hoa_boot::BootMode::_SetResolution(), hoa_editor::Grid::resizeGL(), and SingletonInitialize().
Here is the call graph for this function:

| ScreenRect hoa_video::GameVideo::CalculateScreenRect | ( | float | left, | |
| float | right, | |||
| float | bottom, | |||
| float | top | |||
| ) |
converts coordinates given relative to the current coord sys into "screen coordinates", which are in pixel units with (0,0) as the top left and (w-1, h-1) as the lower-right, where w and h are the dimensions of the screen
Definition at line 1603 of file video.cpp.
References _ScreenCoordX(), _ScreenCoordY(), hoa_video::ScreenRect::height, hoa_video::ScreenRect::left, hoa_video::ScreenRect::top, and hoa_video::ScreenRect::width.
Referenced by SetScissorRect(), and hoa_video::MenuWindow::Update().
Here is the call graph for this function:

| int32 hoa_video::GameVideo::CalculateTextWidth | ( | const std::string & | font_name, | |
| const std::string & | text | |||
| ) |
calculates the width of the given text if it were rendered with the given font If an invalid font name is passed, returns -1
| font_name | the font to use | |
| text | the text string in multi-byte character format |
Definition at line 870 of file text.cpp.
References _font_map, and IsValidFont().
Here is the call graph for this function:

| int32 hoa_video::GameVideo::CalculateTextWidth | ( | const std::string & | font_name, | |
| const hoa_utils::ustring & | text | |||
| ) |
calculates the width of the given text if it were rendered with the given font If an invalid font name is passed, returns -1
| font_name | the font to use | |
| text | the text string in unicode |
Definition at line 853 of file text.cpp.
References _font_map, hoa_utils::ustring::c_str(), and IsValidFont().
Referenced by hoa_video::TextBox::_AddLine(), hoa_video::TextBox::_DrawTextLines(), and hoa_video::OptionBox::Draw().
Here is the call graph for this function:

| bool hoa_video::GameVideo::CaptureScreen | ( | StillImage & | id | ) |
captures the contents of the screen and saves it to an image descriptor
| id | image descriptor to capture to |
Definition at line 1260 of file video.cpp.
References _CreateTexSheet(), _height, _images, _RemoveSheet(), _width, hoa_video::private_video::TexSheet::CopyScreenRect(), hoa_video::private_video::TexMemMgr::Insert(), hoa_video::private_video::Image::ref_count, hoa_utils::RoundUpPow2(), hoa_video::private_video::TexSheet::tex_mem_manager, hoa_video::VIDEO_DEBUG, and hoa_video::private_video::VIDEO_TEXSHEET_ANY.
Referenced by hoa_pause::PauseMode::PauseMode(), hoa_quit::QuitMode::QuitMode(), and hoa_shop::ShopMode::ShopMode().
Here is the call graph for this function:

| bool hoa_video::GameVideo::Clear | ( | const Color & | c | ) |
Clears the screen to a specific color.
| c | The color to set the cleared screen to. |
Definition at line 691 of file video.cpp.
References _num_tex_switches, and SetViewport().
Here is the call graph for this function:

| bool hoa_video::GameVideo::Clear | ( | ) |
Clears the contents of the current screen.
Definition at line 676 of file video.cpp.
References _light_color, _uses_lights, and hoa_video::Color::black.
Referenced by main(), hoa_editor::Grid::paintGL(), and SingletonInitialize().
| void hoa_video::GameVideo::DEBUG_NextTexSheet | ( | ) |
These cycle through the currently loaded texture sheets so they can be viewed on screen.
Definition at line 2669 of file tex_mgmt.cpp.
References _current_debug_TexSheet, and _tex_sheets.
Referenced by hoa_input::GameInput::_KeyEventHandler().
| void hoa_video::GameVideo::DEBUG_PrevTexSheet | ( | ) |
| bool hoa_video::GameVideo::DeleteImage | ( | ImageDescriptor & | id | ) |
decreases ref count of an image (static or animated)
| id | image descriptor to decrease the reference count of |
Definition at line 2047 of file tex_mgmt.cpp.
References _DeleteImage().
Referenced by hoa_video::MenuWindow::_RecreateImage(), hoa_video::OptionBox::ClearOptions(), hoa_video::private_video::ParticleSystem::Destroy(), hoa_video::MenuWindow::Destroy(), Display(), hoa_global::GameGlobal::SetLocation(), hoa_battle::private_battle::ActionWindow::~ActionWindow(), hoa_battle::private_battle::BattleActor::~BattleActor(), hoa_battle::private_battle::BattleCharacterActor::~BattleCharacterActor(), hoa_battle::private_battle::BattleEnemyActor::~BattleEnemyActor(), hoa_battle::BattleMode::~BattleMode(), hoa_boot::BootMode::~BootMode(), hoa_menu::private_menu::CharacterWindow::~CharacterWindow(), hoa_menu::private_menu::EquipWindow::~EquipWindow(), hoa_video::private_video::GUISupervisor::~GUISupervisor(), hoa_map::private_map::MapSprite::~MapSprite(), hoa_menu::MenuMode::~MenuMode(), hoa_pause::PauseMode::~PauseMode(), hoa_quit::QuitMode::~QuitMode(), hoa_shop::ShopMode::~ShopMode(), hoa_menu::private_menu::StatusWindow::~StatusWindow(), and hoa_map::private_map::VirtualSprite::~VirtualSprite().
Here is the call graph for this function:

| void hoa_video::GameVideo::DeleteMenuSkin | ( | std::string & | skin_name | ) | [inline] |
Deletes a menu skin that has been loaded.
| skin_name | The name of the loaded menu skin that should be removed |
Definition at line 861 of file video.h.
References hoa_video::private_video::GUIManager.
| void hoa_video::GameVideo::DisableFog | ( | ) |
disables fog
Definition at line 1143 of file video.cpp.
References _fog_intensity.
Referenced by hoa_boot::BootMode::_EndOpeningAnimation(), and hoa_boot::BootMode::Reset().
| void hoa_video::GameVideo::DisablePointLights | ( | ) |
disables point lights
Definition at line 1176 of file video.cpp.
References _DeleteTexture(), _light_overlay, and _uses_lights.
Here is the call graph for this function:

| void hoa_video::GameVideo::DisableSceneLighting | ( | ) |
disables scene lighting
Definition at line 1079 of file video.cpp.
References _light_color, and hoa_video::Color::white.
Referenced by hoa_battle::private_battle::FinishWindow::Draw().
| bool hoa_video::GameVideo::Display | ( | int32 | frame_time | ) |
call at end of every frame
| frame_time | The number of milliseconds that have passed since the last frame. |
Definition at line 727 of file video.cpp.
References _advanced_display, _animation_counter, _current_frame_diff, _DEBUG_ShowAdvancedStats(), _DEBUG_ShowTexSheet(), _fader, _fps_display, _lightning_active, _lightning_current_time, _lightning_end_time, _particle_manager, _PopContext(), _PushContext(), _UpdateShake(), DeleteImage(), DrawFPS(), DrawImage(), hoa_video::private_video::ScreenFader::GetFadeOverlayColor(), LoadImage(), Move(), PopState(), PushState(), hoa_video::StillImage::SetColor(), SetCoordSys(), hoa_video::StillImage::SetDimensions(), SetDrawFlags(), hoa_video::private_video::ScreenFader::ShouldUseFadeOverlay(), hoa_video::private_video::ScreenFader::Update(), hoa_video::private_video::ParticleManager::Update(), hoa_video::VIDEO_ANIMATION_FRAME_PERIOD, hoa_video::VIDEO_DEBUG, hoa_video::VIDEO_X_LEFT, and hoa_video::VIDEO_Y_BOTTOM.
Referenced by main(), and SingletonInitialize().
Here is the call graph for this function:

| bool hoa_video::GameVideo::Draw | ( | const RenderedLine & | line, | |
| int32 | tex_index | |||
| ) |
Draws a rendered line object.
| line | The rendered line | |
| tex_index | Whether main or shadow texture |
Definition at line 1049 of file text.cpp.
References _BindTexture(), hoa_video::RenderedLine::height, hoa_video::RenderedLine::NUM_TEXTURES, hoa_video::RenderedLine::texture, hoa_video::RenderedLine::u, hoa_video::RenderedLine::v, hoa_video::VIDEO_DEBUG, and hoa_video::RenderedLine::width.
Here is the call graph for this function:

| bool hoa_video::GameVideo::Draw | ( | const RenderedString & | string | ) |
Draws a rendered string object.
| string | The rendered string |
Definition at line 1127 of file text.cpp.
References _coord_sys, _x_align, hoa_video::CoordSys::GetHorizontalDirection(), hoa_video::RenderedString::GetLineSkip(), hoa_video::RenderedString::GetShadowX(), hoa_video::RenderedString::GetShadowY(), hoa_video::CoordSys::GetVerticalDirection(), hoa_video::RenderedString::GetWidth(), hoa_video::RenderedString::lines, hoa_video::RenderedLine::MAIN_TEXTURE, MoveRelative(), and hoa_video::RenderedLine::SHADOW_TEXTURE.
Referenced by hoa_video::RenderedString::Draw().
Here is the call graph for this function:

| void hoa_video::GameVideo::DrawFPS | ( | uint32 | frame_time | ) |
Updates the FPS counter and draws the current average FPS to the screen The number of milliseconds that have expired since the last frame was drawn.
Definition at line 342 of file draw.cpp.
References _PopContext(), _PushContext(), hoa_video::private_video::GUISupervisor::DrawFPS(), and hoa_video::private_video::GUIManager.
Referenced by Display().
Here is the call graph for this function:

| bool hoa_video::GameVideo::DrawFullscreenOverlay | ( | const Color & | color | ) |
draws a full screen overlay of the given color
Definition at line 1767 of file video.cpp.
References DrawImage(), LoadImage(), Move(), PopState(), PushState(), SetCoordSys(), hoa_video::StillImage::SetDimensions(), SetDrawFlags(), hoa_video::VIDEO_BLEND, hoa_video::VIDEO_X_LEFT, and hoa_video::VIDEO_Y_BOTTOM.
Referenced by DrawLightning().
Here is the call graph for this function:

| void hoa_video::GameVideo::DrawGrid | ( | float | x, | |
| float | y, | |||
| float | x_step, | |||
| float | y_step, | |||
| const Color & | c | |||
| ) |
draws a line grid. Used by map editor to draw a grid over all the tiles. This function will start at (x,y), and go to (xMax, yMax), with horizontal cell spacing of xstep and vertical cell spacing of ystep. The final parameter is just the color the lines should be drawn
| x | x coordinate to start grid at | |
| y | y coordinate to start grid at | |
| x_step | width of grid squares | |
| y_step | height of grid squares | |
| c | color of the grid |
Definition at line 1809 of file video.cpp.
References _coord_sys, hoa_video::CoordSys::GetBottom(), hoa_video::CoordSys::GetLeft(), hoa_video::CoordSys::GetRight(), hoa_video::CoordSys::GetTop(), Move(), PopState(), and PushState().
Referenced by hoa_editor::Grid::paintGL().
Here is the call graph for this function:

| bool hoa_video::GameVideo::DrawHalo | ( | const StillImage & | id, | |
| float | x, | |||
| float | y, | |||
| const Color & | color = Color(1.0f, 1.0f, 1.0f, 1.0f) | |||
| ) |
draws a halo at the given spot
| id | image descriptor for the halo image | |
| x | x coordinate of halo | |
| y | y coordinate of halo | |
| color | color of halo |
Definition at line 304 of file draw.cpp.
References _blend, DrawImage(), Move(), PopMatrix(), PushMatrix(), and hoa_video::VIDEO_BLEND_ADD.
Referenced by DrawLight().
Here is the call graph for this function:

| bool hoa_video::GameVideo::DrawImage | ( | const ImageDescriptor & | id, | |
| const Color & | color | |||
| ) |
draws an image which is modulated by a custom color
| id | image descriptor to draw (either StillImage or AnimatedImage) | |
| color | Color used for modulating the image |
Definition at line 372 of file draw.cpp.
References _DrawStillImage(), hoa_video::AnimatedImage::GetCurrentFrameIndex(), and hoa_video::AnimatedImage::GetFrame().
Here is the call graph for this function:

| bool hoa_video::GameVideo::DrawImage | ( | const ImageDescriptor & | id | ) |
draws an image which is modulated by the scene's light color
| id | image descriptor to draw (either StillImage or AnimatedImage) |
Definition at line 356 of file draw.cpp.
References _DrawStillImage(), hoa_video::AnimatedImage::GetCurrentFrameIndex(), and hoa_video::AnimatedImage::GetFrame().
Referenced by hoa_boot::BootMode::_AnimateLogo(), _DEBUG_ShowTexSheet(), hoa_battle::private_battle::ActionWindow::_DrawActionSelection(), hoa_boot::BootMode::_DrawBackgroundItems(), hoa_battle::BattleMode::_DrawBackgroundVisuals(), hoa_menu::MenuMode::_DrawBottomMenu(), hoa_battle::BattleMode::_DrawBottomMenu(), hoa_battle::BattleMode::_DrawTimeMeter(), Display(), hoa_shop::private_shop::ObjectInfoWindow::Draw(), hoa_shop::ShopMode::Draw(), hoa_quit::QuitMode::Draw(), hoa_pause::PauseMode::Draw(), hoa_video::OptionBox::Draw(), hoa_video::MenuWindow::Draw(), hoa_menu::private_menu::EquipWindow::Draw(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::InventoryWindow::Draw(), hoa_menu::private_menu::CharacterWindow::Draw(), hoa_menu::MenuMode::Draw(), hoa_map::private_map::EnemySprite::Draw(), hoa_map::private_map::MapSprite::Draw(), hoa_map::private_map::VirtualSprite::Draw(), hoa_map::private_map::PhysicalObject::Draw(), hoa_map::MapMode::Draw(), hoa_video::ImageDescriptor::Draw(), DrawFullscreenOverlay(), DrawHalo(), hoa_battle::private_battle::BattleCharacterActor::DrawPortrait(), DrawRectangle(), hoa_battle::private_battle::BattleEnemyActor::DrawSprite(), hoa_battle::private_battle::BattleCharacterActor::DrawSprite(), hoa_battle::private_battle::BattleCharacterActor::DrawStatus(), hoa_battle::private_battle::BattleActor::DrawTimePortrait(), and hoa_editor::Grid::paintGL().
Here is the call graph for this function:

| bool hoa_video::GameVideo::DrawLight | ( | const StillImage & | id, | |
| float | x, | |||
| float | y, | |||
| const Color & | color = Color(1.0f, 1.0f, 1.0f, 1.0f) | |||
| ) |
draws a real light at the given spot
| id | image descriptor for the light mask | |
| x | x coordinate of light | |
| y | y coordinate of light | |
| color | color of light |
Definition at line 325 of file draw.cpp.
References _uses_lights, DrawHalo(), and hoa_video::VIDEO_DEBUG.
Here is the call graph for this function:

| bool hoa_video::GameVideo::DrawLightning | ( | ) |
call this every frame to draw any lightning effects. You should make sure to place this call in an appropriate spot. In particular, you should draw the lightning before drawing the GUI.
Definition at line 1738 of file video.cpp.
References _lightning_active, _lightning_current_time, _lightning_data, and DrawFullscreenOverlay().
Here is the call graph for this function:

| bool hoa_video::GameVideo::DrawParticleEffects | ( | ) |
draws all active particle effects
Definition at line 73 of file effects.cpp.
References _particle_manager, and hoa_video::private_video::ParticleManager::Draw().
Here is the call graph for this function:

| void hoa_video::GameVideo::DrawRectangle | ( | const float | width, | |
| const float | height, | |||
| const Color & | color | |||
| ) |
Draws a solid rectangle of a given color. Draws a solid rectangle of a given color. For that, the lower-left corner of the rectangle has to be specified, and also its size. The parameters depends on the current Coordinate System.
| width | Width of the rectangle. | |
| height | Height of the rectangle. | |
| color | Color to paint the rectangle. |
Definition at line 1863 of file video.cpp.
References hoa_video::StillImage::_elements, _rectangle_image, DrawImage(), and hoa_video::VideoManager.
Referenced by hoa_battle::private_battle::BattleCharacterActor::DrawStatus().
Here is the call graph for this function:

| bool hoa_video::GameVideo::DrawText | ( | const hoa_utils::ustring & | uText | ) |
unicode version of DrawText(). This should be used for anything in the game which might need to be localized (game dialogue, interface text, etc.)
| uText | unicode text string to draw |
Definition at line 639 of file text.cpp.
References _coord_sys, _current_font, _current_text_color, _DrawTextHelper(), _font_map, _PopContext(), _PushContext(), _text_shadow, hoa_video::Color::black, hoa_utils::ustring::empty(), hoa_video::CoordSys::GetHorizontalDirection(), hoa_video::CoordSys::GetVerticalDirection(), hoa_utils::ustring::length(), hoa_video::FontProperties::line_skip, MoveRelative(), SetTextColor(), hoa_video::FontProperties::shadow_style, hoa_video::FontProperties::shadow_x, hoa_video::FontProperties::shadow_y, hoa_video::FontProperties::ttf_font, hoa_video::VIDEO_DEBUG, hoa_video::VIDEO_TEXT_SHADOW_BLACK, hoa_video::VIDEO_TEXT_SHADOW_COLOR, hoa_video::VIDEO_TEXT_SHADOW_DARK, hoa_video::VIDEO_TEXT_SHADOW_INVCOLOR, hoa_video::VIDEO_TEXT_SHADOW_LIGHT, hoa_video::VIDEO_TEXT_SHADOW_NONE, and hoa_video::Color::white.
Here is the call graph for this function:

| bool hoa_video::GameVideo::DrawText | ( | const std::string & | text | ) |
non-unicode version of DrawText(). Only use this for debug output or other things which don't have to be localized
| text | text string to draw |
Referenced by _DEBUG_ShowAdvancedStats(), _DEBUG_ShowTexSheet(), hoa_battle::private_battle::ActionWindow::_DrawActionInformation(), hoa_battle::private_battle::ActionWindow::_DrawActionSelection(), hoa_menu::MenuMode::_DrawBottomMenu(), hoa_battle::private_battle::ActionWindow::_DrawTargetSelection(), hoa_video::TextBox::_DrawTextLines(), hoa_shop::private_shop::ConfirmWindow::Draw(), hoa_shop::private_shop::ObjectInfoWindow::Draw(), hoa_pause::PauseMode::Draw(), hoa_video::OptionBox::Draw(), hoa_menu::private_menu::EquipWindow::Draw(), hoa_menu::private_menu::SkillsWindow::Draw(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::InventoryWindow::Draw(), hoa_menu::private_menu::CharacterWindow::Draw(), hoa_map::private_map::DialogueManager::Draw(), hoa_map::MapMode::Draw(), hoa_boot::BootMode::Draw(), hoa_battle::private_battle::FinishWindow::Draw(), hoa_video::private_video::GUISupervisor::DrawFPS(), hoa_battle::private_battle::BattleEnemyActor::DrawSprite(), hoa_battle::private_battle::BattleCharacterActor::DrawSprite(), hoa_battle::private_battle::BattleEnemyActor::DrawStatus(), and hoa_battle::private_battle::BattleCharacterActor::DrawStatus().
| bool hoa_video::GameVideo::EnableFog | ( | const Color & | color, | |
| float | intensity | |||
| ) |
sets fog parameters
| color | Color of the fog (alpha should be 1.0) | |
| intensity | Intensity of fog from 0.0f to 1.0f |
Definition at line 1100 of file video.cpp.
References _fog_color, _fog_intensity, hoa_video::Color::GetColors(), and hoa_video::VIDEO_DEBUG.
Referenced by hoa_boot::BootMode::_AnimateLogo(), and ApplySettings().
Here is the call graph for this function:

| bool hoa_video::GameVideo::EnablePointLights | ( | ) |
call if this map uses real lights
Definition at line 1164 of file video.cpp.
References _CreateBlankGLTexture(), _light_overlay, and _uses_lights.
Here is the call graph for this function:

| bool hoa_video::GameVideo::EnableSceneLighting | ( | const Color & | color | ) |
turn on the ligt color for the scene
| color | the light color to use |
Definition at line 1062 of file video.cpp.
References _light_color, and hoa_video::VIDEO_DEBUG.
Referenced by hoa_battle::BattleMode::Draw().
| void hoa_video::GameVideo::EnableScissoring | ( | bool | enable | ) |
enables scissoring, where you can specify a rectangle of the screen which is affected by rendering operations. MAKE SURE to disable scissoring as soon as you're done using the effect, or all subsequent draw calls will get messed up
| enable | pass true to turn on scissoring, false to disable |
Definition at line 1568 of file video.cpp.
References _scissor_enabled.
Referenced by hoa_video::TextBox::_DrawTextLines(), hoa_video::private_video::ParticleManager::Draw(), hoa_video::OptionBox::Draw(), hoa_video::MenuWindow::Draw(), hoa_boot::BootMenu::Draw(), and hoa_boot::CreditsScreen::Draw().
| void hoa_video::GameVideo::EnableTextShadow | ( | bool | enable | ) |
enables/disables text shadowing
| enable | pass true to enable, false to disable |
Definition at line 887 of file text.cpp.
References _text_shadow.
Referenced by SingletonInitialize().
| void hoa_video::GameVideo::FadeScreen | ( | const Color & | color, | |
| float | fade_time | |||
| ) |
Begins a screen fade.
| color | - color to fade to. | |
| fade_time | - the fade will last this number of seconds |
Definition at line 152 of file fade.cpp.
References _fader, and hoa_video::private_video::ScreenFader::FadeTo().
Referenced by hoa_boot::BootMode::_OnLoadGame(), hoa_boot::BootMode::_OnNewGame(), and hoa_boot::BootMode::Update().
Here is the call graph for this function:

| const CoordSys& hoa_video::GameVideo::GetCoordSys | ( | ) | const [inline] |
return a reference to the coordinates system
Definition at line 280 of file video.h.
References _coord_sys.
| StillImage * hoa_video::GameVideo::GetDefaultCursor | ( | ) |
returns the cursor image
Definition at line 1536 of file video.cpp.
References _default_menu_cursor, and hoa_video::StillImage::GetWidth().
Referenced by hoa_video::OptionBox::Draw().
Here is the call graph for this function:

| void hoa_video::GameVideo::GetDrawPosition | ( | float & | x, | |
| float & | y | |||
| ) |
| std::string hoa_video::GameVideo::GetFont | ( | ) | const |
get name of current font
Definition at line 97 of file text.cpp.
References _current_font.
| FontProperties * hoa_video::GameVideo::GetFontProperties | ( | const std::string & | font_name | ) |
Get the font properties for a previously loaded font.
| font_name | The referred name of the loaded font (e.g. "courier24"). |
Definition at line 71 of file text.cpp.
References _font_map, IsValidFont(), and hoa_video::VIDEO_DEBUG.
Referenced by hoa_video::OptionBox::SetFont().
Here is the call graph for this function:

| int32 hoa_video::GameVideo::GetFrameChange | ( | ) | [inline] |
returns the amount of animation frames that have passed since the last call to GameVideo::Display(). This number is based on VIDEO_ANIMATION_FRAME_PERIOD, and is used so that AnimatedImages know how many frames to increment themselves by.
Definition at line 789 of file video.h.
References _current_frame_diff.
Referenced by hoa_video::AnimatedImage::Update().
| float hoa_video::GameVideo::GetGamma | ( | ) |
Returns the gamma value.
Definition at line 1354 of file video.cpp.
References _gamma_value.
Referenced by hoa_boot::BootMode::_OnBrightnessLeft(), hoa_boot::BootMode::_OnBrightnessRight(), hoa_boot::BootMode::_SaveSettingsFile(), and hoa_boot::BootMode::_UpdateVideoOptions().
| int32 hoa_video::GameVideo::GetHeight | ( | ) | const [inline] |
returns height, (whatever was set with SetResolution)
Definition at line 275 of file video.h.
References _height.
Referenced by hoa_boot::BootMode::_OnResolution1024x768(), hoa_boot::BootMode::_OnResolution640x480(), hoa_boot::BootMode::_OnResolution800x600(), hoa_boot::BootMode::_SaveSettingsFile(), hoa_boot::BootMode::_UpdateVideoOptions(), hoa_shop::ShopMode::Draw(), hoa_quit::QuitMode::Draw(), hoa_pause::PauseMode::Draw(), hoa_menu::MenuMode::Draw(), and hoa_editor::Grid::paintGL().
| bool hoa_video::GameVideo::GetImageInfo | ( | const std::string & | file_name, | |
| uint32 & | rows, | |||
| uint32 & | cols, | |||
| uint32 & | bpp | |||
| ) |
Get information of an image file.
| file_name | Name of the file, without the extension | |
| rows | Rows of the image | |
| cols | Columns of the image | |
| bpp | Bits per pixel of the image |
Definition at line 87 of file tex_mgmt.cpp.
References _GetImageInfoJpeg(), _GetImageInfoPng(), and hoa_video::VIDEO_DEBUG.
Referenced by LoadMultiImageFromElementsSize(), and LoadMultiImageFromNumberElements().
Here is the call graph for this function:

| int32 hoa_video::GameVideo::GetNumParticles | ( | ) |
get number of live particles
Definition at line 108 of file effects.cpp.
References _particle_manager, and hoa_video::private_video::ParticleManager::GetNumParticles().
Here is the call graph for this function:

| ParticleEffect * hoa_video::GameVideo::GetParticleEffect | ( | ParticleEffectID | id | ) |
get pointer to an effect given its ID
Definition at line 97 of file effects.cpp.
References _particle_manager, and hoa_video::private_video::ParticleManager::GetEffect().
Here is the call graph for this function:

| void hoa_video::GameVideo::GetPixelSize | ( | double & | x, | |
| double & | y | |||
| ) | [inline] |
Return the pixel size expressed coordinate system units.
| x | Horizontal resolution | |
| x | Vertical resolution |
Definition at line 292 of file video.h.
References _coord_sys, _height, _width, hoa_video::CoordSys::GetBottom(), hoa_video::CoordSys::GetLeft(), hoa_video::CoordSys::GetRight(), and hoa_video::CoordSys::GetTop().
Referenced by hoa_map::MapMode::_CalculateDrawInfo().
Here is the call graph for this function:

| Color & hoa_video::GameVideo::GetSceneLightingColor | ( | ) |
returns the scene lighting color
Definition at line 1088 of file video.cpp.
References _light_color.
Referenced by hoa_video::private_video::ParticleSystem::Draw().
| ScreenRect hoa_video::GameVideo::GetScissorRect | ( | ) | [inline] |
returns scissor rect
Definition at line 383 of file video.h.
References _scissor_rect.
Referenced by hoa_video::OptionBox::Draw(), and hoa_video::MenuWindow::Draw().
| Color hoa_video::GameVideo::GetTextColor | ( | ) | const |
get current text color
Definition at line 107 of file text.cpp.
References _current_text_color.
Referenced by hoa_video::TextBox::_DrawTextLines(), and hoa_video::TextBox::Draw().
| int32 hoa_video::GameVideo::GetWidth | ( | ) | const [inline] |
returns width, (whatever was set with SetResolution)
Definition at line 270 of file video.h.
References _width.
Referenced by hoa_boot::BootMode::_OnResolution1024x768(), hoa_boot::BootMode::_OnResolution640x480(), hoa_boot::BootMode::_OnResolution800x600(), hoa_boot::BootMode::_SaveSettingsFile(), hoa_boot::BootMode::_UpdateVideoOptions(), hoa_shop::ShopMode::Draw(), hoa_quit::QuitMode::Draw(), hoa_pause::PauseMode::Draw(), hoa_menu::MenuMode::Draw(), and hoa_editor::Grid::paintGL().
| bool hoa_video::GameVideo::IsFading | ( | ) |
Determines if a fade is currently occurring.
Definition at line 162 of file fade.cpp.
References _fader, and hoa_video::private_video::ScreenFader::IsFading().
Referenced by hoa_boot::BootMode::Update().
Here is the call graph for this function:

| bool hoa_video::GameVideo::IsFullscreen | ( | ) |
returns true if game is in fullscreen mode
Definition at line 808 of file video.cpp.
References _fullscreen.
Referenced by hoa_boot::BootMode::_SaveSettingsFile(), and hoa_boot::BootMode::_UpdateVideoOptions().
| bool hoa_video::GameVideo::IsMenuSkinAvailable | ( | std::string & | skin_name | ) | const [inline] |
Returns true if there is a menu skin avialable corresponding to the argument name.
Definition at line 840 of file video.h.
References hoa_video::private_video::GUIManager.
| bool hoa_video::GameVideo::IsScissoringEnabled | ( | ) | [inline] |
returns true if scissoring's enabled
Definition at line 358 of file video.h.
References _scissor_enabled.
Referenced by hoa_video::OptionBox::Draw(), and hoa_video::MenuWindow::Draw().
| bool hoa_video::GameVideo::IsShaking | ( | ) |
returns true if screen is shaking
Definition at line 131 of file shake.cpp.
References _shake_forces.
| bool hoa_video::GameVideo::IsValidFont | ( | const std::string & | name | ) | [inline] |
Returns true if a font has already been successfully loaded.
| name | The name which to refer to the loaded font (e.g. "courier24"). |
Definition at line 479 of file video.h.
References _font_map.
Referenced by CalculateTextWidth(), and GetFontProperties().
| bool hoa_video::GameVideo::LoadAnimatedImageFromElementsSize | ( | AnimatedImage & | image, | |
| const std::string & | file_name, | |||
| const uint32 | rows, | |||
| const uint32 | cols | |||
| ) |
Loads a MultiImage in an AnimatedImage as frames. This function loads an image and cut it in pieces, loading each of that on frames of an AnimatedImage.
| image | AnimatedImage where the cut images will be loaded. | |
| file_name | Name of the file. | |
| rows | Number of rows of sub-images in the MultiImage. | |
| cols | Number of columns of sub-images in the MultiImage. |
Definition at line 628 of file tex_mgmt.cpp.
| bool hoa_video::GameVideo::LoadAnimatedImageFromNumberElements | ( | AnimatedImage & | image, | |
| const std::string & | file_name, | |||
| const uint32 | rows, | |||
| const uint32 | cols | |||
| ) |
Loads a MultiImage in an AnimatedImage as frames. This function loads an image and cut it in pieces, loading each of that on frames of an AnimatedImage.
| image | AnimatedImage where the cut images will be loaded. | |
| file_name | Name of the file. | |
| rows | Number of rows of sub-images in the MultiImage. | |
| cols | Number of columns of sub-images in the MultiImage. |
Definition at line 597 of file tex_mgmt.cpp.
References LoadMultiImageFromNumberElements(), and hoa_video::VIDEO_DEBUG.
Referenced by hoa_global::GlobalCharacter::GlobalCharacter().
Here is the call graph for this function:

| bool hoa_video::GameVideo::LoadFont | ( | const std::string & | TTF_filename, | |
| const std::string & | name, | |||
| uint32 | size | |||
| ) |
Loads a font from a .ttf file with a specific size.
| TTF_filename | The filename of the .ttf file to load. | |
| name | The name which to refer to the font (e.g. "courier24", "default", etc.) | |
| size | The point size of the font |
Referenced by InitializeEngine(), and SingletonInitialize().
| bool hoa_video::GameVideo::LoadImage | ( | ImageDescriptor & | id | ) |
loads an image (static or animated image). Assumes that you have already called all the appropriate functions to initialize the image. In the case of a static image, this means setting its filename, and possibly other properties like width, height, and color. In the case of an animated image, it means calling AddFrame().
| id | image descriptor to load- either a StillImage or AnimatedImage. |
Definition at line 208 of file tex_mgmt.cpp.
References _LoadImage().
Referenced by hoa_video::OptionBox::_ConstructOption(), hoa_video::MenuWindow::_RecreateImage(), hoa_battle::BattleMode::_TEMP_LoadTestData(), hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_battle::private_battle::BattleActor::BattleActor(), hoa_battle::private_battle::BattleCharacterActor::BattleCharacterActor(), hoa_battle::private_battle::BattleEnemyActor::BattleEnemyActor(), hoa_battle::BattleMode::BattleMode(), hoa_boot::BootMode::BootMode(), hoa_video::private_video::ParticleSystem::Create(), Display(), DrawFullscreenOverlay(), hoa_menu::private_menu::EquipWindow::EquipWindow(), hoa_video::ImageDescriptor::Load(), hoa_menu::private_menu::CharacterWindow::SetCharacter(), SetDefaultCursor(), hoa_map::private_map::VirtualSprite::SetFacePortrait(), hoa_global::GameGlobal::SetLocation(), and hoa_menu::private_menu::StatusWindow::StatusWindow().
Here is the call graph for this function:

| bool hoa_video::GameVideo::LoadImageGrayScale | ( | ImageDescriptor & | id | ) |
loads an image (static or animated image). Assumes that you have already called all the appropriate functions to initialize the image. In the case of a static image, this means setting its filename, and possibly other properties like width, height, and color. In the case of an animated image, it means calling AddFrame(). The image is loaded in grayscale.
| id | image descriptor to load- either a StillImage or AnimatedImage. |
| bool hoa_video::GameVideo::LoadMenuSkin | ( | std::string | skin_name, | |
| std::string | border_image, | |||
| std::string | background_image, | |||
| Color | top_left, | |||
| Color | top_right, | |||
| Color | bottom_left, | |||
| Color | bottom_right, | |||
| bool | make_default = false | |||
| ) |
A background image with multiple background colors.
Definition at line 1015 of file video.cpp.
References hoa_video::private_video::GUIManager, and hoa_video::private_video::GUISupervisor::LoadMenuSkin().
Here is the call graph for this function:

| bool hoa_video::GameVideo::LoadMenuSkin | ( | std::string | skin_name, | |
| std::string | border_image, | |||
| std::string | background_image, | |||
| Color | background_color, | |||
| bool | make_default = false | |||
| ) |
A background image with a single background color.
Definition at line 1006 of file video.cpp.
References hoa_video::private_video::GUIManager, and hoa_video::private_video::GUISupervisor::LoadMenuSkin().
Here is the call graph for this function:

| bool hoa_video::GameVideo::LoadMenuSkin | ( | std::string | skin_name, | |
| std::string | border_image, | |||
| Color | top_left, | |||
| Color | top_right, | |||
| Color | bottom_left, | |||
| Color | bottom_right, | |||
| bool | make_default = false | |||
| ) |
No background image with multiple background colors.
Definition at line 997 of file video.cpp.
References hoa_video::private_video::GUIManager, and hoa_video::private_video::GUISupervisor::LoadMenuSkin().
Here is the call graph for this function:

| bool hoa_video::GameVideo::LoadMenuSkin | ( | std::string | skin_name, | |
| std::string | border_image, | |||
| Color | background_color, | |||
| bool | make_default = false | |||
| ) |
No background image with a single background color.
Definition at line 989 of file video.cpp.
References hoa_video::private_video::GUIManager, and hoa_video::private_video::GUISupervisor::LoadMenuSkin().
Here is the call graph for this function:

| bool hoa_video::GameVideo::LoadMenuSkin | ( | std::string | skin_name, | |
| std::string | border_image, | |||
| std::string | background_image, | |||
| bool | make_default = false | |||
| ) |
A background image with no background colors.
Definition at line 981 of file video.cpp.
References hoa_video::Color::clear, hoa_video::private_video::GUIManager, and hoa_video::private_video::GUISupervisor::LoadMenuSkin().
Referenced by InitializeEngine().
Here is the call graph for this function:

| bool hoa_video::GameVideo::LoadMultiImageFromElementsSize | ( | std::vector< StillImage > & | images, | |
| const std::string & | filename, | |||
| const uint32 | width, | |||
| const uint32 | height | |||
| ) |
Loads a MultiImage in a vector of StillImages. This function loads an image and cut it in pieces, loading each of that on separate StillImage objects. It uses the size of the stored elements as input parameters.
| images | Vector of StillImages where the cut images will be loaded. | |
| filename | Name of the file. | |
| width | Width of a stored element. | |
| height | Height of a stored element. |
Definition at line 392 of file tex_mgmt.cpp.
References _LoadMultiImage(), GetImageInfo(), and hoa_video::VIDEO_DEBUG.
Here is the call graph for this function:

| bool hoa_video::GameVideo::LoadMultiImageFromNumberElements | ( | std::vector< StillImage > & | images, | |
| const std::string & | filename, | |||
| const uint32 | rows, | |||
| const uint32 | cols | |||
| ) |
Loads a MultiImage in a vector of StillImages. This function loads an image and cut it in pieces, loading each of that on separate StillImage objects. It uses the number of stored elements as input parameters.
| images | Vector of StillImages where the cut images will be loaded. | |
| filename | Name of the file. | |
| rows | Number of rows of sub-images in the MultiImage. | |
| cols | Number of columns of sub-images in the MultiImage. |
Definition at line 352 of file tex_mgmt.cpp.
References _LoadMultiImage(), GetImageInfo(), and hoa_video::VIDEO_DEBUG.
Referenced by hoa_map::MapMode::_LoadTiles(), hoa_global::GlobalCharacter::GlobalCharacter(), hoa_global::GlobalEnemy::GlobalEnemy(), LoadAnimatedImageFromNumberElements(), hoa_map::private_map::MapSprite::LoadStandardAnimations(), and hoa_editor::Tileset::Tileset().
Here is the call graph for this function:

| bool hoa_video::GameVideo::MakeLightning | ( | const std::string & | lit_file | ) |
call to create lightning effect
| lit_file | a .lit file which contains lightning intensities stored as bytes (0-255). |
Definition at line 1682 of file video.cpp.
References _lightning_active, _lightning_current_time, _lightning_data, and _lightning_end_time.
| bool hoa_video::GameVideo::MakeScreenshot | ( | ) |
makes a screenshot, saves it as screenshot.jpg in the directory of the game
Definition at line 361 of file video.cpp.
References _SaveJpeg(), hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::VIDEO_DEBUG, and hoa_video::private_video::ImageLoadInfo::width.
Referenced by hoa_input::GameInput::_KeyEventHandler().
Here is the call graph for this function:

| void hoa_video::GameVideo::Move | ( | float | x, | |
| float | y | |||
| ) |
sets draw position to (x,y)
| x | x coordinate to move to | |
| y | y coordinate to move to |
Definition at line 886 of file video.cpp.
Referenced by hoa_boot::BootMode::_AnimateLogo(), _DEBUG_ShowAdvancedStats(), _DEBUG_ShowTexSheet(), hoa_video::ParticleEffect::_Draw(), hoa_battle::private_battle::ActionWindow::_DrawActionInformation(), hoa_battle::private_battle::ActionWindow::_DrawActionSelection(), hoa_boot::BootMode::_DrawBackgroundItems(), hoa_battle::BattleMode::_DrawBackgroundVisuals(), hoa_menu::MenuMode::_DrawBottomMenu(), hoa_battle::BattleMode::_DrawBottomMenu(), hoa_battle::private_battle::ActionWindow::_DrawTargetSelection(), hoa_video::TextBox::_DrawTextLines(), hoa_battle::BattleMode::_DrawTimeMeter(), hoa_video::OptionBox::_SetupAlignment(), Display(), hoa_video::TextBox::Draw(), hoa_shop::private_shop::ConfirmWindow::Draw(), hoa_shop::private_shop::ObjectInfoWindow::Draw(), hoa_shop::ShopMode::Draw(), hoa_quit::QuitMode::Draw(), hoa_pause::PauseMode::Draw(), hoa_video::OptionBox::Draw(), hoa_video::MenuWindow::Draw(), hoa_menu::private_menu::EquipWindow::Draw(), hoa_menu::private_menu::SkillsWindow::Draw(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::InventoryWindow::Draw(), hoa_menu::private_menu::CharacterWindow::Draw(), hoa_menu::MenuMode::Draw(), hoa_map::private_map::DialogueManager::Draw(), hoa_map::MapMode::Draw(), hoa_boot::WelcomeScreen::Draw(), hoa_boot::CreditsScreen::Draw(), hoa_boot::BootMode::Draw(), hoa_battle::private_battle::FinishWindow::Draw(), hoa_video::private_video::GUISupervisor::DrawFPS(), DrawFullscreenOverlay(), DrawGrid(), DrawHalo(), hoa_map::private_map::MapObject::DrawHelper(), hoa_battle::private_battle::BattleCharacterActor::DrawPortrait(), hoa_battle::private_battle::BattleEnemyActor::DrawSprite(), hoa_battle::private_battle::BattleCharacterActor::DrawSprite(), hoa_battle::private_battle::BattleEnemyActor::DrawStatus(), hoa_battle::private_battle::BattleCharacterActor::DrawStatus(), hoa_battle::private_battle::BattleActor::DrawTimePortrait(), and hoa_editor::Grid::paintGL().
| void hoa_video::GameVideo::MoveRelative | ( | float | dx, | |
| float | dy | |||
| ) |
moves draw position (dx, dy) units
| dx | how many units to move in x direction | |
| dy | how many units to move in y direction |
Definition at line 902 of file video.cpp.
Referenced by _DEBUG_ShowTexSheet(), hoa_battle::private_battle::ActionWindow::_DrawActionInformation(), hoa_battle::private_battle::ActionWindow::_DrawActionSelection(), hoa_menu::MenuMode::_DrawBottomMenu(), hoa_battle::BattleMode::_DrawBottomMenu(), _DrawStillImage(), hoa_video::TextBox::_DrawTextLines(), hoa_menu::private_menu::InventoryWindow::_InitInventoryItems(), Draw(), hoa_shop::private_shop::ObjectInfoWindow::Draw(), hoa_video::OptionBox::Draw(), hoa_menu::private_menu::EquipWindow::Draw(), hoa_menu::private_menu::SkillsWindow::Draw(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::InventoryWindow::Draw(), hoa_menu::private_menu::CharacterWindow::Draw(), hoa_map::private_map::VirtualSprite::Draw(), hoa_map::private_map::DialogueManager::Draw(), hoa_map::MapMode::Draw(), hoa_boot::BootMode::Draw(), hoa_battle::private_battle::BattleEnemyActor::DrawStatus(), hoa_battle::private_battle::BattleCharacterActor::DrawStatus(), DrawText(), and hoa_editor::Grid::paintGL().
| void hoa_video::GameVideo::PopMatrix | ( | ) |
pops the modelview transformation from the stack.
Definition at line 1558 of file video.cpp.
Referenced by hoa_video::ParticleEffect::_Draw(), and DrawHalo().
| void hoa_video::GameVideo::PopState | ( | ) |
pops the most recently pushed video engine state from the stack and restores all of the old settings.
Definition at line 971 of file video.cpp.
References _PopContext().
Referenced by hoa_video::TextBox::_DrawTextLines(), hoa_video::private_video::GUIControl::CalculateAlignedRect(), hoa_map::private_map::DialogueManager::DialogueManager(), Display(), hoa_shop::private_shop::ConfirmWindow::Draw(), hoa_video::private_video::ParticleManager::Draw(), hoa_map::private_map::DialogueManager::Draw(), hoa_map::MapMode::Draw(), DrawFullscreenOverlay(), DrawGrid(), and hoa_video::MenuWindow::Update().
Here is the call graph for this function:

| void hoa_video::GameVideo::PushMatrix | ( | ) |
saves current modelview transformation on to the stack. In English, that means the combined result of calls to Move/MoveRelative/Scale/Rotate
Definition at line 1549 of file video.cpp.
Referenced by hoa_video::ParticleEffect::_Draw(), and DrawHalo().
| void hoa_video::GameVideo::PushState | ( | ) |
saves entire state of the video engine on to the stack (all draw flags, coordinate system, scissor rect, viewport, etc.) This is useful for safety purposes between two major parts of code to ensure that one part doesn't inadvertently affect the other. However, it's a very expensive function call. If you only need to push the current transformation, you should use PushMatrix() and PopMatrix()
Definition at line 961 of file video.cpp.
References _PushContext().
Referenced by hoa_video::TextBox::_DrawTextLines(), hoa_video::private_video::GUIControl::CalculateAlignedRect(), hoa_map::private_map::DialogueManager::DialogueManager(), Display(), hoa_shop::private_shop::ConfirmWindow::Draw(), hoa_video::private_video::ParticleManager::Draw(), hoa_map::private_map::DialogueManager::Draw(), hoa_map::MapMode::Draw(), DrawFullscreenOverlay(), DrawGrid(), and hoa_video::MenuWindow::Update().
Here is the call graph for this function:

| bool hoa_video::GameVideo::ReloadTextures | ( | ) |
reloads textures that have been unloaded after a video settings change
Definition at line 2706 of file tex_mgmt.cpp.
References _CreateBlankGLTexture(), _DeleteTempTextures(), _light_overlay, _tex_sheets, _uses_lights, hoa_video::private_video::TexSheet::Reload(), and hoa_video::VIDEO_DEBUG.
Referenced by ApplySettings().
Here is the call graph for this function:

| RenderedString * hoa_video::GameVideo::RenderText | ( | const hoa_utils::ustring & | txt | ) |
Renders the given string to a drawable object.
| txt | The string to render |
Definition at line 761 of file text.cpp.
References _CacheGlyphs(), _coord_sys, _current_font, _current_text_color, _font_map, _GenTexLine(), _text_shadow, hoa_video::RenderedString::Add(), hoa_utils::ustring::c_str(), hoa_utils::ustring::empty(), hoa_video::CoordSys::GetHorizontalDirection(), hoa_video::CoordSys::GetVerticalDirection(), hoa_video::FontProperties::line_skip, hoa_utils::MakeStandardString(), RenderedString, hoa_video::FontProperties::shadow_style, hoa_video::FontProperties::shadow_x, hoa_video::FontProperties::shadow_y, hoa_utils::ustring::size(), hoa_video::FontProperties::ttf_font, hoa_video::VIDEO_DEBUG, and hoa_video::VIDEO_TEXT_SHADOW_NONE.
Referenced by hoa_boot::WelcomeScreen::Show(), and hoa_boot::CreditsScreen::Show().
Here is the call graph for this function:

| void hoa_video::GameVideo::Rotate | ( | float | angle | ) |
rotates images counterclockwise by 'angle' radians
| angle | how many radians to rotate by |
Definition at line 928 of file video.cpp.
Referenced by hoa_boot::BootMode::_AnimateLogo().
| bool hoa_video::GameVideo::SaveImage | ( | const std::string & | file_name, | |
| const AnimatedImage & | image | |||
| ) | const |
Saves an AnimatedImage into a file.
Definition at line 1235 of file tex_mgmt.cpp.
References SaveImage().
Here is the call graph for this function:

| bool hoa_video::GameVideo::SaveImage | ( | const std::string & | file_name, | |
| const StillImage & | image | |||
| ) | const |
Saves a StillImage into a file.
Definition at line 1256 of file tex_mgmt.cpp.
References hoa_video::StillImage::_elements, _GetBufferFromImage(), _RGBAToRGB(), _SaveJpeg(), _SavePng(), and hoa_video::VIDEO_DEBUG.
Here is the call graph for this function:

| bool hoa_video::GameVideo::SaveImage | ( | const std::string & | file_name, | |
| const std::vector< StillImage * > & | image, | |||
| const uint32 | rows, | |||
| const uint32 | columns | |||
| ) | const |
Saves a vector of images in a single file.
Definition at line 1079 of file tex_mgmt.cpp.
References _BindTexture(), hoa_video::private_video::TexSheet::height, hoa_video::private_video::ImageLoadInfo::height, hoa_video::private_video::ImageLoadInfo::pixels, hoa_video::private_video::TexSheet::tex_ID, hoa_video::private_video::Image::texture_sheet, hoa_video::VIDEO_DEBUG, hoa_video::VideoManager, hoa_video::private_video::TexSheet::width, hoa_video::private_video::ImageLoadInfo::width, hoa_video::private_video::Image::x, and hoa_video::private_video::Image::y.
Referenced by hoa_video::ImageDescriptor::Save(), and SaveImage().
Here is the call graph for this function:

| void hoa_video::GameVideo::Scale | ( | float | x, | |
| float | y | |||
| ) |
after you call this, subsequent calls to DrawImage() result in a scaled image
| x | pass 1.0 for normal horizontal scaling, 2.0 for double scaling, etc. | |
| y | same, except vertical scaling |
| void hoa_video::GameVideo::SetCoordSys | ( | const CoordSys & | coordinate_system | ) |
sets the coordinate system. Default is (0,1024,0,768)
| coordinate_system | the coordinate system you want to set to |
Definition at line 478 of file video.cpp.
References _coord_sys, hoa_video::CoordSys::GetBottom(), hoa_video::CoordSys::GetLeft(), hoa_video::CoordSys::GetRight(), and hoa_video::CoordSys::GetTop().
Here is the call graph for this function:

| void hoa_video::GameVideo::SetCoordSys | ( | float | left, | |
| float | right, | |||
| float | bottom, | |||
| float | top | |||
| ) |
sets the coordinate system. Default is (0,1024,0,768)
| left | left border of screen | |
| right | right border of screen | |
| top | top border of screen | |
| bottom | bottom border of screen |
Definition at line 497 of file video.cpp.
Referenced by _DEBUG_ShowTexSheet(), _PopContext(), ApplyLightingOverlay(), hoa_boot::BootMode::BootMode(), hoa_map::private_map::DialogueManager::DialogueManager(), Display(), hoa_shop::ShopMode::Draw(), hoa_quit::QuitMode::Draw(), hoa_pause::PauseMode::Draw(), hoa_video::private_video::ParticleManager::Draw(), hoa_menu::MenuMode::Draw(), hoa_map::private_map::DialogueManager::Draw(), hoa_map::MapMode::Draw(), DrawFullscreenOverlay(), hoa_editor::Grid::paintGL(), hoa_shop::ShopMode::Reset(), hoa_quit::QuitMode::Reset(), hoa_pause::PauseMode::Reset(), hoa_menu::MenuMode::Reset(), hoa_map::MapMode::Reset(), hoa_boot::BootMode::Reset(), and hoa_battle::BattleMode::Reset().
| bool hoa_video::GameVideo::SetDefaultCursor | ( | const std::string & | cursor_image_filename | ) |
sets the default cursor to the image in the given filename
| cursor_image_filename | file containing the cursor image |
Definition at line 1526 of file video.cpp.
References _default_menu_cursor, LoadImage(), and hoa_video::StillImage::SetFilename().
Referenced by SingletonInitialize().
Here is the call graph for this function:

| void hoa_video::GameVideo::SetDefaultMenuSkin | ( | std::string & | skin_name | ) | [inline] |
Sets the default menu skin to use.
| skin_name | The name of the already loaded menu skin that should be made the default skin |
Definition at line 850 of file video.h.
References hoa_video::private_video::GUIManager.
| void hoa_video::GameVideo::SetDrawFlags | ( | int32 | first_flag, | |
| ... | ||||
| ) |
sets draw flags (flip, align, blending, etc). Simply pass in as many parameters as you want, as long as the last parameter is a zero. e.g. SetDrawFlags(VIDEO_X_LEFT, VIDEO_Y_CENTER, 0);
| first_flag | the first of many draw flags | |
| .. | specify as many draw flags as you want. Terminate with a 0. |
Definition at line 512 of file video.cpp.
References _blend, _x_align, _x_flip, _y_align, _y_flip, hoa_video::VIDEO_BLEND, hoa_video::VIDEO_BLEND_ADD, hoa_video::VIDEO_DEBUG, hoa_video::VIDEO_NO_BLEND, hoa_video::VIDEO_X_CENTER, hoa_video::VIDEO_X_FLIP, hoa_video::VIDEO_X_LEFT, hoa_video::VIDEO_X_NOFLIP,