Changeset 512 for abuse/trunk/src/light.cpp
- Timestamp:
- Apr 20, 2011, 12:39:27 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/light.cpp
r494 r512 12 12 13 13 #include <stdlib.h> 14 15 #include "common.h" 14 16 15 17 #include "light.h" … … 793 795 screen->lock(); 794 796 795 int scr_w=screen-> width();797 int scr_w=screen->Size().x; 796 798 uint8_t *screen_line=screen->scan_line(cy1)+cx1; 797 799 … … 899 901 image *out, int32_t out_x, int32_t out_y) 900 902 { 901 if (sc-> width()*2+out_x>out->width()||902 sc-> height()*2+out_y>out->height())903 if (sc->Size().x*2+out_x>out->Size().x || 904 sc->Size().y*2+out_y>out->Size().y) 903 905 return ; // screen was resized and small_render has not changed size yet 904 906 … … 930 932 uint8_t *src=sc->scan_line(0); 931 933 uint8_t *dst=out->scan_line(out_y+cy1*2)+cx1*2+out_x; 932 int d_skip=out-> width()-sc->width()*2;934 int d_skip=out->Size().x-sc->Size().x*2; 933 935 int x,y; 934 936 uint16_t v; 935 for (y=sc-> height(); y; y--)936 { 937 for (x=sc-> width(); x; x--)937 for (y=sc->Size().y; y; y--) 938 { 939 for (x=sc->Size().x; x; x--) 938 940 { 939 941 v=*(src++); … … 942 944 } 943 945 dst=dst+d_skip; 944 memcpy(dst,dst-out-> width(),sc->width()*2);945 dst+=out-> width();946 memcpy(dst,dst-out->Size().x,sc->Size().x*2); 947 dst+=out->Size().x; 946 948 } 947 949 … … 951 953 light_patch *first=make_patch_list(cx2-cx1+1,cy2-cy1+1,screenx,screeny); 952 954 953 int scr_w=sc-> width();954 int dscr_w=out-> width();955 int scr_w=sc->Size().x; 956 int dscr_w=out->Size().x; 955 957 956 958 int prefix_x=(screenx&7);
Note: See TracChangeset
for help on using the changeset viewer.