About: Source:NetHack 3.0.0/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 3.0.0. To link to a particular line, write [[NetHack 3.0.0/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 3.0.0/track.c
rdfs:comment
  • Below is the full text to track.c from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.0/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 3.0.0. To link to a particular line, write [[NetHack 3.0.0/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. /* NetHack may be freely redistributed. See license for details. */ 4. /* track.c - version 1.0.2 */ 5. 6. #include "hack.h" 7. 8. #define UTSZ 50 9. 10. coord utrack[UTSZ]; 11. int utcnt = 0; 12. int utpnt = 0; 13. 14. void 15. initrack(){ 16. utcnt = utpnt = 0; 17. } 18. 19. /* add to track */ 20. void 21. settrack(){ 22. if(utcnt < UTSZ) utcnt++; 23. if(utpnt == UTSZ) utpnt = 0; 24. utrack[utpnt].x = u.ux; 25. utrack[utpnt].y = u.uy; 26. utpnt++; 27. } 28. 29. coord * 30. gettrack(x, y) 31. register int x, y; 32. { 33. register int i, cnt, ndist; 34. coord tc; 35. cnt = utcnt; 36. for(i = utpnt-1; cnt--; i--){ 37. if(i == -1) i = UTSZ-1; 38. tc = utrack[i]; 39. ndist = dist2(x,y,tc.x,tc.y); 40. if(ndist < 3) 41. return(ndist ? (coord *)&(utrack[i]) : 0); 42. } 43. return (coord *)0; 44. }
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