MCPcopy Create free account
hub / github.com/beefytech/Beef / main

Function main

BeefTools/ImgCreate/ImgCreate.cpp:90–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90int main()
91{
92 int baseWidth = 0;
93 int baseHeight = 0;
94
95 bool isThemeDir = false;
96
97 PSDReader readers[2][3];
98 ImageData* imageDatas[2][3] = { NULL };
99
100 for (int pass = 0; pass < 2; pass++)
101 {
102 for (int size = 0; size < 3; size++)
103 {
104 auto& reader = readers[pass][size];
105 auto& imageData = imageDatas[pass][size];
106
107 String fileName;
108
109 if (pass == 0)
110 {
111 if (size == 0)
112 fileName = "DarkUI.psd";
113 else if (size == 1)
114 fileName = "DarkUI_2.psd";
115 else
116 fileName = "DarkUI_4.psd";
117
118 if (!FileExists(fileName))
119 {
120 String checkFileName = "../../images/" + fileName;
121 if (FileExists(checkFileName))
122 {
123 isThemeDir = true;
124 fileName = checkFileName;
125 }
126 }
127 }
128 else
129 {
130 if (size == 0)
131 fileName = "UI.psd";
132 else if (size == 1)
133 fileName = "UI_2.psd";
134 else
135 fileName = "UI_4.psd";
136
137 if (!FileExists(fileName))
138 {
139 if (!isThemeDir)
140 continue;
141
142 fileName.RemoveFromEnd(3);
143 fileName += "png";
144 if (!FileExists(fileName))
145 continue;
146 }
147 }

Callers

nothing calls this directly

Calls 14

ConvImageFunction · 0.85
ResizeFunction · 0.85
LoadFromFileMethod · 0.80
ReadImageDataMethod · 0.80
MergeLayersMethod · 0.80
CreateNewMethod · 0.80
RemoveFromEndMethod · 0.45
EndsWithMethod · 0.45
InitMethod · 0.45
c_strMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected