Skip to content

13/15 ddraw: colorkey, palettes, pixel formats - #14

Merged
evmar merged 2 commits into
evmar:mainfrom
avanturist888:slice/13
Aug 20, 2026
Merged

13/15 ddraw: colorkey, palettes, pixel formats#14
evmar merged 2 commits into
evmar:mainfrom
avanturist888:slice/13

Conversation

@avanturist888

Copy link
Copy Markdown
Contributor

Part 13 of 15, splitting up #1. Needs 9 merged first; on its own it does not compile.

Comment thread win32/winapi/src/ddraw/ddraw1.rs Outdated
#[win32_derive::dllexport]
pub fn SetColorKey(_ctx: &mut Context, _this: u32) -> DD {
todo!()
pub fn SetColorKey(ctx: &mut Context, this: u32, dwFlags: u32, lpDDColorKey: u32) -> DD {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern I was trying to use is that modules like ddraw1 or ddraw7 handle the specific function decoding of that API, and then shared functionality goes into methods in ddraw.rs. So I think this code belongs in ddraw.rs, and then ddraw7.rs won't need to call into ddraw1.rs.

@avanturist888

Copy link
Copy Markdown
Contributor Author

Restructured the way you describe. blit_copy, read_rect, surface_src_color_key and the bodies of Blt, BltFast, SetColorKey and GetColorKey are in ddraw.rs now, and ddraw1 and ddraw7 are thin wrappers over them. ddraw7 no longer references ddraw1 at all.

@evmar
evmar merged commit 7112db9 into evmar:main Aug 20, 2026
@avanturist888
avanturist888 deleted the slice/13 branch August 20, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants