Skip to content

Commit

Permalink
Final bits of W3DView (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonwil authored Jan 8, 2024
1 parent 24d413c commit 49ca309
Show file tree
Hide file tree
Showing 7 changed files with 613 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ set(GAMEENGINE_SRC
platform/w3dengine/client/w3dfilesystem.cpp
platform/w3dengine/client/w3dgameclient.cpp
platform/w3dengine/client/w3dgamelogic.cpp
platform/w3dengine/client/w3dingameui.cpp
platform/w3dengine/client/w3dmouse.cpp
platform/w3dengine/client/w3dparticlesys.cpp
platform/w3dengine/client/w3dpoly.cpp
Expand Down
15 changes: 9 additions & 6 deletions src/game/client/view.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,18 @@ class View : public SnapShot
public:
enum CameraLockType
{
LOCK_FOLLOW = 0x0,
LOCK_TETHER = 0x1,
LOCK_FOLLOW,
LOCK_TETHER,
};

enum CameraShakeType
{
SHAKE_SUBTLE = 0x0,
SHAKE_NORMAL = 0x1,
SHAKE_STRONG = 0x2,
SHAKE_SEVERE = 0x3,
SHAKE_SUBTLE,
SHAKE_NORMAL,
SHAKE_STRONG,
SHAKE_SEVERE,
SHAKE_EXTREME,
SHAKE_INSANE,
};

View();
Expand Down
4 changes: 4 additions & 0 deletions src/hooker/setuphooks_zh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
#include "w3dgamelogic.h"
#include "w3dgamewindow.h"
#include "w3dgamewindowmanager.h"
#include "w3dingameui.h"
#include "w3dmodeldraw.h"
#include "w3dmouse.h"
#include "w3dpoly.h"
Expand Down Expand Up @@ -3738,4 +3739,7 @@ void Setup_Hooks()

// quotedprintable.h
Hook_Any(0x005E4B20, Ascii_String_To_Quoted_Printable);

// w3dingameui.h
Hook_Any(0x007A9B30, W3DInGameUI::Create_View);
}
21 changes: 21 additions & 0 deletions src/platform/w3dengine/client/w3dingameui.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @file
*
* @author Jonathan Wilson
*
* @brief W3D In Game UI
*
* @copyright Thyme is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version
* 2 of the License, or (at your option) any later version.
* A full copy of the GNU General Public License can be found in
* LICENSE
*/
#include "w3dingameui.h"
#include "w3dview.h"

View *W3DInGameUI::Create_View()
{
return new W3DView();
}
39 changes: 39 additions & 0 deletions src/platform/w3dengine/client/w3dingameui.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* @file
*
* @author Jonathan Wilson
*
* @brief W3D In Game UI
*
* @copyright Thyme is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version
* 2 of the License, or (at your option) any later version.
* A full copy of the GNU General Public License can be found in
* LICENSE
*/
#pragma once
#include "always.h"
#include "ingameui.h"
class RenderObjClass;
class HAnimClass;

class W3DInGameUI : public InGameUI
{
public:
virtual ~W3DInGameUI();
virtual void Reset();
virtual void Update();
virtual void Draw();
virtual View *Create_View();
virtual void Draw_Selection_Region();
virtual void Draw_Move_Hints(View *view);
virtual void Draw_Attack_Hints(View *view);
virtual void Draw_Place_Angle(View *view);

private:
RenderObjClass *m_moveHintRenderObj[256];
HAnimClass *m_moveHintAnim[256];
RenderObjClass *m_locator01;
RenderObjClass *m_locator02;
};
Loading

0 comments on commit 49ca309

Please sign in to comment.