diff Render.h @ 144:8ab4484c22e0

Billboard drawing's up (actors, decorations, misc sprites)
author Nomad
date Tue, 12 Feb 2013 11:59:49 +0200
parents 8b8fd4d83fdc
children 3235bc4cf78e ee11772d0ad2
line wrap: on
line diff
--- a/Render.h	Tue Feb 12 06:29:34 2013 +0200
+++ b/Render.h	Tue Feb 12 11:59:49 2013 +0200
@@ -52,8 +52,8 @@
 #pragma pack(push, 1)
 struct RenderBillboard
 {
-  int field_0;
-  int field_4;
+  int _screenspace_x_scaler_packedfloat;
+  int _screenspace_y_scaler_packedfloat;
   float fov_x;
   float fov_y;
   int sZValue;
@@ -177,13 +177,13 @@
     Opaque_1 = 1,
     Opaque_2 = 2,
     Opaque_3 = 3,
-    InvalidOpacity = 0xFFFFFFFF
+    NoBlend = 0xFFFFFFFF
   };
 
   IDirect3DTexture2 *pTexture;
   unsigned int uNumVertices;
   RenderVertexD3D3 pQuards[4];
-  float flt_88;
+  float z_order;
   OpacityType uOpacity;
   int field_90;
   int sZValue;
@@ -301,7 +301,7 @@
   void PresentRect(RECT *a2, RECT *a3);
   void BltToFront(RECT *pDstRect, IDirectDrawSurface *pSrcSurface, RECT *pSrcRect, unsigned int uBltFlags);
   void BltBackToFontFast(int a2, int a3, RECT *a4);
-  unsigned int Billboard_ProbablyAddToListAndSortByZOrder(unsigned int a1);
+  unsigned int Billboard_ProbablyAddToListAndSortByZOrder(float z);
   unsigned int GetBillboardDrawListSize();
   unsigned int GetParentBillboardID(unsigned int uBillboardID);
   void BeginSceneD3D();
@@ -316,7 +316,7 @@
   void DrawIndoorPolygon(unsigned int uNumVertices, struct BLVFace *a3, IDirect3DTexture2 *pHwTex, Texture *pTex, int uPackedID, unsigned int uColor, int a8);
   void MakeParticleBillboardAndPush_BLV(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle);
   void MakeParticleBillboardAndPush_ODM(RenderBillboardTransform_local0 *a2, IDirect3DTexture2 *a3, unsigned int uDiffuse, int angle);
-  void TransformBillboard(RenderBillboardTransform_local0 *a2, Sprite *pSprite, int a1a, RenderBillboard *pBillboard);
+  void TransformBillboard(RenderBillboardTransform_local0 *a2, Sprite *pSprite, int paletteSubindex, RenderBillboard *pBillboard);
   void DrawBillboard_Indoor(RenderBillboardTransform_local0 *pSoftBillboard, Sprite *a3, int uPaletteSubindex);
   int MakeParticleBillboardAndPush_BLV_Software(int screenSpaceX, int screenSpaceY, int z, int lightColor, int a6);
   void DrawProjectile(float srcX, float srcY, float a3, float a4, float dstX, float dstY, float a7, float a8, IDirect3DTexture2 *a9);
@@ -349,7 +349,7 @@
   int OnOutdoorRedrawSW();
   void DrawSkyD3D();
   int DrawSkySW(struct Span *a1, stru148 *a2, int a3);
-  void DrawDecorations();
+  void PrepareDecorationsRenderList_ODM();
   void DrawLayingItems_Shooting_Magic_ODM();
   void TransformBillboardsAndSetPalettesODM();
   float DrawBezierTerrain();
@@ -462,13 +462,21 @@
   int *pTargetZ;
   int uScreenSpaceX;
   int uScreenSpaceY;
-  int field_10;
-  int field_14;
+  int _screenspace_x_scaler_packedfloat;
+  int _screenspace_y_scaler_packedfloat;
   char field_18[8];
   unsigned __int16 *pPalette;
   unsigned __int16 *pPalette2;
-  int sZValue;
-  unsigned int uFlags;
+  union
+  {
+    int sZValue;
+    struct
+    {
+      unsigned short object_pid;
+      short          zbuffer_depth;
+    };
+  };
+  unsigned int uFlags;        // & 4   - mirror horizontally
   unsigned int uTargetPitch;
   unsigned int uViewportX;
   unsigned int uViewportY;