Xref: utzoo comp.sys.amiga:62643 comp.sys.amiga.games:697 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!daimi!poe From: poe@daimi.aau.dk (Peter rb{k) Newsgroups: comp.sys.amiga,comp.sys.amiga.games Subject: Re: Calling Graphics files from C as sprite data Keywords: amiga Message-ID: <1990Jul27.212151.22962@daimi.aau.dk> Date: 27 Jul 90 21:21:51 GMT References: <1221@surf.sics.bu.oz> Sender: news@daimi.aau.dk Organization: DAIMI: Computer Science Department, Aarhus University, Denmark Lines: 66 goose@surf.sics.bu.oz (Ralph Schwarten) writes: [I wanted to mail this, but the mailer couldn't find the above address] >Could someone help me please with C, sprites(animobs,bobs etc) on the >amiga ? >I come from a UNIX/C enviroment but have always owned an Amiga 1000. >I recently bought some more ram and a hard disk so that I can at last >use my 1000 for something other than playing games. >Can anyone give me some tips or point me in the direction for some good >documentation on calling graphics file data (i.e. dpaint iff files)from There are IFF-ILBM readers on some of the fishdisks, and there's source for one in BASIC amongst the example-programs on the BASIC disk that comes with the Amiga (or at least there was with my A500). It's pretty easy to convert that code to C I think. When the data is loaded into memory it shouldn't be that hard to printf() it to a C-file that you can #include in your program. >C and >converting it into playing field data and sprite, bob, and animob data. >I know that the C struct for a sprite requires that this data be in hex >I have a friend who is a very good artist but not a programmer at all. >He will do the art and hopefully I can call it from the code. Sprite data are stored in a different way than normal bitplanes, with a word for each of the 2 bitplanes just after each other. This is explained in the RKMs Apart from this it should be no problem to read in a 2 bitplane ILBM picture 16x pixels and convert it to spritedata. >We are hopefully going to do a surfing game, if we can't get this >sprite stuff sorted out, we may have to use vectors exclusively.(we >wanted to have a choice of views.. 1) from the beach using sprites and >2) a surfer's eye view using vectors) I know that most commercial games >designers draw up all of their sprites on templates and some how call >them from C. However this game will only be a bit of fun for us and >will be released into the public domain. >All help, contacts, books, code snippets, routines, suggestions will be >greatly appreciated !!! The RKM:Libraries & Devices explain the bobs and animobs pretty well. PS. There might very well be a program that converts ILBMs to C structs on one of the fishdiscs.. Actually on disk 237 there's ilbm.library which provides some of the things you might need. >Thanks in advance >goose@hal.nmg.bu.oz.au >Ralph Schwarten >Dept. Computing and Information Technology. >Bond University >Gold Coast >Australia - Peter (poe@daimi.aau.dk) -- ************************************************************** * "Who other than IBM would want to put a mainframe on * * everybodys desk." * **************************************************************