CARDS.DLL loader for SDL
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Causal Agent aefea3071a
Add README
před 4 týdny
.gitignore Remove games před 4 týdny
LICENSE Add cards.h, cards.c, dump.c před 6 měsíci
Makefile Add README před 4 týdny
README.3 Add README před 4 týdny
cards.3 Add example před 4 týdny
cards.c Add idSkip před 5 měsíci
cards.h Document cards library před 5 měsíci
configure Add "configure" script před 5 měsíci
dump.1 Document dump(1) před 5 měsíci
dump.c Simplify (sort of) Cards API and add FreeCell loading před 5 měsíci
example.c Add example před 4 týdny
exefmt.txt Add exefmt.txt před 6 měsíci

README.3

CARDS(3)               FreeBSD Library Functions Manual               CARDS(3)

NAME
     Cards_LoadCards, Cards_LoadFreeCell, Cards_InvertSurface – bitmap
     resource loader

SYNOPSIS
     #include <cards.h>

     int
     Cards_LoadCards(SDL_Surface *surfaces[], size_t count, SDL_RWops *rw,
         enum Cards_Flag flags);

     int
     Cards_LoadFreeCell(SDL_Surface *surfaces[], size_t count, SDL_RWops *rw,
         enum Cards_Flag flags);

     int
     Cards_InvertSurface(SDL_Surface *surface);

DESCRIPTION
     Cards_LoadCards() and Cards_LoadFreeCell() load bitmap resources into an
     array of count surfaces.  Resources can be loaded from 16-bit NE
     executables or from 32-bit PE executables.

     Cards_LoadCards() loads card bitmaps from a CARDS.DLL or Windows 3.0
     SOL.EXE file rw.

     Indices of loaded surfaces are defined by the following:

           Suit    Cards_Club, Cards_Diamond, Cards_Heart, Cards_Spade.

           Rank    Cards_A, Cards_2, Cards_3, Cards_4, Cards_5, Cards_6,
                   Cards_7, Cards_8, Cards_9, Cards_10, Cards_J, Cards_Q,
                   Cards_K.

           Back    Cards_Back1, Cards_Back2, Cards_Back3, Cards_Back4,
                   Cards_Back5, Cards_Back6, Cards_Back7, Cards_Back8,
                   Cards_Back9, Cards_Back10, Cards_Back11, Cards_Back12.

           Other   Cards_Empty, Cards_X, Cards_O.

     Where suit and rank constants are added together to form an index.  Note
     that there are gaps in the indices and some surface pointers will be set
     to NULL.  The maximum number of surfaces is defined by Cards_CardCount.

     The dimensions of the loaded surfaces are defined by Cards_CardWidth and
     Cards_CardHeight.

     Cards_LoadCards() accepts the following flags:

           Cards_ColorKey      Use color key transparency for the Cards_Empty,
                               Cards_X and Cards_O surfaces.

           Cards_AlphaCorners  Make the rounded card corners transparent.

           Cards_BlackBorders  Make all card borders black.

     Cards_LoadFreeCell() loads bitmaps from a FREECELL.EXE file rw.

     Indices of loaded surfaces are defined by Cards_KingRight, Cards_KingLeft
     and Cards_KingWin.  Note that there are gaps in the indices and some
     surface pointers will be set to NULL.  The maximum number of surfaces is
     defined by Cards_FreeCellCount.

     The dimensions of the loaded surfaces are defined by Cards_KingWidth and
     Cards_KingHeight.

     Cards_LoadFreeCell() accepts the following flags:

           Cards_ColorKey  Use color key transparency.

     Cards_InvertSurface() inverts the colors of a surface loaded by
     Cards_LoadCards().

RETURN VALUES
     Upon successful completion, the value 0 is returned; otherwise the value
     -1 is returned.

FILES
     The cards.dll repository: https://code.causal.agency/june/cards.dll
     contains various versions of the files CARDS.DLL, FREECELL.EXE and
     SOL.EXE.

EXAMPLES
     See example.c.

ERRORS
     Error messages are set with SDL_SetError() and can be retrieved with
     SDL_GetError().

     Cards_LoadCards() and Cards_LoadFreeCell() may fail for the following
     reasons: any SDL_RWops or SDL_Surface error; invalid MZ, NE or PE
     signatures; missing resource table; invalid resource hierarchy; missing
     resource.

     Cards_InvertSurface() may fail for any SDL_Surface error or if the
     surface format is not supported.

STANDARDS
     The New Executable format, documented in exefmt.txt.

     The Portable Executable format, documented at
     https://docs.microsoft.com/en-us/windows/desktop/Debug/pe-format.

AUTHORS
     C. McEnroe <june@causal.agency>

FreeBSD 12.0-RELEASE-p10        August 22, 2019       FreeBSD 12.0-RELEASE-p10