About: Source:Hack 1.0/hack.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 hack.track.c from the source code of Hack 1.0. To link to a particular line, write [[Hack 1.0/hack.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:Hack 1.0/hack.track.c
rdfs:comment
  • Below is the full text to hack.track.c from the source code of Hack 1.0. To link to a particular line, write [[Hack 1.0/hack.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 hack.track.c from the source code of Hack 1.0. To link to a particular line, write [[Hack 1.0/hack.track.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */ 2. 3. #include "hack.h" 4. #ifdef TRACK 5. #define UTSZ 50 6. 7. coord utrack[UTSZ]; 8. int utcnt = 0; 9. int utpnt = 0; 10. 11. initrack(){ 12. utcnt = utpnt = 0; 13. } 14. 15. /* add to track */ 16. settrack(){ 17. if(utcnt < UTSZ) utcnt++; 18. if(utpnt == UTSZ) utpnt = 0; 19. utrack[utpnt].x = u.ux; 20. utrack[utpnt].y = u.uy; 21. utpnt++; 22. } 23. 24. coord * 25. gettrack(x,y) register x,y; { 26. register int i,cnt; 27. coord tc; 28. cnt = utcnt; 29. for(i = utpnt-1; cnt--; i--){ 30. if(i == -1) i = UTSZ-1; 31. tc = utrack[i]; 32. if((x-tc.x)*(x-tc.x) + (y-tc.y)*(y-tc.y) < 3) 33. return(&(utrack[i])); 34. } 35. return(0); 36. } 37. #endif TRACK
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