goat3d
diff src/chunk.cc @ 47:498ca7ac7047
- placed all the implementation stuff in the g3dimpl namespace
- added animation stuff to the public API
- started writing animation saving/loading
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 28 Dec 2013 06:47:39 +0200 |
parents | 6b651613bd9f |
children | dad392c710df |
line diff
1.1 --- a/src/chunk.cc Sun Dec 08 03:00:25 2013 +0200 1.2 +++ b/src/chunk.cc Sat Dec 28 06:47:39 2013 +0200 1.3 @@ -1,6 +1,8 @@ 1.4 #include "goat3d.h" 1.5 #include "chunk.h" 1.6 1.7 +using namespace g3dimpl; 1.8 + 1.9 ChunkHeader chunk_header(int id) 1.10 { 1.11 ChunkHeader hdr; 1.12 @@ -9,7 +11,7 @@ 1.13 return hdr; 1.14 } 1.15 1.16 -bool write_chunk_header(const ChunkHeader *hdr, goat3d_io *io) 1.17 +bool g3dimpl::write_chunk_header(const ChunkHeader *hdr, goat3d_io *io) 1.18 { 1.19 io->seek(-(long)hdr->size, SEEK_CUR, io->cls); 1.20 if(io->write(hdr, sizeof *hdr, io->cls) < (long)sizeof *hdr) { 1.21 @@ -18,7 +20,7 @@ 1.22 return true; 1.23 } 1.24 1.25 -bool read_chunk_header(ChunkHeader *hdr, goat3d_io *io) 1.26 +bool g3dimpl::read_chunk_header(ChunkHeader *hdr, goat3d_io *io) 1.27 { 1.28 if(io->read(hdr, sizeof *hdr, io->cls) < (long)sizeof *hdr) { 1.29 return false; 1.30 @@ -26,7 +28,7 @@ 1.31 return true; 1.32 } 1.33 1.34 -void skip_chunk(const ChunkHeader *hdr, goat3d_io *io) 1.35 +void g3dimpl::skip_chunk(const ChunkHeader *hdr, goat3d_io *io) 1.36 { 1.37 io->seek(hdr->size - sizeof *hdr, SEEK_CUR, io->cls); 1.38 }