Who's Online |
154 user(s) are online ( 90 user(s) are browsing Forums)
Members: 1
Guests: 153
Georg,
more...
|
|
Headlines |
-
mce.lha - game/utility
Apr 23, 2024
-
theme_list.lha - utility/misc
Apr 23, 2024
-
faac.lha - audio/convert
Apr 22, 2024
-
faad2.lha - audio/convert
Apr 22, 2024
-
seq.lha - audio/misc
Apr 22, 2024
-
libfaac.lha - development/library/audio
Apr 22, 2024
-
libfaad.lha - development/library/audio
Apr 22, 2024
-
image2pdf.lha - utility/text/convert
Apr 22, 2024
-
libharfbuzz.lha - development/library/graphics
Apr 20, 2024
-
libpng.lha - development/library/graphics
Apr 20, 2024
|
|
|
|
Re: How to retrieve the owner of a Lock ?
|
Posted on: 2013/5/13 14:03
#61
|
Not too shy to talk
|
Quote: By Locking each Volumes in the DosList, I retrieve each Lock If you lock the volume, then you are the owner of the lock. Each call to Lock() creates a new lock and each call to Open() or OpenFromLock() creates a new file handle. The respecive caller is the owner of each. You have to retrieve the pointer of an existing file handle or lock in order to examine it and perhaps find out its owner (if this is possible at all).
|
|
|
|
Re: IFACE for devices in a library
|
Posted on: 2013/4/8 10:17
#62
|
Not too shy to talk
|
Let the compiler help you:
#define __NOGLOBALIFACE__ #define __NOLIBBASE__
before
#include <proto/xxx.h>
Then the compiler will give you a "unknown symbol xxxBase" and "unknown symbol Ixxx" error for every required library base and interface.
|
|
|
|
Re: Changing system language Possible ?
|
Posted on: 2013/3/26 16:11
#63
|
Not too shy to talk
|
Quote: Cass wrote: Is there anyway to flush the already loaded .catalogs? I was trying to track a problem with a catalog the other day and I found the following: 1. Avail flush won`t flush an already loaded catalog. 2. Scout Catalogs has just an update option, no remove. Flush all (A+.) won`t remove it either. 3. Changing Locale settings to another language after clearing the language list, just adds the new language catalog, won`t remove the old one!
Suggestions?
I'd like to know this, too. In OS 3.x you could do Avail flush, but since 4.0 this no longer works.
|
|
|
|
Re: MUI : How to update image filename of a DTPic when running ?
|
Posted on: 2013/3/11 16:05
#64
|
Not too shy to talk
|
What you say is that
strcpy (path_skin_preview,"PROGDIR:Skins/Empty.png"); set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview); strcpy (path_skin_preview,"PROGDIR:Skins/Full.png"); set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview);
does not work, but
strcpy (path_init_preview,"PROGDIR:Skins/Empty.png"); set(Im_Data_png,MUIA_Dtpic_Name, path_init_preview); strcpy (path_skin_preview,"PROGDIR:Skins/Full.png"); set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview);
works?
If this is true, then DTPic might internally keep the pointer to the file name and if you set the same pointer a second time, it thinks the image didn't change and thus doesn't update the display.
Perhaps something like this works:
strcpy (path_skin_preview,"PROGDIR:Skins/Empty.png"); set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview);
set(Im_Data_png,MUIA_Dtpic_Name, NULL); strcpy (path_skin_preview,"PROGDIR:Skins/Full.png"); set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview);
|
|
|
|
Re: Multitexturing in minigl/SDL?
|
Posted on: 2013/3/6 16:24
#65
|
Not too shy to talk
|
Quote: Spirantho wrote: What I did to make it work was to shift each int32 in the texture up by 8 bits.
This would convert ARGB into RGBA. Are you sure that your input data is correct? It sounds much like an endianness problem because ARGB is BGRA backwards. If you load a file which contains raw BGRA data into memory and then read 32bit words from the memory, on a little-endian machine you get BGRA words, but on a big-endian machine you get ARGB words.
|
|
|
|
Re: CreateMsgPort is deprecated?
|
Posted on: 2013/2/26 16:58
#66
|
Not too shy to talk
|
Quote: IExec->AllocSysObject(ASOT_PORT, ASOPORT_Name, "MyNamedPort", TAG_DONE);
This should read IExec->AllocSysObject Tags(ASOT_PORT, ASOPORT_Name, "MyNamedPort", TAG_DONE); Otherwise it won't compile. AllocSysObject takes a pointer to an array of struct TagItem, AllocSysObjectTags takes the tag items as varargs.
|
|
|
|
Re: Anyway to get *un*parsed shell arguments for a portable C program?
|
Posted on: 2013/1/25 11:43
#67
|
Not too shy to talk
|
I made a simple ReadArgs replacement for OS 1.3 which uses argc/argv as input and it works rather good IMO. Yes, you can surround keywords by quotation marks and they are still recognised as keywords. But I can live with that.
|
|
|
|
Re: Anyway to get *un*parsed shell arguments for a portable C program?
|
Posted on: 2013/1/24 12:28
#68
|
Not too shy to talk
|
What don't you want argc/argv? This is C standard and exists in every OS.
|
|
|
|
Re: Diskimage.device/SFS problem...
|
Posted on: 2013/1/13 19:08
#69
|
Not too shy to talk
|
Looks like you edited IDF1 (and probably others, too) to use SFS instead of OFS/FFS. ADF files are not formatted with SFS. That's the reason why they show as uninitialized for you.
|
|
|
|
Re: minor AREXX programming question
|
Posted on: 2013/1/3 12:33
#70
|
Not too shy to talk
|
Quote: When i tryed to use your version, i have:
EXPORT: Unknown command
An ADDRESS SKETCHBLOCK is missing in front of it. I changed the global address to COMMAND because there are many commands sent to COMMAND but only two commands sent to SKETCHBLOCK. Forgot to change the second one. Quote: Also after reading a script briefly, i see that if .info was here initially, then " " symbols are strips, and so, output will be not "RAM DISK:aaa.info", but without " ", and conversion will not works because of space. So i add some stuff here:
That's right. I forgot this because usually I don't put quotation marks into the variable which holds the file name but into the command line. This script is different. Quote: Also seems that part:
Works only when no file name was given, but it didn't triggers when i press "chancel" in asl requester.
What does outfile contain if cancel is pressed? Quote: It is need it (to save mask separately from file, and to have in end normal png with transparency, which in end can be normally converted to icon)
I know how the process works. My criticism was about using fixed global file names in one place but trying to use process-dependent unique file names in another place. If you use hard-coded ram:xyz in one place you can skip the effort to create unique names in the other places, too.
|
|
|
|
Re: minor AREXX programming question
|
Posted on: 2013/1/3 10:41
#71
|
Not too shy to talk
|
Here is a revised version (not tested, though):
/* save as AmigaOS4 icon */
/* requires:
NetPBM http://os4depot.net/share/graphics/convert/netpbm.lha
pngicon2amiga http://os4depot.net/share/graphics/convert/pngicon2amiga.lha
*/
ADDRESS COMMAND
options results
time = date('s') || space(translate(time(),' ',':',0))
tempexportfile = "T:" || pragma('ID') || '_' || time || '_exp'
tempfnamefile = "T:" || pragma('ID') || '_' || time || '_fn'
signal on error
/* get size of image to save (for os4icon 256x256 is max) */
ADDRESS SKETCHBLOCK GETPROJECTINFO STEM prj
WIDTH = prj.width
HEIGHT = prj.height
if WIDTH > 256 | HEIGHT > 256 then do
say "AmigaOS4 icons can't be more than 256x256 pixels, plz scale"
exit
end
/* ok, size of image fine, continue */
'EXPORT FILE=' || tempexportfile
"REQUESTFILE SAVEMODE PATTERN #?.info TO " tempfnamefile
outfile = ""
if open('FILENAME',tempfnamefile,'R') then do
outfile = strip(readln('FILENAME'),'B','"')
call close('FILENAME')
end
if outfile = "" | right(outfile,1) = ':' | right(outfile,1) = '/' then do
say "requester cancelled or no file name given"
exit
end
/* check , if filename have .info at end (necessary for png2icon). and if not, add it automatically*/
if upper(right(outfile,5)) ~= '.INFO' then do
say ".info is NOT here!, so add"
outfile = '"' || outfile || ".info" || '"'
end
conversion1 = "work:NetPBM/bin/ilbmtoppm -maskfile ram:mask " || tempexportfile || " >ram:tmpfile"
conversion2 = "work:NetPBM/bin/pnmtopng -force -alpha ram:mask ram:tmpfile >" || outfile
conversion3 = "work:PNGIcon2Amiga/PNGIcon2Amiga " || outfile
/* 'address command' has been set above */
say conversion1
conversion1
say conversion2
conversion2
say conversion3
conversion3
error:
"delete >NIL: *>NIL: quiet " || tempexportfile
"delete >NIL: *>NIL: quiet " || tempfnamefile
"delete >NIL: *>NIL: quiet ram:tmpfile"
"delete >NIL: *>NIL: quiet ram:mask"
exit
One thing left, though: in the beginning you make big effort to create unique file names and in the end you just use ram:tmpfile and ram:mask.
|
|
|
|
Re: minor AREXX programming question
|
Posted on: 2013/1/3 10:19
#72
|
Not too shy to talk
|
Quote: if lastpos('.info', outfile) < length(outfile) - 4 then do
This will not work, either. It also applies to "something.information" and similar. This one will work correctly:
if right(outfile,5) = ".info" then do
...
or if you want it to accept both upper and lower case file names:
if upper(right(outfile,5)) = ".INFO" then do
...
|
|
|
|
Re: minor AREXX programming question
|
Posted on: 2013/1/2 21:54
#73
|
Not too shy to talk
|
You aren't programmer, are you?
Not only that it seems like you never heard of the logical or operator | nor of the keyword else, you obviously don't even consider reading (or understanding?) the docs about the functions you use.
I only read your script up to the part with .info, then I could not stop laughing.
verify(a,b) checks if the string a contains only letters also contained in the string b. If not, it returns the position of the character in a which is not contained in b.
So what your verify(".info",filename) does is, it verifies that ".info" only consists of characters also contained in filename. For example verify(".info","mainpart.four") will return 0 because all letters of .info are also contained in mainpart.four, but verify(".info","mainpart.six") will return 4 because f is the first letter in .info which is not contained in mainpart.six. In neither case your program will add ".info" to the file name because the result of verify is not 1.
|
|
|
|
Re: Finding window postition
|
Posted on: 2012/11/13 16:33
#74
|
Not too shy to talk
|
@Antique:
You could close the picture window when the user moves the mouse out of the window boundaries. Then he does not need to click on the picture to close it.
|
|
|
|
Re: SMBFS(?) - Umlauts not supported?
|
Posted on: 2012/11/7 15:28
#75
|
Not too shy to talk
|
Perhaps you need to configure a different character set on the NAS? IS08859-1 would be perfect, but Windows-1252 should do, too.
|
|
|
|
Re: SMBFS(?) - Umlauts not supported?
|
Posted on: 2012/11/7 14:32
#76
|
Not too shy to talk
|
For me DANSK.crossdos worked when connecting to WindowsXP.
Do these files actually exist in the path you specified? IIRC I had to copy them from a WB 3.1 disk.
|
|
|
|
Re: SVG datatype/library linked pthreads problems
|
Posted on: 2012/11/1 14:29
#77
|
Not too shy to talk
|
http://aminet.net/package/dev/misc/MakeDT-1.3Always worked perfectly for me. It's great to be included in makefiles. I don't understand why one would need a GUI.
|
|
|
|
Re: CompositeTags
|
Posted on: 2012/10/26 17:51
#78
|
Not too shy to talk
|
Quote: Chris wrote: Actually I didn't know there was a ClipBlit function, and it looks identical to BltBitMapRastPort to me.
ClipBlit is the only function which accepts a RastPort as *source*. If you want to blit *from* a window to somewhere else, you need to use it.
|
|
|
|
Re: CompositeTags
|
Posted on: 2012/10/25 21:40
#79
|
Not too shy to talk
|
If you want clipping you need to blit into a RastPort and not into a bitmap. I don't have the autodocs for CompositeTags here in front of me. If it does not allow to specify a RastPort as destination, then it is not meant to be used to blit into a window.
You could fake it by using
COMPTAG_DestX,win->LeftEdge + win->BorderLeft, COMPTAG_DestY,win->TopEdge + win->BorderTop,
but this only works if your window is the frontmost one, i.e. not covered by parts of other windows.
Edit: now I read the autodocs and as it seems there is no way to specify a RastPort as destination for CompositeTags.
So if you don't need alpha blending, you should use BltBitMapRastPort instead.
If you need alpha blending, you have to - allocate a new bitmap with BMF_DISPLAYABLE set and the window's bitmap as friend - copy the area of the window you want to manipulate into the new bitmap using ClipBlit() - use CompositeTags() with the new bitmap as destination - copy the new bitmap back into the window using BltBitMapRastPort() or ClipBlit().
Perhaps using a window with WA_SuperBitMap would make things a bit easier.
Edited by thomas on 2012/10/26 7:52:22
|
|
|
|
Re: Is it possible to detect when a user workbench changes screen resolution?
|
Posted on: 2012/10/13 15:36
#80
|
Not too shy to talk
|
intuition.library is part of the OS. Why do you call it hacky?
screennotify.library is the standard for this purpose on OS 3.x. Everything else is a hack.
|
|
|
|