Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion )
- {
- gEngfuncs = *pEnginefuncs;
- if (iVersion != CLDLL_INTERFACE_VERSION)
- return 0;
- memcpy(&gEngfuncs, pEnginefuncs, sizeof(cl_enginefunc_t));
- BSPB.LoadBackgroundFile();
- EV_HookEvents();
- return 1;
- }
- int BSPBackground::LoadBackgroundFile( void )
- {
- level_id = 1;
- ifstream infile("scripts/background%s.txt", level_id);
- if (!infile)
- {
- gEngfuncs.Con_Printf( "Cannot find background%s.txt . Game will load default background file.", level_id);
- }
- else
- {
- gEngfuncs.Con_Printf( "The file background%s.txt found ! Game will load specified background file.", level_id);
- vector<string> lines;
- string line;
- while (getline(infile, line))
- {
- lines.push_back(line);
- }
- infile.close();
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement