This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Spyro543
Pages: 1 ... 36 37 [38] 39 40 ... 81
556
« on: January 09, 2012, 06:32:00 pm »
So will these different modes aid in solving levels/puzzles? EDIT: Just saw the screenies. Never mind.
557
« on: January 09, 2012, 06:29:05 pm »
Because we haven't.
Why is my computer running Windows?
558
« on: January 09, 2012, 06:22:20 pm »
NOM!!!
Why do we say 'nom' so much on Omnimaga?
559
« on: January 09, 2012, 03:47:38 pm »
Another Project Update!!! The roles of 7 and 9 have changed: 7 - Ignores everything until the next 7. (Could allow for comments?) 9 - Repeats the command before it once. And a new command has been added: x - quits the program, but not the interpreter. Here's the source: #include <iostream> #include <string> #include <stdlib.h> #include <windows.h> using namespace std; int loopstart = 0; int main() { cout << "Spyrodecimal Interpreter\nBy Spyro543 -- Type 'q' to exit\n------------------------\n"; string prgm; signed int mem = 0; int pos = 0; char data; bool ignore = false; bool repeat = false; while (true) { cout << ">>> "; cin >> prgm; for (int i=0;i < prgm.length();i++) { data = prgm[i]; if (ignore==true) { if (data=='7') { ignore = false; } } else { switch (data) { case '0': Sleep(100); break; case '1': if (prgm[i+1]=='n') cout << mem; else cout << (char)mem; break; case '2': mem++; break; case '3': mem--; break; case '4': char inp; mem = 0; cin >> inp; mem = (int)inp; break; case '5': cout << "\n"; break; case '6': mem = rand() % 256 + 1; break; case '7': ignore = true; break; case '8': mem = 0; break; case '9': if (repeat==false) { i--; repeat = true; } else if (repeat==true) { repeat = false; } break; case 'q': return 0; break; case 'n': break; case 'x': goto end; break; default: break; } } } end: cout << "\nProgram finished.\n"; } }
Attached are the source file and executable.
560
« on: January 09, 2012, 03:22:05 pm »
Haha nice!
Calc version soon?
Maybe, if I can figure out how to get string formatting in TI-BASIC like I did with C++.
561
« on: January 08, 2012, 05:46:11 pm »
I have no friends or family that program. :'(
My dad used to code in BASIC
562
« on: January 08, 2012, 05:33:45 pm »
Project Update: Source Code:
#include <iostream> #include <string> #include <stdlib.h> #include <windows.h> using namespace std; int loopstart = 0; int main() { cout << "Spyrodecimal Interpreter\nBy Spyro543 -- Type 'q' to exit\n------------------------\n"; string prgm; signed int mem = 0; bool loop = false; while (true) { cout << ">>> "; cin >> prgm; for (int i=0;i < prgm.length();i++) { char data = prgm[i]; switch (data) { case '0': Sleep(0.1); break; case '1': if (prgm[i+1]=='n') cout << mem; else cout << (char)mem; break; case '2': mem++; break; case '3': mem--; break; case '4': char inp; mem = 0; cin >> inp; mem = (int)inp; break; case '5': cout << "\n"; break; case '6': mem = rand() % 256 + 1; break; case '7': loop = false; loopstart = i; break; case '8': mem = 0; break; case '9': if (loop==true) { i++; loop = false; } else { i = loopstart; loop = true; } break; case 'q': return 0; break; case 'n': break; default: cout << "\nUnknown command...\n"; } } cout << "\nProgram finished.\n"; } } CPP file and executable attached to this post. I'm still having a little trouble with the 7's and 9's (also, the 7 has to be before the 9).
563
« on: January 08, 2012, 03:48:13 pm »
First off, esolang is short for esoteric programming language. Spyrodecimal is an esolang where all the commands are numbers.
Here are all the commands:
0 - Pauses the program for 1/10 second. 1 - Prints the ASCII equivalent of the number in memory. n - Prints the actual number in memory. 2 - Increases the number in memory. 3 - Decreases the number in memory. 4 - Gets one character of input, and stores it in memory. 5 - Prints a new line. 6 - Generates a random number between 1 and 256 and stores it in memory. 7 - Moves the program reader back for the amount in memory. For example, if 5 is in memory, it will move back 5 spaces. 8 - Erases the memory. 9 - Same as 7, except moves the reader forward instead of backward. q - Quits the interpreter. x - quits the program, but not the interpreter. s - Stores the current memory value into one of six variables (a, b, c, d, e, f). Variables are not affected by 8. Syntax (s<var> example: sa) r - Recalls the value stored into one of six variables (a, b, c, d, e, f) and stores it in memory. Syntax (r<var> example: ra)
I'm currently working on the interpreter (in C++). Any ideas are welcome!
564
« on: January 08, 2012, 03:00:19 pm »
We really don't need grayscale on the crafting menu. If the grayscale was taken out, there may be a possibility of the size being reduced/it running faster.
565
« on: January 08, 2012, 02:54:18 pm »
how about "Undefined Line"? I just thought it up randomly
566
« on: January 05, 2012, 06:30:30 pm »
I know TI-Basic...probly won't be much help.
567
« on: January 05, 2012, 06:22:39 pm »
Oh wow, that looks cool!  I do like that keyboard layout better than the current layout.
568
« on: January 04, 2012, 04:53:19 pm »
SETI@home?
569
« on: January 03, 2012, 03:44:30 pm »
Heh, I do all my pixel art in Paint (and with a trackball mouse  ) too!
Pages: 1 ... 36 37 [38] 39 40 ... 81
|