Jump to content

dontpanic II

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by dontpanic II

  1. If anyone wants to try it out but doesnt have the compilers, you can edit in your cache and post the new code here and i'll compile it for you.
  2. This is one of my first NDS programs. If you have a NDS and a flashCart, try out this program. NOTE: since you put the caches in the sourcecode, you must be able to compile it too. You need devkitpro and PALib to compile it. #include <PA9.h> typedef struct Cache{ char * name; char * id; char * difficulty; char * terrain; char * location; char * size; char * description; char * hint; } Cache; // SETUP BEGIN #define numberOfCaches 2 Cache caches[numberOfCaches]; void inputCaches(){ caches[0].name="Holcomb Creek Trestle View"; caches[0].id="GCTDGK"; caches[0].difficulty="1.5"; caches[0].terrain="1.5"; caches[0].location="N 45° 35.998 W 122° 53.895"; caches[0].size="regular"; caches[0].description="Pretty easy cache, come see the Holcomb Creek Trestle.Some info/history on the Holcomb Creek Trestle: It's about 60' tall and 1100' long. Built around 1911 as part of a line intended to connect Portland (through Cornelius Pass) to Hillsboro, Banks, Vernonia, and Tillamook. The Cornelius Pass tunnel (4100' long) and several large trestles like this one took several years to complete. The United Branch (as it's known) was mostly used for lumber as it still is today. Feel free to add your own notes on the history if you have any, as I'm still new to the area and info on this was hard to come by. Side note: The pool of water nearby is called Mullerleile Pond and unfortunately it's on private property (signs everywhere). There are some kiddie goodies to start off the cache. Enjoy! Congratulations to Geo.Otter for FTF!"; caches[0].hint="not wet"; caches[1].name="Reminders of a Time Past "; caches[1].id="GCYHM5"; caches[1].difficulty="1.5"; caches[1].terrain="1.5"; caches[1].location="N 45° 33.856 W 122° 55.348"; caches[1].size="regular"; caches[1].description="This is a short, one stage, less than a mile long multi designed to be fun for kids and to remind us of some of the history of this area.This starts at the Five Oaks information kiosk, which some of you have visited before. It’s an interesting place to stop and learn about the history of this area, which has been used as a gathering spot for hundreds of years beginning with Native Americans, then mountain men, settlers, and contemporary businesses. But it’s a crummy place to hide a cache.So I hid a micro here with coordinates to the final cache. I need your help here though. I'm now on my fourth micro. I hid it in a way so that, should a car drive by (as they often do during work hours), you can pretend to be reading the fascinating information on the kiosk. Please be sneaky so passers-by won't wonder what else you may be looking so intently at or for. I don't want them to come back later and make me put a fifth micro out.To reward you for the bother of having to fuss with a micro, the final cache is a nice, big, 11” by 7” by 6” ammo can, disguised to blend in with its surroundings. It’s in a quiet spot that seems, to me, to be a step back in time from the surrounding area.There is an approach road west of the final cache, and one east. The west approach is closer to the Five Oaks pavillion, but if you go down (or leave on) the eastern road, you'll pass by a house that has peacocks that occasionally wander alongside the road. They too seem like something from an earlier time.A lot of people use this spot during weekday lunchtimes for a quiet break or nap. If you come by then, please use stealth-caching techniques. After work hours, the area is almost deserted.If you like the micro and want one of your own, send me a note and I'll tell you where I got it."; caches[1].hint="Micro: Bug, front side, about knee level Cache: Under"; } // SETUP END char * emptyScreen = " "; void clearScreen(int screen){ PA_OutputSimpleText(screen,0,0,emptyScreen); } int stylusTileX(){ return(Stylus.X/8); } int stylusTileY(){ return(Stylus.Y/8); } int dirKeyStep=0; int dirKey(){ int interval=5; dirKeyStep++; if(dirKeyStep<interval){ return(0); } if(Pad.Held.Up){ dirKeyStep=0; return(1); } if(Pad.Held.Right){ dirKeyStep=0; return(2); } if(Pad.Held.Down){ dirKeyStep=0; return(3); } if(Pad.Held.Left){ dirKeyStep=0; return(4); } return(0); } void dispCache(int cacheNumb,bool showHint){ int desScroll=0; bool hintShown=false; int theDir; Cache theCache=caches[cacheNumb]; PA_OutputText(1,0,0,"%s",theCache.name); PA_OutputText(1,0,1,"ID:%s Size:%s",theCache.id,theCache.size); PA_OutputText(1,0,2,"Difficulty:%s Terrain:%s",theCache.difficulty,theCache.terrain); PA_OutputText(1,0,3,"Loc:%s",theCache.location); PA_OutputText(1,0,4,"Press Y for hint"); PA_OutputText(1,0,22,"Scroll description below with\nup/down keys, press X to exit"); while(!Pad.Newpress.X){ PA_WaitForVBL(); if(Pad.Newpress.Y){ if(!hintShown){ PA_OutputText(1,0,4," "); PA_OutputText(1,0,4,"Hint:\n%s",theCache.hint); hintShown=true; } } theDir=dirKey(); if(theDir==1){ if(desScroll>0){ desScroll-=32; } } if(theDir==3){ if(desScroll<strlen(theCache.description+32)){ desScroll+=32; } } clearScreen(0); PA_OutputText(0,0,0,"%s",theCache.description+desScroll); } } int whatCache(){ int i; for(i=0;i<numberOfCaches;i++){ PA_OutputText(0,0,i,"%s",caches[i].name); } int selection=-1; while(!((selection>=0)&&(selection<numberOfCaches))){ PA_WaitForVBL(); if(Stylus.Held){ selection=stylusTileY(); } } return(selection); } void selectAndView(){ int cacheToView=whatCache(); clearScreen(0); dispCache(cacheToView,false); clearScreen(1); clearScreen(0); } int main(void) { PA_Init(); PA_InitVBL(); PA_InitText(0,2); PA_InitText(1,2); inputCaches(); while(1){ PA_WaitForVBL(); selectAndView(); } }
×
×
  • Create New...