拼写错误

This commit is contained in:
awin-x 2025-01-25 17:58:47 +08:00
parent d75488bf5b
commit 89d17ce038

View File

@ -22,8 +22,8 @@ typedef struct {
int x1, y1, x2, y2; int x1, y1, x2, y2;
int width; int width;
int time; int time;
}Vein; }VineDraw;
queue<Vein> veins; queue<VineDraw> vines;
DWORD WINAPI eraser(LPVOID lpParam); DWORD WINAPI eraser(LPVOID lpParam);
void vine2(int x1, int y1, float anchor, float turn, int speed, int cost, Color color, int count, int clone); void vine2(int x1, int y1, float anchor, float turn, int speed, int cost, Color color, int count, int clone);
@ -146,7 +146,7 @@ void vine2(int x1, int y1, float anchor, float turn, int speed, int cost, Color
penline.SetStartCap(LineCapRound); penline.SetStartCap(LineCapRound);
mtx.lock(); mtx.lock();
graphics->DrawLine(&penline, x1, y1, x2, y2); graphics->DrawLine(&penline, x1, y1, x2, y2);
veins.push(Vein{x1,y1,x2,y2,speed,50}); vines.push(VineDraw{x1,y1,x2,y2,speed,50});
mtx.unlock(); mtx.unlock();
Sleep(1); Sleep(1);
if (clone > 0 && rand() % 10 == 0) if (clone > 0 && rand() % 10 == 0)
@ -177,15 +177,15 @@ DWORD WINAPI eraser(LPVOID lpParam)
erase.SetStartCap(LineCapRound); erase.SetStartCap(LineCapRound);
while(true) while(true)
{ {
if (!veins.empty()) if (!vines.empty())
{ {
veins.front().time--; vines.front().time--;
if (veins.front().time <= 0) if (vines.front().time <= 0)
{ {
erase.SetWidth(veins.front().width * 2 + 2); erase.SetWidth(vines.front().width * 2 + 2);
mtx.lock(); mtx.lock();
graphics->DrawLine(&erase, veins.front().x1, veins.front().y1, veins.front().x2, veins.front().y2); graphics->DrawLine(&erase, vines.front().x1, vines.front().y1, vines.front().x2, vines.front().y2);
veins.pop(); vines.pop();
mtx.unlock(); mtx.unlock();
} }
} }