diff options
author | June McEnroe <june@causal.agency> | 2019-03-29 20:28:44 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-03-29 20:28:44 -0400 |
commit | 7c6417beb42120e79e573d0d9a8dbe074dadc431 (patch) | |
tree | 15275f3e5bebddec479446b73cde2005e4dc47ca /sol.c | |
parent | Add king win face (diff) | |
download | cards-7c6417beb42120e79e573d0d9a8dbe074dadc431.tar.gz cards-7c6417beb42120e79e573d0d9a8dbe074dadc431.zip |
Replace path.h with asset.h
Diffstat (limited to '')
-rw-r--r-- | sol.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sol.c b/sol.c index f02e4a1..cf643f2 100644 --- a/sol.c +++ b/sol.c @@ -20,9 +20,9 @@ #include <stdlib.h> #include <time.h> +#include "asset.h" #include "cards.h" #include "layout.h" -#include "path.h" #include "stack.h" #define ARRAY_LEN(a) (sizeof(a) / sizeof((a)[0])) @@ -325,13 +325,10 @@ int main(void) { if (SDL_Init(SDL_INIT_VIDEO) < 0) err("SDL_Init"); atexit(SDL_Quit); - char *basePath = SDL_GetBasePath(); - if (!basePath) err("SDL_GetBasePath"); + struct Paths paths; + if (assetPaths(&paths) < 0) err("SDL_GetPrefPath"); - char *prefPath = SDL_GetPrefPath("Causal Agency", "Cards"); - if (!prefPath) err("SDL_GetPrefPath"); - - SDL_RWops *rw = pathCards(basePath, prefPath); + SDL_RWops *rw = assetOpenCards(&paths); if (!rw) return EXIT_FAILURE; SDL_Surface *surfaces[Cards_CardCount]; |