Path: chuka.playstation.co.uk!news From: Toby Hutton Newsgroups: scee.yaroze.beginners,scee.yaroze.programming.codewarrior,scee.yaroze.programming.2d_graphics Subject: Re: Still strugglin' with the basics: broken sprite code (long) Date: 17 Jul 1998 10:35:38 +1000 Organization: PlayStation Net Yaroze (SCEE) Lines: 22 Sender: thutton@TECH10 Message-ID: References: <35AC71D4.AA79EB4A@easynet.co.uk> <35AD10B6.153EE9C5@compuserve.com> <35AD2E8E.DEF2C169@nospam.easynet.co.uk> <35ADFF08.A310D245@easynet.co.uk> <35AE05C6.489D09F9@scee.sony.co.uk> NNTP-Posting-Host: 203.103.154.235 X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: chuka.playstation.co.uk scee.yaroze.beginners:423 scee.yaroze.programming.codewarrior:306 scee.yaroze.programming.2d_graphics:447 James Russell writes: > > Philip Gooch wrote: > > > > Does the GsOT_TAG structure count as an enormous data structure? > > Generally, yes. > > > Is that why in this case it needed to be global (or static)? > > No. The reason it must be defined outside a function (or static) is because the GPU will be reading > it (so it can draw the screen) while the CPU is off Doing Other Things. If GsOT_TAG was defined > locally (and not static), its contents would be valid only for the 'life' of the function (the time > spent inside the function) it is contained in. Ok. Hrmm. I had my OT defined locally in main() originally, crashed, made it static, everything worked. So the 'life' of the variable had nothing to do with it - I assumed it must've been too big. I'm right in my case, aren't I? -- Toby.