Fixed 2D drawing errors and upside-down menus

This commit is contained in:
magicalfeyfenny 2021-07-08 00:06:31 -04:00
parent cdce721025
commit afb7ac171a
29 changed files with 37 additions and 21 deletions

3
objects/obj_3Dstuff/Create_0.gml Executable file → Normal file
View File

@ -1,8 +1,7 @@
/// @description start 3D mode
z = 0
d3d_start();
d3d_set_projection(x,y,z,0,0,0,0,0,1);
draw_set_color(c_white);
d3d_set_projection_perspective(0,0,800,600,0);
global.ldmode = 1

2
objects/obj_3Dstuff/Draw_0.gml Executable file → Normal file
View File

@ -1,2 +1,2 @@
d3d_set_projection(obj_3Dstuff.x,obj_3Dstuff.y,obj_3Dstuff.z,obj_3Dstuff.x,obj_3Dstuff.y+100,0,0,0,1)

3
objects/obj_3Dstuff/KeyPress_27.gml Executable file → Normal file
View File

@ -4,6 +4,5 @@ if score > global.hiscore
global.hiscore = score
}
ini_write_real("data","scores",global.hiscore)
d3d_end()
room_goto(rm_start)

0
objects/obj_3Dstuff/obj_3Dstuff.yy Executable file → Normal file
View File

3
objects/obj_HUD/Draw_0.gml Executable file → Normal file
View File

@ -2,6 +2,7 @@
//change to 2D mode
d3d_set_projection_ortho(0,0,800,600,0)
d3d_set_lighting(false)
d3d_set_fog(false, c_white, 600, 3000);
ta = 0
while ta < lives
{
@ -70,4 +71,4 @@ draw_text(900*(600/768),700*(600/768),string_hash_to_newline(fps))
//change back to 3D mode
d3d_set_projection_perspective(0,0,800,600,0)
d3d_set_projection(obj_3Dstuff.x,obj_3Dstuff.y,obj_3Dstuff.z,obj_3Dstuff.x,obj_3Dstuff.y+100,0,0,0,1)

0
objects/obj_HUD/obj_HUD.yy Executable file → Normal file
View File

3
objects/obj_boss/Draw_0.gml Executable file → Normal file
View File

@ -1,5 +1,6 @@
d3d_set_projection_ortho(0,0,800,600,0)
d3d_set_fog(false, c_white, 600, 3000);
draw_self()
d3d_set_projection_perspective(0,0,800,600,0)
d3d_set_projection(obj_3Dstuff.x,obj_3Dstuff.y,obj_3Dstuff.z,obj_3Dstuff.x,obj_3Dstuff.y+100,0,0,0,1)

View File

@ -1,3 +1,7 @@
d3d_set_projection_ortho(0,0,800,600,0)
draw_sprite_ext(bg_titlescreen, 0, 0, 0, 1, 1, 0, c_white, 1);
draw_set_alpha(.5*(fadein/30))
draw_set_color(c_white)
draw_roundrect(20,20,780,560,false)

3
objects/obj_enemybullet_B/Draw_0.gml Executable file → Normal file
View File

@ -1,4 +1,5 @@
d3d_set_projection_ortho(0,0,800,600,0)
d3d_set_fog(false, c_white, 600, 3000);
if global.ldmode = 1
{
image_alpha = .5
@ -13,4 +14,4 @@ image_angle = direction
draw_self()
d3d_set_projection_perspective(0,0,800,600,0)
d3d_set_projection(obj_3Dstuff.x,obj_3Dstuff.y,obj_3Dstuff.z,obj_3Dstuff.x,obj_3Dstuff.y+100,0,0,0,1)

0
objects/obj_enemybullet_B/obj_enemybullet_B.yy Executable file → Normal file
View File

3
objects/obj_enemybullet_D_A/Draw_0.gml Executable file → Normal file
View File

@ -1,4 +1,5 @@
d3d_set_projection_ortho(0,0,800,600,0)
d3d_set_fog(false, c_white, 600, 3000);
if global.ldmode = 0
{
image_alpha = .5
@ -13,4 +14,4 @@ image_angle = direction
draw_self()
d3d_set_projection_perspective(0,0,800,600,0)
d3d_set_projection(obj_3Dstuff.x,obj_3Dstuff.y,obj_3Dstuff.z,obj_3Dstuff.x,obj_3Dstuff.y+100,0,0,0,1)

0
objects/obj_enemybullet_D_A/obj_enemybullet_D_A.yy Executable file → Normal file
View File

5
objects/obj_enemybullet_D_B/Draw_0.gml Executable file → Normal file
View File

@ -1,5 +1,6 @@
d3d_set_projection_ortho(0,0,800,600,0)
if global.ldmode = 1
d3d_set_fog(false, c_white, 600, 3000);
if global.ldmode = 0
{
image_alpha = .5
depth = -8
@ -13,4 +14,4 @@ image_angle = direction
draw_self()
d3d_set_projection_perspective(0,0,800,600,0)
d3d_set_projection(obj_3Dstuff.x,obj_3Dstuff.y,obj_3Dstuff.z,obj_3Dstuff.x,obj_3Dstuff.y+100,0,0,0,1)

0
objects/obj_enemybullet_D_B/obj_enemybullet_D_B.yy Executable file → Normal file
View File

3
objects/obj_enemybullet_L_A/Draw_0.gml Executable file → Normal file
View File

@ -1,4 +1,5 @@
d3d_set_projection_ortho(0,0,800,600,0)
d3d_set_fog(false, c_white, 600, 3000);
if global.ldmode = 1
{
image_alpha = .5
@ -13,4 +14,4 @@ image_angle = direction
draw_self()
d3d_set_projection_perspective(0,0,800,600,0)
d3d_set_projection(obj_3Dstuff.x,obj_3Dstuff.y,obj_3Dstuff.z,obj_3Dstuff.x,obj_3Dstuff.y+100,0,0,0,1)

0
objects/obj_enemybullet_L_A/obj_enemybullet_L_A.yy Executable file → Normal file
View File

3
objects/obj_menu/Create_0.gml Executable file → Normal file
View File

@ -1,4 +1,5 @@
fadein = 0
menuchoice = 0
wait = 0
d3d_start();

6
objects/obj_menu/Draw_0.gml Executable file → Normal file
View File

@ -1,3 +1,7 @@
d3d_set_projection_ortho(0,0,800,600,0)
draw_sprite_ext(bg_titlescreen, 0, 0, 0, 1, 1, 0, c_white, 1);
draw_set_alpha(.5*(fadein/30))
draw_set_color(c_white)
draw_triangle(560-fadein,-1,900-fadein,-1,900-fadein,1999,false)
@ -22,4 +26,4 @@ draw_rectangle(-1,580,801,601,false)
draw_set_color(c_black)
draw_set_font(fn_smaller)
draw_text(10,465*(800/640),string_hash_to_newline("Arrows: select menu item | Z: activate menu item"))

0
objects/obj_menu/obj_menu.yy Executable file → Normal file
View File

3
objects/obj_player/Draw_0.gml Executable file → Normal file
View File

@ -1,4 +1,5 @@
d3d_set_projection_ortho(0,0,800,600,0)
d3d_set_fog(false, c_white, 600, 3000);
draw_self()
draw_set_font(fn_main)
draw_set_halign(fa_right)
@ -7,4 +8,4 @@ draw_set_halign(fa_left)
draw_text(obj_player.x + 10,obj_player.y - 40,string_hash_to_newline("%"))
d3d_set_projection_perspective(0,0,800,600,0)
d3d_set_projection(obj_3Dstuff.x,obj_3Dstuff.y,obj_3Dstuff.z,obj_3Dstuff.x,obj_3Dstuff.y+100,0,0,0,1)

0
objects/obj_player/obj_player.yy Executable file → Normal file
View File

3
objects/obj_shot/Draw_0.gml Executable file → Normal file
View File

@ -1,7 +1,8 @@
d3d_set_projection_ortho(0,0,800,600,0)
d3d_set_fog(false, c_white, 600, 3000);
image_index = global.ldmode
image_angle = direction - 90
draw_self()
d3d_set_projection_perspective(0,0,800,600,0)
d3d_set_projection(obj_3Dstuff.x,obj_3Dstuff.y,obj_3Dstuff.z,obj_3Dstuff.x,obj_3Dstuff.y+100,0,0,0,1)

0
objects/obj_shot/obj_shot.yy Executable file → Normal file
View File

6
objects/obj_tutorial/Draw_0.gml Executable file → Normal file
View File

@ -1,3 +1,7 @@
d3d_set_projection_ortho(0,0,800,600,0)
draw_sprite_ext(bg_titlescreen, 0, 0, 0, 1, 1, 0, c_white, 1);
draw_set_alpha(.5*(fadein/30))
draw_set_color(c_white)
draw_roundrect(20,20,780,560,false)
@ -27,4 +31,4 @@ draw_rectangle(-1,580,801,601,false)
draw_set_color(c_black)
draw_set_font(fn_smaller)
draw_text(10,465*(800/640),string_hash_to_newline("Esc: Back to main menu"))

0
objects/obj_tutorial/obj_tutorial.yy Executable file → Normal file
View File

1
rooms/rm_credits/rm_credits.yy Executable file → Normal file
View File

@ -16,7 +16,6 @@
{"instances":[
{"properties":[],"isDnd":false,"objectId":{"name":"obj_credits","path":"objects/obj_credits/obj_credits.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":0.0,"y":0.0,"resourceVersion":"1.0","name":"inst_76601290","tags":[],"resourceType":"GMRInstance",},
],"visible":true,"depth":0,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Instances_Depth_0","tags":[],"resourceType":"GMRInstanceLayer",},
{"spriteId":{"name":"bg_titlescreen","path":"sprites/bg_titlescreen/bg_titlescreen.yy",},"colour":4294967295,"x":0,"y":0,"htiled":true,"vtiled":true,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":1.0,"animationSpeedType":1,"userdefinedAnimFPS":false,"visible":true,"depth":2147483500,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Background_0_bg_titlescreen","tags":[],"resourceType":"GMRBackgroundLayer",},
{"spriteId":null,"colour":4290822336,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":2147483600,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Colour","tags":[],"resourceType":"GMRBackgroundLayer",},
],
"inheritLayers": false,

1
rooms/rm_start/rm_start.yy Executable file → Normal file
View File

@ -16,7 +16,6 @@
{"instances":[
{"properties":[],"isDnd":false,"objectId":{"name":"obj_menu","path":"objects/obj_menu/obj_menu.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":0.0,"y":0.0,"resourceVersion":"1.0","name":"inst_495D76C1","tags":[],"resourceType":"GMRInstance",},
],"visible":true,"depth":0,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Instances_Depth_0","tags":[],"resourceType":"GMRInstanceLayer",},
{"spriteId":{"name":"bg_titlescreen","path":"sprites/bg_titlescreen/bg_titlescreen.yy",},"colour":4294967295,"x":0,"y":0,"htiled":true,"vtiled":true,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":1.0,"animationSpeedType":1,"userdefinedAnimFPS":false,"visible":true,"depth":2147483500,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Background_0_bg_titlescreen","tags":[],"resourceType":"GMRBackgroundLayer",},
{"spriteId":null,"colour":4290822336,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":2147483600,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Colour","tags":[],"resourceType":"GMRBackgroundLayer",},
],
"inheritLayers": false,

2
rooms/rm_tatata/rm_tatata.yy Executable file → Normal file
View File

@ -31,7 +31,7 @@
{"spriteId":null,"colour":4278190080,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":2147483600,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Colour","tags":[],"resourceType":"GMRBackgroundLayer",},
],
"inheritLayers": false,
"creationCodeFile": "RoomCreationCode.gml",
"creationCodeFile": "${project_dir}/rooms/rm_tatata/RoomCreationCode.gml",
"inheritCode": false,
"instanceCreationOrder": [
{"name":"inst_E850465E","path":"rooms/rm_tatata/rm_tatata.yy",},

1
rooms/rm_tutorial/rm_tutorial.yy Executable file → Normal file
View File

@ -16,7 +16,6 @@
{"instances":[
{"properties":[],"isDnd":false,"objectId":{"name":"obj_tutorial","path":"objects/obj_tutorial/obj_tutorial.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":0.0,"y":0.0,"resourceVersion":"1.0","name":"inst_EC479C9E","tags":[],"resourceType":"GMRInstance",},
],"visible":true,"depth":0,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Instances_Depth_0","tags":[],"resourceType":"GMRInstanceLayer",},
{"spriteId":{"name":"bg_titlescreen","path":"sprites/bg_titlescreen/bg_titlescreen.yy",},"colour":4294967295,"x":0,"y":0,"htiled":true,"vtiled":true,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":1.0,"animationSpeedType":1,"userdefinedAnimFPS":false,"visible":true,"depth":2147483500,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Background_0_bg_titlescreen","tags":[],"resourceType":"GMRBackgroundLayer",},
{"spriteId":null,"colour":4290822336,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":2147483600,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Colour","tags":[],"resourceType":"GMRBackgroundLayer",},
],
"inheritLayers": false,