Differences From Artifact [d2bce2bd10]:
- File src/rendergl.m — part of check-in [e8f80b0482] at 2025-03-23 02:03:32 on branch trunk — Convert monster into a class (user: js, size: 11357) [annotate] [blame] [check-ins using]
To Artifact [34f844358a]:
- File
src/rendergl.m
— part of check-in
[6b85eefc85]
at
2025-03-23 02:47:40
on branch trunk
— Remove loop[ijkl]
They confused clang-format a lot. (user: js, size: 11430) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
108 109 110 111 112 113 114 | s = converted; } @finally { SDL_FreeFormat(format); } } #if 0 | | < | | | | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | s = converted; } @finally { SDL_FreeFormat(format); } } #if 0 for (int i = 0; i < s->w * s->h * 3; i++) { uchar *p = (uchar *)s->pixels + i; *p = 255 - *p; } #endif glBindTexture(GL_TEXTURE_2D, tnum); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp ? GL_CLAMP_TO_EDGE : GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, clamp ? GL_CLAMP_TO_EDGE : GL_REPEAT); |
︙ | ︙ | |||
175 176 177 178 179 180 181 | // ( cube texture, frame ) -> ( opengl id, name ) static int mapping[256][MAXFRAMES]; static OFString *mapname[256][MAXFRAMES]; void purgetextures() { | > > | | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | // ( cube texture, frame ) -> ( opengl id, name ) static int mapping[256][MAXFRAMES]; static OFString *mapname[256][MAXFRAMES]; void purgetextures() { for (int i = 0; i < 256; i++) for (int j = 0; j < MAXFRAMES; j++) mapping[i][j] = 0; } int curtexnum = 0; void texturereset() { |
︙ | ︙ | |||
217 218 219 220 221 222 223 | return tid; } *xs = *ys = 16; if (tid == 0) return 1; // crosshair :) | | < > | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | return tid; } *xs = *ys = 16; if (tid == 0) return 1; // crosshair :) // lazily happens once per "texture" command, basically for (int i = 0; i < curtex; i++) { if ([mapname[tex][frame] isEqual:texname[i]]) { mapping[tex][frame] = tid = i + FIRSTTEX; *xs = texx[i]; *ys = texy[i]; return tid; } } |
︙ | ︙ |