refexport_t @author cwei
| 38 | * @author cwei |
| 39 | */ |
| 40 | public interface refexport_t { |
| 41 | // ============================================================================ |
| 42 | // public interface for Renderer implementations |
| 43 | // |
| 44 | // ref.h, refexport_t |
| 45 | // ============================================================================ |
| 46 | // |
| 47 | // these are the functions exported by the refresh module |
| 48 | // |
| 49 | // called when the library is loaded |
| 50 | boolean Init(int vid_xpos, int vid_ypos); |
| 51 | |
| 52 | // called before the library is unloaded |
| 53 | void Shutdown(); |
| 54 | |
| 55 | // All data that will be used in a level should be |
| 56 | // registered before rendering any frames to prevent disk hits, |
| 57 | // but they can still be registered at a later time |
| 58 | // if necessary. |
| 59 | // |
| 60 | // EndRegistration will free any remaining data that wasn't registered. |
| 61 | // Any model_s or skin_s pointers from before the BeginRegistration |
| 62 | // are no longer valid after EndRegistration. |
| 63 | // |
| 64 | // Skins and images need to be differentiated, because skins |
| 65 | // are flood filled to eliminate mip map edge errors, and pics have |
| 66 | // an implicit "pics/" prepended to the name. (a pic name that starts with a |
| 67 | // slash will not use the "pics/" prefix or the ".pcx" postfix) |
| 68 | void BeginRegistration(String map); |
| 69 | model_t RegisterModel(String name); |
| 70 | image_t RegisterSkin(String name); |
| 71 | image_t RegisterPic(String name); |
| 72 | void SetSky(String name, float rotate, /* vec3_t */ |
| 73 | float[] axis); |
| 74 | void EndRegistration(); |
| 75 | |
| 76 | void RenderFrame(refdef_t fd); |
| 77 | |
| 78 | void DrawGetPicSize(Dimension dim /* int *w, *h */, String name); |
| 79 | // will return 0 0 if not found |
| 80 | void DrawPic(int x, int y, String name); |
| 81 | void DrawStretchPic(int x, int y, int w, int h, String name); |
| 82 | void DrawChar(int x, int y, int num); // num is 8 bit ASCII |
| 83 | void DrawTileClear(int x, int y, int w, int h, String name); |
| 84 | void DrawFill(int x, int y, int w, int h, int c); |
| 85 | void DrawFadeScreen(); |
| 86 | |
| 87 | // Draw images for cinematic rendering (which can have a different palette). Note that calls |
| 88 | void DrawStretchRaw(int x, int y, int w, int h, int cols, int rows, byte[] data); |
| 89 | |
| 90 | /* |
| 91 | ** video mode and refresh state management entry points |
| 92 | */ |
| 93 | /* 256 r,g,b values; null = game palette, size = 768 bytes */ |
| 94 | void CinematicSetPalette(final byte[] palette); |
| 95 | void BeginFrame(float camera_separation); |
| 96 | void EndFrame(); |
| 97 |
no outgoing calls
no test coverage detected