diff options
| author | Dusan Durech <dusan@debian.debian> | 2009-04-12 14:29:51 +0200 |
|---|---|---|
| committer | Dusan Durech <dusan@debian.debian> | 2009-04-12 14:29:51 +0200 |
| commit | 876fc624df9728ee0feee26e1b31b53ed9ef3326 (patch) | |
| tree | e20814ab6d07fb892284dcee11bc492532bdabaa /src/modules | |
| parent | dff1cbc31ca8d585c01f5bebd08e50cf07fd2b0c (diff) | |
convert all name function from oldName to new_name
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/modAI.c | 102 | ||||
| -rw-r--r-- | src/modules/modMove.c | 36 | ||||
| -rw-r--r-- | src/modules/modPipe.c | 54 | ||||
| -rw-r--r-- | src/modules/modTeleport.c | 46 | ||||
| -rw-r--r-- | src/modules/modWall.c | 44 |
5 files changed, 141 insertions, 141 deletions
diff --git a/src/modules/modAI.c b/src/modules/modAI.c index a6fa311..e8b5172 100644 --- a/src/modules/modAI.c +++ b/src/modules/modAI.c @@ -67,20 +67,20 @@ void forkAlternative(list_t * list, alternative_t * p, int w, int h) switch (p->route) { case TUX_UP: - addList(list, cloneAlternative(p, TUX_RIGHT, x + (w + 5), y)); - addList(list, cloneAlternative(p, TUX_LEFT, x - (w + 5), y)); + list_add(list, cloneAlternative(p, TUX_RIGHT, x + (w + 5), y)); + list_add(list, cloneAlternative(p, TUX_LEFT, x - (w + 5), y)); break; case TUX_RIGHT: - addList(list, cloneAlternative(p, TUX_UP, x, y - (h + 5))); - addList(list, cloneAlternative(p, TUX_DOWN, x, y + (h + 5))); + list_add(list, cloneAlternative(p, TUX_UP, x, y - (h + 5))); + list_add(list, cloneAlternative(p, TUX_DOWN, x, y + (h + 5))); break; case TUX_LEFT: - addList(list, cloneAlternative(p, TUX_UP, x, y - (h + 5))); - addList(list, cloneAlternative(p, TUX_DOWN, x, y + (h + 5))); + list_add(list, cloneAlternative(p, TUX_UP, x, y - (h + 5))); + list_add(list, cloneAlternative(p, TUX_DOWN, x, y + (h + 5))); break; case TUX_DOWN: - addList(list, cloneAlternative(p, TUX_RIGHT, x + (w + 5), y)); - addList(list, cloneAlternative(p, TUX_LEFT, x - (w + 5), y)); + list_add(list, cloneAlternative(p, TUX_RIGHT, x + (w + 5), y)); + list_add(list, cloneAlternative(p, TUX_LEFT, x - (w + 5), y)); break; } @@ -138,10 +138,10 @@ tux_t *findOtherTux(space_t * space) { int i; - for (i = 0; i < getSpaceCount(space); i++) { + for (i = 0; i < space_get_count(space); i++) { tux_t *thisTux; - thisTux = getItemFromSpace(space, i); + thisTux = space_get_item(space, i); if (thisTux->control != TUX_CONTROL_AI) { return thisTux; @@ -158,31 +158,31 @@ static void shotTux(arena_t * arena, tux_t * tux_ai, tux_t * tux_rival) int x_rival, y_rival; int w, h; - export_fce->fce_getTuxProportion(tux_ai, &x_ai, &y_ai, &w, &h); - export_fce->fce_getTuxProportion(tux_rival, &x_rival, &y_rival, &w, &h); + export_fce->fce_tux_get_proportion(tux_ai, &x_ai, &y_ai, &w, &h); + export_fce->fce_tux_get_proportion(tux_rival, &x_rival, &y_rival, &w, &h); if (y_rival < y_ai && x_rival > x_ai && x_rival < x_ai + limit) { - export_fce->fce_actionTux(tux_ai, TUX_UP); - export_fce->fce_actionTux(tux_ai, TUX_SHOT); + export_fce->fce_tux_action(tux_ai, TUX_UP); + export_fce->fce_tux_action(tux_ai, TUX_SHOT); } if (x_rival > x_ai && y_rival > y_ai && y_rival < y_ai + limit) { - export_fce->fce_actionTux(tux_ai, TUX_RIGHT); - export_fce->fce_actionTux(tux_ai, TUX_SHOT); + export_fce->fce_tux_action(tux_ai, TUX_RIGHT); + export_fce->fce_tux_action(tux_ai, TUX_SHOT); } if (x_rival < x_ai && y_rival > y_ai && y_rival < y_ai + limit) { - export_fce->fce_actionTux(tux_ai, TUX_LEFT); - export_fce->fce_actionTux(tux_ai, TUX_SHOT); + export_fce->fce_tux_action(tux_ai, TUX_LEFT); + export_fce->fce_tux_action(tux_ai, TUX_SHOT); } if (y_rival > y_ai && x_rival > x_ai && x_rival < x_ai + limit) { - export_fce->fce_actionTux(tux_ai, TUX_DOWN); - export_fce->fce_actionTux(tux_ai, TUX_SHOT); + export_fce->fce_tux_action(tux_ai, TUX_DOWN); + export_fce->fce_tux_action(tux_ai, TUX_SHOT); } } -static void eventTuxAI(tux_t * tux) +static void tux_eventAI(tux_t * tux) { arena_t *arena; tux_t *rivalTux; @@ -200,10 +200,10 @@ static void eventTuxAI(tux_t * tux) int countLimit = 0; int countDo = 0; - export_fce->fce_getTuxProportion(tux, &x, &y, &w, &h); + export_fce->fce_tux_get_proportion(tux, &x, &y, &w, &h); //printf("tux AI %d %d\n", x, y); - arena = export_fce->fce_getCurrentArena(); + arena = export_fce->fce_arena_get_current(); rivalTux = findOtherTux(arena->spaceTux); @@ -211,19 +211,19 @@ static void eventTuxAI(tux_t * tux) return; } - listAlternative = newList(); - listDst = newList(); - listFork = newList(); + listAlternative = list_new(); + listDst = list_new(); + listFork = list_new(); shotTux(arena, tux, rivalTux); - export_fce->fce_getTuxProportion(rivalTux, &rival_x, &rival_y, NULL, NULL); + export_fce->fce_tux_get_proportion(rivalTux, &rival_x, &rival_y, NULL, NULL); //printf("tux rival %d %d\n", rival_x, rival_y); - addList(listAlternative, newAlternative(TUX_UP, x, y - (h + 10))); - addList(listAlternative, newAlternative(TUX_RIGHT, x + (w + 10), y)); - addList(listAlternative, newAlternative(TUX_LEFT, x - (w + 10), y)); - addList(listAlternative, newAlternative(TUX_DOWN, x, y + (h + 10))); + list_add(listAlternative, newAlternative(TUX_UP, x, y - (h + 10))); + list_add(listAlternative, newAlternative(TUX_RIGHT, x + (w + 10), y)); + list_add(listAlternative, newAlternative(TUX_LEFT, x - (w + 10), y)); + list_add(listAlternative, newAlternative(TUX_DOWN, x, y + (h + 10))); my_index = -1; while (1) { @@ -237,10 +237,10 @@ static void eventTuxAI(tux_t * tux) //printf("listFork->count = %d\n", listFork->count); for (j = 0; j < listFork->count; j++) { - addList(listAlternative, listFork->list[j]); + list_add(listAlternative, listFork->list[j]); } - listDoEmpty(listFork); + list_do_empty(listFork); my_index = 0; } @@ -255,7 +255,7 @@ static void eventTuxAI(tux_t * tux) break; if (this->step > 100) { - delListItem(listAlternative, my_index, destroyAlternative); + list_del_item(listAlternative, my_index, destroyAlternative); countLimit++; my_index--; continue; @@ -263,27 +263,27 @@ static void eventTuxAI(tux_t * tux) moveAlternative(this, w * 2); - if (export_fce->fce_isFreeSpace(arena, this->x, this->y, w, h) == 1) { + if (export_fce->fce_arena__is_free_space(arena, this->x, this->y, w, h) == 1) { forkAlternative(listFork, this, 2 * w, 2 * h); countFork++; continue; } if (export_fce-> - fce_conflictSpace(this->x, this->y, w, h, rival_x, rival_y, w, + fce_arena_conflict_space(this->x, this->y, w, h, rival_x, rival_y, w, h)) { //printf("this->step = %d\n", this->step); - delList(listAlternative, my_index); - addList(listDst, this); + list_del(listAlternative, my_index); + list_add(listDst, this); my_index--; //continue; break; } - if (export_fce->fce_isFreeSpace(arena, this->x, this->y, w, h) == 0) { + if (export_fce->fce_arena__is_free_space(arena, this->x, this->y, w, h) == 0) { //forkAlternative(listFork, this, w*2, h*2); - delListItem(listAlternative, my_index, destroyAlternative); + list_del_item(listAlternative, my_index, destroyAlternative); my_index--; countDel++; @@ -309,12 +309,12 @@ static void eventTuxAI(tux_t * tux) } if (recRoute != 0) { - export_fce->fce_actionTux(tux, recRoute); + export_fce->fce_tux_action(tux, recRoute); } - destroyListItem(listFork, destroyAlternative); - destroyListItem(listAlternative, destroyAlternative); - destroyListItem(listDst, destroyAlternative); + list_destroy_item(listFork, destroyAlternative); + list_destroy_item(listAlternative, destroyAlternative); + list_destroy_item(listDst, destroyAlternative); /* printf("countFork = %d\n", countFork); printf("countDel = %d\n", countDel); @@ -326,7 +326,7 @@ static void eventTuxAI(tux_t * tux) static void action_tuxAI(space_t * space, tux_t * tux, void *p) { if (tux->control == TUX_CONTROL_AI && tux->status == TUX_STATUS_ALIVE) { - eventTuxAI(tux); + tux_eventAI(tux); } } @@ -339,19 +339,19 @@ int event() //int i; if (lastEvent == 0) { - lastEvent = export_fce->fce_getMyTime(); + lastEvent = export_fce->fce_timer_get_current_time(); } - curentTime = export_fce->fce_getMyTime(); + curentTime = export_fce->fce_timer_get_current_time(); if (curentTime - lastEvent < 25) { return 0; } - lastEvent = export_fce->fce_getMyTime(); + lastEvent = export_fce->fce_timer_get_current_time(); //printf("event AI\n"); - arena = export_fce->fce_getCurrentArena(); + arena = export_fce->fce_arena_get_current(); if (arena == NULL) { return 0; @@ -359,7 +359,7 @@ int event() countTuxAI = 0; - actionSpace(arena->spaceTux, action_tuxAI, NULL); + space_action(arena->spaceTux, action_tuxAI, NULL); /* for( i = 0 ; i < arena->spaceTux->list->count ; i++ ) { @@ -370,7 +370,7 @@ int event() if( thisTux->control == TUX_CONTROL_AI && thisTux->status == TUX_STATUS_ALIVE ) { - eventTux(thisTux); + tux_event(thisTux); countTuxAI = 0; } } diff --git a/src/modules/modMove.c b/src/modules/modMove.c index 5059d73..deaf71e 100644 --- a/src/modules/modMove.c +++ b/src/modules/modMove.c @@ -29,7 +29,7 @@ static void move_tux(tux_t * tux, int x, int y, int w, int h) int dist_x = 0, dist_y = 0; // no warnning if (tux->bonus == BONUS_GHOST || - export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_CLIENT) + export_fce->fce_netMultiplayer_get_game_type() == NET_GAME_TYPE_CLIENT) return; switch (tux->position) { case TUX_UP: @@ -53,14 +53,14 @@ static void move_tux(tux_t * tux, int x, int y, int w, int h) break; } if (export_fce-> - fce_isFreeSpace(export_fce->fce_getCurrentArena(), dist_x, dist_y, + fce_arena__is_free_space(export_fce->fce_arena_get_current(), dist_x, dist_y, TUX_WIDTH, TUX_HEIGHT)) { - moveObjectInSpace(export_fce->fce_getCurrentArena()->spaceTux, tux, + space_move_object(export_fce->fce_arena_get_current()->spaceTux, tux, dist_x, dist_y); #ifndef PUBLIC_SERVER - //playSound("teleport", SOUND_GROUP_BASE); + //sound_play("teleport", SOUND_GROUP_BASE); #endif - if (export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_SERVER) { + if (export_fce->fce_netMultiplayer_get_game_type() == NET_GAME_TYPE_SERVER) { char msg[STR_PROTO_SIZE]; sprintf(msg, "movetux %d %d %d", tux->id, dist_x, dist_y); if (tux->bonus == BONUS_HIDDEN) @@ -114,7 +114,7 @@ static void transformShot(shot_t * shot, int position) shot->isCanKillAuthor = TRUE; if (shot->gun == GUN_LASSER) - export_fce->fce_transformOnlyLasser(shot); + export_fce->fce_shot_transform_lasser(shot); } static void @@ -157,9 +157,9 @@ move_shot(shot_t * shot, int position, int src_x, int src_y, break; } - moveObjectInSpace(export_fce->fce_getCurrentArena()->spaceShot, shot, + space_move_object(export_fce->fce_arena_get_current()->spaceShot, shot, new_x, new_y); - if (export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_SERVER) { + if (export_fce->fce_netMultiplayer_get_game_type() == NET_GAME_TYPE_SERVER) { char msg[STR_PROTO_SIZE]; sprintf(msg, "moveshot %d %d %d %d %d %d", @@ -172,8 +172,8 @@ move_shot(shot_t * shot, int position, int src_x, int src_y, int init(export_fce_t * p) { export_fce = p; - export_fce->fce_addToShareFce("move_tux", (void *) move_tux); - export_fce->fce_addToShareFce("move_shot", (void *) move_shot); + export_fce->fce_shareFunction_add("move_tux", (void *) move_tux); + export_fce->fce_shareFunction_add("move_shot", (void *) move_shot); return 0; } @@ -188,11 +188,11 @@ static void proto_movetux(char *msg) assert(msg != NULL); sscanf(msg, "%s %d %d %d", cmd, &id, &x, &y); - space = export_fce->fce_getCurrentArena()->spaceTux; - tux = getObjectFromSpaceWithID(space, id); + space = export_fce->fce_arena_get_current()->spaceTux; + tux = space_get_object_id(space, id); if (tux != NULL) - moveObjectInSpace(space, tux, x, y); + space_move_object(space, tux, x, y); } static void proto_moveshot(char *msg) @@ -207,19 +207,19 @@ static void proto_moveshot(char *msg) sscanf(msg, "%s %d %d %d %d %d %d", cmd, &shot_id, &x, &y, &px, &py, &position); - space = export_fce->fce_getCurrentArena()->spaceShot; + space = export_fce->fce_arena_get_current()->spaceShot; - if ((shot = getObjectFromSpaceWithID(space, shot_id)) == NULL) + if ((shot = space_get_object_id(space, shot_id)) == NULL) return; - moveObjectInSpace(space, shot, x, y); + space_move_object(space, shot, x, y); shot->isCanKillAuthor = 1; shot->position = position; shot->px = px; shot->py = py; if (shot->gun == GUN_LASSER) - export_fce->fce_transformOnlyLasser(shot); + export_fce->fce_shot_transform_lasser(shot); } #ifndef PUBLIC_SERVER @@ -247,7 +247,7 @@ void cmdArena(char *line) void recvMsg(char *msg) { - if (export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_SERVER) + if (export_fce->fce_netMultiplayer_get_game_type() == NET_GAME_TYPE_SERVER) return; if (strncmp(msg, "movetux", 7) == 0) diff --git a/src/modules/modPipe.c b/src/modules/modPipe.c index 5d1728f..455bdce 100644 --- a/src/modules/modPipe.c +++ b/src/modules/modPipe.c @@ -165,7 +165,7 @@ static void cmd_teleport(char *line) atoi(str_w), atoi(str_h), atoi(str_layer), atoi(str_id), atoi(str_id_out), atoi(str_position), - export_fce->fce_getImage(IMAGE_GROUP_USER, str_image)); + export_fce->fce_image_get(IMAGE_GROUP_USER, str_image)); #endif #ifdef PUBLIC_SERVER @@ -177,19 +177,19 @@ static void cmd_teleport(char *line) if (spacePipe == NULL) { spacePipe = - newSpace(export_fce->fce_getCurrentArena()->w, - export_fce->fce_getCurrentArena()->h, 320, 240, + space_new(export_fce->fce_arena_get_current()->w, + export_fce->fce_arena_get_current()->h, 320, 240, getStatusPipe, setStatusPipe); } - addObjectToSpace(spacePipe, new); + space_add(spacePipe, new); } static void moveShotFromPipe(shot_t * shot, pipe_t * pipe) { pipe_t *distPipe; - distPipe = getObjectFromSpaceWithID(spacePipe, pipe->id_out); + distPipe = space_get_object_id(spacePipe, pipe->id_out); if (distPipe == NULL) { fprintf(stderr, "Pipe ID for pipe \"%d\" was not found\n", pipe->id); @@ -204,13 +204,13 @@ int init(export_fce_t * p) { export_fce = p; - listPipe = newList(); + listPipe = list_new(); - if (export_fce->fce_loadDepModule("libmodMove") != 0) { + if (export_fce->fce_module_load_dep("libmodMove") != 0) { return -1; } - if ((fce_move_shot = export_fce->fce_getShareFce("move_shot")) == NULL) { + if ((fce_move_shot = export_fce->fce_shareFunction_get("move_shot")) == NULL) { return -1; } @@ -230,8 +230,8 @@ int draw(int x, int y, int w, int h) return 0; } - actionSpaceFromLocation(spacePipe, action_drawpipe, NULL, x, y, w, h); - //printSpace(spacePipe); + space_action_from_location(spacePipe, action_drawpipe, NULL, x, y, w, h); + //space_print(spacePipe); return 0; } @@ -267,9 +267,9 @@ static void action_eventpipe(space_t * space, pipe_t * pipe, shot_t * shot) arena_t *arena; tux_t *author; - arena = export_fce->fce_getCurrentArena(); + arena = export_fce->fce_arena_get_current(); - author = getObjectFromSpaceWithID(arena->spaceTux, shot->author_id); + author = space_get_object_id(arena->spaceTux, shot->author_id); if (author != NULL && author->bonus == BONUS_GHOST && author->bonus_time > 0) { @@ -277,14 +277,14 @@ static void action_eventpipe(space_t * space, pipe_t * pipe, shot_t * shot) } if (negPosition(shot->position) == pipe->position && - export_fce->fce_getNetTypeGame() != NET_GAME_TYPE_CLIENT) { + export_fce->fce_netMultiplayer_get_game_type() != NET_GAME_TYPE_CLIENT) { moveShotFromPipe(shot, pipe); } else { if (shot->gun == GUN_BOMBBALL && - export_fce->fce_getNetTypeGame() != NET_GAME_TYPE_CLIENT) { - export_fce->fce_boundBombBall(shot); + export_fce->fce_netMultiplayer_get_game_type() != NET_GAME_TYPE_CLIENT) { + export_fce->fce_shot_bound_bombBall(shot); } else { - //delObjectFromSpaceWithObject(arena->spaceShot, shot, export_fce->fce_destroyShot); + //space_del_with_item(arena->spaceShot, shot, export_fce->fce_shot_destroy); shot->del = TRUE; } } @@ -296,9 +296,9 @@ static void action_eventpipe(space_t * space, pipe_t * pipe, shot_t * shot) arena_t *arena; tux_t *author; - arena = export_fce->fce_getCurrentArena(); + arena = export_fce->fce_arena_get_current(); - author = getObjectFromSpaceWithID(arena->spaceTux, shot->author_id); + author = space_get_object_id(arena->spaceTux, shot->author_id); if (author != NULL && author->bonus == BONUS_GHOST && author->bonus_time > 0) { @@ -309,7 +309,7 @@ static void action_eventpipe(space_t * space, pipe_t * pipe, shot_t * shot) moveShotFromPipe(shot, pipe); } else { if (shot->gun == GUN_BOMBBALL) { - export_fce->fce_boundBombBall(shot); + export_fce->fce_shot_bound_bombBall(shot); } else { shot->del = TRUE; } @@ -319,15 +319,15 @@ static void action_eventpipe(space_t * space, pipe_t * pipe, shot_t * shot) static void action_eventshot(space_t * space, shot_t * shot, space_t * p_spacePipe) { - actionSpaceFromLocation(p_spacePipe, action_eventpipe, shot, shot->x, + space_action_from_location(p_spacePipe, action_eventpipe, shot, shot->x, shot->y, shot->w, shot->h); if (shot->del == TRUE) { - if (getNetTypeGame() == NET_GAME_TYPE_SERVER) { + if (netMultiplayer_get_game_type() == NET_GAME_TYPE_SERVER) { proto_send_del_server(PROTO_SEND_ALL, NULL, shot->id); } - delObjectFromSpaceWithObject(space, shot, export_fce->fce_destroyShot); + space_del_with_item(space, shot, export_fce->fce_shot_destroy); } } @@ -338,11 +338,11 @@ int event() } // na skusku - if (export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_CLIENT) { + if (export_fce->fce_netMultiplayer_get_game_type() == NET_GAME_TYPE_CLIENT) { return 0; } - actionSpace(export_fce->fce_getCurrentArena()->spaceShot, + space_action(export_fce->fce_arena_get_current()->spaceShot, action_eventshot, spacePipe); return 0; @@ -354,7 +354,7 @@ int isConflict(int x, int y, int w, int h) return 0; } - return isConflictWithObjectFromSpace(spacePipe, x, y, w, h); + return space_is_conflict_with_object(spacePipe, x, y, w, h); } void cmdArena(char *line) @@ -370,8 +370,8 @@ void recvMsg(char *msg) int destroy() { - destroySpaceWithObject(spacePipe, destroyPipe); - destroyList(listPipe); + space_destroy_with_item(spacePipe, destroyPipe); + list_destroy(listPipe); return 0; } diff --git a/src/modules/modTeleport.c b/src/modules/modTeleport.c index 8f74eca..b7079ee 100644 --- a/src/modules/modTeleport.c +++ b/src/modules/modTeleport.c @@ -148,7 +148,7 @@ static void cmd_teleport(char *line) new = newTeleport(atoi(str_x), atoi(str_y), atoi(str_w), atoi(str_h), atoi(str_layer), - export_fce->fce_getImage(IMAGE_GROUP_USER, str_image)); + export_fce->fce_image_get(IMAGE_GROUP_USER, str_image)); #endif #ifdef PUBLIC_SERVER @@ -158,12 +158,12 @@ static void cmd_teleport(char *line) if (spaceTeleport == NULL) { spaceTeleport = - newSpace(export_fce->fce_getCurrentArena()->w, - export_fce->fce_getCurrentArena()->h, 320, 240, + space_new(export_fce->fce_arena_get_current()->w, + export_fce->fce_arena_get_current()->h, 320, 240, getStatusTeleport, setStatusTeleport); } - addObjectToSpace(spaceTeleport, new); + space_add(spaceTeleport, new); } static teleport_t *getRandomTeleportBut(space_t * space, teleport_t * teleport) @@ -171,10 +171,10 @@ static teleport_t *getRandomTeleportBut(space_t * space, teleport_t * teleport) int my_index; do { - my_index = random() % getSpaceCount(space); - } while (getItemFromSpace(space, my_index) == teleport); + my_index = random() % space_get_count(space); + } while (space_get_item(space, my_index) == teleport); - return (teleport_t *) getItemFromSpace(space, my_index); + return (teleport_t *) space_get_item(space, my_index); } static int getRandomPosition() @@ -204,7 +204,7 @@ static void teleportTux(tux_t * tux, teleport_t * teleport) teleport_t *distTeleport; if (tux->bonus == BONUS_GHOST || - export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_CLIENT) { + export_fce->fce_netMultiplayer_get_game_type() == NET_GAME_TYPE_CLIENT) { return; } @@ -230,17 +230,17 @@ int init(export_fce_t * p) { export_fce = p; - listTeleport = newList(); + listTeleport = list_new(); - if (export_fce->fce_loadDepModule("libmodMove") != 0) { + if (export_fce->fce_module_load_dep("libmodMove") != 0) { return -1; } - if ((fce_move_tux = export_fce->fce_getShareFce("move_tux")) == NULL) { + if ((fce_move_tux = export_fce->fce_shareFunction_get("move_tux")) == NULL) { return -1; } - if ((fce_move_shot = export_fce->fce_getShareFce("move_shot")) == NULL) { + if ((fce_move_shot = export_fce->fce_shareFunction_get("move_shot")) == NULL) { return -1; } @@ -261,7 +261,7 @@ int draw(int x, int y, int w, int h) return 0; } - actionSpaceFromLocation(spaceTeleport, action_drawteleport, NULL, x, y, w, + space_action_from_location(spaceTeleport, action_drawteleport, NULL, x, y, w, h); return 0; @@ -274,9 +274,9 @@ action_eventteleportshot(space_t * space, teleport_t * teleport, shot_t * shot) arena_t *arena; tux_t *author; - arena = export_fce->fce_getCurrentArena(); + arena = export_fce->fce_arena_get_current(); - author = getObjectFromSpaceWithID(arena->spaceTux, shot->author_id); + author = space_get_object_id(arena->spaceTux, shot->author_id); if (author != NULL && author->bonus == BONUS_GHOST && author->bonus_time > 0) { @@ -289,7 +289,7 @@ action_eventteleportshot(space_t * space, teleport_t * teleport, shot_t * shot) static void action_eventshot(space_t * space, shot_t * shot, space_t * p_spaceTeleport) { - actionSpaceFromLocation(p_spaceTeleport, action_eventteleportshot, shot, + space_action_from_location(p_spaceTeleport, action_eventteleportshot, shot, shot->x, shot->y, shot->w, shot->h); } @@ -304,9 +304,9 @@ action_eventtux(space_t * space, tux_t * tux, space_t * p_spaceTeleport) { int x, y, w, h; - export_fce->fce_getTuxProportion(tux, &x, &y, &w, &h); + export_fce->fce_tux_get_proportion(tux, &x, &y, &w, &h); - actionSpaceFromLocation(p_spaceTeleport, action_eventteleporttux, tux, x, y, + space_action_from_location(p_spaceTeleport, action_eventteleporttux, tux, x, y, w, h); } @@ -316,13 +316,13 @@ int event() return 0; } - if (export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_CLIENT) { + if (export_fce->fce_netMultiplayer_get_game_type() == NET_GAME_TYPE_CLIENT) { return 0; } - actionSpace(export_fce->fce_getCurrentArena()->spaceShot, + space_action(export_fce->fce_arena_get_current()->spaceShot, action_eventshot, spaceTeleport); - actionSpace(export_fce->fce_getCurrentArena()->spaceTux, action_eventtux, + space_action(export_fce->fce_arena_get_current()->spaceTux, action_eventtux, spaceTeleport); return 0; @@ -349,7 +349,7 @@ void recvMsg(char *msg) int destroy() { - destroySpaceWithObject(spaceTeleport, destroyTeleport); - destroyList(listTeleport); + space_destroy_with_item(spaceTeleport, destroyTeleport); + list_destroy(listTeleport); return 0; } diff --git a/src/modules/modWall.c b/src/modules/modWall.c index d3734d5..b6fb54e 100644 --- a/src/modules/modWall.c +++ b/src/modules/modWall.c @@ -213,7 +213,7 @@ static void cmd_wall(char *line) #ifndef PUBLIC_SERVER new = newWall(x, y, w, h, img_x, img_y, layer, - export_fce->fce_getImage(IMAGE_GROUP_USER, str_image)); + export_fce->fce_image_get(IMAGE_GROUP_USER, str_image)); #endif #ifdef PUBLIC_SERVER @@ -222,29 +222,29 @@ static void cmd_wall(char *line) if (spaceWall == NULL) { spaceWall = - newSpace(export_fce->fce_getCurrentArena()->w, - export_fce->fce_getCurrentArena()->h, 320, 240, + space_new(export_fce->fce_arena_get_current()->w, + export_fce->fce_arena_get_current()->h, 320, 240, getStatusWall, setStatusWall); #ifndef PUBLIC_SERVER spaceImgWall = - newSpace(export_fce->fce_getCurrentArena()->w, - export_fce->fce_getCurrentArena()->h, 320, 240, + space_new(export_fce->fce_arena_get_current()->w, + export_fce->fce_arena_get_current()->h, 320, 240, getStatusImgWall, setStatusImgWall); #endif } - addObjectToSpace(spaceWall, new); + space_add(spaceWall, new); #ifndef PUBLIC_SERVER - addObjectToSpace(spaceImgWall, new); + space_add(spaceImgWall, new); #endif } int init(export_fce_t * p) { export_fce = p; - listWall = newList(); + listWall = list_new(); return 0; } @@ -262,9 +262,9 @@ int draw(int x, int y, int w, int h) return 0; } - actionSpaceFromLocation(spaceImgWall, action_drawwall, NULL, x, y, w, h); + space_action_from_location(spaceImgWall, action_drawwall, NULL, x, y, w, h); - //printSpace(spaceWall); + //space_print(spaceWall); return 0; } @@ -275,9 +275,9 @@ static void action_eventwall(space_t * space, wall_t * wall, shot_t * shot) arena_t *arena; tux_t *author; - arena = export_fce->fce_getCurrentArena(); + arena = export_fce->fce_arena_get_current(); - author = getObjectFromSpaceWithID(arena->spaceTux, shot->author_id); + author = space_get_object_id(arena->spaceTux, shot->author_id); if (author != NULL && author->bonus == BONUS_GHOST && author->bonus_time > 0) { @@ -285,24 +285,24 @@ static void action_eventwall(space_t * space, wall_t * wall, shot_t * shot) } if (shot->gun == GUN_BOMBBALL) { - if (export_fce->fce_getNetTypeGame() != NET_GAME_TYPE_CLIENT) { - export_fce->fce_boundBombBall(shot); + if (export_fce->fce_netMultiplayer_get_game_type() != NET_GAME_TYPE_CLIENT) { + export_fce->fce_shot_bound_bombBall(shot); } return; } - //delObjectFromSpaceWithObject(arena->spaceShot, shot, export_fce->fce_destroyShot); + //space_del_with_item(arena->spaceShot, shot, export_fce->fce_shot_destroy); shot->del = TRUE; } static void action_eventshot(space_t * space, shot_t * shot, space_t * p_spaceWall) { - actionSpaceFromLocation(p_spaceWall, action_eventwall, shot, shot->x, + space_action_from_location(p_spaceWall, action_eventwall, shot, shot->x, shot->y, shot->w, shot->h); if (shot->del == TRUE) { - delObjectFromSpaceWithObject(space, shot, export_fce->fce_destroyShot); + space_del_with_item(space, shot, export_fce->fce_shot_destroy); } } @@ -312,7 +312,7 @@ int event() return 0; } - actionSpace(export_fce->fce_getCurrentArena()->spaceShot, + space_action(export_fce->fce_arena_get_current()->spaceShot, action_eventshot, spaceWall); return 0; @@ -324,7 +324,7 @@ int isConflict(int x, int y, int w, int h) return 0; } - return isConflictWithObjectFromSpace(spaceWall, x, y, w, h); + return space_is_conflict_with_object(spaceWall, x, y, w, h); } void cmdArena(char *line) @@ -339,10 +339,10 @@ void recvMsg(char *msg) int destroy() { - destroySpaceWithObject(spaceWall, destroyWall); + space_destroy_with_item(spaceWall, destroyWall); #ifndef PUBLIC_SERVER - destroySpace(spaceImgWall); + space_destroy(spaceImgWall); #endif - destroyList(listWall); + list_destroy(listWall); return 0; } |