refactoring
parent
8afabf94c0
commit
e8a9589114
|
@ -30,18 +30,18 @@ add_executable(${CMAKE_PROJECT_NAME}
|
||||||
ShooterMsgType.cpp
|
ShooterMsgType.cpp
|
||||||
# 3d engine:
|
# 3d engine:
|
||||||
engine/Consts.h
|
engine/Consts.h
|
||||||
engine/Vec4D.h
|
engine/math/Vec4D.h
|
||||||
engine/Vec4D.cpp
|
engine/math/Vec4D.cpp
|
||||||
engine/Vec3D.cpp
|
engine/math/Vec3D.cpp
|
||||||
engine/Vec3D.h
|
engine/math/Vec3D.h
|
||||||
engine/Vec2D.cpp
|
engine/math/Vec2D.cpp
|
||||||
engine/Vec2D.h
|
engine/math/Vec2D.h
|
||||||
engine/Matrix4x4.h
|
engine/math/Matrix4x4.h
|
||||||
engine/Matrix4x4.cpp
|
engine/math/Matrix4x4.cpp
|
||||||
engine/Triangle.h
|
engine/Triangle.h
|
||||||
engine/Triangle.cpp
|
engine/Triangle.cpp
|
||||||
engine/Plane.h
|
engine/math/Plane.h
|
||||||
engine/Plane.cpp
|
engine/math/Plane.cpp
|
||||||
engine/Mesh.h
|
engine/Mesh.h
|
||||||
engine/Mesh.cpp
|
engine/Mesh.cpp
|
||||||
engine/utils/Log.h
|
engine/utils/Log.h
|
||||||
|
@ -50,24 +50,24 @@ add_executable(${CMAKE_PROJECT_NAME}
|
||||||
engine/utils/Time.cpp
|
engine/utils/Time.cpp
|
||||||
engine/utils/Timer.cpp
|
engine/utils/Timer.cpp
|
||||||
engine/utils/Timer.h
|
engine/utils/Timer.h
|
||||||
engine/ResourceManager.h
|
engine/utils/ResourceManager.h
|
||||||
engine/ResourceManager.cpp
|
engine/utils/ResourceManager.cpp
|
||||||
engine/World.h
|
engine/World.h
|
||||||
engine/World.cpp
|
engine/World.cpp
|
||||||
engine/Camera.h
|
engine/Camera.h
|
||||||
engine/Camera.cpp
|
engine/Camera.cpp
|
||||||
engine/Screen.h
|
engine/io/Screen.h
|
||||||
engine/Screen.cpp
|
engine/io/Screen.cpp
|
||||||
engine/Engine.h
|
engine/Engine.h
|
||||||
engine/Engine.cpp
|
engine/Engine.cpp
|
||||||
engine/Keyboard.cpp
|
engine/io/Keyboard.cpp
|
||||||
engine/Keyboard.h
|
engine/io/Keyboard.h
|
||||||
engine/Mouse.cpp
|
engine/io/Mouse.cpp
|
||||||
engine/Mouse.h
|
engine/io/Mouse.h
|
||||||
engine/SoundController.cpp
|
engine/io/SoundController.cpp
|
||||||
engine/SoundController.h
|
engine/io/SoundController.h
|
||||||
engine/CameraController.cpp
|
engine/utils/CameraController.cpp
|
||||||
engine/CameraController.h
|
engine/utils/CameraController.h
|
||||||
engine/animation/Animation.h
|
engine/animation/Animation.h
|
||||||
engine/animation/Timeline.cpp
|
engine/animation/Timeline.cpp
|
||||||
engine/animation/Timeline.h
|
engine/animation/Timeline.h
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include "engine/Screen.h"
|
#include "engine/io/Screen.h"
|
||||||
#include "engine/utils/Log.h"
|
#include "engine/utils/Log.h"
|
||||||
#include "engine/animation/Animations.h"
|
#include "engine/animation/Animations.h"
|
||||||
|
|
||||||
|
|
2
Player.h
2
Player.h
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include <SFML/Audio/Sound.hpp>
|
#include <SFML/Audio/Sound.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include "engine/ResourceManager.h"
|
#include "engine/utils/ResourceManager.h"
|
||||||
#include "engine/Camera.h"
|
#include "engine/Camera.h"
|
||||||
#include "engine/World.h"
|
#include "engine/World.h"
|
||||||
#include "weapon/Ak47.h"
|
#include "weapon/Ak47.h"
|
||||||
|
|
|
@ -45,8 +45,8 @@ void PlayerController::update() {
|
||||||
if(camera != nullptr) {
|
if(camera != nullptr) {
|
||||||
// random motion during high speed
|
// random motion during high speed
|
||||||
if (!Timeline::isInAnimList(AnimationListTag("high_speed_motion"))) {
|
if (!Timeline::isInAnimList(AnimationListTag("high_speed_motion"))) {
|
||||||
double d_alpha = _player->velocity().abs()/3000*rand()/RAND_MAX;
|
double d_alpha = _player->velocity().abs()/2000*rand()/RAND_MAX;
|
||||||
double dt = 0.07;
|
double dt = 0.12;
|
||||||
|
|
||||||
Timeline::addAnimation<ARotateLeftUpLookAt>(AnimationListTag("high_speed_motion"),
|
Timeline::addAnimation<ARotateLeftUpLookAt>(AnimationListTag("high_speed_motion"),
|
||||||
camera, Vec3D(0, 0, d_alpha), dt,
|
camera, Vec3D(0, 0, d_alpha), dt,
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#define SHOOTER_PLAYERCONTROLLER_H
|
#define SHOOTER_PLAYERCONTROLLER_H
|
||||||
|
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "engine/Keyboard.h"
|
#include "engine/io/Keyboard.h"
|
||||||
#include "engine/Mouse.h"
|
#include "engine/io/Mouse.h"
|
||||||
|
|
||||||
class PlayerController final {
|
class PlayerController final {
|
||||||
private:
|
private:
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,98 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>SFML - Simple and Fast Multimedia Library</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html;"/>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
|
|
||||||
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
|
|
||||||
<script type="text/javascript" src="jquery.js"></script>
|
|
||||||
<script type="text/javascript" src="dynsections.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="banner-container">
|
|
||||||
<div id="banner">
|
|
||||||
<span id="sfml">SFML 2.5.1</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="content">
|
|
||||||
<!-- Generated by Doxygen 1.8.14 -->
|
|
||||||
<div id="navrow1" class="tabs">
|
|
||||||
<ul class="tablist">
|
|
||||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
||||||
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
||||||
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
||||||
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
||||||
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
||||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="navrow2" class="tabs2">
|
|
||||||
<ul class="tablist">
|
|
||||||
<li><a href="files.html"><span>File List</span></a></li>
|
|
||||||
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="nav-path" class="navpath">
|
|
||||||
<ul>
|
|
||||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_c0a853e81d6f1c1f0a3eb7a27dc24256.html">SFML</a></li> </ul>
|
|
||||||
</div>
|
|
||||||
</div><!-- top -->
|
|
||||||
<div class="header">
|
|
||||||
<div class="summary">
|
|
||||||
<a href="#define-members">Macros</a> </div>
|
|
||||||
<div class="headertitle">
|
|
||||||
<div class="title">GpuPreference.hpp File Reference</div> </div>
|
|
||||||
</div><!--header-->
|
|
||||||
<div class="contents">
|
|
||||||
|
|
||||||
<p>Headers.
|
|
||||||
<a href="#details">More...</a></p>
|
|
||||||
<div class="textblock"><code>#include <SFML/Config.hpp></code><br />
|
|
||||||
</div>
|
|
||||||
<p><a href="GpuPreference_8hpp_source.html">Go to the source code of this file.</a></p>
|
|
||||||
<table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
|
||||||
Macros</h2></td></tr>
|
|
||||||
<tr class="memitem:ab0233c2d867cbd561036ed2440a4fec0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="GpuPreference_8hpp.html#ab0233c2d867cbd561036ed2440a4fec0">SFML_DEFINE_DISCRETE_GPU_PREFERENCE</a></td></tr>
|
|
||||||
<tr class="memdesc:ab0233c2d867cbd561036ed2440a4fec0"><td class="mdescLeft"> </td><td class="mdescRight">A macro to encourage usage of the discrete GPU. <a href="#ab0233c2d867cbd561036ed2440a4fec0">More...</a><br /></td></tr>
|
|
||||||
<tr class="separator:ab0233c2d867cbd561036ed2440a4fec0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
|
||||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
||||||
<div class="textblock"><p>Headers. </p>
|
|
||||||
<p>File containing SFML_DEFINE_DISCRETE_GPU_PREFERENCE </p>
|
|
||||||
|
|
||||||
<p class="definition">Definition in file <a class="el" href="GpuPreference_8hpp_source.html">GpuPreference.hpp</a>.</p>
|
|
||||||
</div><h2 class="groupheader">Macro Definition Documentation</h2>
|
|
||||||
<a id="ab0233c2d867cbd561036ed2440a4fec0"></a>
|
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#ab0233c2d867cbd561036ed2440a4fec0">◆ </a></span>SFML_DEFINE_DISCRETE_GPU_PREFERENCE</h2>
|
|
||||||
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">#define SFML_DEFINE_DISCRETE_GPU_PREFERENCE</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
|
|
||||||
<p>A macro to encourage usage of the discrete GPU. </p>
|
|
||||||
<p>In order to inform the Nvidia/AMD driver that an SFML application could benefit from using the more powerful discrete GPU, special symbols have to be publicly exported from the final executable.</p>
|
|
||||||
<p>SFML defines a helper macro to easily do this.</p>
|
|
||||||
<p>Place SFML_DEFINE_DISCRETE_GPU_PREFERENCE in the global scope of a source file that will be linked into the final executable. Typically it is best to place it where the main function is also defined. </p>
|
|
||||||
|
|
||||||
<p class="definition">Definition at line <a class="el" href="GpuPreference_8hpp_source.html#l00069">69</a> of file <a class="el" href="GpuPreference_8hpp_source.html">GpuPreference.hpp</a>.</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div><!-- contents -->
|
|
||||||
</div>
|
|
||||||
<div id="footer-container">
|
|
||||||
<div id="footer">
|
|
||||||
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
|
|
||||||
Copyright © Laurent Gomila ::
|
|
||||||
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> ::
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue