Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-tz committed Apr 26, 2024
2 parents ed6b9d4 + ec8e5b8 commit 1be508f
Show file tree
Hide file tree
Showing 101 changed files with 2,278 additions and 4,055 deletions.
78 changes: 41 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,56 +52,55 @@ Client/*.pb.*

# C++ objects and libs

Medusa/*.slo
Medusa/*.lo
Medusa/*.o
Medusa/*.a
Medusa/*.la
Medusa/*.lai
Medusa/*.so
Medusa/*.dll
Medusa/*.dylib
Core/*.slo
Core/*.lo
Core/*.o
Core/*.a
Core/*.la
Core/*.lai
Core/*.so
Core/*.dll
Core/*.dylib

# Qt-es

Medusa/object_script.*.Release
Medusa/object_script.*.Debug
Medusa/*_plugin_import.cpp
Medusa//.qmake.cache
Medusa//.qmake.stash
Medusa/*.pro.user
Medusa/*.pro.user.*
Medusa/*.qbs.user
Medusa/*.qbs.user.*
Medusa/*.moc
Medusa/moc_*.cpp
Medusa/moc_*.h
Medusa/qrc_*.cpp
Medusa/ui_*.h
Medusa/Makefile*
Medusa/*build*
Core/object_script.*.Release
Core/object_script.*.Debug
Core/*_plugin_import.cpp
Core//.qmake.cache
Core//.qmake.stash
Core/*.pro.user
Core/*.pro.user.*
Core/*.qbs.user
Core/*.qbs.user.*
Core/*.moc
Core/moc_*.cpp
Core/moc_*.h
Core/qrc_*.cpp
Core/ui_*.h
Core/Makefile*
Core/*build*

# Qt unit tests
Medusa/target_wrapper.*
Core/target_wrapper.*


# QtCreator

Medusa/*.autosave
Core/*.autosave

# QtCtreator Qml
Medusa/*.qmlproject.user
Medusa/*.qmlproject.user.*
Core/*.qmlproject.user
Core/*.qmlproject.user.*

# QtCtreator CMake
Medusa/CMakeLists.txt.user*
Core/CMakeLists.txt.user*

# Protobuf
Medusa/*.pb.*
Medusa/*_pb2.py
Medusa/src/LuaModule/lua_zeus.cpp
Medusa/share/proto/cpp/

Core/*.pb.*
Core/*_pb2.py
Core/src/LuaModule/lua_zeus.cpp
Core/share/proto/cpp/



Expand All @@ -117,8 +116,8 @@ ZBin/LOG/*.log
ZBin/Client.exp
ZBin/Client.lib
ZBin/Client
ZBin/Medusa
ZBin/MedusaD
ZBin/Core
ZBin/CoreD
ZBin/grsim
ZBin/Crazy
ZBin/Client
Expand All @@ -127,6 +126,11 @@ ZBin/ballSpeedLog.txt
ZBin/Core
ZBin/Controller
# python
ZBin/__data
ZBin/*/model
ZBin/*/runs/
ZBin/*/tbox
ZBin/*/*.pth
ZBin/__pycache__
ZBin/*.py[cod]
ZBin/*$py.class
Expand Down
5 changes: 5 additions & 0 deletions Client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ else()
find_package(ZLIB)
endif()

## fmt
find_package(fmt REQUIRED)
include_directories(${fmt_INCLUDE_DIRS})
list(APPEND libs fmt::fmt)

include_directories(${ZLIB_INCLUDE_DIRS})
list(APPEND libs ${ZLIB_LIBRARIES})
## find Qt
Expand Down
15 changes: 9 additions & 6 deletions Client/plugins/sim/configwidget.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "configwidget.h"
namespace{
auto ppm = ZSS::pm::instance();
auto zpm = ZSS::ZParamManager::instance();
}
//#define END_ENUM(parents, name) \
// parents->addChild(v_##name);
Expand All @@ -15,24 +16,26 @@ namespace{
#define ADD_VALUE(parent,type,name,defaultvalue,namestring) \
ppm->loadParam(v_##name,#parent"/"#name,defaultvalue);

#define ADD_CLIENT_VALUE(parent, type, name, defaultvalue, namestring, ratio) \
v_##name = zpm->value(#parent "/" #namestring, QVariant(ratio * defaultvalue)).to##type() / ratio;

ConfigWidget::ConfigWidget()
{
ADD_VALUE(game_vars,Int,Robots_Count, 16, "Robots Count")
ADD_VALUE(field_vars,Double,Field_Line_Width,0.020,"Line Thickness")
ADD_VALUE(field_vars,Double,Field_Length,9.000,"Length")
ADD_VALUE(field_vars,Double,Field_Width,6.000,"Width")
ADD_CLIENT_VALUE(field,Double,Field_Length,9.000,width, 1000.0)
ADD_CLIENT_VALUE(field,Double,Field_Width,6.000,height, 1000.0)
ADD_VALUE(field_vars,Double,Field_Rad,0.500,"Radius")
ADD_VALUE(field_vars,Double,Field_Free_Kick,0.700,"Free Kick Distanse From Defense Area")
ADD_VALUE(field_vars,Double,Field_Penalty_Width,2.0,"Penalty width")
ADD_VALUE(field_vars,Double,Field_Penalty_Depth,1.0,"Penalty depth")
ADD_CLIENT_VALUE(field,Double,Field_Penalty_Width,2.0,penaltyLength, 1000.0)
ADD_CLIENT_VALUE(field,Double,Field_Penalty_Depth,1.0,penaltyWidth, 1000.0)
ADD_VALUE(field_vars,Double,Field_Penalty_Point,1.0,"Penalty point")
ADD_VALUE(field_vars,Double,Field_Margin,0.4,"Margin")
ADD_VALUE(field_vars,Double,Field_Referee_Margin,0.0,"Referee margin")
ADD_VALUE(field_vars,Double,Wall_Thickness,0.050,"Wall thickness")
ADD_VALUE(field_vars,Double,Goal_Thickness,0.020,"Goal thickness")
ADD_VALUE(field_vars,Double,Goal_Depth,0.200,"Goal depth")
ADD_VALUE(field_vars,Double,Goal_Width,1.000,"Goal width")
ADD_CLIENT_VALUE(field,Double,Goal_Depth,0.200,goalDepth, 1000.0)
ADD_CLIENT_VALUE(field,Double,Goal_Width,1.000,goalWidth, 1000.0)
ADD_VALUE(field_vars,Double,Goal_Height,0.160,"Goal height")
ADD_VALUE(field_vars,Double,overlap,0.20,"Camera Overlap")

Expand Down
Loading

0 comments on commit 1be508f

Please sign in to comment.