Создание Эльфов : Эльфостроение : Форум

Страница 60 из 211: « 1 ... 56 57 58 59 [60] 61 62 63 64 ... 211 »

 xander150:
15.09.08, 16:34
 This may sound silly but I'm just a beginner and I wanted to ask whether someone can tell me how to use DATE_GetWeekDay(DATE *,char * dest); to save the current Weekday as a TextID-Variable to use it with DrawString, I want to use it in SleepMode because the SVN version uses its own algorithm to do this. So I would really appritiate a small sample :)
I tired this, but it only shows nothing on the screen:
Код: 
  DATETIME dt;
  int SIDtime;
  char * weekday;
  REQUEST_DATEANDTIME_GET(SYNC,&dt);
  DATE_GetWeekDay(&dt.date,weekday);
  SIDtime=Str2ID(weekday,0,SID_ANY_LEN);
  SetFont(FONT01);
  DrawString(SIDtime,ALL01,WIN01X,WIN01Y,DISPLAY_WIDTH,DISPLAY_HEIGHT,20,0x05,color ,color);
  TextFree(SIDtime);

It gives the warning:
Код:
Warning[Pe549]: variable "weekday" is used before its value is set /home/marius/Dokumente/Handy/SVN.linux/SE/SleepModeMod/main.c 16 


[ Edited by xander150 в 15.9.08 17:15 ]

 eddmund:
17.09.08, 10:00
 
xander150 пишет:
This may sound silly but I'm just a beginner and I wanted to ask whether someone can tell me how to use DATE_GetWeekDay(DATE *,char * dest);

I am using it in my DayDis 1.0 (if the function is available in the library):

Код: 
DATETIME datetime;
REQUEST_DATEANDTIME_GET(0, &datetime);
DATE* date = &datetime.date;
char WeekDay_char;
DATE_GetWeekDay(date, &WeekDay_char);
int weekday;
weekday = WeekDay_char;
// weekday number (0 = Mo -> 6 = Su)


[ Edited by eddmund в 17.9.08 08:05 ]

 xander150:
17.09.08, 17:40
 thank you. This was what I was looking for :) Now my sunday-bug dissappeard.

 k790Sancho:
22.09.08, 12:56
 Всем привет!
У меня возникла необходимость, в том, что бы научиться редактировать эльфы.
Подробнее:
Мне надо изменить параметры эльфа Standby Mod/
у этого эльфа есть только конфиг, а значит надо редактировать его.
Я знаю, что есть эльф для его редактирования, но у меня сейчас нет телефона, от сюда и вопрос, можно ли редактировать конфиг без использования телефона и эльфа BcfgEdit.elf ??

 awg:
22.09.08, 13:03
 k790Sancho писал:
можно ли редактировать конфиг без использования телефона и эльфа BcfgEdit.elf ??

Пока нет, UltraShot делает, только вот все времени не хватает!

 xander150:
24.09.08, 19:58
 Is anyone willing to give a sample how to use the MetaData functions?

MetaData_Desc_Create(wchar_t * path,wchar_t * name) sound logical to me, I guess it should look like
MetaData_Desc_Create(L"/card/music/",L"musicfile.mp3"), IAR give sno errors here but then my knowledge is at the end, MetaData_Desc_GetTags(void * MetaData_Desc,int tagID) wants a MetaData_Desc, but where do I set this?
So, I would really appreciate a small sample which creates this MetaData_Desc, reads one tag to a wchar_t and destroys the MetaData_Descl. The definition in Lib_Clara doesn't really help me :oops:

 UltraShot:
24.09.08, 20:06
 
Код: 
 
    void *TagStructure=0;
    if (TagStructure=MetaData_Desc_Create(path,name))
    {
      wchar_t *tag=0;
      if (tag=MetaData_Desc_GetTags(TagStructure,1))
      {
        if (tag[0]!=0)
        {
          wstrcpy(meta->Title,tag);
        }
      }
      tag=0;
      if (tag=MetaData_Desc_GetTags(TagStructure,2))
      {
        if (tag[0]!=0)
        {
          wstrcpy(meta->Album,tag);
        }
      }
      tag=0;
      if (tag=MetaData_Desc_GetTags(TagStructure,0))
      {
        if (tag[0]!=0)
        {
          wstrcpy(meta->Artist,tag);
        }
      }
      if (tag=MetaData_Desc_GetTags(TagStructure,3))
      {
        if (tag[0]!=0)
        {
          wstrcpy(meta->Year,tag);
        }
      }
      if (tag=MetaData_Desc_GetTags(TagStructure,4))
      {
        if (tag[0]!=0)
        {
          wstrcpy(meta->Genre,tag);
        }
      }
      if (MetaData_Desc_GetTrackNum(TagStructure,0)!=-1)
      {
        meta->TrackNum=MetaData_Desc_GetTrackNum(TagStructure,0);
      }
      else
      {
        meta->TrackNum=0;
      }
      MetaData_Desc_Destroy(TagStructure);


 xander150:
24.09.08, 20:24
 Wow, UltraShot, thank you :-)
I'll have a LOT of fun with this :-D

EDIT: Tested it and it works fine on my W880 :-) Thank you

[ Edited by xander150 в 24.9.08 19:32 ]

EDIT2: Can someone post an example how to display an image smaller than it is? I use the latest MetaData function form the lib to get the album cover and draw it with DrawString but it ignores my X2 and Y2 values :oops:

[ Edited by xander150 в 5.10.08 19:07 ]

 UltraShot:
05.10.08, 20:57
 xander150 писал:
I use the latest MetaData function form the lib to get the album cover and draw it with DrawString but it ignores my X2 and Y2 values :oops:

use putchar function

 xander150:
06.10.08, 20:09
 Can anyone make a Wiki entry about putchar? It's so much different from the C putchar. I can't find any reference to void *xx, the rest seems clear to me. 2 Coordinates, two zeros and the thing I want to draw.

EDIT: Thank you for the wiki entry :)

[ Edited by xander150 в 7.10.08 13:58 ]
Страница 60 из 211: « 1 ... 56 57 58 59 [60] 61 62 63 64 ... 211 »

URL этой темы:
https://mobilefree.justdanpo.ru/newbb_plus/viewtopic.php?topic_id=2479&start=590

© 2005-2018 supertrubka.org