mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	- vcmibuilder will correctly install campaign video
This commit is contained in:
		| @@ -627,7 +627,10 @@ bool CVideoPlayer::open(std::string fname, bool loop, bool useOverlay) | ||||
| 	ResourceID resource(std::string("Video/") + fname, EResType::VIDEO); | ||||
|  | ||||
| 	if (!CResourceHandler::get()->existsResource(resource)) | ||||
| 	{ | ||||
| 		tlog0 << "Error: video " << resource.getName() << " was not found\n"; | ||||
| 		return false; | ||||
| 	} | ||||
|  | ||||
| 	data = CResourceHandler::get()->load(resource); | ||||
|  | ||||
|   | ||||
| @@ -3734,7 +3734,7 @@ void CTavernWindow::show(SDL_Surface * to) | ||||
| 			boost::algorithm::replace_first(recruit->hoverTexts[0],"%s",sel->h->type->heroClass->name); | ||||
| 		} | ||||
|  | ||||
| 		printAtMiddleWBLoc(sel->descr, 146, 389, FONT_SMALL, 200, Colors::WHITE, to); | ||||
| 		printAtMiddleWBLoc(sel->descr, 146, 395, FONT_SMALL, 200, Colors::WHITE, to); | ||||
| 		CSDL_Ext::drawBorder(to,sel->pos.x-2,sel->pos.y-2,sel->pos.w+4,sel->pos.h+4,int3(247,223,123)); | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -1217,14 +1217,16 @@ void CTextContainer::blitLine(SDL_Surface *to, Point where, std::string what) | ||||
| { | ||||
| 	const IFont * f = graphics->fonts[font]; | ||||
|  | ||||
| 	auto renderer = &IFont::renderTextLeft; | ||||
|  | ||||
| 	switch (alignment) | ||||
| 	if (alignment == CENTER) | ||||
| 	{ | ||||
| 	break; case TOPLEFT:     renderer = &IFont::renderTextLeft; | ||||
| 	break; case CENTER:      renderer = &IFont::renderTextCenter; | ||||
| 	break; case BOTTOMRIGHT: renderer = &IFont::renderTextRight; | ||||
| 	break; default: assert(0); | ||||
| 		where.x -= f->getStringWidth(what) / 2; | ||||
| 		where.y -= f->getLineHeight() / 2; | ||||
| 	} | ||||
|  | ||||
| 	if (alignment == BOTTOMRIGHT) | ||||
| 	{ | ||||
| 		where.x -= f->getStringWidth(what); | ||||
| 		where.y -= f->getLineHeight(); | ||||
| 	} | ||||
|  | ||||
| 	size_t begin = 0; | ||||
| @@ -1238,12 +1240,14 @@ void CTextContainer::blitLine(SDL_Surface *to, Point where, std::string what) | ||||
| 		if (begin != end) | ||||
| 		{ | ||||
| 			std::string toPrint = what.substr(begin, end-1); | ||||
|  | ||||
| 			if (currDelimeter % 2) // Enclosed in {} text - set to yellow | ||||
| 				(graphics->fonts[font]->*renderer)(to, toPrint, Colors::YELLOW, where); | ||||
| 				f->renderTextLeft(to, toPrint, Colors::YELLOW, where); | ||||
| 			else // Non-enclosed text | ||||
| 				(graphics->fonts[font]->*renderer)(to, toPrint, color, where); | ||||
| 				f->renderTextLeft(to, toPrint, color, where); | ||||
| 			begin = end; | ||||
| 			where.x += f->getStringWidth(toPrint.c_str()); | ||||
|  | ||||
| 			where.x += f->getStringWidth(toPrint); | ||||
| 		} | ||||
| 		currDelimeter++; | ||||
| 	} | ||||
|   | ||||
| @@ -36,6 +36,7 @@ | ||||
| 		"VIDEO/": | ||||
| 		[ | ||||
| 			{"type" : "vid", "path" : "ALL/Data/H3ab_ahd.vid"}, | ||||
| 			{"type" : "vid", "path" : "ALL/Data/Heroes3.vid"}, | ||||
| 			{"type" : "vid", "path" : "ALL/Data/video.vid"}, | ||||
| 			// Location of video files in linux release | ||||
| 			{"type" : "dir",  "path" : "ALL/Data/Video"} | ||||
|   | ||||
| @@ -201,10 +201,10 @@ then | ||||
|  | ||||
| 	if [ -d "$cd2_dir"/heroes3 ] | ||||
| 	then | ||||
| 		cp "$cd2_dir"/heroes3/Data/Heroes3.vid "$dest_dir"/Data/VIDEO.VID | ||||
| 		cp "$cd2_dir"/heroes3/Data/Heroes3.vid "$dest_dir"/Data/Heroes3.vid | ||||
| 		cp "$cd2_dir"/heroes3/Data/Heroes3.snd "$dest_dir"/Data/Heroes3-cd2.snd | ||||
| 	else | ||||
| 		cp "$cd2_dir"/Heroes3/Data/Heroes3.vid "$dest_dir"/Data/VIDEO.VID | ||||
| 		cp "$cd2_dir"/Heroes3/Data/Heroes3.vid "$dest_dir"/Data/Heroes3.vid | ||||
| 		cp "$cd2_dir"/Heroes3/Data/Heroes3.snd "$dest_dir"/Data/Heroes3-cd2.snd | ||||
| 	fi | ||||
| fi | ||||
|   | ||||
		Reference in New Issue
	
	Block a user