Advertisement

05.02 - Designing Tetris

Started by July 06, 2001 09:28 AM
23 comments, last by Teej 23 years ago
Commissioner,

Since globals have file scope, extern is used to tell a file to not create a new variable with the same name but use one that''s been declared in another file. From the looks of your code, it doesn''t look like you''ve actually declared myball anywhere. In GameMain() you should just declare your variable with...

ball myball;

Then if you want to use that variable in another file, you would use extern to tell it to use the myball varibable that was declared in GameMain().

Now about the G struct... If you understand how the extern keyword works now I would recommend looking over Teej''s explanation of the G struct in ''Selected C Topics'' if you haven''t already.
Hope this helps
Hi all the boys, esp. Teej,

i got downloaded the older version, where the value of 33 was defined for PLAYAREA_OFFSET_Y for my offline study. I came now to repair it, but it's already fixed I've got just one question, i opened the background picture and find out the coordinate myself, but i thought, it would be better to address the blocks from down to up (as i did with that array), so the question is> is it better to have the top row on the screen as the Field[0] or Field[19] in the program? I think the last one, but i'm asking if anyone's got any arguments pro/contra...
If is anyone interested, so the Y coordinate for the upper left corner of the block in the lower left corner of the play area is 401 (to be well understood- lower left corner of the frame is (240,417))

Btw. Teej, you're the one, that brings really engineers' attitude , and that's in!

Edited by - Moondog on July 18, 2001 2:49:10 PM
"Sweet child in timeyou see the lineline that's strong betweenthe good and bad..." - Deep Purple
Advertisement
Hey,
I can''t seem to get a hold of the basecode3 file neither from Teejs homepage nor Piotyrs ftp. If someone please could make the nessecary files available, I would be eternally gratefull.

// Swede
// Swede
Hey all,

Can''t seem to get a copy of Basecode3, the direct link and the ftp site doesn''t seem to be working correctly. So if someone can provide some assistance it will be much appreciated.

''Q''
check the 00.00 sections, several people have posted the adressess of mirrors there

This topic is closed to new replies.

Advertisement