예제 #1
0
void NLS::Npc::Draw() {
	NLS::Life::Draw();

	if (!function.empty()) {
		functiontag.Draw(x, y+15);
	}

	cb.Draw(x, y - ((Sprite)currentAnimation.n[currentAnimation.frame]).data->height - 10);

	if (data["info"]["MapleTV"] && (int)data["info"]["MapleTV"] == 1) {
		int32_t mx = x + (int)data["info"]["MapleTVadX"];
		int32_t my = y + (int)data["info"]["MapleTVadY"];

		NLS::Sprite sprite = WZ["UI"]["MapleTV"]["TVmedia"]["1"]["0"];
		my += sprite.data->height;

		if (!hasMapleTVAnim) {
			int32_t ad = rand() % 3;
			hasMapleTVAnim = true;
			mapleTVanim.Set(WZ["UI"]["MapleTV"]["TVmedia"][tostring(ad)]);
		}
		mapleTVanim.Step();

		mapleTVanim.Draw(mx, my, f);

		sprite = WZ["UI"]["MapleTV"]["TVbasic"]["0"];

		my = y + (int)data["info"]["MapleTVmsgY"] + sprite.data->height;
		mx = x + (int16_t)(int)data["info"]["MapleTVmsgX"];
		
		sprite.Draw(mx, my, f);
	}
}
예제 #2
0
파일: Map.cpp 프로젝트: spudgy/NoLifeStory
void NLS::Map::Draw() {
	for (uint32_t i = 0; i < Backgrounds.size(); ++i) {
		Backgrounds[i]->Draw();
	}
	for (uint32_t i = 0; i < Reactor::Reactors.size(); ++i) {
		Reactor::Reactors[i]->Draw();
	}
	for (uint8_t i = 0; i < 8; i++) {
		Layers[i].Draw();
		if (!Login and ThisPlayer->layer == i) {
			ThisPlayer->Draw();
		}
	}
	for (uint32_t i = 0; i < Life::Mobs.size(); ++i) {
		Life::Mobs[i]->Draw();
	}
	for (uint32_t i = 0; i < Life::Npcs.size(); ++i) {
		Life::Npcs[i]->Draw();
	}
	for_each(Players.begin(), Players.end(), [](pair<uint32_t, Player*> p){p.second->Draw();});
	for_each(Portal::begin(), Portal::end(), [](Portal* p){p->Draw();});
	for (uint32_t i = 0; i < Foregrounds.size(); ++i) {
		Foregrounds[i]->Draw();
	}
	DrawClock();
	if(Login) {
		NLS::Sprite frameImg = WZ["UI"]["Login"]["Common"]["frame"];
		frameImg.Draw(View::x+400,View::y+300);
	}
}
예제 #3
0
void NLS::ChatDialog::Draw() {
	npcImg.Step();
	imgTop.Draw(x, y);
	int32_t lines = 7;
	for (int32_t i = 0; i < lines; i++) {
		imgMiddle.Draw(x, y + imgTop.data->height + (i * imgMiddle.data->height));
	}
	imgBottom.Draw(x, y + imgTop.data->height + (lines * imgMiddle.data->height));
	npcImg.Draw(x + 70, y + imgTop.data->height + ((lines * imgMiddle.data->height) / 2) + 40, true);
	NLS::Sprite sprite = WZ["UI"]["UIWindow"]["UtilDlgEx"]["notice"];
	sprite.Draw(x + 170, y + imgTop.data->height);
}