Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2015-11-07 05:34:38, last edited by SirJosh3917 (2015-11-07 05:42:58)

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

[Question] How can i make this code run faster?

I've been attempting to update my EE Image Editor to 2.0, and yes there will be a lot, such as clicking and moving your mouse around to place.
My main question is what size are the auras? If I have the proper dimensions, I can perhaps graph the aura properly.
Second one is, How can I do this faster?

		private void MousePosChange(object sender, MouseEventArgs e)
		{
			if (CreatedPlayer)
			{
				int x = e.X;
				int y = e.Y;
				while (x % 16 != 0)
				{
					x -= 1;
				}
				while (y % 16 != 0)
				{
					y -= 1;
				}
				y -= 1;
				x -= 1;
				DrawSavedImg();
				DrawSmileAt(x, y, SmileyInUse);
				drawname();
			}
		}

Offline

#2 2015-11-07 05:42:28, last edited by SirJosh3917 (2015-11-07 06:09:57)

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Question] How can i make this code run faster?

EDIT: After using capashas all in one.zip thing in misc\aura, I found the dimensions.
Now i just need help with the following code

EDIT: How do I export an image from JPEXS while keeping transparency? I'm super annoyed.

Offline

#3 2015-11-07 08:59:54

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: [Question] How can i make this code run faster?

well, your while loops are an annoying way of saying

Math.Floor(position/16);

iirc you made this open source. if people really wanted to further the project, it would have happened

and, there you go. referencing functions we don't see. -REP

Offline

hummerz51446883194556002

Board footer

Powered by FluxBB

[ Started around 1732436701.1809 - Generated in 0.038 seconds, 11 queries executed - Memory usage: 1.41 MiB (Peak: 1.52 MiB) ]