All pastes #570472 Raw Edit

Something

public text v1 · immutable
·published 2007-06-16 18:45 UTC
rendered paste body
/***************************************************************************
 *            ending.cc
 *
 *  Sat Jun 16 20:20:48 2007
 *  Copyright  2007  Darryl LeCount
 *  darryl@jamyskis.net
 ****************************************************************************/

/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
#include <allegro.h>
#include "include/declare.h"

#ifdef ALLEGRO_LINUX
#include "config.h"

#endif

#ifndef ALLEGRO_LINUX
#include "../include/declare.h"
#endif

extern bool game_active;
extern FONT *gamefont;
DUH *endingsong;
AL_DUH_PLAYER *endingsongplayer;

using namespace std;

void game_ending()
{
	string endinglines[7] ={
	"THE WAR IS OVER. THE ALIENS WERE SENT BACK",
	"TO WHENCE THEY CAME. THE EVIL INVADERS WERE",
	"SENT BACK TO THEIR PUNY HOMEWORLD WITH THEIR",
	"TAILS BETWEEN THEIR LEGS.",
	"",
	"AND THUSLY SPAKE THE PEOPLE OF EARTH:",
	"""WE KICKED YO ASS, MOTHERS!""",
	};
	
	// Load and start ending song
	
	endingsong=dumb_load_mod_quick("./data/endsong.mod");
	
	#ifdef ALLEGRO_LINUX
	if(!endingsong)
	{
		endingsong=dumb_load_mod_quick(ENDING_SONG);
	}
	#endif
		
	if(!endingsong)
	{
		cout << "Could not load end song";
		allegro_exit();
		abort();
	}
	
	endingsongplayer=al_start_duh(endingsong,2,0,1.0f,
		get_config_int("sound", "buffer_size", 4096),
		get_config_int("sound", "sound_freq", 22500));
	
	// Display ending lines
	
	for(int lines=0; lines<7; lines++)
	{
		//type_a_line(endinglines[lines]);
	}
	
};

void type_a_line(string line_to_type)
{
	//int length = strlen(line_to_type);
}