1 | /* |
1 | /* |
2 | * static char *rcsid_utils_c = |
2 | * static char *rcsid_utils_c = |
3 | * "$Id: utils.C,v 1.4 2006/09/04 11:07:59 root Exp $"; |
3 | * "$Id: utils.C,v 1.7 2006/09/08 17:34:02 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
304 | |
304 | |
305 | /* set the materialname and type for an item */ |
305 | /* set the materialname and type for an item */ |
306 | void set_materialname(object *op, int difficulty, materialtype_t *nmt) |
306 | void set_materialname(object *op, int difficulty, materialtype_t *nmt) |
307 | { |
307 | { |
308 | materialtype_t *mt, *lmt; |
308 | materialtype_t *mt, *lmt; |
|
|
309 | #ifdef NEW_MATERIAL_CODE |
309 | int j; |
310 | int j; |
|
|
311 | #endif |
310 | |
312 | |
311 | if (op->materialname != NULL) |
313 | if (op->materialname != NULL) |
312 | return; |
314 | return; |
313 | |
315 | |
314 | |
316 | |
… | |
… | |
483 | } |
485 | } |
484 | else strcpy(input, tmp); |
486 | else strcpy(input, tmp); |
485 | return; |
487 | return; |
486 | } |
488 | } |
487 | |
489 | |
488 | //TODO: overhead due to specifying size twice |
|
|
489 | void * |
490 | void * |
490 | zero_initialised::operator new (size_t s) |
491 | zero_initialised::operator new (size_t s) |
491 | { |
492 | { |
492 | return g_slice_alloc0 (s); |
493 | return g_slice_alloc0 (s); |
493 | } |
494 | } |