FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A few bugs and questions

 
Post new topic   This topic is locked: you cannot edit posts or make replies.     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
Krendil



Joined: 13 Oct 2010
Posts: 1

PostPosted: Wed Oct 13, 2010 1:04 am    Post subject: A few bugs and questions Reply with quote

Hi, I just started using arc2-alpha, and I've found a couple little problems (You may have fixed already, but here they are anyway)

In graphics/draw.d lines 49-59, x and y are cast to int about half the time, and left alone the other half. This causes problems when you try and call the function with x and y as floats or doubles.
I don't know why they are being cast in the first place, but they should either all become ints or all left alone.

In math/vector2d.d, opAssign is overloaded for int[2u], but this prevents vectors being assigned to other vectors. I think this might be difference between D1 and D2.
I tried adding another opAssign function for vectors, and that seemed to work.

In math/rect.d lines 55 to 83, the compiler gives an error along the lines of "function is declared nothrow yet may throw". Apparently a lot more things throw exceptions in D2, including memory allocations.
I can't see anything in there that might throw an exception, unless it doesn't like the @property attributes or mixins.

This isn't a bug in arclib, but I just thought I'd point out that dsss/rebuild has a bug where files with @property in them (like vector2d) aren't imported or processed properly, causing linker errors.
You can get around this by importing them from one of the files you give to rebuild. Bug report here.

Also, are there any plans to add a function that only draws part of a texture? Or creating a texture that is a reference to a subsection of another texture? Either of these would be useful for implementing spritesheets.

Anyway, this looks like a great, useful project. Keep up the good work.
Back to top
View user's profile Send private message Send e-mail
SirAlaran



Joined: 19 Feb 2007
Posts: 84
Location: Silicon Valley

PostPosted: Wed Oct 13, 2010 9:37 pm    Post subject: Reply with quote

The arc2-alpha branch is a place I check in code in case my computer explodes. It's not really intended for widespread use yet.

There's already a thread for review of the alpha code, so I'm going to lock this thread and reply to your post there. (Whoever installed phpbb didn't install the "merge threads" feature...)
_________________
Current projects: Project Fermitas, Arctographer tile map editor, Arclib game library.
Gentoo | Textadept
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.     Forum Index -> ArcLib All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group