mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2024-11-22 08:50:18 +01:00
Compare commits
No commits in common. "917b68d6304636ccfbf7aa52daa108d3e071ae96" and "d27740bd38801f61b8c0ebb8607034bba8eee9ab" have entirely different histories.
917b68d630
...
d27740bd38
4 changed files with 2 additions and 40 deletions
|
@ -20,8 +20,7 @@ Supports data files from Windows and Full Tilt versions of the game.
|
||||||
| Nintendo Switch | averne | <https://github.com/averne/SpaceCadetPinball-NX> |
|
| Nintendo Switch | averne | <https://github.com/averne/SpaceCadetPinball-NX> |
|
||||||
| webOS TV | mariotaku | <https://github.com/webosbrew/SpaceCadetPinball> |
|
| webOS TV | mariotaku | <https://github.com/webosbrew/SpaceCadetPinball> |
|
||||||
| Android (WIP) | Iscle | https://github.com/Iscle/SpaceCadetPinball |
|
| Android (WIP) | Iscle | https://github.com/Iscle/SpaceCadetPinball |
|
||||||
| Nintendo Wii | MaikelChan | https://github.com/MaikelChan/SpaceCadetPinball |
|
| Nintendo Wii (WIP) | MaikelChan | https://github.com/MaikelChan/SpaceCadetPinball |
|
||||||
| Nintendo 3DS | MaikelChan | https://github.com/MaikelChan/SpaceCadetPinball/tree/3ds |
|
|
||||||
| Nintendo Wii U | IntriguingTiles | https://github.com/IntriguingTiles/SpaceCadetPinball-WiiU |
|
| Nintendo Wii U | IntriguingTiles | https://github.com/IntriguingTiles/SpaceCadetPinball-WiiU |
|
||||||
|
|
||||||
Platforms covered by this project: desktop Windows, Linux and macOS.
|
Platforms covered by this project: desktop Windows, Linux and macOS.
|
||||||
|
|
|
@ -295,7 +295,6 @@ void DatFile::Finalize()
|
||||||
IM_FREE(rcData);
|
IM_FREE(rcData);
|
||||||
|
|
||||||
// PINBALL2.MID is an alternative font provided in 3DPB data
|
// PINBALL2.MID is an alternative font provided in 3DPB data
|
||||||
// Scaled down because it is too large for top text box
|
|
||||||
/*auto file = pinball::make_path_name("PINBALL2.MID");
|
/*auto file = pinball::make_path_name("PINBALL2.MID");
|
||||||
auto fileHandle = fopen(file.c_str(), "rb");
|
auto fileHandle = fopen(file.c_str(), "rb");
|
||||||
fseek(fileHandle, 0, SEEK_END);
|
fseek(fileHandle, 0, SEEK_END);
|
||||||
|
@ -304,11 +303,8 @@ void DatFile::Finalize()
|
||||||
fseek(fileHandle, 0, SEEK_SET);
|
fseek(fileHandle, 0, SEEK_SET);
|
||||||
fread(rcData, 1, fileSize, fileHandle);
|
fread(rcData, 1, fileSize, fileHandle);
|
||||||
fclose(fileHandle);
|
fclose(fileHandle);
|
||||||
auto groupId = Groups.back()->GroupId + 1u;
|
|
||||||
AddMsgFont(rcData, "pbmsg_ft");
|
AddMsgFont(rcData, "pbmsg_ft");
|
||||||
delete[] rcData;
|
delete[] rcData;*/
|
||||||
for (auto i = groupId; i < Groups.size(); i++)
|
|
||||||
Groups[i]->GetBitmap(0)->ScaleIndexed(0.84f, 0.84f);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto group : Groups)
|
for (auto group : Groups)
|
||||||
|
|
|
@ -79,38 +79,6 @@ gdrv_bitmap8::~gdrv_bitmap8()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gdrv_bitmap8::ScaleIndexed(float scaleX, float scaleY)
|
|
||||||
{
|
|
||||||
if (!IndexedBmpPtr)
|
|
||||||
{
|
|
||||||
assertm(false, "Scaling non-indexed bitmap");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int newWidht = static_cast<int>(Width * scaleX), newHeight = static_cast<int>(Height * scaleY);
|
|
||||||
if (Width == newWidht && Height == newHeight)
|
|
||||||
return;
|
|
||||||
|
|
||||||
auto newIndBuf = new char[newHeight * newWidht];
|
|
||||||
for (int dst = 0, y = 0; y < newHeight; y++)
|
|
||||||
{
|
|
||||||
for (int x = 0; x < newWidht; x++, dst++)
|
|
||||||
{
|
|
||||||
auto px = static_cast<int>(x / scaleX);
|
|
||||||
auto py = static_cast<int>(y / scaleY);
|
|
||||||
newIndBuf[dst] = IndexedBmpPtr[(py * IndexedStride) + px];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Stride = IndexedStride = Width = newWidht;
|
|
||||||
Height = newHeight;
|
|
||||||
|
|
||||||
delete IndexedBmpPtr;
|
|
||||||
IndexedBmpPtr = newIndBuf;
|
|
||||||
delete BmpBufPtr1;
|
|
||||||
BmpBufPtr1 = new ColorRgba[Stride * Height];
|
|
||||||
}
|
|
||||||
|
|
||||||
int gdrv::display_palette(ColorRgba* plt)
|
int gdrv::display_palette(ColorRgba* plt)
|
||||||
{
|
{
|
||||||
const uint32_t sysPaletteColors[]
|
const uint32_t sysPaletteColors[]
|
||||||
|
|
|
@ -42,7 +42,6 @@ struct gdrv_bitmap8
|
||||||
gdrv_bitmap8(int width, int height, bool indexed);
|
gdrv_bitmap8(int width, int height, bool indexed);
|
||||||
gdrv_bitmap8(const struct dat8BitBmpHeader& header);
|
gdrv_bitmap8(const struct dat8BitBmpHeader& header);
|
||||||
~gdrv_bitmap8();
|
~gdrv_bitmap8();
|
||||||
void ScaleIndexed(float scaleX, float scaleY);
|
|
||||||
ColorRgba* BmpBufPtr1;
|
ColorRgba* BmpBufPtr1;
|
||||||
char* IndexedBmpPtr;
|
char* IndexedBmpPtr;
|
||||||
int Width;
|
int Width;
|
||||||
|
|
Loading…
Reference in a new issue