EGOBOO -- Another editor

The development of the game itself or new resources for it. Any new stuff you're working on would go here, as well as the discussion of in-development stuff.

Moderator: Developers

User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: EGOBOO -- Another editor

Post by Zefz »

Ideally you would load each object into a hash map where each key is the unique String identifying the object. So
objectsLoaded["Ghuul"] would access a Ghuul object for example (NULL or an exception if the String is invalid).

This is one of the reasons I would have liked to do this in C++.
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

I load the object(character-)profile into a simple table. Because there are a maximum of 100 different character types per level a linear search is sufficient IMHO.

It works like this:
CreateCharacter:
- Load profile data for "objectname", if it doesn't exist already
- Create a character with this 'character-type'
- Spawn it, if not in inventory, as a 3D-Object owned by the created character on map
Done :)
Profile data comprises all files in the objects directory. A function 'egomapMap()' does the job loading all data needed to play the chosen module. The name of the module used is set with an 'egofile...()'-Function setting the directory to load the module from.
I plan to save te usage of the platform dependent 'dir'-Function by reading in a file 'modules.txt' which has all the valid modules listed, a module name each line.
Two beer or not two beer... rather a malt whisky
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: EGOBOO -- Another editor

Post by penguinflyer5234 »

bitnapper wrote:I load the object(character-)profile into a simple table. Because there are a maximum of 100 different character types per level a linear search is sufficient IMHO.
Bishopia City requires about 128 slots, maybe more.
Spoiler: slotused.txt for bishopia.mod
[code]Slot usage for objects in last module loaded...
0 Slot reserved for import players.
1 Slot reserved for import players.
2 Slot reserved for import players.
3 Slot reserved for import players.
4 Slot reserved for import players.
5 Slot reserved for import players.
6 Slot reserved for import players.
7 Slot reserved for import players.
8 Slot reserved for import players.
9 Slot reserved for import players.
10 Slot reserved for import players.
11 Slot reserved for import players.
12 Slot reserved for import players.
13 Slot reserved for import players.
14 Slot reserved for import players.
15 Slot reserved for import players.
16 Slot reserved for import players.
17 Slot reserved for import players.
18 Slot reserved for import players.
19 Slot reserved for import players.
20 Slot reserved for import players.
21 Slot reserved for import players.
22 Slot reserved for import players.
23 Slot reserved for import players.
24 Slot reserved for import players.
25 Slot reserved for import players.
26 Slot reserved for import players.
27 Slot reserved for import players.
28 Slot reserved for import players.
29 Slot reserved for import players.
30 Slot reserved for import players.
31 Slot reserved for import players.
32 Slot reserved for import players.
33 Slot reserved for import players.
34 Slot reserved for import players.
35 Slot reserved for import players.
36 Tree mp_objects/tree.obj
37 Torch mp_objects/torch.obj
38 Pillar mp_objects/pillar.obj
39 Hay Pile mp_modules/bishopiacity.mod/objects/haypile.obj
40 Well mp_objects/well.obj
41 Iron Gate mp_modules/bishopiacity.mod/objects/gate.obj
42 Sheep mp_modules/bishopiacity.mod/objects/lamb.obj
43 Crate mp_objects/crate.obj
44 Rusty Sword mp_objects/rsword.obj
45 Rusty Shield mp_objects/rshield.obj
46 Stool mp_objects/stool.obj
47 Quarter Staff mp_objects/qstaff.obj
48 Pick mp_objects/pick.obj
49 Shop Keeper mp_modules/bishopiacity.mod/objects/shopkeep.obj
50 Potion mp_objects/levpotion.obj
51 Bishopia Guard mp_modules/bishopiacity.mod/objects/guard.obj
52 G'nome Shopkeep mp_modules/bishopiacity.mod/objects/shopkeep2.obj
53 Book mp_objects/deathcloud.obj
54 Flag Post mp_objects/flagpost.obj
55 trap door mp_modules/bishopiacity.mod/objects/trapdoor.obj
56 Sign mp_modules/bishopiacity.mod/objects/sign.obj
57 Sword mp_objects/sword.obj
58 Pirate mp_modules/bishopiacity.mod/objects/pirate.obj
59 Chest mp_objects/chest.obj
60 Table mp_objects/table.obj
61 Bow mp_objects/lbow.obj
62 Crossbow mp_objects/xbow.obj
63 Rune mp_objects/ressurection.obj
64 Flask mp_objects/oilflask.obj
65 Claw mp_objects/claw.obj
66 Mace mp_objects/spkmace.obj
67 Cinquedea mp_objects/cinquedea.obj
68 Lance mp_objects/lance.obj
69 Potion mp_objects/ppotion.obj
70 Potion mp_objects/spotion.obj
71 Potion mp_objects/lpotion.obj
72 Potion mp_objects/mpotion.obj
73 Wand mp_objects/wandfireball.obj
74 Shield mp_objects/kiteshield.obj
75 Spear mp_objects/spear.obj
76 Shield mp_objects/gshield.obj
77 Hatchet mp_objects/hatchet.obj
78 Mace mp_objects/mace.obj
79 Book mp_objects/meteor.obj
80 Wizard Shopkeeper mp_modules/bishopiacity.mod/objects/magicshop.obj
81 Potion mp_objects/magpotion.obj
82 Broad Sword mp_objects/broadsword.obj
83 Brazier mp_modules/bishopiacity.mod/objects/brazier.obj
84 Shield mp_objects/dshield.obj
85 Trap mp_objects/beartrap.obj
86 Potion mp_objects/powpotion.obj
87 a Long Bow mp_objects/fbow.obj
88 Scroll mp_objects/identify.obj
89 Knife mp_objects/knife.obj
90 Pot mp_objects/pot.obj
91 Wheel mp_modules/bishopiacity.mod/objects/wheel.obj
92 Scimitar mp_objects/scimitar.obj
93 Peasant mp_modules/bishopiacity.mod/objects/peasant.obj
94 Outhouse mp_objects/outhouse.obj
95 War Hammer mp_objects/warham.obj
96 Monk mp_modules/bishopiacity.mod/objects/monk.obj
97 Potion mp_objects/rgpotion.obj
98 Pistol mp_objects/pistol.obj
99 Module Tool mp_modules/bishopiacity.mod/objects/moduletool.obj
100 Gonne mp_objects/gonne.obj
101 Bag of Ninjastars mp_objects/ninjastars.obj
102 Lance mp_objects/magiclance.obj
103 Crossbow mp_objects/magxbow.obj
104 Book mp_objects/teleport.obj
105 Scroll mp_objects/rebirth.obj
106 Bridge of Light mp_objects/bridge.obj
107 Stiletto mp_objects/pstiletto.obj
108 Book mp_objects/iceray.obj
109 Icicle mp_objects/icicles.obj
110 Book mp_objects/orbstorm.obj
111 Book mp_objects/battleward.obj
112 Book mp_objects/size.obj
113 Whirlwind mp_objects/whirlwind.obj
114 Wand mp_objects/wandlightning.obj
115 Rune mp_objects/combatbless.obj
116 Wand mp_objects/wandiceball.obj
117 Wand mp_objects/wandorbstorm.obj
118 Bomb mp_objects/bomb.obj
119 Rune mp_objects/confusion.obj
120 Maul mp_objects/tmaul.obj
121 Wand mp_objects/wandmissile.obj
122 Broad Sword mp_objects/wpnmasterblade.obj
123 Box mp_objects/ammobox.obj
124 Shield mp_objects/dshield.obj
125 Rune mp_objects/resistelements.obj
126 Rune mp_objects/sanctify.obj
127 Book mp_data/globalobjects/book.obj
128 Katana mp_objects/pkatana.obj
129 Rune mp_objects/holybolt.obj
130 Potion mp_objects/lifeelixir.obj
131 Scythe mp_objects/scythe.obj
132 Toilet Plunger mp_objects/plunger.obj
133 Guard Captain mp_modules/bishopiacity.mod/objects/captain.obj
134 Shield mp_objects/crusadershield.obj
135 Grave mp_modules/bishopiacity.mod/objects/grave.obj
136 Crypt mp_modules/bishopiacity.mod/objects/crypt.obj
137 Grave mp_modules/bishopiacity.mod/objects/grave2.obj
138 Commoner mp_modules/bishopiacity.mod/objects/graveyardman.obj
139 Trident mp_objects/trident.obj
140 Scroll mp_objects/truesightscroll.obj
141 Healer mp_objects/townhealer.obj
142 Wizard mp_modules/bishopiacity.mod/objects/archghost.obj
143 Archealogist mp_modules/bishopiacity.mod/objects/marcus.obj
144 Scroll mp_modules/bishopiacity.mod/objects/ancientscript.obj
145 Adventurer mp_modules/bishopiacity.mod/objects/moggy.obj
146 Adventurer mp_modules/bishopiacity.mod/objects/meena.obj
147 pair of Shoes mp_objects/levitationshoes.obj
148 Sabre mp_objects/frostsabre.obj
149 Shovel mp_objects/shovel.obj
150 Quiver mp_objects/quiver.obj
151 Beggar mp_modules/bishopiacity.mod/objects/beggar.obj
152 Mushroom mp_objects/mushroom.obj
153 Commoner mp_modules/bishopiacity.mod/objects/angus.obj
154 Prophet mp_objects/prophet.obj
155 Rune mp_objects/moonbeam.obj
156 Mug mp_objects/grog.obj
157 Crowbar mp_objects/crowbar.obj
158 a wooden crate mp_objects/barrel.obj
159 Book mp_objects/touristguide.obj
160 Bag of Caltrops mp_objects/caltrop.obj
161 Smithy mp_objects/smithy.obj
162 Wagon mp_objects/wagon.obj
163..255 Slot Unused.[/code]
Also: it's more correct to use <SDL_opengl.h> than <GL/gl.h> and <GL/glu.h> because in OSX-land, they're actually <OpenGL/gl.h> and OpenGL/glu.h>
...
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

Bishopia City requires about 128 slots, maybe more.
Thanks for the information. The good thing about using variable slots is, that there is no need for reserved slots for players inventories, which saves about 32 slots. There are only some additional slots needed if objects are spawned while gameplay and for random treasure spawned at loading time of module.
I changed the number of slots in the table to 180 anyway.

Next I work on 3D-Display code and collision detection. after that, I do some more port of game code. I start with a minimum of functionality, expanding it and adding 'bells and whistles' at the end of the work.
Two beer or not two beer... rather a malt whisky
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

Progress bar: XXXX________________ 20% :)

Still working, but no new SVN-Code for now.
Two beer or not two beer... rather a malt whisky
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: EGOBOO -- Another editor

Post by penguinflyer5234 »

...How does one compile the editor or game? :(
...
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

penguinflyer5234 wrote:...How does one compile the editor or game? :(
Editor: Just add all *.c files from the 'editor/src' folder to a project and link OpenGL and SDL
Game: Just add all *.c files from the 'game' foleder to a project and link OpenGl and SDl

The game don't has much functionality yet. It just shows the Start-Menu.
Two beer or not two beer... rather a malt whisky
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: EGOBOO -- Another editor

Post by penguinflyer5234 »

Spoiler: build errors for editor
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/ai.o src/ai.c
src/ai.c:29:17: error: msg.h: No such file or directory
src/ai.c: In function ‘aiMain’:
src/ai.c:65: error: ‘MSG_T’ undeclared (first use in this function)
src/ai.c:65: error: (Each undeclared identifier is reported only once
src/ai.c:65: error: for each function it appears in.)
src/ai.c:65: error: expected ‘;’ before ‘msg_info’
src/ai.c:69: error: ‘msg_info’ undeclared (first use in this function)
Spoiler: build errors for game
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o char.o char.c
In file included from char.c:40:
char.h:30:75: error: ai.h: No such file or directory
In file included from char.c:40:
char.h:331: error: expected specifier-qualifier-list before ‘AI_STATE_T’
char.c: In function ‘charReadCap’:
char.c:612: error: ‘MSG_LOG’ undeclared (first use in this function)
char.c:612: error: (Each undeclared identifier is reported only once
char.c:612: error: for each function it appears in.)
char.c:612: error: ‘MSG_GAME_OBJNOTFOUND’ undeclared (first use in this function)
char.c:612: warning: passing argument 3 of ‘msgSend’ makes integer from pointer without a cast
char.c:613: error: expected ‘;’ before ‘}’ token
char.c: In function ‘charKill’:
char.c:861: error: ‘CHAR_T’ has no member named ‘platform’
char.c:862: error: ‘CHAR_T’ has no member named ‘canuseplatforms’
char.c:863: error: ‘CHAR_T’ has no member named ‘bumpdampen’
char.c:879: error: ‘CHAR_T’ has no member named ‘ai’
char.c:880: error: ‘CHAR_T’ has no member named ‘ai’
char.c: In function ‘charCreate’:
char.c:1126: error: ‘CHAR_T’ has no member named ‘alpha_base’
char.c:1127: error: ‘CHAR_T’ has no member named ‘light_base’
char.c:1128: error: ‘CHAR_T’ has no member named ‘flashand’
char.c:1129: error: ‘CHAR_T’ has no member named ‘dampen’
char.c:1130: error: ‘CHAR_T’ has no member named ‘bumpdampen’
char.c:1135: error: ‘CHAR_T’ has no member named ‘weight’
char.c:1140: error: ‘CHAR_T’ has no member named ‘weight’
char.c: In function ‘charInventoryAdd’:
char.c:1260: error: ‘MSG_TOOBIG’ undeclared (first use in this function)
char.c:1262: error: expected ‘;’ before ‘}’ token
char.c:1293: error: ‘MSG_ITEMFOUND’ undeclared (first use in this function)
char.c: In function ‘charInventoryRemove’:
char.c:1339: error: expected ‘;’ before ‘return’
both with revision 1707
...
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: Build Errors

Post by bitnapper »

I'll fix it as soon as possible with a new SVN-Version
Two beer or not two beer... rather a malt whisky
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: EGOBOO -- Another editor

Post by penguinflyer5234 »

Spoiler: all build errors for editor
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/ai.o src/ai.c
src/ai.c:29:17: error: msg.h: No such file or directory
src/ai.c: In function ‘aiMain’:
src/ai.c:65: error: ‘MSG_T’ undeclared (first use in this function)
src/ai.c:65: error: (Each undeclared identifier is reported only once
src/ai.c:65: error: for each function it appears in.)
src/ai.c:65: error: expected ‘;’ before ‘msg_info’
src/ai.c:69: error: ‘msg_info’ undeclared (first use in this function)
make: *** [src/ai.o] Error 1
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/char.o src/char.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/editdraw.o src/editdraw.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/editfile.o src/editfile.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/editmain.o src/editmain.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/editor.o src/editor.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/egofont.o src/egofont.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/egomap.o src/egomap.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/game.o src/game.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/idsz.o src/idsz.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/misc.o src/misc.c
src/misc.c: In function ‘miscRandRange’:
src/misc.c:139: warning: integer overflow in expression
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/particle.o src/particle.c
src/particle.c:137: error: expected specifier-qualifier-list before ‘PRT_ORI_T’
src/particle.c:354: error: conflicting types for ‘particleLoad’
src/particle.h:139: error: previous declaration of ‘particleLoad’ was here
src/particle.c: In function ‘particleSpawn’:
src/particle.c:465: error: ‘SDLGL3D_OBJECT’ has no member named ‘follow_obj’
src/particle.c:472: error: too many arguments to function ‘miscRandVal’
src/particle.c:474: error: too many arguments to function ‘miscRandVal’
src/particle.c:476: error: too many arguments to function ‘miscRandVal’
src/particle.c:484: error: too many arguments to function ‘miscRandVal’
src/particle.c:486: error: too many arguments to function ‘miscRandVal’
src/particle.c:520: error: ‘PIP_T’ has no member named ‘request_count’
src/particle.c:527: error: ‘PIP_T’ has no member named ‘create_count’
src/particle.c: In function ‘particleOnBump’:
src/particle.c:574: error: ‘loc_pprt’ undeclared (first use in this function)
src/particle.c:574: error: (Each undeclared identifier is reported only once
src/particle.c:574: error: for each function it appears in.)
make: *** [src/particle.o] Error 1
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/sdlgl.o src/sdlgl.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/sdlgl3d.o src/sdlgl3d.c
src/sdlgl3d.c: In function ‘sdlgl3dObjectList’:
src/sdlgl3d.c:1112: warning: comparison between pointer and integer
src/sdlgl3d.c:1148: warning: comparison between pointer and integer
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/sdlglcfg.o src/sdlglcfg.c
src/sdlglcfg.c:585:20: warning: unknown escape sequence '\/'
src/sdlglcfg.c:585:20: warning: unknown escape sequence '\/'
src/sdlglcfg.c:1034:19: warning: unknown escape sequence '\/'
src/sdlglcfg.c:1034:19: warning: unknown escape sequence '\/'
src/sdlglcfg.c:1130:19: warning: unknown escape sequence '\/'
src/sdlglcfg.c:1130:19: warning: unknown escape sequence '\/'
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/sdlglfld.o src/sdlglfld.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/sdlglmd2.o src/sdlglmd2.c
src/sdlglmd2.c:30:39: error: alloc.h: No such file or directory
make: *** [src/sdlglmd2.o] Error 1
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/sdlglstr.o src/sdlglstr.c
src/sdlglstr.c: In function ‘sdlglstrPrintValue’:
src/sdlglstr.c:798: warning: assignment from incompatible pointer type
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/sdlgltex.o src/sdlgltex.c
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_WCHAR_T_DEFINED -c -o src/wallmake.o src/wallmake.c
make: Target `all' not remade because of errors.
malloc is defined in stdlib.h
SDL_opengl.h should be used instead of GL/gl.h and GL/glu.h
also I had to define _WCHAR_T_DEFINED because wchar_t was defined somewhere (forgot where) in the OS X system headers :|
...
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

Thanks for your feedback. GCC seems to be stricter than my old Borland compiler :\

I removed the files 'ai.c' and 'particle.c' from the Editors directory, because they are is not needed, my fault.
Both codes should compile now. The "unknown escape sequence '\/" coud be removed and removed by another implementation for a string with two slashes forward at the start (Thats the comment line for the Files created by the Editor).

The warning 'comparison between pointer and integer' in 'sdlgl3d.c' I'll check later.

Sorry, but not to much time here at the moment :(. I will take a better look at it this weekend.
Two beer or not two beer... rather a malt whisky
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: EGOBOO -- Another editor

Post by penguinflyer5234 »

the first one is "if (NULL == *from)" where from is an int *
the second one is "if (NULL == *to)" where to is also an int *

the warning in sdlglstr.c is referring to "ppchar = (char *)((void *)pdata);" where ppchar is a char ** and pdata is a char *. shouldn't it be something like "ppchar = (char **)data;"?

wheee OS X doesn't have _strlwr so much fun (odd though that it got to the linker part :?)
...
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

penguinflyer5234 wrote:wheee OS X doesn't have _strlwr so much fun (odd though that it got to the linker part :?)
Fixed the two warnings. Maybe the "platform.h" header is needed for the string thing too ? :roll:

I'm working on a solution for the '#dependency' thing at loading time for the spawn files. After that I try to load the adventurer module as example in the 'game' code. After that I'll add the menu for choosing the different starter modules.

Off SVN I work on data restructuring to make decoding of scripts easier and make it better extensible in a later stage.
I do some daily work. Unfortuantely, the results of it are not on the SVN until they compile and work in my sandbox.

To have the 3D-Engine reprocduce the behaviour of the actual one will be the large amount of work :\
Two beer or not two beer... rather a malt whisky
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: EGOBOO -- Another editor

Post by penguinflyer5234 »

strlwr seems to be a Windows-only thing; Egoboo currently uses its own function on GCC that's not MinGW.
...
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

penguinflyer5234 wrote:strlwr seems to be a Windows-only thing; Egoboo currently uses its own function on GCC that's not MinGW.
Do you have a proposal how to solve it ? In platform.h there is a definition

Code: Select all

 	# define stricmp strcasecmp
which could be used, too, because the strings have to be compared case-insensitive. There is also another definition in 'platform.h':

Code: Select all

// fix the naming of some linux-flavored functions in MSVC
 	# define stricmp _stricmp
 	# define strlwr _strlwr
Thats why I wonder that it's not defined in MinGW :\

Does the function 'tolower()' exist in MinGW in 'ctype.h' ? Thats the other possibility to create a 'tolower' function on the fly to circumvent the use of 'strlwr'.
Two beer or not two beer... rather a malt whisky
Post Reply