Image generation?
This commit is contained in:
@@ -40,18 +40,6 @@ errorret_t assetInit(void) {
|
||||
// Did we open the asset?
|
||||
if(ASSET.zip == NULL) errorThrow("Failed to open asset file.");
|
||||
|
||||
// Get "test.palette.dpf" file.
|
||||
zip_file_t *file = zip_fopen(ASSET.zip, "test.palette.dpf", 0);
|
||||
if(file == NULL) errorThrow("Failed to open test.palette.dpf in asset file.");
|
||||
|
||||
// Read it
|
||||
char_t buffer[256];
|
||||
zip_int64_t n = zip_fread(file, buffer, 256);
|
||||
if(n < 0) {
|
||||
zip_fclose(file);
|
||||
errorThrow("Failed to read test.palette.dpf in asset file.");
|
||||
}
|
||||
|
||||
errorOk();
|
||||
}
|
||||
|
||||
@@ -98,6 +86,8 @@ void assetLoad(
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Loading asset: %s\n", filename);
|
||||
|
||||
// Determine length of the file (uncompressed)
|
||||
struct zip_stat st;
|
||||
if(zip_stat(ASSET.zip, filename, 0, &st) != 0) {
|
||||
|
@@ -35,7 +35,7 @@ errorret_t engineInit(void) {
|
||||
errorChain(assetInit());
|
||||
errorChain(displayInit());
|
||||
|
||||
assetLoad("test.palette.dpf", assetLoadCallback, NULL);
|
||||
assetLoad("first.palette.dpf", assetLoadCallback, NULL);
|
||||
if(ASSET.state == ASSET_STATE_ERROR) errorChain(ASSET.error);
|
||||
|
||||
sceneTestAdd();
|
||||
|
Reference in New Issue
Block a user