Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Edddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LucKey Productions
Tools
Edddy
Commits
434f1b5d
Commit
434f1b5d
authored
Mar 05, 2020
by
魔大农
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switched to Dry engine
parent
a4eb55c6
Changes
47
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
189 additions
and
185 deletions
+189
-185
.gitignore
.gitignore
+3
-3
Edddy.pro
Edddy.pro
+4
-3
block.cpp
block.cpp
+3
-3
block.h
block.h
+3
-3
blockdialog.h
blockdialog.h
+1
-1
blockinstance.cpp
blockinstance.cpp
+1
-1
blockinstance.h
blockinstance.h
+2
-2
blocklistitem.cpp
blocklistitem.cpp
+1
-1
blocklistitem.h
blocklistitem.h
+1
-1
blockmap.h
blockmap.h
+2
-2
blockset.h
blockset.h
+2
-2
blockspanel.h
blockspanel.h
+1
-1
brush.h
brush.h
+2
-2
castmaster.h
castmaster.h
+2
-2
edddycam.h
edddycam.h
+3
-3
edddycursor.cpp
edddycursor.cpp
+1
-1
edddycursor.h
edddycursor.h
+3
-3
edddyevents.h
edddyevents.h
+1
-1
editmaster.h
editmaster.h
+8
-8
effectmaster.h
effectmaster.h
+2
-2
empfile.cpp
empfile.cpp
+2
-2
empfile.h
empfile.h
+2
-2
fill.h
fill.h
+2
-2
freeblock.h
freeblock.h
+2
-2
gridblock.cpp
gridblock.cpp
+1
-1
gridblock.h
gridblock.h
+2
-2
history.cpp
history.cpp
+3
-3
history.h
history.h
+2
-2
inputmaster.cpp
inputmaster.cpp
+11
-11
inputmaster.h
inputmaster.h
+3
-3
luckey.cpp
luckey.cpp
+2
-2
luckey.h
luckey.h
+76
-76
main.cpp
main.cpp
+3
-3
mainwindow.cpp
mainwindow.cpp
+1
-1
mainwindow.h
mainwindow.h
+1
-1
mappanel.h
mappanel.h
+1
-1
mastercontrol.cpp
mastercontrol.cpp
+1
-1
mastercontrol.h
mastercontrol.h
+7
-4
newblocksetdialog.h
newblocksetdialog.h
+1
-1
newmapdialog.h
newmapdialog.h
+1
-1
project.cpp
project.cpp
+8
-8
project.h
project.h
+2
-2
projectpanel.h
projectpanel.h
+1
-1
sidepanel.h
sidepanel.h
+1
-1
tool.h
tool.h
+2
-2
view3d.cpp
view3d.cpp
+4
-4
view3d.h
view3d.h
+1
-1
No files found.
.gitignore
View file @
434f1b5d
...
...
@@ -36,10 +36,10 @@ Makefile*
# QtCtreator CMake
CMakeLists.txt.user
#
Urho3D
/
Urho3D
#
Dry
/
Dry
/Data
/CoreData
edddy
*.blend*
\ No newline at end of file
*.blend*
Edddy.pro
View file @
434f1b5d
...
...
@@ -2,7 +2,8 @@ TARGET = edddy
QT
+=
core
gui
widgets
LIBS
+=
..
/
Edddy
/
Urho3D
/
lib
/
libUrho3D
.
a
\
LIBS
+=
\
$$
{
PWD
}
/
Dry
/
lib
/
libDry
.
a
\
-
lpthread
\
-
ldl
\
-
lGL
...
...
@@ -10,8 +11,8 @@ LIBS += ../Edddy/Urho3D/lib/libUrho3D.a \
QMAKE_CXXFLAGS
+=
-
std
=
c
++
11
-
O2
INCLUDEPATH
+=
\
..
/
Edddy
/
Urho3D
/
include
\
..
/
Edddy
/
Urho3D
/
include
/
Urho3D
/
ThirdParty
\
Dry
/
include
\
Dry
/
include
/
Dry
/
ThirdParty
\
TEMPLATE
=
app
CONFIG
+=
console
...
...
block.cpp
View file @
434f1b5d
...
...
@@ -26,9 +26,9 @@
void
Block
::
RegisterAttributes
(
Context
*
context
)
{
URHO3D
_ATTRIBUTE
(
"id"
,
unsigned
,
id_
,
0
,
AM_FILE
);
URHO3D
_ATTRIBUTE
(
"name"
,
String
,
name_
,
""
,
AM_FILE
);
//
URHO3D
_ATTRIBUTE("material", String, material_, "", AM_FILE);
DRY
_ATTRIBUTE
(
"id"
,
unsigned
,
id_
,
0
,
AM_FILE
);
DRY
_ATTRIBUTE
(
"name"
,
String
,
name_
,
""
,
AM_FILE
);
//
DRY
_ATTRIBUTE("material", String, material_, "", AM_FILE);
}
Block
::
Block
(
Context
*
context
)
:
QObject
(),
Serializable
(
context
),
...
...
block.h
View file @
434f1b5d
...
...
@@ -20,12 +20,12 @@
#ifndef BLOCK_H
#define BLOCK_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
class
Blockset
;
URHO3D
_EVENT
(
E_BLOCKCHANGED
,
BlockChanged
){}
DRY
_EVENT
(
E_BLOCKCHANGED
,
BlockChanged
){}
#define SINGLE M_MAX_UNSIGNED
...
...
@@ -36,7 +36,7 @@ class Block : public QObject, public Serializable
friend
class
EditMaster
;
Q_OBJECT
URHO3D
_OBJECT
(
Block
,
Serializable
);
DRY
_OBJECT
(
Block
,
Serializable
);
public:
Block
(
Context
*
context
);
static
void
RegisterAttributes
(
Context
*
context
);
...
...
blockdialog.h
View file @
434f1b5d
...
...
@@ -33,7 +33,7 @@
class
BlockDialog
:
public
QDialog
,
public
Object
{
Q_OBJECT
URHO3D
_OBJECT
(
BlockDialog
,
Object
);
DRY
_OBJECT
(
BlockDialog
,
Object
);
public:
explicit
BlockDialog
(
Context
*
context
,
Vector
<
Block
*>
blocks
,
QWidget
*
parent
=
nullptr
);
protected:
...
...
blockinstance.cpp
View file @
434f1b5d
...
...
@@ -51,7 +51,7 @@ void BlockInstance::SetBlock(Block* block, Quaternion rotation)
block_
=
block
;
update
();
SubscribeToEvent
(
block_
,
E_BLOCKCHANGED
,
URHO3D
_HANDLER
(
BlockInstance
,
update
));
SubscribeToEvent
(
block_
,
E_BLOCKCHANGED
,
DRY
_HANDLER
(
BlockInstance
,
update
));
}
blockNode_
->
SetRotation
(
rotation
);
...
...
blockinstance.h
View file @
434f1b5d
...
...
@@ -20,7 +20,7 @@
#ifndef BLOCKINSTANCE_H
#define BLOCKINSTANCE_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
#include "block.h"
...
...
@@ -28,7 +28,7 @@ class BlockInstance : public Component
{
friend
class
BlockMap
;
URHO3D
_OBJECT
(
BlockInstance
,
Component
);
DRY
_OBJECT
(
BlockInstance
,
Component
);
public:
BlockInstance
(
Context
*
context
);
...
...
blocklistitem.cpp
View file @
434f1b5d
...
...
@@ -36,7 +36,7 @@ void BlockListItem::UpdateBlockPreview()
{
block_
->
UpdatePreview
();
SubscribeToEvent
(
E_ENDRENDERING
,
URHO3D
_HANDLER
(
BlockListItem
,
UpdateIcon
));
SubscribeToEvent
(
E_ENDRENDERING
,
DRY
_HANDLER
(
BlockListItem
,
UpdateIcon
));
}
void
BlockListItem
::
UpdateIcon
(
const
StringHash
,
VariantMap
&
)
{
...
...
blocklistitem.h
View file @
434f1b5d
...
...
@@ -26,7 +26,7 @@ class Block;
class
BlockListItem
:
public
QListWidgetItem
,
public
Object
{
URHO3D
_OBJECT
(
BlockListItem
,
Object
)
DRY
_OBJECT
(
BlockListItem
,
Object
)
public:
BlockListItem
(
Context
*
context
,
Block
*
block
);
...
...
blockmap.h
View file @
434f1b5d
...
...
@@ -20,7 +20,7 @@
#ifndef BLOCKMAP_H
#define BLOCKMAP_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
#include "freeblock.h"
...
...
@@ -36,7 +36,7 @@ typedef HashMap<int, Sheet> GridMap;
class
BlockMap
:
public
QObject
,
public
Component
{
Q_OBJECT
URHO3D
_OBJECT
(
BlockMap
,
Component
)
DRY
_OBJECT
(
BlockMap
,
Component
)
public:
BlockMap
(
Context
*
context
);
void
OnNodeSet
(
Node
*
node
)
override
;
...
...
blockset.h
View file @
434f1b5d
...
...
@@ -20,7 +20,7 @@
#ifndef BLOCKSET_H
#define BLOCKSET_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
#include "block.h"
...
...
@@ -30,7 +30,7 @@
class
Blockset
:
public
QObject
,
public
Serializable
{
Q_OBJECT
URHO3D
_OBJECT
(
Blockset
,
Serializable
);
DRY
_OBJECT
(
Blockset
,
Serializable
);
public:
Blockset
(
Context
*
context
);
...
...
blockspanel.h
View file @
434f1b5d
...
...
@@ -29,7 +29,7 @@
class
BlocksPanel
:
public
QWidget
,
public
Object
{
Q_OBJECT
URHO3D
_OBJECT
(
BlocksPanel
,
Object
);
DRY
_OBJECT
(
BlocksPanel
,
Object
);
public:
explicit
BlocksPanel
(
Context
*
context
,
QWidget
*
parent
=
nullptr
);
...
...
brush.h
View file @
434f1b5d
...
...
@@ -19,12 +19,12 @@
#ifndef BRUSH_H
#define BRUSH_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "tool.h"
class
Brush
:
public
Tool
{
URHO3D
_OBJECT
(
Brush
,
Tool
);
DRY
_OBJECT
(
Brush
,
Tool
);
public:
Brush
(
Context
*
context
);
void
Apply
(
bool
shiftDown
,
bool
ctrlDown
,
bool
altDown
)
override
;
...
...
castmaster.h
View file @
434f1b5d
...
...
@@ -20,12 +20,12 @@
#ifndef CASTMASTER_H
#define CASTMASTER_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
class
CastMaster
:
public
Object
{
URHO3D
_OBJECT
(
CastMaster
,
Object
);
DRY
_OBJECT
(
CastMaster
,
Object
);
public:
CastMaster
(
Context
*
context
);
bool
PhysicsRayCast
(
Scene
*
scene
,
PODVector
<
PhysicsRaycastResult
>&
hitResults
,
const
Ray
ray
,
const
float
distance
,
const
unsigned
collisionMask
);
...
...
edddycam.h
View file @
434f1b5d
...
...
@@ -20,11 +20,11 @@
#ifndef EDDDYCAM_H
#define EDDDYCAM_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
using
namespace
Urho3D
;
using
namespace
Dry
;
class
View3D
;
...
...
@@ -35,7 +35,7 @@ enum MoveType { MT_ROTATE, MT_PAN, MT_FOV };
class
EdddyCam
:
public
Camera
{
URHO3D
_OBJECT
(
EdddyCam
,
Camera
);
DRY
_OBJECT
(
EdddyCam
,
Camera
);
public:
EdddyCam
(
Context
*
context
);
void
OnNodeSet
(
Node
*
node
)
override
;
...
...
edddycursor.cpp
View file @
434f1b5d
...
...
@@ -80,7 +80,7 @@ void EdddyCursor::OnNodeSet(Node *node)
}
AddInstanceNode
(
blockNode_
);
SubscribeToEvent
(
E_CURRENTBLOCKCHANGE
,
URHO3D
_HANDLER
(
EdddyCursor
,
UpdateModel
));
SubscribeToEvent
(
E_CURRENTBLOCKCHANGE
,
DRY
_HANDLER
(
EdddyCursor
,
UpdateModel
));
}
void
EdddyCursor
::
SetBlockMap
(
BlockMap
*
blockMap
)
{
...
...
edddycursor.h
View file @
434f1b5d
...
...
@@ -20,14 +20,14 @@
#ifndef EDDDYCURSOR_H
#define EDDDYCURSOR_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
URHO3D
_EVENT
(
E_CURSORSTEP
,
CursorStep
){}
DRY
_EVENT
(
E_CURSORSTEP
,
CursorStep
){}
class
EdddyCursor
:
public
LogicComponent
{
URHO3D
_OBJECT
(
EdddyCursor
,
LogicComponent
);
DRY
_OBJECT
(
EdddyCursor
,
LogicComponent
);
public:
static
EdddyCursor
*
cursor_
;
EdddyCursor
(
Context
*
context
);
...
...
edddyevents.h
View file @
434f1b5d
...
...
@@ -17,5 +17,5 @@
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "
Urho3D
/Core/Object.h"
#include "
Dry
/Core/Object.h"
//#include "block.h"
editmaster.h
View file @
434f1b5d
...
...
@@ -20,18 +20,18 @@
#ifndef EDITMASTER_H
#define EDITMASTER_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
URHO3D
_EVENT
(
E_CURRENTBLOCKCHANGE
,
CurrentBlockChange
){
URHO3D
_PARAM
(
P_BLOCK
,
Block
*
);
DRY
_EVENT
(
E_CURRENTBLOCKCHANGE
,
CurrentBlockChange
){
DRY
_PARAM
(
P_BLOCK
,
Block
*
);
}
URHO3D
_EVENT
(
E_CURRENTMAPCHANGE
,
CurrentMapChange
){
URHO3D
_PARAM
(
P_MAP
,
BlockMap
*
);
DRY
_EVENT
(
E_CURRENTMAPCHANGE
,
CurrentMapChange
){
DRY
_PARAM
(
P_MAP
,
BlockMap
*
);
}
URHO3D
_EVENT
(
E_CURRENTTOOLCHANGE
,
CurrentToolChange
){
URHO3D
_PARAM
(
P_TOOL
,
Tool
*
);
DRY
_EVENT
(
E_CURRENTTOOLCHANGE
,
CurrentToolChange
){
DRY
_PARAM
(
P_TOOL
,
Tool
*
);
}
class
EdddyCursor
;
...
...
@@ -50,7 +50,7 @@ typedef Vector<BlockChange> UndoStep;
class
EditMaster
:
public
QObject
,
public
Object
{
Q_OBJECT
URHO3D
_OBJECT
(
EditMaster
,
Object
);
DRY
_OBJECT
(
EditMaster
,
Object
);
public:
EditMaster
(
Context
*
context
);
EdddyCursor
*
GetCursor
()
const
{
return
cursor_
;
}
...
...
effectmaster.h
View file @
434f1b5d
...
...
@@ -19,7 +19,7 @@
#ifndef EFFECTMASTER_H
#define EFFECTMASTER_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
#define WAYPOINTS 42
...
...
@@ -27,7 +27,7 @@
class
EffectMaster
:
public
Object
{
URHO3D
_OBJECT
(
EffectMaster
,
Object
);
DRY
_OBJECT
(
EffectMaster
,
Object
);
public:
EffectMaster
(
Context
*
context
);
...
...
empfile.cpp
View file @
434f1b5d
...
...
@@ -36,7 +36,7 @@ bool EmpFile::BeginLoad(Deserializer& source)
loadXMLFile_
=
new
XMLFile
(
context_
);
if
(
!
loadXMLFile_
->
Load
(
source
))
{
URHO3D
_LOGERROR
(
"Load XML failed "
+
source
.
GetName
());
DRY
_LOGERROR
(
"Load XML failed "
+
source
.
GetName
());
loadXMLFile_
.
Reset
();
return
false
;
}
...
...
@@ -44,7 +44,7 @@ bool EmpFile::BeginLoad(Deserializer& source)
XMLElement
rootElem
=
loadXMLFile_
->
GetRoot
(
"blockmap"
);
if
(
!
rootElem
)
{
URHO3D
_LOGERROR
(
"Invalid EMP file "
+
source
.
GetName
());
DRY
_LOGERROR
(
"Invalid EMP file "
+
source
.
GetName
());
loadXMLFile_
.
Reset
();
return
false
;
}
...
...
empfile.h
View file @
434f1b5d
...
...
@@ -19,13 +19,13 @@
#ifndef EMPFILE_H
#define EMPFILE_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
#include "blockmapdefs.h"
class
EmpFile
:
public
Resource
{
URHO3D
_OBJECT
(
EmpFile
,
Resource
);
DRY
_OBJECT
(
EmpFile
,
Resource
);
public:
/// Construct
explicit
EmpFile
(
Context
*
context
);
...
...
fill.h
View file @
434f1b5d
...
...
@@ -19,14 +19,14 @@
#ifndef FILL_H
#define FILL_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "tool.h"
class
Block
;
class
Fill
:
public
Tool
{
URHO3D
_OBJECT
(
Fill
,
Tool
);
DRY
_OBJECT
(
Fill
,
Tool
);
public:
Fill
(
Context
*
context
);
void
Apply
(
bool
shiftDown
,
bool
ctrlDown
,
bool
altDown
)
override
;
...
...
freeblock.h
View file @
434f1b5d
...
...
@@ -20,12 +20,12 @@
#ifndef FREEBLOCK_H
#define FREEBLOCK_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "blockinstance.h"
class
FreeBlock
:
public
BlockInstance
{
URHO3D
_OBJECT
(
FreeBlock
,
BlockInstance
);
DRY
_OBJECT
(
FreeBlock
,
BlockInstance
);
public:
FreeBlock
(
Context
*
context
);
void
OnNodeSet
(
Node
*
node
)
override
;
...
...
gridblock.cpp
View file @
434f1b5d
...
...
@@ -42,7 +42,7 @@ void GridBlock::OnNodeSet(Node *node)
CreateSideNodes
();
SubscribeToEvent
(
EdddyCursor
::
cursor_
,
E_CURSORSTEP
,
URHO3D
_HANDLER
(
GridBlock
,
UpdateCenter
));
SubscribeToEvent
(
EdddyCursor
::
cursor_
,
E_CURSORSTEP
,
DRY
_HANDLER
(
GridBlock
,
UpdateCenter
));
}
void
GridBlock
::
CreateSideNodes
()
{
...
...
gridblock.h
View file @
434f1b5d
...
...
@@ -20,13 +20,13 @@
#ifndef GRIDBLOCK_H
#define GRIDBLOCK_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "blockinstance.h"
class
GridBlock
:
public
BlockInstance
{
URHO3D
_OBJECT
(
GridBlock
,
BlockInstance
);
DRY
_OBJECT
(
GridBlock
,
BlockInstance
);
public:
GridBlock
(
Context
*
context
);
void
OnNodeSet
(
Node
*
node
)
override
;
...
...
history.cpp
View file @
434f1b5d
...
...
@@ -27,9 +27,9 @@
History
::
History
(
Context
*
context
)
:
Object
(
context
),
steps_
{},
stepIndex_
{
0
},
lastSavedIndex_
{
LOSTSTEP
},
previousModifiedState_
{
true
},
stepIndex_
{
0
},
lastSavedIndex_
{
LOSTSTEP
},
previousModifiedState_
{
true
},
currentStep_
{}
{
}
...
...
history.h
View file @
434f1b5d
...
...
@@ -19,7 +19,7 @@
#ifndef HISTORY_H
#define HISTORY_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
...
...
@@ -53,7 +53,7 @@ public:
class
History
:
public
Object
{
URHO3D
_OBJECT
(
History
,
Object
);
DRY
_OBJECT
(
History
,
Object
);
public:
History
(
Context
*
context
);
...
...
inputmaster.cpp
View file @
434f1b5d
...
...
@@ -64,17 +64,17 @@ InputMaster::InputMaster(Context* context) : Object(context),
keyBindings_
[
KEY_B
]
=
ACTION_BRUSH
;
keyBindings_
[
KEY_F
]
=
ACTION_FILL
;
SubscribeToEvent
(
E_KEYDOWN
,
URHO3D
_HANDLER
(
InputMaster
,
HandleKeyDown
));
SubscribeToEvent
(
E_KEYUP
,
URHO3D
_HANDLER
(
InputMaster
,
HandleKeyUp
));
SubscribeToEvent
(
E_JOYSTICKBUTTONDOWN
,
URHO3D
_HANDLER
(
InputMaster
,
HandleJoyButtonDown
));
SubscribeToEvent
(
E_JOYSTICKBUTTONUP
,
URHO3D
_HANDLER
(
InputMaster
,
HandleJoyButtonUp
));
SubscribeToEvent
(
E_JOYSTICKAXISMOVE
,
URHO3D
_HANDLER
(
InputMaster
,
HandleJoystickAxisMove
));
SubscribeToEvent
(
E_MOUSEMOVE
,
URHO3D
_HANDLER
(
InputMaster
,
HandleMouseMove
));
SubscribeToEvent
(
E_MOUSEBUTTONDOWN
,
URHO3D
_HANDLER
(
InputMaster
,
HandleMouseButtonDown
));
SubscribeToEvent
(
E_MOUSEBUTTONUP
,
URHO3D
_HANDLER
(
InputMaster
,
HandleMouseButtonUp
));
SubscribeToEvent
(
E_BEGINFRAME
,
URHO3D
_HANDLER
(
InputMaster
,
HandleUpdate
));
SubscribeToEvent
(
E_CURSORSTEP
,
URHO3D
_HANDLER
(
InputMaster
,
HandleCursorStep
));
SubscribeToEvent
(
E_KEYDOWN
,
DRY
_HANDLER
(
InputMaster
,
HandleKeyDown
));
SubscribeToEvent
(
E_KEYUP
,
DRY
_HANDLER
(
InputMaster
,
HandleKeyUp
));
SubscribeToEvent
(
E_JOYSTICKBUTTONDOWN
,
DRY
_HANDLER
(
InputMaster
,
HandleJoyButtonDown
));
SubscribeToEvent
(
E_JOYSTICKBUTTONUP
,
DRY
_HANDLER
(
InputMaster
,
HandleJoyButtonUp
));
SubscribeToEvent
(
E_JOYSTICKAXISMOVE
,
DRY
_HANDLER
(
InputMaster
,
HandleJoystickAxisMove
));
SubscribeToEvent
(
E_MOUSEMOVE
,
DRY
_HANDLER
(
InputMaster
,
HandleMouseMove
));
SubscribeToEvent
(
E_MOUSEBUTTONDOWN
,
DRY
_HANDLER
(
InputMaster
,
HandleMouseButtonDown
));
SubscribeToEvent
(
E_MOUSEBUTTONUP
,
DRY
_HANDLER
(
InputMaster
,
HandleMouseButtonUp
));
SubscribeToEvent
(
E_BEGINFRAME
,
DRY
_HANDLER
(
InputMaster
,
HandleUpdate
));
SubscribeToEvent
(
E_CURSORSTEP
,
DRY
_HANDLER
(
InputMaster
,
HandleCursorStep
));
INPUT
->
SetMouseVisible
(
true
);
}
...
...
inputmaster.h
View file @
434f1b5d
...
...
@@ -20,10 +20,10 @@
#ifndef INPUTMASTER_H
#define INPUTMASTER_H
#include <
Urho3D/Urho3D
.h>
#include <
Dry/Dry
.h>
#include "luckey.h"
namespace
Urho3D
{
namespace
Dry
{
class
Drawable
;
class
Node
;
class
Scene
;
...
...
@@ -46,7 +46,7 @@ class EdddyCursor;
class
InputMaster
:
public
Object
{
URHO3D
_OBJECT
(
InputMaster
,
Object
);
DRY
_OBJECT
(
InputMaster
,
Object
);
public:
InputMaster
(
Context
*
context
);
...
...
luckey.cpp
View file @
434f1b5d
...
...
@@ -52,8 +52,8 @@ float LucKey::Distance(Vector2 from, Vector2 to)
Vector3
LucKey
::
Scale
(
const
Vector3
lhs
,
const
Vector3
rhs
)
{
return
Vector3
(
lhs
.
x_
*
rhs
.
x_
,
lhs
.
y_
*
rhs
.
y_
,
lhs
.
z_
*
rhs
.
z_
);
}
Urho3D
::
IntVector2
LucKey
::
Scale
(
const
Urho3D
::
IntVector2
lhs
,
const
Urho3D
::
IntVector2
rhs
)
{
return
Urho3D
::
IntVector2
(
lhs
.
x_
*
rhs
.
x_
,
lhs
.
y_
*
rhs
.
y_
);
Dry
::
IntVector2
LucKey
::
Scale
(
const
Dry
::
IntVector2
lhs
,
const
Dry
::
IntVector2
rhs
)
{
return
Dry
::
IntVector2
(
lhs
.
x_
*
rhs
.
x_
,
lhs
.
y_
*
rhs
.
y_
);
}
Vector2
LucKey
::
Rotate
(
const
Vector2
vec2
,
const
float
angle
){
float
x
{
vec2
.
x_
};
...
...
luckey.h
View file @
434f1b5d
...
...
@@ -19,81 +19,81 @@
#ifndef LUCKEY_H
#define LUCKEY_H
#include <
Urho3D/Urho3D
.h>
#include <
Urho3D
/Audio/Audio.h>
#include <
Urho3D
/Audio/Sound.h>
#include <
Urho3D
/Audio/SoundSource.h>
#include <
Urho3D
/Container/HashBase.h>
#include <
Urho3D
/Container/HashMap.h>
#include <
Urho3D
/Container/Vector.h>
#include <
Urho3D
/Core/Attribute.h>
#include <
Urho3D
/Core/CoreEvents.h>
#include <
Urho3D
/Core/Object.h>
#include <
Urho3D
/Engine/Application.h>
#include <
Urho3D
/Engine/Console.h>
#include <
Urho3D
/Engine/DebugHud.h>
#include <
Urho3D
/Engine/Engine.h>
#include <
Urho3D
/Engine/EngineDefs.h>
#include <
Urho3D
/Graphics/AnimatedModel.h>
#include <
Urho3D
/Graphics/AnimationController.h>
#include <
Urho3D
/Graphics/Animation.h>
#include <
Urho3D
/Graphics/AnimationState.h>
#include <
Urho3D
/Graphics/Camera.h>
#include <
Urho3D
/Graphics/DebugRenderer.h>
#include <
Urho3D
/Graphics/DecalSet.h>
#include <
Urho3D
/Graphics/Graphics.h>
#include <
Urho3D
/Graphics/GraphicsEvents.h>
#include <
Urho3D
/Graphics/Light.h>
#include <
Urho3D
/Graphics/Material.h>
#include <
Urho3D
/Graphics/Model.h>
#include <
Urho3D
/Graphics/Octree.h>
#include <
Urho3D
/Graphics/OctreeQuery.h>
#include <
Urho3D
/Graphics/ParticleEffect.h>
#include <
Urho3D
/Graphics/ParticleEmitter.h>
#include <
Urho3D
/Graphics/Renderer.h>
#include <
Urho3D
/Graphics/RenderPath.h>
#include <
Urho3D
/Graphics/Skybox.h>
#include <
Urho3D
/Graphics/StaticModel.h>
#include <
Urho3D
/Graphics/StaticModelGroup.h>
#include <
Urho3D
/Graphics/Texture2D.h>
#include <
Urho3D
/Graphics/Viewport.h>
#include <
Urho3D
/Graphics/Zone.h>
#include <
Urho3D
/Input/InputEvents.h>
#include <
Urho3D
/Input/Input.h>
#include <
Urho3D
/IO/FileSystem.h>
#include <
Urho3D
/IO/Log.h>
#include <
Urho3D
/IO/MemoryBuffer.h>
#include <
Urho3D
/Math/MathDefs.h>
#include <
Urho3D
/Math/Plane.h>
#include <
Urho3D
/Math/Sphere.h>
#include <
Urho3D
/Math/Vector2.h>
#include <
Urho3D
/Math/Vector3.h>
#include <
Urho3D
/Physics/CollisionShape.h>
#include <
Urho3D
/Physics/Constraint.h>
#include <
Urho3D
/Physics/PhysicsEvents.h>
#include <
Urho3D
/Physics/PhysicsWorld.h>
#include <
Urho3D
/Physics/RigidBody.h>
#include <
Urho3D
/Resource/ResourceCache.h>
#include <
Urho3D
/Resource/XMLFile.h>
#include <
Urho3D
/Scene/LogicComponent.h>
#include <
Urho3D
/Scene/Component.h>
#include <
Urho3D
/Scene/Node.h>
#include <
Urho3D
/Scene/SceneEvents.h>
#include <
Urho3D
/Scene/Scene.h>
#include <
Urho3D
/UI/Button.h>
#include <
Urho3D
/UI/Font.h>
#include <
Urho3D
/UI/LineEdit.h>
#include <
Urho3D
/UI/Menu.h>
#include <
Urho3D
/UI/Text.h>
#include <
Urho3D
/UI/ToolTip.h>
#include <
Urho3D
/UI/UI.h>
#include <
Urho3D
/UI/UIEvents.h>
#include <
Urho3D
/UI/Window.h>
#include <
Urho3D/Urho
2D/TileMap2D.h>
#include <
Urho3D/Urho
2D/TmxFile2D.h>
#include <
Urho3D
/Scene/ValueAnimation.h>
#include <
Dry/Dry
.h>
#include <
Dry
/Audio/Audio.h>
#include <
Dry
/Audio/Sound.h>
#include <
Dry
/Audio/SoundSource.h>
#include <
Dry
/Container/HashBase.h>
#include <
Dry
/Container/HashMap.h>
#include <
Dry
/Container/Vector.h>
#include <
Dry
/Core/Attribute.h>
#include <
Dry
/Core/CoreEvents.h>
#include <
Dry
/Core/Object.h>
#include <
Dry
/Engine/Application.h>
#include <
Dry
/Engine/Console.h>
#include <
Dry
/Engine/DebugHud.h>
#include <
Dry
/Engine/Engine.h>
#include <
Dry
/Engine/EngineDefs.h>
#include <
Dry
/Graphics/AnimatedModel.h>
#include <