|
Allegro TODO |
Thomas Fjellstrom
Member #476
June 2000
|
Want to help Allegro? Don't know where to start? http://wiki.allegro.cc/AllegroTODO I will be happy to mentor anyone needing help working on any of the items in the list. If you are a Dev, please post if you are willing or not willing to help mentor people. Also, if you are a dev, please try and see if the todo there is up to date and accurate. I'm not sure if "Make the library internally thread-safe." is valid anymore, I remember a large amount of work went into that not too long ago. -- |
GullRaDriel
Member #3,861
September 2003
|
That is a good idea ! Todo said: Make (at least truecolor) mask color modifyable. I want this one for years ! If I have time I will contribute ! "Code is like shit - it only smells if it is not yours" |
Matt Smith
Member #783
November 2000
|
It should be modifiable already. What doesn't work when you change it? On a similar note, I think we should have one RGBA format which does not depend on the current graphics mode, and can be cast to the matching GL type. If we choose to hardcode the available depths then this should be one of them. |
GullRaDriel
Member #3,861
September 2003
|
It is modifiable, yeah, but not on the fly as they are #defines. color.h #define MASK_COLOR_8 0 #define MASK_COLOR_15 0x7C1F #define MASK_COLOR_16 0xF81F #define MASK_COLOR_24 0xFF00FF #define MASK_COLOR_32 0xFF00FF So you need to recompile the library each time you change. "Code is like shit - it only smells if it is not yours" |
Matt Smith
Member #783
November 2000
|
Ah. I thought mask_color was in BITMAP, but it is in GFX_VTABLE so is shared between all bitmaps of the same type. It should be fairly trivial to move it into the BITMAP struct instead. And for now, you could do bmp->vtable->mask_color = My_Preferred_Color; as long as you are aware that it affects all bitmaps of that type. EDIT: hmm, maybe not. Several places in the code use these defines directly instead of refering to the vtable. This includes stretch_masked_blit() but not plain masked_blit() which uses bitmap_mask_color() correctly. |
Thomas Fjellstrom
Member #476
June 2000
|
While the asm was still regarded the ASM as important, trying to modify the MASK_COLOR would require some major changes across the C and ASM code. Now its not such an issue I don't think, especially since its been a major wanted feature for years now. -- |
Matt Smith
Member #783
November 2000
|
Ah good point. the 24/32bit asm version of masked_blit() (IIRC, too busy to check right now) doesn't even honour the define. It compares each byte individually for 255,0,255 But still, it wouldn't take too much to fix up masked_blit(), stretch_masked_blit(), draw_sprite() and rotate_sprite(). Any others I haven't thought of there? Also, is a function to set the color (without needing a bitmap to refer to for depth and type) necessary? Would you set the individual type (system, memory, video etc) or would the function set the vtable->mask_color of all types? e.g. void set_mask_color(int depth, int color); |
Thomas Fjellstrom
Member #476
June 2000
|
Ugghh. Sorry about the downtime guys. The IDE card I was using to attach the 80GB disk that's hosting the new Xen images decided to have a fit while I was away at my dads. May 26 17:39:56 edgar kernel: megaraid: aborting-578928 cmd=2a <c=4 t=0 l=0> May 26 17:39:56 edgar kernel: megaraid abort: 578928:13[255:128], fw owner May 26 17:44:57 edgar kernel: megaraid mbox: critical hardware error! May 26 17:44:57 edgar kernel: megaraid: hw error, cannot reset Fun times. I'll attempt to fix it tonight, but if its really a dead card, I'll have to wait till tomorrow to move stuff around. edit: Rebooted after seeing some similar errors in google. might be a driver bug. God I hope not. But the wiki is fine again. -- |
Michael Jensen
Member #2,870
October 2002
|
I'd love to help, but it seems that everything is way over my head. If there's anything mindless that can't be done with a tool (or maybe needs a tool made for it to be done) I wouldn't mind helping. EDIT: WAIT! I totally did something on the wish list, or at least part, thick primitives were easy to make! I bet they're slow as all hell, but I totally attached code. Hope it wasn't a waste of time on my part. EDIT2: Corrected an error, so I had to reattach. EDIT3: Third time's a charm.
|
GullRaDriel
Member #3,861
September 2003
|
You should provide a diff with integration inside allegro "Code is like shit - it only smells if it is not yours" |
Timorg
Member #2,028
March 2002
|
I saw Michael's thick circle code, and it got me thinking about how a thick lined
I added the function to gfx.h and gfx.c, and then compiled allegro under linux (ubuntu 6.2), allegro seemed to compile fine, (I didnt see any errors), but for some reason I cant get allegro programs to run (it can find the shared library and everything, they just dont do anything, and the examples go to a black screen and lock everything up and I need to restart to get out of it) So I went back to windows and mingw, got a copy of 4.2.1 and applied the patch I made http://www.timorg.net/thick/circlethick.diff
Under mingw I get errors that are all like: src/vtable15.c:85: warning: initialization from incompatible pointer type and when I link against the created lib, I get an undefined reference to circlethick, I guess I need to add my function to a vtable or something, but I dont know how to go about that. It might not have come up yet, but if there is something special you need to do, all the would be allegro hackers might come up against this. Any suggestions or criticisms would be great, its after 5am and I possible could have missed something or done something stupid with the patch. Thanks again Michael for getting me thinking about this. ____________________________________________________________________________________________ |
Thomas Fjellstrom
Member #476
June 2000
|
That patch seems to be missing a point where the circlethick driver method's are actually set. Without adding the method to the vtable initializations, it'll be setting the wrong functions to the wrong methods. Usually its best to add new methods to the end of the vtable, that way theres no ordering problems, and binary compatibility can possibly be kept. -- |
GullRaDriel
Member #3,861
September 2003
|
AFAIK You also should run fixdll.sh after any function/modification to add the declaration inside the dll "Code is like shit - it only smells if it is not yours" |
|