objekt_editor_render.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. Renderovaci rutiny
  3. */
  4. typedef struct _KRESLIT_VECI
  5. {
  6. byte prvku;
  7. byte dekorace;
  8. byte okoli;
  9. byte staticke;
  10. byte dynamicke;
  11. } KRESLIT_VECI;
  12. void oe_obj_env_spec(EDIT_MATERIAL * p_mat, EDIT_OBJEKT * p_obj,
  13. GLMATRIX * p_kw);
  14. void oe_kresli_mriz(float sx, float sz, float dx, int num_x, float r, float g,
  15. float b);
  16. void oe_kresli_stred(float d, float r, float g, float b);
  17. void oe_kresli_grid(K_EDITOR * p_cnf);
  18. void oe_kresli_linelist(K_EDITOR * p_cnf);
  19. void oe_kresli_group_vertexy(K_EDITOR * p_cnf);
  20. void oe_kresli_d_vertexy(K_EDITOR * p_cnf);
  21. void oe_kresli_objekt(K_EDITOR * p_cnf, EDIT_KONTEJNER * p_kont,
  22. EDIT_OBJEKT * p_obj, EDIT_MATERIAL ** p_mat, int akt_objekt, int akt_kont);
  23. void oe_kresli_objekt_jednoduse(EDIT_OBJEKT * p_obj, int flag, int kflag);
  24. void oe_kresli_kontejner(K_EDITOR * p_cnf, EDIT_MATERIAL ** p_mat,
  25. EDIT_KONTEJNER * p_kont, int akt_objekt);
  26. void oe_kresli_objekt_dratove(K_EDITOR * p_cnf, EDIT_MATERIAL ** p_mat,
  27. EDIT_KONTEJNER * p_kont, EDIT_OBJEKT * p_obj, int akt_objekt, int akt_kont);
  28. void oe_kresli_kontejner_dratove(K_EDITOR * p_cnf, EDIT_MATERIAL ** p_mat,
  29. EDIT_KONTEJNER * p_kont, int akt_objekt);
  30. void oe_kresli_kosoctverec(K_EDITOR * p_cnf, GLMATRIX * p_world, BOD * p_p,
  31. float r, float dr, float dg, float db);
  32. void oe_kresli_kamery(K_EDITOR * p_cnf);
  33. void oe_renderuj_scenu_pre(K_EDITOR * p_cnf);
  34. void oe_renderuj_scenu_po(K_EDITOR * p_cnf);
  35. void oe_renderuj_scenu_obyc(K_EDITOR * p_cnf,
  36. EDIT_KONTEJNER * p_kont[KONT_NUM], int max_kont);
  37. void oe_renderuj_scenu_optimal(K_EDITOR * p_cnf);
  38. void oe_renderuj_scenu_high_face(K_EDITOR * p_cnf);
  39. #define VELIKOST_STREDU 2
  40. #define VELIKOST_STREDU_VYBER 4
  41. int oe_test_kriz_stred(K_EDITOR * p_cnf, float vzdal, float x_s, float y_s,
  42. float z_s, int popis, int stred, int akt_osa);
  43. int oe_test_kriz_stred_bod(K_EDITOR * p_cnf, float vzdal, BOD * p_bod,
  44. int popis, int stred, int akt_osa);
  45. void oe_animuj_materialy(K_EDITOR * p_cnf, byte event);
  46. void oe_init_animace_materialy(K_EDITOR * p_cnf);
  47. void oe_animuj_frame_material_event(dword akt_time, EDIT_MATERIAL * p_mat,
  48. EDIT_TEXT * p_text);
  49. BOD *oe_cti_pozici_static_light(STATIC_LIGHT * p_light, BOD * p_bod);
  50. void oe_kresli_edit_flare(K_EDITOR * p_cnf, LENS_FLARE * p_flare, int num);
  51. void oe_kresli_game_flare(K_EDITOR * p_cnf, LENS_FLARE * p_flare, int num);
  52. void oe_kresli_poly_3d(EDIT_MESH_POLY * p_poly, EDIT_MATERIAL ** p_mat);
  53. void oe_kresli_poly_3d_game(EDIT_MESH_POLY * p_poly, EDIT_MATERIAL ** p_mat,
  54. int light);
  55. void oe_renderuj_scenu_zrcadlo(K_EDITOR * p_cnf);
  56. void oe_renderuj_scenu_kdtree(K_EDITOR * p_cnf, KD_BUNKA * p_prvni);
  57. void oe_kresli_face(EDIT_OBJEKT * p_obj, int face);
  58. void oe_kresli_kameru(KAMERA * p_cam, int pyr);
  59. void oe_kresli_editacni_stred(K_EDITOR * p_cnf, BOD * p_stred, int flag);
  60. void oe_nastav_material_single(EDIT_MATERIAL * p_smat, EDIT_MATERIAL * p_mat,
  61. EDIT_OBJEKT * p_obj, GLMATRIX * p_world);
  62. int oe_nastav_material_single_poly(EDIT_MATERIAL * p_smat,
  63. EDIT_MATERIAL * p_mat, EDIT_MESH_POLY * p_poly);
  64. void oe_zrus_material_single(EDIT_MATERIAL * p_mat);
  65. void oe_renderuj_all_off(void);
  66. void oe_kresli_stred_levelu(K_EDITOR * p_cnf);
  67. void oe_kresli_mlho_kostky(K_EDITOR * p_cnf);
  68. void oe_renderuj_mlho_kostky(K_EDITOR * p_cnf);
  69. void oe_kresli_kd_strom(KD_BUNKA * p_prvni, int uroven);
  70. void oe_kresli_listu_prvku(K_EDITOR * p_cnf);
  71. void oe_kresli_bb_kamery(K_EDITOR * p_cnf);
  72. void oe_poly_env_spec(EDIT_MATERIAL * p_mat, EDIT_MESH_POLY * p_poly);
  73. EDIT_OBJEKT *oe_cti_joint_objekt(K_EDITOR * p_cnf);
  74. #define LISTA_X 100
  75. __inline BOD *oe_cti_pozici_static_light(STATIC_LIGHT * p_light, BOD * p_bod)
  76. {
  77. if (p_light->flag2 & SL2_MESH) {
  78. transformuj_bod_matici_bod(&p_light->p,
  79. kont_world_matrix((EDIT_KONTEJNER *) p_light->p_mesh_data), p_bod);
  80. }
  81. else {
  82. *p_bod = p_light->p;
  83. }
  84. return (p_bod);
  85. }
  86. #define BARVA_KOSTI 0x00ff0000
  87. #define BARVA_KOSTI_AKT 0x000000ff
  88. #define RADIUS_KOSTI 0.2f