Skip to content

Commit

Permalink
fix errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Aug 25, 2021
1 parent 5c5f6e1 commit 8a8d1a3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 33 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ endif()

##############################################################################

add_definitions(-D__STDC__=1 -D_USE_MATH_DEFINES)

subdirs(mojiben1 mojiben2 mojiben3 mojiben4)

##############################################################################
51 changes: 24 additions & 27 deletions mojiben2/mojiben2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,14 @@ unsigned __stdcall ThreadProc( void * )
sint = sin(v[i].angle0 * M_PI / 180);
for(k = -200; k < 200; k += 30)
{
apt[0].x = 150 + k * cost + 150 * sint;
apt[0].y = 150 + k * sint - 150 * cost;
apt[1].x = 150 + k * cost - 150 * sint;
apt[1].y = 150 + k * sint + 150 * cost;
apt[2].x = 150 + (k + 30) * cost - 150 * sint;
apt[2].y = 150 + (k + 30) * sint + 150 * cost;
apt[3].x = 150 + (k + 30) * cost + 150 * sint;
apt[3].y = 150 + (k + 30) * sint - 150 * cost;
apt[0].x = LONG(150 + k * cost + 150 * sint);
apt[0].y = LONG(150 + k * sint - 150 * cost);
apt[1].x = LONG(150 + k * cost - 150 * sint);
apt[1].y = LONG(150 + k * sint + 150 * cost);
apt[2].x = LONG(150 + (k + 30) * cost - 150 * sint);
apt[2].y = LONG(150 + (k + 30) * sint + 150 * cost);
apt[3].x = LONG(150 + (k + 30) * cost + 150 * sint);
apt[3].y = LONG(150 + (k + 30) * sint - 150 * cost);
BeginPath(hdcMem);
Polygon(hdcMem, apt, 4);
EndPath(hdcMem);
Expand Down Expand Up @@ -400,14 +400,14 @@ unsigned __stdcall ThreadProc( void * )

FillRgn(hdcMem, hRgn, (HBRUSH)GetStockObject(BLACK_BRUSH));

apt[0].x = 150 + k * cost + 150 * sint;
apt[0].y = 150 + k * sint - 150 * cost;
apt[1].x = 150 + k * cost - 150 * sint;
apt[1].y = 150 + k * sint + 150 * cost;
apt[2].x = 150 + (k + 30) * cost - 150 * sint;
apt[2].y = 150 + (k + 30) * sint + 150 * cost;
apt[3].x = 150 + (k + 30) * cost + 150 * sint;
apt[3].y = 150 + (k + 30) * sint - 150 * cost;
apt[0].x = LONG(150 + k * cost + 150 * sint);
apt[0].y = LONG(150 + k * sint - 150 * cost);
apt[1].x = LONG(150 + k * cost - 150 * sint);
apt[1].y = LONG(150 + k * sint + 150 * cost);
apt[2].x = LONG(150 + (k + 30) * cost - 150 * sint);
apt[2].y = LONG(150 + (k + 30) * sint + 150 * cost);
apt[3].x = LONG(150 + (k + 30) * cost + 150 * sint);
apt[3].y = LONG(150 + (k + 30) * sint - 150 * cost);
BeginPath(hdcMem);
Polygon(hdcMem, apt, 4);
EndPath(hdcMem);
Expand Down Expand Up @@ -474,10 +474,10 @@ unsigned __stdcall ThreadProc( void * )

FillRgn(hdcMem, hRgn, (HBRUSH)GetStockObject(BLACK_BRUSH));

apt[0].x = v[i].cx + 200 * cost;
apt[0].y = v[i].cy + 200 * sint;
apt[1].x = v[i].cx + 200 * cost2;
apt[1].y = v[i].cy + 200 * sint2;
apt[0].x = LONG(v[i].cx + 200 * cost);
apt[0].y = LONG(v[i].cy + 200 * sint);
apt[1].x = LONG(v[i].cx + 200 * cost2);
apt[1].y = LONG(v[i].cy + 200 * sint2);
apt[2].x = v[i].cx;
apt[2].y = v[i].cy;
BeginPath(hdcMem);
Expand Down Expand Up @@ -520,10 +520,10 @@ unsigned __stdcall ThreadProc( void * )

FillRgn(hdcMem, hRgn, (HBRUSH)GetStockObject(BLACK_BRUSH));

apt[0].x = v[i].cx + 200 * cost;
apt[0].y = v[i].cy + 200 * sint;
apt[1].x = v[i].cx + 200 * cost2;
apt[1].y = v[i].cy + 200 * sint2;
apt[0].x = LONG(v[i].cx + 200 * cost);
apt[0].y = LONG(v[i].cy + 200 * sint);
apt[1].x = LONG(v[i].cx + 200 * cost2);
apt[1].y = LONG(v[i].cy + 200 * sint2);
apt[2].x = v[i].cx;
apt[2].y = v[i].cy;
BeginPath(hdcMem);
Expand Down Expand Up @@ -752,9 +752,6 @@ void Kakijun_OnPaint(HWND hwnd)
LRESULT CALLBACK
KakijunWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;

switch(uMsg)
{
HANDLE_MSG(hwnd, WM_ERASEBKGND, Kakijun_OnEraseBkgnd);
Expand Down
3 changes: 0 additions & 3 deletions mojiben3/mojiben3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,6 @@ void Kakijun_OnDestroy(HWND hwnd)
LRESULT CALLBACK
KakijunWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;

switch (uMsg)
{
HANDLE_MSG(hwnd, WM_CREATE, Kakijun_OnCreate);
Expand Down
3 changes: 0 additions & 3 deletions mojiben4/mojiben4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,6 @@ void Kakijun_OnDestroy(HWND hwnd)
LRESULT CALLBACK
KakijunWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;

switch (uMsg)
{
HANDLE_MSG(hwnd, WM_CREATE, Kakijun_OnCreate);
Expand Down

0 comments on commit 8a8d1a3

Please sign in to comment.