Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
4 changes: 2 additions & 2 deletions objects/__obj_stanncam_manager/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ __display_scale_y = 1;

__switching_window_mode = false;

draw_zones = false;

__gui_res_w = 1;
__gui_res_h = 1;
__gui_x_scale = 1;
__gui_y_scale = 1;

draw_zones = false;
15 changes: 14 additions & 1 deletion objects/__obj_stanncam_manager/Other_4.gml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,23 @@ for (var i = 0; i < _len; ++i){
var _cam = global.stanncams[i];
if(_cam == -1) continue;
_cam.__check_viewports();
_cam.__step();

_cam.__zone_lists_max = 4;
_cam.__zone_lists = [noone];
_cam.__zone_lists_strength = [1];

//if following something, snap the camera to it on room start
if(instance_exists(_cam.follow)){
if(STANNCAM_CONFIG_SNAP_TO_FOLLOW_ON_ROOM_START && instance_exists(_cam.follow)){
_cam.move(_cam.follow.x, _cam.follow.y, 0);

if(STANNCAM_CONFIG_SNAP_TO_ZONE_ON_ROOM_START){
var _list_strength_length = array_length(_cam.__zone_lists_strength);
if (_list_strength_length > 0){
_cam.__zone_lists_strength[_list_strength_length-1] = 1;
}
}

}
}

Expand Down
2 changes: 1 addition & 1 deletion objects/obj_camera/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ gui_resolutions = [
{w:1280, h:720},
];

stanncam_debug_set_draw_zones(true);
stanncam_debug_set_draw_zones(true);
4 changes: 2 additions & 2 deletions objects/obj_camera/Draw_64.gml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ if(cam1.out_of_bounds(obj_player.x, obj_player.y, 8)){
}
} else {
//draws pointer over players head
var _arrow_x = cam1.room_to_gui_x(obj_player.x);
var _arrow_y = cam1.room_to_gui_y(obj_player.y);
var _arrow_x = cam1.room_to_gui_x(round(obj_player.x));
var _arrow_y = cam1.room_to_gui_y(round(obj_player.y));
if(gui_hires){
draw_sprite_ext(spr_arrow, 1, _arrow_x, _arrow_y - 64, 0.5, 0.5, 180, -1, 1);
} else {
Expand Down
2 changes: 0 additions & 2 deletions objects/obj_camera_sidescroller/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ gui_hires_scale = 6; //how much bigger the hires font is than the pixel one

lookahead = false;

draw_zones = false;

surface = -1;


Expand Down
2 changes: 1 addition & 1 deletion objects/obj_camera_sidescroller/Draw_64.gml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ draw_text_outline(1, _offset * 6, "[SHIFT] " + _debug, _outline_width, _precisio
draw_text_outline(1, _offset * 7, "[F] camera shake", _outline_width, _precision);
draw_text_outline(1, _offset * 8, "[P] toggle camera paused: " + (cam1.get_paused() ? "ON" : "OFF"), _outline_width, _precision);
draw_text_outline(1, _offset * 9, "[Tab] camera speed " + string(cam1.spd), _outline_width, _precision);
draw_text_outline(1, _offset * 10, "[Z] toggle showing camera zones: " + (draw_zones ? "ON" : "OFF"), _outline_width, _precision);
draw_text_outline(1, _offset * 10, "[Z] toggle showing camera zones: " + (__obj_stanncam_manager.draw_zones ? "ON" : "OFF"), _outline_width, _precision);
draw_text_outline(1, _offset * 11, "[1 & 2 & 3] to switch between example rooms", _outline_width, _precision);

//draw current resolution text
Expand Down
3 changes: 1 addition & 2 deletions objects/obj_camera_sidescroller/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ if(keyboard_check_pressed(ord("P"))){

//toggle drawing camera zones
if(keyboard_check_pressed(ord("Z"))){
draw_zones = !draw_zones;
stanncam_debug_set_draw_zones(draw_zones);
stanncam_debug_set_draw_zones(!__obj_stanncam_manager.draw_zones);
}

//switch resolutions
Expand Down
2 changes: 1 addition & 1 deletion objects/obj_player/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
hspd = 0;
vspd = 0;

spd = 1.5;
spd = 1.172;

anim_spd = sprite_get_speed(spr_player_moving);

Expand Down
2 changes: 1 addition & 1 deletion objects/obj_player_sidescroller/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ hinput = 0;
hspd = 0;
vspd = 0;
acc = 0.4;
top_spd = 6;
top_spd = 3.07; //arbitrary decimal number to check non integer tracking

grounded = false;
jump_count = 0;
Expand Down
2 changes: 1 addition & 1 deletion objects/obj_stanncam_zone/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ included_zones = [];
if(instance_exists(included_zone1)) array_push(included_zones, included_zone1);
if(instance_exists(included_zone2)) array_push(included_zones, included_zone2);
if(instance_exists(included_zone3)) array_push(included_zones, included_zone3);
if(instance_exists(included_zone4)) array_push(included_zones, included_zone4);
if(instance_exists(included_zone4)) array_push(included_zones, included_zone4);
10 changes: 8 additions & 2 deletions objects/obj_stanncam_zone/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
if(__obj_stanncam_manager.draw_zones){
draw_self();
if(STANNCAM_CONFIG_DRAW_CAMERA_ZONES){
if(active){
draw_self();
} else {
image_alpha = 0.2;
draw_self();
image_alpha = 1;
}
}
10 changes: 6 additions & 4 deletions objects/obj_stanncam_zone/obj_stanncam_zone.yy

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

3 changes: 2 additions & 1 deletion options/windows/options_windows.yy

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

6 changes: 3 additions & 3 deletions rooms/rm_test/rm_test.yy

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

Loading