From 7fc5513a1fe1252c5bc27f7616bf12d3db014639 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 16 Mar 2019 01:04:51 -0400 Subject: Add flags to fix up cards graphics --- cards.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'cards.h') diff --git a/cards.h b/cards.h index 2ce85a9..0ed1b8f 100644 --- a/cards.h +++ b/cards.h @@ -23,12 +23,15 @@ enum { Cards_Width = 71, Cards_Height = 96, +}; - Cards_Club = 0, +enum { + Cards_Club, Cards_Diamond = 13, Cards_Heart = 26, Cards_Spade = 39, + // Add rank to suit to obtain card face index. Cards_A = 1, Cards_2, Cards_3, Cards_4, Cards_5, Cards_6, Cards_7, Cards_8, Cards_9, Cards_10, Cards_J, Cards_Q, Cards_K, @@ -44,11 +47,21 @@ enum { Cards_Count, }; +// Some pointers will be NULL since there are gaps in the indices. struct Cards { - struct SDL_Surface *surfaces[Cards_Count]; + SDL_Surface *surfaces[Cards_Count]; +}; + +enum Cards_Flags { + // Set color key for Cards_Empty, Cards_X, Cards_O. + Cards_ColorKey = 1 << 0, + // Set alpha in card corners. + Cards_AlphaCorners = 1 << 1, + // Set red card borders to black. + Cards_BlackBorders = 1 << 2, }; -struct Cards *Cards_Load(struct SDL_RWops *rw); +struct Cards *Cards_Load(SDL_RWops *rw, enum Cards_Flags flags); void Cards_Free(struct Cards *cards); #endif -- cgit 1.4.1 ree commit diff
path: root/cgit.css (unfollow)
Commit message (Expand)Author
2013-04-08use struct strbuf instead of static buffersJohn Keeping
2013-04-08Remove redundant calls to fmt("%s", ...)John Keeping
2013-04-08Convert cgit_print_error to a variadic functionJohn Keeping
2013-04-08shared.c: add strbuf_ensure_endJohn Keeping
2013-04-08html.c: add various strbuf and varadic helpersJohn Keeping
2013-04-08Mark char* fields in struct cgit_page as constJohn Keeping
2013-04-08Fix out-of-bounds memory accesses with virtual_root=""John Keeping
2013-04-08ui-refs.c: Refactor print_tag()Lukas Fleischer
2013-04-08ui-refs.c: Remove global header variableLukas Fleischer
2013-04-08html.c: Replace strdup() with xstrdup()Lukas Fleischer
2013-04-08Always #include corresponding .h in .c filesJohn Keeping
2013-04-08cgit.mk: fix dependency handlingJohn Keeping
2013-04-08Makefile: re-include cgit.conf in cgit.mkJohn Keeping
2013-04-08Do not unnecessarily strdup() environment variablesLukas Fleischer
2013-04-08Maŕk cgit_environment members constLukas Fleischer
2013-04-08Return const char * in cgit_{httpscheme, hosturl, rooturl}()Lukas Fleischer
2013-04-08Update git to v1.8.2.1John Keeping
2013-04-07ui-blob: don't segfault when no path is givenJohn Keeping
2013-03-20Convert pager navigation into a unordered listLukas Fleischer
2013-03-20Makefile: remove CGIT-CFLAGS files in clean stageJason A. Donenfeld
2013-03-20ui-summary.c: Move urls variable into print_urls()Lukas Fleischer
2013-03-20Fix colspan valuesLukas Fleischer
2013-03-20html: check return value of writeJason A. Donenfeld
2013-03-20ui-shared: squelch compiler warning.Jason A. Donenfeld
2013-03-20cgit.mk: Use SHELL_PATH_SQ to run gen-version.shJohn Keeping
2013-03-20cgit.mk: don't rebuild everything if CGIT_VERSION changesJohn Keeping
2013-03-20ui-patch: use cgit_version not CGIT_VERSIONJohn Keeping
2013-03-20Makefile: re-use Git's Makefile where possibleJohn Keeping