mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
general: Remove use of proprietary unsigned integer typedefs
This commit is contained in:
parent
eb753be249
commit
429acd6e0d
@ -245,7 +245,7 @@ apply_texture(int i, TextureContext *tc, const SamplerState &sampler) {
|
||||
|
||||
set_sampler_state(i, D3DSAMP_BORDERCOLOR, border_color);
|
||||
|
||||
uint aniso_degree = sampler.get_effective_anisotropic_degree();
|
||||
unsigned int aniso_degree = sampler.get_effective_anisotropic_degree();
|
||||
SamplerState::FilterType ft = sampler.get_effective_magfilter();
|
||||
|
||||
if (aniso_degree >= 1) {
|
||||
|
@ -831,7 +831,7 @@ create_texture(DXScreenData &scrn) {
|
||||
|
||||
tex->set_minfilter(ft);
|
||||
|
||||
uint aniso_degree;
|
||||
unsigned int aniso_degree;
|
||||
|
||||
aniso_degree = 1;
|
||||
if (scrn._d3dcaps.RasterCaps & D3DPRASTERCAPS_ANISOTROPY) {
|
||||
|
@ -192,8 +192,8 @@ struct DXScreenData {
|
||||
HWND _window;
|
||||
HMONITOR _monitor;
|
||||
DWORD _max_available_video_memory;
|
||||
ushort _card_id; // adapter ID
|
||||
ushort _depth_buffer_bitdepth; //GetSurfaceDesc is not reliable so must store this explicitly
|
||||
unsigned short _card_id; // adapter ID
|
||||
unsigned short _depth_buffer_bitdepth; //GetSurfaceDesc is not reliable so must store this explicitly
|
||||
bool _can_direct_disable_color_writes; // if true, don't need blending for this
|
||||
bool _is_low_memory_card;
|
||||
bool _is_tnl_device;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "pta_uchar.h"
|
||||
|
||||
template class PointerToBase<ReferenceCountedVector<uchar> >;
|
||||
template class PointerToArrayBase<uchar>;
|
||||
template class PointerToBase<ReferenceCountedVector<unsigned char> >;
|
||||
template class PointerToArrayBase<unsigned char>;
|
||||
template class PointerToArray<unsigned char>;
|
||||
template class ConstPointerToArray<unsigned char>;
|
||||
|
@ -29,8 +29,8 @@
|
||||
#if !defined(__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ < 7
|
||||
// GCC 4.6 has a weird bug related to this type.
|
||||
#else
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToBase<ReferenceCountedVector<uchar> >)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToArrayBase<uchar>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToBase<ReferenceCountedVector<unsigned char> >)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToArrayBase<unsigned char>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, PointerToArray<unsigned char>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EXPRESS, EXPTP_PANDA_EXPRESS, ConstPointerToArray<unsigned char>)
|
||||
#endif
|
||||
|
@ -2251,7 +2251,7 @@ do_get_auto_texture_scale(const CData *cdata) const {
|
||||
*/
|
||||
INLINE void Texture::
|
||||
store_unscaled_byte(unsigned char *&p, int value) {
|
||||
(*p++) = (uchar)value;
|
||||
(*p++) = (unsigned char)value;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2262,10 +2262,10 @@ store_unscaled_byte(unsigned char *&p, int value) {
|
||||
INLINE void Texture::
|
||||
store_unscaled_short(unsigned char *&p, int value) {
|
||||
union {
|
||||
ushort us;
|
||||
uchar uc[2];
|
||||
unsigned short us;
|
||||
unsigned char uc[2];
|
||||
} v;
|
||||
v.us = (ushort)value;
|
||||
v.us = (unsigned short)value;
|
||||
(*p++) = v.uc[0];
|
||||
(*p++) = v.uc[1];
|
||||
}
|
||||
@ -2310,8 +2310,8 @@ get_unsigned_byte(const unsigned char *&p) {
|
||||
INLINE double Texture::
|
||||
get_unsigned_short(const unsigned char *&p) {
|
||||
union {
|
||||
ushort us;
|
||||
uchar uc[2];
|
||||
unsigned short us;
|
||||
unsigned char uc[2];
|
||||
} v;
|
||||
v.uc[0] = (*p++);
|
||||
v.uc[1] = (*p++);
|
||||
@ -2327,7 +2327,7 @@ INLINE double Texture::
|
||||
get_unsigned_int(const unsigned char *&p) {
|
||||
union {
|
||||
unsigned int ui;
|
||||
uchar uc[4];
|
||||
unsigned char uc[4];
|
||||
} v;
|
||||
v.uc[0] = (*p++);
|
||||
v.uc[1] = (*p++);
|
||||
|
@ -1146,7 +1146,7 @@ set_ram_image_as(CPTA_uchar image, const string &supplied_format) {
|
||||
return;
|
||||
}
|
||||
for (int p = 0; p < imgsize; ++p) {
|
||||
for (uchar s = 0; s < format.size(); ++s) {
|
||||
for (unsigned char s = 0; s < format.size(); ++s) {
|
||||
signed char component = -1;
|
||||
if (format.at(s) == 'B' || (cdata->_num_components <= 2 && format.at(s) != 'A')) {
|
||||
component = 0;
|
||||
@ -1178,7 +1178,7 @@ set_ram_image_as(CPTA_uchar image, const string &supplied_format) {
|
||||
return;
|
||||
}
|
||||
for (int p = 0; p < imgsize; ++p) {
|
||||
for (uchar s = 0; s < format.size(); ++s) {
|
||||
for (unsigned char s = 0; s < format.size(); ++s) {
|
||||
signed char component = -1;
|
||||
if (format.at(s) == 'B' || (cdata->_num_components <= 2 && format.at(s) != 'A')) {
|
||||
component = 0;
|
||||
@ -8023,7 +8023,7 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
||||
for (int j = y_size-1; j >= 0; j--) {
|
||||
const xel *row = array + j * x_size;
|
||||
for (int i = 0; i < x_size; i++) {
|
||||
*p++ = (uchar)PPM_GETB(row[i]);
|
||||
*p++ = (unsigned char)PPM_GETB(row[i]);
|
||||
}
|
||||
p += row_skip;
|
||||
}
|
||||
@ -8036,8 +8036,8 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
||||
const xel *row = array + j * x_size;
|
||||
const xelval *alpha_row = alpha + j * x_size;
|
||||
for (int i = 0; i < x_size; i++) {
|
||||
*p++ = (uchar)PPM_GETB(row[i]);
|
||||
*p++ = (uchar)alpha_row[i];
|
||||
*p++ = (unsigned char)PPM_GETB(row[i]);
|
||||
*p++ = (unsigned char)alpha_row[i];
|
||||
}
|
||||
p += row_skip;
|
||||
}
|
||||
@ -8045,8 +8045,8 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
||||
for (int j = y_size-1; j >= 0; j--) {
|
||||
const xel *row = array + j * x_size;
|
||||
for (int i = 0; i < x_size; i++) {
|
||||
*p++ = (uchar)PPM_GETB(row[i]);
|
||||
*p++ = (uchar)255;
|
||||
*p++ = (unsigned char)PPM_GETB(row[i]);
|
||||
*p++ = (unsigned char)255;
|
||||
}
|
||||
p += row_skip;
|
||||
}
|
||||
@ -8057,9 +8057,9 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
||||
for (int j = y_size-1; j >= 0; j--) {
|
||||
const xel *row = array + j * x_size;
|
||||
for (int i = 0; i < x_size; i++) {
|
||||
*p++ = (uchar)PPM_GETB(row[i]);
|
||||
*p++ = (uchar)PPM_GETG(row[i]);
|
||||
*p++ = (uchar)PPM_GETR(row[i]);
|
||||
*p++ = (unsigned char)PPM_GETB(row[i]);
|
||||
*p++ = (unsigned char)PPM_GETG(row[i]);
|
||||
*p++ = (unsigned char)PPM_GETR(row[i]);
|
||||
}
|
||||
p += row_skip;
|
||||
}
|
||||
@ -8072,10 +8072,10 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
||||
const xel *row = array + j * x_size;
|
||||
const xelval *alpha_row = alpha + j * x_size;
|
||||
for (int i = 0; i < x_size; i++) {
|
||||
*p++ = (uchar)PPM_GETB(row[i]);
|
||||
*p++ = (uchar)PPM_GETG(row[i]);
|
||||
*p++ = (uchar)PPM_GETR(row[i]);
|
||||
*p++ = (uchar)alpha_row[i];
|
||||
*p++ = (unsigned char)PPM_GETB(row[i]);
|
||||
*p++ = (unsigned char)PPM_GETG(row[i]);
|
||||
*p++ = (unsigned char)PPM_GETR(row[i]);
|
||||
*p++ = (unsigned char)alpha_row[i];
|
||||
}
|
||||
p += row_skip;
|
||||
}
|
||||
@ -8083,10 +8083,10 @@ convert_from_pnmimage(PTA_uchar &image, size_t page_size,
|
||||
for (int j = y_size-1; j >= 0; j--) {
|
||||
const xel *row = array + j * x_size;
|
||||
for (int i = 0; i < x_size; i++) {
|
||||
*p++ = (uchar)PPM_GETB(row[i]);
|
||||
*p++ = (uchar)PPM_GETG(row[i]);
|
||||
*p++ = (uchar)PPM_GETR(row[i]);
|
||||
*p++ = (uchar)255;
|
||||
*p++ = (unsigned char)PPM_GETB(row[i]);
|
||||
*p++ = (unsigned char)PPM_GETG(row[i]);
|
||||
*p++ = (unsigned char)PPM_GETR(row[i]);
|
||||
*p++ = (unsigned char)255;
|
||||
}
|
||||
p += row_skip;
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ TimeVal() {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE ulong TimeVal::
|
||||
INLINE unsigned long TimeVal::
|
||||
get_sec() const {
|
||||
return tv[0];
|
||||
}
|
||||
@ -250,7 +250,7 @@ get_sec() const {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE ulong TimeVal::
|
||||
INLINE unsigned long TimeVal::
|
||||
get_usec() const {
|
||||
return tv[1];
|
||||
}
|
||||
|
@ -31,9 +31,9 @@
|
||||
class EXPCL_PANDA_PUTIL TimeVal {
|
||||
PUBLISHED:
|
||||
INLINE TimeVal();
|
||||
INLINE ulong get_sec() const;
|
||||
INLINE ulong get_usec() const;
|
||||
ulong tv[2];
|
||||
INLINE unsigned long get_sec() const;
|
||||
INLINE unsigned long get_usec() const;
|
||||
unsigned long tv[2];
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -10,10 +10,10 @@ ignoretype Factory<TypedWriteable>
|
||||
# builds (to support multi-arch builds), so we don't export this.
|
||||
ignoretype BitMaskNative
|
||||
|
||||
forcetype PointerToBase<ReferenceCountedVector<ushort> >
|
||||
forcetype PointerToArrayBase<ushort>
|
||||
forcetype PointerToArray<ushort>
|
||||
forcetype ConstPointerToArray<ushort>
|
||||
forcetype PointerToBase<ReferenceCountedVector<unsigned short> >
|
||||
forcetype PointerToArrayBase<unsigned short>
|
||||
forcetype PointerToArray<unsigned short>
|
||||
forcetype ConstPointerToArray<unsigned short>
|
||||
|
||||
# This is so the extensions for PTA_ushort are made available.
|
||||
forceinclude "pointerToArray_ext.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "pta_ushort.h"
|
||||
|
||||
template class PointerToBase<ReferenceCountedVector<ushort> >;
|
||||
template class PointerToArrayBase<ushort>;
|
||||
template class PointerToBase<ReferenceCountedVector<unsigned short> >;
|
||||
template class PointerToArrayBase<unsigned short>;
|
||||
template class PointerToArray<unsigned short>;
|
||||
template class ConstPointerToArray<unsigned short>;
|
||||
|
@ -26,8 +26,8 @@
|
||||
* defining the pta again.
|
||||
*/
|
||||
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToBase<ReferenceCountedVector<ushort> >)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToArrayBase<ushort>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToBase<ReferenceCountedVector<unsigned short> >)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToArrayBase<unsigned short>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToArray<unsigned short>)
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ConstPointerToArray<unsigned short>)
|
||||
|
||||
|
@ -2109,7 +2109,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
||||
if (lptstr != nullptr) {
|
||||
char *pChar;
|
||||
for (pChar = lptstr; *pChar; pChar++) {
|
||||
_input->keystroke((uchar)*pChar);
|
||||
_input->keystroke((unsigned char)*pChar);
|
||||
}
|
||||
GlobalUnlock(hglb);
|
||||
}
|
||||
|
@ -1466,8 +1466,8 @@ void MayaEggLoader::TraverseEggNode(EggNode *node, EggGroup *context, string del
|
||||
surface->_vNumCvs = eggNurbsSurface->get_num_v_cvs();
|
||||
|
||||
// [gjeon] building cvArray
|
||||
for (uint ui = 0; ui < surface->_uNumCvs; ui++) {
|
||||
for (uint vi = 0; vi < surface->_vNumCvs; vi++) {
|
||||
for (unsigned int ui = 0; ui < surface->_uNumCvs; ui++) {
|
||||
for (unsigned int vi = 0; vi < surface->_vNumCvs; vi++) {
|
||||
EggVertex *vtx = eggNurbsSurface->get_vertex(eggNurbsSurface->get_vertex_index(ui, vi));
|
||||
surface->_cvArray.append(MakeMPoint(vtx->get_pos3()));
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ get_egg_group(MayaNodeDesc *node_desc) {
|
||||
|
||||
pvector<string> tag_attribute_names;
|
||||
get_tag_attribute_names(dag_object, tag_attribute_names);
|
||||
for (uint ti=0; ti < tag_attribute_names.size(); ti++) {
|
||||
for (unsigned int ti=0; ti < tag_attribute_names.size(); ti++) {
|
||||
if (get_enum_attribute(dag_object, tag_attribute_names[ti], object_type)) {
|
||||
egg_group->set_tag(tag_attribute_names[ti].substr(3), object_type);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user