xboxscene.org forums

Author Topic: Problem To Add Resources To My Projects  (Read 49 times)

SamSam

  • Archived User
  • Jr. Member
  • *
  • Posts: 76
Problem To Add Resources To My Projects
« on: September 23, 2003, 11:23:00 AM »

I have some problem to add resources to my projects with vs 2003.

i didn't find the files .rdf to add to my project like in the examples include in the xdk but i found a type .rc but when i try to add a .rc it's making a fatal error: "fatal error RC1015: Cannot open include file 'afxres.h'" and this file is really with all the others includes files.

Someone have an idea how i can add resources?
Logged

The unProfessional

  • Archived User
  • Hero Member
  • *
  • Posts: 679
Problem To Add Resources To My Projects
« Reply #1 on: September 23, 2003, 04:01:00 PM »

With, I know the problem with adding the .RC files.  Resource files are designed for Windows applications.  In your case, since you mentioned "afxres.h", I believe those are MFC resource files.  None of these such resource files will fly in Xbox projects.  What're you trying to do exactly?

Logged

SamSam

  • Archived User
  • Jr. Member
  • *
  • Posts: 76
Problem To Add Resources To My Projects
« Reply #2 on: September 26, 2003, 04:47:00 AM »

In the examples of the XDK, they use .rdf files when they use fonts files and i want to do the same thing

Is it still very confusing?
Logged

delphaeus

  • Archived User
  • Newbie
  • *
  • Posts: 20
Problem To Add Resources To My Projects
« Reply #3 on: September 26, 2003, 06:50:00 AM »

CODE
Texture Font
{
  Source      ....CommonMediaFontsArial_16.tga
  Format      D3DFMT_A4R4G4B4
  Levels      1
}

UserData FontData
{
  DataFile ....CommonMediaFontsArial_16.abc
}


In this case, it's taking a bitmap, Arial_16.tga, and a raw formatting file, Arial_16.abc, and storing them in the file Font.xpr.  Font.xpr is what the samples actually load, parse, and use to render fonts.

The files Arial_16.tga and Arial_16.abc are generated by the FontMaker program, also included in the XDK.

So, here's what you do -- you open up a command prompt and run FontMaker.  It'll pop up a font dialog to let you pick the font, and then will spit out a .tga and an .abc -- then, you make an .rdf file to bundle them, and run Bundler on the .rdf, which spits out a .xpr.  Then, in your program, you'll load the .xpr into the CXBFont class.
Logged