Remove another unsafe cast.
m_fStretchTexCoordVelocityX -> TexCoordVelocityX, etc. Remove TYPE_STRETCH. Disassociate BGAL::Type from the "Type" BGA metric. Prefer "Type=sprite", "Type=particles", "Type=tile", and "Stretch=1" (for sprite only). Type=0, 1, 2, 3 still work; 0 is "Type=sprite", Stretch=0 and 1 is Type=sprite, Stretch=1. Remove old code. Historical note: "stretch" was used in this code at various times to mean both 1: "stretch the internal texture image to fit the texture" and 2: "stretch the displayed image to fill the screen". It now only means #2. #1 is done automatically when needed. Note that LoadFromAniLayerFile should never load an INI; it's for backwards- compatibility only. LoadFromIni is simpler and more flexible.
This commit is contained in:
@@ -78,11 +78,9 @@ protected:
|
||||
enum Type
|
||||
{
|
||||
TYPE_SPRITE,
|
||||
TYPE_STRETCH,
|
||||
TYPE_PARTICLES,
|
||||
TYPE_TILES,
|
||||
NUM_TYPES,
|
||||
TYPE_INVALID
|
||||
} m_Type;
|
||||
|
||||
|
||||
@@ -101,8 +99,8 @@ protected:
|
||||
bool m_bLighting;
|
||||
|
||||
// stretch stuff
|
||||
float m_fStretchTexCoordVelocityX;
|
||||
float m_fStretchTexCoordVelocityY;
|
||||
float m_fTexCoordVelocityX;
|
||||
float m_fTexCoordVelocityY;
|
||||
|
||||
// particle and tile stuff
|
||||
float m_fZoomMin, m_fZoomMax;
|
||||
|
||||
Reference in New Issue
Block a user