@@ -23,10 +23,10 @@ SDL_Surface* generateSurface(int slide)
2323 SDL_Rect dst;
2424
2525 // Draw Content
26- if (Global::_PRESENT->slides [slide].titleSlide )
26+ if (Global::_PRESENT[Global::_CPRESENT] ->slides [slide].titleSlide )
2727 {
2828 // Title
29- text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" title" ], Global::_PRESENT->slides [slide].title .c_str (), *Global::_TEXTCOLOR, Global::_WIDTH - 2 * Global::_BORDERS);
29+ text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" title" ], Global::_PRESENT[Global::_CPRESENT] ->slides [slide].title .c_str (), *Global::_TEXTCOLOR, Global::_WIDTH - 2 * Global::_BORDERS);
3030 if (text == NULL ) gprintf (" [ERROR]: Rendering Title: %s\n " , TTF_GetError ());
3131 else
3232 {
@@ -36,9 +36,9 @@ SDL_Surface* generateSurface(int slide)
3636 }
3737
3838 // Subtitle
39- if (Global::_PRESENT->slides [slide].subtitle .length () > 0 )
39+ if (Global::_PRESENT[Global::_CPRESENT] ->slides [slide].subtitle .length () > 0 )
4040 {
41- text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" subtitle" ], Global::_PRESENT->slides [slide].subtitle .c_str (), *Global::_TEXTCOLOR, Global::_WIDTH - 2 * Global::_BORDERS);
41+ text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" subtitle" ], Global::_PRESENT[Global::_CPRESENT] ->slides [slide].subtitle .c_str (), *Global::_TEXTCOLOR, Global::_WIDTH - 2 * Global::_BORDERS);
4242 if (text == NULL ) gprintf (" [ERROR]: Rendering Subtitle: %s\n " , TTF_GetError ());
4343 else
4444 {
@@ -49,7 +49,7 @@ SDL_Surface* generateSurface(int slide)
4949 }
5050
5151 // Render "Created with BitPresent"
52- if (slide == Global::_PRESENT->slides .size () - 1 )
52+ if (slide == Global::_PRESENT[Global::_CPRESENT] ->slides .size () - 1 )
5353 {
5454 text = TTF_RenderUTF8_Blended (Global::_FONT[" footer" ], " Created with BitPresent" , *Global::_TEXTCOLOR);
5555 if (text == NULL ) gprintf (" [ERROR]: Rendering Footer: %s\n " , TTF_GetError ());
@@ -64,7 +64,7 @@ SDL_Surface* generateSurface(int slide)
6464 else
6565 {
6666 // Title
67- text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" title" ], Global::_PRESENT->slides [slide].title .c_str (), *Global::_TEXTCOLOR, Global::_WIDTH - 2 * Global::_BORDERS);
67+ text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" title" ], Global::_PRESENT[Global::_CPRESENT] ->slides [slide].title .c_str (), *Global::_TEXTCOLOR, Global::_WIDTH - 2 * Global::_BORDERS);
6868 if (text == NULL ) gprintf (" [ERROR]: Rendering Title: %s\n " , TTF_GetError ());
6969 else
7070 {
@@ -74,9 +74,9 @@ SDL_Surface* generateSurface(int slide)
7474 }
7575
7676 // Subtitle
77- if (Global::_PRESENT->slides [slide].subtitle .length () > 0 )
77+ if (Global::_PRESENT[Global::_CPRESENT] ->slides [slide].subtitle .length () > 0 )
7878 {
79- text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" subtitle" ], Global::_PRESENT->slides [slide].subtitle .c_str (), *Global::_TEXTCOLOR, Global::_WIDTH - 2 * Global::_BORDERS);
79+ text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" subtitle" ], Global::_PRESENT[Global::_CPRESENT] ->slides [slide].subtitle .c_str (), *Global::_TEXTCOLOR, Global::_WIDTH - 2 * Global::_BORDERS);
8080 if (text == NULL ) gprintf (" [ERROR]: Rendering Subtitle: %s\n " , TTF_GetError ());
8181 else
8282 {
@@ -90,9 +90,9 @@ SDL_Surface* generateSurface(int slide)
9090 int contentHeight = dst.y + dst.h * 2 ;
9191 int imgPosX = Global::_WIDTH;
9292
93- if (Global::_PRESENT->slides [slide].image != " none" )
93+ if (Global::_PRESENT[Global::_CPRESENT] ->slides [slide].image != " none" )
9494 {
95- image = IMG_Load (Global::_PRESENT->slides [slide].image .c_str ());
95+ image = IMG_Load (Global::_PRESENT[Global::_CPRESENT] ->slides [slide].image .c_str ());
9696 if (image == NULL ) gprintf (" [ERROR]: Rendering Image: %s\n " , SDL_GetError ());
9797 else
9898 {
@@ -119,7 +119,7 @@ SDL_Surface* generateSurface(int slide)
119119 }
120120
121121 // Points
122- for (int i = 0 ; i < Global::_PRESENT->slides [slide].points .size (); i++)
122+ for (int i = 0 ; i < Global::_PRESENT[Global::_CPRESENT] ->slides [slide].points .size (); i++)
123123 {
124124 // Render Dashes
125125 text = TTF_RenderUTF8_Blended (Global::_FONT[" normal" ], " - " , *Global::_TEXTCOLOR);
@@ -132,7 +132,7 @@ SDL_Surface* generateSurface(int slide)
132132 }
133133
134134 // Render Text
135- text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" normal" ], Global::_PRESENT->slides [slide].points [i].text .c_str (), *Global::_TEXTCOLOR, imgPosX - 2 * Global::_BORDERS - dst.x );
135+ text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" normal" ], Global::_PRESENT[Global::_CPRESENT] ->slides [slide].points [i].text .c_str (), *Global::_TEXTCOLOR, imgPosX - 2 * Global::_BORDERS - dst.x );
136136 if (text == NULL ) gprintf (" [ERROR]: Rendering Points: %s\n " , TTF_GetError ());
137137 else
138138 {
@@ -143,7 +143,7 @@ SDL_Surface* generateSurface(int slide)
143143 }
144144
145145 // Render Subpoints
146- for (int j = 0 ; j < Global::_PRESENT->slides [slide].points [i].subPoints .size (); j++)
146+ for (int j = 0 ; j < Global::_PRESENT[Global::_CPRESENT] ->slides [slide].points [i].subPoints .size (); j++)
147147 {
148148 // Render Dots
149149 text = TTF_RenderUTF8_Blended (Global::_FONT[" normal" ], " > " , *Global::_TEXTCOLOR);
@@ -156,7 +156,7 @@ SDL_Surface* generateSurface(int slide)
156156 }
157157
158158 // Render Text
159- text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" normal" ], Global::_PRESENT->slides [slide].points [i].subPoints [j].c_str (), *Global::_TEXTCOLOR, imgPosX - 2 * Global::_BORDERS - dst.x );
159+ text = TTF_RenderUTF8_Blended_Wrapped (Global::_FONT[" normal" ], Global::_PRESENT[Global::_CPRESENT] ->slides [slide].points [i].subPoints [j].c_str (), *Global::_TEXTCOLOR, imgPosX - 2 * Global::_BORDERS - dst.x );
160160 if (text == NULL ) gprintf (" [ERROR]: Rendering Points: %s\n " , TTF_GetError ());
161161 else
162162 {
@@ -169,7 +169,7 @@ SDL_Surface* generateSurface(int slide)
169169 }
170170
171171 // Render "Created with BitPresent"
172- if (slide == Global::_PRESENT->slides .size () - 1 )
172+ if (slide == Global::_PRESENT[Global::_CPRESENT] ->slides .size () - 1 )
173173 {
174174 text = TTF_RenderUTF8_Blended (Global::_FONT[" footer" ], " Created with BitPresent" , *Global::_TEXTCOLOR);
175175 if (text == NULL ) gprintf (" [ERROR]: Rendering Footer: %s\n " , TTF_GetError ());
0 commit comments