Commit Graph

23 Commits

Author SHA1 Message Date
Joshua Peisach
6542c09754
Define types for the bit depth
That boolean is not really a boolean, its just a variable to store
the bit depth as some DWORD. 0 = 256 color, 1 = High Color (16-bit).
2023-08-18 16:38:56 -04:00
Joshua Peisach
7c4551effe
CreatePalette - Use MxResult to track success 2023-08-18 15:44:49 -04:00
Joshua Peisach
4785766702
use MxResult return types 2023-08-15 21:51:21 -04:00
disinvite
b1ac75e329 Match vtable1c and vtable3c 2023-08-15 17:16:42 -04:00
disinvite
9184b284d1 A few things for MxBitmap
* new struct MxBITMAPINFO
* vtable18 and ImportPalette 100%
* ImportColorsToPalette improvement
2023-08-15 12:38:51 -04:00
Joshua Peisach
95bb105817
likely malloc is an operator new 2023-08-13 19:30:19 -04:00
Joshua Peisach
dd318a3295
Cleanup while i keep getting bored of matching these functions that wont match 2023-08-13 19:26:16 -04:00
Joshua Peisach
35b2cc3572
yolo vtable38 (I can't test the build atm)
I moved up ImportColorsToPalette so other functions, including this one can use it
2023-08-11 15:27:40 -04:00
Joshua Peisach
db2a93b534
Begin work on FUN_100bd450 (ImportColorsToPalette)
This took a lot of time, finally I got a good understanding of it.

Primarily what's left now is the loop
https://hackmd.io/@KsNMFSBHTO2gxDyRIPRQ1g/H1LCVQXon
2023-07-29 21:13:34 -04:00
Joshua Peisach
0223d8fb50
Cleanup MxBitmap::LoadFile 2023-07-29 16:52:54 -04:00
Joshua Peisach
c5f7a4df28
if you want to do more of vtable18 have fun 2023-07-29 16:29:49 -04:00
Joshua Peisach
9ef1f3543b
Got vtable18 into a better state
It's progress doesn't affect the status of CopyColorData, which is
back at 100%, as it makes sense the loop is a memcpy
2023-07-29 15:38:54 -04:00
Joshua Peisach
8206a7be6a
Implement MxBitmap::vtable18 2023-07-28 22:15:26 -04:00
Joshua Peisach
74013e8956
getting closer 2023-07-28 21:46:36 -04:00
Joshua Peisach
0c27252c87
Add progress on MxBitmap::LoadFile, add the global bitmap signature, add Clone call in CreatePalette 2023-07-28 21:30:17 -04:00
Joshua Peisach
8adc8324d3
MxBitmap::CreatePalette is now up to 60% 2023-07-16 21:33:21 -04:00
Joshua Peisach
b0747c28ff
Name variable m_unk18 (m_bmiColorsProvided)
Since this variable is passed to StretchDIBits, we can see what its supposed to mean.

We dont have DX5 docs, but we have docs of the current day, and this as its 'iUsage':
"Specifies whether the bmiColors member of the BITMAPINFO structure was provided and, if so, whether bmiColors contains explicit red, green, blue (RGB) values or indexes."
The second part (about what the bmiColors contains) seems redundant, since we know this is a boolean.

Source: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-stretchdibits
2023-07-15 20:45:32 -04:00
Joshua Peisach
5a061ed4f3
Name a ternary raster op 2023-07-13 16:43:06 -04:00
Joshua Peisach
eae19c8475
Match MxBitmap::vtable+40 (CopyColorData)
It's basically a call to StretchDIBits, which copies color data for a rectangle
2023-07-12 21:07:54 -04:00
MattKC
e16249b672
Define MxLong/MxULong (#71)
* define MxLong/MxULong

The "long" type has different sizes on different platforms, and this may cause issues.

* use DWORD to match RegQueryValueExA arg
2023-07-02 01:05:49 -07:00
Christian Semmler
8aad15d18b
lego1: match MxBitmap::Read and vtable (#67)
* lego1: match MxBitmap::Read and vtable

* fix param name
2023-07-01 21:49:42 -07:00
Joshua Peisach
428b5ae8db
Initial implementation of MxBitmap (#34)
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2023-06-30 16:24:00 -07:00
itsmattkc
4c9e138cbf implement all DLL exports (as TODOs)
Now we can use our own compiled LEGO1.LIB rather than one generated from the original. Also implements a script that tests them to help ensure future commits don't break them.
2023-06-30 11:34:39 -07:00