Menu

Voir les contributions

Cette section vous permet de consulter les contributions (messages, sujets et fichiers joints) d'un utilisateur. Vous ne pourrez voir que les contributions des zones auxquelles vous avez accès.

Voir les contributions Menu

Messages - faeldaniel

#31
Thanks alekmaul for the reply, but the code:
Citation

#include <string.h>
#include <stdio.h>
char out1[7];
char out2[4];
char out3[10];

strcpy(out1,"PVSnes");
strcpy(out2,"Lib");
strcpy(out3,out1);
strcat(out3,out2);

consoleDrawText(1,1, "This is union: %s", out3);

returns the error:

timer.c:66: warning: implicit declaration of function 'strcat'
...
timer.obj:timer.asm:189: FIX_REFERENCES: Reference to an unknown label "strcat".
"make": *** [/d/snesdev/timer/timer.sfc] Error 1

Checked in \devkitsnes\include\string.h but reference strcat not exists, it is necessary to be informed in that path?

Now this code:

char out3[10];
sprintf(out3,"%s%s", "fael", "daniel");
consoleDrawText(1,10,"Union in console: %s", out3)


returns the warning, but continues:
timer.c:61: warning: implicit declaration of function 'sprintf'
It Worked perfectly for routines for texts that will develop.
#32
Hello guys,

First, how to work with strings in lib, this is possible?

Second, how do I join two variables of type chars?
Exemple:

char out1  [] = "PVSnes";
char out2  [] = "Lib";

//In java this is possible, but not in C :-(
char out3 []  = out1  + out2 ;

consoleDrawText(1,1, "This is union: %s", out3);


With pointers

char *out1  = "PVSnes";
char *out2  = "Lib";

//This is not possible :-(
char *out3 = out1  + out2 ;

consoleDrawText(1,1, "This is union: %s", out3);


With the console I can do it, but I want to do directly with a variable, exemple:
consoleDrawText(1,13,"Union in console: %s %s", "fael", "daniel");
#33
This is great news, I will surely contribute to the lib, I am now currently studying the question about the audio, I play keyboard and piano and already have a good base. Already expecting a new update already and will begin with topics doubts. thank you.
#34
English:
Hello everybody, I am Brazilian, as programmer I want to thank for the development of this lib, considered the native language of the SNES very complex, currently I schedule in java that is very similar to C, since I took my first steps in developing thanks to great wiki and documentation, such as routine texts for RPGs, backgrounds, sprites, actions clicks the control etcs. I hope the lib is constantly updated, I want to help when you're at a good level in language, again thank you.

Portugu?s:
Olá pessoal, sou  brasileiro, como programador quero agradecer pelo desenvolvimento dessa lib, considerava a linguagem nativa do SNES muita complexa, atualmente programo em java que é muito semelhante ao C, já dei meus primeiros passos no desenvolvimento graças a ótima wiki e sua documentaç?o, como por exemplo, rotina de textos para RPGS, fundos, sprites, aç?es nos cliques do controle etcs. Espero que a lib seja constantemente atualizada, quero até poder contribuir quando estiver num nível bom na linguagem, novamente muito obrigado.