dgcor / DGEngine

An implementation of the Diablo 1 game engine
Other
243 stars 30 forks source link

Blending Modes #26

Open ghost opened 5 years ago

ghost commented 5 years ago

DGEngine now allows defining a BlendMode. This is used mainly to draw composite textures (textures that are created by drawing multiple textures on top of each other). These are used for Flare's hero textures (overlaying weapons, chlothes) and Diablo 2's textures (for nearly all visible elements).

The code that makes it happen is here: https://github.com/dgengin/DGEngine/blob/master/src/BlendMode.h https://github.com/dgengin/DGEngine/blob/master/src/SFML/SFMLUtils.cpp

Diablo 2's game assets are currently loaded correctly, but I don't think all required BlendModes exist. The "screen" blend mode is what's used in Diablo 2, which I read is similar to the "add" blend mode.

SFML's blendMode documentation: https://www.sfml-dev.org/documentation/2.5.1/structsf_1_1BlendMode.php

This issue is to track the missing BlendModes required to properly draw all of Diablo 2's texturers.