Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Proof-of-concept Implementation for new save format (#5771) #5772

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

randombk
Copy link

This is an early proof-of-concept for #5771 and is not intended to be merged.

Checklist

Required

Optional

Purpose of change

Describe the solution

Describe alternatives you've considered

Testing

Additional context

@github-actions github-actions bot added the src changes related to source code. label Nov 28, 2024
Copy link
Contributor

autofix-ci bot commented Nov 28, 2024

Autofix has formatted code style violation in this PR.

I edit commits locally (e.g: git, github desktop) and want to keep autofix
  1. Run git pull. this will merge the automated commit into your local copy of the PR branch.
  2. Continue working.
I do not want the automated commit
  1. Format your code locally, then commit it.
  2. Run git push --force to force push your branch. This will overwrite the automated commit on remote with your local one.
  3. Continue working.

If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT.

@randombk
Copy link
Author

This iteration does not implement compression, only consolidates the maps folder, and has an iffy (but kinda working) incremental migration and backwards compatibility picture.

@randombk randombk marked this pull request as draft November 28, 2024 05:15

#include <functional>
#include <string>
#include <sqlite3.h>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Avoid pulling in sqlite3 header into game.h

std::cerr << "SQL Write: " << path << " ..." << parent << " ...";

// sqlite3_exec( db, "BEGIN TRANSACTION", 0, 0, 0 );
const char *sql = "INSERT INTO files(path, parent, data) VALUES (:path, :parent, :data)";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derp - forgot the upsert clauses. Will be fixed in the next iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant