Results 1 to 3 of 3

Thread: Horizontal flip

  1. #1

    Default Horizontal flip

    Is there any easy way to flip entity horizontally?

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    Quote Originally Posted by rzuf View Post
    Is there any easy way to flip entity horizontally?
    Hmm, no there isn't. OverlayRenderComponent.cpp respects a "rotation" parm which would work if you didn't need it mirrored..

    There is a way to make a Surface blit mirrored though:
    Code:
    //blit the logo with the Y mirrored (this snippet works from in RTBareBones's App::Draw)
    rtRect texRect = rtRect(0, m_surf.GetHeight(), m_surf.GetWidth(), 0);
    rtRect destRect = rtRect(0,0, m_surf.GetWidth(), m_surf.GetHeight());
    m_surf.BlitEx(destRect, texRect);
    Using that trick, it wouldn't be too hard to make OverlayRenderComponent.cpp respect a "flipx" and "flipy" parm. (I guess it should be a uint of 0 or 1 for speed..)

    Well, actually it would be a problem since I don't think there is a BlitEx in SurfaceAnim (a subclass of Surface), which means it wouldn't work for anims unless SurfaceAnim added some stuff too.
    Seth A. Robinson
    Robinson Technologies

  3. #3

    Default

    Well, actually it would be a problem since I don't think there is a BlitEx in SurfaceAnim (a subclass of Surface), which means it wouldn't work for anims unless SurfaceAnim added some stuff too.

    Guess I'll just make some additional textures for now.
    Thanks.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •