From af121493c84c116b06f2572846535293a827d089 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 20 Jun 2009 13:56:20 -0400 Subject: Embedded images into executable file --- htpstate.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'htpstate.cpp') diff --git a/htpstate.cpp b/htpstate.cpp index ad830da..30d58a2 100644 --- a/htpstate.cpp +++ b/htpstate.cpp @@ -2,9 +2,15 @@ HowToPlayState::HowToPlayState() { - background1 = SDL_LoadBMP("htp1.bmp"); - background2 = SDL_LoadBMP("htp2.bmp"); - pointer = SDL_LoadBMP("pointer.bmp"); + SDL_RWops *rw = SDL_RWFromMem(&_binary_htp1_bmp_start, (int) &_binary_htp1_bmp_size); + background1 = SDL_LoadBMP_RW(rw, 1); + + rw = SDL_RWFromMem(&_binary_htp2_bmp_start, (int) &_binary_htp2_bmp_size); + background2 = SDL_LoadBMP_RW(rw, 1); + + rw = SDL_RWFromMem(&_binary_pointer_bmp_start, (int) &_binary_pointer_bmp_size); + pointer = SDL_LoadBMP_RW(rw, 1); + secondPage = false; selection = 0; -- cgit 1.4.1