![]() |
|
How to give a packfile a name? |
jaime barrachina
Member #6,780
January 2006
![]() |
While doing a map editor for the RPG we're making, we've found that it would be very convenient to be able to give the packfiles we use a name during the editing, and not having to go back to the code to do it, could anyone point out how? Here's an example of the function we're using:
What we would like to do is to somehow put the name of the map form the editor not the compiler. We'd really appreciate it if anyone points us in the right direction "Under the sword lifted high There is hell making you tremble: But go ahead, And you have the land of bliss. - Miyamoto Musahshi" |
gnolam
Member #2,030
March 2002
![]() |
void save_map(char *filename) { PACKFILE *pfile; pfile=pack_fopen(filename, "wp"); [...] } save_map("mapaprueba.map"); ? -- |
miran
Member #2,407
June 2002
|
gnolam said:
void save_map(char *filename) { PACKFILE *pfile; pfile=pack_fopen(filename, "wp"); [...] } save_map("mapaprueba.map");
But that doesn't even compile... -- |
jaime barrachina
Member #6,780
January 2006
![]() |
Txs people, you are right dint think of that... not to used to think in C... anyone could point me out to some functions the allegro has for managing user input (its for the same thing, now that i can change the name the file has, i want th user to be able to do it by himself) Txs a lot... I'm relay sorry to have to come back to ask over and over again Cheers! "Under the sword lifted high There is hell making you tremble: But go ahead, And you have the land of bliss. - Miyamoto Musahshi" |
piccolo
Member #3,163
January 2003
![]() |
there are none beside the allegro GUI stuff but here some code from Chris he thought up a way to do it. Author: Chris Barry edit: if your looking for more examples of stuff check out my game in the Projects RPG area. wow |
jaime barrachina
Member #6,780
January 2006
![]() |
TXS everyone! Problem solved "Under the sword lifted high There is hell making you tremble: But go ahead, And you have the land of bliss. - Miyamoto Musahshi" |
ImLeftFooted
Member #3,935
October 2003
![]() |
Allegro.cc said:
404
|
piccolo
Member #3,163
January 2003
![]() |
witch file is that wow |
gnolam
Member #2,030
March 2002
![]() |
Then let's burn it for crimes against the church, Yoda! -- |
BAF
Member #2,981
December 2002
![]() |
Or you can use a save file dialog... |
ImLeftFooted
Member #3,935
October 2003
![]() |
piccolo: Try clicking that link you posted. |
piccolo
Member #3,163
January 2003
![]() |
ok i think this is all the code from the link
wow |
ImLeftFooted
Member #3,935
October 2003
![]() |
Quote: if(insert) insert = 0; else insert = 1; Imo this is much cleaner insert = !insert;
What about home and end? Personally I think insert is more of an annoance then a feature, and you support it but not home and end? Anyway, you also forgot about two important things. 1) The box scroll! The text inside an input widget needs to scroll to the left and right so that the user sees the correct data inside the box. And 2) clicking to move the caret. There doesnt seem to be a way to click somewhere to get the caret to move there. Anyway, heres some code ripped out of my Input widget. Its a bit dependent on internal frameworks and such, but it hopefully conveys the idea.
It also supports variable width fonts, which is why there are setCursorPos and getCursorPos functions. |
|