structure.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. package brlyt
  2. // Pane represents the structure of a pan1 section.
  3. type Pane struct {
  4. Flag uint8
  5. Origin uint8
  6. Alpha uint8
  7. _ uint8
  8. PaneName [16]byte
  9. UserData [8]byte
  10. XTranslation float32
  11. YTranslation float32
  12. ZTranslation float32
  13. XRotate float32
  14. YRotate float32
  15. ZRotate float32
  16. XScale float32
  17. YScale float32
  18. Width float32
  19. Height float32
  20. }
  21. // PIC defines the image pane in a brlyt
  22. type PIC struct {
  23. Flag uint8
  24. Origin uint8
  25. Alpha uint8
  26. _ uint8
  27. PaneName [16]byte
  28. UserData [8]byte
  29. XTranslation float32
  30. YTranslation float32
  31. ZTranslation float32
  32. XRotate float32
  33. YRotate float32
  34. ZRotate float32
  35. XScale float32
  36. YScale float32
  37. Width float32
  38. Height float32
  39. TopLeftColor [4]uint8
  40. TopRightColor [4]uint8
  41. BottomLeftColor [4]uint8
  42. BottomRightColor [4]uint8
  43. MatIndex uint16
  44. NumOfUVSets uint8
  45. _ uint8
  46. }
  47. type UVSet struct {
  48. TopLeftS float32
  49. TopLeftT float32
  50. TopRightS float32
  51. TopRightT float32
  52. BottomLeftS float32
  53. BottomLeftT float32
  54. BottomRightS float32
  55. BottomRightT float32
  56. }
  57. // TXT represents the text data of the txt1 section
  58. type TXT struct {
  59. Flag uint8
  60. Origin uint8
  61. Alpha uint8
  62. _ uint8
  63. PaneName [16]byte
  64. UserData [8]byte
  65. XTranslation float32
  66. YTranslation float32
  67. ZTranslation float32
  68. XRotate float32
  69. YRotate float32
  70. ZRotate float32
  71. XScale float32
  72. YScale float32
  73. Width float32
  74. Height float32
  75. StringLength uint16
  76. MaxStringLength uint16
  77. MatIndex uint16
  78. FontIndex uint16
  79. StringOrigin uint8
  80. LineAlignment uint8
  81. _ uint16
  82. TextOffset uint32
  83. TopColor [4]uint8
  84. BottomColor [4]uint8
  85. FontSizeX float32
  86. FontSizeY float32
  87. CharacterSize float32
  88. LineSize float32
  89. }
  90. type Window struct {
  91. Flag uint8
  92. Origin uint8
  93. Alpha uint8
  94. _ uint8
  95. PaneName [16]byte
  96. UserData [8]byte
  97. XTranslation float32
  98. YTranslation float32
  99. ZTranslation float32
  100. XRotate float32
  101. YRotate float32
  102. ZRotate float32
  103. XScale float32
  104. YScale float32
  105. Width float32
  106. Height float32
  107. Coordinate1 float32
  108. Coordinate2 float32
  109. Coordinate3 float32
  110. Coordinate4 float32
  111. FrameCount uint8
  112. _ [3]byte
  113. WindowOffset uint32
  114. WindowFrameOffset uint32
  115. TopLeftColor [4]uint8
  116. TopRightColor [4]uint8
  117. BottomLeftColor [4]uint8
  118. BottomRightColor [4]uint8
  119. MatIndex uint16
  120. NumOfUVSets uint8
  121. _ uint8
  122. }
  123. type WindowMat struct {
  124. MatIndex uint16
  125. Index uint8
  126. _ uint8
  127. }
  128. type GRP struct {
  129. Name [16]byte
  130. NumOfEntries uint16
  131. _ uint16
  132. }