forked from stijnherfst/HiveWE
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
1,353 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "stdafx.h" | ||
|
||
void GameCameras::load(BinaryReader& reader) { | ||
int version = reader.read<uint32_t>(); | ||
if (version != 0) { | ||
std::cout << "Unknown war3map.w3c version: " << version << " Attempting to load but may crash\n"; | ||
} | ||
|
||
cameras.resize(reader.read<uint32_t>()); | ||
for (auto& i : cameras) { | ||
i.target_x = reader.read<float>(); | ||
i.target_y = reader.read<float>(); | ||
i.z_offset = reader.read<float>(); | ||
i.rotation = reader.read<float>(); | ||
i.angle_of_attack = reader.read<float>(); | ||
i.distance = reader.read<float>(); | ||
i.roll = reader.read<float>(); | ||
i.fov = reader.read<float>(); | ||
i.far_z = reader.read<float>(); | ||
i.near_z = reader.read<float>(); | ||
i.name = reader.read_c_string(); | ||
} | ||
} | ||
|
||
void GameCameras::save() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
|
||
struct GameCamera { | ||
float target_x; | ||
float target_y; | ||
float z_offset; | ||
float rotation; | ||
float angle_of_attack; | ||
float distance; | ||
float roll; | ||
float fov; | ||
float far_z; | ||
float near_z; // ? | ||
std::string name; | ||
}; | ||
|
||
class GameCameras { | ||
public: | ||
std::vector<GameCamera> cameras; | ||
|
||
void load(BinaryReader& reader); | ||
void save(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.