News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

My Game Engine

Started by Farabi, January 11, 2012, 01:08:10 AM

Previous topic - Next topic

Farabi

http://ompldr.org/vYzZxYg/OGLE.zip

This is the source code I promised, I've rearranged it for you. Free for commercial or not.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

Replace the Camera function with this one


fCameraLook proc uses esi lpcamera:dword

invoke glClearColor,FP4(0.0),FP4(0.0),FP4(0.0),FP4(0.0)
invoke glClear,GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT
invoke glEnable,GL_DEPTH_TEST
invoke glMatrixMode,GL_MODELVIEW;
invoke glLoadIdentity
invoke glColor3f,FP4(1.0),FP4(1.0),FP4(1.0)
invoke gluPerspective,FP8(45.0),FP8(1.33333333333333),FP8(1.0),FP8(1000000000.0)

mov esi,lpcamera
invoke glRotatef,[esi].fCam.Rotation.X,FP4(1.0),FP4(0.0),FP4(0.0)
invoke glRotatef,[esi].fCam.Rotation.Y,FP4(0.0),FP4(1.0),FP4(0.0)
invoke glRotatef,[esi].fCam.Rotation.Z,FP4(0.0),FP4(0.0),FP4(1.0)
invoke glTranslatef,[esi].fCam.Position.X,[esi].fCam.Position.Y,[esi].fCam.Position.Z

ret
fCameraLook endp


In order to make a multiple camera viewing. You'll need this as a lightviews before you can create a shadow texture, but I never done it.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

#3
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

New Source Code. Free for commercial or non commercial, but donating a new laptop that support OpenGL 3.0 is Appreciated  :cheekygreen:



http://omploader.org/vY3ZlMw/ogle.rar
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

jj2007

Tmp_File.asm(28) : Error A2087: Cannot open include file 'gl.inc'
Tmp_File.asm(29) : Error A2087: Cannot open include file 'Glu.inc'
Tmp_File.asm(34) : Error A2087: Cannot open include file 'graphics.inc'
:(

Farabi

Quote from: jj2007 on February 27, 2012, 12:55:56 PM
Tmp_File.asm(28) : Error A2087: Cannot open include file 'gl.inc'
Tmp_File.asm(29) : Error A2087: Cannot open include file 'Glu.inc'
Tmp_File.asm(34) : Error A2087: Cannot open include file 'graphics.inc'
:(

Have a look at "\lib" folder, there is graphic.inc and graphic lib. And for Gl.inc and GLU.inc see my attachment.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

jj2007

Quote from: Farabi on February 27, 2012, 01:40:41 PM
Have a look at "\lib" folder, there is graphic.inc and graphic lib. And for Gl.inc and GLU.inc see my attachment.

There is graphic.lib but not graphic.inc

jj2007

Strange. Maybe it doesn't like the 36 warnings? I had to put a .nolist to make it assemble at all, and it was indeed incredibly slow for project with only 28k of asm code. Usually, JWasm is a factor 2-3 faster than ml.exe :eek

physicEngine.inc(80) : Warning A4184: ..
newton.dll.inc(11) : Warning A4184: ..
scene.inc(47) : Warning A4184: ..
Tmp_File.asm(93) : Warning A4184: ..

Farabi

Here is the file.

JWASM compilation is slew on you too right? I think how to solve it simple. Create another new parser using hash table or dont multicheck the function code so each function need a proto definition first, that is too bad, I like JWASM because it doesnot need to create a proto first, save time typing.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

For those who interested about progress of my study on Graphic, I updated the source code and create a simple triangle mesh collision detect

http://ompldr.org/vZDl6cQ/ogle.rar (9,8 MBytes)
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi



I really love to show it.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"