LiEnby / chovy-gm

At long last. GameMaker 8.1 to PSP!
GNU Lesser General Public License v2.1
42 stars 4 forks source link

White textures with drawing triangles #16

Open EGAMatsu opened 4 years ago

EGAMatsu commented 4 years ago

With Snidr's mode 7 and a modded version of the engine, textures are white image

EGAMatsu commented 4 years ago

image on pc

LiEnby commented 4 years ago

I'm amazed you got d3d to work at all. Lol

EGAMatsu commented 4 years ago

I'm amazed you got d3d to work at all. Lol

its not d3d

EGAMatsu commented 4 years ago

fpslt_draw_wall(x1,y1,z1,x2,y2,z2,color,alpha,outlinecolor,outlinealpha)
Draws a wall. Compatible with lite.

Script made by TheSnidr
http://thesnidr.blog.com/
*/

/////////////////////////////////////////////////////////
//Initiate variables
var dist;
dist=fps_get_distance(argument0,argument1)
if dist>fps_cam_maxdist{exit}
var dir,xx1,y1,xx2,y2;
dir=fps_get_direction(argument0,argument1)
fps_get_xy(dir,dist)
xx1=fps_xx
y1=fps_yy
fps_get_xy2(argument3,argument4)
xx2=fps_xx
y2=fps_yy

/////////////////////////////////////////////////////////
//If the wall is drawing in a position it shouldn't, exit
if y1>-fps_cam_mindist and y2>-fps_cam_mindist{exit}
var view;
if y1>0 and y2>0{view=view_wview/4 if (xx1<view*3 and xx2>view) or (xx1>view and xx2<view*3){exit;}}

var zz1,ver1,zz2,ver2,yy1,yy2,yy3,yy4;

/////////////////////////////////////////////////////////
//Initiate some more variables
zz1=fps_get_z(argument2)
ver1=fps_get_ver(zz1)
zz2=fps_get_z(argument5)
ver2=fps_get_ver(zz2)

yy1=zz1-(y1*ver1)
yy2=zz2-(y1*ver2)
yy3=zz2-(y2*ver2)
yy4=zz1-(y2*ver1)

/////////////////////////////////////////////////////////
//Draw the wall
//wall:
//draw_triangle(xx1,yy1,xx1,yy2,xx2,yy3,false)
//draw_triangle(xx1,yy1,xx2,yy4,xx2,yy3,false)
switch (os_type)
{
case os_win32:
draw_set_color(c_white)
xtex=texture_get_width(sprite_get_texture(Bricks, 0))
ytex=texture_get_height(sprite_get_texture(Bricks, 0))
draw_primitive_begin_texture(pr_trianglestrip, sprite_get_texture(Bricks, 0));
    draw_vertex_texture(xx1,yy1,0,ytex)
    draw_vertex_texture(xx1,yy2,xtex,ytex)
    draw_vertex_texture(xx2,yy4,0,0)
    draw_vertex_texture(xx2,yy3,xtex,0)
draw_primitive_end();
break;
}
//outline:
draw_set_color(argument8)
draw_set_alpha(argument9)
draw_line(xx1,yy1,xx1,yy2)
draw_line(xx2,yy4,xx2,yy3)
draw_line(xx1,yy1,xx2,yy4)
draw_line(xx1,yy2,xx2,yy3)

draw_set_color(c_black)
draw_set_alpha(1)````
EGAMatsu commented 4 years ago

that is the code that draws walls.

LiEnby commented 4 years ago

Possibly sprite_get_texture not implemented on gmpsp?

EGAMatsu commented 4 years ago

Possibly sprite_get_texture not implemented on gmpsp?

have you tried modifying the runners code?

LiEnby commented 4 years ago

You act like I'm some god at MIPS assembly or smth and can decompile it perfectly ... you know i dont really have the code for the runner ..

I have decompile C# code from the GmAssetCompiler but that's about it. Everything after compile-time I cant really do much