Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ endif()
# Build Thyme
add_subdirectory(src)

# Build Game Model Converter
add_subdirectory(src/tools/gamemodelconverter)

if(STANDALONE)
list(APPEND INSTALL_TARGETS thyme)
endif()
Expand Down
5 changes: 5 additions & 0 deletions src/platform/standardfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ int StandardFile::Seek(int offset, File::SeekMode mode)
return fseek(m_file, (long)offset, fmode);
}

int StandardFile::Position()
{
return ftell(m_file);
}

void StandardFile::Next_Line(char *dst, int bytes)
{
captainslog_trace("Seeking getting next line from StandardFile %s.", m_name.Str());
Expand Down
1 change: 1 addition & 0 deletions src/platform/standardfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class StandardFile : public LocalFile
virtual int Read(void *dst, int bytes) override;
virtual int Write(void const *src, int bytes) override;
virtual int Seek(int offset, File::SeekMode mode) override;
virtual int Position() override;
virtual void Next_Line(char *dst, int bytes) override;
virtual bool Scan_Int(int &integer) override;
virtual bool Scan_Real(float &real) override;
Expand Down
1 change: 1 addition & 0 deletions src/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Windows")
endif()

add_subdirectory(gametextcompiler)
add_subdirectory(gamemodelconverter)
22 changes: 22 additions & 0 deletions src/tools/gamemodelconverter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set(CMAKE_CXX_STANDARD 17)

set(GAMEMODELCONVERTER_SOURCES
src/chunksmanager.cpp
src/chunksmanager.h
src/chunkfactory.cpp
src/gamemodelcommon.h
src/gamemodelfile.cpp
src/gamemodelfile.h
src/commands.cpp
src/commands.h
src/log.cpp
src/log.h
src/main.cpp
src/processor.cpp
src/processor.h
)

set(GAMEMODELCONVERTER_INCLUDES src)
add_executable(GameModelConverter ${GAMEMODELCONVERTER_SOURCES})
target_include_directories(GameModelConverter PRIVATE ${GAMEMODELCONVERTER_INCLUDES})
target_link_libraries(GameModelConverter PRIVATE thyme_lib)
Loading