Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,079 changes: 8,079 additions & 0 deletions datafiles/3d.obj

Large diffs are not rendered by default.

Binary file modified fonts/f_hires/f_hires.old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
337 changes: 135 additions & 202 deletions fonts/f_hires/f_hires.old.yy

Large diffs are not rendered by default.

Binary file modified fonts/f_hires/f_hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
203 changes: 100 additions & 103 deletions fonts/f_hires/f_hires.yy

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions objects/__obj_stanncam_manager/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ resolution_w = 0;
resolution_h = 0;
number_of_cams = 0;
keep_aspect_ratio = true;
gui_keep_aspect_ratio = true;

resize_width = 0;
resize_height = 0;

__display_scale_x = 1;
__display_scale_y = 1;
draw_zones = false;

__gui_res_w = 1;
__gui_res_h = 1;
2 changes: 1 addition & 1 deletion objects/__obj_stanncam_manager/Draw_76.gml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var _len = array_length(global.stanncams);
for (var i = 0; i < _len; ++i){
if(global.stanncams[i] == -1) continue;
global.stanncams[i].__predraw();
global.stanncams[i].__predraw();
}
1 change: 1 addition & 0 deletions objects/__obj_stanncam_manager/Other_4.gml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ var _len = array_length(global.stanncams);
for (var i = 0; i < _len; ++i){
if(global.stanncams[i] == -1) continue;
global.stanncams[i].__check_viewports();
global.stanncams[i].__zone = noone;
}
__stanncam_update_resolution();
8 changes: 4 additions & 4 deletions objects/__obj_stanncam_manager/__obj_stanncam_manager.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions objects/obj_3d/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/// @description

//camera
stanncam_init(200, 200, 1920, 1080, 300, 300);

cam_3d = new stanncam_3d(global.game_w,global.game_h,true);

cam_2d = new stanncam(0, 0, global.game_w, global.game_h, true, false);

cam_2d.follow = obj_player;



mesh = load_obj("3d.obj");

mouse_x_last = mouse_x;
mouse_y_last = mouse_y;
14 changes: 14 additions & 0 deletions objects/obj_3d/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// @description

gpu_set_ztestenable(true);
gpu_set_zwriteenable(true);

matrix_set(matrix_world,matrix_build(100,100,50,0,0,0,100,100,100));
shader_set(sh_3d)
vertex_submit(mesh,pr_trianglelist,-1);
shader_reset()

matrix_set(matrix_world,matrix_build_identity());

gpu_set_ztestenable(false);
gpu_set_zwriteenable(false);
4 changes: 4 additions & 0 deletions objects/obj_3d/Draw_77.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/// @description
//draw_clear(c_white)
cam_2d.draw(0,0,0.5,0.5);
cam_3d.draw(global.game_w*0.5,0,0.5,0.5);
21 changes: 21 additions & 0 deletions objects/obj_3d/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/// @description

var forward = keyboard_check(ord("S")) - keyboard_check(ord("W"));
var right = keyboard_check(ord("A")) - keyboard_check(ord("D"));
var up = keyboard_check(vk_shift) - keyboard_check(vk_control);

if(forward != 0 || right != 0 || up != 0){
//cam_3d.translate(right,up,forward);
cam_3d.translate_relative(right,forward,up)
}

if(mouse_check_button(mb_left)){
var pitch = mouse_y - mouse_y_last
var yaw = mouse_x - mouse_x_last
show_debug_message($"pitch {pitch} yaw {yaw}")

cam_3d.rotate(-pitch,yaw);
}

mouse_x_last = mouse_x;
mouse_y_last = mouse_y;
38 changes: 38 additions & 0 deletions objects/obj_3d/obj_3d.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion objects/obj_ball/obj_ball.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions objects/obj_camera/Create_0.gml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
//camera
stanncam_init(320, 180, 1920, 1080);
stanncam_init(320, 180, 1280, 720, 640, 360);
cam1 = new stanncam(obj_player.x, obj_player.y, global.game_w, global.game_h, 0, 0);
cam1.follow = obj_player;

cam1.bounds_w = 0;
cam1.bounds_h = 0;

cam2 = undefined;

split_screen = false;
Expand All @@ -19,7 +22,8 @@ speed_mode = 1;

game_res = 2;
gui_hires = false;
gui_res = 0;
gui_res = 1;
gui_hires_scale = 6 //how much bigger the hires font is than the pixel one

resolutions = [
{w:400, h:400}, //1:1
Expand All @@ -30,3 +34,12 @@ resolutions = [
{w:1920, h:1080},
{w:2560, h:1440}
];

gui_resolutions = [
{w:320, h:180}, //16:9
{w:640, h:360},
{w:1280, h:720}
];


stanncam_debug_set_draw_zones(true);
5 changes: 5 additions & 0 deletions objects/obj_camera/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// @description
var _x = cam1.get_mouse_x();
var _y = cam1.get_mouse_y();
//
draw_circle(_x,_y,10,true);
6 changes: 6 additions & 0 deletions objects/obj_camera/Draw_64.gml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,9 @@ if(pointer){
draw_sprite_ext(spr_arrow_small, 0, _arrow_x, _arrow_y, 1, 1, 180, -1, 1);
}
}

var _x = cam1.get_mouse_x();
var _y = cam1.get_mouse_y();
draw_set_color(c_red)
draw_circle(cam1.room_to_gui_x(_x),cam1.room_to_gui_y(_y),15,true);
draw_set_color(c_white)
6 changes: 6 additions & 0 deletions objects/obj_camera/Draw_77.gml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ cam1.draw(0, 0);
if(split_screen){
cam2.draw(global.game_w * 0.5, 0);
}

var _x = cam1.get_mouse_x();
var _y = cam1.get_mouse_y();
draw_set_color(c_green)
draw_circle(cam1.room_to_display_x(_x),cam1.room_to_display_y(_y),18,false);
draw_set_color(c_white)
2 changes: 1 addition & 1 deletion objects/obj_camera/Mouse_60.gml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _zoom_amount = cam1.zoom_amount;
_zoom_amount -= 0.05;
_zoom_amount -= 0.01;
_zoom_amount = clamp(_zoom_amount, 0.1, 2);
cam1.zoom(_zoom_amount, 0);
2 changes: 1 addition & 1 deletion objects/obj_camera/Mouse_61.gml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _zoom_amount = cam1.zoom_amount;
_zoom_amount += 0.05;
_zoom_amount += 0.01;
_zoom_amount = clamp(_zoom_amount, 0.1, 2);
cam1.zoom(_zoom_amount, 0);
39 changes: 23 additions & 16 deletions objects/obj_camera/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ if(keyboard_check_pressed(vk_f5)){
}
}

//toggle hires gui
if(keyboard_check_pressed(vk_alt)){
gui_hires = !gui_hires;
if(gui_hires){
stanncam_set_gui_resolution(1920, 1080);
} else {
stanncam_set_gui_resolution(global.game_w, global.game_h);
}
}

//moves camera to mouse press location
if(mouse_check_button_pressed(mb_left)){
var _x = cam1.get_mouse_x();
Expand All @@ -40,8 +30,8 @@ if(mouse_check_button_pressed(mb_left)){
cam1.move(_x, _y, GAME_SPEED * 1);
alarm[0] = GAME_SPEED * 1.1;
pointer = true;
pointer_x = cam1.get_mouse_x();
pointer_y = cam1.get_mouse_y();
pointer_x = _x;
pointer_y = _y;
}

//toggle zoom in
Expand Down Expand Up @@ -126,10 +116,27 @@ if(keyboard_check_pressed(vk_f1))
//switch gui resolutions
if(keyboard_check_pressed(vk_f2)){
gui_res++
if(gui_res > 6) gui_res = 0;
var _gui_w = resolutions[gui_res].w;
var _gui_h = resolutions[gui_res].h;
stanncam_set_gui_resolution(_gui_w, _gui_h);
if(gui_res >= array_length(gui_resolutions)) gui_res = 0;
var _gui_w = gui_resolutions[gui_res].w;
var _gui_h = gui_resolutions[gui_res].h;
if(gui_hires){
stanncam_set_gui_resolution(_gui_w*gui_hires_scale, _gui_h*gui_hires_scale);
} else {
stanncam_set_gui_resolution(_gui_w, _gui_h);
}
}

//toggle hires gui
if(keyboard_check_pressed(vk_alt)){
gui_hires = !gui_hires;

var _gui_w = gui_resolutions[gui_res].w;
var _gui_h = gui_resolutions[gui_res].h;
if(gui_hires){
stanncam_set_gui_resolution(_gui_w*gui_hires_scale, _gui_h*gui_hires_scale);
} else {
stanncam_set_gui_resolution(_gui_w, _gui_h);
}
}

//toggle keep aspect ratio
Expand Down
15 changes: 8 additions & 7 deletions objects/obj_camera/obj_camera.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions objects/obj_camera_pixel_grid/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ zoom_mode = 0;
zoom_text = cam1.zoom_amount

game_res = 0;

resolutions = [
{w:400, h:400}, //1:1
{w:500, h:250}, //2:1
Expand Down
13 changes: 13 additions & 0 deletions objects/obj_camera_pixel_grid/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/// @description
var dx = cam1.get_mouse_x();
var dy = cam1.get_mouse_y();



draw_set_color(c_red)
//var mx = (window_mouse_get_x() / stanncam_get_res_scale_x())-1;
//var my = (window_mouse_get_y() / stanncam_get_res_scale_y())-1;

draw_point(dx,dy);

draw_set_color(c_white)
17 changes: 17 additions & 0 deletions objects/obj_camera_pixel_grid/Draw_64.gml
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
//draw circle over cursor pos

var dx = cam1.get_mouse_x();
var dy = cam1.get_mouse_y();
var size = 10;

dx = cam1.room_to_gui_x(dx);
dy = cam1.room_to_gui_y(dy);

draw_line(dx - size, dy, dx + size, dy);
draw_line(dx, dy - size, dx, dy + size);

//draw_circle(cam1.room_to_gui_x(dx),cam1.room_to_gui_y(dy),15,true);




var _outline_width = 1;
var _precision = 8;
var _offset = 10;
Expand Down
6 changes: 5 additions & 1 deletion objects/obj_camera_pixel_grid/Draw_77.gml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
cam1.draw(0, 0);
cam1.draw(0, 0);

var dx = cam1.room_to_display_x(cam1.get_mouse_x());
var dy = cam1.room_to_display_y(cam1.get_mouse_y());
draw_circle(dx,dy,10,false)
13 changes: 7 additions & 6 deletions objects/obj_camera_pixel_grid/obj_camera_pixel_grid.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion objects/obj_camera_sidescroller/Draw_77.gml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ if(!split_screen){

cam2.draw_special(parralax_bg2, global.game_w * 0.5, 0, _width * 0.5, _height, _scalex, _scaley);
cam2.draw(global.game_w * 0.5, 0);
}
}
Loading