Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.
Moderator: Coders of Rage
MarauderIIC
Respected Programmer
Posts: 3406 Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA
Post
by MarauderIIC » Wed Feb 18, 2009 3:12 am
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;
}
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
M_D_K
Chaos Rift Demigod
Posts: 1087 Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK
Post
by M_D_K » Wed Feb 18, 2009 3:43 am
very nice ascii art
When I get home I'll port it
(i'm serious but it is funny)
Gyro Sheen wrote: you pour their inventory onto my life
IRC wrote:
<sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
dandymcgee
ES Beta Backer
Posts: 4709 Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:
Post
by dandymcgee » Sun Feb 22, 2009 7:07 pm
Lol. Nice work marauder.
Falco Girgis wrote: It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
sparda
Chaos Rift Junior
Posts: 291 Joined: Tue Sep 23, 2008 3:54 pm
Post
by sparda » Sun Feb 22, 2009 8:13 pm
Looks tight. I'll have to port it to Mac to see it work.
So is this the almighty ES animation system?
No wonder Falco didn't want to talk about it!
ibly31
Chaos Rift Junior
Posts: 312 Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.
Post
by ibly31 » Sun Feb 22, 2009 8:49 pm
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
Kros
Chaos Rift Regular
Posts: 136 Joined: Tue Feb 24, 2009 4:01 pm
Current Project: N/A
Favorite Gaming Platforms: PC, Playstation/2/3
Programming Language of Choice: C++
Location: Oregon,USA
Contact:
Post
by Kros » Tue Feb 24, 2009 4:46 pm
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
.
Isaac Asimov wrote: Part of the inhumanity of the computer is that, once it is competently programmed and working smoothly, it is completely honest.
YouTube Channel