// CFTTTexParam - [2020-04-13 11:57:47]
#ifndef _CFTTTEXPARAM_H_
#define _CFTTTEXPARAM_H_

#include "common.h"

class CFTTTexture;

class CFTTTexParam {
public:
  CFTTTexParam() __attribute__((always_inline)) {
    texpara_0.s_0.u_0.uFlag_0 = 0;
    texpara_0.s_0.uFlag_4 = 0;
  };

  CFTTTexParam(CFTTTexture *pTexture) __attribute__((always_inline)) {
    texpara_0.s_0.u_0.pTexture_0 = pTexture;
    texpara_0.s_0.uFlag_4 = 0;
  };

  CFTTTexParam(int64_t ul) __attribute__((always_inline)) {
    texpara_0.ulData = ul;
  };

  CFTTTexParam(int al) __attribute__((always_inline)) {
    texpara_0.ulData = (int64_t)al;
  };

  void setTexture(CFTTTexture *pTexture) __attribute__((always_inline)) {
    texpara_0.s_0.u_0.pTexture_0 = pTexture;
    texpara_0.s_0.uFlag_4 = 0;
  };

  void setFlag(uint uFlag) __attribute__((always_inline)) {
    texpara_0.s_0.uFlag_4 = uFlag;
  };

  void setData64(int64_t ul) __attribute__((always_inline)) {
    texpara_0.ulData = ul;
  };

  void setDataEx(int d1) __attribute__((always_inline)) {
    int64_t t1 = d1 + 1;
    texpara_0.ulData = t1 * 2 + 1;
  };

  // void setData(int a1) __attribute__((always_inline)) {
  //   texpara_0.ulData = (int64_t)a1;
  // };

  CFTTTexture *GetTexture() __attribute__((always_inline)) {
    return texpara_0.s_0.u_0.pTexture_0;
  };

  uint GetFlag0() __attribute__((always_inline)) {
    return texpara_0.s_0.u_0.uFlag_0;
  };

  uint GetFlag4() __attribute__((always_inline)) {
    return texpara_0.s_0.uFlag_4;
  };

  int64_t GetData() __attribute__((always_inline)) {
    return texpara_0.ulData;
  };

public:
  union {
    struct {
      union UTexData {
        CFTTTexture *pTexture_0;
        uint uFlag_0;
      } u_0;
      uint uFlag_4;
    } s_0;

    int64_t ulData;
  } texpara_0;
};

#endif  //_CFTTTEXPARAM_H_