this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

move tic_project_ext to tools

+17 -16
+2 -2
CMakeLists.txt
··· 748 748 ${TIC80LIB_DIR}/ext/png.c 749 749 ) 750 750 751 - #if(${BUILD_PRO}) 751 + if(${BUILD_PRO}) 752 752 set(TIC80STUDIO_SRC ${TIC80STUDIO_SRC} ${TIC80LIB_DIR}/studio/project.c) 753 - #endif() 753 + endif() 754 754 755 755 set(TIC80_OUTPUT tic80) 756 756
-11
src/studio/project.c
··· 131 131 return Languages[0]->projectComment; 132 132 } 133 133 134 - bool tic_project_ext(const char* name) 135 - { 136 - FOR_EACH_LANG(ln) 137 - { 138 - if(tic_tool_has_ext(name, ln->fileExtension)) 139 - return true; 140 - } 141 - FOR_EACH_LANG_END 142 - return false; 143 - } 144 - 145 134 s32 tic_project_save(const char* name, void* data, const tic_cartridge* cart) 146 135 { 147 136 const char* comment = projectComment(name);
-1
src/studio/project.h
··· 26 26 27 27 bool tic_project_load(const char* name, const char* data, s32 size, tic_cartridge* dst); 28 28 s32 tic_project_save(const char* name, void* data, const tic_cartridge* cart); 29 - bool tic_project_ext(const char* name);
+2 -2
src/studio/screens/console.c
··· 934 934 #else 935 935 if(tic_project_ext(name)) { 936 936 printError(console, "\nproject loading error"); 937 - printFront(console, "\nThis version only supports binary cartridges (GIF, PNG, or TIC)."); 937 + printFront(console, "\nThis version only supports binary .png or .tic cartridges."); 938 938 printLine(console); 939 939 printFront(console, "\nTIC-80 "); 940 940 consolePrint(console,"PRO",tic_color_light_blue); 941 - printFront(console, " is needed for projects."); 941 + printFront(console, " is needed for text files."); 942 942 printLine(console); 943 943 printFront(console, "\nLearn more:\n"); 944 944 printLink(console, "https://tic80.com/pro");
+11
src/tools.c
··· 149 149 return pal; 150 150 } 151 151 152 + bool tic_project_ext(const char* name) 153 + { 154 + FOR_EACH_LANG(ln) 155 + { 156 + if(tic_tool_has_ext(name, ln->fileExtension)) 157 + return true; 158 + } 159 + FOR_EACH_LANG_END 160 + return false; 161 + } 162 + 152 163 bool tic_tool_has_ext(const char* name, const char* ext) 153 164 { 154 165 return strcmp(name + strlen(name) - strlen(ext), ext) == 0;
+2
src/tools.h
··· 22 22 23 23 #pragma once 24 24 25 + #include "api.h" 25 26 #include "tic.h" 26 27 #include <stddef.h> 27 28 ··· 82 83 s32 tic_tool_get_pattern_id(const tic_track* track, s32 frame, s32 channel); 83 84 void tic_tool_set_pattern_id(tic_track* track, s32 frame, s32 channel, s32 id); 84 85 u32* tic_tool_palette_blit(const tic_palette* src, tic80_pixel_color_format fmt); 86 + bool tic_project_ext(const char* name); 85 87 bool tic_tool_has_ext(const char* name, const char* ext); 86 88 s32 tic_tool_get_track_row_sfx(const tic_track_row* row); 87 89 void tic_tool_set_track_row_sfx(tic_track_row* row, s32 sfx);