initial commit
This commit is contained in:
76
devtools/rsm/DE/modules/rsm2cs/ciconini.c
Normal file
76
devtools/rsm/DE/modules/rsm2cs/ciconini.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/*************************************************************
|
||||
* *
|
||||
* Beispiele f<>r cicon_init() und cicon_exit() *
|
||||
* Autor: Armin Diedering *
|
||||
* WWW: http://www.Diedering.de *
|
||||
* *
|
||||
*************************************************************/
|
||||
|
||||
#include <portab.h>
|
||||
#include <gemfast.h>
|
||||
|
||||
|
||||
/* Folgende Funktionen werden Ben<65>tigt */
|
||||
|
||||
WORD CountOfPlanes(); /* liefert die Anzahl der Planes der aktuellen */
|
||||
/* Aufl<66>sung zur<75>ck */
|
||||
|
||||
WORD CanCicon(); /* gibt Auskunft, ob das System CICONs kann */
|
||||
|
||||
WORD IsMagiC(); /* Ist MagiC das OS ? */
|
||||
|
||||
|
||||
/* Jetzt gehts aber los */
|
||||
|
||||
long rs_ciconinit(CICONBLK *ciconblks, int ncib, OBJECT *objects, int nobj)
|
||||
{
|
||||
if(CanCicon())
|
||||
{
|
||||
if(IsMagiC())
|
||||
{
|
||||
while(ncib--) /* siehe rsm2cs.hyp */
|
||||
{
|
||||
CICON *cicon = ciconblks->mainlist;
|
||||
CICON *found = cicon;
|
||||
WORD planes = 0;
|
||||
while(cicon) /* passende Farbzahl suchen */
|
||||
{
|
||||
if(cicon->num_planes <= CountOfPlanes()) /* kann das OS dieses Icon? */
|
||||
{
|
||||
if(cicon->num_planes > planes) /* sind es mehr Planes als */
|
||||
{ /* ich schon gefunden habe? */
|
||||
found = cicon;
|
||||
planes = found->num_planes; /* das merk ich mir */
|
||||
}
|
||||
}
|
||||
cicon = cicon->next_res; /* n<>chste Farbzahl */
|
||||
}
|
||||
ciconblks->mainlist = found; /* gefundesnes setzen */
|
||||
ciconblks++; /* n<>chstes Icon */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Hier wirds jetz aber kompliziert. man mu<6D> CICON f<>r CICON durchgehen. */
|
||||
/* Dabei sollte man erst einmal die passende Farbzahl (<28>hnlich wie bei */
|
||||
/* MagiC s.o.) suchen und setzen. Dann m<>ssen die gefundenen Bilddaten, */
|
||||
/* die ja im Standrd-Format vorliegen in das ger<65>teabh<62>ngige Format */
|
||||
/* gewandelt werden. */
|
||||
/* wie das zu bewerkstelligen ist <20>berlasse ich eurer Fantasie ;-) */
|
||||
}
|
||||
}
|
||||
else /* das System kann gar keine CICONs */
|
||||
{
|
||||
while(nobj--) /* dann alle CICONs in ICONs <20>ndern */
|
||||
{
|
||||
if((objects->ob_type & 0xff) == G_CICON)
|
||||
objects->ob_type = (objects->ob_type & ~0xff) | G_ICON;
|
||||
objects++;
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
void rs_ciconexit(long deskriptor)
|
||||
{
|
||||
}
|
||||
21
devtools/rsm/DE/modules/rsm2cs/rsm2cs.cnf
Normal file
21
devtools/rsm/DE/modules/rsm2cs/rsm2cs.cnf
Normal file
@@ -0,0 +1,21 @@
|
||||
static vars=TRUE
|
||||
short file=FALSE
|
||||
blank lines=TRUE
|
||||
object numbers=TRUE
|
||||
init te_ptext=TRUE
|
||||
no init function=FALSE
|
||||
init function=rs_init
|
||||
exit function=rs_exit
|
||||
ciconinit function=rs_ciconinit
|
||||
ciconexit function=rs_ciconexit
|
||||
optimize images=FALSE
|
||||
optimize strings=TRUE
|
||||
optimize icontext=FALSE
|
||||
optimize substrings=FALSE
|
||||
optimize emtystrings=TRUE
|
||||
includes=
|
||||
ob_spec=long
|
||||
ub_code=long
|
||||
ub_parm=long
|
||||
draw function=mydraw
|
||||
bi_pdata=int
|
||||
BIN
devtools/rsm/DE/modules/rsm2cs/rsm2cs.hyp
Normal file
BIN
devtools/rsm/DE/modules/rsm2cs/rsm2cs.hyp
Normal file
Binary file not shown.
BIN
devtools/rsm/DE/modules/rsm2cs/rsm2cs.ref
Normal file
BIN
devtools/rsm/DE/modules/rsm2cs/rsm2cs.ref
Normal file
Binary file not shown.
BIN
devtools/rsm/DE/modules/rsm2cs/rsm2cs.rem
Normal file
BIN
devtools/rsm/DE/modules/rsm2cs/rsm2cs.rem
Normal file
Binary file not shown.
18
devtools/rsm/DE/modules/rsm2cs/rsm2cs.txt
Normal file
18
devtools/rsm/DE/modules/rsm2cs/rsm2cs.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
rsm2cs.rem v1.03 f<>r den Export als C-Sourcen
|
||||
*********************************************
|
||||
|
||||
RSM2CS wird installiert, in dem "rsm2cs.rem" und "rsm2cs.cnf" in den
|
||||
"modules"-Ordner kopiert wird und in der rsm.inf folgende Zeile eingetragen
|
||||
wird:
|
||||
#foC-Source@rsm2cs@1@c@h@@C-Sou[rce@1@
|
||||
^ ^ ^
|
||||
| | |
|
||||
wird hier eine '0' | | |
|
||||
eingetragen, dann < | |
|
||||
erscheint der Dialog | |
|
||||
nur bei gedr<64>ckter | |
|
||||
SHIFT-Taste | |
|
||||
| |
|
||||
Sollen andere Dateien (als *.c + *.h) erzeugt werden, dann mu<6D> die Zeile
|
||||
entsprechend ge<67>ndert werden.
|
||||
|
||||
Reference in New Issue
Block a user