Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "template.h"
- #include "surface.h"
- #include "game.h"
- #include "icecat.h"
- using namespace Tmpl8;
- Sprite Title(new Surface("assets/title.jpg"), 1);
- Sprite TextF(new Surface("assets/fontset.png"), 96);
- void Game::Text(char string[512], int x, int y)
- {
- int _ptx=x;
- int _pty=y;
- AddEntry(string, "text", 1);
- for (int i=0; i<=512; i++)
- {
- last[i]=(int)string[i];
- if (last[i]==94) break;
- if (last[i]==126) {last[i]=1; _pty+=FH; _ptx=x-FW;}
- if (last[i]>0) last[i]-=32;
- if (last[i]<0 || last[i]>96) last[i]=0;
- TextF.SetFrame( last[i] );
- TextF.Draw(_ptx,_pty,m_Screen);
- _ptx+=FW;
- if (_ptx>=SCRWIDTH-FW-x) {_ptx=x; _pty+=FH;}
- if (i==512) { break; }
- }
- }
- void Game::Menu()
- {
- //visuals
- Title.Draw(0,0,m_Screen);
- Text(" Press Enter^",5,320);
- Text(" Created by Sam H. (110157) / icecat^",5,455);
- //action
- if (Game::_pause==false)
- {
- }
- }
Add Comment
Please, Sign In to add comment