1 /* 2 3 Copyright (C) 2015-2018 Night Dive Studios, LLC. 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 */ 19 /* 20 * $Source: r:/prj/lib/src/2d/RCS/fl8bl.c $ 21 * $Revision: 1.2 $ 22 * $Author: kevin $ 23 * $Date: 1994/09/08 01:12:51 $ 24 * 25 * Generic routines for texture mapping rsd bitmaps. 26 * 27 * This file is part of the 2d library. 28 * 29 */ 30 31 #include "bitmap.h" 32 #include "grs.h" 33 #include "ifcn.h" 34 #include "lg.h" 35 #include "rsdunpck.h" 36 #include "tmapint.h" 37 #include "tmaptab.h" 38 39 extern void flat8_flat8_smooth_hv_double_ubitmap(grs_bitmap *src, grs_bitmap *dst); 40 void gri_trans_blend_clut_lin_umap_init(grs_tmap_loop_info *ti); 41 gri_trans_blend_clut_lin_umap_init(grs_tmap_loop_info * ti)42void gri_trans_blend_clut_lin_umap_init(grs_tmap_loop_info *ti) { 43 if (grd_unpack_buf != NULL) { 44 grs_bitmap tbm; 45 46 tbm.row = 2 * ti->bm.w; 47 if (ti->bm.bits == grd_unpack_buf) 48 tbm.bits = ti->bm.bits + ti->bm.row * ti->bm.h; 49 else 50 tbm.bits = grd_unpack_buf; 51 52 flat8_flat8_smooth_hv_double_ubitmap(&(ti->bm), &tbm); 53 ti->n = BMT_FLAT8 * GRD_FUNCS + GRC_TRANS_CLUT_BILIN; 54 ti->bm.bits = tbm.bits; 55 ti->bm.row = tbm.row; 56 ti->bm.w *= 2; 57 ti->bm.h *= 2; 58 ((void (*)(grs_tmap_loop_info *))(grd_tmap_init_table[ti->n]))(ti); 59 } 60 } 61