Disclaimer:
THIS HAS VERY LITTLE TO DO WITH JAVAX.SWING
None of the code here is mine, and it confuses me...
I have been trying to get back into Java (key word: trying), and have been a, well, moron for jumping back into 3D game design, one of he hardest things I could have picked. I searched around to try and jog my memory, and found this (http://www.instructables.com/id/Making-a-Basic-3D-Engine-in-Java/step4/Calculating-the-Screen/) instructable on instructables.com. On step 4, towards the end, there is some faulty code (I'm using Eclipse Luna, and it may just be for me) and am clueless on how to fix it. Basically, he/she (whoever wrote it) tried to call methods/variables that either cannot be used in the way that is suggested, or simply do not exist. I was going to comment, but the last time he/she replied to any of them was at least 2 years ago. I am not looking for a complete workaround, but maybe a method or technique that would fix the issue.
Here is the offending code (For the full code visit the link above) - NOT MINE
Code:
If you need anything else to fix the problem, please comment/message me. Thanks.
EDIT: Literally like 30 seconds after me posting this, someone asks the same question on the instructable... Dang..
EDIT #2:
Pastebin with the class:
http://pastebin.com/4eF8Ata2
THIS HAS VERY LITTLE TO DO WITH JAVAX.SWING
None of the code here is mine, and it confuses me...
I have been trying to get back into Java (key word: trying), and have been a, well, moron for jumping back into 3D game design, one of he hardest things I could have picked. I searched around to try and jog my memory, and found this (http://www.instructables.com/id/Making-a-Basic-3D-Engine-in-Java/step4/Calculating-the-Screen/) instructable on instructables.com. On step 4, towards the end, there is some faulty code (I'm using Eclipse Luna, and it may just be for me) and am clueless on how to fix it. Basically, he/she (whoever wrote it) tried to call methods/variables that either cannot be used in the way that is suggested, or simply do not exist. I was going to comment, but the last time he/she replied to any of them was at least 2 years ago. I am not looking for a complete workaround, but maybe a method or technique that would fix the issue.
Here is the offending code (For the full code visit the link above) - NOT MINE
Code:
//calculate y coordinate on texture
for(int y=drawStart; y<drawEnd; y++) {
int texY = (((y*2 - height + lineHeight) << 6) / lineHeight) / 2;
int color;
if(side==0) color = textures.get(texNum).pixels[texX + (texY * textures.get(texNum).SIZE)];
else color = (textures.get(texNum).pixels[texX + (texY * textures.get(texNum).SIZE)]>>1) & 8355711;//Make y sides darker
pixels[x + y*(width)] = color;
}
If you need anything else to fix the problem, please comment/message me. Thanks.
EDIT: Literally like 30 seconds after me posting this, someone asks the same question on the instructable... Dang..
EDIT #2:
Pastebin with the class:
http://pastebin.com/4eF8Ata2