diff VideoPlayer.h @ 0:8b8875f5b359

Initial commit
author Nomad
date Fri, 05 Oct 2012 16:07:14 +0200
parents
children 3fa5d0522f92
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VideoPlayer.h	Fri Oct 05 16:07:14 2012 +0200
@@ -0,0 +1,163 @@
+#pragma once
+#include "OSAPI.h"
+
+#include "Texture.h"
+#include "mm7_data.h"
+
+
+
+#pragma pack(push, 1)
+
+
+
+struct _BINK
+{
+  int Width;
+  int Height;
+  int Frame;
+  int CurrentFrame;
+  int Data1;
+  int FrameRate;
+  int field_18[3];
+  int Flags;
+};
+
+struct _BINKBUF
+{
+  int uWidth;
+  int uHeight;
+  int field_8;
+  int field_C;
+  int uBinkDDSurfaceType;
+  void *pDDrawSurfaceData;
+  int uDDrawSurfacePitch;
+  int field_1C;
+  int field_20;
+  int field_24;
+  int field_28;
+  int field_2C;
+  int field_30;
+  int field_34;
+  int field_38;
+  int field_3C;
+  int field_40;
+  int field_44;
+  struct IDirectDrawSurface *pTargetDDrawSurface;
+  int field_4C;
+  int uRectX;
+  int uRectY;
+  HWND hWnd;
+  int field_5C;
+  float field_60;
+  float field_64;
+  int field_68;
+  int field_6C;
+  void *pDDrawSurfaceData_;
+  int field_74;
+  int field_78;
+};
+#pragma pack(pop)
+
+
+
+
+#pragma pack(push, 1)
+struct MovieHeader
+{
+  char pVideoName[40];
+  unsigned int uFileOffset;
+};
+#pragma pack(pop)
+
+
+
+
+
+void __cdecl ShowIntroVideo_and_LoadingScreen();
+
+
+
+
+#pragma pack(push, 1)
+struct VideoPlayer
+{
+  //----- (004BE6F5) --------------------------------------------------------
+  inline VideoPlayer():
+    field_54(0),
+    pBinkMovie(nullptr), pBinkBuffer(nullptr),
+    pSmackerMovie(nullptr), pSmackerBuffer(nullptr), pSmackMovieBlit(nullptr)
+  {
+    //RGBTexture::RGBTexture(&pVideoPlayer->pVideoFrame);
+    bStopBeforeSchedule = false;
+    field_40 = 0;
+    byte_F8BC0C = 0;
+    //pBinkMovie = nullptr;
+  }
+  //----- (004BECBD) --------------------------------------------------------
+  virtual ~VideoPlayer()
+  {
+    bStopBeforeSchedule = false;
+    field_40 = 0;
+    pVideoFrame.Release();
+  }
+
+  void PlayDeathMovie();
+  unsigned int SmackCheckSurfaceFromat();
+  void Initialize();
+  void Prepare();
+  void Unload();
+  void _4BECD5(unsigned int a2);
+  void BinkDrawFrame(HWND hWnd, int a3, int a4);
+  void BinkUpdatePalette(HWND hWnd) {}
+  void SmackDrawFrame(HWND hWnd, int a3, int a4);
+  void SmackUpdatePalette(HWND hWnd);
+  _BINK *OpenBink(const char *pName);
+  struct _SMACK *OpenSmack(const char *pFilename);
+  void _4BF28F(const char *pMovieName, unsigned int a3_1);
+  bool AnyMovieLoaded();
+  void OpenMovie(const char *pFilename, unsigned int bLoop, int a4);
+  void _4BF5B2();
+  void _4BF73A();
+  _BINKBUF *CreateBinkBuffer(HWND a1, unsigned int uWidth, unsigned int uHeight, char a4);
+
+  static void __fastcall MovieLoop(const char *pMovieName, int a2, int a3, int a4);
+
+
+  RGBTexture pVideoFrame;
+  struct _SMACK *pSmackerMovie;
+  struct _SMACKBUF *pSmackerBuffer;
+  char *pSomeSmackerBuffer;
+  int field_34;
+  MovieHeader *pMightVideoHeaders;
+  MovieHeader *pMagicVideoHeaders;
+  int field_40;
+  int field_44;
+  unsigned int uNumMightVideoHeaders;
+  unsigned int uNumMagicVideoHeaders;
+  int uBinkDirectDrawSurfaceType;
+  int field_54;
+  unsigned int bPlayingMovie;
+  unsigned int bFirstFrame;
+  unsigned int bUsingSmackerMMX;
+  unsigned int bLoopPlaying;
+  int field_68;
+  unsigned int bStopBeforeSchedule;
+  HWND hWindow;
+  struct _SMACKBLIT *pSmackMovieBlit;
+  HANDLE hMightVid;
+  HANDLE hMagicVid;
+  _BINK *pBinkMovie;
+  _BINKBUF *pBinkBuffer;
+  char field_88[20];
+  unsigned int uMovieFormat;
+  int dword_0000A0;
+  char pCurrentMovieName[64];
+  char pVideoFrameTextureFilename[32];
+};
+#pragma pack(pop)
+
+
+
+
+
+extern VideoPlayer *pVideoPlayer;