lets talk about screen info for the saturn

mrkotfw

Member
well hey guys, what would i use to move a 3d character around?

------

if((data & PER_DGT_KU)==0){

pos_blue_craft[Y]+=toFIXED(eg_max_speed/divide_speed);

}

------

im not sure if thats how it is, but i hope it is. also what are the dimension of

the screen? 320x240, but toFIXED() goes in x.x

if i minus 320-20 it will go right?

if i add 320+20 it will go left?

what about up?

/me is not sure

also its possible to show up a 3d in the background? using what functions? because ng0*(); are for scrolls.
 

mrkotfw

Member
im getting this error trying to #include something

WIERD!!!! this file is in the same dir, correct filename.... ???

#include "sgl.h"

#include "blue_craft.mdl"

C:\SS\SATURN\SGL>make

gcc -m2 -L../lib -Xlinker -T./common/sl.lnk -Xlinker -Map -Xlinker sl.map -Xlink

er -e -Xlinker ___Start -nostartfiles common/cinit.o ../lib/sglarea.o main.o -ls

gl -o sl.coff

main.o: In function `ss_main':

main.c:37: undefined reference to `xpdata_cyl2'

make.exe: *** [sl.coff] Error 1
 

mrkotfw

Member
well fixed the missing file, how about moving something left or right? i now know pos

[*] will position it, ang will twist it but how would i move left i look at the examples and i dont see anything, no clues or hints... can anyone show me a good nice example ?
 

Djidjo

New Member
x gets bigger -> move right

y gets bigger -> move down

z gets bigger -> move "deeper"

The (0,0) point seems to be in the center of screen, though in the doc they say it's the upper left corner.

So maybe you don't see anything because 320 is outside the screen (it should be -160 < x < 160)

But when you change the camera, it might change all coordinates... vreuzon must know more about it.

Hope this helps

Djidjo
 

vreuzon

New Member
There is no direct relation between the coordinates on the screen and the FIXED x,y,z position. The default seems to be like djidjo wrote.

There are simple examples coming with the sgl (see the rotating cube example, described in the sgl tutorial). Read the tutorial first.
 

antime

Extra Hard Mid Boss
There usually is no relation between screen coordinates and 3D space coordinates, there is a separate step (perspective projection) that does the transformation.
 
Top