Skip to content

Commit

Permalink
Added MSVC 2017 make target. Fixed compile warnings in VC 2017.
Browse files Browse the repository at this point in the history
  • Loading branch information
wqking committed Jun 23, 2018
1 parent 3fec06d commit ecbdda4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions build/desktop/makefile
Expand Up @@ -28,6 +28,7 @@ none: needcmake
$(ECHO) " mingw Generate MinGW makefile and then use mingw32-make to build (release version)."
$(ECHO) " mingw_debug Generate MinGW makefile and then use mingw32-make to build (debug version)."
$(ECHO) " linux Generate Linux/Unix makefile and then use GCC make to build."
$(ECHO) " vc17 Generate project files for Microsoft VC 2017. No auto build. You need to open the project in VC IDE then build."
$(ECHO) " vc15 Generate project files for Microsoft VC 2015. No auto build. You need to open the project in VC IDE then build."
$(ECHO) " cb_mingw Generate project files for Code::Blocks using MinGW g++ compiler, release version. No auto build. You need to open the project in Code::Blocks IDE then build."
$(ECHO) " cb_mingw_debug Generate project files for Code::Blocks using MinGW g++ compiler, debug version. No auto build. You need to open the project in Code::Blocks IDE then build."
Expand Down Expand Up @@ -70,6 +71,11 @@ linux: needcmake
$(CH_DIR) $(CACHE_DIR)_linux $(CMAKE) -G"Unix Makefiles"
$(EXEC_BUILD)_linux make $(TARGET)

vc17: needcmake
$(MK_DIR) $(PROJECT_PREFIX)_vc17
$(CH_DIR) $(PROJECT_PREFIX)_vc17 $(CMAKE) -G"Visual Studio 15 2017 Win64"
$(ECHO) Please open the solution $(PROJECT).sln in $(PROJECT_PREFIX)_vc17 in VC IDE.

vc15: needcmake
$(MK_DIR) $(PROJECT_PREFIX)_vc15
$(CH_DIR) $(PROJECT_PREFIX)_vc15 $(CMAKE) -G"Visual Studio 14"
Expand Down
2 changes: 1 addition & 1 deletion include/gincu/gtransform.h
Expand Up @@ -13,7 +13,7 @@ namespace gincu {
class GTransform
{
private:
enum class Flags {
enum Flags {
flagDirty = 1 << 0,
flagProjection = 1 << 1
};
Expand Down
2 changes: 1 addition & 1 deletion src/gatlas.cpp
Expand Up @@ -25,7 +25,7 @@ int GAtlasData::getIndex(const std::string & name) const
{
auto it = this->indexMap.find(const_cast<std::string &>(name));
if(it != this->indexMap.end()) {
return it->second;
return (int)it->second;
}
else {
return -1;
Expand Down
2 changes: 1 addition & 1 deletion src/gframeanimation.cpp
Expand Up @@ -111,7 +111,7 @@ void buildFrameAnimationDataFromAtlas(GFrameAnimationSetData * data, const GAtla
for(std::size_t i = 0; i < indexList.size(); ++i) {
indexList[i] = itemPair.second[i].frameIndex;
}
const int duration = indexList.size() * millsecondsBetweenFrame;
const int duration = (int)(indexList.size() * millsecondsBetweenFrame);
data->append(itemPair.first, GFrameAnimationData(std::move(indexList), duration));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/gutil.cpp
Expand Up @@ -18,7 +18,7 @@ int getRand()
{
if(needInitializeRandSeed) {
needInitializeRandSeed = false;
srand((size_t)time(NULL));
srand((unsigned int)time(NULL));
}

return rand();
Expand Down

0 comments on commit ecbdda4

Please sign in to comment.