(VERY!) Basic Sprite Viewer =========================== by Rikki Prince Finished: 1st April 1999 As every Net Yaroze owner before him, I decided to attempt to write a basic sprite viewer. However, due to my extreme lack of intelligence, I have failed miserably many times. BUT, then came the day, the First of April 1999. The sprite viewer was complete!!.... Anyway, enough with that crap. Basically, what I tried to do was write as little in the main function, and instead have it calling functions I had written to perform the tasks that would have been there normally. Basically, a nice round-up of everything into nice areas. I did this to make it nice and easy in the future, when I want to write a proper game. Well, having written, and rewritten, and mucked about with it all trying to get it to work, I had it all set up how it should work, but it didn't (not suprising really!). Than, after a few posts in the Newsgroups, Derek Da Silva and Peter Dollochan showed me where I was going wrong (loading the TIM in the wrong place), and it was done. Then, I mucked about with the GsDISPENV, and put a boundary checker in, and finito, that's all I could be bothered to do. I suppose I might add rotating abilities, and scaling, but this is what most people have done, so I'll probably leave it and get on with writing games (got a few ideas rattling around in my skull). How To Use ========== D-Pad - Move sprite X - Centralise sprite R1 + D-Pad - Change X and Y of GsDISPENV R1 + X - Reset GsDISPENV Select + Start - Exit viewer To view a different picture, use a graphics program to edit it, save it as BMP or whatever else TIM Util supports, then use TIM Util to convert into TIM, save as Pic.TIM, then load it up. (As it's in PAL mode, make sure you save the TIM's X pos in the VRAM greater than 320.) Only bother using run.bat if your connection is set up for 115200. Finally I've included the source code, coz I'm like that, but also in case anyone wants to check it, or learn anything from it. By the way, anyone can use anything from this if they want, coz I'm not bothered, but e-mail me to tell me you're using it, if you can be bothered. Thanks Rikki netyaroze@rprince.dircon.co.uk http://www.netyaroze-europe.com/~rprince