Stratos: Punto de Encuentro de Desarrolladores

¡Bienvenido a Stratos!

Acceder

Foros





Beginner needs Help

Iniciado por yosha79, 12 de Junio de 2007, 08:55:43 PM

« anterior - próximo »

yosha79

Hola,

i experiemnted a lot with the CRM32Pro but I still got some Problems.
I tried to load a font over the DPF-File but the Program says that their is no font with that name.
So I played around a bit:
  fFont->Create  ( "gfx/FVerde.bmp");    // THIS WORKS
  fFont->Load(GFX_RESOURCE,"FVerde"); //THIS DOESN'T WORK
I tripple checked the GFX_RESOURCE  and it is the right file, the font is also there... and I can load Images (BMP) from it.

So I tried the Example files. If I use the compiled binary files, i get no errors, but when I am compiling them by myself I get a lot of erros in the log file.
Heres the output from the GUI-Example:
· Example 3: GUI

· Executing at Tue Jun 12 20:38:40 2007
· Running on INTEL processor - Pentium 4(Northwood) - MMX - SSE
· Selected 'P4 Northwood' optimized code path.

· CRM32Pro successfully initiated.
· [IStuffDPF->LoadBlock(868,'TILB','MyButton_n')] Warning: datablock was not found in the given DPF.
· [IStuffDPF->LoadBlock(869,'TILB','MyButton_p')] Warning: datablock was not found in the given DPF.
· [IStuffDPF->LoadBlock(870,'TILB','MyButton_o')] Warning: datablock was not found in the given DPF.
· [IStuffDPF->LoadBlock(871,'TILB','MyButton_s')] Warning: datablock was not found in the given DPF.
· [IButton->Create(0x22fc9c,'MyButton',0,'data/gfx.dpf')] Error: we could not find valid tiles for this kind of button.
· [IStuffDPF->LoadBlock(873,'TILB','MyCheck_n')] Warning: datablock was not found in the given DPF.
· [IStuffDPF->LoadBlock(874,'TILB','MyCheck_p')] Warning: datablock was not found in the given DPF.
· [IStuffDPF->LoadBlock(875,'TILB','MyCheck_o')] Warning: datablock was not found in the given DPF.
· [IButton->Create(0x22fc9c,'MyCheck',0,'data/gfx.dpf')] Error: we could not find valid tiles for this kind of button.
· [IStuffDPF->LoadBlock(877,'TILB','MySlider_n')] Warning: datablock was not found in the given DPF.
· [IStuffDPF->LoadBlock(878,'TILB','MySlider_p')] Warning: datablock was not found in the given DPF.
· [IStuffDPF->LoadBlock(879,'TILB','MySlider_o')] Warning: datablock was not found in the given DPF.
· [IButton->Create(0x22fc9c,'MySlider',0,'data/gfx.dpf')] Error: we could not find valid tiles for this kind of button.
· [IStuffDPF->LoadBlock(881,'TILB','MyInput_n')] Warning: datablock was not found in the given DPF.
· [IStuffDPF->LoadBlock(882,'TILB','MyInput_p')] Warning: datablock was not found in the given DPF.
· [IStuffDPF->LoadBlock(883,'TILB','MyInput_o')] Warning: datablock was not found in the given DPF.
· [IButton->Create(0x22fc9c,'MyInput',0,'data/gfx.dpf')] Error: we could not find valid tiles for this kind of button.
· [IStuffDPF->LoadBlock(884,'FONT','MyFont')] Warning: datablock was not found in the given DPF.
· [CFont::Load(data/gfx.dpf,MyFont)] Error: font not found
· [IStuffDPF->LoadBlock(885,'FONT','InputFont')] Warning: datablock was not found in the given DPF.
· [CFont::Load(data/gfx.dpf,InputFont)] Error: font not found




So, what do I do wrong? What did I forget? I could really use some help here :-)

Oh, by the way: I am using Dev-CPP 4.9.9.2 with te following linker-options:
-lsdlmain.mingw
-lcrm32pro.mingw


Hope that helps.

Thank you in advance,

  Yosha

TheAzazel

Hi Yosha79,

fortunately, your problems are very easy to fix, lets see:

- fFont->Create() creates a new font given an external image file(BMP or PNG on the latest version)
But fFont->Load() loads a font which is stored on a DPF, so you need first to save it (using fFont->Save() or the EditorDPF) before you can load it.

- About your second problem... I imagine you are trying to compile with 4.92 but using resources files(DPF) from 4.97, in this case, the error is normal as the resources were updated to a new revision on 4.97.

My advice is always to use the latest version, in this case, the 4.97 and you will get more functionality and a lot of bugs fixed :). I have pre 4.98 running on my development PC but is far to be released as Im working on a scrollengine....

Well, let me know if you have any other problem!!

Cheers!

yosha79

Hello Azazel,

thank you for your fast reply. I gues both Problems my come from wrong Version. I will check this out tomorrow. As I said, I included the FVerve Font from Pong to my own dsp and tried to load it, but it didn't worked. If fFont->Load("Verve.bmp") it works.

I used (I think) the Version 4.95 which I got from the Dev-CPP Packaga / Update Manager, but I will try the 4.97 out tomorrow and tell you how it goes.

Thanx again

 Yosha

yosha79

Well finally !!!

After updating from 4.95 to 4.97 I still had the same Problems loading Fonts. But the Programs compile and work, if i put the *.dll files in the directory where the Project is. I thought Dev-CPP has them in its /dll/*.dll but it doesn't work, at least for me.

So, it was probably a "misconfiguration with directories" error.

Thank you for the Help

 Yosha

(BTW: Do you know how hard it is for a german to register to this forum when he doesnt speak spanish  :lol: )

TheAzazel

I remember Devcpp stores the includes on INCLUDE directory(you have to copy there CRM32Pro.h and the subdirectory SDL of the new version), the static lib on lib(copy there CRM32Pro.mingw.lib to allow the linker works!) but about the final CRM32Pro.mingw.dll I dont remember where it could be stored, anyway, in any folder which will be on the system path, it is enough or..as you said, copy the dll together with your final executables. Probably, I'll use the DLL directory of DevCpp and I´ll include it on the system path. As you see, there are a plenty of solutions :).

It's a pity that the person who was creating the DevPack is missing-in-action, I can not contact him any longer :S

uhm...about the problem with your fonts.... it should work! I would like to check by myself what is happening, so, please, could you send me the files which cause you the problem? (one of my email: megastorm AT ono.com).

I know...but once you are in..you can change the language to english or even german, look for Perfil word on top of the page, if you need any other thing, please, let me know!

Cheers!!






Stratos es un servicio gratuito, cuyos costes se cubren en parte con la publicidad.
Por favor, desactiva el bloqueador de anuncios en esta web para ayudar a que siga adelante.
Muchísimas gracias.