Permalink
Browse files

Carrying while swimming

- matrix
  * bot can carry cargo while swimming
  * lift is averaged while carrying, Bot::grabCargo(), releaseCargo()
- client
  * mouse wheel sensitivity setting
  * Param -> Uniform
  * NaCl -> NaClPlatform
  • Loading branch information...
1 parent 706481d commit 0fc0cc6e25f5da2f6b8abd0357d0ec586e7ccb34 @ducakar committed Nov 29, 2012
Showing with 507 additions and 305 deletions.
  1. +4 −0 .gitignore
  2. +6 −0 CMakeLists.txt
  3. +3 −0 ChangeLog.md
  4. +5 −5 README.md
  5. +4 −3 TODO.md
  6. +47 −0 data/rz_base/ui/style.json
  7. +4 −2 src/client/CMakeLists.txt
  8. +2 −2 src/client/Caelum.cc
  9. +7 −7 src/client/Camera.cc
  10. +45 −45 src/client/Camera.hh
  11. +1 −1 src/client/CinematicProxy.cc
  12. +10 −9 src/client/Client.cc
  13. +1 −1 src/client/Context.cc
  14. +1 −1 src/client/GameStage.cc
  15. +44 −30 src/client/Input.cc
  16. +10 −4 src/client/Input.hh
  17. +1 −1 src/client/MenuStage.cc
  18. +2 −2 src/client/Mesh.cc
  19. +1 −1 src/client/NaClDownloader.cc
  20. +17 −17 src/client/{NaCl.cc → NaClPlatform.cc}
  21. +6 −7 src/client/{NaCl.hh → NaClPlatform.hh}
  22. +6 −5 src/client/NaClUpdater.cc
  23. +1 −1 src/client/OpenGL.hh
  24. +9 −9 src/client/Render.cc
  25. +30 −30 src/client/Shader.cc
  26. +21 −21 src/client/Shader.hh
  27. +2 −2 src/client/Shape.cc
  28. +6 −4 src/client/Sound.cc
  29. +2 −2 src/client/StrategicProxy.cc
  30. +1 −1 src/client/Terra.cc
  31. +4 −4 src/client/UnitProxy.cc
  32. +12 −20 src/client/Window.cc
  33. +1 −1 src/client/luaapi.hh
  34. +1 −1 src/client/openzone.hh
  35. +1 −1 src/client/ui/CreditsMenu.cc
  36. +1 −1 src/client/ui/GalileoFrame.cc
  37. +8 −8 src/client/ui/HudArea.cc
  38. +1 −1 src/client/ui/Inventory.cc
  39. +1 −1 src/client/ui/MainMenu.cc
  40. +1 −1 src/client/ui/MissionMenu.cc
  41. +4 −4 src/client/ui/MusicPlayer.cc
  42. +36 −0 src/client/ui/TalkFrame.cc
  43. +56 −0 src/client/ui/TalkFrame.hh
  44. +1 −1 src/client/ui/UI.cc
  45. +57 −30 src/matrix/Bot.cc
  46. +2 −0 src/matrix/Bot.hh
  47. +1 −1 src/ozCore/CMakeLists.txt
  48. +1 −0 src/ozCore/JSON.cc
  49. +17 −17 src/tools/openzone.cc
  50. +2 −0 src/unittest/CMakeLists.txt
View
@@ -13,6 +13,10 @@
/data/*/*
!/data/netradiant/*
+!/data/*/ui
+/data/*/ui/cur
+/data/*/ui/font
+/data/*/ui/icon
!/data/gtkradiant/*
!/data/*/baseq3
/data/*/baseq3/*
View
@@ -80,6 +80,12 @@ elseif( NACL )
include_directories( SYSTEM ${PLATFORM_PORTS_PREFIX}/usr/include )
link_directories( ${PLATFORM_PORTS_PREFIX}/usr/lib )
+elseif( WIN32 )
+else()
+ if( CMAKE_SYSTEM_NAME STREQUAL Linux )
+ find_package( ALSA REQUIRED )
+ endif()
+ pkg_check_modules( PULSE_SIMPLE libpulse-simple REQUIRED )
endif()
find_package( PhysFS REQUIRED )
View
@@ -126,6 +126,9 @@
+ asynchronous streaming of tracks
+ support for music in MP3 and AAC formats
+ a user-specified directory can be searched for music
+ * new Input class
+ + key-to-action mappings, key/mouse sensitivity etc.
+ + input.json configuration file
* resizable main window
* new main menu, mission selection menu
- builder
View
@@ -77,8 +77,8 @@ You may also want to set several options when configuring CMake build system:
However, it seems to work on Linux at least.
`OFF` by default, forced to `ON` on Android and NaCl.
-- `OZ_NONFREE`: Enable support for decoding MP3 and AAC formats and building textures using S3
- texture compression. Requires libmad, faad and libsquish libraries respectively.
+- `OZ_NONFREE`: Enable support for building textures using S3 texture compression.
+ Requires libsquish library.
`OFF` by default.
- `OZ_STANDALONE`: This only affects behaviour of "`make install`". It also installs dependencies
@@ -127,9 +127,9 @@ if run with `-A` parameter. See "`ozBuild --help`" for all options.
Note that temporary directory `share/openzone/<pkgName>` is not cleared after build, so if you
remove any files from source data and rebuild package, removed files will still be cached in
-temporary directory and put into newly build package. So, it is advisable to remove all temporary
-directories ("`rm -rf share/openzone/*`" on Linux) after removing something from game data or before
-doing final builds.
+temporary directory and put into newly built package. So, it is highly recommended to remove all
+temporary directories ("`rm -rf share/openzone/*`" on Linux) after removing something from game data
+or before doing the final build.
### `ozManifest` ###
View
@@ -1,7 +1,5 @@
CURRENT
-- finish GUI layout settings
-- finish auto next track MusicPlayer, Sound
- fix random splash event bug
0.4
@@ -13,13 +11,16 @@ CURRENT
* smooth/limited Vehicle rotation
- nirvana
* AI tasks
+ * conversations
- ui
- * settings for icon sizes, bar colours, bar line widths
+ * settings for icon sizes, bar colours, elements layout
+ * keyboard control
* options menu
* tutorial tips
* advanced HUD for mechanic units and vehicles
* RTS interface
* more advanced build menu for editor
+ * conversations
- client
* editor
* layout files
View
@@ -0,0 +1,47 @@
+{
+ "fonts": {
+ "mono": {
+ "name": "DroidSansMono",
+ "height": 13
+ },
+ "sans": {
+ "name": "DroidSansMono",
+ "height": 13
+ },
+ "small": {
+ "name": "DroidSansMono",
+ "height": 10
+ },
+ "large": {
+ "name": "DroidSansMono",
+ "height": 14
+ },
+ "title": {
+ "name": "DroidSansMono",
+ "height": 18
+ }
+ },
+ "colours":
+ {
+ "text": [ 0.80, 1.00, 0.90, 1.00 ],
+ "textBackground": [ 0.00, 0.00, 0.00, 1.00 ],
+
+ "button": [ 0.20, 0.30, 0.25, 0.40 ],
+ "buttonHover": [ 0.40, 0.60, 0.50, 0.40 ],
+ "buttonClicked": [ 0.80, 1.00, 0.90, 0.40 ],
+
+ "tile": [ 0.24, 0.30, 0.27, 0.60 ],
+ "tileHover": [ 0.48, 0.60, 0.54, 0.60 ],
+
+ "frame": [ 0.00, 0.00, 0.00, 0.30 ],
+ "background": [ 0.04, 0.06, 0.05, 1.00 ],
+
+ "barBorder": [ 0.80, 1.00, 0.90, 0.50 ],
+ "barBackground": [ 0.00, 0.00, 0.00, 0.10 ],
+
+ "galileoNormal": [ 1.00, 1.00, 1.00, 0.60 ],
+ "galileoMaximised": [ 1.00, 1.00, 1.00, 1.00 ],
+
+ "menuStrip": [ 0.00, 0.00, 0.00, 1.00 ]
+ }
+}
@@ -34,7 +34,7 @@ add_library( client STATIC
MenuStage.hh
Mesh.hh
NaClDownloader.hh
- NaCl.hh
+ NaClPlatform.hh
NaClUpdater.hh
Network.hh
OpenAL.hh
@@ -85,8 +85,8 @@ add_library( client STATIC
MD3Imago.cc
MenuStage.cc
Mesh.cc
- NaCl.cc
NaClDownloader.cc
+ NaClPlatform.cc
NaClUpdater.cc
Network.cc
OpenAL.cc
@@ -130,6 +130,7 @@ add_library( client STATIC
ui/SelectionArea.hh
ui/SettingsFrame.hh
ui/Style.hh
+ ui/TalkFrame.hh
ui/Text.hh
ui/UI.hh
ui/Area.cc
@@ -154,6 +155,7 @@ add_library( client STATIC
ui/SelectionArea.cc
ui/SettingsFrame.cc
ui/Style.cc
+ ui/TalkFrame.cc
ui/Text.cc
ui/UI.cc
#END SOURCES
View
@@ -105,8 +105,8 @@ void Caelum::draw()
tf.apply();
tf.applyColour();
- glUniform4fv( param.oz_Fog_colour, 1, caelumColour );
- glUniform4fv( param.oz_StarsColour, 1, starsColour );
+ glUniform4fv( uniform.fog_colour, 1, caelumColour );
+ glUniform4fv( uniform.starsColour, 1, starsColour );
glBindBuffer( GL_ARRAY_BUFFER, vbo );
glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, ibo );
View
@@ -72,7 +72,7 @@ void Camera::updateReferences()
int strIndex = entity / Struct::MAX_ENTITIES;
int entIndex = entity % Struct::MAX_ENTITIES;
- const Struct* str = orbis.structs[strIndex];
+ Struct* str = orbis.structs[strIndex];
if( str == nullptr ) {
entity = -1;
@@ -143,23 +143,23 @@ void Camera::prepare()
ui::mouse.update();
- relH = float( -ui::mouse.overEdgeX ) * input.mouseSensH * mag;
- relV = float( +ui::mouse.overEdgeY ) * input.mouseSensV * mag;
+ relH = float( -ui::mouse.overEdgeX ) * input.mouseSensX * mag;
+ relV = float( +ui::mouse.overEdgeY ) * input.mouseSensY * mag;
relH = clamp( relH, -ROT_LIMIT, +ROT_LIMIT );
relV = clamp( relV, -ROT_LIMIT, +ROT_LIMIT );
if( input.keys[Input::KEY_DIR_1] | input.keys[Input::KEY_DIR_4] | input.keys[Input::KEY_DIR_7] ) {
- relH += input.keySensH;
+ relH += input.keySensX;
}
if( input.keys[Input::KEY_DIR_3] | input.keys[Input::KEY_DIR_6] | input.keys[Input::KEY_DIR_9] ) {
- relH -= input.keySensH;
+ relH -= input.keySensX;
}
if( input.keys[Input::KEY_DIR_1] | input.keys[Input::KEY_DIR_2] | input.keys[Input::KEY_DIR_3] ) {
- relV -= input.keySensV;
+ relV -= input.keySensY;
}
if( input.keys[Input::KEY_DIR_7] | input.keys[Input::KEY_DIR_8] | input.keys[Input::KEY_DIR_9] ) {
- relV += input.keySensV;
+ relV += input.keySensY;
}
if( newState != state ) {
View
@@ -57,85 +57,85 @@ class Camera
static UnitProxy unit;
static CinematicProxy cinematic;
- Proxy* proxy;
+ Proxy* proxy;
public:
// Rotation, magnification, position and velocity.
- Quat rot;
- float mag;
- Point p;
- Vec3 velocity;
+ Quat rot;
+ float mag;
+ Point p;
+ Vec3 velocity;
// Current rotation, magnification and position are smoothly changed to match desired ones.
- Quat desiredRot;
- float desiredMag;
- Point desiredPos;
- Point oldPos;
+ Quat desiredRot;
+ float desiredMag;
+ Point desiredPos;
+ Point oldPos;
// Camera rotation change (from input).
- float relH;
- float relV;
+ float relH;
+ float relV;
// Global rotation quaternion, matrix and it's inverse.
- Mat44 rotMat;
- Mat44 rotTMat;
+ Mat44 rotMat;
+ Mat44 rotTMat;
// Global colour transformation.
- Mat44 colour;
+ Mat44 colour;
- Mat44 baseColour;
- Mat44 nvColour;
+ Mat44 baseColour;
+ Mat44 nvColour;
- Vec3 right;
- Vec3 up;
- Vec3 at;
+ Vec3 right;
+ Vec3 up;
+ Vec3 at;
- int width;
- int height;
- int centreX;
- int centreY;
+ int width;
+ int height;
+ int centreX;
+ int centreY;
- float coeff;
- float aspect;
- float vertPlane;
- float horizPlane;
- float maxDist;
+ float coeff;
+ float aspect;
+ float vertPlane;
+ float horizPlane;
+ float maxDist;
- int object;
- const Object* objectObj;
+ int object;
+ Object* objectObj;
- int entity;
- const Entity* entityObj;
+ int entity;
+ Entity* entityObj;
- int bot;
- Bot* botObj;
+ int bot;
+ Bot* botObj;
- int vehicle;
- Vehicle* vehicleObj;
+ int vehicle;
+ Vehicle* vehicleObj;
- List<int> switchableUnits;
+ List<int> switchableUnits;
- bool isFixedAspect;
- bool allowReincarnation;
- bool nightVision;
- bool isExternal;
+ bool isFixedAspect;
+ bool allowReincarnation;
+ bool nightVision;
+ bool isExternal;
- State state;
- State newState;
+ State state;
+ State newState;
void setState( State state_ )
{
newState = state_;
}
- void setTaggedObj( const Object* obj )
+ void setTaggedObj( Object* obj )
{
object = obj == nullptr ? -1 : obj->index;
objectObj = obj;
}
- void setTaggedEnt( const Entity* ent )
+ void setTaggedEnt( Entity* ent )
{
entityObj = ent;
@@ -27,7 +27,7 @@
#include <common/Timer.hh>
#include <client/Camera.hh>
#include <client/Sound.hh>
-#include <client/NaCl.hh>
+#include <client/NaClPlatform.hh>
#include <client/ui/GalileoFrame.hh>
#include <client/ui/MusicPlayer.hh>
#include <client/ui/UI.hh>
Oops, something went wrong.

0 comments on commit 0fc0cc6

Please sign in to comment.