Created
October 16, 2023 17:51
-
-
Save PhoenixVX/d0c1dec09bd1fd726f51e6b2fb4206d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QM_BOOL QmageDecCommon_SetImageInfo(QmageImageInfo *image_info, QMINT32 type) { | |
// Initialize image_info with 0s | |
QuramQmage_Memset(image_info, 0, sizeof(QmageImageInfo)); | |
switch (type) { | |
case 0: | |
image_info->transparency = 0; | |
image_info->bpp = 16; | |
image_info->raw_type = 0; | |
return QM_BOOL_TRUE; | |
case 1: | |
image_info->transparency = 0; | |
image_info->bpp = 24; | |
image_info->raw_type = 1; | |
return QM_BOOL_TRUE; | |
case 2: | |
image_info->transparency = 0; | |
image_info->bpp = 24; | |
image_info->raw_type = 2; | |
return QM_BOOL_TRUE; | |
case 3: | |
image_info->transparency = 1; | |
image_info->bpp = 24; | |
image_info->raw_type = 3; | |
return QM_BOOL_TRUE; | |
case 4: | |
image_info->transparency = 1; | |
image_info->bpp = 24; | |
image_info->raw_type = 4; | |
return QM_BOOL_TRUE; | |
case 5: | |
image_info->transparency = 1; | |
image_info->bpp = 32; | |
image_info->raw_type = 5; | |
return QM_BOOL_TRUE; | |
case 6: | |
image_info->transparency = 1; | |
image_info->bpp = 32; | |
image_info->raw_type = 6; | |
return QM_BOOL_TRUE; | |
case 7: | |
image_info->transparency = 1; | |
image_info->bpp = 32; | |
image_info->raw_type = 7; | |
return QM_BOOL_TRUE; | |
default: | |
return QM_BOOL_FALSE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment