move.l HelpTextPtr(%fp),%d3 |any help text to print ? beq.s NoString |no, continue clr.w -(%sp) |font : 0 move.l %d3,-(%sp) |&string RC DrawStrWidth |get string lenght in pixels move.w LcdHeight(%fp),%d4 subi.w #28,%d4 |y move.w HelpTextCoord(%fp),%d5 |get its abcisse sub.w %d0,%d5 |sub string lenght bpl.s NotNegative |<0 ? moveq.l #1,%d5 |else adjust it NotNegative: move.l #239<<16+127,(%sp) |screen size move.l CurrentDScreen(%fp),-(%sp) |first plane RC PortSet |redirect functions move.w #3,(%sp) |color move.l %d3,-(%sp) |&string move.w %d4,-(%sp) |y move.w %d5,-(%sp) |x RC DrawStr |print it move.l #239<<16+127,(%sp) |screen size move.l CurrentDScreen(%fp),-(%sp) |first screen addi.l #3840,(%sp) |second one RC PortSet |redirect functions move.w #3,(%sp) |color move.l %d3,-(%sp) |&string move.w %d4,-(%sp) |y move.w %d5,-(%sp) |x RC DrawStr |print it lea.l 30(%sp),%sp |fix stack
Folco (./35) :
Autre question, quand l'écran ne se redessine pas, je dois chercher par où ? J'ai aucun flag d'activé (_flag_2, vérifié avec grep) ? Ma pile est bonne en sortie, je sais plus par où chercher...
Ah parce que c'était concis ?
Folco (./31) :
Ben tu design bien mieux les fonctions que mio, mais par exemple, hier, j'ai eu besoin d'afficher du texte en blanc, j'ai du écrire ça :move.l HelpTextPtr(%fp),%d3 |any help text to print ? beq.s NoString |no, continue clr.w -(%sp) |font : 0 move.l %d3,-(%sp) |&string RC DrawStrWidth |get string lenght in pixels move.w LcdHeight(%fp),%d4 subi.w #28,%d4 |y move.w HelpTextCoord(%fp),%d5 |get its abcisse sub.w %d0,%d5 |sub string lenght bpl.s NotNegative |<0 ? moveq.l #1,%d5 |else adjust it NotNegative: move.l #239<<16+127,(%sp) |screen size move.l CurrentDScreen(%fp),-(%sp) |first plane RC PortSet |redirect functions move.w #3,(%sp) |color move.l %d3,-(%sp) |&string move.w %d4,-(%sp) |y move.w %d5,-(%sp) |x RC DrawStr |print it move.l #239<<16+127,(%sp) |screen size move.l CurrentDScreen(%fp),-(%sp) |first screen addi.l #3840,(%sp) |second one RC PortSet |redirect functions move.w #3,(%sp) |color move.l %d3,-(%sp) |&string move.w %d4,-(%sp) |y move.w %d5,-(%sp) |x RC DrawStr |print it lea.l 30(%sp),%sp |fix stack
Alors qu'un attribut couleur dans genlib:ut_small_string aurait suffit.
Une autre fois, j'ai fait une "intro" avec un texte défilant de bas en haut, dans plusieurs fontes. A cause du manque de clipping et de couleur, c'était plutôt galère : afficher le texte dans un buffer, le transformer pour n'avoir qu'à le orer sur le screen, faire le clipping etc... Bref, dès qu'on veut du texte en-dehors du bon gros texte en plein milieu dont on connait la longeur exact, c'est rigolo.
The character is masked so that every other pixel is turned off then ORed into the destination
Folco (./54) :
- il n'y a pas de problème à désallouer les DScreens avant d'appeler genlib::quit (je pense que non) ?
Folco (./54) :
- il y a des fonctions de lignes horizontales, mais pas de verticales de prévues ?
Folco (./54) :
- qu'est-ce que ça va faire concrètement les fonctions genlib::draw_hline_light/shadow ? Si c'est une question de canal alpha/autre concept de graphisme, je n'y connais rien donc je ne sais pas ce que font ces fonctions...