-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the hint implementation missing? #3
Comments
the open-adventure source tree starts from some horrible f2c version where /* CHECK IF THIS LOC IS ELIGIBLE FOR ANY HINTS. IF BEEN HERE LONG ENOUGH,
* BRANCH TO HELP SECTION (ON LATER PAGE). HINTS ALL COME BACK HERE EVENTUALLY
* TO FINISH THE LOOP. IGNORE "HINTS" < 4 (SPECIAL STUFF, SEE DATABASE NOTES).
*/
L2600: if(COND[LOC] < CONDS) goto L2603;
/* 2602 */ for (HINT=1; HINT<=HNTMAX; HINT++) {
if(HINTED[HINT]) goto L2602;
if(!CNDBIT(LOC,HINT+10))HINTLC[HINT]= -1;
HINTLC[HINT]=HINTLC[HINT]+1;
if(HINTLC[HINT] >= HINTS[HINT][1]) goto L40000;
L2602: /*etc*/ ;
} /* end loop */
...
/* HINTS */
/* COME HERE IF HE'S BEEN LONG ENOUGH AT REQUIRED LOC(S) FOR SOME UNUSED HINT.
* HINT NUMBER IS IN VARIABLE "HINT". BRANCH TO QUICK TEST FOR ADDITIONAL
* CONDITIONS, THEN COME BACK TO DO NEAT STUFF. GOTO 40010 IF CONDITIONS ARE
* MET AND WE WANT TO OFFER THE HINT. GOTO 40020 TO CLEAR HINTLC BACK TO ZERO,
* 40030 TO TAKE NO ACTION YET. */
L40000: switch (HINT-1) { case 0: goto L40100; case 1: goto L40200; case 2: goto
L40300; case 3: goto L40400; case 4: goto L40500; case 5: goto
L40600; case 6: goto L40700; case 7: goto L40800; case 8: goto
L40900; case 9: goto L41000; }
/* CAVE BIRD SNAKE MAZE DARK WITT URN WOODS OGRE
* JADE */
BUG(27);
L40010: HINTLC[HINT]=0;
if(!YES(HINTS[HINT][3],0,54)) goto L2602;
SETPRM(1,HINTS[HINT][2],HINTS[HINT][2]);
RSPEAK(261);
HINTED[HINT]=YES(175,HINTS[HINT][4],54);
if(HINTED[HINT] && LIMIT > 30)LIMIT=LIMIT+30*HINTS[HINT][2];
L40020: HINTLC[HINT]=0;
L40030: goto L2602;
/* NOW FOR THE QUICK TESTS. SEE DATABASE DESCRIPTION FOR ONE-LINE NOTES. */
L40100: if(PROP[GRATE] == 0 && !HERE(KEYS)) goto L40010;
goto L40020;
L40200: if(PLACE[BIRD] == LOC && TOTING(ROD) && OLDOBJ == BIRD) goto L40010;
goto L40030;
L40300: if(HERE(SNAKE) && !HERE(BIRD)) goto L40010;
goto L40020;
L40400: if(ATLOC[LOC] == 0 && ATLOC[OLDLOC] == 0 && ATLOC[OLDLC2] == 0 && HOLDNG >
1) goto L40010;
goto L40020;
L40500: if(PROP[EMRALD] != -1 && PROP[PYRAM] == -1) goto L40010;
goto L40020;
L40600: goto L40010;
L40700: if(DFLAG == 0) goto L40010;
goto L40020;
L40800: if(ATLOC[LOC] == 0 && ATLOC[OLDLOC] == 0 && ATLOC[OLDLC2] == 0) goto
L40010;
goto L40030;
L40900: I=ATDWRF(LOC);
if(I < 0) goto L40020;
if(HERE(OGRE) && I == 0) goto L40010;
goto L40030;
L41000: if(TALLY == 1 && PROP[JADE] < 0) goto L40010;
goto L40020; |
First of all, sorry for the late response! Yes, I'd be very interested in the hint feature 😃 Did not even know this existed 🤯 Do you have any more information about this or relevant pointers to it on the Internet? |
yes, the f2c link and source above were the earliest ref I found. Your code base already includes the messages and #define's for hints (e.g. search for hint), it seems to just be missing a I resurrected it in my forth version like this https://github.com/patricksurry/advent-forth/blob/main/src/hints.fs |
I've been having fun porting this to a 6502 forth and noticed that altho
advent.h
defines the HINTx conditions these don't seem to be referenced in the code. The hint messages are present inadvent4.h
(e.g. #63) but I can't find any equivalent of thecheckhints
routine from the open-adventure code.also
doc/advent.txt
mentions the feature, but maybe disappeared again later?I'd be happy to try and restore if you have any traces of the original code.
The text was updated successfully, but these errors were encountered: