[PATCH] ex_blend2: Test ALLEGRO_SRC_COLOR and ALLEGRO_DST_COLOR. |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- Subject: [PATCH] ex_blend2: Test ALLEGRO_SRC_COLOR and ALLEGRO_DST_COLOR.
- From: Peter Wang <novalazy@xxxxxxxxxx>
- Date: Thu, 9 Jun 2011 16:15:51 +1000
---
examples/ex_blend2.cpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/examples/ex_blend2.cpp b/examples/ex_blend2.cpp
index b67ca83..bda9905 100644
--- a/examples/ex_blend2.cpp
+++ b/examples/ex_blend2.cpp
@@ -90,7 +90,9 @@ Prog::Prog(const Theme & theme, ALLEGRO_DISPLAY *display) :
l.append_item("ZERO");
l.append_item("ALPHA");
l.append_item("INVERSE");
- d.add(l, 1 + i * 3, 25, 3, 6);
+ l.append_item("SRC_COLOR");
+ l.append_item("DST_COLOR");
+ d.add(l, 1 + i * 3, 25, 3, 7);
}
for (int i = 4; i < 6; i++) {
@@ -147,6 +149,10 @@ int str_to_blend_mode(const std::string & str)
return ALLEGRO_ALPHA;
if (str == "INVERSE")
return ALLEGRO_INVERSE_ALPHA;
+ if (str == "SRC_COLOR")
+ return ALLEGRO_SRC_COLOR;
+ if (str == "DST_COLOR")
+ return ALLEGRO_DST_COLOR;
if (str == "ADD")
return ALLEGRO_ADD;
if (str == "SRC_MINUS_DEST")
--
1.7.4.4
--oC1+HKm2/end4ao3--