Fix final animation
This commit is contained in:
parent
ef350183e2
commit
02fd60e67d
6 changed files with 29 additions and 8 deletions
|
|
@ -34,7 +34,9 @@ _project_write :: proc(project: ^ProjectData, path: string) -> ProjectWriteError
|
|||
io.write_full(w, transmute([]u8)header) or_return
|
||||
io.write_ptr(w, &version, size_of(version)) or_return
|
||||
io.write_ptr(w, &project.matrix_count, size_of(project.matrix_count)) or_return
|
||||
n := io.write_ptr(w, raw_data(project.matrices), int(project.matrix_count) * 9 * size_of(f32)) or_return
|
||||
_ = io.write_ptr(w, raw_data(project.matrices), int(project.matrix_count) * 9 * size_of(f32)) or_return
|
||||
_ = io.write_ptr(w, &project.grid, size_of(project.grid)) or_return
|
||||
_ = io.write_ptr(w, &project.shapes, size_of(project.shapes)) or_return
|
||||
os.close(f)
|
||||
return nil
|
||||
}
|
||||
|
|
@ -56,6 +58,8 @@ _project_read :: proc(project: ^ProjectData, path: string) -> ProjectReadError {
|
|||
return ProjectReadErrorType.VersionNeedsUpgrade
|
||||
}
|
||||
_ = io.read_ptr(r, &project.matrix_count, size_of(project.matrix_count)) or_return
|
||||
n := io.read_ptr(r, raw_data(project.matrices), size_of(f32) * len(project.matrices)) or_return
|
||||
_ = io.read_ptr(r, raw_data(project.matrices), size_of(f32) * int(project.matrix_count) * 9) or_return
|
||||
_ = io.read_ptr(r, &project.grid, size_of(project.grid)) or_return
|
||||
_ = io.read_ptr(r, &project.shapes, size_of(project.shapes)) or_return
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue