Home
Start a new game
Explore games
Help
Log in or sign up
Log in
Username
Password (
Forgot it?
)
×
New to Playfic?
Full Name
Email
Username
Password
Password (confirm)
Are you sure about this?
My New Game
by
talentedfool
Played 3,572 times
View game source
(spoilers!)
Download the
.z8 file
Source Code
The Oddhouse" To remove stray punctuation: (- PunctuationStripping(); players_command = 100 + WordCount(); -) To remove quotes: (- Quotestripping(); players_command = 100 + WordCount(); -) To remove apostrophes: (- SingleQuotestripping(); players_command = 100 + WordCount(); -) To remove question marks: (- Questionstripping(); players_command = 100 + WordCount(); -) To remove exclamation points: (- ExclamationStripping(); players_command = 100 + WordCount(); -) To remove periods: (- PeriodStripping(); players_command = 100 + WordCount(); -) To resolve punctuated titles: (- DeTitler(); players_command = 100 + WordCount(); -) Include (- [ Detitler i j buffer_length flag; #ifdef TARGET_ZCODE; buffer_length = buffer->1+(WORDSIZE-1); #endif; #ifdef TARGET_GLULX; buffer_length = (buffer-->0)+(WORDSIZE-1); #endif; for (i = WORDSIZE : i <= buffer_length: i++) { if ((buffer->i) == '.' && (i > WORDSIZE + 1)) { if ((buffer->(i-1)=='r') && (buffer->(i-2)=='m') && ((buffer->(i-3)==' ') || ((i-3) < WORDSIZE))) flag = 1; if ((buffer->(i-1)=='r') && (buffer->(i-2)=='d') && ((buffer->(i-3)==' ') || ((i-3) < WORDSIZE))) flag = 1; if ((buffer->(i-1)=='t') && (buffer->(i-2)=='s') && ((buffer->(i-3)==' ') || ((i-3) < WORDSIZE))) flag = 1; if ((buffer->(i-1)=='s') && (buffer->(i-2)=='r') && (buffer->(i-3)=='m') && ((buffer->(i-4)==' ') || ((i-4) < WORDSIZE))) flag = 1; if ((buffer->(i-1)=='v') && (buffer->(i-2)=='e') && (buffer->(i-3)=='r') && ((buffer->(i-4)==' ') || ((i-4) < WORDSIZE))) flag = 1; if ((buffer->(i-1)=='f') && (buffer->(i-2)=='o') && (buffer->(i-3)=='r') && (buffer->(i-4)=='p') && ((buffer->(i-5)==' ') || ((i-5) < WORDSIZE))) flag = 1; if (flag) buffer->i = ' '; } } VM_Tokenise(buffer, parse); ]; -) Include (- [ KeyPause i; i = VM_KeyChar(); rfalse; ]; [ SPACEPause i; while (i ~= 13 or 31 or 32) { i = VM_KeyChar(); } ]; [ GetKey i; i = VM_KeyChar(); return i; ]; -) To clear the/-- screen: (- VM_ClearScreen(0); -) To clear only the/-- main screen: (- VM_ClearScreen(2); -) To clear only the/-- status line: (- VM_ClearScreen(1); -). To wait for any key: (- KeyPause(); -) To wait for the/-- SPACE key: (- SPACEPause(); -) To decide what number is the chosen letter: (- GetKey() -) To pause the/-- game: say "[paragraph break]Please press SPACE to continue."; wait for the SPACE key; clear the screen. To center (quote - text): (- CenterPrintComplex({quote}); -); To center (quote - text) at the/-- row (depth - a number): (- CenterPrint({quote}, {depth}); -); To stop the/-- game abruptly: (- quit; -) To show the/-- current quotation: (- ClearBoxedText(); -); Include (- #ifndef printed_text; Array printed_text --> 64; #endif; [ CenterPrint str depth i j; font off; i = VM_ScreenWidth(); VM_PrintToBuffer(printed_text, 63, str); j = (i-(printed_text-->0))/2; j = j-1; VM_MoveCursorInStatusLine(depth, j); print (I7_string) str; font on; ]; [ CenterPrintComplex str i j; font off; print "^"; i = VM_ScreenWidth(); VM_PrintToBuffer(printed_text, 63, str); j = (i-(printed_text-->0))/2; spaces j-1; print (I7_string) str; font on; ]; -) To decide what number is screen width: (- VM_ScreenWidth() -); To decide what number is screen height: (- I7ScreenHeight() -); Include (- [ I7ScreenHeight i screen_height; i = 0->32; if (screen_height == 0 or 255) screen_height = 18; screen_height = screen_height - 7; return screen_height; ]; -) To deepen the/-- status line to (depth - a number) rows: (- DeepStatus({depth}); -); To move the/-- cursor to (depth - a number): (- I7VM_MoveCursorInStatusLine({depth}); -) To right align the/-- cursor to (depth - a number): (- RightAlign({depth}); -) Include (- [ DeepStatus depth i screen_width; VM_StatusLineHeight(depth); screen_width = VM_ScreenWidth(); #ifdef TARGET_GLULX; VM_ClearScreen(1); #ifnot; style reverse; for (i=1:i