Commit 5aa7fe73 authored by Steve Revill's avatar Steve Revill
Browse files

This time without the debug...

parent f4393d2f
......@@ -404,8 +404,6 @@ static _kernel_oserror *load_squashed_sprites(const char *arg_string, const size
/* Load the file into our buffer */
ERR_GOTO(_swix(OS_File, _INR(0,3), OSFile_LoadNoPath, arg_string, buf, 0));
printf("0");
/* Check the squash file header looks sensible */
hdr = (squash_t *)buf;
if (
......@@ -419,37 +417,25 @@ printf("0");
ERR_GOTO(eblk(BOOTFX_ERR_INVALID_SPRITES));
}
printf("1");
/* Allocate a buffer to unsquash the sprites into */
out_sz = 64 + hdr->size;
ERR(_swix(OS_DynamicArea, _INR(0,8) | _OUT(1) | _OUT(3), OSDA_Create, -1, out_sz, -1, 1<<7, out_sz, NULL, NULL, DA_NAME, &spr_danum, &out));
printf("2");
/* Check how much workspace the decompress SWI needs */
ERR_GOTO(_swix(Squash_Decompress, _INR(0,1) | _OUT(0), 1<<3, -1, &wsp_sz));
printf("3");
/* Allocate some workspace */
ERR_GOTO(my_malloc(&wsp, wsp_sz));
printf("4");
/* Decompress the sprites into the output buffer */
ERR_GOTO(_swix(Squash_Decompress, _INR(0,5) | _OUT(0), 1<<2, wsp, buf + sizeof(squash_t), size - sizeof(squash_t), out + 1, out_sz - sizeof(uint32_t), &status));
printf("5");
/* Barf if the decompression failed */
if (status)
{
ERR_GOTO(eblk(BOOTFX_ERR_INVALID_SPRITES));
}
printf("6");
/* Free the input buffer and the workspace */
FREE(buf);
FREE(wsp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment