Skip to content

Commit

Permalink
wip physics remove vector
Browse files Browse the repository at this point in the history
  • Loading branch information
ligfx committed Jul 5, 2021
1 parent f8244c9 commit d245262
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 416 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ add_library(openc2e-core STATIC
src/caos/caosVM_sounds.cpp
src/caos/caosVM_time.cpp
src/caos/caosVM_variables.cpp
src/caos/caosVM_vectors.cpp
src/caos/caosVM_vehicles.cpp
src/caos/caosVM_world.cpp
${GEN}/cataloglexer.cpp
Expand Down
3 changes: 0 additions & 3 deletions src/caos/caosVM_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ void c_OUTV(caosVM* vm) {
*vm->outputstream << fmt::format("{:0.06f}", val.getFloat());
} else if (val.hasInt()) {
*vm->outputstream << val.getInt();
} else if (val.hasVector()) {
const Vector<float>& v = val.getVector();
*vm->outputstream << fmt::format("({:0.6f}, {:%0.6f})", v.x, v.y);
} else
throw badParamException();
}
Expand Down
4 changes: 0 additions & 4 deletions src/caos/caosVM_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ void c_DBG_OUTV(caosVM* vm) {
fmt::print("{:0.06f}", val.getFloat());
} else if (val.hasInt()) {
fmt::print("{}", val.getInt());
} else if (val.hasVector()) {
const Vector<float>& v = val.getVector();
fmt::print("({:0.6f}, {:0.6f})", v.x, v.y);
} else
throw badParamException();
fmt::print("\n");
Expand Down Expand Up @@ -389,7 +386,6 @@ void v_DBG_SIZO(caosVM* vm) {
SIZEOF_OUT(Agent);
SIZEOF_OUT(std::string);
SIZEOF_OUT(AgentRef);
SIZEOF_OUT(Vector<float>);
#ifdef PROFILE_ALLOCATION_COUNT
AllocationCounter::walk(oss);
#else
Expand Down
222 changes: 0 additions & 222 deletions src/caos/caosVM_vectors.cpp

This file was deleted.

5 changes: 0 additions & 5 deletions src/caosVM.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ inline auto vmparamhelper<float>(const caosValue& val) {
return val.getFloat();
}
template <>
inline auto vmparamhelper<Vector<float>>(const caosValue& val) {
return val.getVector();
}
template <>
inline auto vmparamhelper<std::shared_ptr<Agent>>(const caosValue& val) {
return val.getAgent();
}
Expand All @@ -219,7 +215,6 @@ inline auto vmparamhelper<AgentRef>(const caosValue& val) {
#define VM_PARAM_STRING(name) VM_PARAM_OF_TYPE(name, std::string)
#define VM_PARAM_INTEGER(name) VM_PARAM_OF_TYPE(name, int)
#define VM_PARAM_FLOAT(name) VM_PARAM_OF_TYPE(name, float)
#define VM_PARAM_VECTOR(name) VM_PARAM_OF_TYPE(name, Vector<float>)
#define VM_PARAM_AGENT(name) VM_PARAM_OF_TYPE(name, std::shared_ptr<Agent>)
// TODO: is usage of valid_agent correct here, or should we be caos_asserting?
#define VM_PARAM_VALIDAGENT(name) \
Expand Down
Loading

0 comments on commit d245262

Please sign in to comment.