2016 ソフトウェア設計及び演習用の班Wiki
16::gr13::collision.h
#ifndef INCLUDE_collision_h #define INCLUDE_collision_h #include<gtk/gtk.h> #include <glib.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include"display.h" #include"object.h" enum judge {man_hit_enemy, man_hit_object, man_hit_item, enemy_hit_object}; enum ID {man_ID = 1, nikibi_ID, kanso_ID, uv_ID, kaodani_ID, at_ID, boss_ID, oil_ID, m_attack_ID, b_attack_ID, block_ID, eye_ID, nose_ID, mouth_ID, ear_ID, hair_ID}; /* man = 1; nikibi = 2; kanso = 3; uv = 4; */ /* kaodani = 5; at = 6; boss = 7; */ /* oil = 8; m_attack = 9; */ /* b_attack = 10; block = 11; eye = 12; */ /* nose = 13; mouth = 14; ear = 15; hair = 16; */ int collision_sort(Sprite *Subject, Sprite *Object); 8< int collision_man_enemy(Sprite * man, Sprite * enemy); int collision_man_object(Sprite * man, Sprite * object); int collision_man_item(Sprite * man, Sprite * item); int collision_enemy_object(Sprite * enemy, Sprite * object); int block_num_get(Sprite *sprite); gint collision_floor(Sprite *sprite); gint sprite_grav(Sprite *sprite); //めり込みの許容範囲 //これ以上物体同士が接触してしまっているとすり抜けが起こってしまうので注意->済み //それバグにも対応する必要あり→済 #define MAX_LENGTH 50 #define RIGHT 1 //右に接触時 #define LEFT 2 //左に接触時 #define UP 3 //上に接触時 #define DOWN 4 //下に接触時 #endif
最終更新日:2016/08/05 06:50:33