Page 1 of 1

Trade in your breakfast

Posted: Wed Feb 18, 2009 3:12 am
by MarauderIIC
Just a lighthearted, windows-dependent toy console program I thought I'd share :) Dunno if anyone remembers the old Dannon Frusion Smoothie commercials.
Used to have the equivalent of this on my calculator (except it actually drew circles and lines :D). Threw this together in like 5 minutes 'cause my fiancee was remembering it, and I've misplaced my graphing calc for the moment.

Code: Select all

#include <iostream>
#include <string>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

using namespace std;

int main() {
	string a =
	"           __________________ \n"; a +=
	"          /   Trade in your  /\n"; a +=
	"         /					\n"; a +=
	"       O						\n"; a +=
	"     ,-|-[]					\n"; a +=
	"    / .|						\n"; a +=
	"     /  \\					\n";

	string b =
	"           __________________	\n"; b +=
	"          /  breakfast for   /	\n"; b +=
	"         /						\n"; b +=
	"    \\  O []					\n"; b +=
	"     `-|-+						\n"; b +=
	"       |.						\n"; b +=
	"      /  \\						\n";

	string c =
	"           __________________	\n"; c +=
	"          /   this Dannon    /	\n"; c +=
	"         /						\n"; c +=
	"       O 						\n"; c +=
	"     ,-|-[]					\n"; c +=
	"    / .|						\n"; c +=
	"     /  \\						\n";

	string d =
	"           __________________	\n"; d +=
	"          / Frusion Smoothie /	\n"; d +=
	"         /						\n"; d +=
	"    \\  O []					\n"; d +=
	"     `-|-+						\n"; d +=
	"       |.						\n"; d +=
	"      /  \\						\n";

	string e =
	"           __________________	\n"; e +=
	"          /                  /	\n"; e +=
	"         /						\n"; e +=
	"       O   					\n"; e +=
	"     --|-[]					\n"; e +=
	"       |						\n"; e +=
	"      / \\						\n";

	string *anim[] = {&a, &b, &c, &d, &e};

	for (size_t i = 0;GetAsyncKeyState(VK_SPACE) == 0;i++) {
		system("cls");
		i %= 5;
		cout << *anim[i];
		Sleep(750);
	}
	return 0;
}

Re: Trade in your breakfast

Posted: Wed Feb 18, 2009 3:43 am
by M_D_K
very nice ascii art 8-)

When I get home I'll port it :lol:
(i'm serious but it is funny)

Re: Trade in your breakfast

Posted: Sun Feb 22, 2009 7:07 pm
by dandymcgee
Lol. Nice work marauder.

Re: Trade in your breakfast

Posted: Sun Feb 22, 2009 8:13 pm
by sparda
Looks tight. I'll have to port it to Mac to see it work.

So is this the almighty ES animation system? :mrgreen:

No wonder Falco didn't want to talk about it!

:lol:

Re: Trade in your breakfast

Posted: Sun Feb 22, 2009 8:49 pm
by ibly31
Oh, marauder! You have a graphing calc? I have a ti84+se. I program it all the time, I made. Pokemom clone in ti basic

Re: Trade in your breakfast

Posted: Tue Feb 24, 2009 4:46 pm
by Kros
ibly31 wrote:Oh, marauder! You have a graphing calc? I have a ti84+se. I program it all the time, I made. Pokemom clone in ti basic
I think its probably safe to assume anyone who has taken Algebra 2 (Math 95?) or higher has a graphing calc :).