summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorjohannes <johannes.herman@gmail.com>2024-02-07 19:48:13 +0100
committerjohannes <johannes.herman@gmail.com>2024-02-07 19:48:13 +0100
commite266d45b055a61f51066c469733ce17d3ee524eb (patch)
tree44619dc72cb8228d199f258e68c1508d8ce81647 /src/main.c
parenta883cabd1df1f440a027d1f936bbebe5a71dba36 (diff)
added write snap, fixed some bugs
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 0c71919..5408903 100644
--- a/src/main.c
+++ b/src/main.c
@@ -112,8 +112,12 @@ int testdecompress(char *line)
void dumbtestpacker()
{
+ char b[] = {0xe0, 0xce, 0xf0, 0xaf, 0x09, 0xb7};
+ char *c = b;
+ printf("test: %d\n", readint(&c));
+
char buf[16] = {0};
- int in = 550;
+ int in = 196618;
int in2 = 8763289;
printf("input: %d\n", in);
@@ -140,6 +144,9 @@ void dumbtestpacker()
int main()
{
+ dumbtestpacker();
+ // exit(0);
+
inithuff(NULL);
FILE *fp = fopen("data/test.demo", "r");
@@ -165,6 +172,10 @@ int main()
if (dd.chunks[i].type == DEMOTICK)
{
writedemotick(op, dd.chunks[i].data.tick, dh.version);
+ }
+ else if (dd.chunks[i].type == DEMOSNAP)
+ {
+ writedemosnap(op, dd.chunks[i].data.snap, dh.version);
exit(0);
}
}