Skip to content

Commit

Permalink
fix non-utf8 symbols in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
NicSavichev committed Mar 11, 2024
1 parent 8ca24ea commit d349960
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 27 deletions.
2 changes: 1 addition & 1 deletion prog/3rdPartyLibs/binPack2D/include/GuillotineBinPack.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file GuillotineBinPack.h
@author Jukka Jylänki
@author Jukka Jylänki
@brief Implements different bin packer algorithms that use the GUILLOTINE data structure.
Expand Down
2 changes: 1 addition & 1 deletion prog/3rdPartyLibs/binPack2D/include/MaxRectsBinPack.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file MaxRectsBinPack.h
@author Jukka Jylänki
@author Jukka Jylänki
@brief Implements different bin packer algorithms that use the MAXRECTS data structure.
Expand Down
2 changes: 1 addition & 1 deletion prog/3rdPartyLibs/binPack2D/include/Rect.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file Rect.h
@author Jukka Jylänki
@author Jukka Jylänki
This work is released to Public Domain, do whatever you want with it.
*/
Expand Down
2 changes: 1 addition & 1 deletion prog/3rdPartyLibs/binPack2D/include/SkylineBinPack.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file SkylineBinPack.h
@author Jukka Jylänki
@author Jukka Jylänki
@brief Implements different bin packer algorithms that use the SKYLINE data structure.
Expand Down
2 changes: 1 addition & 1 deletion prog/3rdPartyLibs/binPack2D/src/GuillotineBinPack.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file GuillotineBinPack.cpp
@author Jukka Jylänki
@author Jukka Jylänki
@brief Implements different bin packer algorithms that use the GUILLOTINE data structure.
Expand Down
2 changes: 1 addition & 1 deletion prog/3rdPartyLibs/binPack2D/src/MaxRectsBinPack.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file MaxRectsBinPack.cpp
@author Jukka Jylänki
@author Jukka Jylänki
@brief Implements different bin packer algorithms that use the MAXRECTS data structure.
Expand Down
2 changes: 1 addition & 1 deletion prog/3rdPartyLibs/binPack2D/src/SkylineBinPack.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file SkylineBinPack.cpp
@author Jukka Jylänki
@author Jukka Jylänki
@brief Implements different bin packer algorithms that use the SKYLINE data structure.
Expand Down
29 changes: 11 additions & 18 deletions prog/tools/converters/t3d2dag/t3dLoader.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*********** .---. .-"-. *******************\
* -------- * / ._. / ´ ` \ * ---------------- *
* Author's * \_ (__\ \_°v°_/ * humus@rogers.com *
* -------- * / ._. / ґ ` \ * ---------------- *
* Author's * \_ (__\ \_°v°_/ * humus@rogers.com *
* note * // \\ // \\ * ICQ #47010716 *
* -------- * (( )) (( )) * ---------------- *
* ****--""---""-------""---""--**** ********\
Expand Down Expand Up @@ -160,47 +160,40 @@ void CreateBmp24(char *fname, RGBTRIPLE *color, int u_size, int v_size)
DWORD RW;
int i, j;

// Îáúÿâèì íóæíûå ñòðóêòóðû
BITMAPFILEHEADER bfh;
BITMAPINFOHEADER bih;
BYTE Palette[1024]; // Ïàëèòðà
BYTE Palette[1024];

// Ïóñòü ó íàñ áóäåò êàðòèíêà ðàçìåðîì 35 x 50 ïèêñåëåé
int Width = u_size;
int Height = v_size;
memset(Palette, 0, 1024); // Â ïàëèòðå ó íàñ íóëè
memset(Palette, 0, 1024);

// Çàïîëíèì èõ
memset(&bfh, 0, sizeof(bfh));
bfh.bfType = 0x4D42; // Îáîçíà÷èì, ÷òî ýòî bmp 'BM'
bfh.bfOffBits = sizeof(bfh) + sizeof(bih) + 1024; // Ïàëèòðà çàíèìàåò 1Kb, íî ìû åãî èñïîüçîâàòü íå áóäåì
bfh.bfSize = bfh.bfOffBits + sizeof(color[0]) * Width * Height + Height * (Width % 4); // Ïîñ÷èòàåì ðàçìåð êîíå÷íîãî ôàéëà
bfh.bfType = 0x4D42; // mark as bmp 'BM'
bfh.bfOffBits = sizeof(bfh) + sizeof(bih) + 1024; // palette takes 1K (but is not used)
bfh.bfSize = bfh.bfOffBits + sizeof(color[0]) * Width * Height + Height * (Width % 4); // final file size

memset(&bih, 0, sizeof(bih));
bih.biSize = sizeof(bih); // Òàê ïîëîæåíî
bih.biBitCount = 24; // 16 áèò íà ïèêñåëü
bih.biCompression = BI_RGB; // Áåç ñæàòèÿ
bih.biSize = sizeof(bih);
bih.biBitCount = 24;
bih.biCompression = BI_RGB; // no compression
bih.biHeight = Height;
bih.biWidth = Width;
bih.biPlanes = 1; // Äîëæíî áûòü 1
// À îñòàëüíûå ïîëÿ îñòàþòñÿ 0
bih.biPlanes = 1;
hFile = CreateFile(fname, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
if (hFile == INVALID_HANDLE_VALUE)
return;

// Çàïèøåì çàãîëîâêè
WriteFile(hFile, &bfh, sizeof(bfh), &RW, NULL);
WriteFile(hFile, &bih, sizeof(bih), &RW, NULL);

// Çàïèøåì ïàëèòðó
WriteFile(hFile, Palette, 1024, &RW, NULL);
for (i = 0; i < Height; i++)
{
for (j = 0; j < Width; j++)
{
WriteFile(hFile, &color[i * Width + j], sizeof(color[0]), &RW, NULL);
}
// Âûðîâíÿåì ïî ãðàíèöå
WriteFile(hFile, Palette, Width % 4, &RW, NULL);
}

Expand Down
3 changes: 1 addition & 2 deletions prog/tools/libTools/propPanel2/panelControls/p_toolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ CToolbar::CToolbar(ControlEventHandler *event_handler, PropertyContainerControlB
const char *caption) :
PropertyContainerControlBase(id, event_handler, parent, x, y, w, _pxScaled(DEFAULT_TOOLBAR_HEIGHT)),
mContainer(this, parent->getWindow(), x, y, _px(w), _pxS(DEFAULT_TOOLBAR_HEIGHT)),
mToolbar(this, &mContainer, 0, -_pxS(2) /* -2 äëÿ ñêðûòèÿ ëèíèè íàä òóëáàðîì */, _px(w), _pxS(DEFAULT_TOOLBAR_BUTTON_HEIGHT),
caption)
mToolbar(this, &mContainer, 0, -_pxS(2) /* -2 to hide line under toolbar */, _px(w), _pxS(DEFAULT_TOOLBAR_BUTTON_HEIGHT), caption)
{}


Expand Down

0 comments on commit d349960

Please sign in to comment.