Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gantsevdenis committed Jan 7, 2023
1 parent a4b08d4 commit b49ff83
Show file tree
Hide file tree
Showing 10 changed files with 537 additions and 347 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ macosx/configs/CS-ID.xcconfig
*.manifest
*.res
*.idb
>*.pdb
*.pdb
*.diff
*.dep
*.user
Expand Down
1 change: 1 addition & 0 deletions lib/framework/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ static const char *code_part_names[] =
"research",
"savegame",
"repairs",
"flowfield",
"last"
};

Expand Down
1 change: 1 addition & 0 deletions lib/framework/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ enum code_part
LOG_RESEARCH,
LOG_SAVEGAME,
LOG_REPAIRS,
LOG_FLOWFIELD,
LOG_LAST /**< _must_ be last! */
};

Expand Down
2 changes: 1 addition & 1 deletion lib/ivis_opengl/pieblitfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void iV_PolyLine(const std::vector<Vector3i> &points, const glm::mat4 &mvp, PIEL

for(auto i = 0; i < points.size(); i++){
Vector3i source = points[i];
pie_RotateProject(&source, mvp, &result);
pie_RotateProjectWithPerspective(&source, mvp, &result);

if(i > 0){
lines.push_back({ lastPoint.x, lastPoint.y, result.x, result.y });
Expand Down
8 changes: 0 additions & 8 deletions src/clparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,8 @@ static const struct poptOption *getOptionsTable()
{ "skirmish", POPT_ARG_STRING, CLI_SKIRMISH, N_("Start skirmish game with given settings file"), N_("test") },
{ "continue", POPT_ARG_NONE, CLI_CONTINUE, N_("Continue the last saved game"), nullptr },
{ "autohost", POPT_ARG_STRING, CLI_AUTOHOST, N_("Start host game with given settings file"), N_("autohost") },
<<<<<<< HEAD
{ "autorating", POPT_ARG_STRING, CLI_AUTORATING, N_("Query ratings from given server url (containing \"{HASH}\"), when hosting"), N_("autorating") },
{ "flowfield", POPT_ARG_NONE, CLI_FLOWFIELD, N_("Use advanced Flow fields method for path finding (experimental)"), nullptr },
=======
{ "autorating", POPT_ARG_STRING, CLI_AUTORATING, N_("Query ratings from given server url, when hosting"), N_("autorating") },
#if defined(WZ_OS_WIN)
{ "enableconsole", POPT_ARG_NONE, CLI_WIN_ENABLE_CONSOLE, N_("Attach or create a console window and display console output (Windows only)"), nullptr },
Expand All @@ -435,7 +433,6 @@ static const struct poptOption *getOptionsTable()
{ "addlobbyadminpublickey", POPT_ARG_STRING, CLI_ADD_LOBBY_ADMINPUBLICKEY, N_("Add a lobby admin public key (for slash commands)"), N_("b64-pub-key")},
{ "enablecmdinterface", POPT_ARG_STRING, CLI_COMMAND_INTERFACE, N_("Enable command interface"), N_("(stdin)")},
{ "startplayers", POPT_ARG_STRING, CLI_STARTPLAYERS, N_("Minimum required players to auto-start game"), N_("startplayers")},
>>>>>>> master
// Terminating entry
{ nullptr, 0, 0, nullptr, nullptr },
};
Expand Down Expand Up @@ -966,12 +963,9 @@ bool ParseCommandLine(int argc, const char * const *argv)
wz_autoratingUrl = token;
debug(LOG_INFO, "Using \"%s\" for ratings.", wz_autoratingUrl.c_str());
break;

<<<<<<< HEAD
case CLI_FLOWFIELD:
flowfieldEnable();
break;
=======
case CLI_AUTOHEADLESS:
wz_cli_headless = true;
setHeadlessGameMode(true);
Expand Down Expand Up @@ -1044,8 +1038,6 @@ bool ParseCommandLine(int argc, const char * const *argv)
}
debug(LOG_INFO, "Games will automatically start with [%d] players (when ready)", wz_min_autostart_players);
break;

>>>>>>> master
};
}

Expand Down
6 changes: 4 additions & 2 deletions src/display3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1240,8 +1240,10 @@ static void drawTiles(iView *player)
gfx_api::context::get().debugStringMarker("Draw 3D scene - blueprints");
displayBlueprints(viewMatrix, perspectiveViewMatrix);

if(isFlowfieldEnabled()){
debugDrawFlowfields(viewMatrix * glm::translate(glm::vec3(-player->p.x, 0, player->p.z)));
if(isFlowfieldEnabled())
{

debugDrawFlowfields(perspectiveViewMatrix * glm::translate(glm::vec3(-player->p.x, 0, player->p.z)));
}

pie_RemainingPasses(currentGameFrame); // draws shadows and transparent shapes
Expand Down
Loading

0 comments on commit b49ff83

Please sign in to comment.