About: Source:NetHack 2.2a/track.c   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Below is the full text to track.c from the source code of NetHack 2.2a. To link to a particular line, write [[NetHack 2.2a/track.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code

AttributesValues
rdfs:label
  • Source:NetHack 2.2a/track.c
rdfs:comment
  • Below is the full text to track.c from the source code of NetHack 2.2a. To link to a particular line, write [[NetHack 2.2a/track.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code
dcterms:subject
dbkwik:nethack/pro...iPageUsesTemplate
abstract
  • Below is the full text to track.c from the source code of NetHack 2.2a. To link to a particular line, write [[NetHack 2.2a/track.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* SCCS Id: @(#)track.c 1.4 87/08/08 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /* track.c - version 1.0.2 */ 4. 5. #include "hack.h" 6. 7. #define UTSZ 50 8. 9. coord utrack[UTSZ]; 10. int utcnt = 0; 11. int utpnt = 0; 12. 13. initrack(){ 14. utcnt = utpnt = 0; 15. } 16. 17. /* add to track */ 18. settrack(){ 19. if(utcnt < UTSZ) utcnt++; 20. if(utpnt == UTSZ) utpnt = 0; 21. utrack[utpnt].x = u.ux; 22. utrack[utpnt].y = u.uy; 23. utpnt++; 24. } 25. 26. coord * 27. gettrack(x,y) register x,y; { 28. register int i,cnt,dist; 29. coord tc; 30. cnt = utcnt; 31. for(i = utpnt-1; cnt--; i--){ 32. if(i == -1) i = UTSZ-1; 33. tc = utrack[i]; 34. dist = (x-tc.x)*(x-tc.x) + (y-tc.y)*(y-tc.y); 35. if(dist < 3) 36. return(dist ? &(utrack[i]) : 0); 37. } 38. return(0); 39. }
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software